]> git.notmuchmail.org Git - notmuch/blobdiff - configure
cli/show: pass the siglist directly to the sigstatus sprinter
[notmuch] / configure
index 37db04d09bc6e0aec15b346938c03861af53accb..5e7e5aa9478e8ee2c844f727dce17dfd3b3d1a64 100755 (executable)
--- a/configure
+++ b/configure
@@ -53,6 +53,8 @@ fi
 
 # Set several defaults (optionally specified by the user in
 # environment variables)
+BASHCMD=${BASHCMD:-bash}
+PERL=${PERL:-perl}
 CC=${CC:-cc}
 CXX=${CXX:-c++}
 CFLAGS=${CFLAGS:--g -O2}
@@ -80,6 +82,7 @@ WITH_API_DOCS=1
 WITH_EMACS=1
 WITH_DESKTOP=1
 WITH_BASH=1
+WITH_RPATH=1
 WITH_RUBY=1
 WITH_ZSH=1
 WITH_RETRY_LOCK=1
@@ -139,6 +142,7 @@ Fine tuning of some installation directories is available:
        --libdir=DIR            Install libraries to DIR [PREFIX/lib]
        --includedir=DIR        Install header files to DIR [PREFIX/include]
        --mandir=DIR            Install man pages to DIR [PREFIX/share/man]
+       --infodir=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]
@@ -162,7 +166,6 @@ configure-script calling conventions, but don't do anything yet:
 
        --build=<cpu>-<vendor>-<os>     Currently ignored
        --host=<cpu>-<vendor>-<os>      Currently ignored
-       --infodir=DIR                   Currently ignored
        --datadir=DIR                   Currently ignored
        --localstatedir=DIR             Currently ignored
        --libexecdir=DIR                Currently ignored
@@ -185,6 +188,8 @@ for option; do
        INCLUDEDIR="${option#*=}"
     elif [ "${option%%=*}" = '--mandir' ] ; then
        MANDIR="${option#*=}"
+    elif [ "${option%%=*}" = '--infodir' ] ; then
+       INFODIR="${option#*=}"
     elif [ "${option%%=*}" = '--sysconfdir' ] ; then
        SYSCONFDIR="${option#*=}"
     elif [ "${option%%=*}" = '--emacslispdir' ] ; then
@@ -237,6 +242,14 @@ for option; do
        fi
     elif [ "${option}" = '--without-bash-completion' ] ; then
        WITH_BASH=0
+    elif [ "${option%%=*}" = '--with-rpath' ]; then
+       if [ "${option#*=}" = 'no' ]; then
+           WITH_RPATH=0
+       else
+           WITH_RPATH=1
+       fi
+    elif [ "${option}" = '--without-rpath' ] ; then
+       WITH_RPATH=0
     elif [ "${option%%=*}" = '--with-ruby' ]; then
        if [ "${option#*=}" = 'no' ]; then
            WITH_RUBY=0
@@ -265,8 +278,6 @@ for option; do
        true
     elif [ "${option%%=*}" = '--host' ] ; then
        true
-    elif [ "${option%%=*}" = '--infodir' ] ; then
-       true
     elif [ "${option%%=*}" = '--datadir' ] ; then
        true
     elif [ "${option%%=*}" = '--localstatedir' ] ; then
@@ -557,6 +568,26 @@ else
     errors=$((errors + 1))
 fi
 
+printf "Checking for bash... "
+if command -v ${BASHCMD} > /dev/null; then
+    have_bash=1
+    bash_absolute=$(command -v ${BASHCMD})
+    printf "Yes (%s).\n" "$bash_absolute"
+else
+    have_bash=0
+    printf "No. (%s not found)\n" "${BASHCMD}"
+fi
+
+printf "Checking for perl... "
+if command -v ${PERL} > /dev/null; then
+    have_perl=1
+    perl_absolute=$(command -v ${PERL})
+    printf "Yes (%s).\n" "$perl_absolute"
+else
+    have_perl=0
+    printf "No. (%s not found)\n" "${PERL}"
+fi
+
 printf "Checking for python... "
 have_python=0
 
@@ -601,8 +632,8 @@ if [ -z "${EMACSETCDIR-}" ]; then
     EMACSETCDIR="\$(prefix)/share/emacs/site-lisp"
 fi
 
-printf "Checking if emacs is available... "
-if emacs --quick --batch > /dev/null 2>&1; then
+printf "Checking if emacs (>= 24) is available... "
+if emacs --quick --batch --eval '(if (< emacs-major-version 24) (kill-emacs 1))' > /dev/null 2>&1; then
     printf "Yes.\n"
     have_emacs=1
 else
@@ -715,7 +746,7 @@ elif [ $uname = "Linux" ] || [ $uname = "GNU" ] ; then
     IFS="
 "
     for path in $ldconfig_paths; do
-       if [ "$path" = "$libdir_expanded" ]; then
+       if [ "$path" -ef "$libdir_expanded" ]; then
            libdir_in_ldconfig=1
        fi
     done
@@ -906,7 +937,7 @@ fi
 rm -f compat/check_asctime
 
 printf "Checking for rpath support... "
-if ${CC} -Wl,--enable-new-dtags -Wl,-rpath,/tmp/ -o minimal minimal.c >/dev/null 2>&1
+if [ $WITH_RPATH = "1" ] && ${CC} -Wl,--enable-new-dtags -Wl,-rpath,/tmp/ -o minimal minimal.c >/dev/null 2>&1
 then
     printf "Yes.\n"
     rpath_ldflags="-Wl,--enable-new-dtags -Wl,-rpath,\$(libdir)"
@@ -1068,6 +1099,9 @@ includedir = ${INCLUDEDIR:=\$(prefix)/include}
 # The directory to which man pages should be installed
 mandir = ${MANDIR:=\$(prefix)/share/man}
 
+# The directory to which man pages should be installed
+infodir = ${INFODIR:=\$(prefix)/share/info}
+
 # The directory to which read-only (configuration) files should be installed
 sysconfdir = ${SYSCONFDIR:=\$(prefix)/etc}
 
@@ -1078,6 +1112,14 @@ emacslispdir=${EMACSLISPDIR}
 # be installed
 emacsetcdir=${EMACSETCDIR}
 
+# Whether bash exists, and if so where
+HAVE_BASH = ${have_bash}
+BASH_ABSOLUTE = ${bash_absolute}
+
+# Whether perl exists, and if so where
+HAVE_PERL = ${have_perl}
+PERL_ABSOLUTE = ${perl_absolute}
+
 # Whether there's an emacs binary available for byte-compiling
 HAVE_EMACS = ${have_emacs}
 
@@ -1259,6 +1301,14 @@ NOTMUCH_DEFAULT_XAPIAN_BACKEND=${default_xapian_backend}
 # do we have man pages?
 NOTMUCH_HAVE_MAN=$((have_sphinx))
 
+# Whether bash exists, and if so where
+NOTMUCH_HAVE_BASH=${have_bash}
+NOTMUCH_BASH_ABSOLUTE=${bash_absolute}
+
+# Whether perl exists, and if so where
+NOTMUCH_HAVE_PERL=${have_perl}
+NOTMUCH_PERL_ABSOLUTE=${perl_absolute}
+
 # Name of python interpreter
 NOTMUCH_PYTHON=${python}