--- uae/configure 2018/04/24 16:39:37 1.1.1.4 +++ uae/configure 2018/04/24 16:41:43 1.1.1.6 @@ -843,11 +843,75 @@ else echo "$ac_t""no" 1>&6 fi +# Extract the first word of "wrc", so it can be a program name with args. +set dummy wrc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:850: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_WRCPRG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$WRCPRG" in + /*) + ac_cv_path_WRCPRG="$WRCPRG" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_WRCPRG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_WRCPRG" && ac_cv_path_WRCPRG="not-found" + ;; +esac +fi +WRCPRG="$ac_cv_path_WRCPRG" +if test -n "$WRCPRG"; then + echo "$ac_t""$WRCPRG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "rcl", so it can be a program name with args. +set dummy rcl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:882: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_RCLPRG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$RCLPRG" in + /*) + ac_cv_path_RCLPRG="$RCLPRG" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_RCLPRG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_RCLPRG" && ac_cv_path_RCLPRG="not-found" + ;; +esac +fi +RCLPRG="$ac_cv_path_RCLPRG" +if test -n "$RCLPRG"; then + echo "$ac_t""$RCLPRG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:849: checking for AIX" >&5 +echo "configure:913: checking for AIX" >&5 cat > conftest.$ac_ext <&6 -echo "configure:873: checking for POSIXized ISC" >&5 +echo "configure:937: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -890,9 +954,121 @@ else fi +echo $ac_n "checking for Watcom C""... $ac_c" 1>&6 +echo "configure:959: checking for Watcom C" >&5 +cat > conftest.$ac_ext <&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + uae_cv_prog_cc_watcom=yes +else + rm -rf conftest* + uae_cv_prog_cc_watcom=no +fi +rm -f conftest* + +echo "$ac_t""$uae_cv_prog_cc_watcom" 1>&6 + +echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6 +echo "configure:981: checking for Cygwin32 environment" >&5 +if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + am_cv_cygwin32=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + am_cv_cygwin32=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$am_cv_cygwin32" 1>&6 +CYGWIN32= +test "$am_cv_cygwin32" = yes && CYGWIN32=yes +echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 +echo "configure:1010: checking for Mingw32 environment" >&5 +if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + am_cv_mingw32=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + am_cv_mingw32=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$am_cv_mingw32" 1>&6 +MINGW32= +test "$am_cv_mingw32" = yes && MINGW32=yes + + +echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +echo "configure:1041: checking for executable suffix" >&5 +if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then +am_cv_exeext=.exe +else +cat > am_c_test.c << 'EOF' +int main() { +/* Nothing needed here */ +} +EOF +${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5 +am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//` +rm -f am_c_test* +fi + +test x"${am_cv_exeext}" = x && am_cv_exeext=no +fi +EXEEXT="" +test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext} +echo "$ac_t""${am_cv_exeext}" 1>&6 + + NR_WARNINGS=0 NR_ERRORS=0 +tmp_save_dir=`pwd` +cd $srcdir +abssrcdir=`pwd` +cd $tmp_save_dir + NEED_THREAD_SUPPORT=no ADDITIONAL_CFLAGS= @@ -904,7 +1080,7 @@ NO_SCHED_CFLAGS= HAVE_BEOS=no HAVE_POS=no echo $ac_n "checking for main in -lMedia_s""... $ac_c" 1>&6 -echo "configure:908: checking for main in -lMedia_s" >&5 +echo "configure:1084: checking for main in -lMedia_s" >&5 ac_lib_var=`echo Media_s'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -912,14 +1088,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lMedia_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -941,7 +1117,7 @@ HAVE_MEDIA_LIB=no fi echo $ac_n "checking for main in -lNeXT_s""... $ac_c" 1>&6 -echo "configure:945: checking for main in -lNeXT_s" >&5 +echo "configure:1121: checking for main in -lNeXT_s" >&5 ac_lib_var=`echo NeXT_s'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -949,14 +1125,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lNeXT_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -978,7 +1154,7 @@ HAVE_NEXT_LIB=no fi echo $ac_n "checking for OpenLibrary in -lamiga""... $ac_c" 1>&6 -echo "configure:982: checking for OpenLibrary in -lamiga" >&5 +echo "configure:1158: checking for OpenLibrary in -lamiga" >&5 ac_lib_var=`echo amiga'_'OpenLibrary | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -986,7 +1162,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lamiga $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1019,7 +1195,7 @@ HAVE_AMIGA_LIB=n fi echo $ac_n "checking for vga_setmode in -lvga""... $ac_c" 1>&6 -echo "configure:1023: checking for vga_setmode in -lvga" >&5 +echo "configure:1199: checking for vga_setmode in -lvga" >&5 ac_lib_var=`echo vga'_'vga_setmode | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1027,7 +1203,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lvga $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1060,7 +1236,7 @@ HAVE_SVGA_LIB=no fi echo $ac_n "checking for AFOpenAudioConn in -lAF""... $ac_c" 1>&6 -echo "configure:1064: checking for AFOpenAudioConn in -lAF" >&5 +echo "configure:1240: checking for AFOpenAudioConn in -lAF" >&5 ac_lib_var=`echo AF'_'AFOpenAudioConn | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1068,7 +1244,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lAF $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1100,8 +1276,49 @@ else HAVE_AF_LIB=no fi +echo $ac_n "checking for waveOutGetNumDevs in -lmme""... $ac_c" 1>&6 +echo "configure:1281: checking for waveOutGetNumDevs in -lmme" >&5 +ac_lib_var=`echo mme'_'waveOutGetNumDevs | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lmme $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + HAVE_MME_LIB=yes +else + echo "$ac_t""no" 1>&6 +HAVE_MME_LIB=no +fi + echo $ac_n "checking for waddch in -lncurses""... $ac_c" 1>&6 -echo "configure:1105: checking for waddch in -lncurses" >&5 +echo "configure:1322: checking for waddch in -lncurses" >&5 ac_lib_var=`echo ncurses'_'waddch | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1109,7 +1326,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1141,27 +1358,27 @@ else HAVE_NCURSES_LIB=no fi -echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:1146: checking for pthread_create in -lpthread" >&5 -ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` +echo $ac_n "checking for sem_init in -lposix4""... $ac_c" 1>&6 +echo "configure:1363: checking for sem_init in -lposix4" >&5 +ac_lib_var=`echo posix4'_'sem_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lpthread $LIBS" +LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1176,22 +1393,22 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - HAVE_PTHREAD_LIB=yes + HAVE_POSIX4_LIB=yes else echo "$ac_t""no" 1>&6 -HAVE_PTHREAD_LIB=no +HAVE_POSIX4_LIB=no fi -echo $ac_n "checking for sem_init in -lposix4""... $ac_c" 1>&6 -echo "configure:1187: checking for sem_init in -lposix4" >&5 -ac_lib_var=`echo posix4'_'sem_init | sed 'y%./+-%__p_%'` +echo $ac_n "checking for sem_init in -lrt""... $ac_c" 1>&6 +echo "configure:1404: checking for sem_init in -lrt" >&5 +ac_lib_var=`echo rt'_'sem_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lposix4 $LIBS" +LIBS="-lrt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1217,14 +1434,14 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - HAVE_POSIX4_LIB=yes + HAVE_RT_LIB=yes else echo "$ac_t""no" 1>&6 -HAVE_POSIX4_LIB=no +HAVE_RT_LIB=no fi echo $ac_n "checking for ggiInit in -lggi""... $ac_c" 1>&6 -echo "configure:1228: checking for ggiInit in -lggi" >&5 +echo "configure:1445: checking for ggiInit in -lggi" >&5 ac_lib_var=`echo ggi'_'ggiInit | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1232,7 +1449,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lggi $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1265,36 +1482,12 @@ HAVE_GGI_LIB=no fi -if [ $target = "p.os" ]; then - HAVE_POS=yes -else - -cat >conftest.c << EOF -int main() -{ -#ifdef __POS__ -printf("POS\n"); -#endif -return 0; -} -EOF -$CC $CFLAGS conftest.c -c -o conftest.o -$CC conftest.o -o conftest -./conftest >conftest.file -if grep POS conftest.file >/dev/null; then - HAVE_POS=yes -else - HAVE_POS=no -fi -rm -f conftest* -fi - # If we find X, set shell vars x_includes and x_libraries to the # paths, otherwise set no_x=yes. # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:1298: checking for X" >&5 +echo "configure:1491: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -1356,12 +1549,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1430,14 +1623,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -1543,17 +1736,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:1547: checking whether -R must be followed by a space" >&5 +echo "configure:1740: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_R_nospace=yes else @@ -1569,14 +1762,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_R_space=yes else @@ -1608,7 +1801,7 @@ rm -f conftest* # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:1612: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:1805: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1616,7 +1809,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1649,7 +1842,7 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:1653: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:1846: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1657,7 +1850,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1697,12 +1890,12 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:1701: checking for gethostbyname" >&5 +echo "configure:1894: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -1746,7 +1939,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:1750: checking for gethostbyname in -lnsl" >&5 +echo "configure:1943: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1754,7 +1947,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1795,12 +1988,12 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:1799: checking for connect" >&5 +echo "configure:1992: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -1844,7 +2037,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:1848: checking for connect in -lsocket" >&5 +echo "configure:2041: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1852,7 +2045,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1887,12 +2080,12 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:1891: checking for remove" >&5 +echo "configure:2084: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -1936,7 +2129,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:1940: checking for remove in -lposix" >&5 +echo "configure:2133: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1944,7 +2137,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1979,12 +2172,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:1983: checking for shmat" >&5 +echo "configure:2176: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -2028,7 +2221,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:2032: checking for shmat in -lipc" >&5 +echo "configure:2225: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2036,7 +2229,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2080,7 +2273,7 @@ fi # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:2084: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:2277: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2088,7 +2281,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2130,12 +2323,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/di do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:2134: checking for $ac_hdr that defines DIR" >&5 +echo "configure:2327: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -2143,7 +2336,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:2147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -2168,7 +2361,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:2172: checking for opendir in -ldir" >&5 +echo "configure:2365: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2176,7 +2369,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2209,7 +2402,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2213: checking for opendir in -lx" >&5 +echo "configure:2406: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2217,7 +2410,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2251,12 +2444,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2255: checking for ANSI C header files" >&5 +echo "configure:2448: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2264,7 +2457,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2281,7 +2474,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2299,7 +2492,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2320,7 +2513,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2331,7 +2524,7 @@ if (XOR (islower (i), ISLOWER (i)) || to exit (0); } EOF -if { (eval echo configure:2335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -2359,17 +2552,17 @@ for ac_hdr in unistd.h fcntl.h sys/time. do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2363: checking for $ac_hdr" >&5 +echo "configure:2556: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2395,21 +2588,21 @@ else fi done -for ac_hdr in sys/vfs.h sys/mount.h sys/select.h sys/param.h sys/statfs.h sys/statvfs.h sys/stat.h +for ac_hdr in sys/soundcard.h machine/soundcard.h sun/audioio.h sys/audioio.h getopt.h features.h sys/termios.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2403: checking for $ac_hdr" >&5 +echo "configure:2596: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2435,21 +2628,21 @@ else fi done -for ac_hdr in sys/soundcard.h machine/soundcard.h sun/audioio.h sys/audioio.h getopt.h features.h sys/termios.h +for ac_hdr in posix_opt.h sys/ioctl.h sys/ipc.h sys/shm.h sys/stat.h sys/utime.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2443: checking for $ac_hdr" >&5 +echo "configure:2636: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2475,21 +2668,21 @@ else fi done -for ac_hdr in posix_opt.h sys/ioctl.h sys/ipc.h sys/shm.h +for ac_hdr in ggi/libggi.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2483: checking for $ac_hdr" >&5 +echo "configure:2676: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2515,21 +2708,21 @@ else fi done -for ac_hdr in ggi/libggi.h +for ac_hdr in windows.h ddraw.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2523: checking for $ac_hdr" >&5 +echo "configure:2716: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2557,17 +2750,17 @@ done ac_safe=`echo "be_math.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for be_math.h""... $ac_c" 1>&6 -echo "configure:2561: checking for be_math.h" >&5 +echo "configure:2754: checking for be_math.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2589,9 +2782,129 @@ else HAVE_BEOS=no fi +for ac_hdr in machine/joystick.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2790: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in devices/ahi.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2830: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in libraries/cybergraphics.h cybergraphx/cybergraphics.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2870: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + echo $ac_n "checking size of char""... $ac_c" 1>&6 -echo "configure:2595: checking size of char" >&5 +echo "configure:2908: checking size of char" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2599,7 +2912,7 @@ else ac_cv_sizeof_char=1 else cat > conftest.$ac_ext < main() @@ -2610,7 +2923,7 @@ main() exit(0); } EOF -if { (eval echo configure:2614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_char=`cat conftestval` else @@ -2630,7 +2943,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:2634: checking size of short" >&5 +echo "configure:2947: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2638,7 +2951,7 @@ else ac_cv_sizeof_short=2 else cat > conftest.$ac_ext < main() @@ -2649,7 +2962,7 @@ main() exit(0); } EOF -if { (eval echo configure:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -2669,7 +2982,7 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:2673: checking size of int" >&5 +echo "configure:2986: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2677,7 +2990,7 @@ else ac_cv_sizeof_int=4 else cat > conftest.$ac_ext < main() @@ -2688,7 +3001,7 @@ main() exit(0); } EOF -if { (eval echo configure:2692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -2708,7 +3021,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2712: checking size of long" >&5 +echo "configure:3025: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2716,7 +3029,7 @@ else ac_cv_sizeof_long=4 else cat > conftest.$ac_ext < main() @@ -2727,7 +3040,7 @@ main() exit(0); } EOF -if { (eval echo configure:2731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -2747,7 +3060,7 @@ EOF echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:2751: checking size of long long" >&5 +echo "configure:3064: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2755,7 +3068,7 @@ else ac_cv_sizeof_long_long=8 else cat > conftest.$ac_ext < main() @@ -2766,7 +3079,7 @@ main() exit(0); } EOF -if { (eval echo configure:2770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -2785,14 +3098,53 @@ cat >> confdefs.h <&6 +echo "configure:3103: checking size of __int64" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof___int64=8 +else + cat > conftest.$ac_ext < +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(__int64)); + exit(0); +} +EOF +if { (eval echo configure:3122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof___int64=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof___int64=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof___int64" 1>&6 +cat >> confdefs.h <&6 -echo "configure:2791: checking for working const" >&5 +echo "configure:3143: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2862,21 +3214,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2866: checking for inline" >&5 +echo "configure:3218: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2905,12 +3257,12 @@ if [ "x$ac_cv_c_inline" = "xno" ]; then ac_cv_c_inline= fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:2909: checking for mode_t" >&5 +echo "configure:3261: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2938,12 +3290,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2942: checking for off_t" >&5 +echo "configure:3294: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2971,12 +3323,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2975: checking for pid_t" >&5 +echo "configure:3327: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3004,12 +3356,12 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:3008: checking for st_blocks in struct stat" >&5 +echo "configure:3360: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3017,7 +3369,7 @@ int main() { struct stat s; s.st_blocks; ; return 0; } EOF -if { (eval echo configure:3021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blocks=yes else @@ -3040,12 +3392,12 @@ else fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3044: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3396: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3054,7 +3406,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3075,12 +3427,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3079: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:3431: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3088,7 +3440,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3111,13 +3463,13 @@ fi if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:3115: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:3467: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -3135,7 +3487,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -3157,7 +3509,7 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:3161: checking for 8-bit clean memcmp" >&5 +echo "configure:3513: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3165,7 +3517,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -3193,12 +3545,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3197: checking return type of signal handlers" >&5 +echo "configure:3549: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3215,7 +3567,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3234,7 +3586,7 @@ EOF echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6 -echo "configure:3238: checking whether utime accepts a null argument" >&5 +echo "configure:3590: checking whether utime accepts a null argument" >&5 if eval "test \"`echo '$''{'ac_cv_func_utime_null'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3244,7 +3596,7 @@ if test "$cross_compiling" = yes; then ac_cv_func_utime_null=no else cat > conftest.$ac_ext < #include @@ -3255,7 +3607,7 @@ exit(!(stat ("conftestdata", &s) == 0 && && t.st_mtime - s.st_mtime < 120)); } EOF -if { (eval echo configure:3259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_utime_null=yes else @@ -3278,15 +3630,15 @@ EOF fi -for ac_func in getcwd getopt strdup gettimeofday sigaction mkdir rmdir select strerror strstr statfs +for ac_func in getcwd getopt strdup gettimeofday sigaction mkdir rmdir select strerror strstr do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3285: checking for $ac_func" >&5 +echo "configure:3637: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3333,15 +3685,15 @@ else fi done -for ac_func in tcgetattr cfmakeraw readdir_r +for ac_func in tcgetattr cfmakeraw readdir_r vprintf vsprintf vfprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3340: checking for $ac_func" >&5 +echo "configure:3692: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3389,98 +3741,1156 @@ fi done -echo $ac_n "checking how many args statfs takes""... $ac_c" 1>&6 -echo "configure:3394: checking how many args statfs takes" >&5 -if [ "x$ac_cv_func_statfs" = "xyes" ]; then +DO_FILEUTILS_CHECK=yes +if test $uae_cv_prog_cc_watcom = yes -o $am_cv_mingw32 = yes; then + DO_FILEUTILS_CHECK=no +fi +if test $DO_FILEUTILS_CHECK = yes; then + +for ac_hdr in fcntl.h sys/param.h sys/statfs.h sys/fstyp.h \ +mnttab.h mntent.h sys/statvfs.h sys/vfs.h sys/mount.h \ +sys/filsys.h sys/fs_types.h sys/fs/s5param.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3757: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in bcopy endgrent endpwent fchdir ftime ftruncate \ +getcwd getmntinfo gettimeofday isascii lchown \ +listmntent memcpy mkfifo strchr strerror strrchr +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3799: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < -#endif -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#ifdef HAVE_SYS_MOUNT_H -#include +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); #endif -#ifdef HAVE_SYS_SELECT_H -#include + +; return 0; } +EOF +if { (eval echo configure:3827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + +# Determine how to get the list of mounted filesystems. +list_mounted_fs= + +# If the getmntent function is available but not in the standard library, +# make sure LIBS contains -lsun (on Irix4) or -lseq (on PTX). +# getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware. +echo $ac_n "checking for getmntent in -lsun""... $ac_c" 1>&6 +echo "configure:3859: checking for getmntent in -lsun" >&5 +ac_lib_var=`echo sun'_'getmntent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsun $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="-lsun $LIBS" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for getmntent in -lseq""... $ac_c" 1>&6 +echo "configure:3897: checking for getmntent in -lseq" >&5 +ac_lib_var=`echo seq'_'getmntent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lseq $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="-lseq $LIBS" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for getmntent in -lgen""... $ac_c" 1>&6 +echo "configure:3935: checking for getmntent in -lgen" >&5 +ac_lib_var=`echo gen'_'getmntent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgen $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="-lgen $LIBS" +else + echo "$ac_t""no" 1>&6 +fi + +fi + +fi + +echo $ac_n "checking for getmntent""... $ac_c" 1>&6 +echo "configure:3979: checking for getmntent" >&5 +if eval "test \"`echo '$''{'ac_cv_func_getmntent'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getmntent(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_getmntent) || defined (__stub___getmntent) +choke me +#else +getmntent(); #endif -#ifdef HAVE_SYS_VFS_H -#include + +; return 0; } +EOF +if { (eval echo configure:4007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_getmntent=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_getmntent=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'getmntent`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_GETMNTENT 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + +# This test must precede the ones for getmntent because Unicos-9 is +# reported to have the getmntent function, but its support is incompatible +# with other getmntent implementations. + +# NOTE: Normally, I wouldn't use a check for system type as I've done for +# `CRAY' below since that goes against the whole autoconf philosophy. But +# I think there is too great a chance that some non-Cray system has a +# function named listmntent to risk the false positive. + +if test -z "$list_mounted_fs"; then +# Cray UNICOS 9 +echo $ac_n "checking for listmntent of Cray/Unicos-9""... $ac_c" 1>&6 +echo "configure:4042: checking for listmntent of Cray/Unicos-9" >&5 +if eval "test \"`echo '$''{'fu_cv_sys_mounted_cray_listmntent'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + fu_cv_sys_mounted_cray_listmntent=no +cat > conftest.$ac_ext <&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + test $ac_cv_func_listmntent = yes \ +&& fu_cv_sys_mounted_cray_listmntent=yes + +fi +rm -f conftest* + + + +fi + +echo "$ac_t""$fu_cv_sys_mounted_cray_listmntent" 1>&6 +if test $fu_cv_sys_mounted_cray_listmntent = yes; then +list_mounted_fs=found +cat >> confdefs.h <<\EOF +#define MOUNTED_LISTMNTENT 1 +EOF + +fi +fi + +if test $ac_cv_func_getmntent = yes; then + +# This system has the getmntent function. +# Determine whether it's the one-argument variant or the two-argument one. + +if test -z "$list_mounted_fs"; then +# 4.3BSD, SunOS, HP-UX, Dynix, Irix +echo $ac_n "checking for one-argument getmntent function""... $ac_c" 1>&6 +echo "configure:4086: checking for one-argument getmntent function" >&5 +if eval "test \"`echo '$''{'fu_cv_sys_mounted_getmntent1'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + test $ac_cv_header_mntent_h = yes \ +&& fu_cv_sys_mounted_getmntent1=yes \ +|| fu_cv_sys_mounted_getmntent1=no +fi + +echo "$ac_t""$fu_cv_sys_mounted_getmntent1" 1>&6 +if test $fu_cv_sys_mounted_getmntent1 = yes; then +list_mounted_fs=found +cat >> confdefs.h <<\EOF +#define MOUNTED_GETMNTENT1 1 +EOF + +fi +fi + +if test -z "$list_mounted_fs"; then +# SVR4 +echo $ac_n "checking for two-argument getmntent function""... $ac_c" 1>&6 +echo "configure:4108: checking for two-argument getmntent function" >&5 +if eval "test \"`echo '$''{'fu_cv_sys_mounted_getmntent2'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "getmntent" >/dev/null 2>&1; then + rm -rf conftest* + fu_cv_sys_mounted_getmntent2=yes +else + rm -rf conftest* + fu_cv_sys_mounted_getmntent2=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$fu_cv_sys_mounted_getmntent2" 1>&6 +if test $fu_cv_sys_mounted_getmntent2 = yes; then +list_mounted_fs=found +cat >> confdefs.h <<\EOF +#define MOUNTED_GETMNTENT2 1 +EOF + +fi +fi + +if test -z "$list_mounted_fs"; then +{ echo "configure: error: could not determine how to read list of mounted filesystems" 1>&2; exit 1; } +fi + +fi + +if test -z "$list_mounted_fs"; then +# DEC Alpha running OSF/1. +echo $ac_n "checking for getfsstat function""... $ac_c" 1>&6 +echo "configure:4148: checking for getfsstat function" >&5 +if eval "test \"`echo '$''{'fu_cv_sys_mounted_getsstat'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +int main() { +struct statfs *stats; +int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); +; return 0; } +EOF +if { (eval echo configure:4164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + fu_cv_sys_mounted_getsstat=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + fu_cv_sys_mounted_getsstat=no +fi +rm -f conftest* +fi + +echo "$ac_t""$fu_cv_sys_mounted_getsstat" 1>&6 +if test $fu_cv_sys_mounted_getsstat = yes; then +list_mounted_fs=found +cat >> confdefs.h <<\EOF +#define MOUNTED_GETFSSTAT 1 +EOF + +fi +fi + +if test -z "$list_mounted_fs"; then +# AIX. +echo $ac_n "checking for mntctl function and struct vmount""... $ac_c" 1>&6 +echo "configure:4189: checking for mntctl function and struct vmount" >&5 +if eval "test \"`echo '$''{'fu_cv_sys_mounted_vmount'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + fu_cv_sys_mounted_vmount=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + fu_cv_sys_mounted_vmount=no +fi +rm -f conftest* +fi + +echo "$ac_t""$fu_cv_sys_mounted_vmount" 1>&6 +if test $fu_cv_sys_mounted_vmount = yes; then +list_mounted_fs=found +cat >> confdefs.h <<\EOF +#define MOUNTED_VMOUNT 1 +EOF + +fi +fi + +if test -z "$list_mounted_fs"; then +# SVR3 +echo $ac_n "checking for FIXME existence of three headers""... $ac_c" 1>&6 +echo "configure:4227: checking for FIXME existence of three headers" >&5 +if eval "test \"`echo '$''{'fu_cv_sys_mounted_fread_fstyp'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < -#endif -#ifdef HAVE_SYS_STATVFS_H +#include +#include +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + fu_cv_sys_mounted_fread_fstyp=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + fu_cv_sys_mounted_fread_fstyp=no +fi +rm -f conftest* +fi + +echo "$ac_t""$fu_cv_sys_mounted_fread_fstyp" 1>&6 +if test $fu_cv_sys_mounted_fread_fstyp = yes; then +list_mounted_fs=found +cat >> confdefs.h <<\EOF +#define MOUNTED_FREAD_FSTYP 1 +EOF + +fi +fi + +if test -z "$list_mounted_fs"; then +# 4.4BSD and DEC OSF/1. +echo $ac_n "checking for getmntinfo function""... $ac_c" 1>&6 +echo "configure:4268: checking for getmntinfo function" >&5 +if eval "test \"`echo '$''{'fu_cv_sys_mounted_getmntinfo'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +ok= +if test $ac_cv_func_getmntinfo = yes; then +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "f_type;" >/dev/null 2>&1; then + rm -rf conftest* + ok=yes +fi +rm -f conftest* + +fi +test -n "$ok" \ +&& fu_cv_sys_mounted_getmntinfo=yes \ +|| fu_cv_sys_mounted_getmntinfo=no + +fi + +echo "$ac_t""$fu_cv_sys_mounted_getmntinfo" 1>&6 +if test $fu_cv_sys_mounted_getmntinfo = yes; then +list_mounted_fs=found +cat >> confdefs.h <<\EOF +#define MOUNTED_GETMNTINFO 1 +EOF + +fi +fi + +# FIXME: add a test for netbsd-1.1 here + +if test -z "$list_mounted_fs"; then +# Ultrix +echo $ac_n "checking for getmnt function""... $ac_c" 1>&6 +echo "configure:4309: checking for getmnt function" >&5 +if eval "test \"`echo '$''{'fu_cv_sys_mounted_getmnt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + fu_cv_sys_mounted_getmnt=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + fu_cv_sys_mounted_getmnt=no +fi +rm -f conftest* +fi + +echo "$ac_t""$fu_cv_sys_mounted_getmnt" 1>&6 +if test $fu_cv_sys_mounted_getmnt = yes; then +list_mounted_fs=found +cat >> confdefs.h <<\EOF +#define MOUNTED_GETMNT 1 +EOF + +fi +fi + +if test -z "$list_mounted_fs"; then +# SVR2 +echo $ac_n "checking whether it is possible to resort to fread on /etc/mnttab""... $ac_c" 1>&6 +echo "configure:4349: checking whether it is possible to resort to fread on /etc/mnttab" >&5 +if eval "test \"`echo '$''{'fu_cv_sys_mounted_fread'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + fu_cv_sys_mounted_fread=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + fu_cv_sys_mounted_fread=no +fi +rm -f conftest* +fi + +echo "$ac_t""$fu_cv_sys_mounted_fread" 1>&6 +if test $fu_cv_sys_mounted_fread = yes; then +list_mounted_fs=found +cat >> confdefs.h <<\EOF +#define MOUNTED_FREAD 1 +EOF + +fi +fi + +if test -z "$list_mounted_fs"; then +{ echo "configure: error: could not determine how to read list of mounted filesystems" 1>&2; exit 1; } +# FIXME -- no need to abort building the whole package +# Can't build mountlist.c or anything that needs its functions +fi + +echo "checking how to get filesystem space usage" 1>&6 +echo "configure:4391: checking how to get filesystem space usage" >&5 +space=no + +# Perform only the link test since it seems there are no variants of the +# statvfs function. This check is more than just AC_CHECK_FUNCS(statvfs) +# because that got a false positive on SCO OSR5. Adding the declaration +# of a `struct statvfs' causes this test to fail (as it should) on such +# systems. That system is reported to work fine with STAT_STATFS4 which +# is what it gets when this test fails. +if test $space = no; then +# SVR4 +echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 +echo "configure:4403: checking statvfs function (SVR4)" >&5 +if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < #include -#endif int main() { -struct statfs statbuf;statfs("/",&statbuf); +struct statvfs fsd; statvfs (0, &fsd); ; return 0; } EOF -if { (eval echo configure:3426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* - echo "$ac_t""2" 1>&6 -STATFS_NO_ARGS=2 + fu_cv_sys_stat_statvfs=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - echo "$ac_t""4" 1>&6 -STATFS_NO_ARGS=4 + fu_cv_sys_stat_statvfs=no fi rm -f conftest* fi -echo $ac_n "checking whether to use f_bavail or f_bfree""... $ac_c" 1>&6 -echo "configure:3441: checking whether to use f_bavail or f_bfree" >&5 -if [ "x$ac_cv_func_statfs" = "xyes" ]; then +echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6 +if test $fu_cv_sys_stat_statvfs = yes; then +space=yes +cat >> confdefs.h <<\EOF +#define STAT_STATVFS 1 +EOF + +fi +fi + +if test $space = no; then +# DEC Alpha running OSF/1 +echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6 +echo "configure:4441: checking for 3-argument statfs function (DEC OSF/1)" >&5 +if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + fu_cv_sys_stat_statfs3_osf1=no +else cat > conftest.$ac_ext < #include -#endif +#include +main () +{ +struct statfs fsd; +fsd.f_fsize = 0; +exit (statfs (".", &fsd, sizeof (struct statfs))); +} +EOF +if { (eval echo configure:4462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + fu_cv_sys_stat_statfs3_osf1=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + fu_cv_sys_stat_statfs3_osf1=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6 +if test $fu_cv_sys_stat_statfs3_osf1 = yes; then +space=yes +cat >> confdefs.h <<\EOF +#define STAT_STATFS3_OSF1 1 +EOF + +fi +fi + +if test $space = no; then +# AIX +echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6 +echo "configure:4489: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + fu_cv_sys_stat_statfs2_bsize=no +else + cat > conftest.$ac_ext < #endif #ifdef HAVE_SYS_MOUNT_H #include #endif -#ifdef HAVE_SYS_SELECT_H -#include -#endif #ifdef HAVE_SYS_VFS_H #include #endif -#ifdef HAVE_SYS_STATFS_H +main () +{ +struct statfs fsd; +fsd.f_bsize = 0; +exit (statfs (".", &fsd)); +} +EOF +if { (eval echo configure:4516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + fu_cv_sys_stat_statfs2_bsize=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + fu_cv_sys_stat_statfs2_bsize=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6 +if test $fu_cv_sys_stat_statfs2_bsize = yes; then +space=yes +cat >> confdefs.h <<\EOF +#define STAT_STATFS2_BSIZE 1 +EOF + +fi +fi + +if test $space = no; then +# SVR3 +echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6 +echo "configure:4543: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + fu_cv_sys_stat_statfs4=no +else + cat > conftest.$ac_ext < #include +main () +{ +struct statfs fsd; +exit (statfs (".", &fsd, sizeof fsd, 0)); +} +EOF +if { (eval echo configure:4561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + fu_cv_sys_stat_statfs4=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + fu_cv_sys_stat_statfs4=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6 +if test $fu_cv_sys_stat_statfs4 = yes; then +space=yes +cat >> confdefs.h <<\EOF +#define STAT_STATFS4 1 +EOF + +fi +fi + +if test $space = no; then +# 4.4BSD and NetBSD +echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6 +echo "configure:4588: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + fu_cv_sys_stat_statfs2_fsize=no +else + cat > conftest.$ac_ext < +#ifdef HAVE_SYS_PARAM_H +#include #endif -#ifdef HAVE_SYS_STATVFS_H -#include +#ifdef HAVE_SYS_MOUNT_H +#include +#endif +main () +{ +struct statfs fsd; +fsd.f_fsize = 0; +exit (statfs (".", &fsd)); +} +EOF +if { (eval echo configure:4612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + fu_cv_sys_stat_statfs2_fsize=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + fu_cv_sys_stat_statfs2_fsize=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6 +if test $fu_cv_sys_stat_statfs2_fsize = yes; then +space=yes +cat >> confdefs.h <<\EOF +#define STAT_STATFS2_FSIZE 1 +EOF + +fi +fi + +if test $space = no; then +# Ultrix +echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6 +echo "configure:4639: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + fu_cv_sys_stat_fs_data=no +else + cat > conftest.$ac_ext < +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_MOUNT_H +#include +#endif +#ifdef HAVE_SYS_FS_TYPES_H +#include +#endif +main () +{ +struct fs_data fsd; +/* Ultrix's statfs returns 1 for success, +0 for not mounted, -1 for failure. */ +exit (statfs (".", &fsd) != 1); +} +EOF +if { (eval echo configure:4667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + fu_cv_sys_stat_fs_data=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + fu_cv_sys_stat_fs_data=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6 +if test $fu_cv_sys_stat_fs_data = yes; then +space=yes +cat >> confdefs.h <<\EOF +#define STAT_STATFS2_FS_DATA 1 +EOF + +fi +fi + +if test $space = no; then +# SVR2 +cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + cat >> confdefs.h <<\EOF +#define STAT_READ_FILSYS 1 +EOF + space=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +fi + +if test -n "$list_mounted_fs" && test $space != no; then +DF_PROG="df" +LIBOBJS="$LIBOBJS fsusage.o" +LIBOBJS="$LIBOBJS mountlist.o" +fi + +for ac_func in ftruncate +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:4724: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:4752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +ftruncate_missing=yes +fi +done + + +if test "$ftruncate_missing" = yes; then +echo $ac_n "checking fcntl emulation of ftruncate""... $ac_c" 1>&6 +echo "configure:4780: checking fcntl emulation of ftruncate" >&5 +if eval "test \"`echo '$''{'fu_cv_sys_ftruncate_emulation'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { + +#if !defined(F_CHSIZE) && !defined(F_FREESP) +chsize(); +#endif + +; return 0; } +EOF +if { (eval echo configure:4798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + fu_cv_sys_ftruncate_emulation=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + fu_cv_sys_ftruncate_emulation=no +fi +rm -f conftest* +fi + +echo "$ac_t""$fu_cv_sys_ftruncate_emulation" 1>&6 +if test $fu_cv_sys_ftruncate_emulation = yes; then +LIBOBJS="$LIBOBJS ftruncate.o" +fi +fi + +case "$LIBOBJS" in +*rename.o*) +MVDIR_PROG="mvdir" +;; +esac + +# Check for SunOS statfs brokenness wrt partitions 2GB and larger. +# If exists and struct statfs has a member named f_spare, +# enable the work-around code in fsusage.c. +echo $ac_n "checking for statfs that truncates block counts""... $ac_c" 1>&6 +echo "configure:4826: checking for statfs that truncates block counts" >&5 +if eval "test \"`echo '$''{'fu_cv_sys_truncating_statfs'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include int main() { -struct statfs statbuf;statbuf.f_bavail; +struct statfs t; long c = *(t.f_spare); ; return 0; } EOF -if { (eval echo configure:3473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - echo "$ac_t""f_bavail" 1>&6 -STATBUF_BAVAIL=f_bavail + fu_cv_sys_truncating_statfs=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - echo "$ac_t""f_bfree" 1>&6 -STATBUF_BAVAIL=f_bfree + fu_cv_sys_truncating_statfs=no +fi +rm -f conftest* +fi + +if test $fu_cv_sys_truncating_statfs = yes; then +cat >> confdefs.h <<\EOF +#define STATFS_TRUNCATES_BLOCK_COUNTS 1 +EOF + +fi +echo "$ac_t""$fu_cv_sys_truncating_statfs" 1>&6 + +echo "checking for AFS" 1>&6 +echo "configure:4864: checking for AFS" >&5 +test -d /afs && cat >> confdefs.h <<\EOF +#define AFS 1 +EOF + + +fi + +if [ $target = "p.os" ]; then + HAVE_POS=yes +else + echo $ac_n "checking for pOS""... $ac_c" 1>&6 +echo "configure:4876: checking for pOS" >&5 + cat > conftest.$ac_ext <&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6; HAVE_POS=yes +else + rm -rf conftest* + echo "$ac_t""no" 1>&6; HAVE_POS=no fi rm -f conftest* + fi @@ -3492,16 +4902,16 @@ if [ "x$HAVE_NCURSES_LIB" = "xyes" ]; th else if [ "x$ac_cv_header_ncurses_h" = "xno" ]; then echo $ac_n "checking for attr_t in curses.h""... $ac_c" 1>&6 -echo "configure:3496: checking for attr_t in curses.h" >&5 +echo "configure:4906: checking for attr_t in curses.h" >&5 cat > conftest.$ac_ext < int main() { { attr_t a; a = A_NORMAL; } ; return 0; } EOF -if { (eval echo configure:3505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -3518,16 +4928,16 @@ fi rm -f conftest* else echo $ac_n "checking for attr_t in ncurses.h""... $ac_c" 1>&6 -echo "configure:3522: checking for attr_t in ncurses.h" >&5 +echo "configure:4932: checking for attr_t in ncurses.h" >&5 cat > conftest.$ac_ext < int main() { { attr_t a; a = A_NORMAL; } ; return 0; } EOF -if { (eval echo configure:3531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -3546,6 +4956,82 @@ rm -f conftest* fi fi + +echo $ac_n "checking for pthread library""... $ac_c" 1>&6 +echo "configure:4962: checking for pthread library" >&5 +TMP_SAVE_CFLAGS=$CFLAGS +TMP_SAVE_LIBS=$LIBS +LIBS="$LIBS -lpthread" +cat > conftest.$ac_ext < +#endif +#include +int main() { + +void foo(void) +{ +pthread_exit (0); +} +; return 0; } +EOF +if { (eval echo configure:4983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + HAVE_PTHREAD_LIB=yes +echo "$ac_t""yes" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + HAVE_PTHREAD_LIB=no +echo "$ac_t""no" 1>&6 +fi +rm -f conftest* +CFLAGS=$TMP_SAVE_CFLAGS +LIBS=$TMP_SAVE_LIBS + +echo $ac_n "checking for DirectX""... $ac_c" 1>&6 +echo "configure:4999: checking for DirectX" >&5 +TMP_SAVE_CFLAGS=$CFLAGS +TMP_SAVE_LIBS=$LIBS +CFLAGS="$CFLAGS $X_CFLAGS" +LIBS="$LIBS -lddraw" +cat > conftest.$ac_ext < +#endif +#include +#include +int main() { + +LPDIRECTDRAW lpDD; +IDirectDraw_CreateSurface(lpDD, 0, 0, 0); + +; return 0; } +EOF +if { (eval echo configure:5021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + HAVE_DIRECTX=yes +echo "$ac_t""yes" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + HAVE_DIRECTX=no +echo "$ac_t""no" 1>&6 +fi +rm -f conftest* +CFLAGS=$TMP_SAVE_CFLAGS +LIBS=$TMP_SAVE_LIBS + DO_PROFILING=no WANT_GGI=dunno WANT_SVGALIB=dunno @@ -3672,7 +5158,7 @@ if [ "x$WANT_DGA" = "xyes" ]; then TMP_SAVE_LIBS=$LIBS LIBS="$X_LIBS $LIBS" echo $ac_n "checking for XF86DGAQueryExtension in -lXxf86dga""... $ac_c" 1>&6 -echo "configure:3676: checking for XF86DGAQueryExtension in -lXxf86dga" >&5 +echo "configure:5162: checking for XF86DGAQueryExtension in -lXxf86dga" >&5 ac_lib_var=`echo Xxf86dga'_'XF86DGAQueryExtension | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3680,7 +5166,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXxf86dga $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3724,7 +5210,7 @@ if [ "x$WANT_VIDMODE" = "xyes" ]; then TMP_SAVE_LIBS=$LIBS LIBS="$X_LIBS $LIBS" echo $ac_n "checking for XF86VidModeQueryExtension in -lXxf86vm""... $ac_c" 1>&6 -echo "configure:3728: checking for XF86VidModeQueryExtension in -lXxf86vm" >&5 +echo "configure:5214: checking for XF86VidModeQueryExtension in -lXxf86vm" >&5 ac_lib_var=`echo Xxf86vm'_'XF86VidModeQueryExtension | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3732,7 +5218,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXxf86vm $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3813,7 +5299,7 @@ fi # Extract the first word of "gtk-config", so it can be a program name with args. set dummy gtk-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3817: checking for $ac_word" >&5 +echo "configure:5303: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3844,7 +5330,7 @@ fi min_gtk_version=0.99.7 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 -echo "configure:3848: checking for GTK - version >= $min_gtk_version" >&5 +echo "configure:5334: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes @@ -3867,7 +5353,7 @@ echo "configure:3848: checking for GTK - echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -3930,7 +5416,7 @@ main () } EOF -if { (eval echo configure:3934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -3964,7 +5450,7 @@ fi CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat > conftest.$ac_ext < @@ -3974,7 +5460,7 @@ int main() { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } EOF -if { (eval echo configure:3978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" @@ -4013,28 +5499,17 @@ rm -f conftest* rm -f conf.gtktest -if [ "x$WANT_UI" = "xyes" -a "x$WANT_DGA" = "xyes" ]; then - echo "Can't use a GUI with DGA - disabling DGA." - NR_ERRORS=`expr $NR_ERRORS + 1` - WAMT_DGA=no - WANT_VIDMODE=no -fi - -if [ "x$WANT_DGA" = "xyes" ]; then - WANT_UI=no -fi - SHM_SUPPORT_LINKS=0 -if [ "x$no_x" != "xyes" -a "x$WANT_DGA" != "xyes" -a "x$ac_cv_header_sys_ipc_h" = "xyes" -a "x$ac_cv_header_sys_shm_h" = "xyes" ]; then +if [ "x$no_x" != "xyes" -a "x$ac_cv_header_sys_ipc_h" = "xyes" -a "x$ac_cv_header_sys_shm_h" = "xyes" ]; then echo $ac_n "checking whether the X11 MIT-SHM extension can be compiled in""... $ac_c" 1>&6 -echo "configure:4032: checking whether the X11 MIT-SHM extension can be compiled in" >&5 +echo "configure:5507: checking whether the X11 MIT-SHM extension can be compiled in" >&5 TMP_SAVE_CFLAGS=$CFLAGS TMP_SAVE_LIBS=$LIBS CFLAGS="$CFLAGS $X_CFLAGS" LIBS="$X_LIBS $LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* SHM_SUPPORT_LINKS=1 echo "$ac_t""yes" 1>&6 @@ -4080,9 +5555,16 @@ MATHLIB=-lm DEBUGOBJS="debug.o" echo $ac_n "checking which target to use""... $ac_c" 1>&6 -echo "configure:4084: checking which target to use" >&5 +echo "configure:5559: checking which target to use" >&5 -if [ "x$HAVE_BEOS" = "xyes" ]; then +if [ "x$HAVE_DIRECTX" = "xyes" ]; then + echo "$ac_t""Win32/DirectX" 1>&6 + MATHLIB= + TARGET=win32 + TARGETDEP=t-win32.h + GFXOBJS="osdep/win32.o osdep/win32gui.o osdep/parser.o osdep/keyboard.o osdep/posixemu.o" + RESOBJS="osdep/winuae.res" +else if [ "x$HAVE_BEOS" = "xyes" ]; then echo "$ac_t""BeOS" 1>&6 MATHLIB= TARGET=beos @@ -4180,7 +5662,6 @@ else fi else echo "Using gtk+ GUI." - LIBRARIES="-lgtk -lgdk -lglib $LIBRARIES" NEED_THREAD_SUPPORT=yes ADDITIONAL_CFLAGS="$ADDITIONAL_CFLAGS -DUSING_GTK_GUI" GUIOBJS=gtkui.o @@ -4194,6 +5675,7 @@ fi fi fi fi +fi if [ "x$WANT_NCURSES_UI" = "xyes" ]; then if [ "x$HAVE_NCURSES_LIB" = "xno" ]; then @@ -4225,14 +5707,22 @@ OSDEP=od-generic THREADDEP=td-none SOUNDDEP=od-generic +MD_SUPPORT=machdep/support.c +OD_JOYSTICK=osdep/joystick.c +SD_SOUND=sounddep/sound.c +P2C=p2c.o + USE_PENGUINS=no USE_THREADS=no USE_SOUND=no USE_FILE_SOUND=no -HAVEELF=no +USE_UNDERSCORE=dunno + HAVELINUX=no +HAVEBSD=no HAVEGCC27=no +HAVEGAS=no HAVEI386=no HAVE68K=no HAVEGLIBC2=no @@ -4241,65 +5731,62 @@ ASMOBJS= CPUOBJS=cpuemu.o echo $ac_n "checking for GCC 2.7 or higher""... $ac_c" 1>&6 -echo "configure:4245: checking for GCC 2.7 or higher" >&5 -cat >conftest.c << EOF -int main() -{ -#if defined(__GNUC__) && defined(__GNUC_MINOR__) -#if __GNUC__ > 2 || __GNUC_MINOR__ > 6 -printf("GNU\n"); -#endif +echo "configure:5735: checking for GCC 2.7 or higher" >&5 +cat > conftest.$ac_ext < 1 || __GNUC_MINOR__ - 1 > 5 + yes #endif -return 0; -} -EOF -$CC conftest.c -c -o conftest.o -$CC conftest.o -o conftest -./conftest >conftest.file -if grep GNU conftest.file >/dev/null; then - echo "$ac_t""yes" 1>&6 - HAVEGCC27=yes +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6; HAVEGCC27=yes else + rm -rf conftest* echo "$ac_t""no" 1>&6 - if [ "x$CC" = "xgcc" ]; then +fi +rm -f conftest* + + +if test $ac_cv_prog_gcc = yes; then + if test $HAVEGCC27 != yes; then echo "I suggest you upgrade to at least version 2.7 of GCC" - else + fi +else + if test $uae_cv_prog_cc_watcom != yes; then echo "Couldn't find GCC. UAE may or may not compile and run correctly." NR_WARNINGS=`expr $NR_WARNINGS + 1` fi fi -echo $ac_n "checking for glibc-2.0 or higher""... $ac_c" 1>&6 -echo "configure:4275: checking for glibc-2.0 or higher" >&5 if [ "x$ac_cv_header_features_h" = "xyes" ]; then - cat >conftest.c << EOF + echo $ac_n "checking for glibc-2.0 or higher""... $ac_c" 1>&6 +echo "configure:5768: checking for glibc-2.0 or higher" >&5 + cat > conftest.$ac_ext < -int main() -{ -#if defined(__GLIBC__) -#if __GLIBC__ >= 2 -printf("GNU\n"); -#endif +#if __GLIBC__ - 1 >= 1 + yes #endif -return 0; -} -EOF - $CC conftest.c -c -o conftest.o - $CC conftest.o -o conftest - ./conftest >conftest.file - if grep GNU conftest.file >/dev/null; then - HAVEGLIBC2=yes - echo "$ac_t""yes" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6; HAVEGLIBC2=yes else + rm -rf conftest* echo "$ac_t""no" 1>&6 fi +rm -f conftest* -if [ "x$CC" = "xgcc" ]; then +fi + +if test $ac_cv_prog_gcc = yes; then WARNING_CFLAGS="-Wall -Wno-unused -Wno-format -W -Wmissing-prototypes -Wstrict-prototypes" OPTIMIZE_CFLAGS="-O2 -fomit-frame-pointer" CFLAGS= @@ -4325,33 +5812,50 @@ else CFLAGS="$CFLAGS -DGCCCONSTFUNC=" fi -cat >conftest.c << EOF -int main() -{ +echo $ac_n "checking for x86 target CPU""... $ac_c" 1>&6 +echo "configure:5817: checking for x86 target CPU" >&5 +cat > conftest.$ac_ext <conftest.file -if grep 386 conftest.file >/dev/null; then - HAVEI386=yes - echo "You seem to be using a x86 CPU (UAE will require a 486 to run)" -else if grep 68k conftest.file >/dev/null; then - HAVE68K=yes - echo "You seem to be using a 68k CPU." +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6; HAVEI386=yes else - echo "No special hacks for your CPU, sorry." -fi; fi + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* + +echo $ac_n "checking for m68k target CPU""... $ac_c" 1>&6 +echo "configure:5839: checking for m68k target CPU" >&5 +cat > conftest.$ac_ext <&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6; HAVEI386=yes +else + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi rm -f conftest* + if MACHINE=`uname -a 2>/dev/null`; then case "$MACHINE" in Linux*) @@ -4361,30 +5865,58 @@ if MACHINE=`uname -a 2>/dev/null`; then fi -echo $ac_n "checking whether we are on an ELF system""... $ac_c" 1>&6 -echo "configure:4366: checking whether we are on an ELF system" >&5 +if [ "x$HAVE_MACHINE_JOYSTICK_H" = "xyes" ]; then + cat > conftest.$ac_ext < +int main() { +{ struct joystick a; } +; return 0; } +EOF +if { (eval echo configure:5878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + OD_JOYSTICK=$abssrcdir/src/od-linux/joystick.c +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +fi + -if [ "x$SYSTEM_IS_ELF" = "xdunno" ]; then - cat >conftest.c << EOF -int main() { return 0; } +echo $ac_n "checking for GAS .p2align feature""... $ac_c" 1>&6 +echo "configure:5890: checking for GAS .p2align feature" >&5 +cat >conftest.S << EOF + .text + .p2align 5 EOF +if $CC conftest.S -c -o conftest.o >/dev/null 2>&1 ; then HAVEGAS=yes; fi +echo "$ac_t""$HAVEGAS" 1>&6 - gcc conftest.c -o conftest - if [ "x$FILEPRG" = "xnot-found" ]; then - cp conftest conftest.file - else - $FILEPRG conftest >conftest.file - fi - if grep ELF conftest.file >/dev/null; then - HAVEELF=yes - echo "$ac_t""yes" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi +echo $ac_n "checking whether assembler symbols need an underscore""... $ac_c" 1>&6 +echo "configure:5899: checking whether assembler symbols need an underscore" >&5 +cat >conftest1.S << EOF + .text + .globl _symbol +_symbol: +EOF +cat >conftest2.c << EOF +extern void symbol (); +int main () +{ +symbol (); +} +EOF +$CC conftest1.S -c -o conftest1.o >/dev/null 2>&1 +$CC conftest2.c -c -o conftest2.o >/dev/null 2>&1 +if $CC conftest1.o conftest2.o -o conftest >/dev/null 2>&1; then + USE_UNDERSCORE=yes + CFLAGS="$CFLAGS -DUSE_UNDERSCORE" else - echo "$ac_t""overriden: $SYSTEM_IS_ELF" 1>&6 - HAVEELF=$SYSTEM_IS_ELF + USE_UNDERSCORE=no fi +echo "$ac_t""$USE_UNDERSCORE" 1>&6 rm -f conftest* @@ -4424,11 +5956,7 @@ if [ "x$USE_THREADS" = "xyes" -o "x$USE_ fi if [ "x$HAVELINUX" = "xno" -o "x$HAVEGLIBC2" = "xno" ]; then - echo "*** Thread support has only been tested on Linux systems with glibc-2.0" - echo "*** There are known problems with libc5-based Linux systems and threads!" - if [ "x$NEED_THREAD_SUPPORT" = "xyes" ]; then - echo "*** Use 'configure --disable-ui' if you have problems." - fi + echo "Thread support has only been tested on Linux systems with glibc-2.0" NR_WARNINGS=`expr $NR_WARNINGS + 1` fi if [ "x$TARGET" = "xsvgalib" ]; then @@ -4447,14 +5975,14 @@ if [ "x$HAVEGCC27" = "xyes" -a "x$HAVEI3 SAVECFLAGS=$CFLAGS CFLAGS="$CFLAGS -mno-schedule-prologue" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* NO_SCHED_CFLAGS="-mno-schedule-prologue" else @@ -4471,14 +5999,14 @@ if [ "x$HAVEGCC27" = "xyes" -a "x$HAVEI3 CFLAGS="$CFLAGS -fno-exceptions" NOEXCEPTIONS=no cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* NOEXCEPTIONS=yes else @@ -4495,12 +6023,23 @@ fi if [ "x$HAVEGCC27" = "xyes" -a "x$HAVEI386" = "xyes" -a "x$DO_PROFILING" = "xno" ]; then MACHDEP=md-i386-gcc - CFLAGS="$CFLAGS -DX86_ASSEMBLY -DUNALIGNED_PROFITABLE -fno-strength-reduce -DREGPARAM=\"__attribute__((regparm(3)))\"" - ASMOBJS=machdep/X86.o - CPUOBJS="cpufast.o" - if [ "x$HAVEELF" != "xyes" ]; then - CFLAGS="$CFLAGS -DUSE_UNDERSCORE" - fi + CFLAGS="$CFLAGS -DUNALIGNED_PROFITABLE -fno-strength-reduce -DREGPARAM=\"__attribute__((regparm(3)))\"" + + if [ "x$HAVEGAS" = "xyes" ]; then + CFLAGS="$CFLAGS -DX86_ASSEMBLY" + ASMOBJS=md-X86.o + + CPUOBJS=cpufast.o + P2C=p2c_x86.o + fi +else if test $uae_cv_prog_cc_watcom = yes; then + MACHDEP=md-i386-watcom + echo CFLAGS before: $CFLAGS + CFLAGS=`echo $CFLAGS | sed 's, -g , ,' |sed 's,^-g ,,'` + CFLAGS="$CFLAGS --/--bm --/--mf --/--w4 --/--s --/--ei --/--zp4 --/--5r" + CFLAGS="$CFLAGS --/--oe=50 --/--oi --/--ok --/--ol --/--ot --/--oh --/--or --/--zq" + CFLAGS="$CFLAGS -DREGPARAM= -DUNALIGNED_PROFITABLE" + echo CFLAGS after: $CFLAGS else if [ "x$TARGET" = "xp_os" ]; then CPU=`uname -m` if [ "x$CPU" = "xm68k" ]; then @@ -4524,12 +6063,13 @@ else if [ "x$TARGET" = "xp_os" ]; then else if [ "x$HAVEGCC27" = "xyes" -a "x$HAVE68K" = "xyes" -a "x$TARGET" = "xamigaos" ]; then MACHDEP=md-68k OSDEP=od-amiga - CFLAGS="$CFLAGS -DREGPARAM=\"__attribute__((regparm(4)))\" -DM68K_FLAG_OPT=1" - CPUOBJS="cpufast.o" + CFLAGS="$CFLAGS -DUNALIGNED_PROFITABLE -DREGPARAM=\"__attribute__((regparm(4)))\" -DM68K_FLAG_OPT=1" + CPUOBJS="cpufast1.o cpufast2.o cpufast3.o cpufast4.o cpufast5.o cpufast6.o cpufast7.o cpufast8.o" else if [ "x$TARGET" = "xamigaos" ]; then MACHDEP=md-generic OSDEP=od-amiga - CFLAGS="$CFLAGS -DREGPARAM=" + CFLAGS="$CFLAGS -O -DREGPARAM=" + CPUOBJS="cpuemu1.o cpuemu2.o cpuemu3.o cpuemu4.o cpuemu5.o cpuemu6.o cpuemu7.o cpuemu8.o" else if [ "x$HAVEGCC27" = "xyes" -a "x$HAVE68K" = "xyes" -a "x$DO_PROFILING" = "xno" ]; then MACHDEP=md-68k CFLAGS="$CFLAGS -DM68K_FLAG_OPT=1 -DREGPARAM=" @@ -4546,13 +6086,23 @@ fi fi fi fi +fi -if [ "x$HAVELINUX" = "xyes" ]; then +if [ "x$TARGET" = "xwin32" ]; then + OSDEP=od-win32 + if test $ac_cv_prog_gcc = yes; then + LIBS="$LIBS -lddraw -lwinmm -lcomctl32 -lcomdlg32 -luser32 -lgdi32 -lkernel32 -ladvapi32 -lshell32" + else if test $uae_cv_prog_cc_watcom = yes; then + LIBS="$LIBS -lddraw -lwinmm -lcomctl32" + fi + fi +else if [ "x$HAVELINUX" = "xyes" ]; then OSDEP=od-linux if [ "x$HAVEGLIBC2" = "xyes" -a "x$HAVEI386" = "xyes" ]; then CFLAGS="$CFLAGS -DHAVE_GLIBC_2_LINUX" fi fi +fi if [ "x$TARGET" = "xx11" -o "x$TARGET" = "xsvgalib" -o "x$TARGET" = "xamigaos" \ -o "x$TARGET" = "xbeos" -o "x$TARGET" = "xasciiart" -o "x$TARGET" = "xggilib" -o "x$TARGET" = "xp_os" ]; then @@ -4562,9 +6112,9 @@ fi HAVE_USS_SOUND=no if [ "x$ac_cv_header_sys_soundcard_h" = "xyes" -o "x$ac_cv_header_machine_soundcard_h" = "xyes" ]; then echo $ac_n "checking whether sys/soundcard.h or machine/soundcard.h works""... $ac_c" 1>&6 -echo "configure:4566: checking whether sys/soundcard.h or machine/soundcard.h works" >&5 +echo "configure:6116: checking whether sys/soundcard.h or machine/soundcard.h works" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 HAVE_USS_SOUND=yes @@ -4593,7 +6143,7 @@ rm -f conftest* fi echo $ac_n "checking which sound system to use""... $ac_c" 1>&6 -echo "configure:4597: checking which sound system to use" >&5 +echo "configure:6147: checking which sound system to use" >&5 # Check whether --enable-sound or --disable-sound was given. if test "${enable_sound+set}" = set; then enableval="$enable_sound" @@ -4629,19 +6179,33 @@ else else if [ "x$HAVE_AF_LIB" = "xyes" ]; then echo "$ac_t""AF sound" 1>&6 SOUNDDEP=sd-af + LIBS="$LIBS -lAF" + USE_SOUND=yes + else if [ "x$HAVE_MME_LIB" = "xyes" ]; then + echo "$ac_t""MME sound" 1>&6 + SOUNDDEP=sd-mme + LIBS="$LIBS -lmme" USE_SOUND=yes else if [ "x$TARGET" = "xp_os" ]; then echo "$ac_t""pAudio.device" 1>&6 SOUNDDEP=od-pos USE_SOUND=yes else if [ "x$TARGET" = "xamigaos" ]; then - echo "$ac_t""Amiga audio.device" 1>&6 + if [ "x$ac_cv_header_devices_ahi_h" = "xyes" ]; then + echo "$ac_t""Amiga AHI.device" 1>&6 + else + echo "$ac_t""Amiga audio.device" 1>&6 + fi SOUNDDEP=od-amiga USE_SOUND=yes else if [ "x$TARGET" = "xbeos" ]; then echo "$ac_t""BeOS sound" 1>&6 SOUNDDEP=od-beos USE_SOUND=yes + else if [ "x$TARGET" = "xwin32" ]; then + echo "$ac_t""Win32 sound" 1>&6 + SOUNDDEP=od-win32 + USE_SOUND=yes else echo "no known sound system found" NR_ERRORS=`expr $NR_ERRORS + 1` @@ -4652,6 +6216,8 @@ else fi fi fi + fi + fi fi rm -f src/machdep @@ -4659,16 +6225,21 @@ rm -f src/osdep rm -f src/threaddep rm -f src/sounddep rm -f src/target.h +rm -f src/config.h +rm -f src/sd-sound.c +rm -f src/od-joy.c +rm -f src/md-support.c +rm -f src/md-X86.S if [ "x$TARGET" = "xamigaos" -o "x$TARGET" = "xp_os" ]; then echo $ac_n "checking which CPU to use""... $ac_c" 1>&6 -echo "configure:4666: checking which CPU to use" >&5 +echo "configure:6237: checking which CPU to use" >&5 cpu=`cpu | cut -d' ' -f2` echo "$ac_t""$cpu" 1>&6 CFLAGS="$CFLAGS -m$cpu" echo $ac_n "checking which FPU to use""... $ac_c" 1>&6 -echo "configure:4672: checking which FPU to use" >&5 +echo "configure:6243: checking which FPU to use" >&5 fpu=`cpu | cut -d' ' -f3 | grep '^688812$'` if [ "x$fpu" != "x" ]; then echo "$ac_t""68881" 1>&6 @@ -4694,6 +6265,7 @@ fi + trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -4828,6 +6400,9 @@ s%@CC@%$CC%g s%@CPP@%$CPP%g s%@SET_MAKE@%$SET_MAKE%g s%@FILEPRG@%$FILEPRG%g +s%@WRCPRG@%$WRCPRG%g +s%@RCLPRG@%$RCLPRG%g +s%@EXEEXT@%$EXEEXT%g s%@X_CFLAGS@%$X_CFLAGS%g s%@X_PRE_LIBS@%$X_PRE_LIBS%g s%@X_LIBS@%$X_LIBS%g @@ -4837,13 +6412,14 @@ s%@GTK_CONFIG@%$GTK_CONFIG%g s%@GTK_CFLAGS@%$GTK_CFLAGS%g s%@GTK_LIBS@%$GTK_LIBS%g s%@ac_cv_c_inline@%$ac_cv_c_inline%g +s%@WRC@%$WRC%g s%@NO_SCHED_CFLAGS@%$NO_SCHED_CFLAGS%g -s%@STATFS_NO_ARGS@%$STATFS_NO_ARGS%g -s%@STATBUF_BAVAIL@%$STATBUF_BAVAIL%g s%@LIBRARIES@%$LIBRARIES%g s%@TARGET@%$TARGET%g s%@GFXOBJS@%$GFXOBJS%g +s%@RESOBJS@%$RESOBJS%g s%@ASMOBJS@%$ASMOBJS%g +s%@P2C@%$P2C%g s%@CPUOBJS@%$CPUOBJS%g s%@DEBUGOBJS@%$DEBUGOBJS%g s%@MATHLIB@%$MATHLIB%g @@ -5069,20 +6645,37 @@ if [ "x$DO_PROFILING" = "xyes" ]; then fi -tmp_save_dir=`pwd` -cd $srcdir -abssrcdir=`pwd` -cd $tmp_save_dir - - +if (test -e $abssrcdir/src/sounddep) || (test -e $abssrcdir/src/machdep) \ + || (test -e $abssrcdir/src/osdep) || (test -e $abssrcdir/src/threaddep) \ + || (test -e $abssrcdir/src/target.h) +then + echo + echo "Fatal error: Can't configure in the current directory, because" + echo "configure was run in the source directory. Go to the source" + echo "directory, type" + echo " make streifenfrei" + echo "and try again." + exit 1 +fi ln -s $abssrcdir/src/$MACHDEP src/machdep ln -s $abssrcdir/src/$OSDEP src/osdep ln -s $abssrcdir/src/$THREADDEP src/threaddep ln -s $abssrcdir/src/$SOUNDDEP src/sounddep ln -s $abssrcdir/src/targets/$TARGETDEP src/target.h +ln -s $abssrcdir/config.h src/config.h + + +ln -s $SD_SOUND src/sd-sound.c +ln -s $OD_JOYSTICK src/od-joy.c +ln -s $MD_SUPPORT src/md-support.c + +if [ "x$MACHDEP" = "xmd-i386-gcc" ]; then + ln -s machdep/X86.S src/md-X86.S +fi + echo echo