X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=sim%2Fucsim%2Fconfigure;h=0ffb4c1eb483456ee40c96af0710da5c45545c5c;hb=9f034219c943bb8ba958efaa6258c8f220633c17;hp=365d6ccfa1ce4025ea97896e33d4a97f32d3b296;hpb=f4f097b91aab55fb5fe55566e870dd201bafee19;p=fw%2Fsdcc diff --git a/sim/ucsim/configure b/sim/ucsim/configure index 365d6ccf..0ffb4c1e 100755 --- a/sim/ucsim/configure +++ b/sim/ucsim/configure @@ -11,6 +11,20 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: +ac_help="$ac_help + --enable-ucsim compile ucsim frontend" +ac_help="$ac_help + --enable-dlso compile dynamically loadable shared libraries" +ac_help="$ac_help + --disable-51 do not compile simulator for MCS51" +ac_help="$ac_help + --disable-avr do not compile simulator for AVR" +ac_help="$ac_help + --enable-z80 compile simulator for Z80" +ac_help="$ac_help + --enable-xa compile simulator for XA" +ac_help="$ac_help + --enable-serio compile serio GUI tool (needs curses)" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -523,12 +537,12 @@ fi -for ac_prog in gawk mawk nawk awk +for ac_prog in mawk gawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:532: checking for $ac_word" >&5 +echo "configure:546: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -559,7 +573,7 @@ done echo $ac_n "checking version of the package""... $ac_c" 1>&6 -echo "configure:563: checking version of the package" >&5 +echo "configure:577: checking version of the package" >&5 if test -f .version; then VERSION=`cat .version` echo "$ac_t""$VERSION" 1>&6 @@ -591,6 +605,86 @@ cat >> confdefs.h <&6 -echo "configure:603: checking for $ac_word" >&5 +echo "configure:697: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -631,7 +725,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:635: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:729: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -642,12 +736,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 646 "configure" +#line 740 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -673,12 +767,12 @@ if test $ac_cv_prog_cxx_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 ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:677: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:771: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:682: checking whether we are using GNU C++" >&5 +echo "configure:776: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -687,7 +781,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -706,7 +800,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:710: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:804: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -738,7 +832,7 @@ else fi echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 -echo "configure:742: checking how to run the C++ preprocessor" >&5 +echo "configure:836: checking how to run the C++ preprocessor" >&5 if test -z "$CXXCPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -751,12 +845,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -811,7 +905,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:815: checking for a BSD compatible install" >&5 +echo "configure:909: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -866,7 +960,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:870: checking for $ac_word" >&5 +echo "configure:964: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -901,6 +995,36 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross +# Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1002: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_STRIP="strip" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":" +fi +fi +STRIP="$ac_cv_prog_STRIP" +if test -n "$STRIP"; then + echo "$ac_t""$STRIP" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + # Checking for header files. # =========================================================================== @@ -910,12 +1034,12 @@ if test -d /stuff/include; then fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:914: checking for ANSI C header files" >&5 +echo "configure:1038: 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 @@ -923,7 +1047,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -940,7 +1064,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 @@ -958,7 +1082,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 @@ -979,7 +1103,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1020,17 +1144,17 @@ for ac_hdr in getopt.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1024: checking for $ac_hdr" >&5 +echo "configure:1148: 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:1034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1060,17 +1184,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1064: checking for $ac_hdr" >&5 +echo "configure:1188: 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:1074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1098,17 +1222,17 @@ done ac_safe=`echo "sys/socket.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/socket.h""... $ac_c" 1>&6 -echo "configure:1102: checking for sys/socket.h" >&5 +echo "configure:1226: checking for sys/socket.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:1112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1133,7 +1257,7 @@ EOF EOF cat > conftest.$ac_ext < EOF @@ -1158,17 +1282,50 @@ else echo "$ac_t""no" 1>&6 fi +ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 +echo "configure:1288: checking for dlfcn.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:1298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +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" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:1167: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1324: 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> @@ -1176,7 +1333,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1201,7 +1358,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:1205: checking for opendir in -ldir" >&5 +echo "configure:1362: 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 @@ -1209,7 +1366,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1245,7 +1402,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1249: checking for opendir in -lx" >&5 +echo "configure:1406: 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 @@ -1253,7 +1410,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1293,13 +1450,13 @@ fi # This must be after CXXCPP echo $ac_n "checking which header file defines FD_ macros""... $ac_c" 1>&6 -echo "configure:1297: checking which header file defines FD_ macros" >&5 -if eval "test \"`echo '$''{'s51_cv_fd'+set}'`\" = set"; then +echo "configure:1454: checking which header file defines FD_ macros" >&5 +if eval "test \"`echo '$''{'ucsim_cv_fd'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - s51_cv_fd="unknown" + ucsim_cv_fd="unknown" cat > conftest.$ac_ext < @@ -1310,12 +1467,12 @@ EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "yes" >/dev/null 2>&1; then rm -rf conftest* - s51_cv_fd="" + ucsim_cv_fd="" fi rm -f conftest* cat > conftest.$ac_ext < @@ -1326,12 +1483,12 @@ EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "yes" >/dev/null 2>&1; then rm -rf conftest* - s51_cv_fd="" + ucsim_cv_fd="" fi rm -f conftest* cat > conftest.$ac_ext < @@ -1342,19 +1499,19 @@ EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "yes" >/dev/null 2>&1; then rm -rf conftest* - s51_cv_fd="" + ucsim_cv_fd="" fi rm -f conftest* fi -echo "$ac_t""$s51_cv_fd" 1>&6 +echo "$ac_t""$ucsim_cv_fd" 1>&6 cat >> confdefs.h <<\EOF #define FD_HEADER_OK 0 EOF -if echo $s51_cv_fd|grep time >/dev/null 2>&1; then +if echo $ucsim_cv_fd|grep time >/dev/null 2>&1; then cat >> confdefs.h <<\EOF #define FD_NEED_TIME_H 1 EOF @@ -1369,7 +1526,7 @@ cat >> confdefs.h <<\EOF EOF fi -if echo $s51_cv_fd|grep types >/dev/null 2>&1; then +if echo $ucsim_cv_fd|grep types >/dev/null 2>&1; then cat >> confdefs.h <<\EOF #define FD_NEED_TYPES_H 1 EOF @@ -1384,7 +1541,7 @@ cat >> confdefs.h <<\EOF EOF fi -if echo $s51_cv_fd|grep select >/dev/null 2>&1; then +if echo $ucsim_cv_fd|grep select >/dev/null 2>&1; then cat >> confdefs.h <<\EOF #define FD_NEED_SELECT_H 1 EOF @@ -1401,7 +1558,7 @@ EOF fi cat >> confdefs.h <&6 -echo "configure:1413: checking for socket in -lsocket" >&5 +echo "configure:1570: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1417,7 +1574,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1459,7 +1616,7 @@ else fi echo $ac_n "checking for xdr_short in -lnsl""... $ac_c" 1>&6 -echo "configure:1463: checking for xdr_short in -lnsl" >&5 +echo "configure:1620: checking for xdr_short in -lnsl" >&5 ac_lib_var=`echo nsl'_'xdr_short | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1467,7 +1624,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1508,8 +1665,56 @@ else echo "$ac_t""no" 1>&6 fi +echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +echo "configure:1670: checking for dlopen in -ldl" >&5 +ac_lib_var=`echo dl'_'dlopen | 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="-ldl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + dl_ok="yes" +DL="-ldl" +else + echo "$ac_t""no" 1>&6 +dl_ok="no" +DL="" +fi + + + echo $ac_n "checking for panel_above in -lpanel""... $ac_c" 1>&6 -echo "configure:1513: checking for panel_above in -lpanel" >&5 +echo "configure:1718: checking for panel_above in -lpanel" >&5 ac_lib_var=`echo panel'_'panel_above | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1517,7 +1722,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpanel -lcurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1554,7 +1759,7 @@ else echo "$ac_t""no" 1>&6 panel_ok="no" echo $ac_n "checking for nl in -lcurses""... $ac_c" 1>&6 -echo "configure:1558: checking for nl in -lcurses" >&5 +echo "configure:1763: checking for nl in -lcurses" >&5 ac_lib_var=`echo curses'_'nl | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1562,7 +1767,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1607,12 +1812,12 @@ fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:1611: checking for vprintf" >&5 +echo "configure:1816: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -1662,12 +1867,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:1666: checking for _doprnt" >&5 +echo "configure:1871: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -1720,12 +1925,12 @@ fi for ac_func in vsnprintf vasprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1724: checking for $ac_func" >&5 +echo "configure:1929: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1778,12 +1983,12 @@ done for ac_func in strlen strcpy strcat strstr strcmp strerror strtok strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1782: checking for $ac_func" >&5 +echo "configure:1987: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1836,12 +2041,12 @@ done for ac_func in strchr memcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1840: checking for $ac_func" >&5 +echo "configure:2045: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1894,12 +2099,12 @@ done for ac_func in fgets do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1898: checking for $ac_func" >&5 +echo "configure:2103: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1952,12 +2157,12 @@ done for ac_func in yylex do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1956: checking for $ac_func" >&5 +echo "configure:2161: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2009,16 +2214,16 @@ done echo $ac_n "checking whether scanf knows %a""... $ac_c" 1>&6 -echo "configure:2013: checking whether scanf knows %a" >&5 -if eval "test \"`echo '$''{'s51_cv_scanf_a'+set}'`\" = set"; then +echo "configure:2218: checking whether scanf knows %a" >&5 +if eval "test \"`echo '$''{'ucsim_cv_scanf_a'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo "a b" >conftest.data if test "$cross_compiling" = yes; then - s51_cv_scanf_a="unknown" + ucsim_cv_scanf_a="unknown" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then - s51_cv_scanf_a="yes" + ucsim_cv_scanf_a="yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - s51_cv_scanf_a="no" + ucsim_cv_scanf_a="no" fi rm -fr conftest* fi @@ -2056,8 +2261,8 @@ fi fi -echo "$ac_t""$s51_cv_scanf_a" 1>&6 -if test "$s51_cv_scanf_a" = "yes"; then +echo "$ac_t""$ucsim_cv_scanf_a" 1>&6 +if test "$ucsim_cv_scanf_a" = "yes"; then cat >> confdefs.h <<\EOF #define SCANF_A 1 EOF @@ -2065,15 +2270,15 @@ EOF fi echo $ac_n "checking whether getcwd is GNUish""... $ac_c" 1>&6 -echo "configure:2069: checking whether getcwd is GNUish" >&5 -if eval "test \"`echo '$''{'s51_cv_getcwd'+set}'`\" = set"; then +echo "configure:2274: checking whether getcwd is GNUish" >&5 +if eval "test \"`echo '$''{'ucsim_cv_getcwd'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then - s51_cv_getcwd="unknown" + ucsim_cv_getcwd="unknown" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then - s51_cv_getcwd="yes" + ucsim_cv_getcwd="yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - s51_cv_getcwd="no" + ucsim_cv_getcwd="no" fi rm -fr conftest* fi @@ -2102,8 +2307,8 @@ fi fi -echo "$ac_t""$s51_cv_getcwd" 1>&6 -if test "$s51_cv_getcwd" = "yes"; then +echo "$ac_t""$ucsim_cv_getcwd" 1>&6 +if test "$ucsim_cv_getcwd" = "yes"; then cat >> confdefs.h <<\EOF #define GNU_GETCWD 1 EOF @@ -2111,18 +2316,19 @@ EOF fi +#' echo $ac_n "checking for type of length pointer parameter of accept""... $ac_c" 1>&6 -echo "configure:2117: checking for type of length pointer parameter of accept" >&5 -if eval "test \"`echo '$''{'s51_cv_accept_length_type'+set}'`\" = set"; then +echo "configure:2323: checking for type of length pointer parameter of accept" >&5 +if eval "test \"`echo '$''{'ucsim_cv_accept_length_type'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_CPPFLAGS="$CPPFLAGS" - s51_cv_accept_length_type=no + ucsim_cv_accept_length_type=no for ac_val in int size_t socklen_t; do CPPFLAGS="$ac_save_CPPFLAGS -DACCEPT_SOCKLEN_T=$ac_val" cat > conftest.$ac_ext < #include @@ -2130,9 +2336,9 @@ int main() { struct sockaddr a; $ac_val len; accept (0, &a, &len); ; return 0; } EOF -if { (eval echo configure:2134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - s51_cv_accept_length_type=$ac_val; break + ucsim_cv_accept_length_type=$ac_val; break else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 @@ -2142,11 +2348,10 @@ rm -f conftest* CPPFLAGS="$ac_save_CPPFLAGS" fi -echo "$ac_t""$s51_cv_accept_length_type" 1>&6 - - if test $s51_cv_accept_length_type != no; then +echo "$ac_t""$ucsim_cv_accept_length_type" 1>&6 + if test "$ucsim_cv_accept_length_type" != no; then cat >> confdefs.h <&6 -echo "configure:2170: checking whether byte ordering is bigendian" >&5 + +# Cross compiling overrides +# FIXME +if test "$CC" = "i586-mingw32msvc-gcc"; then + ac_cv_c_bigendian=no + ac_cv_sizeof_char=1 + ac_cv_sizeof_short=2 + ac_cv_sizeof_int=4 + ac_cv_sizeof_long=4 + ac_cv_sizeof_long_long=4 +fi + +if test "$cross_compiling" == "no" +then + echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 +echo "configure:2389: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -2184,11 +2403,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -2199,7 +2418,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -2219,7 +2438,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -2258,32 +2477,42 @@ EOF fi +else +#echo "CROSS ENDIAN" + if $CXX -v 2>&1|grep "mingw" >/dev/null 2>&1; then + ac_cv_c_bigendian=no + else + : # FIXME + fi +#echo "CROSS ENDIAN DONE" +fi + echo $ac_n "checking whether preprocessor accepts -MM or -M""... $ac_c" 1>&6 -echo "configure:2263: checking whether preprocessor accepts -MM or -M" >&5 -if eval "test \"`echo '$''{'s51_cv_MM'+set}'`\" = set"; then +echo "configure:2492: checking whether preprocessor accepts -MM or -M" >&5 +if eval "test \"`echo '$''{'ucsim_cv_MM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo "#include " >_test_.c echo "" >>_test_.c $CXXCPP -v -MM _test_.c 1>&5 2>&5 if test "$?" = "0"; then - s51_cv_MM="-MM" + ucsim_cv_MM="-MM" else - s51_cv_MM="-M" + ucsim_cv_MM="-M" fi rm -f _test_.* fi -echo "$ac_t""$s51_cv_MM" 1>&6 -M_OR_MM=$s51_cv_MM +echo "$ac_t""$ucsim_cv_MM" 1>&6 +M_OR_MM=$ucsim_cv_MM # This is the first time when CFLAGS are set/modified!! echo $ac_n "checking whether $CXX accepts -ggdb""... $ac_c" 1>&6 -echo "configure:2286: checking whether $CXX accepts -ggdb" >&5 -if eval "test \"`echo '$''{'s51_cv_CXXggdb'+set}'`\" = set"; then +echo "configure:2515: checking whether $CXX accepts -ggdb" >&5 +if eval "test \"`echo '$''{'ucsim_cv_CXXggdb'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat >_test_.c <&5 2>&5 if test "$?" = "0"; then - s51_cv_CXXggdb="yes" + ucsim_cv_CXXggdb="yes" else - s51_cv_CXXggdb="no" + ucsim_cv_CXXggdb="no" fi rm -f _test_.* a.out fi -echo "$ac_t""$s51_cv_CXXggdb" 1>&6 +echo "$ac_t""$ucsim_cv_CXXggdb" 1>&6 -if test "$s51_cv_CXXggdb" = "yes"; then +if test "$ucsim_cv_CXXggdb" = "yes"; then if test "$CXXFLAGS"x = x ;then - CXXFLAGS="-ggdb -O" + CXXFLAGS="-ggdb" else CXXFLAGS="$CXXFLAGS -ggdb" fi @@ -2311,8 +2540,8 @@ fi echo $ac_n "checking whether $CXX accepts -pipe""... $ac_c" 1>&6 -echo "configure:2315: checking whether $CXX accepts -pipe" >&5 -if eval "test \"`echo '$''{'s51_cv_CXXpipe'+set}'`\" = set"; then +echo "configure:2544: checking whether $CXX accepts -pipe" >&5 +if eval "test \"`echo '$''{'ucsim_cv_CXXpipe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat >_test_.c <&5 2>&5 if test "$?" = "0"; then - s51_cv_CXXpipe="yes" + ucsim_cv_CXXpipe="yes" else - s51_cv_CXXpipe="no" + ucsim_cv_CXXpipe="no" fi rm -f _test_.* a.out fi -echo "$ac_t""$s51_cv_CXXpipe" 1>&6 +echo "$ac_t""$ucsim_cv_CXXpipe" 1>&6 -if test "$s51_cv_CXXpipe" = "yes"; then +if test "$ucsim_cv_CXXpipe" = "yes"; then CXXFLAGS="$CXXFLAGS -pipe" fi +PICOPT="" +SHAREDLIB="no" + +echo $ac_n "checking whether $CXX accepts -fPIC""... $ac_c" 1>&6 +echo "configure:2571: checking whether $CXX accepts -fPIC" >&5 +if eval "test \"`echo '$''{'ucsim_cv_CXXfPIC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat >_test_.c < +void main(void) {} +EOF +$CXX -v -fPIC -c _test_.c 1>&5 2>&5 +if test "$?" = "0"; then + ucsim_cv_CXXfPIC="yes" +else + ucsim_cv_CXXfPIC="no" +fi +rm -f _test_.* a.out +fi + +echo "$ac_t""$ucsim_cv_CXXfPIC" 1>&6 + +if test "$ucsim_cv_CXXfPIC" = "yes"; then + PICOPT="-fPIC" +else + +echo $ac_n "checking whether $CXX accepts -fpic""... $ac_c" 1>&6 +echo "configure:2595: checking whether $CXX accepts -fpic" >&5 +if eval "test \"`echo '$''{'ucsim_cv_CXXfpic'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat >_test_.c < +void main(void) {} +EOF +$CXX -v -fpic -c _test_.c 1>&5 2>&5 +if test "$?" = "0"; then + ucsim_cv_CXXfpic="yes" +else + ucsim_cv_CXXfpic="no" +fi +rm -f _test_.* a.out +fi + +echo "$ac_t""$ucsim_cv_CXXfpic" 1>&6 + + if test "$ucsim_cv_CXXfpic" = "yes"; then + PICOPT="-fpic" + fi +fi +if test "$PICOPT"x != "x"; then + SHAREDLIB="yes" +fi +# If this is Cygwin neither use Position Independant Code +# nor build .so +# Quick + dirty by Bernhard +# FIXME +if $CXX -v 2>&1 | grep -i cygwin 1>&5 2>&5; then + PICOPT="" + SHAREDLIB="no" +fi + + + +dlso_ok="no" +if test $SHAREDLIB = "yes" -a $dl_ok = "yes" -a $enable_dlso = "yes"; then + dlso_ok="yes" +fi + # Checks for typedefs, structures, and compiler characteristics. # =========================================================================== echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2343: checking return type of signal handlers" >&5 +echo "configure:2642: 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 @@ -2361,7 +2660,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2379,8 +2678,9 @@ cat >> confdefs.h <&6 -echo "configure:2384: checking size of char" >&5 +echo "configure:2684: 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 @@ -2388,12 +2688,13 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -2402,7 +2703,7 @@ main() exit(0); } EOF -if { (eval echo configure:2406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_char=`cat conftestval` else @@ -2422,7 +2723,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:2426: checking size of short" >&5 +echo "configure:2727: 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 @@ -2430,12 +2731,13 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -2444,7 +2746,7 @@ main() exit(0); } EOF -if { (eval echo configure:2448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -2464,7 +2766,7 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:2468: checking size of int" >&5 +echo "configure:2770: 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 @@ -2472,12 +2774,13 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -2486,7 +2789,7 @@ main() exit(0); } EOF -if { (eval echo configure:2490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -2506,7 +2809,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2510: checking size of long" >&5 +echo "configure:2813: 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 @@ -2514,12 +2817,13 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -2528,7 +2832,7 @@ main() exit(0); } EOF -if { (eval echo configure:2532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -2548,7 +2852,7 @@ EOF echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:2552: checking size of long long" >&5 +echo "configure:2856: 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 @@ -2556,12 +2860,13 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -2570,7 +2875,7 @@ main() exit(0); } EOF -if { (eval echo configure:2574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -2589,6 +2894,18 @@ cat >> confdefs.h <&1|grep "mingw" >/dev/null 2>&1; then + ac_cv_sizeof_char=1 + ac_cv_sizeof_short=2 + ac_cv_sizeof_int=4 + ac_cv_sizeof_long=4 + ac_cv_sizeof_long_long=4 + else + : # FIXME + fi +#echo +fi type_name() { @@ -2616,15 +2933,15 @@ type_name() } echo $ac_n "checking type name for byte""... $ac_c" 1>&6 -echo "configure:2620: checking type name for byte" >&5 +echo "configure:2937: checking type name for byte" >&5 TYPE_BYTE=`type_name 1` echo "$ac_t""$TYPE_BYTE" 1>&6 echo $ac_n "checking type name for word""... $ac_c" 1>&6 -echo "configure:2624: checking type name for word" >&5 +echo "configure:2941: checking type name for word" >&5 TYPE_WORD=`type_name 2` echo "$ac_t""$TYPE_WORD" 1>&6 echo $ac_n "checking type name for dword""... $ac_c" 1>&6 -echo "configure:2628: checking type name for dword" >&5 +echo "configure:2945: checking type name for dword" >&5 TYPE_DWORD=`type_name 4` echo "$ac_t""$TYPE_DWORD" 1>&6 cat >> confdefs.h <> confdefs.h </dev/null; then + A="h" +elif echo $TYPE_DWORD|grep long >/dev/null; then + A="l" +else + A="" +fi + +if echo $TYPE_WORD|grep short >/dev/null; then M="h" +elif echo $TYPE_WORD|grep long >/dev/null; then M="l" +else M="" +fi + +cat >> confdefs.h <> confdefs.h <> $CONFIG_STATUS <