--- uae/configure 2018/04/24 16:38:19 1.1.1.1 +++ uae/configure 2018/04/24 16:38:43 1.1.1.3 @@ -13,6 +13,14 @@ ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help --with-x use the X Window System" +ac_help="$ac_help +--enable-profiling Build a profiling (SLOW!) version" +ac_help="$ac_help +--disable-gui Don't use any GUI" +ac_help="$ac_help +--enable-dga Use the DGA extension" +ac_help="$ac_help +--enable-xfgui Use the XForms GUI instead of Tcl/Tk" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -447,7 +455,7 @@ echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=amiga/transdisk.c +ac_unique_file=amiga/source/transdisk.c # Find the source files, if location was not specified. if test -z "$srcdir"; then @@ -601,7 +609,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:613: \"$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 @@ -654,13 +662,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -669,13 +677,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -724,7 +732,7 @@ fi echo $ac_n "checking for AIX""... $ac_c" 1>&6 cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -810,7 +818,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lNeXT_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -837,6 +845,45 @@ else HAVE_NEXT_LIB=n fi +echo $ac_n "checking for -lamiga""... $ac_c" 1>&6 +ac_lib_var=`echo amiga'_'OpenLibrary | 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="-lamiga $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + 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_AMIGA_LIB=y +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_'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then @@ -845,7 +892,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lvga $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -884,7 +931,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lAF $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -980,12 +1027,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:989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1052,7 +1099,7 @@ 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:1111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -1181,7 +1228,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1229,7 +1276,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1268,7 +1315,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1312,7 +1359,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1355,7 +1402,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1391,6 +1438,14 @@ fi +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 @@ -1400,7 +1455,7 @@ if eval "test \"`echo '$''{'ac_cv_header echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1409,7 +1464,7 @@ int t() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1440,7 +1495,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1479,7 +1534,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1520,11 +1575,11 @@ else ac_cv_c_cross=yes else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:1583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_c_cross=no else @@ -1542,7 +1597,7 @@ if eval "test \"`echo '$''{'ac_cv_header echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1550,7 +1605,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1565,7 +1620,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1583,7 +1638,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 @@ -1604,7 +1659,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1615,7 +1670,7 @@ if (XOR (islower (i), ISLOWER (i)) || to exit (0); } EOF -{ (eval echo configure:1619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:1674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then : else @@ -1634,7 +1689,7 @@ EOF fi -for ac_hdr in unistd.h fcntl.h sys/time.h sys/types.h utime.h string.h strings.h values.h +for ac_hdr in unistd.h fcntl.h sys/time.h sys/types.h utime.h string.h strings.h values.h ncurses.h do ac_safe=`echo "$ac_hdr" | tr './\055' '___'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 @@ -1642,12 +1697,12 @@ if eval "test \"`echo '$''{'ac_cv_header echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1671,7 +1726,7 @@ else fi done -for ac_hdr in sys/vfs.h sys/mount.h sys/param.h sys/statfs.h sys/statvfs.h sys/stat.h linux/joystick.h +for ac_hdr in sys/vfs.h sys/mount.h sys/select.h sys/param.h sys/statfs.h sys/statvfs.h sys/stat.h linux/joystick.h do ac_safe=`echo "$ac_hdr" | tr './\055' '___'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 @@ -1679,12 +1734,12 @@ if eval "test \"`echo '$''{'ac_cv_header echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1708,13 +1763,50 @@ else fi done +for ac_hdr in X11/forms.h forms.h +do +ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +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; } +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 + 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 | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + cat >> confdefs.h <&6 +fi +done -if [ $ac_cv_header_linux_joystick_h = "yes" ]; then + +if [ "$ac_cv_header_linux_joystick_h" = "yes" ]; then echo $ac_n "checking whether linux/joystick.h is broken""... $ac_c" 1>&6 if grep "#include" /usr/include/linux/joystick.h >/dev/null; then echo "$ac_t""yes" 1>&6 BROKEN_JOYSTICK_H=1 - grep -v "#include" /usr/include/linux/joystick.h >include/joystick.h + grep -v "#include" /usr/include/linux/joystick.h >src/include/joystick.h else echo "$ac_t""no" 1>&6 BROKEN_JOYSTICK_H=0 @@ -1729,7 +1821,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1740,7 +1832,7 @@ main() exit(0); } EOF -{ (eval echo configure:1744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:1836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_sizeof_char=`cat conftestval` else @@ -1763,7 +1855,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1774,7 +1866,7 @@ main() exit(0); } EOF -{ (eval echo configure:1778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:1870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_sizeof_short=`cat conftestval` else @@ -1797,7 +1889,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1808,7 +1900,7 @@ main() exit(0); } EOF -{ (eval echo configure:1812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:1904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_sizeof_int=`cat conftestval` else @@ -1831,7 +1923,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1842,7 +1934,7 @@ main() exit(0); } EOF -{ (eval echo configure:1846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:1938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_sizeof_long=`cat conftestval` else @@ -1865,7 +1957,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1876,7 +1968,7 @@ main() exit(0); } EOF -{ (eval echo configure:1880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:1972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_sizeof_long_long=`cat conftestval` else @@ -1897,7 +1989,7 @@ if eval "test \"`echo '$''{'ac_cv_c_cons echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1973,7 +2065,7 @@ 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:2077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break fi @@ -2009,7 +2101,7 @@ if eval "test \"`echo '$''{'ac_cv_type_m echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2040,7 +2132,7 @@ if eval "test \"`echo '$''{'ac_cv_type_o echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2071,7 +2163,7 @@ if eval "test \"`echo '$''{'ac_cv_type_p echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2102,7 +2194,7 @@ if eval "test \"`echo '$''{'ac_cv_struct echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2111,7 +2203,7 @@ int t() { struct stat s; s.st_blocks; ; return 0; } EOF -if { (eval echo configure:2115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blocks=yes else @@ -2137,7 +2229,7 @@ if eval "test \"`echo '$''{'ac_cv_header echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2147,7 +2239,7 @@ int t() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2171,7 +2263,7 @@ if eval "test \"`echo '$''{'ac_cv_struct echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2180,7 +2272,7 @@ int t() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:2184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -2207,7 +2299,7 @@ if eval "test \"`echo '$''{'ac_cv_prog_g else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -2225,7 +2317,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -2254,7 +2346,7 @@ else ac_cv_func_memcmp=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_func_memcmp=yes else @@ -2282,7 +2374,7 @@ if eval "test \"`echo '$''{'ac_cv_type_s echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2300,7 +2392,7 @@ int t() { int i; ; return 0; } EOF -if { (eval echo configure:2304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2327,7 +2419,7 @@ if test "$cross_compiling" = yes; then ac_cv_func_utime_null=no else cat > conftest.$ac_ext < #include @@ -2338,7 +2430,7 @@ exit(!(stat ("conftestdata", &s) == 0 && && t.st_mtime - s.st_mtime < 120)); } EOF -{ (eval echo configure:2342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_func_utime_null=yes else @@ -2357,14 +2449,14 @@ EOF fi -for ac_func in gettimeofday mkdir rmdir select strerror strstr statfs +for ac_func in gettimeofday sigaction mkdir rmdir select strerror strstr statfs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 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:2484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2412,21 +2504,27 @@ done echo $ac_n "checking how many args statfs takes""... $ac_c" 1>&6 -if [ $ac_cv_func_statfs = "yes" ]; then +if [ "$ac_cv_func_statfs" = "yes" ]; then cat > conftest.$ac_ext < +#endif +#ifdef HAVE_SYS_PARAM_H +#include +#endif #ifdef HAVE_SYS_MOUNT_H #include #endif +#ifdef HAVE_SYS_SELECT_H +#include +#endif #ifdef HAVE_SYS_VFS_H #include #endif -#ifdef HAVE_SYS_PARAM_H -#include -#endif #ifdef HAVE_SYS_STATFS_H #include #endif @@ -2438,7 +2536,7 @@ int t() { struct statfs statbuf;statfs("/",&statbuf); ; return 0; } EOF -if { (eval echo configure:2442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""2" 1>&6 STATFS_NO_ARGS=2 @@ -2454,19 +2552,25 @@ fi echo $ac_n "checking whether to use f_bavail or f_bfree""... $ac_c" 1>&6 if [ $ac_cv_func_statfs = "yes" ]; then cat > conftest.$ac_ext < +#endif +#ifdef HAVE_SYS_PARAM_H +#include +#endif #ifdef HAVE_SYS_MOUNT_H #include #endif +#ifdef HAVE_SYS_SELECT_H +#include +#endif #ifdef HAVE_SYS_VFS_H #include #endif -#ifdef HAVE_SYS_PARAM_H -#include -#endif #ifdef HAVE_SYS_STATFS_H #include #endif @@ -2478,7 +2582,7 @@ int t() { struct statfs statbuf;statbuf.f_bavail; ; return 0; } EOF -if { (eval echo configure:2482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""f_bavail" 1>&6 STATBUF_BAVAIL=f_bavail @@ -2491,77 +2595,383 @@ rm -f conftest* 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_NEXT_LIB = "y" ]; then - echo "$ac_t""NeXTStep" 1>&6 - TARGET=next - GFXOBJS="NeXTwin.o" - LIBRARIES="-sectcreate __ICON __header Uae.app/Uae.iconheader -segprot __ICON r r -sectcreate __ICON app Uae.app/Uae.tiff -lMedia_s -lNeXT_s" - else - if [ x$no_x = "xyes" ]; then - if [ $HAVE_SVGA_LIB = "n" ]; then - echo "$ac_t""Ummm...." 1>&6 - echo "Neither X nor SVGAlib found, don't know what target to use." - exit 1 - else - echo "$ac_t""SVGAlib" 1>&6 - TARGET=svgalib - GFXOBJS="svga.o nogui.o" - LIBRARIES=-lvga - fi - else - echo "$ac_t""X Window System" 1>&6 - TARGET=x11 - LIBRARIES="$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS" - # Extract the first word of "wish4.0", so it can be a program name with args. +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_TCLGUI'+set}'`\" = set"; then +if eval "test \"`echo '$''{'ac_cv_prog_USE_GUI'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$TCLGUI"; then - ac_cv_prog_TCLGUI="$TCLGUI" # Let the user override the test. + if test -n "$USE_GUI"; then + ac_cv_prog_USE_GUI="$USE_GUI" # Let the user override the test. 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_TCLGUI="yes" + ac_cv_prog_USE_GUI="yes" break fi done IFS="$ac_save_ifs" - test -z "$ac_cv_prog_TCLGUI" && ac_cv_prog_TCLGUI="no" + test -z "$ac_cv_prog_USE_GUI" && ac_cv_prog_USE_GUI="no" +fi +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 +fi + +else + echo "Disabling the GUI." +fi + +MATHLIB=-lm + +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 + 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_'` +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; }; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + 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 + ac_tr_lib=HAVE_LIB`echo ncurses | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +HAVE_GUI=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 + 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 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" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + fi -TCLGUI="$ac_cv_prog_TCLGUI" -if test -n "$TCLGUI"; then - echo "$ac_t""$TCLGUI" 1>&6 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + HAVE_XFORMS=yes else echo "$ac_t""no" 1>&6 fi - if [ $TCLGUI = "yes" ]; then - GFXOBJS="xwin.o xui.o" + LIBS=$TMP_SAVE_LIBS + if [ "$ac_cv_header_forms_h" = "yes" ]; then + FORMS_HEADER=forms.h + else + FORMS_HEADER=X11/forms.h + fi + fi + if [ x$HAVE_XFORMS = "xyes" ]; then + echo '#include "'$FORMS_HEADER\" >conftest.c + cat >>conftest.c << EOF +int main() +{ + if (fl_library_version(NULL, NULL) == FL_INCLUDE_VERSION + && FL_INCLUDE_VERSION >= 80) + printf("OK\n"); +return 0; +} +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 + fi + + if [ x$USEDGA = "xyes" ]; then + TMP_SAVE_LIBS=$LIBS + LIBS="$X_LIBS $LIBS" + echo $ac_n "checking for -lXxf86dga""... $ac_c" 1>&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 <&5; (eval $ac_link) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + 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 + USEDGA=yes +else + echo "$ac_t""no" 1>&6 +USEDGA=no +fi + + LIBS=$TMP_SAVE_LIBS + 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" else + echo "You don't have XForms. Disabling GUI!" + USE_XFGUI=no + USE_GUI=no GFXOBJS="xwin.o nogui.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 + +if [ x$USE_XFGUI = "xyes" ]; then + DEBUGOBJS="xdebug.o" +else + DEBUGOBJS="debug.o" +fi + +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" -if [ "$CC" = "gcc" ]; then - CFLAGS="-O3 -fomit-frame-pointer -Wall -Wno-unused -Wno-format -W -Wmissing-prototypes -Wstrict-prototypes" - echo $ac_n "checking whether we are on a Linux/i386 ELF system""... $ac_c" 1>&6 - LINUXELF=n +cat >conftest.c << EOF +int main() +{ +#if defined(__GNUC__) && defined(__GNUC_MINOR__) +#if __GNUC__ > 2 || __GNUC_MINOR__ > 6 +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 + HAVEGCC27=y + echo "Good news. Found GCC 2.7 or better." +else + if [ "$CC" = "gcc" ]; 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." + 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" + fi +else + if [ "$CC" = "gcc" ]; then + CFLAGS="-O3 -fomit-frame-pointer -Wall -Wtraditional -Wno-unused -Wno-format -W -Wmissing-prototypes -Wstrict-prototypes" + fi +fi + +if [ x$HAVEGCC27 = "xy" ]; then + CFLAGS="$CFLAGS -DGCCCONSTFUNC=\"__attribute__((const))\"" +else + CFLAGS="$CFLAGS -DGCCCONSTFUNC=" +fi + +cat >conftest.c << EOF +int main() +{ +#ifdef __i386__ +printf("386\n"); +#endif +return 0; +} +EOF + +$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 + echo "You seem to be using a x86 CPU (UAE will require a 486 to run)" +else + echo "No special hacks for your CPU, sorry." +fi + +rm -f conftest* + + +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 int main() { return 0; } @@ -2582,12 +2992,54 @@ EOF 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" 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" else - echo "GCC wasn't found. UAE may or may not compile and run correctly." + ln -s md-generic src/machdep + CFLAGS="$CFLAGS -DREGPARAM=" +fi +fi +fi + +if [ $TARGET = "x11" -o $TARGET = "svgalib" ]; then + CFLAGS="$CFLAGS -DUSE_ZFILE" fi +if [ $TARGET = "amigaos" ]; then + CFLAGS="$CFLAGS -DUSE_ZFILE" + + echo $ac_n "checking which CPU to use""... $ac_c" 1>&6 + 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" + else + echo "$ac_t""none" 1>&6 + fi +fi + + + @@ -2597,6 +3049,16 @@ fi + + +if [ "$FORMS_HEADER" = "forms.h" ]; then + FORMS_H_VARIANT=0 +else + FORMS_H_VARIANT=1 +fi + + + trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -2683,7 +3145,7 @@ done ac_given_srcdir=$srcdir -trap 'rm -fr `echo "Makefile sysconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "src/Makefile Makefile src/include/sysconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then @@ -2805,7 +3273,7 @@ ac_eB='$%\1#\2define\3' ac_eC=' ' ac_eD='%g' -CONFIG_HEADERS=${CONFIG_HEADERS-"sysconfig.h"} +CONFIG_HEADERS=${CONFIG_HEADERS-"src/include/sysconfig.h"} for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[:infile]", defaulting infile="outfile.in". case "$ac_file" in @@ -2896,3 +3364,7 @@ chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +if [ x$DO_PROFILING = "xyes" ]; then + echo "Building a profiling version of UAE (select this option only if you know" + echo "what you are doing)" +fi