X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=configure;h=460fcfcf31178ea4b1ecdf9fc506e692b064747a;hp=5602be247611558fdb1cc1f743e0ac3cf9239a82;hb=37be45767fef9348300bb45c82efd474bb01651f;hpb=d99f15d7ee38d606a2b3b5bd34f1e6c787b3b8a2 diff --git a/configure b/configure index 5602be24..460fcfcf 100755 --- a/configure +++ b/configure @@ -1,7 +1,21 @@ #! /bin/sh +# Test whether this shell is capable of parameter substring processing. +( option='a/b'; : ${option#*/} ) 2>/dev/null || { + echo " +The shell interpreting '$0' is lacking some required features. + +To work around this problem you may try to execute: + + ksh $0 $* + or + bash $0 $* +" + exit 1 +} + # Store original IFS value so it can be changed (and restored) in many places. -readonly DEFAULT_IFS=$IFS +readonly DEFAULT_IFS="$IFS" srcdir=$(dirname "$0") @@ -222,7 +236,12 @@ done # 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} +if [ -z "$LIBDIR" ] ; then + libdir_expanded="${PREFIX}/lib" +else + # very non-general variable expansion + libdir_expanded=`echo "$LIBDIR" | sed "s|\\${prefix}|${PREFIX}|g; s|\\$prefix/|${PREFIX}/|; s|//*|/|g"` +fi cat < /dev/null 2>&1 then WARN_CXXFLAGS="${WARN_CXXFLAGS}${WARN_CXXFLAGS:+ }${flag}" @@ -649,7 +676,7 @@ HAVE_GETLINE = ${have_getline} # build its own version) HAVE_STRCASESTR = ${have_strcasestr} -# Supported platforms (so far) are: LINUX, MACOSX, SOLARIS +# Supported platforms (so far) are: LINUX, MACOSX, SOLARIS, FREEBSD, OPENBSD PLATFORM = ${platform} # Whether the linker will automatically resolve the dependency of one