X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=configure;h=5d254b3d97c09ab8ee047f4cd0b3719c3258909b;hp=ff8baa5e52696686461d82d5cf9728e1c5448a0b;hb=bf159bd829efb6aa73c68542949eb11d9a44d93c;hpb=943f415f81207ea00bf1efe8c2c1cbf13a094a56 diff --git a/configure b/configure index ff8baa5e..5d254b3d 100755 --- a/configure +++ b/configure @@ -1,17 +1,85 @@ #! /bin/sh +# Set several defaults (optionally specified by the user in +# environemnt variables) CC=${CC:-gcc} CXX=${CXX:-g++} CFLAGS=${CFLAGS:--O2} CXXFLAGS=${CXXFLAGS:-\$(CFLAGS)} +XAPIAN_CONFIG=${XAPIAN_CONFIG:-xapian-config-1.1 xapian-config} -# defaults +# Set the defaults for values the user can specify with command-line +# options. PREFIX=/usr/local +LIBDIR= -# option parsing +usage () +{ + cat < /dev/null 2>&1; then - printf "Yes.\n" - have_xapian=1 - xapian_cxxflags=$(xapian-config --cxxflags) - xapian_ldflags=$(xapian-config --libs) -else +have_xapian=0 +for xapian_config in ${XAPIAN_CONFIG}; do + if ${xapian_config} --version > /dev/null 2>&1; then + printf "Yes.\n" + have_xapian=1 + xapian_cxxflags=$(${xapian_config} --cxxflags) + xapian_ldflags=$(${xapian_config} --libs) + break + fi +done +if [ ${have_xapian} = "0" ]; then printf "No.\n" - have_xapian=0 errors=$((errors + 1)) fi @@ -206,9 +278,15 @@ CXXFLAGS = ${CXXFLAGS} # The prefix to which notmuch should be installed prefix = ${PREFIX} +# The directory to which notmuch libraries should be installed +libdir = ${LIBDIR:=$PREFIX/lib} + # The directory to which emacs lisp files should be installed emacs_lispdir=${emacs_lispdir} +# The directory to which desktop files should be installed +desktop_dir = \${prefix}/share/applications + # Whether the getline function is available (if not, then notmuch will # build its own version) HAVE_GETLINE = ${have_getline}