X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=configure;h=7e8cd163f950eb8f42656a363fe764b8c71aa670;hp=c522ad8524becfdb28ff73aefefbca6bb08c0411;hb=9d9668e3e7b0e4ed5e054125841dd729a46abd79;hpb=42bda003a0df6c4b798ee1063a01c2ce0b2962e5 diff --git a/configure b/configure index c522ad85..7e8cd163 100755 --- a/configure +++ b/configure @@ -1,12 +1,21 @@ #! /bin/sh +# Removing space from IFS makes it much easier to support filenames +# with spaces. See http://www.dwheeler.com/essays/filenames-in-shell.html +# for gory details. +IFS="$(printf '\n\t')" + +# Since we don't have space in IFS we use tab to separate things in lists +tab="$(printf '\t')" + # 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} +LDFLAGS=${LDFLAGS:-} +XAPIAN_CONFIG=${XAPIAN_CONFIG:-xapian-config-1.1${tab}xapian-config} # We don't allow the EMACS or GZIP Makefile variables inherit values # from the environment as we do with CC and CXX above. The reason is @@ -158,6 +167,12 @@ for option; do fi done +# We set this value early, (rather than just while printing the +# Makefile.config file later like most values), because we need to +# actually investigate this value compared to the ldconfig_paths value +# below. +libdir_expanded=${LIBDIR:-${PREFIX}/lib} + cat </dev/null | sed -n -e 's,^\(/.*\):\( (.*)\)\?$,\1,p') + for path in $ldconfig_paths; do + echo "Checking $path compared to $libdir_expanded" + if [ "$path" = "$libdir_expanded" ]; then + libdir_in_ldconfig=1 + fi + done +else + printf "Unknown.\n" + cat <