--- uae/configure 2018/04/24 16:38:19 1.1.1.1 +++ uae/configure 2018/04/24 16:51:06 1.1.1.12 @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.10 +# Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -13,6 +13,34 @@ ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help --with-x use the X Window System" +ac_help="$ac_help + --enable-profiling Build a profiling (SLOW!) version" +ac_help="$ac_help + --with-svgalib Use SVGAlib for graphics output" +ac_help="$ac_help + --with-ggi Use GGI for graphics output" +ac_help="$ac_help + --with-asciiart Use ncurses ascii art for graphics output" +ac_help="$ac_help + --enable-dga X11 version: Use the DGA extension" +ac_help="$ac_help + --enable-vidmode X11 version: Use the XF86VidMode extension" +ac_help="$ac_help + --enable-ui Use a user interface if possible (default on)" +ac_help="$ac_help + --with-elf Explicitly state that this system is ELF" +ac_help="$ac_help + --with-gtk-prefix=PFX Prefix where GTK is installed (optional)" +ac_help="$ac_help + --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)" +ac_help="$ac_help + --disable-gtktest Do not try to compile and run a test GTK program" +ac_help="$ac_help + --enable-threads Enable some generally useful thread support" +ac_help="$ac_help + --enable-file-sound Enable sound output to file" +ac_help="$ac_help + --enable-scsi-device Disable the uaescsi.device" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -51,6 +79,9 @@ mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 ac_prev= for ac_option @@ -332,7 +363,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.10" + echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) @@ -434,11 +465,14 @@ do done # NLS nuisances. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h @@ -447,7 +481,7 @@ echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=amiga/transdisk.c +ac_unique_file=amiga/source/transdisk.c # Find the source files, if location was not specified. if test -z "$srcdir"; then @@ -499,8 +533,11 @@ ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross +ac_exeext= +ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then @@ -515,17 +552,20 @@ fi + # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:560: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" @@ -546,15 +586,17 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:590: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - for ac_dir in $PATH; do + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then @@ -589,10 +631,92 @@ else echo "$ac_t""no" 1>&6 fi + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:641: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:673: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 684 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:715: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:720: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -601,7 +725,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -609,37 +733,51 @@ fi fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + if test $ac_cv_prog_gcc = yes; then GCC=yes - if test "${CFLAGS+set}" != set; then - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:748: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_gcc_g=yes + ac_cv_prog_cc_g=yes else - ac_cv_prog_gcc_g=no + ac_cv_prog_cc_g=no fi rm -f conftest* fi -echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 - if test $ac_cv_prog_gcc_g = yes; then - CFLAGS="-g -O" - else - CFLAGS="-O" - fi +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" fi else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:781: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -654,39 +792,62 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi rm -f conftest* fi rm -f conftest* +fi +rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" @@ -696,7 +857,8 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -set dummy ${MAKE-make}; ac_make=$2 +echo "configure:861: checking whether ${MAKE-make} sets \${MAKE}" >&5 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -721,10 +883,155 @@ else SET_MAKE="MAKE=${MAKE-make}" fi +# Extract the first word of "makedepend", so it can be a program name with args. +set dummy makedepend; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:890: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_MAKEDEPPRG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MAKEDEPPRG" in + /*) + ac_cv_path_MAKEDEPPRG="$MAKEDEPPRG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_MAKEDEPPRG="$MAKEDEPPRG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_MAKEDEPPRG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_MAKEDEPPRG" && ac_cv_path_MAKEDEPPRG="not-found" + ;; +esac +fi +MAKEDEPPRG="$ac_cv_path_MAKEDEPPRG" +if test -n "$MAKEDEPPRG"; then + echo "$ac_t""$MAKEDEPPRG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "file", so it can be a program name with args. +set dummy file; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:926: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_FILEPRG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$FILEPRG" in + /*) + ac_cv_path_FILEPRG="$FILEPRG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_FILEPRG="$FILEPRG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_FILEPRG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_FILEPRG" && ac_cv_path_FILEPRG="not-found" + ;; +esac +fi +FILEPRG="$ac_cv_path_FILEPRG" +if test -n "$FILEPRG"; then + echo "$ac_t""$FILEPRG" 1>&6 +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:962: 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. + ;; + ?:/*) + ac_cv_path_WRCPRG="$WRCPRG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; 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:998: 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. + ;; + ?:/*) + ac_cv_path_RCLPRG="$RCLPRG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; 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:1033: checking for AIX" >&5 cat > conftest.$ac_ext <&6 +echo "configure:1057: 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 @@ -766,27 +1074,153 @@ else fi -HAVE_BEBOX=n -echo $ac_n "checking for -lMedia_s""... $ac_c" 1>&6 -ac_lib_var=`echo Media_s'_'main | tr './+\055' '__p_'` +echo $ac_n "checking for Watcom C""... $ac_c" 1>&6 +echo "configure:1079: 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:1101: 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:1130: 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:1161: 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= +OPTIMIZE_CFLAGS= +WARNING_CFLAGS= +DEBUG_CFLAGS= +NO_SCHED_CFLAGS= + +HAVE_BEOS=no +HAVE_POS=no +echo $ac_n "checking for main in -lMedia_s""... $ac_c" 1>&6 +echo "configure:1204: 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 else ac_save_LIBS="$LIBS" LIBS="-lMedia_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 @@ -796,32 +1230,116 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - HAVE_MEDIA_LIB=y + HAVE_MEDIA_LIB=yes else echo "$ac_t""no" 1>&6 -HAVE_MEDIA_LIB=n +HAVE_MEDIA_LIB=no fi -echo $ac_n "checking for -lNeXT_s""... $ac_c" 1>&6 -ac_lib_var=`echo NeXT_s'_'main | tr './+\055' '__p_'` +echo $ac_n "checking for main in -lNeXT_s""... $ac_c" 1>&6 +echo "configure:1241: 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 else ac_save_LIBS="$LIBS" LIBS="-lNeXT_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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_NEXT_LIB=yes +else + echo "$ac_t""no" 1>&6 +HAVE_NEXT_LIB=no +fi + +echo $ac_n "checking for cos in -lmoto""... $ac_c" 1>&6 +echo "configure:1278: checking for cos in -lmoto" >&5 +ac_lib_var=`echo moto'_'cos | 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="-lmoto $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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_MOTO_LIB=yes +else + echo "$ac_t""no" 1>&6 +HAVE_MOTO_LIB=no +fi + +echo $ac_n "checking for OpenLibrary in -lamiga""... $ac_c" 1>&6 +echo "configure:1319: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lamiga $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 @@ -831,36 +1349,38 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - HAVE_NEXT_LIB=y + HAVE_AMIGA_LIB=yes else echo "$ac_t""no" 1>&6 -HAVE_NEXT_LIB=n +HAVE_AMIGA_LIB=n fi -echo $ac_n "checking for -lvga""... $ac_c" 1>&6 -ac_lib_var=`echo vga'_'vga_setmode | tr './+\055' '__p_'` +echo $ac_n "checking for vga_setmode in -lvga""... $ac_c" 1>&6 +echo "configure:1360: 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 else ac_save_LIBS="$LIBS" LIBS="-lvga $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 @@ -870,36 +1390,38 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - HAVE_SVGA_LIB=y + HAVE_SVGA_LIB=yes else echo "$ac_t""no" 1>&6 -HAVE_SVGA_LIB=n +HAVE_SVGA_LIB=no fi -echo $ac_n "checking for -lAF""... $ac_c" 1>&6 -ac_lib_var=`echo AF'_'AFOpenAudioConn | tr './+\055' '__p_'` +echo $ac_n "checking for AFOpenAudioConn in -lAF""... $ac_c" 1>&6 +echo "configure:1401: 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 else ac_save_LIBS="$LIBS" LIBS="-lAF $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 @@ -909,10 +1431,256 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - HAVE_AF_LIB=y + HAVE_AF_LIB=yes else echo "$ac_t""no" 1>&6 -HAVE_AF_LIB=n +HAVE_AF_LIB=no +fi + +echo $ac_n "checking for waveOutGetNumDevs in -lmme""... $ac_c" 1>&6 +echo "configure:1442: 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${ac_exeext}; 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:1483: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lncurses $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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_NCURSES_LIB=yes +else + echo "$ac_t""no" 1>&6 +HAVE_NCURSES_LIB=no +fi + +echo $ac_n "checking for sem_init in -lposix4""... $ac_c" 1>&6 +echo "configure:1524: 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="-lposix4 $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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_POSIX4_LIB=yes +else + echo "$ac_t""no" 1>&6 +HAVE_POSIX4_LIB=no +fi + +echo $ac_n "checking for sem_init in -lrt""... $ac_c" 1>&6 +echo "configure:1565: 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="-lrt $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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_RT_LIB=yes +else + echo "$ac_t""no" 1>&6 +HAVE_RT_LIB=no +fi + +echo $ac_n "checking for ggiInit in -lggi""... $ac_c" 1>&6 +echo "configure:1606: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lggi $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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_GGI_LIB=yes +else + echo "$ac_t""no" 1>&6 +HAVE_GGI_LIB=no +fi + +echo $ac_n "checking for alOpenPort in -laudio""... $ac_c" 1>&6 +echo "configure:1647: checking for alOpenPort in -laudio" >&5 +ac_lib_var=`echo audio'_'alOpenPort | 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="-laudio $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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_SGIAUDIO_LIB=yes +else + echo "$ac_t""no" 1>&6 +HAVE_SGIAUDIO_LIB=no fi @@ -921,6 +1689,7 @@ fi # 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:1693: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -960,7 +1729,9 @@ EOF ac_im_usrlibdir=$ac_im_libdir; break fi done - # Screen out bogus values from the imake configuration. + # Screen out bogus values from the imake configuration. They are + # bogus both because they are the default anyway, and because + # using them would break gcc on systems where it needs fixed includes. case "$ac_im_incroot" in /usr/include) ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; @@ -980,43 +1751,45 @@ 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:989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* # We can compile using X headers with no special include directory. ac_x_includes= else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* # Look for the header file in a standard set of common directories. +# Check X11 before X11Rn because it is often a symlink to the current release. for ac_dir in \ + /usr/X11/include \ /usr/X11R6/include \ /usr/X11R5/include \ /usr/X11R4/include \ \ + /usr/include/X11 \ /usr/include/X11R6 \ /usr/include/X11R5 \ /usr/include/X11R4 \ \ + /usr/local/X11/include \ /usr/local/X11R6/include \ /usr/local/X11R5/include \ /usr/local/X11R4/include \ \ + /usr/local/include/X11 \ /usr/local/include/X11R6 \ /usr/local/include/X11R5 \ /usr/local/include/X11R4 \ \ - /usr/X11/include \ - /usr/include/X11 \ - /usr/local/X11/include \ - /usr/local/include/X11 \ - \ /usr/X386/include \ /usr/x386/include \ /usr/XFree86/include/X11 \ @@ -1052,45 +1825,46 @@ 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; }; then +if { (eval echo configure:1836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. ac_x_libraries= else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* LIBS="$ac_save_LIBS" # First see if replacing the include by lib works. +# Check X11 before X11Rn because it is often a symlink to the current release. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ + /usr/X11/lib \ /usr/X11R6/lib \ /usr/X11R5/lib \ /usr/X11R4/lib \ \ + /usr/lib/X11 \ /usr/lib/X11R6 \ /usr/lib/X11R5 \ /usr/lib/X11R4 \ \ + /usr/local/X11/lib \ /usr/local/X11R6/lib \ /usr/local/X11R5/lib \ /usr/local/X11R4/lib \ \ + /usr/local/lib/X11 \ /usr/local/lib/X11R6 \ /usr/local/lib/X11R5 \ /usr/local/lib/X11R4 \ \ - /usr/X11/lib \ - /usr/lib/X11 \ - /usr/local/X11/lib \ - /usr/local/lib/X11 \ - \ /usr/X386/lib \ /usr/x386/lib \ /usr/XFree86/lib/X11 \ @@ -1101,6 +1875,7 @@ for ac_dir in `echo "$ac_x_includes" | s /usr/athena/lib \ /usr/local/x11r5/lib \ /usr/lpp/Xamples/lib \ + /lib/usr/lib/X11 \ \ /usr/openwin/lib \ /usr/openwin/share/lib \ @@ -1115,7 +1890,6 @@ do done fi rm -f conftest* - fi # $ac_x_libraries = NO if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then @@ -1146,74 +1920,81 @@ fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. - X_CFLAGS="$X_CFLAGS -DX_DISPLAY_MISSING" + cat >> confdefs.h <<\EOF +#define X_DISPLAY_MISSING 1 +EOF + + X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi - # It would be nice to have a more robust check for the -R ld option than - # just checking for Solaris. # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" - if test "`(uname) 2>/dev/null`" = SunOS && - uname -r | grep '^5' >/dev/null; then - X_LIBS="$X_LIBS -R $x_libraries" - fi - fi - - # Check for libraries that X11R6 Xt/Xaw programs need. - - ac_save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -L$x_libraries" - # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to - # check for ICE first), but we must link in the order -lSM -lICE or - # we get undefined symbols. So assume we have SM if we have ICE. - # These have to be linked with before -lX11, unlike the other - # libraries we check for below, so use a different variable. - # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. - echo $ac_n "checking for -lICE""... $ac_c" 1>&6 -ac_lib_var=`echo ICE'_'IceConnectionNumber | tr './+\055' '__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="-lICE $LIBS" -cat > conftest.$ac_ext </dev/null`" in + "SunOS 5"*) + echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 +echo "configure:1942: 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; }; then +if { (eval echo configure:1952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + ac_R_nospace=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + ac_R_nospace=no fi rm -f conftest* -LIBS="$ac_save_LIBS" + if test $ac_R_nospace = yes; then + echo "$ac_t""no" 1>&6 + X_LIBS="$X_LIBS -R$x_libraries" + else + LIBS="$ac_xsave_LIBS -R $x_libraries" + cat > conftest.$ac_ext <&6 - X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" +int main() { + +; return 0; } +EOF +if { (eval echo configure:1975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_R_space=yes else - echo "$ac_t""no" 1>&6 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_R_space=no fi - - LDFLAGS="$ac_save_LDFLAGS" +rm -f conftest* + if test $ac_R_space = yes; then + echo "$ac_t""yes" 1>&6 + X_LIBS="$X_LIBS -R $x_libraries" + else + echo "$ac_t""neither works" 1>&6 + fi + fi + LIBS="$ac_xsave_LIBS" + esac + fi # Check for system-dependent libraries X programs must link with. + # Do this before checking for the system-independent R6 libraries + # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" @@ -1221,30 +2002,32 @@ fi # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X # 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 -ldnet""... $ac_c" 1>&6 -ac_lib_var=`echo dnet'_'dnet_ntoa | tr './+\055' '__p_'` + echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 +echo "configure:2007: 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 else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 @@ -1260,30 +2043,32 @@ else fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then - echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6 -ac_lib_var=`echo dnet_stub'_'dnet_ntoa | tr './+\055' '__p_'` + echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 +echo "configure:2048: 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 else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 @@ -1302,32 +2087,85 @@ fi # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. - # Not sure which flavor of 386 UNIX this is, but it seems harmless to - # check for it. - echo $ac_n "checking for -lnsl""... $ac_c" 1>&6 -ac_lib_var=`echo nsl'_'t_accept | tr './+\055' '__p_'` + # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) + # needs -lnsl. + # 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:2096: 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 < +/* 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 gethostbyname(); + +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_gethostbyname) || defined (__stub___gethostbyname) +choke me +#else +gethostbyname(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_gethostbyname=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_gethostbyname=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_func_gethostbyname = no; then + echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 +echo "configure:2145: 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 else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 @@ -1342,35 +2180,90 @@ else echo "$ac_t""no" 1>&6 fi + fi # lieder@skyler.mavd.honeywell.com says without -lsocket, - # socket/setsockopt and other routines are undefined under SCO ODT 2.0. - # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch. - if test "`(uname) 2>/dev/null`" != IRIX; then - echo $ac_n "checking for -lsocket""... $ac_c" 1>&6 -ac_lib_var=`echo socket'_'socket | tr './+\055' '__p_'` + # socket/setsockopt and other routines are undefined under SCO ODT + # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary + # on later versions), says simon@lia.di.epfl.ch: it contains + # gethostby* variants that don't use the nameserver (or something). + # -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:2194: 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 < +/* 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 connect(); + +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_connect) || defined (__stub___connect) +choke me +#else +connect(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_connect=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_connect=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_func_connect = no; then + echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 +echo "configure:2243: 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 else ac_save_LIBS="$LIBS" -LIBS="-lsocket $LIBS" +LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 @@ -1380,13 +2273,249 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket" + X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" +else + echo "$ac_t""no" 1>&6 +fi + + 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:2286: 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 < +/* 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 remove(); + +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_remove) || defined (__stub___remove) +choke me +#else +remove(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_remove=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_remove=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_func_remove = no; then + echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 +echo "configure:2335: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lposix $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" +else + echo "$ac_t""no" 1>&6 +fi + + fi + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + echo $ac_n "checking for shmat""... $ac_c" 1>&6 +echo "configure:2378: 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 < +/* 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 shmat(); + +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_shmat) || defined (__stub___shmat) +choke me +#else +shmat(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_shmat=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_shmat=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_func_shmat = no; then + echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 +echo "configure:2427: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lipc $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" else echo "$ac_t""no" 1>&6 fi fi fi + + # Check for libraries that X11R6 Xt/Xaw programs need. + ac_save_LDFLAGS="$LDFLAGS" + test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" + # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to + # check for ICE first), but we must link in the order -lSM -lICE or + # we get undefined symbols. So assume we have SM if we have ICE. + # These have to be linked with before -lX11, unlike the other + # 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:2479: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lICE $X_EXTRA_LIBS $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" +else + echo "$ac_t""no" 1>&6 +fi + + LDFLAGS="$ac_save_LDFLAGS" + fi @@ -1394,34 +2523,35 @@ fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do -ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 +echo "configure:2529: 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> -int main() { return 0; } -int t() { +int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=no" fi rm -f conftest* - fi if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'` + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 -ac_lib_var=`echo dir'_'opendir | tr './+\055' '__p_'` +echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 +echo "configure:2567: 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 else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 @@ -1471,30 +2603,32 @@ else fi else -echo $ac_n "checking for -lx""... $ac_c" 1>&6 -ac_lib_var=`echo x'_'opendir | tr './+\055' '__p_'` +echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 +echo "configure:2608: 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 else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 @@ -1511,38 +2645,13 @@ fi fi -# If we cannot run a trivial program, we must be cross compiling. -echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_c_cross=yes -else -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_c_cross=no -else - ac_cv_c_cross=yes -fi -fi -rm -fr conftest* -fi - -echo "$ac_t""$ac_cv_c_cross" 1>&6 -cross_compiling=$ac_cv_c_cross - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:2650: 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 @@ -1550,13 +2659,15 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:2663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_stdc=no fi @@ -1565,7 +2676,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 @@ -1583,7 +2694,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 @@ -1603,8 +2714,8 @@ if test $ac_cv_header_stdc = yes; then if test "$cross_compiling" = yes; then : else -cat > conftest.$ac_ext < conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1615,15 +2726,19 @@ if (XOR (islower (i), ISLOWER (i)) || to exit (0); } EOF -{ (eval echo configure:1619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then +if { (eval echo configure:2730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then : else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* ac_cv_header_stdc=no fi -fi rm -fr conftest* fi + +fi fi echo "$ac_t""$ac_cv_header_stdc" 1>&6 @@ -1634,26 +2749,30 @@ EOF fi -for ac_hdr in unistd.h fcntl.h sys/time.h sys/types.h utime.h string.h strings.h values.h + +for ac_hdr in unistd.h fcntl.h sys/time.h sys/types.h utime.h string.h strings.h values.h ncurses.h curses.h do -ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2758: 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:1651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:2768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 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 @@ -1661,7 +2780,7 @@ 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 | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 +echo "configure:2798: 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:1688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:2808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 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 @@ -1698,7 +2820,7 @@ 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 | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 +echo "configure:2838: 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:2848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +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 -if [ $ac_cv_header_linux_joystick_h = "yes" ]; then - echo $ac_n "checking whether linux/joystick.h is broken""... $ac_c" 1>&6 - if grep "#include" /usr/include/linux/joystick.h >/dev/null; then - echo "$ac_t""yes" 1>&6 - BROKEN_JOYSTICK_H=1 - grep -v "#include" /usr/include/linux/joystick.h >include/joystick.h - else - echo "$ac_t""no" 1>&6 - BROKEN_JOYSTICK_H=0 - fi +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:2878: 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:2888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +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 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:2918: 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:2928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +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 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:2958: 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:2968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +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 + +ac_safe=`echo "be_math.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for be_math.h""... $ac_c" 1>&6 +echo "configure:2996: 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:3006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +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 + HAVE_BEOS=yes +else + echo "$ac_t""no" 1>&6 +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:3032: 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:3042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +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:3072: 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:3082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +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 dmedia/audio.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3112: 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:3122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +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:3152: 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:3162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +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:3190: 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 if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_sizeof_char=1 else -cat > conftest.$ac_ext < conftest.$ac_ext < main() @@ -1740,15 +3205,19 @@ main() exit(0); } EOF -{ (eval echo configure:1744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then +if { (eval echo configure:3209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then ac_cv_sizeof_char=`cat conftestval` else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* ac_cv_sizeof_char=0 fi -fi rm -fr conftest* fi + +fi echo "$ac_t""$ac_cv_sizeof_char" 1>&6 cat >> confdefs.h <&6 +echo "configure:3229: 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 if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_sizeof_short=2 else -cat > conftest.$ac_ext < conftest.$ac_ext < main() @@ -1774,15 +3244,19 @@ main() exit(0); } EOF -{ (eval echo configure:1778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then +if { (eval echo configure:3248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then ac_cv_sizeof_short=`cat conftestval` else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* ac_cv_sizeof_short=0 fi -fi rm -fr conftest* fi + +fi echo "$ac_t""$ac_cv_sizeof_short" 1>&6 cat >> confdefs.h <&6 +echo "configure:3268: 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 if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_sizeof_int=4 else -cat > conftest.$ac_ext < conftest.$ac_ext < main() @@ -1808,15 +3283,19 @@ main() exit(0); } EOF -{ (eval echo configure:1812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then +if { (eval echo configure:3287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then ac_cv_sizeof_int=`cat conftestval` else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* ac_cv_sizeof_int=0 fi -fi rm -fr conftest* fi + +fi echo "$ac_t""$ac_cv_sizeof_int" 1>&6 cat >> confdefs.h <&6 +echo "configure:3307: 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 if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_sizeof_long=4 else -cat > conftest.$ac_ext < conftest.$ac_ext < main() @@ -1842,15 +3322,19 @@ main() exit(0); } EOF -{ (eval echo configure:1846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then +if { (eval echo configure:3326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then ac_cv_sizeof_long=`cat conftestval` else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* ac_cv_sizeof_long=0 fi -fi rm -fr conftest* fi + +fi echo "$ac_t""$ac_cv_sizeof_long" 1>&6 cat >> confdefs.h <&6 +echo "configure:3346: 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 if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_sizeof_long_long=8 else -cat > conftest.$ac_ext < conftest.$ac_ext < main() @@ -1876,32 +3361,75 @@ main() exit(0); } EOF -{ (eval echo configure:1880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then +if { (eval echo configure:3365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then ac_cv_sizeof_long_long=`cat conftestval` else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* ac_cv_sizeof_long_long=0 fi -fi rm -fr conftest* fi + +fi echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 cat >> confdefs.h <&6 +echo "configure:3385: 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:3404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./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:3425: 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:3479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_c_const=no fi rm -f conftest* - fi echo "$ac_t""$ac_cv_c_const" 1>&6 @@ -1967,26 +3496,28 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 +echo "configure:3500: 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:3514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 fi rm -f conftest* - done fi @@ -2004,20 +3535,25 @@ EOF ;; esac +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:3543: 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 #include +#include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "mode_t" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_mode_t=yes else @@ -2036,19 +3572,21 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 +echo "configure:3576: 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 #include +#include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "off_t" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_off_t=yes else @@ -2067,19 +3605,21 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 +echo "configure:3609: 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 #include +#include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "pid_t" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_pid_t=yes else @@ -2098,28 +3638,29 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 +echo "configure:3642: 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 -int main() { return 0; } -int t() { +int main() { struct stat s; s.st_blocks; ; return 0; } EOF -if { (eval echo configure:2115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blocks=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_struct_st_blocks=no fi rm -f conftest* - fi echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6 @@ -2129,33 +3670,34 @@ if test $ac_cv_struct_st_blocks = yes; t EOF else - LIBOBJS="$LIBOBJS fileblocks.o" + LIBOBJS="$LIBOBJS fileblocks.${ac_objext}" fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +echo "configure:3678: 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 #include -int main() { return 0; } -int t() { +int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_time=no fi rm -f conftest* - fi echo "$ac_t""$ac_cv_header_time" 1>&6 @@ -2167,28 +3709,29 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 +echo "configure:3713: 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 -int main() { return 0; } -int t() { +int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:2184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_struct_tm=sys/time.h fi rm -f conftest* - fi echo "$ac_t""$ac_cv_struct_tm" 1>&6 @@ -2202,12 +3745,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:3749: 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 @@ -2225,7 +3769,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -2247,14 +3791,15 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func_memcmp'+set}'`\" = set"; then +echo "configure:3795: 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 if test "$cross_compiling" = yes; then - ac_cv_func_memcmp=no + ac_cv_func_memcmp_clean=no else -cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_func_memcmp=yes +if { (eval echo configure:3813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_func_memcmp_clean=yes else - ac_cv_func_memcmp=no -fi + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_memcmp_clean=no fi rm -fr conftest* fi -echo "$ac_t""$ac_cv_func_memcmp" 1>&6 -test $ac_cv_func_memcmp = no && LIBOBJS="$LIBOBJS memcmp.o" +fi + +echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 +test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 +echo "configure:3831: 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 @@ -2295,20 +3845,20 @@ extern "C" void (*signal (int, void (*)( void (*signal ()) (); #endif -int main() { return 0; } -int t() { +int main() { int i; ; return 0; } EOF -if { (eval echo configure:2304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_type_signal=int fi rm -f conftest* - fi echo "$ac_t""$ac_cv_type_signal" 1>&6 @@ -2318,6 +3868,7 @@ EOF echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6 +echo "configure:3872: 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 @@ -2326,8 +3877,8 @@ else if test "$cross_compiling" = yes; then ac_cv_func_utime_null=no else -cat > conftest.$ac_ext < conftest.$ac_ext < #include @@ -2338,14 +3889,18 @@ exit(!(stat ("conftestdata", &s) == 0 && && t.st_mtime - s.st_mtime < 120)); } EOF -{ (eval echo configure:2342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then +if { (eval echo configure:3893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then ac_cv_func_utime_null=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* ac_cv_func_utime_null=no fi -fi rm -fr conftest* +fi + rm -f core core.* *.core fi @@ -2357,14 +3912,15 @@ EOF fi -for ac_func in gettimeofday 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:3919: 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; }; then +if { (eval echo configure:3947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 + +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:3974: 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:4002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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'` @@ -2411,183 +4023,2583 @@ fi done -echo $ac_n "checking how many args statfs takes""... $ac_c" 1>&6 -if [ $ac_cv_func_statfs = "yes" ]; 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:4039: 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:4049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +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:4081: 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 < +/* 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_VFS_H -#include + +; return 0; } +EOF +if { (eval echo configure:4109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:4141: 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${ac_exeext}; 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:4179: 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${ac_exeext}; 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:4217: 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${ac_exeext}; 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:4261: 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_PARAM_H -#include + +; return 0; } +EOF +if { (eval echo configure:4289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:4324: 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:4368: 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:4390: 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:4430: 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:4446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:4471: 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:4481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +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:4509: 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:4522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +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:4550: 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:4591: 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:4603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +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:4631: 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:4641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +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:4673: 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:4685: 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() { return 0; } -int t() { -struct statfs statbuf;statfs("/",&statbuf); +int main() { +struct statvfs fsd; statvfs (0, &fsd); ; return 0; } EOF -if { (eval echo configure:2442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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_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 -echo $ac_n "checking whether to use f_bavail or f_bfree""... $ac_c" 1>&6 -if [ $ac_cv_func_statfs = "yes" ]; then +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:4723: 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 +#include +main () +{ +struct statfs fsd; +fsd.f_fsize = 0; +exit (statfs (".", &fsd, sizeof (struct statfs))); +} +EOF +if { (eval echo configure:4744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./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:4771: 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_VFS_H #include #endif +main () +{ +struct statfs fsd; +fsd.f_bsize = 0; +exit (statfs (".", &fsd)); +} +EOF +if { (eval echo configure:4798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./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:4825: 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:4843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./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:4870: 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_STATFS_H -#include +#ifdef HAVE_SYS_MOUNT_H +#include #endif -#ifdef HAVE_SYS_STATVFS_H -#include +main () +{ +struct statfs fsd; +fsd.f_fsize = 0; +exit (statfs (".", &fsd)); +} +EOF +if { (eval echo configure:4894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./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:4921: 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 -int main() { return 0; } -int t() { -struct statfs statbuf;statbuf.f_bavail; +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:4949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./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:4981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +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:5006: 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:2482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - echo "$ac_t""f_bavail" 1>&6 -STATBUF_BAVAIL=f_bavail + eval "ac_cv_func_$ac_func=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 + 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 -echo $ac_n "checking which target to use""... $ac_c" 1>&6 -if [ $HAVE_BEBOX = "y" ]; then - echo "$ac_t""BeBox" 1>&6 - TARGET=be - GFXOBJS="bebox.o nogui.o" - ac_cv_c_inline= + +if test "$ftruncate_missing" = yes; then +echo $ac_n "checking fcntl emulation of ftruncate""... $ac_c" 1>&6 +echo "configure:5062: 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 - if [ $HAVE_NEXT_LIB = "y" ]; then - echo "$ac_t""NeXTStep" 1>&6 - TARGET=next - GFXOBJS="NeXTwin.o" - LIBRARIES="-sectcreate __ICON __header Uae.app/Uae.iconheader -segprot __ICON r r -sectcreate __ICON app Uae.app/Uae.tiff -lMedia_s -lNeXT_s" - else - if [ x$no_x = "xyes" ]; then - if [ $HAVE_SVGA_LIB = "n" ]; then - echo "$ac_t""Ummm...." 1>&6 - echo "Neither X nor SVGAlib found, don't know what target to use." - exit 1 - else - echo "$ac_t""SVGAlib" 1>&6 - TARGET=svgalib - GFXOBJS="svga.o nogui.o" - LIBRARIES=-lvga - fi + cat > conftest.$ac_ext < +#include +int main() { + +#if !defined(F_CHSIZE) && !defined(F_FREESP) +chsize(); +#endif + +; return 0; } +EOF +if { (eval echo configure:5080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:5108: 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 t; long c = *(t.f_spare); +; return 0; } +EOF +if { (eval echo configure:5125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + fu_cv_sys_truncating_statfs=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + 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:5146: 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:5158: 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 + + +if [ "x$HAVE_NCURSES_LIB" = "xyes" ]; then + if [ "x$ac_cv_header_ncurses_h" = "xno" -a "x$ac_cv_header_curses_h" = "xno" ]; then + echo "Installation problem, found libncurses but neither curses.h nor ncurses.h!" + HAVE_NCURSES_LIB=no + NR_ERRORS=`expr $NR_ERRORS + 1` + 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:5188: 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:5197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + ADDITIONAL_CFLAGS="$ADDITIONAL_CFLAGS -DDONT_HAVE_ATTR_T" + echo "$ac_t""no" 1>&6 + NR_WARNINGS=`expr $NR_WARNINGS + 1` + echo "Please install a newer version of libncurses if you can." + +fi +rm -f conftest* else - echo "$ac_t""X Window System" 1>&6 - TARGET=x11 - LIBRARIES="$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS" - # Extract the first word of "wish4.0", so it can be a program name with args. -set dummy wish4.0; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_TCLGUI'+set}'`\" = set"; then + echo $ac_n "checking for attr_t in ncurses.h""... $ac_c" 1>&6 +echo "configure:5214: 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:5223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + ADDITIONAL_CFLAGS="$ADDITIONAL_CFLAGS -DDONT_HAVE_ATTR_T" + echo "$ac_t""no" 1>&6 + NR_WARNINGS=`expr $NR_WARNINGS + 1` + echo "Please install a newer version of libncurses if you can." + +fi +rm -f conftest* + fi + fi +fi + + +echo $ac_n "checking for pthread library""... $ac_c" 1>&6 +echo "configure:5244: checking for pthread library" >&5 +TMP_SAVE_CFLAGS=$CFLAGS +TMP_SAVE_LIBS=$LIBS +LIBS="$LIBS -lpthread" +cat > conftest.$ac_ext < +#endif +#include +int main() { + +pthread_exit (0); + +; return 0; } +EOF +if { (eval echo configure:5263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:5279: 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:5301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 +WANT_ASCIIART=dunno +WANT_UI=dunno +WANT_NCURSES_UI=no +WANT_DGA=no +WANT_VIDMODE=no +SYSTEM_IS_ELF=dunno + +# Check whether --enable-profiling or --disable-profiling was given. +if test "${enable_profiling+set}" = set; then + enableval="$enable_profiling" + DO_PROFILING=$enableval +fi + +# Check whether --with-svgalib or --without-svgalib was given. +if test "${with_svgalib+set}" = set; then + withval="$with_svgalib" + WANT_SVGALIB=$withval +fi + +# Check whether --with-ggi or --without-ggi was given. +if test "${with_ggi+set}" = set; then + withval="$with_ggi" + WANT_GGI=$withval +fi + +# Check whether --with-asciiart or --without-asciiart was given. +if test "${with_asciiart+set}" = set; then + withval="$with_asciiart" + WANT_ASCIIART=$withval +fi + +# Check whether --enable-dga or --disable-dga was given. +if test "${enable_dga+set}" = set; then + enableval="$enable_dga" + WANT_DGA=$enableval +fi + +# Check whether --enable-vidmode or --disable-vidmode was given. +if test "${enable_vidmode+set}" = set; then + enableval="$enable_vidmode" + WANT_VIDMODE=$enableval +fi + +# Check whether --enable-ui or --disable-ui was given. +if test "${enable_ui+set}" = set; then + enableval="$enable_ui" + WANT_UI=$enableval +fi + +# Check whether --with-elf or --without-elf was given. +if test "${with_elf+set}" = set; then + withval="$with_elf" + SYSTEM_IS_ELF=$withval +fi + + + +if [ "x$WANT_DGA" = "xyes" ]; then + if [ "x$WANT_SVGALIB" = "xyes" -o "x$WANT_GGI" = "xyes" -o "x$WANT_ASCIIART" = "xyes" ]; then + echo "You can't enable DGA for SVGAlib, GGI and ncurses targets!" + NR_ERRORS=`expr $NR_ERRORS + 1` + WANT_DGA=no + fi +fi + +if [ "x$WANT_DGA" = "xyes" -a "x$no_x" = "xyes" ]; then + echo "Ignoring --enable-dga, since X was disabled or not found." + NR_ERRORS=`expr $NR_ERRORS + 1` + WANT_DGA=no +fi + +if [ "x$WANT_DGA" = "xno" -a "x$WANT_VIDMODE" = "xyes" ]; then + echo "The XF86VidMode extension can only be used in DGA mode. Disabling it." + NR_ERRORS=`expr $NR_ERRORS + 1` + WANT_VIDMODE=no +fi + + +if [ "x$WANT_SVGALIB" = "xyes" ]; then + if [ "x$HAVE_SVGA_LIB" = "xno" ]; then + echo "Could not find libsvga, disabling svgalib support." + NR_ERRORS=`expr $NR_ERRORS + 1` + WANT_SVGALIB=no + else + no_x=yes + fi +fi + +if [ "x$WANT_GGI" = "xyes" ]; then + if [ "x$HAVE_GGI_LIB" = "xno" ]; then + echo "Could not find libggi, disabling GGI support." + NR_ERRORS=`expr $NR_ERRORS + 1` + WANT_GGI=no + else if [ "x$WANT_SVGALIB" = "xyes" ]; then + echo "You can't configure for both SVGAlib and GGI. Disabling GGI." + NR_ERRORS=`expr $NR_ERRORS + 1` + WANT_GGI=no + else + no_x=yes + fi + fi +fi + +if [ "x$WANT_ASCIIART" = "xyes" ]; then + if [ "x$HAVE_NCURSES_LIB" = "xno" ]; then + echo "Could not find libncurses, disabling ascii art support." + NR_ERRORS=`expr $NR_ERRORS + 1` + WANT_ASCIIART=no + else if [ "x$WANT_SVGALIB" = "xyes" -o "x$WANT_GGI" = "xyes" ]; then + echo "You can't configure for both ncurses and another target. Disabling ncurses." + NR_ERRORS=`expr $NR_ERRORS + 1` + WANT_ASCIIART=no + else + no_x=yes + fi + fi +fi + + +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:5442: 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 else - if test -n "$TCLGUI"; then - ac_cv_prog_TCLGUI="$TCLGUI" # Let the user override the test. + 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${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + 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_DGA=yes +else + echo "$ac_t""no" 1>&6 +HAVE_DGA=no +fi + + LIBS=$TMP_SAVE_LIBS + if [ "x$HAVE_DGA" = "xno" ]; then + echo "Could not find DGA extension, ignoring --enable-dga." + NR_ERRORS=`expr $NR_ERRORS + 1` + WANT_DGA=no + fi +fi + +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:5494: 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 +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${ac_exeext}; 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_VIDMODE=yes +else + echo "$ac_t""no" 1>&6 +HAVE_VIDMODE=no +fi + + LIBS=$TMP_SAVE_LIBS + if [ "x$HAVE_VIDMODE" = "xno" ]; then + echo "Could not find VidMode extension, ignoring --enable-vidmode." + NR_ERRORS=`expr $NR_ERRORS + 1` + WANT_VIDMODE=no + fi +fi + +# Check whether --with-gtk-prefix or --without-gtk-prefix was given. +if test "${with_gtk_prefix+set}" = set; then + withval="$with_gtk_prefix" + gtk_config_prefix="$withval" +else + gtk_config_prefix="" +fi + +# Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given. +if test "${with_gtk_exec_prefix+set}" = set; then + withval="$with_gtk_exec_prefix" + gtk_config_exec_prefix="$withval" +else + gtk_config_exec_prefix="" +fi + +# Check whether --enable-gtktest or --disable-gtktest was given. +if test "${enable_gtktest+set}" = set; then + enableval="$enable_gtktest" + : +else + enable_gtktest=yes +fi + + + if test x$gtk_config_exec_prefix != x ; then + gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config + fi + fi + if test x$gtk_config_prefix != x ; then + gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_prefix/bin/gtk-config + fi + 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:5583: 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 + case "$GTK_CONFIG" in + /*) + ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_prog_TCLGUI="yes" + ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" - test -z "$ac_cv_prog_TCLGUI" && ac_cv_prog_TCLGUI="no" -fi + test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no" + ;; +esac fi -TCLGUI="$ac_cv_prog_TCLGUI" -if test -n "$TCLGUI"; then - echo "$ac_t""$TCLGUI" 1>&6 +GTK_CONFIG="$ac_cv_path_GTK_CONFIG" +if test -n "$GTK_CONFIG"; then + echo "$ac_t""$GTK_CONFIG" 1>&6 else echo "$ac_t""no" 1>&6 fi - if [ $TCLGUI = "yes" ]; then - GFXOBJS="xwin.o xui.o" + min_gtk_version=0.99.7 + echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 +echo "configure:5618: checking for GTK - version >= $min_gtk_version" >&5 + no_gtk="" + if test "$GTK_CONFIG" = "no" ; then + no_gtk=yes + else + GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` + GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` + gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + if test "x$enable_gtktest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + rm -f conf.gtktest + if test "$cross_compiling" = yes; then + echo $ac_n "cross compiling; assumed OK... $ac_c" +else + cat > conftest.$ac_ext < +#include + +int +main () +{ + int major, minor, micro; + + system ("touch conf.gtktest"); + + if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gtk_version"); + exit(1); + } + + if ((gtk_major_version != $gtk_config_major_version) || + (gtk_minor_version != $gtk_config_minor_version) || + (gtk_micro_version != $gtk_config_micro_version)) + { + printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf ("*** was found! If gtk-config was correct, then it is best\n"); + printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); + printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); + printf("*** before re-running configure\n"); + } + else + { + if ((gtk_major_version > major) || + ((gtk_major_version == major) && (gtk_minor_version > minor)) || + ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); + printf("*** correct copy of gtk-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; +} + +EOF +if { (eval echo configure:5704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + no_gtk=yes +fi +rm -fr conftest* +fi + + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gtk" = x ; then + echo "$ac_t""yes" 1>&6 + : + else + echo "$ac_t""no" 1>&6 + if test "$GTK_CONFIG" = "no" ; then + echo "*** The gtk-config script installed by GTK could not be found" + echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the GTK_CONFIG environment variable to the" + echo "*** full path to gtk-config." + else + if test -f conf.gtktest ; then + : + else + echo "*** Could not run GTK test program, checking why..." + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + cat > conftest.$ac_ext < +#include + +int main() { + return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); +; return 0; } +EOF +if { (eval echo configure:5748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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" + echo "*** version of GTK. If it is not finding GTK, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" + echo "***" + echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" + echo "*** came with the system with the command" + echo "***" + echo "*** rpm --erase --nodeps gtk gtk-devel" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GTK was incorrectly installed" + echo "*** or that you have moved GTK since it was installed. In the latter case, you" + echo "*** may want to edit the gtk-config script: $GTK_CONFIG" +fi +rm -f conftest* + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GTK_CFLAGS="" + GTK_LIBS="" + : + fi + + + rm -f conf.gtktest + + + +SHM_SUPPORT_LINKS=0 +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:5791: 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 < +#endif +#include +#include +#include +#include +#include +#include +#include +int main() { + +static XShmSegmentInfo shminfo; +static Display *display; +XShmAttach(display, &shminfo); +XSync(display,0); +shmctl(shminfo.shmid, IPC_RMID, 0); + +; return 0; } +EOF +if { (eval echo configure:5821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + SHM_SUPPORT_LINKS=1 +echo "$ac_t""yes" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + SHM_SUPPORT_LINKS=0 +echo "$ac_t""no" 1>&6 +fi +rm -f conftest* + CFLAGS=$TMP_SAVE_CFLAGS + LIBS=$TMP_SAVE_LIBS +fi + +MATHLIB=-lm +DEBUGOBJS="debug.o" + +echo $ac_n "checking which target to use""... $ac_c" 1>&6 +echo "configure:5841: checking which target to use" >&5 + +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 + TARGETDEP=t-beos.h + GFXOBJS=osdep/beos.o + GUIOBJS= + OPTIMIZE_CFLAGS=-O7 +else if [ "x$HAVE_POS" = "xyes" ]; then + echo "$ac_t""p.OS" 1>&6 + TARGET=p_os + TARGETDEP=t-pos.h + GFXOBJS="osdep/pos-win.o osdep/pos-disk.o osdep/pos-rexx.o" + GUIOBJS="osdep/pos-gui.o" +else if [ "x$HAVE_AMIGA_LIB" = "xyes" ]; then + echo "$ac_t""AmigaOS" 1>&6 + TARGET=amigaos + TARGETDEP=t-amiga.h + GFXOBJS="osdep/ami-win.o osdep/ami-disk.o osdep/ami-rexx.o osdep/ami-appw.o" + GUIOBJS="osdep/ami-gui.o" +else if [ "x$HAVE_NEXT_LIB" = "xyes" ]; then + echo "$ac_t""NeXTStep" 1>&6 + MATHLIB= + TARGET=next + GFXOBJS="NeXTwin.o" + GUIOBJS= + TARGETDEP=t-next.h + LIBRARIES="-sectcreate __ICON __header ../Uae.app/Uae.iconheader -segprot __ICON r r -sectcreate __ICON app ../Uae.app/Uae.tiff -lMedia_s -lNeXT_s" +else + + if [ "x$no_x" = "xyes" ]; then + if [ "x$WANT_SVGALIB" != "xyes" -a "x$WANT_GGI" != "xyes" -a "x$WANT_ASCIIART" != "xyes" ]; then + if [ "x$WANT_SVGALIB" != "xno" -a "x$HAVE_SVGA_LIB" = "xyes" ]; then + WANT_SVGALIB=yes + else if [ "x$WANT_GGI" != "xno" -a "x$HAVE_GGI_LIB" = "xyes" ]; then + WANT_GGI=yes + else if [ "x$WANT_ASCIIART" != "xno" -a "x$HAVE_NCURSES_LIB" = "xyes" ]; then + WANT_ASCIIART=yes + fi + fi + fi + fi + fi + + if [ "x$WANT_GGI" = "xyes" ]; then + echo "$ac_t""GGI" 1>&6 + TARGET=ggilib + TARGETDEP=t-ggi.h + WANT_NCURSES_UI=yes + GFXOBJS=ggi.o + LIBRARIES="-ldl -lggi" + LDFLAGS="-rdynamic $LDFLAGS" + else if [ "x$WANT_SVGALIB" = "xyes" ]; then + echo "$ac_t""SVGAlib" 1>&6 + TARGET=svgalib + TARGETDEP=t-svgalib.h + GFXOBJS=svga.o + LIBRARIES="-lvga" + WANT_NCURSES_UI=yes + else if [ "x$WANT_ASCIIART" = "xyes" ]; then + echo "$ac_t""ncurses ASCII art" 1>&6 + TARGET=asciiart + TARGETDEP=t-ascii.h + GFXOBJS="ncurses.o" + GUIOBJS="tui.o svgancui.o" + LIBRARIES="-lncurses" + else if [ "x$no_x" = "xyes" ]; then + echo "$ac_t""Ummm...." 1>&6 + echo "Fatal error: No graphics system found, don't know what target to use." + exit 1 + else + echo "$ac_t""X11" 1>&6 + TARGET=x11 + TARGETDEP=t-x11.h + GFXOBJS=xwin.o + GUIOBJS=nogui.o + + LIBRARIES="$X_LIBS $X_PRE_LIBS" + if [ "x$WANT_DGA" = "xyes" ]; then + LIBRARIES="$LIBRARIES -lXxf86dga" + X_CFLAGS="$X_CFLAGS -DUSE_DGA_EXTENSION" + if [ "x$WANT_VIDMODE" = "xyes" ]; then + LIBRARIES="$LIBRARIES -lXxf86vm" + X_CFLAGS="$X_CFLAGS -DUSE_VIDMODE_EXTENSION" + fi + fi + LIBRARIES="$LIBRARIES -lXext -lX11 $X_EXTRA_LIBS" + + if [ "x$WANT_UI" != "xno" ]; then + if [ "x$no_gtk" = "xyes" ]; then + echo "Did not find gtk+, disabling user interface" + GTK_CFLAGS= + GTK_LIBS= + if [ "x$WANT_UI" = "xyes" ]; then + NR_ERRORS=`expr $NR_ERRORS + 1` + fi else - GFXOBJS="xwin.o nogui.o" + echo "Using gtk+ GUI." + NEED_THREAD_SUPPORT=yes + ADDITIONAL_CFLAGS="$ADDITIONAL_CFLAGS -DUSING_GTK_GUI" + GUIOBJS=gtkui.o fi fi fi + fi + fi + fi +fi +fi +fi +fi +fi + +if [ "x$WANT_NCURSES_UI" = "xyes" ]; then + if [ "x$HAVE_NCURSES_LIB" = "xno" ]; then + if [ "x$WANT_UI" = "xyes" ]; then + echo "ncurses is unavailable, can't provide a user interface" + NR_ERRORS=`expr $NR_ERRORS + 1` + fi + WANT_UI=no + fi + if [ "x$WANT_UI" != "xno" ]; then + GUIOBJS="tui.o svgancui.o" + LIBRARIES="$LIBRARIES -lncurses" + ADDITIONAL_CFLAGS="$ADDITIONAL_CFLAGS -DUSING_CURSES_UI" + if [ "x$ac_cv_header_ncurses_h" = "xno" ]; then + echo "Found libncurses, but no ncurses.h. This is normal with recent versions" + echo "of ncurses, but it might indicate a problem with older versions." + NR_WARNINGS=`expr $NR_WARNINGS + 1` + fi + else + GUIOBJS=nogui.o + fi fi + +GFXOBJS="$GFXOBJS $GUIOBJS" + + +MACHDEP=md-generic +OSDEP=od-generic +THREADDEP=td-none +SOUNDDEP=od-generic + +FPP_H=fpp-unknown.h +USE_THREADS=no +USE_FILE_SOUND=no +USE_SCSI_DEVICE=no + +USE_UNDERSCORE=dunno + +HAVELINUX=no +HAVEBSD=no +HAVEGCC27=no +HAVEGAS=no +HAVEI386=no +HAVE68K=no +HAVEPPC=no +HAVEGLIBC2=no ASMOBJS= +CPUOBJS=cpuemu.o -if [ "$CC" = "gcc" ]; then - CFLAGS="-O3 -fomit-frame-pointer -Wall -Wno-unused -Wno-format -W -Wmissing-prototypes -Wstrict-prototypes" - echo $ac_n "checking whether we are on a Linux/i386 ELF system""... $ac_c" 1>&6 - LINUXELF=n - if MACHINE=`uname -a 2>/dev/null`; then - cat >conftest.c << EOF -int main() { return 0; } -EOF - case $MACHINE in - Linux*i*86) - gcc conftest.c -o conftest - file conftest >conftest.file - if grep ELF conftest.file >/dev/null; then - LINUXELF=y - fi - ;; - esac - rm -f conftest* +echo $ac_n "checking for GCC 2.7 or higher""... $ac_c" 1>&6 +echo "configure:6013: checking for GCC 2.7 or higher" >&5 +cat > conftest.$ac_ext < 1 || __GNUC_MINOR__ - 1 > 5 + yes +#endif + +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 +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" + 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 + +if [ "x$ac_cv_header_features_h" = "xyes" ]; then + echo $ac_n "checking for glibc-2.0 or higher""... $ac_c" 1>&6 +echo "configure:6046: checking for glibc-2.0 or higher" >&5 + cat > conftest.$ac_ext < +#if __GLIBC__ - 1 >= 1 + yes +#endif + +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* + +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= +fi + +if [ "x$DO_PROFILING" = "xyes" ]; then + if [ "x$CC" = "xgcc" ]; then + OPTIMIZE_CFLAGS="-O" + DEBUG_CFLAGS="-g -fno-inline -fno-omit-frame-pointer -pg -DUSE_PROFILING" + LDFLAGS="-pg" + else + DO_PROFILING=no + echo "Don't know how to set up profiling for your compiler." + NR_ERRORS=`expr $NR_ERRORS + 1` + fi +fi + +CFLAGS="$OPTIMIZE_CFLAGS $DEBUG_CFLAGS $WARNING_CFLAGS $CFLAGS $ADDITIONAL_CFLAGS" + +if [ "x$HAVEGCC27" = "xyes" ]; then + CFLAGS="$CFLAGS -DGCCCONSTFUNC=\"__attribute__((const))\"" +else + CFLAGS="$CFLAGS -DGCCCONSTFUNC=" +fi + +echo $ac_n "checking for x86 target CPU""... $ac_c" 1>&6 +echo "configure:6095: checking for x86 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* + + +echo $ac_n "checking for m68k target CPU""... $ac_c" 1>&6 +echo "configure:6117: 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; HAVE68K=yes +else + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* + + +echo $ac_n "checking for ppc target CPU""... $ac_c" 1>&6 +echo "configure:6139: checking for ppc target CPU" >&5 +cat > conftest.$ac_ext <&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6; HAVEPPC=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*) + HAVELINUX=yes + ;; + esac +fi + + +echo $ac_n "checking for GAS .p2align feature""... $ac_c" 1>&6 +echo "configure:6170: 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 + +echo $ac_n "checking whether assembler symbols need an underscore""... $ac_c" 1>&6 +echo "configure:6179: 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 + USE_UNDERSCORE=no +fi +echo "$ac_t""$USE_UNDERSCORE" 1>&6 + +rm -f conftest* + +# Check whether --enable-threads or --disable-threads was given. +if test "${enable_threads+set}" = set; then + enableval="$enable_threads" + USE_THREADS=$enableval +fi + + +if [ "x$NEED_THREAD_SUPPORT" = "xyes" ]; then + if [ "x$USE_THREADS" != "xyes" ]; then + echo "The gtk+ GUI needs threads; enabling thread support." fi - if [ $LINUXELF = "n" ]; then - echo "$ac_t""no" 1>&6 +fi + +if [ "x$USE_THREADS" = "xyes" -o "x$NEED_THREAD_SUPPORT" = "xyes" ]; then + if [ "x$HAVE_PTHREAD_LIB" = "xyes" ]; then + THREADDEP=td-posix + CFLAGS="$CFLAGS -DSUPPORT_THREADS -D_REENTRANT" + LIBS="$LIBS -lpthread" + if [ "x$HAVE_POSIX4_LIB" = "xyes" ]; then + LIBS="$LIBS -lposix4" + fi + + if [ "x$USE_THREADS" = "xyes" ]; then + CFLAGS="$CFLAGS -DUAE_FILESYS_THREADS" + fi + + if [ "x$HAVELINUX" = "xno" -o "x$HAVEGLIBC2" = "xno" ]; then + 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 + echo "If you didn't compile a fixed version of SVGAlib then thread support" + echo "in UAE will lock your machine real hard." + NR_WARNINGS=`expr $NR_WARNINGS + 1` + fi else - echo "$ac_t""yes" 1>&6 - ASMOBJS=X86.o + echo "You tried to enable threads, but I couldn't find a thread library!" + NR_ERRORS=`expr $NR_ERRORS + 1` + fi +fi + + +if [ "x$HAVEGCC27" = "xyes" -a "x$HAVEI386" = "xyes" ]; then + SAVECFLAGS=$CFLAGS + CFLAGS="$CFLAGS -mno-schedule-prologue" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + NO_SCHED_CFLAGS="-mno-schedule-prologue" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + CFLAGS=$SAVECFLAGS +fi + +if [ "x$HAVEGCC27" = "xyes" -a "x$HAVEI386" = "xyes" ]; then + SAVECFLAGS=$CFLAGS + CFLAGS="$CFLAGS -mpreferred-stack-boundary=2" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + SAVECFLAGS=$CFLAGS +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + CFLAGS=$SAVECFLAGS +fi + + +if [ "x$HAVEGCC27" = "xyes" -a "x$HAVEI386" = "xyes" ]; then + SAVECFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-exceptions" + NOEXCEPTIONS=no + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + NOEXCEPTIONS=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + if [ "x$NOEXCEPTIONS" = "xno" ]; then + CFLAGS=$SAVECFLAGS + fi +fi + + + +if [ "x$HAVEGCC27" = "xyes" -a "x$HAVEI386" = "xyes" -a "x$DO_PROFILING" = "xno" ]; then + MACHDEP=md-i386-gcc + 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 + 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$HAVEGCC27" = "xyes" -a "x$HAVEPPC" = "xyes" ]; then + MACHDEP=md-ppc-gcc + CFLAGS="$CFLAGS -DREGPARAM=" + if [ "x$HAVE_MOTO_LIB" = "xyes" ]; then + MATHLIB="-lmoto $MATHLIB" fi +else if [ "x$TARGET" = "xp_os" ]; then + CPU=`uname -m` + if [ "x$CPU" = "xm68k" ]; then + MACHDEP=md-68k + CFLAGS="$CFLAGS -DUNALIGNED_PROFITABLE -DREGPARAM=\"__attribute__((regparm(4)))\" -DM68K_FLAG_OPT=1" + else if [ "x$CPU" = "xppc" ]; then + MACHDEP=md-ppc + CFLAGS="$CFLAGS -DREGPARAM=" + else if [ "x$CPU" = "xi386" ]; then + MACHDEP=md-i386-gcc + CFLAGS="$CFLAGS -DX86_ASSEMBLY -fno-strength-reduce -DREGPARAM=\"__attribute__((regparm(3)))\"" + else + echo "Unsupported CPU: $CPU!" + exit 5 + fi + fi + fi + CFLAGS="$CFLAGS -nostdinc -I/gg/include -I/p/../inc -D__POS__" + OSDEP=od-pos + CPUOBJS="cpufast.o" +else if [ "x$TARGET" = "xamigaos" ]; then + OSDEP=od-amiga + CPU=`uname -m` + if [ "x$HAVEGCC27" = "xyes" -a "x$HAVE68K" = "xyes" ]; then + MACHDEP=md-68k + 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$HAVEGCC27" = "xyes" -a "x$CPU" = "xppc" ]; then + MACHDEP=md-ppc-gcc + else + CFLAGS="$CFLAGS -O -DREGPARAM=" + CPUOBJS="cpuemu1.o cpuemu2.o cpuemu3.o cpuemu4.o cpuemu5.o cpuemu6.o cpuemu7.o cpuemu8.o" + fi + fi +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=" + CPUOBJS="cpufast.o" +else if [ "x$TARGET" = "xbeos" ]; then + MACHDEP=md-ppc + CFLAGS="$CFLAGS -DREGPARAM=" + OSDEP=od-beos else - echo "GCC wasn't found. UAE may or may not compile and run correctly." + CFLAGS="$CFLAGS -DREGPARAM=" +fi +fi +fi +fi +fi +fi +fi + +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 + CFLAGS="$CFLAGS -DUSE_ZFILE" +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:6418: checking whether sys/soundcard.h or machine/soundcard.h works" >&5 + cat > conftest.$ac_ext < +#else +#include +#endif +#include + +int main() { +int soundfd; ioctl (soundfd, SNDCTL_DSP_GETFMTS, 0); +; return 0; } +EOF +if { (eval echo configure:6435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 +HAVE_USS_SOUND=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* +fi + +if [ "x$ac_cv_header_dmedia_audio.h" = "xno" ]; then + HAVE_SGIAUDIO_LIB=no +fi + +echo $ac_n "checking which sound system to use""... $ac_c" 1>&6 +echo "configure:6453: checking which sound system to use" >&5 +# Check whether --enable-file-sound or --disable-file-sound was given. +if test "${enable_file_sound+set}" = set; then + enableval="$enable_file_sound" + USE_FILE_SOUND=$enableval +fi + + +if [ "x$USE_FILE_SOUND" = "xyes" ]; then + echo "$ac_t""file output" 1>&6 + SOUNDDEP=sd-file + USE_SOUND=yes +else if [ "x$HAVE_USS_SOUND" = "xyes" ]; then + echo "$ac_t""USS" 1>&6 + SOUNDDEP=sd-uss + USE_SOUND=yes +else if [ "x$ac_cv_header_sys_audioio_h" = "xyes" -o "x$ac_cv_header_sun_audioio_h" = "xyes" ]; then + echo "$ac_t""Solaris/NetBSD" 1>&6 + SOUNDDEP=sd-solaris + USE_SOUND=yes +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_SGIAUDIO_LIB" = "xyes" ]; then + echo "$ac_t""SGI sound" 1>&6 + SOUNDDEP=sd-sgi + LIBS="$LIBS -laudio" + 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 + 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` +fi +fi +fi +fi +fi +fi +fi +fi +fi +fi + +SCSIOBJS=scsi-none.o +SCSIDEP=scg-none +# Check whether --enable-scsi-device or --disable-scsi-device was given. +if test "${enable_scsi_device+set}" = set; then + enableval="$enable_scsi_device" + USE_SCSI_DEVICE=$enableval +fi + + +if [ "x$USE_SCSI_DEVICE" = "xyes" ]; then + echo $ac_n "checking which scsi system to use""... $ac_c" 1>&6 +echo "configure:6533: checking which scsi system to use" >&5 + if [ "x$ac_cv_header_scsi_sg_h" = "xyes" ]; then + echo "$ac_t""Linux SG" 1>&6 + SCSIOBJS=scsidev.o + SCSIDEP=scg-linux-sg + else + echo "$ac_t""SCSI not supported for this system" 1>&6 + fi +fi + + +if [ "x$HAVE_MACHINE_JOYSTICK_H" = "xyes" ]; then + cat > conftest.$ac_ext < +int main() { +{ struct joystick a; } +; return 0; } +EOF +if { (eval echo configure:6553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + OD_JOYSTICK=od-linux/joystick.c +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +else + OD_JOYSTICK=$OSDEP/joystick.c +fi + +rm -f src/machdep +rm -f src/osdep +rm -f src/threaddep +rm -f src/sounddep +rm -f src/scsidep +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 +rm -f src/scsi-support.c + +if [ "x$TARGET" = "xamigaos" -o "x$TARGET" = "xp_os" ]; then + echo $ac_n "checking which CPU to use""... $ac_c" 1>&6 +echo "configure:6580: 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:6586: checking which FPU to use" >&5 + fpu=`cpu | cut -d' ' -f3 | grep '^688812$'` + if [ "x$fpu" != "x" ]; then + echo "$ac_t""68881" 1>&6 + CFLAGS="$CFLAGS -m68881" + else + echo "$ac_t""none" 1>&6 + fi +fi + + + + + + + + + @@ -2614,11 +6626,25 @@ cat > confcache <<\EOF # --recheck option to rerun configure. # EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | - sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ - >> confcache + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache if cmp -s $cache_file confcache; then : else @@ -2673,7 +6699,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.10" + echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -2683,7 +6709,7 @@ done ac_given_srcdir=$srcdir -trap 'rm -fr `echo "Makefile sysconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "src/Makefile Makefile src/sysconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF $ac_vpsub $extrasub +s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g @@ -2716,37 +6744,86 @@ s%@mandir@%$mandir%g s%@CC@%$CC%g s%@CPP@%$CPP%g s%@SET_MAKE@%$SET_MAKE%g +s%@MAKEDEPPRG@%$MAKEDEPPRG%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 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g s%@LIBOBJS@%$LIBOBJS%g -s%@TCLGUI@%$TCLGUI%g +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%@STATFS_NO_ARGS@%$STATFS_NO_ARGS%g -s%@BROKEN_JOYSTICK_H@%$BROKEN_JOYSTICK_H%g -s%@STATBUF_BAVAIL@%$STATBUF_BAVAIL%g +s%@WRC@%$WRC%g +s%@NO_SCHED_CFLAGS@%$NO_SCHED_CFLAGS%g s%@LIBRARIES@%$LIBRARIES%g s%@TARGET@%$TARGET%g s%@GFXOBJS@%$GFXOBJS%g +s%@RESOBJS@%$RESOBJS%g s%@ASMOBJS@%$ASMOBJS%g +s%@SCSIOBJS@%$SCSIOBJS%g +s%@CPUOBJS@%$CPUOBJS%g +s%@DEBUGOBJS@%$DEBUGOBJS%g +s%@MATHLIB@%$MATHLIB%g +s%@SHM_SUPPORT_LINKS@%$SHM_SUPPORT_LINKS%g +s%@top_srcdir@%$top_srcdir%g CEOF EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile]", defaulting infile="outfile.in". + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac - # Adjust relative srcdir, etc. for subdirectories. + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` @@ -2770,6 +6847,7 @@ for ac_file in .. $CONFIG_FILES; do if t top_srcdir="$ac_dots$ac_given_srcdir" ;; esac + echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." @@ -2778,13 +6856,15 @@ for ac_file in .. $CONFIG_FILES; do if t # $configure_input" ;; *) ac_comsub= ;; esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g -" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done -rm -f conftest.subs +rm -f conftest.s* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. @@ -2805,11 +6885,17 @@ ac_eB='$%\1#\2define\3' ac_eC=' ' ac_eD='%g' -CONFIG_HEADERS=${CONFIG_HEADERS-"sysconfig.h"} +if test "${CONFIG_HEADERS+set}" != set; then +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +fi for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then - # Support "outfile[:infile]", defaulting infile="outfile.in". + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac @@ -2817,7 +6903,8 @@ for ac_file in .. $CONFIG_HEADERS; do if echo creating $ac_file rm -f conftest.frag conftest.in conftest.out - cp $ac_given_srcdir/$ac_file_in conftest.in + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + cat $ac_file_inputs > conftest.in EOF @@ -2845,8 +6932,6 @@ EOF # Break up conftest.vals because some shells have a limit on # the size of here documents, and old seds have small limits too. -# Maximum number of lines to put in a single here document. -ac_max_here_lines=12 rm -f conftest.tail while : @@ -2888,7 +6973,11 @@ cat >> $CONFIG_STATUS <<\EOF fi fi; done +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF exit 0 EOF @@ -2896,3 +6985,58 @@ chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +if [ "x$DO_PROFILING" = "xyes" ]; then + echo "Building a profiling version of UAE (select this option only if you know" + echo "what you are doing)" +fi + + + + +if test -f $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 + +echo "#include \"$abssrcdir/src/targets/$TARGETDEP\"" > src/target.h +echo "#include \"$abssrcdir/config.h\"" > src/config.h + +echo "#include \"$abssrcdir/src/$SOUNDDEP/sound.c\"" >src/sd-sound.c +echo "#include \"$abssrcdir/src/$OD_JOYSTICK\"" >src/od-joy.c +echo "#include \"$abssrcdir/src/$MACHDEP/support.c\"" >src/md-support.c + +if [ "x$SCSIDEP" != "xscg-none" ]; then + echo "#include \"$abssrcdir/src/$SCSIDEP/scsi.h\"" >src/scsi-support.c + echo "#include \"$abssrcdir/src/$SCSIDEP/scsi.c\"" >>src/scsi-support.c +fi +if [ "x$MACHDEP" = "xmd-i386-gcc" ]; then + echo "#include \"machdep/X86.S\"" >src/md-X86.S +fi +echo "#include \"$abssrcdir/src/include/$FPP_H\"" >src/md-fpp.h + + +echo +echo +if [ "x$NR_ERRORS" = "x0" ]; then + if [ "x$NR_WARNINGS" = "x0" ]; then + echo "Configuration was successful!" + else + echo "There were $NR_WARNINGS warnings. That is usually harmless, but read the output" + echo "from configure carefully if you run into problems." + fi +else + echo "There were $NR_ERRORS errors. UAE may still build and run cleanly, but you may" + echo "not get all the features you asked for." +fi +echo