--- uae/configure 2018/04/24 16:38:43 1.1.1.3 +++ uae/configure 2018/04/24 16:39:37 1.1.1.4 @@ -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.12 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -14,13 +14,35 @@ ac_default_prefix=/usr/local ac_help="$ac_help --with-x use the X Window System" ac_help="$ac_help ---enable-profiling Build a profiling (SLOW!) version" + --enable-profiling Build a profiling (SLOW!) version" ac_help="$ac_help ---disable-gui Don't use any GUI" + --with-svgalib Use SVGAlib for graphics output" ac_help="$ac_help ---enable-dga Use the DGA extension" + --with-ggi Use GGI for graphics output" ac_help="$ac_help ---enable-xfgui Use the XForms GUI instead of Tcl/Tk" + --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 filesystem thread support" +ac_help="$ac_help + --enable-penguins Enable threads that only make sense on SMP machines" +ac_help="$ac_help + --enable-sound Enable sound support" +ac_help="$ac_help + --enable-file-sound Enable sound output to file" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -59,6 +81,8 @@ mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 ac_prev= for ac_option @@ -340,7 +364,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.10" + echo "configure generated by autoconf version 2.12" exit 0 ;; -with-* | --with-*) @@ -442,11 +466,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 @@ -508,6 +535,7 @@ ac_ext=c 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' +cross_compiling=$ac_cv_prog_cc_cross if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. @@ -523,9 +551,11 @@ 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:559: 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 @@ -554,6 +584,7 @@ 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:588: 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 @@ -600,7 +631,47 @@ 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:636: 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 $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; 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* + +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:670: 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:675: 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 @@ -609,7 +680,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:613: \"$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:684: \"$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 @@ -617,29 +688,34 @@ 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 + 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:699: 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 + CFLAGS="-g -O2" + else + CFLAGS="-O2" fi else GCC= @@ -648,6 +724,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:728: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -662,33 +739,37 @@ 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:672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` 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:687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` 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 @@ -704,7 +785,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:789: 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 @@ -729,10 +811,43 @@ else SET_MAKE="MAKE=${MAKE-make}" 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:818: 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. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_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 + echo $ac_n "checking for AIX""... $ac_c" 1>&6 +echo "configure:849: checking for AIX" >&5 cat > conftest.$ac_ext <&6 +echo "configure:873: 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 @@ -774,27 +890,41 @@ 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_'` +NR_WARNINGS=0 +NR_ERRORS=0 + +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:908: 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:923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -804,32 +934,34 @@ 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:945: 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:960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -839,36 +971,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_NEXT_LIB=yes else echo "$ac_t""no" 1>&6 -HAVE_NEXT_LIB=n +HAVE_NEXT_LIB=no fi -echo $ac_n "checking for -lamiga""... $ac_c" 1>&6 -ac_lib_var=`echo amiga'_'OpenLibrary | tr './+\055' '__p_'` +echo $ac_n "checking for OpenLibrary in -lamiga""... $ac_c" 1>&6 +echo "configure:982: 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; }; then +if { (eval echo configure:1001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -878,36 +1012,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_AMIGA_LIB=y + HAVE_AMIGA_LIB=yes else echo "$ac_t""no" 1>&6 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:1023: 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:1042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -917,36 +1053,161 @@ 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:1064: 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:1083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + 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_AF_LIB=yes +else + echo "$ac_t""no" 1>&6 +HAVE_AF_LIB=no +fi + +echo $ac_n "checking for waddch in -lncurses""... $ac_c" 1>&6 +echo "configure:1105: 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; 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 pthread_create in -lpthread""... $ac_c" 1>&6 +echo "configure:1146: checking for pthread_create in -lpthread" >&5 +ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpthread $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + HAVE_PTHREAD_LIB=yes +else + echo "$ac_t""no" 1>&6 +HAVE_PTHREAD_LIB=no +fi + +echo $ac_n "checking for sem_init in -lposix4""... $ac_c" 1>&6 +echo "configure:1187: checking for sem_init in -lposix4" >&5 +ac_lib_var=`echo posix4'_'sem_init | sed 'y%./+-%__p_%'` +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; 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 @@ -956,18 +1217,84 @@ 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_POSIX4_LIB=yes else echo "$ac_t""no" 1>&6 -HAVE_AF_LIB=n +HAVE_POSIX4_LIB=no fi +echo $ac_n "checking for ggiInit in -lggi""... $ac_c" 1>&6 +echo "configure:1228: 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; 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 + + +if [ $target = "p.os" ]; then + HAVE_POS=yes +else + +cat >conftest.c << EOF +int main() +{ +#ifdef __POS__ +printf("POS\n"); +#endif +return 0; +} +EOF +$CC $CFLAGS conftest.c -c -o conftest.o +$CC conftest.o -o conftest +./conftest >conftest.file +if grep POS conftest.file >/dev/null; then + HAVE_POS=yes +else + HAVE_POS=no +fi +rm -f conftest* +fi # If we find X, set shell vars x_includes and x_libraries to the # paths, otherwise set no_x=yes. # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 +echo "configure:1298: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -1007,7 +1334,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" ;; @@ -1027,12 +1356,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1040,30 +1369,32 @@ if test -z "$ac_err"; then 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 \ @@ -1099,45 +1430,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:1441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. 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 \ @@ -1148,6 +1480,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 \ @@ -1162,7 +1495,6 @@ do done fi rm -f conftest* - fi # $ac_x_libraries = NO if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then @@ -1193,74 +1525,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:1547: 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:1557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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:1580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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" @@ -1268,30 +1607,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:1612: 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:1631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -1307,30 +1648,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:1653: 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:1672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -1349,32 +1692,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:1701: 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:1729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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:1750: 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:1769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -1389,35 +1785,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:1799: 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:1827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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:1848: 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:1867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -1427,56 +1878,285 @@ 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:1891: 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:1919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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:1940: 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; 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:1983: 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:2011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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:2032: 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; 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:2084: 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 $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" fi +rm -f conftest* +LIBS="$ac_save_LIBS" +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" +else + echo "$ac_t""no" 1>&6 +fi + LDFLAGS="$ac_save_LDFLAGS" -DO_PROFILING=no -# Check whether --enable-profiling or --disable-profiling was given. -if test "${enable_profiling+set}" = set; then - enableval="$enable_profiling" - DO_PROFILING=$enableval 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:2134: 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:1468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2147: \"$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:2172: 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:2191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -1526,30 +2208,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:2213: 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:2232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -1566,38 +2250,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:2255: 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 @@ -1605,13 +2264,15 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` 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 @@ -1620,7 +2281,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 @@ -1638,7 +2299,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 @@ -1658,8 +2319,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') @@ -1670,15 +2331,19 @@ if (XOR (islower (i), ISLOWER (i)) || to exit (0); } EOF -{ (eval echo configure:1674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then +if { (eval echo configure:2335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./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 @@ -1689,26 +2354,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 ncurses.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:2363: 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:1706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi @@ -1716,7 +2385,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:2403: 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:1743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi @@ -1753,7 +2425,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:2443: 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:1780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi @@ -1790,7 +2465,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:2483: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done -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 >src/include/joystick.h - else - echo "$ac_t""no" 1>&6 - BROKEN_JOYSTICK_H=0 - fi +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:2523: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +ac_safe=`echo "be_math.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for be_math.h""... $ac_c" 1>&6 +echo "configure:2561: checking for be_math.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + HAVE_BEOS=yes +else + echo "$ac_t""no" 1>&6 +HAVE_BEOS=no +fi + echo $ac_n "checking size of char""... $ac_c" 1>&6 +echo "configure:2595: 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() @@ -1832,15 +2610,19 @@ main() exit(0); } EOF -{ (eval echo configure:1836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then +if { (eval echo configure:2614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then ac_cv_sizeof_char=`cat conftestval` else + 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:2634: 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() @@ -1866,15 +2649,19 @@ main() exit(0); } EOF -{ (eval echo configure:1870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then +if { (eval echo configure:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then ac_cv_sizeof_short=`cat conftestval` else + 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:2673: 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() @@ -1900,15 +2688,19 @@ main() exit(0); } EOF -{ (eval echo configure:1904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then +if { (eval echo configure:2692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then ac_cv_sizeof_int=`cat conftestval` else + 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:2712: 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() @@ -1934,15 +2727,19 @@ main() exit(0); } EOF -{ (eval echo configure:1938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then +if { (eval echo configure:2731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then ac_cv_sizeof_long=`cat conftestval` else + 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:2751: 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() @@ -1968,15 +2766,19 @@ main() exit(0); } EOF -{ (eval echo configure:1972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then +if { (eval echo configure:2770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then ac_cv_sizeof_long_long=`cat conftestval` else + 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:2791: 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:2845: \"$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 @@ -2059,26 +2862,28 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 +echo "configure:2866: 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:2880: \"$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 @@ -2096,20 +2901,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:2909: 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 "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_mode_t=yes else @@ -2128,19 +2938,21 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 +echo "configure:2942: 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 "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_off_t=yes else @@ -2159,19 +2971,21 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 +echo "configure:2975: 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 "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_pid_t=yes else @@ -2190,28 +3004,29 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 +echo "configure:3008: checking for st_blocks in struct stat" >&5 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:2207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3021: \"$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 @@ -2225,29 +3040,30 @@ else fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +echo "configure:3044: checking whether time.h and sys/time.h may both be included" >&5 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:2243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3058: \"$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 @@ -2259,28 +3075,29 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 +echo "configure:3079: checking whether struct tm is in sys/time.h or time.h" >&5 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:2276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3092: \"$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 @@ -2294,12 +3111,13 @@ fi if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 +echo "configure:3115: checking whether ${CC-cc} needs -traditional" >&5 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 @@ -2317,7 +3135,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -2339,14 +3157,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:3161: 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:3179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + ac_cv_func_memcmp_clean=yes else - 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.o" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 +echo "configure:3197: 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 @@ -2387,20 +3211,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:2396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3219: \"$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 @@ -2410,6 +3234,7 @@ EOF echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6 +echo "configure:3238: checking whether utime accepts a null argument" >&5 if eval "test \"`echo '$''{'ac_cv_func_utime_null'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2418,8 +3243,8 @@ else if test "$cross_compiling" = yes; then ac_cv_func_utime_null=no else -cat > conftest.$ac_ext < conftest.$ac_ext < #include @@ -2430,14 +3255,18 @@ exit(!(stat ("conftestdata", &s) == 0 && && t.st_mtime - s.st_mtime < 120)); } EOF -{ (eval echo configure:2434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then +if { (eval echo configure:3259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then ac_cv_func_utime_null=yes else + 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 @@ -2449,14 +3278,15 @@ EOF fi -for ac_func in gettimeofday sigaction mkdir rmdir select strerror strstr statfs +for ac_func in getcwd getopt strdup gettimeofday sigaction mkdir rmdir select strerror strstr statfs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3285: 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:3313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 fi +done + +for ac_func in tcgetattr cfmakeraw readdir_r +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3340: 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:3368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` @@ -2504,9 +3390,10 @@ done echo $ac_n "checking how many args statfs takes""... $ac_c" 1>&6 -if [ "$ac_cv_func_statfs" = "yes" ]; then +echo "configure:3394: checking how many args statfs takes" >&5 +if [ "x$ac_cv_func_statfs" = "xyes" ]; then cat > conftest.$ac_ext < #endif -int main() { return 0; } -int t() { +int main() { struct statfs statbuf;statfs("/",&statbuf); ; return 0; } EOF -if { (eval echo configure:2540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""2" 1>&6 STATFS_NO_ARGS=2 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 fi rm -f conftest* - fi echo $ac_n "checking whether to use f_bavail or f_bfree""... $ac_c" 1>&6 -if [ $ac_cv_func_statfs = "yes" ]; then +echo "configure:3441: checking whether to use f_bavail or f_bfree" >&5 +if [ "x$ac_cv_func_statfs" = "xyes" ]; then cat > conftest.$ac_ext < #endif -int main() { return 0; } -int t() { +int main() { struct statfs statbuf;statbuf.f_bavail; ; return 0; } EOF -if { (eval echo configure:2586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""f_bavail" 1>&6 STATBUF_BAVAIL=f_bavail 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 fi rm -f conftest* - fi -USE_GUI=yes -# Check whether --enable-gui or --disable-gui was given. -if test "${enable_gui+set}" = set; then - enableval="$enable_gui" - USE_GUI=$enableval -fi -if [ x$USE_GUI = "xyes" ]; then - # 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_USE_GUI'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +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:3496: checking for attr_t in curses.h" >&5 + cat > conftest.$ac_ext < +int main() { +{ attr_t a; a = A_NORMAL; } +; return 0; } +EOF +if { (eval echo configure:3505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 else - if test -n "$USE_GUI"; then - ac_cv_prog_USE_GUI="$USE_GUI" # Let the user override the test. + 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_n "checking for attr_t in ncurses.h""... $ac_c" 1>&6 +echo "configure:3522: checking for attr_t in ncurses.h" >&5 + cat > conftest.$ac_ext < +int main() { +{ attr_t a; a = A_NORMAL; } +; return 0; } +EOF +if { (eval echo configure:3531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_USE_GUI="yes" - break + 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 - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_USE_GUI" && ac_cv_prog_USE_GUI="no" + fi fi + +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 -USE_GUI="$ac_cv_prog_USE_GUI" -if test -n "$USE_GUI"; then - echo "$ac_t""$USE_GUI" 1>&6 -else - echo "$ac_t""no" 1>&6 + +# Check whether --with-svgalib or --without-svgalib was given. +if test "${with_svgalib+set}" = set; then + withval="$with_svgalib" + WANT_SVGALIB=$withval fi -else - echo "Disabling the GUI." +# Check whether --with-ggi or --without-ggi was given. +if test "${with_ggi+set}" = set; then + withval="$with_ggi" + WANT_GGI=$withval fi -MATHLIB=-lm +# Check whether --with-asciiart or --without-asciiart was given. +if test "${with_asciiart+set}" = set; then + withval="$with_asciiart" + WANT_ASCIIART=$withval +fi -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= -else if [ $HAVE_AMIGA_LIB = "y" ]; then - echo "$ac_t""AmigaOS" 1>&6 - TARGET=amigaos - GFXOBJS="amiga.o" -else if [ $HAVE_NEXT_LIB = "y" ]; then - echo "$ac_t""NeXTStep" 1>&6 - MATHLIB= - 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 +# 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 - echo "$ac_t""SVGAlib" 1>&6 - TARGET=svgalib - echo $ac_n "checking for -lncurses""... $ac_c" 1>&6 -ac_lib_var=`echo ncurses'_'waddch | tr './+\055' '__p_'` + 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:3676: 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 ac_save_LIBS="$LIBS" -LIBS="-lncurses $LIBS" +LIBS="-lXxf86dga $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:3695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -2694,76 +3706,49 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo ncurses | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -HAVE_GUI=no +HAVE_DGA=no fi - if [ x$USE_GUI = "xyes" ]; then - GFXOBJS="svga.o tui.o svgancui.o" - LIBRARIES="-lvga -lncurses" - if [ $ac_cv_header_ncurses_h = "no" ]; then - echo "Found libncurses, but no ncurses.h. Unfortunately, newer ncurses" - echo "installations don't come with ncurses.h. I'll try to use curses.h instead." - echo "If you get linker or compiler errors in svgancui.c, please remove" - echo "all traces of an existing ncurses-installation and re-install ncurses." - fi - else - GFXOBJS="svga.o nogui.o" - LIBRARIES="-lvga" - 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 -else - echo "$ac_t""X Window System" 1>&6 - TARGET=x11 - - # Check whether --enable-dga or --disable-dga was given. -if test "${enable_dga+set}" = set; then - enableval="$enable_dga" - USEDGA=$enableval fi - if [ x$USE_GUI = "xyes" ]; then - if [ x$USE_DGA = "xyes" ]; then - echo "Can't use the GUI with DGA - disabling DGA." - fi - USEDGA=no - fi - HAVE_XFORMS=no - if [ "$ac_cv_header_forms_h" = "yes" -o "$ac_cv_header_X11_forms_h" = "yes" ]; then - TMP_SAVE_LIBS=$LIBS - LIBS="$X_LIBS $LIBS -lforms -lX11 -lm" - echo $ac_n "checking for -lforms""... $ac_c" 1>&6 -ac_lib_var=`echo forms'_'fl_library_version | tr './+\055' '__p_'` +if [ "x$WANT_VIDMODE" = "xyes" ]; then + TMP_SAVE_LIBS=$LIBS + LIBS="$X_LIBS $LIBS" + echo $ac_n "checking for XF86VidModeQueryExtension in -lXxf86vm""... $ac_c" 1>&6 +echo "configure:3728: checking for XF86VidModeQueryExtension in -lXxf86vm" >&5 +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="-lforms $LIBS" +LIBS="-lXxf86vm $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:3747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -2773,137 +3758,490 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - HAVE_XFORMS=yes + HAVE_VIDMODE=yes else echo "$ac_t""no" 1>&6 +HAVE_VIDMODE=no fi - LIBS=$TMP_SAVE_LIBS - if [ "$ac_cv_header_forms_h" = "yes" ]; then - FORMS_HEADER=forms.h - else - FORMS_HEADER=X11/forms.h - 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 - if [ x$HAVE_XFORMS = "xyes" ]; then - echo '#include "'$FORMS_HEADER\" >conftest.c - cat >>conftest.c << EOF -int main() +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:3817: 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. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no" + ;; +esac +fi +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 + + min_gtk_version=0.99.7 + echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 +echo "configure:3848: checking for GTK - version >= $min_gtk_version" >&5 + 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 () { - if (fl_library_version(NULL, NULL) == FL_INCLUDE_VERSION - && FL_INCLUDE_VERSION >= 80) - printf("OK\n"); -return 0; + 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 - $CC conftest.c -c -o conftest.o $CFLAGS - $CC conftest.o -o conftest $X_LIBS $LIBS -lforms -lX11 -lm - ./conftest >conftest.file - if grep OK conftest.file >/dev/null; then - echo "X Forms include and library version match." - else - echo "Installation problem with the X Forms library, versions don't match!" - HAVE_XFORMS = no - fi +if { (eval echo configure:3934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./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 <&6 -ac_lib_var=`echo Xxf86dga'_'XF86DGAQueryExtension | 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="-lXxf86dga -lXext -lX11 $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:3978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GTK or finding the wrong" + 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 + + +if [ "x$WANT_UI" = "xyes" -a "x$WANT_DGA" = "xyes" ]; then + echo "Can't use a GUI with DGA - disabling DGA." + NR_ERRORS=`expr $NR_ERRORS + 1` + WAMT_DGA=no + WANT_VIDMODE=no +fi + +if [ "x$WANT_DGA" = "xyes" ]; then + WANT_UI=no +fi + + +SHM_SUPPORT_LINKS=0 +if [ "x$no_x" != "xyes" -a "x$WANT_DGA" != "xyes" -a "x$ac_cv_header_sys_ipc_h" = "xyes" -a "x$ac_cv_header_sys_shm_h" = "xyes" ]; then + echo $ac_n "checking whether the X11 MIT-SHM extension can be compiled in""... $ac_c" 1>&6 +echo "configure:4032: checking whether the X11 MIT-SHM extension can be compiled in" >&5 + 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; +void foo(void) +{ +XShmAttach(display, &shminfo); +XSync(display,0); +shmctl(shminfo.shmid, IPC_RMID, 0); +} ; return 0; } EOF -if { (eval echo configure:2834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:4064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + 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* - eval "ac_cv_lib_$ac_lib_var=no" + SHM_SUPPORT_LINKS=0 +echo "$ac_t""no" 1>&6 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 - USEDGA=yes -else - echo "$ac_t""no" 1>&6 -USEDGA=no + CFLAGS=$TMP_SAVE_CFLAGS + LIBS=$TMP_SAVE_LIBS fi - LIBS=$TMP_SAVE_LIBS +MATHLIB=-lm +DEBUGOBJS="debug.o" + +echo $ac_n "checking which target to use""... $ac_c" 1>&6 +echo "configure:4084: checking which target to use" >&5 + +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$USEDGA = "xyes" ]; then - LIBRARIES="$X_LIBS $X_PRE_LIBS -lXxf86dga -lXext -lX11 $X_EXTRA_LIBS" - X_CFLAGS="$X_CFLAGS -DUSE_DGA_EXTENSION" - else - LIBRARIES="$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS" - fi - - if [ x$USE_GUI = "xyes" ]; then - USE_XFGUI=no - # Check whether --enable-xfgui or --disable-xfgui was given. -if test "${enable_xfgui+set}" = set; then - enableval="$enable_xfgui" - USE_XFGUI=$enableval -fi - - if [ x$USE_XFGUI = "xyes" ]; then - if [ x$HAVE_XFORMS = "xyes" ]; then - echo "Using XForms GUI." - LIBRARIES="$LIBRARIES -lforms" - GFXOBJS="xwin.o" + + 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 - echo "You don't have XForms. Disabling GUI!" - USE_XFGUI=no - USE_GUI=no - GFXOBJS="xwin.o nogui.o" + echo "Using gtk+ GUI." + LIBRARIES="-lgtk -lgdk -lglib $LIBRARIES" + NEED_THREAD_SUPPORT=yes + ADDITIONAL_CFLAGS="$ADDITIONAL_CFLAGS -DUSING_GTK_GUI" + GUIOBJS=gtkui.o fi - else - echo "Using Tcl/Tk GUI." - GFXOBJS="xwin.o xui.o" fi - else - GFXOBJS="xwin.o nogui.o" + fi + fi + fi fi fi fi fi fi -if [ x$USE_XFGUI = "xyes" ]; then - DEBUGOBJS="xdebug.o" -else - DEBUGOBJS="debug.o" +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 + +USE_PENGUINS=no +USE_THREADS=no +USE_SOUND=no +USE_FILE_SOUND=no + +HAVEELF=no +HAVELINUX=no +HAVEGCC27=no +HAVEI386=no +HAVE68K=no +HAVEGLIBC2=no -LINUXELF=n -HAVEGCC27=n -HAVEI386=n ASMOBJS= -CPUOBJS="cpu0.o cpu1.o cpu2.o cpu3.o cpu4.o cpu5.o cpu6.o cpu7.o cpu8.o cpu9.o cpuA.o cpuB.o cpuC.o cpuD.o cpuE.o cpuF.o" -CPUOBJS1="cpu_d0.o cpu_d1.o cpu_d2.o cpu_d3.o cpu_d4.o cpu_d5.o cpu_d6.o cpu_d7.o cpu_d8.o cpu_d9.o cpu_dA.o cpu_dB.o cpu_dC.o cpu_dD.o cpu_dE.o cpu_dF.o" +CPUOBJS=cpuemu.o +echo $ac_n "checking for GCC 2.7 or higher""... $ac_c" 1>&6 +echo "configure:4245: checking for GCC 2.7 or higher" >&5 cat >conftest.c << EOF int main() { @@ -2920,28 +4258,68 @@ $CC conftest.c -c -o conftest.o $CC conftest.o -o conftest ./conftest >conftest.file if grep GNU conftest.file >/dev/null; then - HAVEGCC27=y - echo "Good news. Found GCC 2.7 or better." + echo "$ac_t""yes" 1>&6 + HAVEGCC27=yes else - if [ "$CC" = "gcc" ]; then + echo "$ac_t""no" 1>&6 + if [ "x$CC" = "xgcc" ]; then echo "I suggest you upgrade to at least version 2.7 of GCC" else echo "Couldn't find GCC. UAE may or may not compile and run correctly." + NR_WARNINGS=`expr $NR_WARNINGS + 1` fi fi -if [ x$DO_PROFILING = "xyes" ]; then - if [ "$CC" = "gcc" ]; then - CFLAGS="-O -g -fno-inline-functions -fno-omit-frame-pointer -pg -DUSE_PROFILING" - LDFLAGS="-pg" +echo $ac_n "checking for glibc-2.0 or higher""... $ac_c" 1>&6 +echo "configure:4275: checking for glibc-2.0 or higher" >&5 +if [ "x$ac_cv_header_features_h" = "xyes" ]; then + cat >conftest.c << EOF +#include +int main() +{ +#if defined(__GLIBC__) +#if __GLIBC__ >= 2 +printf("GNU\n"); +#endif +#endif +return 0; +} +EOF + + $CC conftest.c -c -o conftest.o + $CC conftest.o -o conftest + ./conftest >conftest.file + if grep GNU conftest.file >/dev/null; then + HAVEGLIBC2=yes + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 fi else - if [ "$CC" = "gcc" ]; then - CFLAGS="-O3 -fomit-frame-pointer -Wall -Wtraditional -Wno-unused -Wno-format -W -Wmissing-prototypes -Wstrict-prototypes" + echo "$ac_t""no" 1>&6 +fi + +if [ "x$CC" = "xgcc" ]; 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 -if [ x$HAVEGCC27 = "xy" ]; then +CFLAGS="$OPTIMIZE_CFLAGS $DEBUG_CFLAGS $WARNING_CFLAGS $CFLAGS $ADDITIONAL_CFLAGS" + +if [ "x$HAVEGCC27" = "xyes" ]; then CFLAGS="$CFLAGS -DGCCCONSTFUNC=\"__attribute__((const))\"" else CFLAGS="$CFLAGS -DGCCCONSTFUNC=" @@ -2952,6 +4330,8 @@ int main() { #ifdef __i386__ printf("386\n"); +#elif defined(__mc68000__) +printf("68k\n"); #endif return 0; } @@ -2961,83 +4341,342 @@ $CC conftest.c -c -o conftest.o $CC conftest.o -o conftest ./conftest >conftest.file if grep 386 conftest.file >/dev/null; then - HAVEI386=y + HAVEI386=yes echo "You seem to be using a x86 CPU (UAE will require a 486 to run)" +else if grep 68k conftest.file >/dev/null; then + HAVE68K=yes + echo "You seem to be using a 68k CPU." else echo "No special hacks for your CPU, sorry." -fi +fi; fi rm -f conftest* +if MACHINE=`uname -a 2>/dev/null`; then + case "$MACHINE" in + Linux*) + HAVELINUX=yes + ;; + esac +fi + -if [ "$HAVEGCC27" = "y" -a "$HAVEI386" = "y" -a x$DO_PROFILING = "xno" ]; then - echo $ac_n "checking whether we are on a Linux/i386 ELF system""... $ac_c" 1>&6 - if MACHINE=`uname -a 2>/dev/null`; then - cat >conftest.c << EOF +echo $ac_n "checking whether we are on an ELF system""... $ac_c" 1>&6 +echo "configure:4366: checking whether we are on an ELF system" >&5 + +if [ "x$SYSTEM_IS_ELF" = "xdunno" ]; 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* + + gcc conftest.c -o conftest + if [ "x$FILEPRG" = "xnot-found" ]; then + cp conftest conftest.file + else + $FILEPRG conftest >conftest.file fi - if [ $LINUXELF = "n" ]; then + if grep ELF conftest.file >/dev/null; then + HAVEELF=yes + echo "$ac_t""yes" 1>&6 + else echo "$ac_t""no" 1>&6 + fi +else + echo "$ac_t""overriden: $SYSTEM_IS_ELF" 1>&6 + HAVEELF=$SYSTEM_IS_ELF +fi + +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 + +# Check whether --enable-penguins or --disable-penguins was given. +if test "${enable_penguins+set}" = set; then + enableval="$enable_penguins" + USE_PENGUINS=$enableval +fi + + +if [ "x$NEED_THREAD_SUPPORT" = "xyes" ]; then + if [ "x$USE_THREADS" != "xyes" -a "x$USE_PENGUINS" != "xyes" ]; then + echo "The gtk+ GUI needs threads; enabling thread support." + fi +fi + +if [ "x$USE_THREADS" = "xyes" -o "x$USE_PENGUINS" = "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$USE_PENGUINS" = "xyes" ]; then + CFLAGS="$CFLAGS -DSUPPORT_PENGUINS" + fi + + if [ "x$HAVELINUX" = "xno" -o "x$HAVEGLIBC2" = "xno" ]; then + echo "*** Thread support has only been tested on Linux systems with glibc-2.0" + echo "*** There are known problems with libc5-based Linux systems and threads!" + if [ "x$NEED_THREAD_SUPPORT" = "xyes" ]; then + echo "*** Use 'configure --disable-ui' if you have problems." + fi + 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 - CPUOBJS="cpu_f0.o cpu_f1.o cpu_f2.o cpu_f3.o cpu_f4.o cpu_f5.o cpu_f6.o cpu_f7.o cpu_f8.o cpu_f9.o cpu_fA.o cpu_fB.o cpu_fC.o cpu_fD.o cpu_fE.o cpu_fF.o" - CPUOBJS1="cpu_f_d0.o cpu_f_d1.o cpu_f_d2.o cpu_f_d3.o cpu_f_d4.o cpu_f_d5.o cpu_f_d6.o cpu_f_d7.o cpu_f_d8.o cpu_f_d9.o cpu_f_dA.o cpu_f_dB.o cpu_f_dC.o cpu_f_dD.o cpu_f_dE.o cpu_f_dF.o" - CFLAGS="$CFLAGS -DX86_ASSEMBLY" + echo "You tried to enable threads, but I couldn't find a thread library!" + NR_ERRORS=`expr $NR_ERRORS + 1` fi fi -rm -f src/machdep -if [ "$LINUXELF" = "y" -a x$DO_PROFILING = "xno" ]; then - ln -s md-i386-linux src/machdep - CFLAGS="$CFLAGS -fno-strength-reduce -DINTEL_FLAG_OPT=1 -DREGPARAM=\"__attribute__((regparm(3)))\"" -else if [ "$HAVEGCC27" = "y" -a "$HAVEI386" = "y" -a x$DO_PROFILING = "xno" ]; then - ln -s md-i386-gcc src/machdep - CFLAGS="$CFLAGS -fno-strength-reduce -DINTEL_FLAG_OPT=1 -DREGPARAM=\"__attribute__((regparm(3)))\"" -else if [ "$TARGET" = "amigaos" ]; then - ln -s md-amiga src/machdep - CFLAGS="$CFLAGS -DREGPARAM=\"__attribute__((regargs(4)))\" -DM68K_FLAG_OPT=1" +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 -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 -DX86_ASSEMBLY -DUNALIGNED_PROFITABLE -fno-strength-reduce -DREGPARAM=\"__attribute__((regparm(3)))\"" + ASMOBJS=machdep/X86.o + CPUOBJS="cpufast.o" + if [ "x$HAVEELF" != "xyes" ]; then + CFLAGS="$CFLAGS -DUSE_UNDERSCORE" + fi +else if [ "x$TARGET" = "xp_os" ]; then + CPU=`uname -m` + if [ "x$CPU" = "xm68k" ]; then + MACHDEP=md-68k + CFLAGS="$CFLAGS -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$HAVEGCC27" = "xyes" -a "x$HAVE68K" = "xyes" -a "x$TARGET" = "xamigaos" ]; then + MACHDEP=md-68k + OSDEP=od-amiga + CFLAGS="$CFLAGS -DREGPARAM=\"__attribute__((regparm(4)))\" -DM68K_FLAG_OPT=1" + CPUOBJS="cpufast.o" +else if [ "x$TARGET" = "xamigaos" ]; then + MACHDEP=md-generic + OSDEP=od-amiga + CFLAGS="$CFLAGS -DREGPARAM=" +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 - ln -s md-generic src/machdep CFLAGS="$CFLAGS -DREGPARAM=" fi fi fi +fi +fi +fi + +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 -if [ $TARGET = "x11" -o $TARGET = "svgalib" ]; then +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 -if [ $TARGET = "amigaos" ]; then - CFLAGS="$CFLAGS -DUSE_ZFILE" +HAVE_USS_SOUND=no +if [ "x$ac_cv_header_sys_soundcard_h" = "xyes" -o "x$ac_cv_header_machine_soundcard_h" = "xyes" ]; then + echo $ac_n "checking whether sys/soundcard.h or machine/soundcard.h works""... $ac_c" 1>&6 +echo "configure:4566: checking whether sys/soundcard.h or machine/soundcard.h works" >&5 + 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:4583: \"$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 + +echo $ac_n "checking which sound system to use""... $ac_c" 1>&6 +echo "configure:4597: checking which sound system to use" >&5 +# Check whether --enable-sound or --disable-sound was given. +if test "${enable_sound+set}" = set; then + enableval="$enable_sound" + USE_SOUND=$enableval +fi + +# 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 + USE_SOUND=yes +fi + +if [ "x$USE_SOUND" = "xno" ]; then + echo "$ac_t""sound not enabled" 1>&6 +else + 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 + USE_SOUND=yes + else if [ "x$TARGET" = "xp_os" ]; then + echo "$ac_t""pAudio.device" 1>&6 + SOUNDDEP=od-pos + USE_SOUND=yes + else if [ "x$TARGET" = "xamigaos" ]; then + echo "$ac_t""Amiga audio.device" 1>&6 + 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 + echo "no known sound system found" + NR_ERRORS=`expr $NR_ERRORS + 1` + fi + fi + fi + fi + fi + fi + fi +fi + +rm -f src/machdep +rm -f src/osdep +rm -f src/threaddep +rm -f src/sounddep +rm -f src/target.h +if [ "x$TARGET" = "xamigaos" -o "x$TARGET" = "xp_os" ]; then echo $ac_n "checking which CPU to use""... $ac_c" 1>&6 +echo "configure:4666: checking which CPU to use" >&5 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 - fpu=`cpu | cut -d' ' -f3 | grep '^68[0-9]*$'` - if [ ! "x$fpu" = "x" ]; then - echo "$ac_t""$fpu" 1>&6 - CFLAGS="$CFLAGS -m$fpu" +echo "configure:4672: 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 - @@ -3051,11 +4690,7 @@ fi -if [ "$FORMS_HEADER" = "forms.h" ]; then - FORMS_H_VARIANT=0 -else - FORMS_H_VARIANT=1 -fi + @@ -3076,11 +4711,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) 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 @@ -3135,7 +4784,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.12" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -3145,7 +4794,7 @@ done ac_given_srcdir=$srcdir -trap 'rm -fr `echo "src/Makefile Makefile src/include/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 <> $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%/[^/][^/]*$%%'` @@ -3238,6 +4925,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." @@ -3246,13 +4934,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. @@ -3273,11 +4963,17 @@ ac_eB='$%\1#\2define\3' ac_eC=' ' ac_eD='%g' -CONFIG_HEADERS=${CONFIG_HEADERS-"src/include/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 @@ -3285,7 +4981,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 @@ -3313,8 +5010,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 : @@ -3356,7 +5051,11 @@ cat >> $CONFIG_STATUS <<\EOF fi fi; done +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF exit 0 EOF @@ -3364,7 +5063,38 @@ 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 +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 + + +tmp_save_dir=`pwd` +cd $srcdir +abssrcdir=`pwd` +cd $tmp_save_dir + + + + + +ln -s $abssrcdir/src/$MACHDEP src/machdep +ln -s $abssrcdir/src/$OSDEP src/osdep +ln -s $abssrcdir/src/$THREADDEP src/threaddep +ln -s $abssrcdir/src/$SOUNDDEP src/sounddep +ln -s $abssrcdir/src/targets/$TARGETDEP src/target.h + +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