#!/bin/sh # # Configuration script for Services. # # IRC Services is copyright (c) 1996-2007 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for # details. ########################################################################### # Temporary directory to use for various things. CONFTMP=conf-tmp ########################################################################### # Nifty handy functions. echo2 () { $ECHO2 "$*$ECHO2SUF" # these are defined later } log () { echo >&3 "$MODE: $*" } run () { echo >&3 "$MODE: >>> $*" ("$@") >&3 2>&3 &3 "$MODE: *** Command failed (exit code $xxres)" fi return $xxres } exists () { # because some shells don't have test -e if [ -f $1 -o -d $1 -o -p $1 -o -c $1 -o -b $1 ] ; then return 0 else return 1 fi } grep_q () { grep >/dev/null 2>&1 "$@" } # Kludge around GNU coreutils stuffiness. head_is_broken="" if [ x`echo test | head -1 2>/dev/null` != xtest ] ; then head_is_broken=broken elif [ "x`echo test | head -1 2>&1 >/dev/null`" != x ] ; then head_is_broken=broken fi HEAD () { if test "$head_is_broken" ; then count=$1; shift head -n`echo x$count | cut -c3-` "$@" else head "$@" fi } ########################################################################### # Return the default flags for the given C compiler. def_cc_flags () { GCC=no a=`echo "x$1" | cut -c1-4` if [ "$a" = "xgcc" -o "x$1" = "xkgcc" ] ; then GCC=yes elif "$1" --version 2>/dev/null | grep_q '(GCC)' ; then GCC=yes fi if [ $GCC = yes ] ; then echo "-O2 -fno-strict-aliasing" elif [ "X$1" = "Xicc" ] ; then echo "-O0 -wd144,167,556" fi } ########################################################################### # Test for the presence of a given include file or function. If the # variable TEST is non-empty, it contains code to be placed at the end of # main(), and should return 0 if everything is okay, else 1. # # For includes: Pass the include filename as an argument. The variable # HAVE_include_name, where "include_name" is the name of the include file # with letters uppercased and non-alphanumerics replaced by underscores, is # set to 1 if the include file is present, else 0. # # For functions: Pass the return type, function name, and prototype as # arguments. The variable HAVE_function, where "function" is the name # of the function with letters uppercased, is set to 1 if the function is # available, else 0. # # For both: The result code of the function will be 0 (true) if the entity # is present, else 1 (false). test_include () { include="$1" inc2="`echo $include | sed 'y+abcdefghijklmnopqrstuvwxyz/.-+ABCDEFGHIJKLMNOPQRSTUVWXYZ___+'`" if [ -f "/usr/include/$include" ] ; then eval "HAVE_${inc2}=1" log "found $include in /usr/include" return 0 fi cat >$CONFTMP/test.c < int main() { return 0; } EOT if run $CC $CC_FLAGS $CONFTMP/test.c $CC_LIBS -o $CONFTMP/test ; then eval "HAVE_${inc2}=1" log "found $include" return 0 else eval "HAVE_${inc2}=0" log "didn't find $include" return 1 fi } test_function () { rettype="$1" func="$2" proto="$3" if [ ! "$rettype" -o ! "$func" ] ; then log "test_function: missing parameter(s)" return 1 fi if [ ! "$proto" ] ; then proto="(...)" fi func2=`echo $func | tr '[a-z]' '[A-Z]'` if [ ! "$TEST" ] ; then TEST="return 0;" fi cat >$CONFTMP/test.c <&1 ; then eval "HAVE_${func2}=1" log "found $func" return 0 else eval "HAVE_${func2}=0" log "didn't find $func" return 1 fi } ########################################################################### # If something happens that really shouldn't: whoa_there () { cat <&1 ; printf 'b' 2>&1`" = "ab" ] ; then ECHO2='printf "%s"' else # oh well... ECHO2='echo' fi export ECHO2 ECHO2SUF ########################################################################### # Command-line parsing. OPT_OS2= OPT_BINDEST= OPT_DATDEST= OPT_CLEAN_COMPILE=bonkle OPT_MEMCHECKS=bonkle OPT_SHOWALLOCS=bonkle OPT_DUMPCORE=bonkle IGNORE_CACHE= DONT_ASK= NO_DIR_CHECK= USE_LOCAL_FUNCS= NO_USE_LOCAL_FUNCS= USE_STATIC_MODULES= USE_DYNAMIC_MODULES= FORCE_GCC_2_96= USER_CC= USER_CC_FLAGS=bonkle USER_CC_LFLAGS=bonkle USER_CC_LIBS= export OPT_OS2 OPT_BINDEST OPT_DATDEST IGNORE_CACHE DONT_ASK NO_DIR_CHECK export USE_LOCAL_FUNCS NO_USE_LOCAL_FUNCS USE_STATIC_MODULES export NO_USE_STATIC_MODULES OPT_CLEAN_COMPILE OPT_MEMCHECKS OPT_SHOWALLOCS export OPT_DUMPCORE FORCE_GCC_2_96 export USER_CC USER_CC_FLAGS USER_CC_LFLAGS USER_CC_LIBS while [ $# -gt 0 ] ; do if echo "$1" | grep_q '^-' ; then option=`echo "$1" | cut -c2-` shift if echo "$option" | grep_q '^-' ; then option=`echo "$option" | cut -c2-` if echo "$option" | grep_q '=' ; then value=`echo "$option" | sed 's/^[^=]*=//'` option=`echo "$option" | sed 's/=.*$//'` set -- "$value" "$@" fi fi if [ "$option" = "check" ] ; then rm -rf $CONFTMP if [ -f config.cache ] ; then CACHEVER=`grep '^CONFIG_VERSION=' config.cache | cut -d= -f2` if [ "x$CACHEVER" = "x$MY_CONFIG_VERSION" ] ; then exit 0 else exit 1 fi else exit 1 fi elif [ "$option" = "ignore-cache" ] ; then IGNORE_CACHE=bonkle elif [ "$option" = "no-dir-check" ] ; then NO_DIR_CHECK=bonkle elif [ "$option" = "defaults" ] ; then DONT_ASK=bonkle elif [ "$option" = "cc" ] ; then USER_CC="$1" shift elif [ "$option" = "cflags" ] ; then USER_CC_FLAGS="$1" shift elif [ "$option" = "lflags" ] ; then USER_CC_LFLAGS="$1" shift elif [ "$option" = "libs" ] ; then USER_CC_LIBS="$1" shift elif [ "$option" = "os2" ] ; then OPT_OS2=1 elif [ "$option" = "bindest" ] ; then OPT_BINDEST="$1" shift elif [ "$option" = "datdest" ] ; then OPT_DATDEST="$1" shift elif [ "$option" = "prefix" ] ; then PREFIX="$1" shift elif [ "$option" = "use-local-funcs" ] ; then USE_LOCAL_FUNCS=bonkle NO_USE_LOCAL_FUNCS= elif [ "$option" = "no-use-local-funcs" ] ; then USE_LOCAL_FUNCS= NO_USE_LOCAL_FUNCS=bonkle elif [ "$option" = "use-static-modules" ] ; then USE_DYNAMIC_MODULES= USE_STATIC_MODULES=bonkle elif [ "$option" = "no-use-static-modules" ] ; then USE_DYNAMIC_MODULES=bonkle USE_STATIC_MODULES= elif [ "$option" = "clean-compile" ] ; then OPT_CLEAN_COMPILE=y elif [ "$option" = "no-clean-compile" ] ; then OPT_CLEAN_COMPILE= elif [ "$option" = "memchecks" ] ; then OPT_MEMCHECKS=y elif [ "$option" = "no-memchecks" ] ; then OPT_MEMCHECKS= elif [ "$option" = "showallocs" ] ; then OPT_SHOWALLOCS=y elif [ "$option" = "no-showallocs" ] ; then OPT_SHOWALLOCS= elif [ "$option" = "dumpcore" ] ; then OPT_DUMPCORE=y elif [ "$option" = "no-dumpcore" ] ; then OPT_DUMPCORE= elif [ "$option" = "force-gcc-2.96" ] ; then FORCE_GCC_2_96=y else if [ "$option" != "help" -a "$option" != "h" ]; then echo >&2 Unknown option/parameter: "$option" exitval=1 else exitval=0 fi cat >&2 <configure.log MODE=" " TEST="" export MODE TEST ########################################################################### # Check whether we have a working "test FILE_A -nt FILE_B". MODE="check_test_nt " if [ "$TEST_NT" ] ; then log "cache says $TEST_NT" else echo2 "Checking sanity of /bin/sh... " touch $CONFTMP/file1 sleep 2 # just in case sleep 1 really does a sleep 0.997 or some such touch $CONFTMP/file2 if run /bin/sh -c "test $CONFTMP/file2 -nt $CONFTMP/file1" ; then TEST_NT=test log "test works" echo "high." elif run /bin/test $CONFTMP/file2 -nt $CONFTMP/file1 ; then TEST_NT=/bin/test log "/bin/test works" echo "medium." elif run /usr/bin/test $CONFTMP/file2 -nt $CONFTMP/file1 ; then TEST_NT=/usr/bin/test log "/usr/bin/test works" echo "medium." else log "neither test nor /bin/test nor /usr/bin/test work!" echo "low." echo " Warning: Compilation may fail unless you pass a saner shell to make:" echo " make [or gmake] SHELL=/usr/local/bin/bash ..." fi fi ########################################################################### # Search for a compiler. MODE="find_cc " # Don't use the cached flags unless we use the cached compiler as well CACHED_CC_FLAGS=$CC_FLAGS CC_FLAGS=bonkle echo2 "Searching for a suitable compiler... " if [ "$USER_CC" ] ; then CC="$USER_CC" if $CC --version 2>&1 | fgrep 2.96 >/dev/null ; then log user supplied \`"$CC'", which appears to be GCC 2.96 log output of \`"$CC --version':" run $CC --version cat <&1 | HEAD -1 | sed 's/[^0-9]*[^0-9.]\([0-9][0-9.]*\).*/\1/'` vmajor=`echo "x.$version.0" | cut -d. -f2` vminor=`echo "x.$version.0" | cut -d. -f3` if test "x$version" = x || (echo "x$vmajor" | cut -c2- | grep '[^0-9]' >/dev/null 2>&1) || (echo "x$vminor" | cut -c2- | grep '[^0-9]' >/dev/null 2>&1) ; then log "unparseable version string: $version" cat <$CONFTMP/test.c "int main(){return 1;}" if run icc $CONFTMP/test.c -o $CONFTMP/test ; then CC=icc elif run cc $CONFTMP/test.c -o $CONFTMP/test ; then CC=cc elif run c89 $CONFTMP/test.c -o $CONFTMP/test ; then CC=c89 else echo "no C compiler found!" echo " Use the -cc command line option to specify your C compiler." log "automatic tests failed" exit 2 fi # See if it handles ANSI. cat >$CONFTMP/test.c <$CONFTMP/test.c <$CONFTMP/test.c < void foo(int a,...) { va_list args, args2; va_start(args,a); va_copy(args2, args); va_end(args); va_end(args2); } int main() { foo(1,2); return 0; } EOT if run $CC $CONFTMP/test.c -o $CONFTMP/test && run $CONFTMP/test ; then log "va_copy ok." NO_VA_COPY= else log "va_copy NG!" if [ ! "$WARNED_OLD_GCC" ] ; then cat <$CONFTMP/test.c <1 ? 24 : 42); return 0; } EOT if run $CC $CC_FLAGS -fstack-protector $CONFTMP/test.c -o $CONFTMP/test then log "SSP present" # See if the bug exists; if so, disable stack protection. Test # twice just in case the bug exists but the stack happens to # randomly contain 42. a=`$CONFTMP/test` b=`$CONFTMP/test x` log "test results: a=[$a] b=[$b]" if [ "$a" != 42 -o "$b" != 24 ] ; then CC_FLAGS="$CC_FLAGS -fno-stack-protector" log "SSP bug found, disabling" else log "SSP bug not detected" fi else log "SSP not present" fi echo2 "Testing default compiler flags ($CC_FLAGS)... " cat >$CONFTMP/test.c <$CONFTMP/test.c <1?9:42)); return 0; } EOT if run $CC $CC_FLAGS -fno-inline-functions $CONFTMP/test.c -o $CONFTMP/test then run $CONFTMP/test # to get the output into the log file a=`$CONFTMP/test` b=`$CONFTMP/test x` log "test results: a=[$a] b=[$b]" if [ "$a" != "42 2" -o "$b" != "9 1" ] ; then log "-fstack-protector check failed!" cat <$CONFTMP/test.c <$CONFTMP/test.c "int main(){return 1;}" if run $CC $CC_FLAGS $CC_LFLAGS $CONFTMP/test.c -o $CONFTMP/test ; then if [ -f $CONFTMP/test.exe ] ; then log using .exe EXE_SUFFIX=.exe elif [ -f $CONFTMP/test ] ; then log using nothing EXE_SUFFIX="" else log "can't find executable, assuming nothing" EXE_SUFFIX= fi else log "can't link test program, assuming nothing" EXE_SUFFIX= fi fi ########################################################################### # See what libraries we have that we might need. MODE="find_libs " echo2 "Let's see what libraries we need..." if [ "$CC_LIBS" != bonkle ] ; then if [ "$CC_LIBS" ] ; then echo " (cached) $CC_LIBS" else echo " (cached) none" fi log cache supplied \`"$CC_LIBS'" else CC_LIBS= HAVE_RESOLV=0 cat >$CONFTMP/test.c <$CONFTMP/test-socket.c <$CONFTMP/test-gethost.c <$CONFTMP/test-hstrerror.c <$CONFTMP/test-dlopen.c < int main(int argc, char **argv) { void *lib = dlopen("$CONFTMP/test-lib.so", RTLD_NOW); printf("%d\n", lib != 0); if (lib) dlclose(lib); return 0; } EOT cat >$CONFTMP/test-lib.c </dev/null` log "missing-symbol test: $CONFTMP/test => $a" if [ "x$a" = "x0" ] ; then log "missing-symbol test succeeded" else log "missing-symbol test failed" OK= fi else log "couldn't run missing-symbol test program" OK= fi fi if [ "$OK" ] ; then cat >$CONFTMP/test-dynamic2.c < int main(int argc, char **argv) { printf("%d\n", foo(atoi(argv[1]))); } int quux(int xyzzy) { return xyzzy+1; } EOT cat >$CONFTMP/test-dynamic.c < $a" if [ "x$a" = "x4" ] ; then log "symbol resolution test: succeeded => using dynamic modules (dlfcn)" else log "symbol resolution test: bad output (expected 4)" OK= fi else log "symbol resolution test: dynamic compile failed" OK= fi fi fi # dlfcn test if [ "$OK" ] ; then log "checking for underscores in symbols" cat >$CONFTMP/test-dynamic2.c < #include int main(int argc, char **argv) { void *handle = dlopen(NULL, 0); printf("%d%d\n", dlsym(handle,"foo")!=NULL ? 1 : 0, dlsym(handle,"_foo")!=NULL ? 1 : 0); return 0; } int quux(int x) {return x;} EOT if run $CC $CC_FLAGS $CC_DYN_LFLAGS $CC_LIBS $CC_DYN_LIBS $CONFTMP/test-dynamic2.c $CONFTMP/test.so -o $CONFTMP/test then a=`$CONFTMP/test` log "underscore test: $CONFTMP/test => $a" with_underscore=`echo "$a" | cut -c2` without_underscore=`echo "$a" | cut -c1` if [ "x$with_underscore" = "x1" ] ; then log "underscore test: succeeded with preceding underscore" SYMS_NEED_UNDERSCORES=1 elif [ "x$without_underscore" = "x1" ] ; then log "underscore test: succeeded with no preceding underscore" SYMS_NEED_UNDERSCORES=0 else log "underscore test: failed?! (bizarre output)" OK= fi else log "underscore test: dynamic compile failed" OK= fi fi # underscore test if [ "$OK" ] ; then echo "yes." STATIC_MODULES=0 else log "static modules selected" echo "no." STATIC_MODULES=1 CC_SHARED= CC_DYN_LFLAGS= CC_DYN_LIBS= SYMS_NEED_UNDERSCORES= fi fi fi # Also check for ranlib, and use it if found. MODE="check_ranlib " echo2 "Checking whether ranlib exists... " if [ "$RANLIB" ] ; then if [ "x$RANLIB" = xranlib ] ; then log "cache says yes" echo "(cached) yes." else log "cache says no" echo "(cached) no." fi else if run echo test >$CONFTMP/testfile ; then : ; else log "couldn't create temp file!" echo "" echo "" echo "*** WHOA THERE! ***" echo "" echo "Unable to create a temporary file!" echo "Are you out of disk space?" exit 4 fi if run ar -rc $CONFTMP/test.a $CONFTMP/testfile ; then if run ranlib $CONFTMP/test.a ; then log "ranlib found" RANLIB=ranlib echo "yes." else log "ranlib not found" RANLIB='echo >/dev/null' echo "no." fi else # no ar log "couldn't run ar!" if [ $STATIC_MODULES = 1 ] ; then echo "" cat <$CONFTMP/test.c <$CONFTMP/test.c <$CONFTMP/test.c <$CONFTMP/test.c <$CONFTMP/test.c <$CONFTMP/test.c <$CONFTMP/test.c < int main() { time_t a = 0; printf("%d ", sizeof(a)); if (a-1 > 0) printf("(~(time_t)0)"); else printf("(((time_t)1<<(sizeof(time_t)*8-2))+(((time_t)1<<(sizeof(time_t)*8-2))-1))"); return 0; } EOT if run $CC $CC_FLAGS $CONFTMP/test.c $CC_LIBS -o $CONFTMP/test ; then a="`$CONFTMP/test`" log "test program output (sizeof(time_t) MAX_TIME_T): $a" if [ ! "$a" ] ; then echo "test program failed! Assuming 32 bits." log "assuming 32 bits" SIZEOF_TIME_T=4 else SIZEOF_TIME_T=`echo "$a" | cut -d\ -f1` MAX_TIME_T=`echo "$a" | cut -d\ -f2` if [ $SIZEOF_TIME_T = 4 ] ; then echo 32 bits log "32 bits" elif [ $SIZEOF_TIME_T = 8 ] ; then echo "64 bits (nifty!)" log "64 bits" elif [ $SIZEOF_TIME_T -gt 4 ] ; then echo "`expr $SIZEOF_TIME_T \* 8` bits... huh?" echo " If you experience any problems compiling or running Services, please" echo " report this." log "`expr $SIZEOF_TIME_T \* 8` bits" else echo "`expr $SIZEOF_TIME_T \* 8` bits... huh?" cat <$CONFTMP/test.c < int main() { gid_t a; printf("%d", sizeof(a)); return 0; } EOT if run $CC $CC_FLAGS $CONFTMP/test.c $CC_LIBS -o $CONFTMP/test ; then a="`$CONFTMP/test`" log "test program output (sizeof(gid_t)): $a" if [ ! "$a" ] ; then echo "test program failed! Assuming 16 bits." log "assuming 16 bits" SIZEOF_GID_T=2 else SIZEOF_GID_T=$a if [ $SIZEOF_GID_T = 4 ] ; then echo 32 bits log "32 bits" elif [ $SIZEOF_GID_T = 2 ] ; then echo "16 bits" log "16 bits" else echo "`expr $SIZEOF_GID_T \* 8` bits... huh?" echo " If you experience any problems compiling or running Services, please" echo " report this." log "`expr $SIZEOF_GID_T \* 8` bits" fi fi else echo "no gid_t found." log "couldn't compile test program, assuming no gid_t" SIZEOF_GID_T= HAVE_SETREGID=0 fi fi MODE="check_socklen_t " echo2 "Checking for socklen_t... " if [ "$HAVE_SOCKLEN_T" ] ; then if [ $HAVE_SOCKLEN_T = 1 ] ; then echo "(cached) present." log "cache said present" else echo "(cached) not present." log "cache said not present" fi else cat >$CONFTMP/test.c < #include int main() { socklen_t a; return 0; } EOT if run $CC $CC_FLAGS $CONFTMP/test.c $CC_LIBS -o $CONFTMP/test ; then log "socklen_t found" echo "present." HAVE_SOCKLEN_T=1 else log "socklen_t not found" echo "not present." HAVE_SOCKLEN_T=0 fi fi ########################################################################### # Look for include files that might or might not be here. echo "Checking for presence of include files (it's okay if some aren't there):" MODE="check_strings " echo2 " strings.h... " if [ "$HAVE_STRINGS_H" ] ; then if [ "$HAVE_STRINGS_H" = 1 ] ; then echo "(cached) present" log "cache says present" else echo "(cached) not present" log "cache says not present" fi else if test_include strings.h ; then echo "present" else echo "not present" fi fi MODE="check_sysselect " echo2 " sys/select.h... " if [ "$HAVE_SYS_SELECT_H" ] ; then if [ "$HAVE_SYS_SELECT_H" = 1 ] ; then echo "(cached) present" log "cache says present" else echo "(cached) not present" log "cache says not present" fi else if test_include sys/select.h ; then echo "present" else echo "not present" fi fi MODE="check_sysproto " echo2 " sys/sysproto.h... " if [ "$HAVE_SYS_SYSPROTO_H" ] ; then if [ "$HAVE_SYS_SYSPROTO_H" = 1 ] ; then echo "(cached) present" log "cache says present" else echo "(cached) not present" log "cache says not present" fi else if test_include sys/sysproto.h ; then echo "present" else echo "not present" fi fi ########################################################################### # AIX workaround. MODE="check_aix_intNN " echo2 "Seeing if your system defines int16/int32... " res="`run egrep int16\|int32 /usr/include/sys/systypes.h`" if [ "$res" ] ; then echo "found." echo " (This is bad, but we can work around it.)" log "int16/int32 types found, enabling workaround" INTTYPE_WORKAROUND=1 else echo "not found (this is good)." log "int16/int32 types not found" INTTYPE_WORKAROUND=0 fi ########################################################################### # Look for missing/broken built-in routines, and similar compatibility # stuff. MODE="check_strerror " if [ "$USE_LOCAL_FUNCS" ] ; then log "not checking (-use-local-funcs)" echo "Not checking for presence of strerror (-use-local-funcs specified)." HAVE_STRERROR=0 HAVE_SYS_ERRLIST=0 else echo2 "How to complain when something goes wrong... " if [ "$HAVE_STRERROR" ] ; then if [ "$HAVE_STRERROR" = 1 ] ; then echo "(cached) strerror()." log "cache supplied strerror()" elif [ "$HAVE_SYS_ERRLIST" = 1 ] ; then echo "(cached) sys_errlist." log "cache supplied sys_errlist" else HAVE_SYS_ERRLIST=0 # just in case... you never know. echo "(cached) pseudo sys_errlist." log "cache supplied pseudo sys_errlist" fi else cat >$CONFTMP/test.c <$CONFTMP/test.c <$CONFTMP/test.c <$CONFTMP/test.c <&1` log "sysname: $sysname" case $sysname in Linux) CP_ALL="/bin/cp -dpr"; log "guessing: cp -dpr";; CYGWIN) CP_ALL="/bin/cp -dpr"; log "guessing: cp -dpr";; *) CP_ALL="/bin/cp -pr"; log "guessing: cp -pr";; esac run rm -rf $CONFTMP/test* run echo test >$CONFTMP/test run cp $CONFTMP/test $CONFTMP/test2 if run /bin/mkdir $CONFTMP/testA && run /bin/mkdir $CONFTMP/testB && run /bin/mv $CONFTMP/test2 $CONFTMP/testA ; then : else echo "" echo "" echo "*** WHOA THERE! ***" echo "" echo "A few simple mkdir's and mv's failed!" echo "Are you out of disk space?" exit 4 fi if run $CP_ALL $CONFTMP/testA $CONFTMP/testB/testC && run cmp $CONFTMP/testA/test2 $CONFTMP/testB/testC/test2 ; then echo "$CP_ALL" log \`"$CP_ALL' works" else log \`"$CP_ALL' doesn't work" run /bin/rm -rf $CONFTMP/testB/* if run sh -c '/bin/tar Ccf $CONFTMP/testA - . | /bin/tar Cxf $CONFTMP/testB -' then echo "tar (yuck)" CP_ALL='$(TOPDIR)/cp-recursive -t' log "using tar" else log "tar failed(!)" echo "" echo " Neither cp nor tar work! I give up." exit 2 fi fi fi ########################################################################### # Create files. echo2 "Creating config.h... " rm -f config.h.new cat >config.h.new <>config.h.new <>config.h.new <>config.h.new <>config.h.new <>config.h.new <>config.h.new <>config.h.new <>config.h.new if [ "x$SYMS_NEED_UNDERSCORES" = x1 ] ; then cat >>config.h.new <>config.h.new <>config.h.new <>config.h.new <>config.h.new </dev/null 2>&1 ; then rm -f config.h.new echo "done (unchanged)." else mv -f config.h.new config.h echo "done." fi ########################################################################### INSTEXEFLAGS="-m 750" INSTDATFLAGS="-m 640" MKDIRFLAGS="-m 750" echo2 "Creating Makefile.inc... " rm -f Makefile.inc.new cat >Makefile.inc.new <>Makefile.inc.new <>Makefile.inc.new <>Makefile.inc.new <>Makefile.inc.new </dev/null 2>&1 ; then rm -f Makefile.inc.new echo "done (unchanged)." else mv -f Makefile.inc.new Makefile.inc echo "done." fi ########################################################################### # Save results in cache for next time around. echo2 "Saving configuration results in config.cache... " cat <config.cache CONFIG_VERSION=$MY_CONFIG_VERSION BINDEST='$BINDEST' DATDEST='$DATDEST' TEST_NT='$TEST_NT' INSTALL='$INSTALL' MKDIR='$MKDIR' CP_ALL='$CP_ALL' CC='$CC' CC_FLAGS='$CC_FLAGS' CC_LFLAGS='$CC_LFLAGS' CC_LIBS='$CC_LIBS' CLEAN_COMPILE=$CLEAN_COMPILE MEMCHECKS=$MEMCHECKS SHOWALLOCS=$SHOWALLOCS DUMPCORE=$DUMPCORE STATIC_MODULES=$STATIC_MODULES CC_SHARED='$CC_SHARED' CC_DYN_LFLAGS='$CC_DYN_LFLAGS' CC_DYN_LIBS='$CC_DYN_LIBS' SYMS_NEED_UNDERSCORES=$SYMS_NEED_UNDERSCORES RANLIB='$RANLIB' TYPE_INT8=$TYPE_INT8 TYPE_INT16=$TYPE_INT16 TYPE_INT32=$TYPE_INT32 SIZEOF_INT=$SIZEOF_INT SIZEOF_LONG=$SIZEOF_LONG SIZEOF_TIME_T=$SIZEOF_TIME_T MAX_TIME_T='$MAX_TIME_T' SIZEOF_GID_T=$SIZEOF_GID_T HAVE_SOCKLEN_T=$HAVE_SOCKLEN_T HAVE_STRINGS_H=$HAVE_STRINGS_H HAVE_SYS_SELECT_H=$HAVE_SYS_SELECT_H HAVE_SYS_SYSPROTO_H=$HAVE_SYS_SYSPROTO_H HAVE_STRERROR=$HAVE_STRERROR HAVE_SYS_ERRLIST=$HAVE_SYS_ERRLIST HAVE_SNPRINTF=$HAVE_SNPRINTF BAD_SNPRINTF=$BAD_SNPRINTF HAVE_HSTRERROR=$HAVE_HSTRERROR HAVE_STRTOK=$HAVE_STRTOK HAVE_STRICMP=$HAVE_STRICMP HAVE_STRCASECMP=$HAVE_STRCASECMP HAVE_STRDUP=$HAVE_STRDUP HAVE_STRSPN=$HAVE_STRSPN HAVE_STRSIGNAL=$HAVE_STRSIGNAL HAVE_GETTIMEOFDAY=$HAVE_GETTIMEOFDAY HAVE_SETGRENT=$HAVE_SETGRENT HAVE_SETREGID=$HAVE_SETREGID HAVE_UMASK=$HAVE_UMASK HAVE_FORK=$HAVE_FORK HAVE_GETHOSTBYNAME=$HAVE_GETHOSTBYNAME HAVE_GETSETRLIMIT=$HAVE_GETSETRLIMIT MISSING='$MISSING' EOT if [ "x$FORCE_GCC_2_96" = "xforced" ] ; then cat >>config.cache <