--- uae/configure 2018/04/24 16:38:36 1.1.1.2 +++ uae/configure 2018/04/24 16:38:43 1.1.1.3 @@ -14,9 +14,13 @@ ac_default_prefix=/usr/local ac_help="$ac_help --with-x use the X Window System" ac_help="$ac_help ---disable-gui Don't use the Tcl/Tk GUI" +--enable-profiling Build a profiling (SLOW!) version" ac_help="$ac_help ---disable-DGA Don't use the DGA extension" +--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 @@ -605,7 +609,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:609: \"$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 @@ -658,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:668: \"$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 : @@ -673,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:683: \"$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 : @@ -728,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 @@ -814,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 @@ -841,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 @@ -849,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 @@ -888,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 @@ -984,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:993: \"$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* @@ -1056,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. @@ -1185,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 @@ -1233,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 @@ -1272,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 @@ -1316,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 @@ -1359,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 @@ -1395,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 @@ -1404,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> @@ -1413,7 +1464,7 @@ int t() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1417: \"$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 @@ -1444,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 @@ -1483,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 @@ -1524,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 @@ -1546,7 +1597,7 @@ if eval "test \"`echo '$''{'ac_cv_header echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1554,7 +1605,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1558: \"$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* @@ -1569,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 @@ -1587,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 @@ -1608,7 +1659,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1619,7 +1670,7 @@ if (XOR (islower (i), ISLOWER (i)) || to exit (0); } EOF -{ (eval echo configure:1623: \"$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 @@ -1638,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 @@ -1646,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:1655: \"$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* @@ -1683,12 +1734,49 @@ 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: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* + 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 + +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:1692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (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* @@ -1713,12 +1801,12 @@ 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 @@ -1733,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() @@ -1744,7 +1832,7 @@ main() exit(0); } EOF -{ (eval echo configure:1748: \"$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 @@ -1767,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() @@ -1778,7 +1866,7 @@ main() exit(0); } EOF -{ (eval echo configure:1782: \"$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 @@ -1801,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() @@ -1812,7 +1900,7 @@ main() exit(0); } EOF -{ (eval echo configure:1816: \"$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 @@ -1835,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() @@ -1846,7 +1934,7 @@ main() exit(0); } EOF -{ (eval echo configure:1850: \"$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 @@ -1869,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() @@ -1880,7 +1968,7 @@ main() exit(0); } EOF -{ (eval echo configure:1884: \"$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 @@ -1901,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 @@ -1977,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 @@ -2013,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 @@ -2044,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 @@ -2075,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 @@ -2106,7 +2194,7 @@ if eval "test \"`echo '$''{'ac_cv_struct echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2115,7 +2203,7 @@ int t() { struct stat s; s.st_blocks; ; return 0; } EOF -if { (eval echo configure:2119: \"$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 @@ -2141,7 +2229,7 @@ if eval "test \"`echo '$''{'ac_cv_header echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2151,7 +2239,7 @@ int t() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2155: \"$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 @@ -2175,7 +2263,7 @@ if eval "test \"`echo '$''{'ac_cv_struct echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2184,7 +2272,7 @@ int t() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:2188: \"$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 @@ -2211,7 +2299,7 @@ if eval "test \"`echo '$''{'ac_cv_prog_g else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -2229,7 +2317,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -2258,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 @@ -2286,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 @@ -2304,7 +2392,7 @@ int t() { int i; ; return 0; } EOF -if { (eval echo configure:2308: \"$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 @@ -2331,7 +2419,7 @@ if test "$cross_compiling" = yes; then ac_cv_func_utime_null=no else cat > conftest.$ac_ext < #include @@ -2342,7 +2430,7 @@ exit(!(stat ("conftestdata", &s) == 0 && && t.st_mtime - s.st_mtime < 120)); } EOF -{ (eval echo configure:2346: \"$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 @@ -2361,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 @@ -2416,9 +2504,9 @@ 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 <&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 @@ -2464,7 +2552,7 @@ 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 <&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 @@ -2514,7 +2602,7 @@ if test "${enable_gui+set}" = set; then USE_GUI=$enableval fi -if [ $USE_GUI = "yes" ]; then +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 @@ -2547,28 +2635,33 @@ 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_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 [ $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 - 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 + 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 @@ -2576,7 +2669,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2613,36 +2706,119 @@ else HAVE_GUI=no fi - if [ $USE_GUI = "yes" ]; then - GFXOBJS="svga.o tui.o svgancui.o" - LIBRARIES="-lvga -lncurses" - else - GFXOBJS="svga.o nogui.o" - LIBRARIES="-lvga" - 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 - echo "$ac_t""X Window System" 1>&6 - TARGET=x11 - USEDGA=no - # Check whether --enable-DGA or --disable-DGA was given. -if test "${enable_DGA+set}" = set; then - enableval="$enable_DGA" + 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 [ $USEDGA = "yes" ]; then - TMP_SAVE_LIBS=$LIBS - LIBS=$X_LIBS $LIBS - echo $ac_n "checking for -lXxf86dga""... $ac_c" 1>&6 + 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 +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 + + 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" +LIBS="-lXxf86dga -lXext -lX11 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2673,37 +2849,129 @@ else USEDGA=no fi - LIBS=$TMP_SAVE_LIBS - fi - if [ $USEDGA = "yes" ]; then - LIBRARIES="$X_LIBS $X_PRE_LIBS -lXxf86dga -lXext -lX11 $X_EXTRA_LIBS" - X_CFLAGS="$X_CFLAGS -DUSE_DGA_EXTENSION" - USE_GUI=no - else - LIBRARIES="$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS" - USE_GUI=yes - fi - if [ $USE_GUI = "yes" ]; then - GFXOBJS="xwin.o xui.o" + 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 - if [ $USEDGA = "yes" ]; then - GFXOBJS="xdga.o nogui.o" - else - GFXOBJS="xwin.o nogui.o" - fi + 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" + +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 -if [ "$CC" = "gcc" ]; then - CFLAGS="-O3 -fomit-frame-pointer -Wall -Wno-unused -Wno-format -W -Wmissing-prototypes -Wstrict-prototypes -fno-strength-reduce" - echo $ac_n "checking whether we are on a Linux/i386 ELF system""... $ac_c" 1>&6 - LINUXELF=n +$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; } @@ -2724,17 +2992,53 @@ EOF else echo "$ac_t""yes" 1>&6 ASMOBJS=X86.o - CPUOBJS="cpu_fast0.o cpu_fast1.o cpu_fast2.o cpu_fast3.o cpu_fast4.o cpu_fast5.o cpu_fast6.o cpu_fast7.o cpu_fast8.o cpu_fast9.o cpu_fastA.o cpu_fastB.o cpu_fastC.o cpu_fastD.o cpu_fastE.o cpu_fastF.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 "Couldn't find GCC. 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 + + @@ -2746,6 +3050,15 @@ 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 @@ -2880,6 +3193,11 @@ s%@TARGET@%$TARGET%g s%@GFXOBJS@%$GFXOBJS%g s%@ASMOBJS@%$ASMOBJS%g s%@CPUOBJS@%$CPUOBJS%g +s%@CPUOBJS1@%$CPUOBJS1%g +s%@DEBUGOBJS@%$DEBUGOBJS%g +s%@MATHLIB@%$MATHLIB%g +s%@FORMS_H_VARIANT@%$FORMS_H_VARIANT%g +s%@top_srcdir@%$top_srcdir%g CEOF EOF @@ -3046,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