X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=configure;h=dedb7d87ccb1530026fe960e6e6a1dddfa33bf38;hp=3999ce8f3a80509dda16572a3a92bcbf4035a103;hb=4d136995cebb3a339faf844fa3106f398562aad7;hpb=68a2c7a8b0f749cb33a8ce7cfa2aa7781d2529bb diff --git a/configure b/configure index 3999ce8f..dedb7d87 100755 --- a/configure +++ b/configure @@ -97,6 +97,7 @@ Fine tuning of some installation directories is available: --mandir=DIR Install man pages to DIR [PREFIX/share/man] --sysconfdir=DIR Read-only single-machine data [PREFIX/etc] --emacslispdir=DIR Emacs code [PREFIX/share/emacs/site-lisp] + --emacsetcdir=DIR Emacs miscellaneous files [PREFIX/share/emacs/site-lisp] --bashcompletiondir=DIR Bash completions files [SYSCONFDIR/bash_completion.d] --zshcompletiondir=DIR Zsh completions files [PREFIX/share/zsh/functions/Completion/Unix] @@ -139,6 +140,8 @@ for option; do SYSCONFDIR="${option#*=}" elif [ "${option%%=*}" = '--emacslispdir' ] ; then EMACSLISPDIR="${option#*=}" + elif [ "${option%%=*}" = '--emacsetcdir' ] ; then + EMACSETCDIR="${option#*=}" elif [ "${option%%=*}" = '--bashcompletiondir' ] ; then BASHCOMPLETIONDIR="${option#*=}" elif [ "${option%%=*}" = '--zshcompletiondir' ] ; then @@ -278,6 +281,7 @@ for gmimepc in gmime-2.6 gmime-2.4; do have_gmime=1 gmime_cflags=$(pkg-config --cflags $gmimepc) gmime_ldflags=$(pkg-config --libs $gmimepc) + break fi done if [ "$have_gmime" = "0" ]; then @@ -286,10 +290,10 @@ if [ "$have_gmime" = "0" ]; then fi # GMime already depends on Glib >= 2.12, but we use at least one Glib -# function that only exists as of 2.14, (g_hash_table_get_keys) -printf "Checking for Glib development files (>= 2.14)... " +# function that only exists as of 2.22, (g_array_unref) +printf "Checking for Glib development files (>= 2.22)... " have_glib=0 -if pkg-config --exists 'glib-2.0 >= 2.14'; then +if pkg-config --exists 'glib-2.0 >= 2.22'; then printf "Yes.\n" have_glib=1 glib_cflags=$(pkg-config --cflags glib-2.0) @@ -330,6 +334,14 @@ if [ -z "${EMACSLISPDIR}" ]; then fi fi +if [ -z "${EMACSETCDIR}" ]; then + if pkg-config --exists emacs; then + EMACSETCDIR=$(pkg-config emacs --variable sitepkglispdir) + else + EMACSETCDIR='$(prefix)/share/emacs/site-lisp' + fi +fi + printf "Checking if emacs is available... " if emacs --quick --batch > /dev/null 2>&1; then printf "Yes.\n" @@ -405,7 +417,7 @@ EOF echo " http://spruce.sourceforge.net/gmime/" fi if [ $have_glib -eq 0 ]; then - echo " Glib library >= 2.14 (including development files such as headers)" + echo " Glib library >= 2.22 (including development files such as headers)" echo " http://ftp.gnome.org/pub/gnome/sources/glib/" fi if [ $have_talloc -eq 0 ]; then @@ -614,6 +626,10 @@ sysconfdir = ${SYSCONFDIR:=\$(prefix)/etc} # The directory to which emacs lisp files should be installed emacslispdir=${EMACSLISPDIR} +# The directory to which emacs miscellaneous (machine-independent) files should +# be installed +emacsetcdir=${EMACSETCDIR} + # Whether there's an emacs binary available for byte-compiling HAVE_EMACS = ${have_emacs}