diff --git a/Makefile.in b/Makefile.in index c4bed3cada2..91b8c5763ae 100644 --- a/Makefile.in +++ b/Makefile.in @@ -27,6 +27,7 @@ LIBSUBDIRS = \ tools \ tools/wrc \ controls \ + console \ dlls/comctl32 \ dlls/imagehlp \ dlls/msacm \ @@ -89,6 +90,7 @@ INSTALLSUBDIRS = $(DOCSUBDIRS) LIBOBJS = \ controls/controls.o \ + console/console.o \ dlls/comctl32/comctl32.o \ dlls/imagehlp/imagehlp.o \ dlls/msacm/msacm.o \ diff --git a/configure b/configure index 5d07c4d07a7..e2c1d37b205 100755 --- a/configure +++ b/configure @@ -22,6 +22,8 @@ ac_help="$ac_help --disable-debug compile out all debugging messages" ac_help="$ac_help --disable-trace compile out TRACE messages" +ac_help="$ac_help + --with-ncurses compile in the ncurses terminal" ac_help="$ac_help --without-reentrant-x Compile for use with non-reentrant X libraries" ac_help="$ac_help @@ -601,6 +603,16 @@ if test "${enable_trace+set}" = set; then fi +# Check whether --with-ncurses or --without-ncurses was given. +if test "${with_ncurses+set}" = set; then + withval="$with_ncurses" + if test "$withval" = "yes"; then LIBS="$LIBS -lncurses"; cat >> confdefs.h <<\EOF +#define WINE_NCURSES 1 +EOF + fi +fi + + # Check whether --with-reentrant-x or --without-reentrant-x was given. if test "${with_reentrant_x+set}" = set; then withval="$with_reentrant_x" @@ -635,7 +647,7 @@ fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:639: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:651: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -664,7 +676,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:668: checking for $ac_word" >&5 +echo "configure:680: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -693,7 +705,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:697: checking for $ac_word" >&5 +echo "configure:709: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -741,7 +753,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:745: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:757: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -751,11 +763,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -775,12 +787,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:779: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:791: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:784: checking whether we are using GNU C" >&5 +echo "configure:796: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -789,7 +801,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:793: \"$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:805: \"$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 @@ -804,7 +816,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:808: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:820: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -832,7 +844,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:836: checking how to run the C preprocessor" >&5 +echo "configure:848: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -847,13 +859,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:857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -864,13 +876,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:874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -897,7 +909,7 @@ echo "$ac_t""$CPP" 1>&6 # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:901: checking for X" >&5 +echo "configure:913: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -959,12 +971,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:968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1033,14 +1045,14 @@ 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; } && test -s conftest; then +if { (eval echo configure:1056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -1146,17 +1158,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:1150: checking whether -R must be followed by a space" >&5 +echo "configure:1162: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_R_nospace=yes else @@ -1172,14 +1184,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_R_space=yes else @@ -1211,7 +1223,7 @@ rm -f conftest* # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:1215: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:1227: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1219,7 +1231,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1252,7 +1264,7 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:1256: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:1268: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1260,7 +1272,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1300,12 +1312,12 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:1304: checking for gethostbyname" >&5 +echo "configure:1316: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -1349,7 +1361,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:1353: checking for gethostbyname in -lnsl" >&5 +echo "configure:1365: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1357,7 +1369,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1398,12 +1410,12 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:1402: checking for connect" >&5 +echo "configure:1414: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -1447,7 +1459,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:1451: checking for connect in -lsocket" >&5 +echo "configure:1463: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1455,7 +1467,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1490,12 +1502,12 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:1494: checking for remove" >&5 +echo "configure:1506: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -1539,7 +1551,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:1543: checking for remove in -lposix" >&5 +echo "configure:1555: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1547,7 +1559,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1582,12 +1594,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:1586: checking for shmat" >&5 +echo "configure:1598: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -1631,7 +1643,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:1635: checking for shmat in -lipc" >&5 +echo "configure:1647: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1639,7 +1651,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1683,7 +1695,7 @@ fi # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:1687: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:1699: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1691,7 +1703,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1731,7 +1743,7 @@ 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:1735: checking for $ac_word" >&5 +echo "configure:1747: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1763,7 +1775,7 @@ test -n "$YACC" || YACC="yacc" # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1767: checking for $ac_word" >&5 +echo "configure:1779: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1796,7 +1808,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:1800: checking for yywrap in -l$ac_lib" >&5 +echo "configure:1812: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1804,7 +1816,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1840,7 +1852,7 @@ fi # 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:1844: checking for $ac_word" >&5 +echo "configure:1856: 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 @@ -1877,7 +1889,7 @@ fi # 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:1881: checking for a BSD compatible install" >&5 +echo "configure:1893: 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 @@ -1927,7 +1939,7 @@ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1931: checking whether ln -s works" >&5 +echo "configure:1943: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1950,7 +1962,7 @@ fi # Extract the first word of "c2man", so it can be a program name with args. set dummy c2man; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1954: checking for $ac_word" >&5 +echo "configure:1966: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_C2MAN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1979,7 +1991,7 @@ fi echo $ac_n "checking for i386_set_ldt in -li386""... $ac_c" 1>&6 -echo "configure:1983: checking for i386_set_ldt in -li386" >&5 +echo "configure:1995: checking for i386_set_ldt in -li386" >&5 ac_lib_var=`echo i386'_'i386_set_ldt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1987,7 +1999,7 @@ else ac_save_LIBS="$LIBS" LIBS="-li386 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2026,7 +2038,7 @@ else fi echo $ac_n "checking for iswalnum in -lw""... $ac_c" 1>&6 -echo "configure:2030: checking for iswalnum in -lw" >&5 +echo "configure:2042: checking for iswalnum in -lw" >&5 ac_lib_var=`echo w'_'iswalnum | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2034,7 +2046,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lw $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2075,12 +2087,12 @@ fi for ac_func in gethostbyname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2079: checking for $ac_func" >&5 +echo "configure:2091: 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; then +if { (eval echo configure:2119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2130,7 +2142,7 @@ done if test "$ac_cv_func_gethostbyname" = "no" then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:2134: checking for gethostbyname in -lnsl" >&5 +echo "configure:2146: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2138,7 +2150,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2178,7 +2190,7 @@ fi fi echo $ac_n "checking for setrunelocale in -lxpg4""... $ac_c" 1>&6 -echo "configure:2182: checking for setrunelocale in -lxpg4" >&5 +echo "configure:2194: checking for setrunelocale in -lxpg4" >&5 ac_lib_var=`echo xpg4'_'setrunelocale | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2186,7 +2198,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lxpg4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2225,7 +2237,7 @@ else fi echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:2229: checking for dlopen in -ldl" >&5 +echo "configure:2241: 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 @@ -2233,7 +2245,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2276,7 +2288,7 @@ if test "$have_x" = "yes" then XLIB="-lXpm -lXext -lX11" echo $ac_n "checking for XShmQueryExtension in -lXext""... $ac_c" 1>&6 -echo "configure:2280: checking for XShmQueryExtension in -lXext" >&5 +echo "configure:2292: checking for XShmQueryExtension in -lXext" >&5 ac_lib_var=`echo Xext'_'XShmQueryExtension | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2284,7 +2296,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXext $X_LIBS -lXext -lX11 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2319,7 +2331,7 @@ else fi echo $ac_n "checking for XF86DGAQueryExtension in -lXxf86dga""... $ac_c" 1>&6 -echo "configure:2323: checking for XF86DGAQueryExtension in -lXxf86dga" >&5 +echo "configure:2335: checking for XF86DGAQueryExtension in -lXxf86dga" >&5 ac_lib_var=`echo Xxf86dga'_'XF86DGAQueryExtension | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2327,7 +2339,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXxf86dga $X_LIBS -lXext -lX11 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2371,17 +2383,17 @@ for ac_hdr in sys/soundcard.h machine/soundcard.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2375: checking for $ac_hdr" >&5 +echo "configure:2387: 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:2385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2409,12 +2421,12 @@ done echo $ac_n "checking "for Open Sound System"""... $ac_c" 1>&6 -echo "configure:2413: checking "for Open Sound System"" >&5 +echo "configure:2425: checking "for Open Sound System"" >&5 if eval "test \"`echo '$''{'ac_cv_c_opensoundsystem'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_opensoundsystem="yes" else @@ -2458,12 +2470,12 @@ fi echo $ac_n "checking "for union semun"""... $ac_c" 1>&6 -echo "configure:2462: checking "for union semun"" >&5 +echo "configure:2474: checking "for union semun"" >&5 if eval "test \"`echo '$''{'ac_cv_c_union_semun'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2471,7 +2483,7 @@ int main() { union semun foo ; return 0; } EOF -if { (eval echo configure:2475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_union_semun="yes" else @@ -2499,7 +2511,7 @@ if test "x${GCC}" = "xyes" then CFLAGS="$CFLAGS -Wall" echo $ac_n "checking "for gcc strength-reduce bug"""... $ac_c" 1>&6 -echo "configure:2503: checking "for gcc strength-reduce bug"" >&5 +echo "configure:2515: checking "for gcc strength-reduce bug"" >&5 if eval "test \"`echo '$''{'ac_cv_c_gcc_strength_bug'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2507,7 +2519,7 @@ else ac_cv_c_gcc_strength_bug="yes" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_gcc_strength_bug="no" else @@ -2541,7 +2553,7 @@ fi echo $ac_n "checking "whether external symbols need an underscore prefix"""... $ac_c" 1>&6 -echo "configure:2545: checking "whether external symbols need an underscore prefix"" >&5 +echo "configure:2557: checking "whether external symbols need an underscore prefix"" >&5 if eval "test \"`echo '$''{'ac_cv_c_extern_prefix'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2553,14 +2565,14 @@ _ac_test: .long 0 EOF cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_c_extern_prefix="yes" else @@ -2584,7 +2596,7 @@ fi echo $ac_n "checking "whether assembler accepts .string"""... $ac_c" 1>&6 -echo "configure:2588: checking "whether assembler accepts .string"" >&5 +echo "configure:2600: checking "whether assembler accepts .string"" >&5 if eval "test \"`echo '$''{'ac_cv_c_asm_string'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2594,14 +2606,14 @@ cat > conftest_asm.s < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_c_asm_string="yes" else @@ -2628,21 +2640,21 @@ DLLFLAGS="" if test "$LIB_TARGET" = "libwine.so.1.0" then echo $ac_n "checking "whether we can build a dll"""... $ac_c" 1>&6 -echo "configure:2632: checking "whether we can build a dll"" >&5 +echo "configure:2644: checking "whether we can build a dll"" >&5 if eval "test \"`echo '$''{'ac_cv_c_dll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else saved_cflags=$CFLAGS CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_c_dll="yes" else @@ -2668,7 +2680,7 @@ fi echo $ac_n "checking "for reentrant libc"""... $ac_c" 1>&6 -echo "configure:2672: checking "for reentrant libc"" >&5 +echo "configure:2684: checking "for reentrant libc"" >&5 if eval "test \"`echo '$''{'wine_cv_libc_reentrant'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2676,14 +2688,14 @@ else wine_cv_libc_reentrant=yes else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then wine_cv_libc_reentrant=yes else @@ -2708,7 +2720,7 @@ fi echo $ac_n "checking "for reentrant X libraries"""... $ac_c" 1>&6 -echo "configure:2712: checking "for reentrant X libraries"" >&5 +echo "configure:2724: checking "for reentrant X libraries"" >&5 if eval "test \"`echo '$''{'wine_cv_x_reentrant'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2753,12 +2765,12 @@ fi for ac_func in clone getpagesize memmove sendmsg sigaltstack strerror stricmp tcgetattr timegm usleep wait4 waitpid vfscanf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2757: checking for $ac_func" >&5 +echo "configure:2769: 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; then +if { (eval echo configure:2797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2809,17 +2821,17 @@ for ac_hdr in wctype.h sys/syscall.h syscall.h sys/param.h sys/vfs.h sys/mount.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2813: checking for $ac_hdr" >&5 +echo "configure:2825: 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:2823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2846,12 +2858,12 @@ fi done echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 -echo "configure:2850: checking whether stat file-mode macros are broken" >&5 +echo "configure:2862: checking whether stat file-mode macros are broken" >&5 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2902,12 +2914,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2906: checking for working const" >&5 +echo "configure:2918: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2977,12 +2989,12 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2981: checking for ANSI C header files" >&5 +echo "configure:2993: 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 @@ -2990,7 +3002,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3007,7 +3019,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 @@ -3025,7 +3037,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 @@ -3046,7 +3058,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3057,7 +3069,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -3081,12 +3093,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3085: checking for size_t" >&5 +echo "configure:3097: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3114,7 +3126,7 @@ EOF fi echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:3118: checking size of long long" >&5 +echo "configure:3130: 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 @@ -3122,7 +3134,7 @@ else ac_cv_sizeof_long_long=0 else cat > conftest.$ac_ext < main() @@ -3133,7 +3145,7 @@ main() exit(0); } EOF -if { (eval echo configure:3137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -3156,7 +3168,7 @@ EOF if test $ac_cv_func_sendmsg = no; then echo $ac_n "checking for sendmsg in -lsocket""... $ac_c" 1>&6 -echo "configure:3160: checking for sendmsg in -lsocket" >&5 +echo "configure:3172: checking for sendmsg in -lsocket" >&5 ac_lib_var=`echo socket'_'sendmsg | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3164,7 +3176,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3208,12 +3220,12 @@ fi if test "$ac_cv_header_sys_vfs_h" = "yes" then echo $ac_n "checking "whether sys/vfs.h defines statfs"""... $ac_c" 1>&6 -echo "configure:3212: checking "whether sys/vfs.h defines statfs"" >&5 +echo "configure:3224: checking "whether sys/vfs.h defines statfs"" >&5 if eval "test \"`echo '$''{'wine_cv_sys_vfs_has_statfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3230,7 +3242,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_sys_vfs_has_statfs=yes else @@ -3257,12 +3269,12 @@ fi if test "$ac_cv_header_sys_statfs_h" = "yes" then echo $ac_n "checking "whether sys/statfs.h defines statfs"""... $ac_c" 1>&6 -echo "configure:3261: checking "whether sys/statfs.h defines statfs"" >&5 +echo "configure:3273: checking "whether sys/statfs.h defines statfs"" >&5 if eval "test \"`echo '$''{'wine_cv_sys_statfs_has_statfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3277,7 +3289,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_sys_statfs_has_statfs=yes else @@ -3304,12 +3316,12 @@ fi if test "$ac_cv_header_sys_mount_h" = "yes" then echo $ac_n "checking "whether sys/mount.h defines statfs"""... $ac_c" 1>&6 -echo "configure:3308: checking "whether sys/mount.h defines statfs"" >&5 +echo "configure:3320: checking "whether sys/mount.h defines statfs"" >&5 if eval "test \"`echo '$''{'wine_cv_sys_mount_has_statfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3324,7 +3336,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_sys_mount_has_statfs=yes else @@ -3350,7 +3362,7 @@ fi echo $ac_n "checking "for statfs.f_bfree"""... $ac_c" 1>&6 -echo "configure:3354: checking "for statfs.f_bfree"" >&5 +echo "configure:3366: checking "for statfs.f_bfree"" >&5 if eval "test \"`echo '$''{'wine_cv_statfs_bfree'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3359,7 +3371,7 @@ else wine_cv_statfs_bfree=no else cat > conftest.$ac_ext < @@ -3386,7 +3398,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_statfs_bfree=yes else @@ -3410,7 +3422,7 @@ EOF fi echo $ac_n "checking "for statfs.f_bavail"""... $ac_c" 1>&6 -echo "configure:3414: checking "for statfs.f_bavail"" >&5 +echo "configure:3426: checking "for statfs.f_bavail"" >&5 if eval "test \"`echo '$''{'wine_cv_statfs_bavail'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3419,7 +3431,7 @@ else wine_cv_statfs_bavail=no else cat > conftest.$ac_ext < @@ -3446,7 +3458,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_statfs_bavail=yes else @@ -3471,7 +3483,7 @@ fi echo $ac_n "checking "for working sigaltstack"""... $ac_c" 1>&6 -echo "configure:3475: checking "for working sigaltstack"" >&5 +echo "configure:3487: checking "for working sigaltstack"" >&5 if eval "test \"`echo '$''{'ac_cv_c_working_sigaltstack'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3480,7 +3492,7 @@ else else cat > conftest.$ac_ext < @@ -3518,7 +3530,7 @@ else } EOF -if { (eval echo configure:3522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_working_sigaltstack="yes" else @@ -3545,12 +3557,12 @@ fi echo $ac_n "checking "for msg_accrights in struct msghdr"""... $ac_c" 1>&6 -echo "configure:3549: checking "for msg_accrights in struct msghdr"" >&5 +echo "configure:3561: checking "for msg_accrights in struct msghdr"" >&5 if eval "test \"`echo '$''{'ac_cv_c_msg_accrights'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3558,7 +3570,7 @@ int main() { struct msghdr hdr; hdr.msg_accrights=0 ; return 0; } EOF -if { (eval echo configure:3562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_msg_accrights="yes" else @@ -3687,6 +3699,7 @@ ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo " Make.rules Makefile +console/Makefile controls/Makefile debugger/Makefile dlls/Makefile @@ -3836,6 +3849,7 @@ cat >> $CONFIG_STATUS < +#include "console.h" +#include "config.h" +#include "debug.h" + +void GENERIC_Start() +{ + /* Here, we only want to add a driver if there is not one already + defined. */ + + TRACE(console, "GENERIC_Start\n"); + + if (!driver.clearWindow) + driver.clearWindow = GENERIC_ClearWindow; + + if (!driver.scrollUpWindow) + driver.scrollUpWindow = GENERIC_ScrollUpWindow; + + if (!driver.scrollDownWindow) + driver.scrollDownWindow = GENERIC_ScrollDownWindow; + + if (!driver.getCharacter) + driver.getCharacter = GENERIC_GetCharacter; +} + +void GENERIC_ClearWindow(char row1, char col1, char row2, char col2, + int bg_color, int attribute) +{ + char trow, tcol; + char x, y; + int old_refresh; + + TRACE(console, "GENERIC_ClearWindow()\n"); + /* Abort if we have only partial functionality */ + if (!(driver.getCursorPosition && driver.moveCursor && driver.write)) + return; + + old_refresh = CONSOLE_GetRefresh(); + CONSOLE_SetRefresh(FALSE); + + CONSOLE_GetCursorPosition(&trow, &tcol); + + for (x = row1; x < row2; x++) + { + CONSOLE_MoveCursor(x, col1); + + for (y = col1; y < col2; y++) + { + CONSOLE_Write(' ', 0, bg_color, attribute); + } + } + CONSOLE_MoveCursor(trow, tcol); + + CONSOLE_SetRefresh(old_refresh); + + TRACE(console, "GENERIC_ClearWindow() completed.\n"); +} + +/* These are in-progress. I just haven't finished them yet... */ +void GENERIC_ScrollUpWindow(char row1, char col1, char row2, char col2, + char lines, int bg_color, int attribute) +{ + char trow, tcol; + int x, y; + char ch; + int bg, fg, attr; + int old_refresh; + + TRACE(console, "GENERIC_ScrollUpWindow()\n"); + + /* Abort if we have only partial functionality */ + if (!(driver.getCursorPosition && driver.moveCursor && driver.write + && driver.getCharacterAtCursor && driver.clearWindow)) + return; + + old_refresh = CONSOLE_GetRefresh(); + CONSOLE_SetRefresh(FALSE); + + CONSOLE_GetCursorPosition(&trow, &tcol); + + for (x = row1 + lines; x < row2; x++) + { + for (y = col1; y < col2; y++) + { + CONSOLE_MoveCursor(x, y); + CONSOLE_GetCharacterAtCursor(&ch, &fg, &bg, &attr); + CONSOLE_MoveCursor(x - lines, y); + CONSOLE_Write(ch, fg, bg, attr); + } + } + CONSOLE_ClearWindow(row2 - lines, col1, row2, col2, bg_color, + attribute); + CONSOLE_MoveCursor(trow, tcol); + + CONSOLE_SetRefresh(old_refresh); + + TRACE(console, "GENERIC_ScrollUpWindow() completed.\n"); +} + +void GENERIC_ScrollDownWindow(char row1, char col1, char row2, char col2, + char lines, int bg_color, int attribute) +{ + char trow, tcol; + int x, y; + char ch; + int bg, fg, attr; + int old_refresh; + + TRACE(console, "GENERIC_ScrollDownWindow()\n"); + + /* Abort if we have only partial functionality */ + if (!(driver.getCursorPosition && driver.moveCursor && driver.write + && driver.getCharacterAtCursor && driver.clearWindow)) + return; + + old_refresh = CONSOLE_GetRefresh(); + CONSOLE_SetRefresh(FALSE); + + CONSOLE_GetCursorPosition(&trow, &tcol); + + for (x = row2 - lines; x > row1; x--) + { + for (y = col1; y < col2; y++) + { + CONSOLE_MoveCursor(x, y); + CONSOLE_GetCharacterAtCursor(&ch, &fg, &bg, &attr); + CONSOLE_MoveCursor(x + lines, y); + CONSOLE_Write(ch, fg, bg, attr); + } + } + CONSOLE_ClearWindow(row1, col1, row1 + lines, col2, bg_color, + attribute); + CONSOLE_MoveCursor(trow, tcol); + + CONSOLE_SetRefresh(old_refresh); + + TRACE(console, "GENERIC_ScrollDownWindow() completed.\n"); + +} + +char GENERIC_GetCharacter() +{ + /* Keep getting keys until we get one with a char value */ + char ch = (char) 0, scan; + + while (!ch) + { + CONSOLE_GetKeystroke(&ch, &scan); + } + return ch; +} + diff --git a/console/interface.c b/console/interface.c new file mode 100644 index 00000000000..8829e9526cc --- /dev/null +++ b/console/interface.c @@ -0,0 +1,156 @@ +/* interface.c */ + +/* The primary purpose of this function is to provide CONSOLE_* + reotines that immediately call the appropiate driver handler. + This cleans up code in the individual modules considerably. + This could be done using a macro, but additional functionality + may be provided here in the future. */ + +#include "windows.h" +#include "console.h" +#include "config.h" + +void CONSOLE_Write(char out, int fg_color, int bg_color, int attribute) +{ + if (driver.write) + { + driver.write(out, fg_color, bg_color, attribute); + if (!driver.norefresh) + CONSOLE_Refresh(); + } +} + +void CONSOLE_Init() +{ + /* Eventually, this will be a command-line choice */ +#ifndef WINE_NCURSES + TTY_Start(); +#else + NCURSES_Start(); +#endif + GENERIC_Start(); + + if (driver.init) + driver.init(); +} + +void CONSOLE_Close() +{ + if (driver.close) + driver.close(); +} + +void CONSOLE_MoveCursor(char row, char col) +{ + if (driver.moveCursor) + { + driver.moveCursor(row, col); + if (!driver.norefresh) + CONSOLE_Refresh(); + } +} + +void CONSOLE_ClearWindow(char row1, char col1, char row2, char col2, + int bg_color, int attribute) +{ + if (driver.clearWindow) + { + driver.clearWindow(row1, col1, row2, col2, bg_color, attribute); + if (!driver.norefresh) + CONSOLE_Refresh(); + } +} + +void CONSOLE_ScrollUpWindow(char row1, char col1, char row2, char col2, + char lines, int bg_color, int attribute) +{ + if (driver.scrollUpWindow) + { + driver.scrollUpWindow(row1, col1, row2, col2, lines, bg_color, + attribute); + if (!driver.norefresh) + CONSOLE_Refresh(); + } +} + +void CONSOLE_ScrollDownWindow(char row1, char col1, char row2, char col2, + char lines, int bg_color, int attribute) +{ + if (driver.scrollDownWindow) + { + driver.scrollDownWindow(row1, col1, row2, col2, lines, bg_color, + attribute); + if (!driver.norefresh) + CONSOLE_Refresh(); + } +} + +int CONSOLE_CheckForKeystroke(char *scan, char *ascii) +/* These functions need to go through a conversion layer. Scancodes + should *not* be determined by the driver, rather they should have + a conv_* function in int16.c. Yuck. */ +{ + if (driver.checkForKeystroke) + return driver.checkForKeystroke(scan, ascii); + else + return FALSE; +} + +void CONSOLE_GetKeystroke(char *scan, char *ascii) +{ + if (driver.getKeystroke) + return driver.getKeystroke(scan, ascii); +} + +void CONSOLE_GetCursorPosition(char *row, char *col) +{ + if (driver.getCursorPosition) + return driver.getCursorPosition(row, col); +} + +void CONSOLE_GetCharacterAtCursor(char *ch, int *fg, int *bg, int *a) +{ + if (driver.getCharacterAtCursor) + return driver.getCharacterAtCursor(ch, fg, bg, a); +} + +void CONSOLE_Refresh() +{ + if (driver.refresh) + return driver.refresh(); +} + +/* This function is only at the CONSOLE level. */ +/* Admittably, calling the variable norefresh might be a bit dumb...*/ +void CONSOLE_SetRefresh(int setting) +{ + if (setting) + driver.norefresh = FALSE; + else + driver.norefresh = TRUE; +} + +/* This function is only at the CONSOLE level. */ +int CONSOLE_GetRefresh() +{ + if (driver.norefresh) + return FALSE; + else + return TRUE; +} + +void CONSOLE_ClearScreen() +{ + if (driver.clearScreen) + return driver.clearScreen(); +} + +char CONSOLE_GetCharacter() +{ + /* I'm not sure if we need this really. This is a function that can be + accelerated that returns the next *non extended* keystroke */ + if (driver.getCharacter) + return driver.getCharacter(); + else + return (char) 0; /* Sure, this will probably break programs... */ +} diff --git a/console/ncurses.c b/console/ncurses.c new file mode 100644 index 00000000000..d34299fe6cb --- /dev/null +++ b/console/ncurses.c @@ -0,0 +1,133 @@ +/* ncurses.c */ + +#include "config.h" + +#ifdef WINE_NCURSES + +/* This is the console driver for systems that support the ncurses + interface. +*/ + +/* Actually, this should work for curses, as well. But there may be + individual functions that are unsupported in plain curses or other + variants. Those should be detected and special-cased by autoconf. +*/ + +/* When creating new drivers, you need to assign all the functions that + that driver supports into the driver struct. If it is a supplementary + driver, it should make sure to perserve the old values. +*/ + +#include "console.h" +#include "debug.h" +#undef ERR /* Use ncurses's err() */ +#include + +void NCURSES_Start() +{ + /* This should be the root driver so we can ignore anything + already in the struct. */ + + driver.norefresh = FALSE; + + driver.init = NCURSES_Init; + driver.write = NCURSES_Write; + driver.close = NCURSES_Close; + driver.moveCursor = NCURSES_MoveCursor; + driver.getCursorPosition = NCURSES_GetCursorPosition; + driver.getCharacterAtCursor = NCURSES_GetCharacterAtCursor; + driver.clearScreen = NCURSES_ClearScreen; + + driver.checkForKeystroke = NCURSES_CheckForKeystroke; + driver.getKeystroke = NCURSES_GetKeystroke; + + driver.refresh = NCURSES_Refresh; +} + +void NCURSES_Init() +{ + initscr(); + cbreak(); + noecho(); + nonl(); + intrflush(stdscr, FALSE); + keypad(stdscr, TRUE); + nodelay(stdscr, TRUE); +} + +void NCURSES_Write(char output, int fg, int bg, int attribute) +{ + /* We can discard all extended information. */ + addch(output); +} + +void NCURSES_Close() +{ + endwin(); +} + +void NCURSES_GetKeystroke(char *scan, char *ascii) +{ + while (!NCURSES_CheckForKeystroke(scan, ascii)) + {} /* Wait until keystroke is detected */ + + /* When it is detected, we will already have the right value + in scan and ascii, but we need to take this keystroke + out of the buffer. */ + getch(); +} + +int NCURSES_CheckForKeystroke(char *scan, char *ascii) +{ + /* We don't currently support scan codes here */ + /* FIXME */ + int temp; + temp = getch(); + if (temp == ERR) + { + return FALSE; + } + else + { + ungetch(temp); /* Keystroke not removed from buffer */ + *ascii = (char) temp; + return TRUE; + } +} + +void NCURSES_MoveCursor(char row, char col) +{ + move(row, col); +} + +void NCURSES_GetCursorPosition(char *row, char *col) +{ + int trow, tcol; + + getyx(stdscr, trow, tcol); /* MACRO, no need to pass pointer */ + + *row = (char) trow; + *col = (char) tcol; +} + +void NCURSES_GetCharacterAtCursor(char *ch, int *fg_color, int + *bg_color, int *attribute) +{ + /* We will eventually have to convert the color data */ + *ch = (char) inch(); + *fg_color = 0; + *bg_color = 0; + *attribute = 0; +}; + +void NCURSES_Refresh() +{ + refresh(); +} + +void NCURSES_ClearScreen() +{ + erase(); +} + +#endif /* WINE_NCURSES */ diff --git a/console/tty.c b/console/tty.c new file mode 100644 index 00000000000..0a220a5e45f --- /dev/null +++ b/console/tty.c @@ -0,0 +1,41 @@ +/* tty.c */ + +/* This is the console driver for TTY-based consoles, i.e. consoles + without cursor placement, etc. It's also a pretty decent starting + point for other driers. +*/ + +/* When creating new drivers, you need to assign all the functions that + that driver supports into the driver struct. If it is a supplementary + driver, it should make sure to perserve the old values. */ + +#include +#include "console.h" +#include "config.h" +#include "wintypes.h" /* FALSE */ +#include "windows.h" /* _lread16() */ +void TTY_Start() +{ + /* This should be the root driver so we can ignore anything + already in the struct. */ + + driver.norefresh = FALSE; + + driver.write = TTY_Write; + driver.getKeystroke = TTY_GetKeystroke; +} + +void TTY_Write(char output, int fg, int bg, int attribute) +{ + /* We can discard all extended information. */ + printf("%c", output); +} + +void TTY_GetKeystroke(char *ch, char *scan) +{ + /* All we have are character input things, nothing for extended */ + /* This is just the TTY driver, after all. We'll cope. */ + _lread16(0, ch, 0); +} + + diff --git a/include/acconfig.h b/include/acconfig.h index 9934a3998c9..17861fb9216 100644 --- a/include/acconfig.h +++ b/include/acconfig.h @@ -53,3 +53,6 @@ /* Define if the struct statfs is defined by */ #undef STATFS_DEFINED_BY_SYS_MOUNT + +/* Define if we want to use ncurses instead of the TTY terminal */ +#undef WINE_NCURSES diff --git a/include/config.h.in b/include/config.h.in index 88fc085cf76..a6538fcab6b 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -66,6 +66,9 @@ /* Define if the struct statfs is defined by */ #undef STATFS_DEFINED_BY_SYS_MOUNT +/* Define if we want to use ncurses instead of the TTY terminal */ +#undef WINE_NCURSES + /* The number of bytes in a long long. */ #undef SIZEOF_LONG_LONG diff --git a/include/console.h b/include/console.h new file mode 100644 index 00000000000..6e34bfee3fc --- /dev/null +++ b/include/console.h @@ -0,0 +1,90 @@ +/* Console.H */ + +/* Include file for definitions pertaining to Wine's text-console + interface. +*/ + +#ifndef CONSOLE_H +#define CONSOLE_H + +#include "config.h" + +typedef struct CONSOLE_DRIVER +{ + void (*init)(); + void (*close)(); + void (*write)(char, int, int, int); + void (*moveCursor)(char, char); + void (*getCursorPosition)(char *, char *); + void (*getCharacterAtCursor)(char *, int *, int *, int *); + void (*clearScreen)(); + + /* Keyboard Functions */ + int (*checkForKeystroke)(char *, char *); + void (*getKeystroke)(char *, char *); + + /* Accellerator Functions (Screen) */ + void (*clearWindow)(char, char, char, char, int, int); + void (*scrollUpWindow)(char, char, char, char, char, int, int); + void (*scrollDownWindow)(char, char, char, char, char, int, int); + + /* Accellerator Functions (Keyboard) */ + char (*getCharacter)(); + + /* Other functions */ + void (*refresh)(); + + /* Other data */ + int norefresh; +} CONSOLE_device; + +CONSOLE_device driver; /* Global driver struct */ + +/* Generic defines */ +void CONSOLE_Init(); +void CONSOLE_Close(); +void CONSOLE_Write(char out, int fg_color, int bg_color, int attribute); +void CONSOLE_MoveCursor(char row, char col); +void CONSOLE_ClearWindow(char, char, char, char, int, int); +void CONSOLE_ScrollUpWindow(char, char, char, char, char, int, int); +void CONSOLE_ScrollDownWindow(char, char, char, char, char, int, int); +int CONSOLE_CheckForKeystroke(char *, char*); +void CONSOLE_GetKeystroke(char *, char *); +void CONSOLE_GetCursorPosition(char *, char *); +void CONSOLE_GetCharacterAtCursor(char *, int *, int *, int *); +void CONSOLE_Refresh(); +void CONSOLE_SetRefresh(int); +int CONSOLE_GetRefresh(); +void CONSOLE_ClearScreen(); +char CONSOLE_GetCharacter(); + +/* Generic Defines */ +void GENERIC_Start(); +void GENERIC_ClearWindow(char, char, char, char, int, int); +void GENERIC_ScrollUpWindow(char, char, char, char, char, int, int); +void GENERIC_ScrollDownWindow(char, char, char, char, char, int, int); +char GENERIC_GetCharacter(); + +/* TTY specific defines */ +void TTY_Write(char out, int fg_color, int bg_color, int attribute); +void TTY_Start(); +void TTY_GetKeystroke(char *, char *); + +#ifdef WINE_NCURSES + +/* ncurses defines */ +void NCURSES_Write(char out, int fg_color, int bg_color, int attribute); +void NCURSES_Start(); +void NCURSES_Init(); +void NCURSES_Close(); +int NCURSES_CheckForKeystroke(char *, char *); +void NCURSES_GetKeystroke(char *, char *); +void NCURSES_MoveCursor(char ,char); +void NCURSES_GetCursorPosition(char *, char *); +void NCURSES_GetCharacterAtCursor(char *, int *, int *, int *); +void NCURSES_Refresh(); +void NCURSES_ClearScreen(); + +#endif /* WINE_NCURSES */ + +#endif /* CONSOLE_H */ diff --git a/include/winnt.h b/include/winnt.h index 050614ff831..c98c36537fb 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -170,7 +170,9 @@ typedef HANDLE32 *PHANDLE; #define FL_reg(context) (*(WORD*)&EFL_reg(context)) #define SET_CFLAG(context) (EFL_reg(context) |= 0x0001) -#define RESET_CFLAG(context) (EFL_reg(context) &= 0xfffffffe) +#define RESET_CFLAG(context) (EFL_reg(context) &= ~0x0001) +#define SET_ZFLAG(context) (EFL_reg(context) |= 0x0040) +#define RESET_ZFLAG(context) (EFL_reg(context) &= ~0x0040) #define ISV86(context) (EFL_reg(context) & 0x00020000) #define V86BASE(context) ((context)->Dr7) /* ugly */ diff --git a/loader/main.c b/loader/main.c index 7ec2fa7afc7..8c0094f7d08 100644 --- a/loader/main.c +++ b/loader/main.c @@ -42,6 +42,7 @@ #include "task.h" #include "debug.h" #include "psdrv.h" +#include "console.h" int __winelib = 1; /* Winelib run-time flag */ @@ -80,6 +81,9 @@ BOOL32 MAIN_MainInit(void) /* registry initialisation */ SHELL_LoadRegistry(); + /* Set up text-mode stuff */ + CONSOLE_Init(); + return TRUE; } diff --git a/misc/main.c b/misc/main.c index c450386f818..4752c45d399 100644 --- a/misc/main.c +++ b/misc/main.c @@ -35,6 +35,7 @@ #include "version.h" #include "winnls.h" #include "x11drv.h" +#include "console.h" /* when adding new languages look at ole/ole2nls.c * for proper iso name and Windows code (add 0x0400 @@ -987,6 +988,7 @@ static void called_at_exit(void) WINSOCK_Shutdown(); /* FIXME: should check for other processes or threads */ DeleteCriticalSection( HEAP_SystemLock ); + CONSOLE_Close(); } static int WINE_X11_ErrorHandler(Display *display,XErrorEvent *error_evt)