# Source of configuration for QDBM #================================================================ # Generic Settings #================================================================ # Targets AC_INIT(qdbm, 1.7.10) # Command search path MYPATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/ccs/bin:/usr/ucb:$PATH" # Export variables TARGETS="all" MYDEFS="" LD="ld" AR="ar" MYCWD=`pwd` #================================================================ # Options #================================================================ # Debug mode AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [build for debugging])) if test "$enable_debug" = "yes" then TARGETS="debug" fi # Developping mode AC_ARG_ENABLE(devel, AC_HELP_STRING([--enable-devel], [build for development])) if test "$enable_devel" = "yes" then TARGETS="devel" fi # Disable file locking AC_ARG_ENABLE(nolock, AC_HELP_STRING([--enable-nolock], [build for environments without file locking])) if test "$enable_nolock" = "yes" then MYDEFS="$MYDEFS -DMYNOLOCK" fi # Disable memory mapping AC_ARG_ENABLE(nommap, AC_HELP_STRING([--enable-nommap], [build for environments without memory mapping])) if test "$enable_nommap" = "yes" then MYDEFS="$MYDEFS -DMYNOMMAP" fi # Enable ZLIB compression AC_ARG_ENABLE(zlib, AC_HELP_STRING([--enable-zlib], [feature ZLIB for B+ tree and inverted index])) if test "$enable_zlib" = "yes" then MYDEFS="$MYDEFS -DMYZLIB" myzlib="yes" fi #================================================================ # Checking Commands to build #================================================================ # C compiler AC_PROG_CC if test "$GCC" != "yes" then printf '#================================================================\n' 1>&2 printf '# WARNING: GCC is required to build this package.\n' 1>&2 printf '#================================================================\n' 1>&2 fi # Linker printf 'checking for ld... ' if PATH="$MYPATH" which ld > /dev/null 2>&1 then LD=`PATH="$MYPATH" which ld` printf '%s\n' "$LD" else printf 'no\n' printf '#================================================================\n' 1>&2 printf '# WARNING: ld is not found in PATH.\n' 1>&2 printf '#================================================================\n' 1>&2 fi # Archiver printf 'checking for ar... ' if PATH="$MYPATH" which ar > /dev/null 2>&1 then AR=`PATH="$MYPATH" which ar` printf '%s\n' "$AR" else printf 'no\n' printf '#================================================================\n' 1>&2 printf '# WARNING: ar is not found in PATH.\n' 1>&2 printf '#================================================================\n' 1>&2 fi #================================================================ # Checking Libraries #================================================================ # Checking underlying libraries AC_CHECK_LIB(c, main) AC_CHECK_LIB(z, main) # Duplication of QDBM for C AC_CHECK_LIB(qdbm, main, printf '#================================================================\n' 1>&2 printf '# WARNING: Uninstall old libraries before installation.\n' 1>&2 printf '#================================================================\n' 1>&2 ) #================================================================ # Generic Settings #================================================================ # Export variables AC_SUBST(TARGETS) AC_SUBST(MYDEFS) AC_SUBST(LD) AC_SUBST(AR) AC_SUBST(MYCWD) # Targets AC_OUTPUT(Makefile LTmakefile rpmspec) # END OF FILE