From f3855ef064498aadea229d8202eedd78aed3f8e1 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sat, 26 Dec 1998 20:09:03 +0000 Subject: [PATCH] Makefile tweaks Threads work now under wxGTK and glibc 2 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- Makefile | 2 + configure | 694 ++++++++++++++++++++++------------------ configure.in | 13 +- include/wx/gtk/frame.h | 2 + include/wx/gtk1/frame.h | 2 + include/wx/thread.h | 2 - samples/thread/test.cpp | 27 +- src/Makefile.in | 3 +- src/common/socket.cpp | 4 +- src/gtk/app.cpp | 12 +- src/gtk/threadgui.inc | 41 +-- src/gtk/threadpsx.cpp | 383 +++++++++++----------- src/gtk1/app.cpp | 12 +- src/gtk1/threadgui.inc | 41 +-- src/gtk1/threadpsx.cpp | 383 +++++++++++----------- 15 files changed, 844 insertions(+), 777 deletions(-) diff --git a/Makefile b/Makefile index fdc7eff863..7e6e25afaa 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,8 @@ SHELL=/bin/sh +DIRS=src + #if DIRS are defind make only executes in these diretories all:: @if test "x$(DIRS)" = x; then \ diff --git a/configure b/configure index 347b49f2f3..19d5a956c2 100755 --- a/configure +++ b/configure @@ -679,6 +679,9 @@ SEARCH_INCLUDE="\ /usr/XFree86/include/X11 \ \ /usr/include \ + /usr/include/gtk \ + /usr/include/gdk \ + /usr/include/glib \ /usr/local/include \ /usr/unsupported/include \ /usr/athena/include \ @@ -704,7 +707,7 @@ SEARCH_LIB="`echo "$SEARCH_INCLUDE" | sed s/include/lib/g` \ # 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:708: checking for $ac_word" >&5 +echo "configure:711: 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 @@ -733,7 +736,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:737: checking for $ac_word" >&5 +echo "configure:740: 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 @@ -781,7 +784,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:785: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:788: 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. @@ -791,11 +794,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:802: \"$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 @@ -815,12 +818,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:819: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:822: 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:824: checking whether we are using GNU C" >&5 +echo "configure:827: 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 @@ -829,7 +832,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:833: \"$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:836: \"$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 @@ -844,7 +847,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:848: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:851: 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 @@ -876,10 +879,10 @@ CFLAGS=`echo "$CFLAGS" | sed 's/-g//g'` if test "x$CC" != xcc; then echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 -echo "configure:880: checking whether $CC and cc understand -c and -o together" >&5 +echo "configure:883: checking whether $CC and cc understand -c and -o together" >&5 else echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 -echo "configure:883: checking whether cc understands -c and -o together" >&5 +echo "configure:886: checking whether cc understands -c and -o together" >&5 fi set dummy $CC; ac_cc="`echo $2 | sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" @@ -891,16 +894,16 @@ else # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' -if { (eval echo configure:895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; +if { (eval echo configure:898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. - if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then ac_try='cc -c conftest.c -o conftest.o 1>&5' - if { (eval echo configure:903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; + if { (eval echo configure:906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then # cc works too. : @@ -927,7 +930,7 @@ EOF fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:931: checking how to run the C preprocessor" >&5 +echo "configure:934: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -942,13 +945,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:952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -959,13 +962,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:969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -989,13 +992,13 @@ echo "$ac_t""$CPP" 1>&6 if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:993: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:996: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -1013,7 +1016,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -1042,7 +1045,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:1046: checking for $ac_word" >&5 +echo "configure:1049: 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 @@ -1073,7 +1076,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1077: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:1080: 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. @@ -1083,11 +1086,11 @@ ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $L cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 @@ -1113,12 +1116,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:1117: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1120: 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:1122: checking whether we are using GNU C++" >&5 +echo "configure:1125: 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 @@ -1127,7 +1130,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1131: \"$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:1134: \"$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 @@ -1142,7 +1145,7 @@ if test $ac_cv_prog_gxx = yes; then ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:1146: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:1149: 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 @@ -1170,7 +1173,7 @@ else fi echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 -echo "configure:1174: checking how to run the C++ preprocessor" >&5 +echo "configure:1177: 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 @@ -1183,12 +1186,12 @@ ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $L 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:1192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1220,7 +1223,7 @@ CXXFLAGS=`echo "$CXXFLAGS" | sed 's/-g//g'` # 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:1224: checking for $ac_word" >&5 +echo "configure:1227: 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 @@ -1250,7 +1253,7 @@ fi # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1254: checking for $ac_word" >&5 +echo "configure:1257: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1307,7 +1310,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:1311: checking for a BSD compatible install" >&5 +echo "configure:1314: 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 @@ -1358,7 +1361,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1362: checking whether ln -s works" >&5 +echo "configure:1365: 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 @@ -1384,7 +1387,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:1388: checking for $ac_word" >&5 +echo "configure:1391: 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 @@ -1414,7 +1417,7 @@ done echo $ac_n "checking "make for VPATH support"""... $ac_c" 1>&6 -echo "configure:1418: checking "make for VPATH support"" >&5 +echo "configure:1421: checking "make for VPATH support"" >&5 cat - << EOF > confMake check : file cp \$? \$@ @@ -1444,7 +1447,7 @@ fi # 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:1448: checking for X" >&5 +echo "configure:1451: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -1506,12 +1509,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:1515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1580,14 +1583,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:1594: \"$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. @@ -1693,17 +1696,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:1697: checking whether -R must be followed by a space" >&5 +echo "configure:1700: 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:1710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_R_nospace=yes else @@ -1719,14 +1722,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:1733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_R_space=yes else @@ -1758,7 +1761,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:1762: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:1765: 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 @@ -1766,7 +1769,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:1784: \"$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 @@ -1799,7 +1802,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:1803: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:1806: 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 @@ -1807,7 +1810,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:1825: \"$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 @@ -1847,12 +1850,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:1851: checking for gethostbyname" >&5 +echo "configure:1854: 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:1882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -1896,7 +1899,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:1900: checking for gethostbyname in -lnsl" >&5 +echo "configure:1903: 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 @@ -1904,7 +1907,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:1922: \"$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 @@ -1945,12 +1948,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:1949: checking for connect" >&5 +echo "configure:1952: 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:1980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -1994,7 +1997,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:1998: checking for connect in -lsocket" >&5 +echo "configure:2001: 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 @@ -2002,7 +2005,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:2020: \"$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 @@ -2037,12 +2040,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:2041: checking for remove" >&5 +echo "configure:2044: 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:2072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -2086,7 +2089,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:2090: checking for remove in -lposix" >&5 +echo "configure:2093: 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 @@ -2094,7 +2097,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:2112: \"$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 @@ -2129,12 +2132,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:2133: checking for shmat" >&5 +echo "configure:2136: 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:2164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -2178,7 +2181,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:2182: checking for shmat in -lipc" >&5 +echo "configure:2185: 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 @@ -2186,7 +2189,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:2204: \"$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 @@ -2230,7 +2233,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:2234: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:2237: 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 @@ -2238,7 +2241,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:2256: \"$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 @@ -2279,12 +2282,12 @@ 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:2283: checking for $ac_hdr that defines DIR" >&5 +echo "configure:2286: 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> @@ -2292,7 +2295,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:2296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -2317,7 +2320,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:2321: checking for opendir in -ldir" >&5 +echo "configure:2324: 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 @@ -2325,7 +2328,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2343: \"$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 @@ -2358,7 +2361,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2362: checking for opendir in -lx" >&5 +echo "configure:2365: 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 @@ -2366,7 +2369,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2384: \"$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 @@ -2400,12 +2403,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2404: checking for ANSI C header files" >&5 +echo "configure:2407: 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 @@ -2413,7 +2416,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2430,7 +2433,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 @@ -2448,7 +2451,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 @@ -2469,7 +2472,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2480,7 +2483,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -2504,12 +2507,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2508: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:2511: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2525,7 +2528,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2549,17 +2552,17 @@ for ac_hdr in fcntl.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2553: checking for $ac_hdr" >&5 +echo "configure:2556: 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:2563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2589,17 +2592,17 @@ for ac_hdr in limits.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2593: checking for $ac_hdr" >&5 +echo "configure:2596: 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:2603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2629,17 +2632,17 @@ for ac_hdr in sys/file.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2633: checking for $ac_hdr" >&5 +echo "configure:2636: 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:2643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2669,17 +2672,17 @@ for ac_hdr in sys/time.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2673: checking for $ac_hdr" >&5 +echo "configure:2676: 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:2683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2709,17 +2712,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:2713: checking for $ac_hdr" >&5 +echo "configure:2716: 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:2723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2749,17 +2752,17 @@ for ac_hdr in fnmatch.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2753: checking for $ac_hdr" >&5 +echo "configure:2756: 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:2763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2789,17 +2792,17 @@ for ac_hdr in linux/joystick.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2793: checking for $ac_hdr" >&5 +echo "configure:2796: 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:2803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2832,12 +2835,12 @@ fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:2836: checking for vprintf" >&5 +echo "configure:2839: 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; then +if { (eval echo configure:2867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -2884,12 +2887,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:2888: checking for _doprnt" >&5 +echo "configure:2891: 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; then +if { (eval echo configure:2919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -2937,12 +2940,12 @@ fi fi echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6 -echo "configure:2941: checking for vsnprintf" >&5 +echo "configure:2944: checking for vsnprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+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:2972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vsnprintf=yes" else @@ -2997,17 +3000,17 @@ for ac_hdr in iostream do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3001: checking for $ac_hdr" >&5 +echo "configure:3004: 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:3011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3048,12 +3051,12 @@ cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3052: checking for uid_t in sys/types.h" >&5 +echo "configure:3055: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3082,7 +3085,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:3086: checking type of array argument to getgroups" >&5 +echo "configure:3089: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3090,7 +3093,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -3129,7 +3132,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -3153,12 +3156,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3157: checking for mode_t" >&5 +echo "configure:3160: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3186,12 +3189,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3190: checking for off_t" >&5 +echo "configure:3193: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3219,12 +3222,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3223: checking for pid_t" >&5 +echo "configure:3226: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3252,12 +3255,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3256: checking return type of signal handlers" >&5 +echo "configure:3259: 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 @@ -3274,7 +3277,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3293,12 +3296,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3297: checking for size_t" >&5 +echo "configure:3300: 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 @@ -3326,12 +3329,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3330: checking for uid_t in sys/types.h" >&5 +echo "configure:3333: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3362,12 +3365,12 @@ fi echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 -echo "configure:3366: checking whether stat file-mode macros are broken" >&5 +echo "configure:3369: 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 @@ -3418,12 +3421,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3422: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3425: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3432,7 +3435,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3453,12 +3456,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:3457: checking for st_blksize in struct stat" >&5 +echo "configure:3460: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3466,7 +3469,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:3470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -3487,12 +3490,12 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:3491: checking for st_blocks in struct stat" >&5 +echo "configure:3494: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3500,7 +3503,7 @@ int main() { struct stat s; s.st_blocks; ; return 0; } EOF -if { (eval echo configure:3504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blocks=yes else @@ -3523,12 +3526,12 @@ else fi echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:3527: checking for st_rdev in struct stat" >&5 +echo "configure:3530: checking for st_rdev in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3536,7 +3539,7 @@ int main() { struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:3540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -3557,12 +3560,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3561: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:3564: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3570,7 +3573,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3591,12 +3594,12 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:3595: checking for tm_zone in struct tm" >&5 +echo "configure:3598: checking for tm_zone in struct tm" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_cv_struct_tm> @@ -3604,7 +3607,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:3608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -3624,12 +3627,12 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:3628: checking for tzname" >&5 +echo "configure:3631: checking for tzname" >&5 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifndef tzname /* For SGI. */ @@ -3639,7 +3642,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:3643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -3663,12 +3666,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3667: checking for working const" >&5 +echo "configure:3670: 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:3724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3738,21 +3741,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3742: checking for inline" >&5 +echo "configure:3745: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3778,14 +3781,14 @@ EOF esac echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:3782: checking whether char is unsigned" >&5 +echo "configure:3785: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -3841,7 +3844,7 @@ EOF fi echo $ac_n "checking for long double""... $ac_c" 1>&6 -echo "configure:3845: checking for long double" >&5 +echo "configure:3848: checking for long double" >&5 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3852,7 +3855,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 && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_long_double=yes else @@ -3885,14 +3888,14 @@ fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:3889: checking whether byte ordering is bigendian" >&5 +echo "configure:3892: 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 @@ -3903,11 +3906,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3910: \"$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 @@ -3918,7 +3921,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -3938,7 +3941,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 && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -3976,7 +3979,7 @@ fi echo $ac_n "checking size of int *""... $ac_c" 1>&6 -echo "configure:3980: checking size of int *" >&5 +echo "configure:3983: checking size of int *" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int_p'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3984,7 +3987,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -3995,7 +3998,7 @@ main() exit(0); } EOF -if { (eval echo configure:3999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int_p=`cat conftestval` else @@ -4015,7 +4018,7 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:4019: checking size of int" >&5 +echo "configure:4022: 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 @@ -4023,7 +4026,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -4034,7 +4037,7 @@ main() exit(0); } EOF -if { (eval echo configure:4038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -4054,7 +4057,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:4058: checking size of long" >&5 +echo "configure:4061: 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 @@ -4062,7 +4065,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -4073,7 +4076,7 @@ main() exit(0); } EOF -if { (eval echo configure:4077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -4097,7 +4100,7 @@ EOF echo $ac_n "checking for long file names""... $ac_c" 1>&6 -echo "configure:4101: checking for long file names" >&5 +echo "configure:4104: checking for long file names" >&5 if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4148,7 +4151,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:4152: checking for $ac_word" >&5 +echo "configure:4155: 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 @@ -4181,7 +4184,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:4185: checking for $ac_word" >&5 +echo "configure:4188: 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 @@ -4214,7 +4217,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:4218: checking for yywrap in -l$ac_lib" >&5 +echo "configure:4221: 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 @@ -4222,7 +4225,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:4240: \"$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 @@ -4256,7 +4259,7 @@ fi fi echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:4260: checking lex output file root" >&5 +echo "configure:4263: checking lex output file root" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4277,7 +4280,7 @@ echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 -echo "configure:4281: checking whether yytext is a pointer" >&5 +echo "configure:4284: checking whether yytext is a pointer" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4289,14 +4292,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS="$LIBS" LIBS="$LIBS $LEXLIB" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_prog_lex_yytext_pointer=yes else @@ -4330,7 +4333,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:4334: checking host system type" >&5 +echo "configure:4337: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -4593,7 +4596,7 @@ DEFAULT_wxUSE_WCSRTOMBS=0 echo $ac_n "checking "for gtk"""... $ac_c" 1>&6 -echo "configure:4597: checking "for gtk"" >&5 +echo "configure:4600: checking "for gtk"" >&5 # Check whether --with-gtk or --without-gtk was given. if test "${with_gtk+set}" = set; then withval="$with_gtk" @@ -4623,7 +4626,7 @@ fi echo $ac_n "checking "for qt"""... $ac_c" 1>&6 -echo "configure:4627: checking "for qt"" >&5 +echo "configure:4630: checking "for qt"" >&5 # Check whether --with-qt or --without-qt was given. if test "${with_qt+set}" = set; then withval="$with_qt" @@ -4653,7 +4656,7 @@ fi echo $ac_n "checking "for motif"""... $ac_c" 1>&6 -echo "configure:4657: checking "for motif"" >&5 +echo "configure:4660: checking "for motif"" >&5 # Check whether --with-motif or --without-motif was given. if test "${with_motif+set}" = set; then withval="$with_motif" @@ -4684,7 +4687,7 @@ fi echo $ac_n "checking "for shared"""... $ac_c" 1>&6 -echo "configure:4688: checking "for shared"" >&5 +echo "configure:4691: checking "for shared"" >&5 # Check whether --with-shared or --without-shared was given. if test "${with_shared+set}" = set; then withval="$with_shared" @@ -4714,7 +4717,7 @@ fi echo $ac_n "checking "for optimise"""... $ac_c" 1>&6 -echo "configure:4718: checking "for optimise"" >&5 +echo "configure:4721: checking "for optimise"" >&5 # Check whether --with-optimise or --without-optimise was given. if test "${with_optimise+set}" = set; then withval="$with_optimise" @@ -4744,7 +4747,7 @@ fi echo $ac_n "checking "for debug_flag"""... $ac_c" 1>&6 -echo "configure:4748: checking "for debug_flag"" >&5 +echo "configure:4751: checking "for debug_flag"" >&5 # Check whether --with-debug_flag or --without-debug_flag was given. if test "${with_debug_flag+set}" = set; then withval="$with_debug_flag" @@ -4774,7 +4777,7 @@ fi echo $ac_n "checking "for debug_info"""... $ac_c" 1>&6 -echo "configure:4778: checking "for debug_info"" >&5 +echo "configure:4781: checking "for debug_info"" >&5 # Check whether --with-debug_info or --without-debug_info was given. if test "${with_debug_info+set}" = set; then withval="$with_debug_info" @@ -4804,7 +4807,7 @@ fi echo $ac_n "checking "for debug_gdb"""... $ac_c" 1>&6 -echo "configure:4808: checking "for debug_gdb"" >&5 +echo "configure:4811: checking "for debug_gdb"" >&5 # Check whether --with-debug_gdb or --without-debug_gdb was given. if test "${with_debug_gdb+set}" = set; then withval="$with_debug_gdb" @@ -4834,7 +4837,7 @@ fi echo $ac_n "checking "for mem_tracing"""... $ac_c" 1>&6 -echo "configure:4838: checking "for mem_tracing"" >&5 +echo "configure:4841: checking "for mem_tracing"" >&5 # Check whether --with-mem_tracing or --without-mem_tracing was given. if test "${with_mem_tracing+set}" = set; then withval="$with_mem_tracing" @@ -4864,7 +4867,7 @@ fi echo $ac_n "checking "for dmalloc"""... $ac_c" 1>&6 -echo "configure:4868: checking "for dmalloc"" >&5 +echo "configure:4871: checking "for dmalloc"" >&5 # Check whether --with-dmalloc or --without-dmalloc was given. if test "${with_dmalloc+set}" = set; then withval="$with_dmalloc" @@ -4894,7 +4897,7 @@ fi echo $ac_n "checking "for profile"""... $ac_c" 1>&6 -echo "configure:4898: checking "for profile"" >&5 +echo "configure:4901: checking "for profile"" >&5 # Check whether --with-profile or --without-profile was given. if test "${with_profile+set}" = set; then withval="$with_profile" @@ -4924,7 +4927,7 @@ fi echo $ac_n "checking "for apple_ieee"""... $ac_c" 1>&6 -echo "configure:4928: checking "for apple_ieee"" >&5 +echo "configure:4931: checking "for apple_ieee"" >&5 # Check whether --with-apple_ieee or --without-apple_ieee was given. if test "${with_apple_ieee+set}" = set; then withval="$with_apple_ieee" @@ -4955,7 +4958,7 @@ fi echo $ac_n "checking "for zlib"""... $ac_c" 1>&6 -echo "configure:4959: checking "for zlib"" >&5 +echo "configure:4962: checking "for zlib"" >&5 # Check whether --with-zlib or --without-zlib was given. if test "${with_zlib+set}" = set; then withval="$with_zlib" @@ -4985,7 +4988,7 @@ fi echo $ac_n "checking "for libpng"""... $ac_c" 1>&6 -echo "configure:4989: checking "for libpng"" >&5 +echo "configure:4992: checking "for libpng"" >&5 # Check whether --with-libpng or --without-libpng was given. if test "${with_libpng+set}" = set; then withval="$with_libpng" @@ -5015,7 +5018,7 @@ fi echo $ac_n "checking "for odbc"""... $ac_c" 1>&6 -echo "configure:5019: checking "for odbc"" >&5 +echo "configure:5022: checking "for odbc"" >&5 # Check whether --with-odbc or --without-odbc was given. if test "${with_odbc+set}" = set; then withval="$with_odbc" @@ -5045,7 +5048,7 @@ fi echo $ac_n "checking "for opengl"""... $ac_c" 1>&6 -echo "configure:5049: checking "for opengl"" >&5 +echo "configure:5052: checking "for opengl"" >&5 # Check whether --with-opengl or --without-opengl was given. if test "${with_opengl+set}" = set; then withval="$with_opengl" @@ -5076,7 +5079,7 @@ fi echo $ac_n "checking "for gauge"""... $ac_c" 1>&6 -echo "configure:5080: checking "for gauge"" >&5 +echo "configure:5083: checking "for gauge"" >&5 # Check whether --with-gauge or --without-gauge was given. if test "${with_gauge+set}" = set; then withval="$with_gauge" @@ -5106,7 +5109,7 @@ fi echo $ac_n "checking "for combobox"""... $ac_c" 1>&6 -echo "configure:5110: checking "for combobox"" >&5 +echo "configure:5113: checking "for combobox"" >&5 # Check whether --with-combobox or --without-combobox was given. if test "${with_combobox+set}" = set; then withval="$with_combobox" @@ -5136,7 +5139,7 @@ fi echo $ac_n "checking "for scrollbar"""... $ac_c" 1>&6 -echo "configure:5140: checking "for scrollbar"" >&5 +echo "configure:5143: checking "for scrollbar"" >&5 # Check whether --with-scrollbar or --without-scrollbar was given. if test "${with_scrollbar+set}" = set; then withval="$with_scrollbar" @@ -5166,7 +5169,7 @@ fi echo $ac_n "checking "for listctrl"""... $ac_c" 1>&6 -echo "configure:5170: checking "for listctrl"" >&5 +echo "configure:5173: checking "for listctrl"" >&5 # Check whether --with-listctrl or --without-listctrl was given. if test "${with_listctrl+set}" = set; then withval="$with_listctrl" @@ -5196,7 +5199,7 @@ fi echo $ac_n "checking "for treectrl"""... $ac_c" 1>&6 -echo "configure:5200: checking "for treectrl"" >&5 +echo "configure:5203: checking "for treectrl"" >&5 # Check whether --with-treectrl or --without-treectrl was given. if test "${with_treectrl+set}" = set; then withval="$with_treectrl" @@ -5226,7 +5229,7 @@ fi echo $ac_n "checking "for grid"""... $ac_c" 1>&6 -echo "configure:5230: checking "for grid"" >&5 +echo "configure:5233: checking "for grid"" >&5 # Check whether --with-grid or --without-grid was given. if test "${with_grid+set}" = set; then withval="$with_grid" @@ -5256,7 +5259,7 @@ fi echo $ac_n "checking "for tab_dialog"""... $ac_c" 1>&6 -echo "configure:5260: checking "for tab_dialog"" >&5 +echo "configure:5263: checking "for tab_dialog"" >&5 # Check whether --with-tab_dialog or --without-tab_dialog was given. if test "${with_tab_dialog+set}" = set; then withval="$with_tab_dialog" @@ -5286,7 +5289,7 @@ fi echo $ac_n "checking "for notebook"""... $ac_c" 1>&6 -echo "configure:5290: checking "for notebook"" >&5 +echo "configure:5293: checking "for notebook"" >&5 # Check whether --with-notebook or --without-notebook was given. if test "${with_notebook+set}" = set; then withval="$with_notebook" @@ -5317,7 +5320,7 @@ fi echo $ac_n "checking "for timedate"""... $ac_c" 1>&6 -echo "configure:5321: checking "for timedate"" >&5 +echo "configure:5324: checking "for timedate"" >&5 # Check whether --with-timedate or --without-timedate was given. if test "${with_timedate+set}" = set; then withval="$with_timedate" @@ -5347,7 +5350,7 @@ fi echo $ac_n "checking "for fraction"""... $ac_c" 1>&6 -echo "configure:5351: checking "for fraction"" >&5 +echo "configure:5354: checking "for fraction"" >&5 # Check whether --with-fraction or --without-fraction was given. if test "${with_fraction+set}" = set; then withval="$with_fraction" @@ -5377,7 +5380,7 @@ fi echo $ac_n "checking "for log"""... $ac_c" 1>&6 -echo "configure:5381: checking "for log"" >&5 +echo "configure:5384: checking "for log"" >&5 # Check whether --with-log or --without-log was given. if test "${with_log+set}" = set; then withval="$with_log" @@ -5407,7 +5410,7 @@ fi echo $ac_n "checking "for intl"""... $ac_c" 1>&6 -echo "configure:5411: checking "for intl"" >&5 +echo "configure:5414: checking "for intl"" >&5 # Check whether --with-intl or --without-intl was given. if test "${with_intl+set}" = set; then withval="$with_intl" @@ -5437,7 +5440,7 @@ fi echo $ac_n "checking "for config"""... $ac_c" 1>&6 -echo "configure:5441: checking "for config"" >&5 +echo "configure:5444: checking "for config"" >&5 # Check whether --with-config or --without-config was given. if test "${with_config+set}" = set; then withval="$with_config" @@ -5467,7 +5470,7 @@ fi echo $ac_n "checking "for streams"""... $ac_c" 1>&6 -echo "configure:5471: checking "for streams"" >&5 +echo "configure:5474: checking "for streams"" >&5 # Check whether --with-streams or --without-streams was given. if test "${with_streams+set}" = set; then withval="$with_streams" @@ -5497,7 +5500,7 @@ fi echo $ac_n "checking "for serial"""... $ac_c" 1>&6 -echo "configure:5501: checking "for serial"" >&5 +echo "configure:5504: checking "for serial"" >&5 # Check whether --with-serial or --without-serial was given. if test "${with_serial+set}" = set; then withval="$with_serial" @@ -5527,7 +5530,7 @@ fi echo $ac_n "checking "for file"""... $ac_c" 1>&6 -echo "configure:5531: checking "for file"" >&5 +echo "configure:5534: checking "for file"" >&5 # Check whether --with-file or --without-file was given. if test "${with_file+set}" = set; then withval="$with_file" @@ -5557,7 +5560,7 @@ fi echo $ac_n "checking "for textfile"""... $ac_c" 1>&6 -echo "configure:5561: checking "for textfile"" >&5 +echo "configure:5564: checking "for textfile"" >&5 # Check whether --with-textfile or --without-textfile was given. if test "${with_textfile+set}" = set; then withval="$with_textfile" @@ -5588,7 +5591,7 @@ fi echo $ac_n "checking "for afmfonts"""... $ac_c" 1>&6 -echo "configure:5592: checking "for afmfonts"" >&5 +echo "configure:5595: checking "for afmfonts"" >&5 # Check whether --with-afmfonts or --without-afmfonts was given. if test "${with_afmfonts+set}" = set; then withval="$with_afmfonts" @@ -5618,7 +5621,7 @@ fi echo $ac_n "checking "for normalized"""... $ac_c" 1>&6 -echo "configure:5622: checking "for normalized"" >&5 +echo "configure:5625: checking "for normalized"" >&5 # Check whether --with-normalized or --without-normalized was given. if test "${with_normalized+set}" = set; then withval="$with_normalized" @@ -5648,7 +5651,7 @@ fi echo $ac_n "checking "for postscript"""... $ac_c" 1>&6 -echo "configure:5652: checking "for postscript"" >&5 +echo "configure:5655: checking "for postscript"" >&5 # Check whether --with-postscript or --without-postscript was given. if test "${with_postscript+set}" = set; then withval="$with_postscript" @@ -5679,7 +5682,7 @@ fi echo $ac_n "checking "for unicode"""... $ac_c" 1>&6 -echo "configure:5683: checking "for unicode"" >&5 +echo "configure:5686: checking "for unicode"" >&5 # Check whether --with-unicode or --without-unicode was given. if test "${with_unicode+set}" = set; then withval="$with_unicode" @@ -5709,7 +5712,7 @@ fi echo $ac_n "checking "for wcsrtombs"""... $ac_c" 1>&6 -echo "configure:5713: checking "for wcsrtombs"" >&5 +echo "configure:5716: checking "for wcsrtombs"" >&5 # Check whether --with-wcsrtombs or --without-wcsrtombs was given. if test "${with_wcsrtombs+set}" = set; then withval="$with_wcsrtombs" @@ -5740,7 +5743,7 @@ fi echo $ac_n "checking "for wxresources"""... $ac_c" 1>&6 -echo "configure:5744: checking "for wxresources"" >&5 +echo "configure:5747: checking "for wxresources"" >&5 # Check whether --with-wxresources or --without-wxresources was given. if test "${with_wxresources+set}" = set; then withval="$with_wxresources" @@ -5770,7 +5773,7 @@ fi echo $ac_n "checking "for prologio"""... $ac_c" 1>&6 -echo "configure:5774: checking "for prologio"" >&5 +echo "configure:5777: checking "for prologio"" >&5 # Check whether --with-prologio or --without-prologio was given. if test "${with_prologio+set}" = set; then withval="$with_prologio" @@ -5800,7 +5803,7 @@ fi echo $ac_n "checking "for RPC"""... $ac_c" 1>&6 -echo "configure:5804: checking "for RPC"" >&5 +echo "configure:5807: checking "for RPC"" >&5 # Check whether --with-rpc or --without-rpc was given. if test "${with_rpc+set}" = set; then withval="$with_rpc" @@ -5831,7 +5834,7 @@ fi echo $ac_n "checking "for IPC"""... $ac_c" 1>&6 -echo "configure:5835: checking "for IPC"" >&5 +echo "configure:5838: checking "for IPC"" >&5 # Check whether --with-ipc or --without-ipc was given. if test "${with_ipc+set}" = set; then withval="$with_ipc" @@ -5861,7 +5864,7 @@ fi echo $ac_n "checking "for resources"""... $ac_c" 1>&6 -echo "configure:5865: checking "for resources"" >&5 +echo "configure:5868: checking "for resources"" >&5 # Check whether --with-resources or --without-resources was given. if test "${with_resources+set}" = set; then withval="$with_resources" @@ -5891,7 +5894,7 @@ fi echo $ac_n "checking "for clipboard"""... $ac_c" 1>&6 -echo "configure:5895: checking "for clipboard"" >&5 +echo "configure:5898: checking "for clipboard"" >&5 # Check whether --with-clipboard or --without-clipboard was given. if test "${with_clipboard+set}" = set; then withval="$with_clipboard" @@ -5921,7 +5924,7 @@ fi echo $ac_n "checking "for dnd"""... $ac_c" 1>&6 -echo "configure:5925: checking "for dnd"" >&5 +echo "configure:5928: checking "for dnd"" >&5 # Check whether --with-dnd or --without-dnd was given. if test "${with_dnd+set}" = set; then withval="$with_dnd" @@ -5951,7 +5954,7 @@ fi echo $ac_n "checking "for constrains"""... $ac_c" 1>&6 -echo "configure:5955: checking "for constrains"" >&5 +echo "configure:5958: checking "for constrains"" >&5 # Check whether --with-constraints or --without-constraints was given. if test "${with_constraints+set}" = set; then withval="$with_constraints" @@ -5982,7 +5985,7 @@ fi echo $ac_n "checking "for mdi"""... $ac_c" 1>&6 -echo "configure:5986: checking "for mdi"" >&5 +echo "configure:5989: checking "for mdi"" >&5 # Check whether --with-mdi or --without-mdi was given. if test "${with_mdi+set}" = set; then withval="$with_mdi" @@ -6012,7 +6015,7 @@ fi echo $ac_n "checking "for docview"""... $ac_c" 1>&6 -echo "configure:6016: checking "for docview"" >&5 +echo "configure:6019: checking "for docview"" >&5 # Check whether --with-docview or --without-docview was given. if test "${with_docview+set}" = set; then withval="$with_docview" @@ -6042,7 +6045,7 @@ fi echo $ac_n "checking "for printarch"""... $ac_c" 1>&6 -echo "configure:6046: checking "for printarch"" >&5 +echo "configure:6049: checking "for printarch"" >&5 # Check whether --with-printarch or --without-printarch was given. if test "${with_printarch+set}" = set; then withval="$with_printarch" @@ -6072,7 +6075,7 @@ fi echo $ac_n "checking "for help"""... $ac_c" 1>&6 -echo "configure:6076: checking "for help"" >&5 +echo "configure:6079: checking "for help"" >&5 # Check whether --with-help or --without-help was given. if test "${with_help+set}" = set; then withval="$with_help" @@ -6154,7 +6157,7 @@ fi # Extract the first word of "gtk-config", so it can be a program name with args. set dummy gtk-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6158: checking for $ac_word" >&5 +echo "configure:6161: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6185,7 +6188,7 @@ fi min_gtk_version=1.0.4 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 -echo "configure:6189: checking for GTK - version >= $min_gtk_version" >&5 +echo "configure:6192: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" if test "$GTK_CONFIG" != "no" ; then GTK_CFLAGS=`$GTK_CONFIG --cflags` @@ -6198,7 +6201,7 @@ echo "configure:6189: checking for GTK - version >= $min_gtk_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -6214,13 +6217,15 @@ main () exit(1); } + if (gtk_minor_version > 0) return FALSE; + return !((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))); } EOF -if { (eval echo configure:6224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -6247,7 +6252,7 @@ fi echo "$ac_t""no" 1>&6 GTK_CFLAGS="" GTK_LIBS="" - { echo "configure: error: Is gtk-config in path and GTK+ is version 1.0.4?" 1>&2; exit 1; } + { echo "configure: error: Is gtk-config in path and GTK+ is version 1.0.4 up-to 1.0.6?" 1>&2; exit 1; } fi @@ -6260,7 +6265,7 @@ fi if test "$wxUSE_QT" = 1; then echo $ac_n "checking for Qt includes""... $ac_c" 1>&6 -echo "configure:6264: checking for Qt includes" >&5 +echo "configure:6269: checking for Qt includes" >&5 ac_find_includes= for ac_dir in $SEARCH_INCLUDE; @@ -6274,7 +6279,7 @@ for ac_dir in $SEARCH_INCLUDE; if test "$ac_find_includes" != "" ; then echo "$ac_t""found $ac_find_includes" 1>&6 echo $ac_n "checking for Qt library""... $ac_c" 1>&6 -echo "configure:6278: checking for Qt library" >&5 +echo "configure:6283: checking for Qt library" >&5 ac_find_libraries= for ac_dir in $SEARCH_LIB; @@ -6325,7 +6330,7 @@ fi if test "$wxUSE_MOTIF" = 1; then echo $ac_n "checking for Motif/Lesstif includes""... $ac_c" 1>&6 -echo "configure:6329: checking for Motif/Lesstif includes" >&5 +echo "configure:6334: checking for Motif/Lesstif includes" >&5 ac_find_includes= for ac_dir in $SEARCH_INCLUDE; @@ -6339,7 +6344,7 @@ for ac_dir in $SEARCH_INCLUDE; if test "$ac_find_includes" != "" ; then echo "$ac_t""found $ac_find_includes" 1>&6 echo $ac_n "checking for Motif/Lesstif library""... $ac_c" 1>&6 -echo "configure:6343: checking for Motif/Lesstif library" >&5 +echo "configure:6348: checking for Motif/Lesstif library" >&5 ac_find_libraries= for ac_dir in $SEARCH_LIB; @@ -6376,7 +6381,7 @@ for ac_dir in $SEARCH_LIB; CHECK_INCLUDE="$CHECK_INCLUDE $ac_path_to_include" echo "$ac_t""found at $ac_find_libraries" 1>&6 echo $ac_n "checking for Xt library""... $ac_c" 1>&6 -echo "configure:6380: checking for Xt library" >&5 +echo "configure:6385: checking for Xt library" >&5 ac_find_libraries= for ac_dir in $SEARCH_LIB; @@ -6402,7 +6407,7 @@ for ac_dir in $SEARCH_LIB; CHECK_LINK="$CHECK_LIB $ac_path_to_link" echo "$ac_t""found at $ac_find_libraries" 1>&6 echo $ac_n "checking for Xpm library""... $ac_c" 1>&6 -echo "configure:6406: checking for Xpm library" >&5 +echo "configure:6411: checking for Xpm library" >&5 ac_find_libraries= for ac_dir in $SEARCH_LIB; @@ -6852,7 +6857,7 @@ fi echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6 -echo "configure:6856: checking for main in -ldl" >&5 +echo "configure:6861: checking for main in -ldl" >&5 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6860,14 +6865,14 @@ 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:6876: \"$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 @@ -6897,7 +6902,7 @@ UNIX_THREAD="gtk/threadno.cpp" echo $ac_n "checking "for threads"""... $ac_c" 1>&6 -echo "configure:6901: checking "for threads"" >&5 +echo "configure:6906: checking "for threads"" >&5 # Check whether --with-threads or --without-threads was given. if test "${with_threads+set}" = set; then withval="$with_threads" @@ -6925,13 +6930,63 @@ else fi - if test "$wxUSE_THREADS" = "1"; then - UNIX_THREAD="gtk/threadno.cpp" + case "$os" in + solaris*) + + echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 +echo "configure:6940: checking for thr_create in -lthread" >&5 +ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lthread $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + UNIX_THREAD="gtk/threadsol.cpp" + THREADS_LINK="-lthread" + +else + echo "$ac_t""no" 1>&6 +fi + + ;; + + *) - echo $ac_n "checking for pthread_create in -lpthread-0.7""... $ac_c" 1>&6 -echo "configure:6935: checking for pthread_create in -lpthread-0.7" >&5 + UNIX_THREAD="gtk/threadno.cpp" + + + echo $ac_n "checking for pthread_create in -lpthread-0.7""... $ac_c" 1>&6 +echo "configure:6990: checking for pthread_create in -lpthread-0.7" >&5 ac_lib_var=`echo pthread-0.7'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6939,7 +6994,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread-0.7 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7009: \"$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 @@ -6966,25 +7021,25 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - UNIX_THREAD="gtk/threadpsx.cpp" - THREADS_LINK="-lpthread-0.7" - + UNIX_THREAD="gtk/threadpsx.cpp" + THREADS_LINK="-lpthread-0.7" + else echo "$ac_t""no" 1>&6 - ac_safe=`echo "sys/prctl.h" | sed 'y%./+-%__p_%'` + ac_safe=`echo "sys/prctl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/prctl.h""... $ac_c" 1>&6 -echo "configure:6978: checking for sys/prctl.h" >&5 +echo "configure:7033: checking for sys/prctl.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:6988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -7001,16 +7056,16 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - UNIX_THREAD="gtk/threadsgi.cpp" - + UNIX_THREAD="gtk/threadsgi.cpp" + else echo "$ac_t""no" 1>&6 fi - - echo $ac_n "checking for pthread_setcanceltype in -lpthread""... $ac_c" 1>&6 -echo "configure:7014: checking for pthread_setcanceltype in -lpthread" >&5 + + echo $ac_n "checking for pthread_setcanceltype in -lpthread""... $ac_c" 1>&6 +echo "configure:7069: checking for pthread_setcanceltype in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_setcanceltype | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7018,7 +7073,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7088: \"$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 @@ -7047,35 +7102,37 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then UNIX_THREAD="gtk/threadpsx.cpp" THREADS_LINK="-lpthread" - + else echo "$ac_t""no" 1>&6 fi - + fi - echo $ac_n "checking for pthread_setcanceltype in -lpthreads""... $ac_c" 1>&6 -echo "configure:7060: checking for pthread_setcanceltype in -lpthreads" >&5 -ac_lib_var=`echo pthreads'_'pthread_setcanceltype | sed 'y%./+-%__p_%'` + + + echo $ac_n "checking for printf in -lposix4""... $ac_c" 1>&6 +echo "configure:7117: checking for printf in -lposix4" >&5 +ac_lib_var=`echo posix4'_'printf | 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="-lpthreads $LIBS" +LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7136: \"$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 @@ -7091,13 +7148,14 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - UNIX_THREAD="gtk/threadpsx.cpp" - THREADS_LINK="-lpthreads" - + THREADS_LINK="$THREADS_LINK -lposix4" + else echo "$ac_t""no" 1>&6 fi +;; + esac fi if test "$wxUSE_MOTIF" = "1"; then @@ -7123,7 +7181,7 @@ OPENGL_LINK= if test "$wxUSE_OPENGL" = 1; then echo $ac_n "checking for OpenGL includes""... $ac_c" 1>&6 -echo "configure:7127: checking for OpenGL includes" >&5 +echo "configure:7185: checking for OpenGL includes" >&5 ac_find_includes= for ac_dir in $SEARCH_INCLUDE; @@ -7138,7 +7196,7 @@ for ac_dir in $SEARCH_INCLUDE; OPENGL_INCLUDE="-I$ac_find_includes" echo "$ac_t""found $ac_find_includes" 1>&6 echo $ac_n "checking for OpenGL library""... $ac_c" 1>&6 -echo "configure:7142: checking for OpenGL library" >&5 +echo "configure:7200: checking for OpenGL library" >&5 ac_find_libraries= for ac_dir in $SEARCH_LIB; diff --git a/configure.in b/configure.in index 09f8bd0507..db9f4d644c 100644 --- a/configure.in +++ b/configure.in @@ -61,6 +61,8 @@ main () exit(1); } + if (gtk_minor_version > 0) return FALSE; + return !((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))); @@ -266,6 +268,9 @@ SEARCH_INCLUDE="\ /usr/XFree86/include/X11 \ \ /usr/include \ + /usr/include/gtk \ + /usr/include/gdk \ + /usr/include/glib \ /usr/local/include \ /usr/unsupported/include \ /usr/athena/include \ @@ -1022,7 +1027,7 @@ if test "$wxUSE_GTK" = 1; then AM_PATH_GTK(1.0.4, [ GUI_TK_INCLUDE="$GTK_CFLAGS" GUI_TK_LIBRARY="$GTK_LIBS" - ], AC_MSG_ERROR(Is gtk-config in path and GTK+ is version 1.0.4?)) + ], AC_MSG_ERROR(Is gtk-config in path and GTK+ is version 1.0.4 up-to 1.0.6?)) TOOLKIT=GTK TOOLKIT_DEF=__WXGTK__ WX_LINK=-lwx_gtk_1_0 @@ -1450,10 +1455,8 @@ if test "$wxUSE_THREADS" = "1"; then THREADS_LINK="-lpthread" ]) ]) - AC_CHECK_LIB(pthreads, pthread_setcanceltype, [ - UNIX_THREAD="gtk/threadpsx.cpp" - THREADS_LINK="-lpthreads" - ]) + + dnl -lposix4 seems to be required on Solaris AC_CHECK_LIB(posix4, printf, [ THREADS_LINK="$THREADS_LINK -lposix4" diff --git a/include/wx/gtk/frame.h b/include/wx/gtk/frame.h index 3c235d2171..05796513d9 100644 --- a/include/wx/gtk/frame.h +++ b/include/wx/gtk/frame.h @@ -62,6 +62,8 @@ public: virtual void Centre( int direction = wxHORIZONTAL ); virtual void GetClientSize( int *width, int *height ) const; + wxSize GetClientSize() const { int w, h; GetClientSize(& w, & h); return wxSize(w, h); } + virtual void SetClientSize( int const width, int const height ); virtual void SetSize( int x, int y, int width, int height, diff --git a/include/wx/gtk1/frame.h b/include/wx/gtk1/frame.h index 3c235d2171..05796513d9 100644 --- a/include/wx/gtk1/frame.h +++ b/include/wx/gtk1/frame.h @@ -62,6 +62,8 @@ public: virtual void Centre( int direction = wxHORIZONTAL ); virtual void GetClientSize( int *width, int *height ) const; + wxSize GetClientSize() const { int w, h; GetClientSize(& w, & h); return wxSize(w, h); } + virtual void SetClientSize( int const width, int const height ); virtual void SetSize( int x, int y, int width, int height, diff --git a/include/wx/thread.h b/include/wx/thread.h index 99091a44ab..4ecfaa271e 100644 --- a/include/wx/thread.h +++ b/include/wx/thread.h @@ -132,8 +132,6 @@ public: // Called when thread exits. virtual void OnExit(); - // Returns the wxThread object which corresponds to the ID. - static wxThread *GetThreadFromID(unsigned long id); protected: // In case, the DIFFER flag is true, enables another thread to kill this one. void TestDestroy(); diff --git a/samples/thread/test.cpp b/samples/thread/test.cpp index 279a3d98b1..1455acf3c5 100644 --- a/samples/thread/test.cpp +++ b/samples/thread/test.cpp @@ -35,8 +35,6 @@ class MyApp: public wxApp bool OnInit(void); }; -wxMutex text_mutex; - WX_DEFINE_ARRAY(wxThread *,wxArrayThread); // Define a new frame type @@ -51,6 +49,7 @@ class MyFrame: public wxFrame void OnStartThread(wxCommandEvent& event); void OnStopThread(wxCommandEvent& event); void OnPauseThread(wxCommandEvent& event); + void OnSize(wxSizeEvent &event); bool OnClose(void) { return TRUE; } public: @@ -85,9 +84,9 @@ void *MyThread::Entry() while (1) { TestDestroy(); - text_mutex.Lock(); + wxMutexGuiEnter(); m_frame->m_txtctrl->WriteText(text); - text_mutex.Unlock(); + wxMutexGuiLeave(); wxSleep(1); } @@ -108,6 +107,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(TEST_START_THREAD, MyFrame::OnStartThread) EVT_MENU(TEST_STOP_THREAD, MyFrame::OnStopThread) EVT_MENU(TEST_PAUSE_THREAD, MyFrame::OnPauseThread) + EVT_SIZE(MyFrame::OnSize) END_EVENT_TABLE() // Create a new application object @@ -135,9 +135,12 @@ bool MyApp::OnInit(void) frame->SetMenuBar(menu_bar); // Make a panel with a message - wxPanel *panel = new wxPanel(frame, -1, wxPoint(0, 0), wxSize(400, 200), wxTAB_TRAVERSAL); + wxPanel *panel = new wxPanel( frame, -1, wxPoint(0, 0), wxSize(400, 200), wxTAB_TRAVERSAL ); + + (void)new wxStaticText( panel, -1, "Log window", wxPoint(10,10) ); + - frame->m_txtctrl = new wxTextCtrl(panel, -1, "", wxPoint(10, 10), wxSize(390, 190), + frame->m_txtctrl = new wxTextCtrl(panel, -1, "", wxPoint(10,30), wxSize(390, 190), wxTE_MULTILINE); // Show the frame @@ -174,7 +177,17 @@ void MyFrame::OnStopThread(wxCommandEvent& WXUNUSED(event) ) } void MyFrame::OnPauseThread(wxCommandEvent& WXUNUSED(event) ) -{} +{ +} + +void MyFrame::OnSize(wxSizeEvent& event ) +{ + wxFrame::OnSize(event); + + wxSize size( GetClientSize() ); + + m_txtctrl->SetSize( 10, 30, size.x-20, size.y-40 ); +} void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) ) { diff --git a/src/Makefile.in b/src/Makefile.in index 850e6cb6f9..717194b054 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -39,7 +39,8 @@ include @MAKEINCLUDE@ STATIC_LIBRARY=lib$(LIB_TARGET).a SHARED_LIBRARY=lib$(LIB_TARGET).so.$(LIB_MAJOR).$(LIB_MINOR) -LIB_CPP_ALL_SRC=$(LIB_CPP_SRC) @GTK_JOYSTICK@ @UNIX_THREAD@ +LIB_CPP_ALL_SRC=$(LIB_CPP_SRC) @UNIX_THREAD@ +# @GTK_JOYSTICK@ LIB_C_ALL_SRC=$(LIB_C_SRC) @IODBC_C_SRC@ parser.c diff --git a/src/common/socket.cpp b/src/common/socket.cpp index d8c728b137..9f9851482a 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -474,7 +474,7 @@ bool wxSocketBase::GetPeer(wxSockAddress& addr_man) const if (m_fd < 0) return FALSE; - if (getpeername(m_fd, (struct sockaddr *)&my_addr, (int *)&len_addr) < 0) + if (getpeername(m_fd, (struct sockaddr *)&my_addr, (socklen_t *)&len_addr) < 0) return FALSE; addr_man.Disassemble(&my_addr, len_addr); @@ -489,7 +489,7 @@ bool wxSocketBase::GetLocal(wxSockAddress& addr_man) const if (m_fd < 0) return FALSE; - if (getsockname(m_fd, (struct sockaddr *)&my_addr, (int *)&len_addr) < 0) + if (getsockname(m_fd, (struct sockaddr *)&my_addr, (socklen_t *)&len_addr) < 0) return FALSE; addr_man.Disassemble(&my_addr, len_addr); diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index 6337f7dc21..53902a97a3 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -22,6 +22,7 @@ #include "wx/resource.h" #include "wx/module.h" #include "wx/image.h" +#include "wx/thread.h" #include "unistd.h" @@ -137,7 +138,9 @@ END_EVENT_TABLE() gint wxapp_idle_callback( gpointer WXUNUSED(data) ) { if (wxTheApp) while (wxTheApp->ProcessIdle()) {} - usleep( 10000 ); + wxMutexGuiLeave(); + usleep(10000); + wxMutexGuiEnter(); return TRUE; } @@ -213,8 +216,8 @@ bool wxApp::SendIdleEvents(void) wxNode* node = wxTopLevelWindows.First(); while (node) { - wxWindow* win = (wxWindow*) node->Data(); - if (SendIdleEvents(win)) + wxWindow* win = (wxWindow*) node->Data(); + if (SendIdleEvents(win)) needMore = TRUE; node = node->Next(); } @@ -478,6 +481,3 @@ int wxEntry( int argc, char *argv[] ) //----------------------------------------------------------------------------- - - - diff --git a/src/gtk/threadgui.inc b/src/gtk/threadgui.inc index 46073d4e0b..7f29dc9cf1 100644 --- a/src/gtk/threadgui.inc +++ b/src/gtk/threadgui.inc @@ -35,16 +35,22 @@ static void ThreadExitProc(gpointer WXUNUSED(client), gint fid, GdkInputCondition WXUNUSED(cond)) { - wxThread* ptr; - - if (fid != p_thrd_pipe[0]) - return; - if (read(fid, &ptr, sizeof(ptr)) == sizeof(ptr)) { - //fprintf(stderr, "calling OnExit %p\n", ptr); - ptr->OnExit(); - } else { - //fprintf(stderr, "this should never happen\n"); - } + wxThread* ptr; + + // printf( "thread exit proc.\n" ); + + if (fid != p_thrd_pipe[0]) + return; + + if (read(fid, &ptr, sizeof(ptr)) == sizeof(ptr)) + { + // printf( "calling OnExit %p\n", ptr); + ptr->OnExit(); + } + else + { + // printf( "this should never happen\n" ); + } } // Global initialization @@ -63,20 +69,6 @@ static void wxThreadGuiExit() close(p_thrd_pipe[1]); } -#ifdef NO_DEFINE_GDK_1_1 - -void wxMutexGuiEnter() -{ - gdk_mutex_enter(); -} - -void wxMutexGuiLeave() -{ - gdk_mutex_leave(); -} - -#else - void wxMutexGuiEnter() { wxMainMutex->Lock(); @@ -87,4 +79,3 @@ void wxMutexGuiLeave() wxMainMutex->Unlock(); } -#endif diff --git a/src/gtk/threadpsx.cpp b/src/gtk/threadpsx.cpp index 2fb5106aa7..af1b1482cb 100644 --- a/src/gtk/threadpsx.cpp +++ b/src/gtk/threadpsx.cpp @@ -5,9 +5,12 @@ // Modified by: // Created: 04/22/98 // RCS-ID: $Id$ -// Copyright: (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998) +// Copyright: (c) Wolfram Gloger (1996, 1997) +// Guilhem Lavaux (1998) +// Robert Roebling (1999) // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// + #ifdef __GNUG__ #pragma implementation "thread.h" #endif @@ -21,7 +24,8 @@ #include "wx/utils.h" #include "wx/log.h" -enum thread_state { +enum thread_state +{ STATE_IDLE = 0, STATE_RUNNING, STATE_PAUSING, @@ -30,131 +34,137 @@ enum thread_state { STATE_EXITED }; -///////////////////////////////////////////////////////////////////////////// -// Static variables -///////////////////////////////////////////////////////////////////////////// +//-------------------------------------------------------------------- +// global data +//-------------------------------------------------------------------- static pthread_t p_mainid; -static wxMutex p_list_mutex; -static wxList p_threads_list; wxMutex *wxMainMutex; // controls access to all GUI functions -///////////////////////////////////////////////////////////////////////////// -// GUI thread manager -///////////////////////////////////////////////////////////////////////////// +//-------------------------------------------------------------------- +// common GUI thread code +//-------------------------------------------------------------------- + #include "threadgui.inc" -///////////////////////////////////////////////////////////////////////////// -// wxThread: Posix Thread implementation (Mutex) -///////////////////////////////////////////////////////////////////////////// +//-------------------------------------------------------------------- +// wxMutex (Posix implementation) +//-------------------------------------------------------------------- -class wxMutexInternal { +class wxMutexInternal +{ public: pthread_mutex_t p_mutex; }; wxMutex::wxMutex() { - p_internal = new wxMutexInternal; - pthread_mutex_init(&(p_internal->p_mutex), NULL); - m_locked = 0; + p_internal = new wxMutexInternal; + pthread_mutex_init(&(p_internal->p_mutex), NULL); + m_locked = 0; } wxMutex::~wxMutex() { - if (m_locked > 0) - wxLogDebug( "wxMutex warning: freeing a locked mutex (%d locks)\n", m_locked ); + if (m_locked > 0) + wxLogDebug( "wxMutex warning: freeing a locked mutex (%d locks)\n", m_locked ); - pthread_mutex_destroy(&(p_internal->p_mutex)); - delete p_internal; + pthread_mutex_destroy(&(p_internal->p_mutex)); + delete p_internal; } wxMutexError wxMutex::Lock() { - int err; - - err = pthread_mutex_lock(&(p_internal->p_mutex)); - if (err == EDEADLK) - return MUTEX_DEAD_LOCK; - m_locked++; - return MUTEX_NO_ERROR; + int err; + + err = pthread_mutex_lock(&(p_internal->p_mutex)); + if (err == EDEADLK) + return MUTEX_DEAD_LOCK; + + m_locked++; + return MUTEX_NO_ERROR; } wxMutexError wxMutex::TryLock() { - int err; - - if (m_locked) - return MUTEX_BUSY; - err = pthread_mutex_trylock(&(p_internal->p_mutex)); - switch (err) { - case EBUSY: return MUTEX_BUSY; - } - m_locked++; - return MUTEX_NO_ERROR; + int err; + + if (m_locked) + return MUTEX_BUSY; + + err = pthread_mutex_trylock(&(p_internal->p_mutex)); + switch (err) + { + case EBUSY: return MUTEX_BUSY; + } + m_locked++; + return MUTEX_NO_ERROR; } wxMutexError wxMutex::Unlock() { - if (m_locked > 0) - m_locked--; - else - return MUTEX_UNLOCKED; - pthread_mutex_unlock(&(p_internal->p_mutex)); - return MUTEX_NO_ERROR; + if (m_locked > 0) + m_locked--; + else + return MUTEX_UNLOCKED; + + pthread_mutex_unlock(&(p_internal->p_mutex)); + return MUTEX_NO_ERROR; } -///////////////////////////////////////////////////////////////////////////// -// wxThread: Posix Thread implementation (Condition) -///////////////////////////////////////////////////////////////////////////// +//-------------------------------------------------------------------- +// wxCondition (Posix implementation) +//-------------------------------------------------------------------- -class wxConditionInternal { +class wxConditionInternal +{ public: pthread_cond_t p_condition; }; wxCondition::wxCondition() { - p_internal = new wxConditionInternal; - pthread_cond_init(&(p_internal->p_condition), NULL); + p_internal = new wxConditionInternal; + pthread_cond_init(&(p_internal->p_condition), NULL); } wxCondition::~wxCondition() { - pthread_cond_destroy(&(p_internal->p_condition)); - delete p_internal; + pthread_cond_destroy(&(p_internal->p_condition)); + delete p_internal; } void wxCondition::Wait(wxMutex& mutex) { - pthread_cond_wait(&(p_internal->p_condition), &(mutex.p_internal->p_mutex)); + pthread_cond_wait(&(p_internal->p_condition), &(mutex.p_internal->p_mutex)); } bool wxCondition::Wait(wxMutex& mutex, unsigned long sec, unsigned long nsec) { - struct timespec tspec; + struct timespec tspec; - tspec.tv_sec = time(NULL)+sec; - tspec.tv_nsec = nsec; - return (pthread_cond_timedwait(&(p_internal->p_condition), &(mutex.p_internal->p_mutex), &tspec) != ETIMEDOUT); + tspec.tv_sec = time(NULL)+sec; + tspec.tv_nsec = nsec; + return (pthread_cond_timedwait(&(p_internal->p_condition), &(mutex.p_internal->p_mutex), &tspec) != ETIMEDOUT); } void wxCondition::Signal() { - pthread_cond_signal(&(p_internal->p_condition)); + pthread_cond_signal(&(p_internal->p_condition)); } void wxCondition::Broadcast() { - pthread_cond_broadcast(&(p_internal->p_condition)); + pthread_cond_broadcast(&(p_internal->p_condition)); } -///////////////////////////////////////////////////////////////////////////// -// wxThread: Posix Thread implementation (Thread) -///////////////////////////////////////////////////////////////////////////// +//-------------------------------------------------------------------- +// wxThread (Posix implementation) +//-------------------------------------------------------------------- -class wxThreadInternal { +class wxThreadInternal +{ public: wxThreadInternal() { state = STATE_IDLE; } ~wxThreadInternal() {} @@ -163,234 +173,227 @@ public: int state; int prio; int defer_destroy; - int id; }; void *wxThreadInternal::PthreadStart(void *ptr) { - wxThread *thread = (wxThread *)ptr; - - // Add the current thread to the list - p_list_mutex.Lock(); - thread->p_internal->id = p_threads_list.Number(); - p_threads_list.Append((wxObject *)thread); - p_list_mutex.Unlock(); + wxThread *thread = (wxThread *)ptr; - // Call the main entry - pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); - void* status = thread->Entry(); + // Call the main entry + pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); + void* status = thread->Entry(); - thread->Exit(status); + thread->Exit(status); - return NULL; + return NULL; } wxThreadError wxThread::Create() { - pthread_attr_t a; - int min_prio, max_prio, p; - struct sched_param sp; + pthread_attr_t a; + int min_prio, max_prio, p; + struct sched_param sp; - if (p_internal->state != STATE_IDLE) - return THREAD_RUNNING; + if (p_internal->state != STATE_IDLE) + return THREAD_RUNNING; - // Change thread priority - pthread_attr_init(&a); - pthread_attr_getschedpolicy(&a, &p); + // Change thread priority + pthread_attr_init(&a); + pthread_attr_getschedpolicy(&a, &p); - min_prio = sched_get_priority_min(p); - max_prio = sched_get_priority_max(p); + min_prio = sched_get_priority_min(p); + max_prio = sched_get_priority_max(p); - pthread_attr_getschedparam(&a, &sp); - sp.sched_priority = min_prio + + pthread_attr_getschedparam(&a, &sp); + sp.sched_priority = min_prio + (p_internal->prio*(max_prio-min_prio))/100; - pthread_attr_setschedparam(&a, &sp); + pthread_attr_setschedparam(&a, &sp); - // this is the point of no return - p_internal->state = STATE_RUNNING; - if (pthread_create(&p_internal->thread_id, &a, - wxThreadInternal::PthreadStart, (void *)this) != 0) { - p_internal->state = STATE_IDLE; + // this is the point of no return + p_internal->state = STATE_RUNNING; + if (pthread_create(&p_internal->thread_id, &a, + wxThreadInternal::PthreadStart, (void *)this) != 0) + { + p_internal->state = STATE_IDLE; + pthread_attr_destroy(&a); + return THREAD_NO_RESOURCE; + } pthread_attr_destroy(&a); - return THREAD_NO_RESOURCE; - } - pthread_attr_destroy(&a); - return THREAD_NO_ERROR; + return THREAD_NO_ERROR; } void wxThread::SetPriority(int prio) { - if (p_internal->state == STATE_RUNNING) - return; - - if (prio > 100) - prio = 100; - if (prio < 0) - prio = 0; - p_internal->prio = prio; + if (p_internal->state == STATE_RUNNING) + return; + + if (prio > 100) prio = 100; + + if (prio < 0) prio = 0; + + p_internal->prio = prio; } int wxThread::GetPriority() const { - return p_internal->prio; + return p_internal->prio; } void wxThread::DeferDestroy(bool on) { - if (on) - pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL); - else - pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); + if (on) + pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL); + else + pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); } wxThreadError wxThread::Destroy() { - int res = 0; + int res = 0; - if (p_internal->state == STATE_RUNNING) { - res = pthread_cancel(p_internal->thread_id); - if (res == 0) - p_internal->state = STATE_CANCELED; - } + if (p_internal->state == STATE_RUNNING) + { + res = pthread_cancel(p_internal->thread_id); + if (res == 0) + p_internal->state = STATE_CANCELED; + } - return THREAD_NO_ERROR; + return THREAD_NO_ERROR; } wxThreadError wxThread::Pause() { - if (p_internal->state != STATE_RUNNING) - return THREAD_NOT_RUNNING; + if (p_internal->state != STATE_RUNNING) + return THREAD_NOT_RUNNING; - if (!p_internal->defer_destroy) - return THREAD_MISC_ERROR; + if (!p_internal->defer_destroy) + return THREAD_MISC_ERROR; - p_internal->state = STATE_PAUSING; - return THREAD_NO_ERROR; + p_internal->state = STATE_PAUSING; + return THREAD_NO_ERROR; } wxThreadError wxThread::Resume() { - if (p_internal->state == STATE_PAUSING || p_internal->state == STATE_PAUSED) - p_internal->state = STATE_RUNNING; + if (p_internal->state == STATE_PAUSING || p_internal->state == STATE_PAUSED) + p_internal->state = STATE_RUNNING; - return THREAD_NO_ERROR; + return THREAD_NO_ERROR; } void *wxThread::Join() { - void* status = 0; - - if (p_internal->state != STATE_IDLE) { - bool do_unlock = wxThread::IsMain(); + void* status = 0; - while (p_internal->state == STATE_RUNNING) - wxYield(); + if (p_internal->state != STATE_IDLE) + { + bool do_unlock = wxThread::IsMain(); - if (do_unlock) - wxMainMutex->Unlock(); - pthread_join(p_internal->thread_id, &status); - if (do_unlock) - wxMainMutex->Lock(); + while (p_internal->state == STATE_RUNNING) + wxYield(); - p_list_mutex.Lock(); - delete p_threads_list.Nth(p_internal->id); - p_list_mutex.Unlock(); + if (do_unlock) wxMainMutex->Unlock(); + + pthread_join(p_internal->thread_id, &status); + + if (do_unlock) wxMainMutex->Lock(); - p_internal->state = STATE_IDLE; - } - return status; + p_internal->state = STATE_IDLE; + } + + return status; } unsigned long wxThread::GetID() const { - return p_internal->id; -} - -wxThread *wxThread::GetThreadFromID(unsigned long id) -{ - wxNode *node = p_threads_list.Nth(id); - - if (!node) - return NULL; - return (wxThread *)node->Data(); + return p_internal->thread_id; } void wxThread::Exit(void *status) { - wxThread* ptr = this; + wxThread* ptr = this; - THREAD_SEND_EXIT_MSG(ptr); - p_internal->state = STATE_EXITED; - pthread_exit(status); + THREAD_SEND_EXIT_MSG(ptr); + p_internal->state = STATE_EXITED; + pthread_exit(status); } void wxThread::TestDestroy() { - if (p_internal->state == STATE_PAUSING) { - p_internal->state = STATE_PAUSED; - while (p_internal->state == STATE_PAUSED) { - pthread_testcancel(); - usleep(1); + if (p_internal->state == STATE_PAUSING) + { + p_internal->state = STATE_PAUSED; + while (p_internal->state == STATE_PAUSED) + { + pthread_testcancel(); + usleep(1); + } } - } - pthread_testcancel(); + pthread_testcancel(); } bool wxThread::IsMain() { - return (bool)pthread_equal(pthread_self(), p_mainid); + return (bool)pthread_equal(pthread_self(), p_mainid); } bool wxThread::IsRunning() const { - return (p_internal->state == STATE_RUNNING); + return (p_internal->state == STATE_RUNNING); } bool wxThread::IsAlive() const { - return (p_internal->state == STATE_RUNNING) || - (p_internal->state == STATE_PAUSING) || - (p_internal->state == STATE_PAUSED); + return (p_internal->state == STATE_RUNNING) || + (p_internal->state == STATE_PAUSING) || + (p_internal->state == STATE_PAUSED); } wxThread::wxThread() { - p_internal = new wxThreadInternal(); + p_internal = new wxThreadInternal(); } wxThread::~wxThread() { - Destroy(); - Join(); - delete p_internal; + Destroy(); + Join(); + delete p_internal; } // The default callback just joins the thread and throws away the result. void wxThread::OnExit() { - Join(); + Join(); } -// Automatic initialization -class wxThreadModule : public wxModule { +//-------------------------------------------------------------------- +// wxThreadModule +//-------------------------------------------------------------------- + +class wxThreadModule : public wxModule +{ DECLARE_DYNAMIC_CLASS(wxThreadModule) + public: - virtual bool OnInit() { - wxMainMutex = new wxMutex(); - wxThreadGuiInit(); - p_mainid = pthread_self(); -// p_threads_list = wxList(wxKEY_INTEGER); - wxMainMutex->Lock(); - - return TRUE; - } + virtual bool OnInit() + { + wxMainMutex = new wxMutex(); + wxThreadGuiInit(); + p_mainid = pthread_self(); + wxMainMutex->Lock(); + + return TRUE; + } - virtual void OnExit() { - wxMainMutex->Unlock(); - wxThreadGuiExit(); - delete wxMainMutex; + virtual void OnExit() + { + wxMainMutex->Unlock(); + wxThreadGuiExit(); + delete wxMainMutex; } }; IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule) + diff --git a/src/gtk1/app.cpp b/src/gtk1/app.cpp index 6337f7dc21..53902a97a3 100644 --- a/src/gtk1/app.cpp +++ b/src/gtk1/app.cpp @@ -22,6 +22,7 @@ #include "wx/resource.h" #include "wx/module.h" #include "wx/image.h" +#include "wx/thread.h" #include "unistd.h" @@ -137,7 +138,9 @@ END_EVENT_TABLE() gint wxapp_idle_callback( gpointer WXUNUSED(data) ) { if (wxTheApp) while (wxTheApp->ProcessIdle()) {} - usleep( 10000 ); + wxMutexGuiLeave(); + usleep(10000); + wxMutexGuiEnter(); return TRUE; } @@ -213,8 +216,8 @@ bool wxApp::SendIdleEvents(void) wxNode* node = wxTopLevelWindows.First(); while (node) { - wxWindow* win = (wxWindow*) node->Data(); - if (SendIdleEvents(win)) + wxWindow* win = (wxWindow*) node->Data(); + if (SendIdleEvents(win)) needMore = TRUE; node = node->Next(); } @@ -478,6 +481,3 @@ int wxEntry( int argc, char *argv[] ) //----------------------------------------------------------------------------- - - - diff --git a/src/gtk1/threadgui.inc b/src/gtk1/threadgui.inc index 46073d4e0b..7f29dc9cf1 100644 --- a/src/gtk1/threadgui.inc +++ b/src/gtk1/threadgui.inc @@ -35,16 +35,22 @@ static void ThreadExitProc(gpointer WXUNUSED(client), gint fid, GdkInputCondition WXUNUSED(cond)) { - wxThread* ptr; - - if (fid != p_thrd_pipe[0]) - return; - if (read(fid, &ptr, sizeof(ptr)) == sizeof(ptr)) { - //fprintf(stderr, "calling OnExit %p\n", ptr); - ptr->OnExit(); - } else { - //fprintf(stderr, "this should never happen\n"); - } + wxThread* ptr; + + // printf( "thread exit proc.\n" ); + + if (fid != p_thrd_pipe[0]) + return; + + if (read(fid, &ptr, sizeof(ptr)) == sizeof(ptr)) + { + // printf( "calling OnExit %p\n", ptr); + ptr->OnExit(); + } + else + { + // printf( "this should never happen\n" ); + } } // Global initialization @@ -63,20 +69,6 @@ static void wxThreadGuiExit() close(p_thrd_pipe[1]); } -#ifdef NO_DEFINE_GDK_1_1 - -void wxMutexGuiEnter() -{ - gdk_mutex_enter(); -} - -void wxMutexGuiLeave() -{ - gdk_mutex_leave(); -} - -#else - void wxMutexGuiEnter() { wxMainMutex->Lock(); @@ -87,4 +79,3 @@ void wxMutexGuiLeave() wxMainMutex->Unlock(); } -#endif diff --git a/src/gtk1/threadpsx.cpp b/src/gtk1/threadpsx.cpp index 2fb5106aa7..af1b1482cb 100644 --- a/src/gtk1/threadpsx.cpp +++ b/src/gtk1/threadpsx.cpp @@ -5,9 +5,12 @@ // Modified by: // Created: 04/22/98 // RCS-ID: $Id$ -// Copyright: (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998) +// Copyright: (c) Wolfram Gloger (1996, 1997) +// Guilhem Lavaux (1998) +// Robert Roebling (1999) // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// + #ifdef __GNUG__ #pragma implementation "thread.h" #endif @@ -21,7 +24,8 @@ #include "wx/utils.h" #include "wx/log.h" -enum thread_state { +enum thread_state +{ STATE_IDLE = 0, STATE_RUNNING, STATE_PAUSING, @@ -30,131 +34,137 @@ enum thread_state { STATE_EXITED }; -///////////////////////////////////////////////////////////////////////////// -// Static variables -///////////////////////////////////////////////////////////////////////////// +//-------------------------------------------------------------------- +// global data +//-------------------------------------------------------------------- static pthread_t p_mainid; -static wxMutex p_list_mutex; -static wxList p_threads_list; wxMutex *wxMainMutex; // controls access to all GUI functions -///////////////////////////////////////////////////////////////////////////// -// GUI thread manager -///////////////////////////////////////////////////////////////////////////// +//-------------------------------------------------------------------- +// common GUI thread code +//-------------------------------------------------------------------- + #include "threadgui.inc" -///////////////////////////////////////////////////////////////////////////// -// wxThread: Posix Thread implementation (Mutex) -///////////////////////////////////////////////////////////////////////////// +//-------------------------------------------------------------------- +// wxMutex (Posix implementation) +//-------------------------------------------------------------------- -class wxMutexInternal { +class wxMutexInternal +{ public: pthread_mutex_t p_mutex; }; wxMutex::wxMutex() { - p_internal = new wxMutexInternal; - pthread_mutex_init(&(p_internal->p_mutex), NULL); - m_locked = 0; + p_internal = new wxMutexInternal; + pthread_mutex_init(&(p_internal->p_mutex), NULL); + m_locked = 0; } wxMutex::~wxMutex() { - if (m_locked > 0) - wxLogDebug( "wxMutex warning: freeing a locked mutex (%d locks)\n", m_locked ); + if (m_locked > 0) + wxLogDebug( "wxMutex warning: freeing a locked mutex (%d locks)\n", m_locked ); - pthread_mutex_destroy(&(p_internal->p_mutex)); - delete p_internal; + pthread_mutex_destroy(&(p_internal->p_mutex)); + delete p_internal; } wxMutexError wxMutex::Lock() { - int err; - - err = pthread_mutex_lock(&(p_internal->p_mutex)); - if (err == EDEADLK) - return MUTEX_DEAD_LOCK; - m_locked++; - return MUTEX_NO_ERROR; + int err; + + err = pthread_mutex_lock(&(p_internal->p_mutex)); + if (err == EDEADLK) + return MUTEX_DEAD_LOCK; + + m_locked++; + return MUTEX_NO_ERROR; } wxMutexError wxMutex::TryLock() { - int err; - - if (m_locked) - return MUTEX_BUSY; - err = pthread_mutex_trylock(&(p_internal->p_mutex)); - switch (err) { - case EBUSY: return MUTEX_BUSY; - } - m_locked++; - return MUTEX_NO_ERROR; + int err; + + if (m_locked) + return MUTEX_BUSY; + + err = pthread_mutex_trylock(&(p_internal->p_mutex)); + switch (err) + { + case EBUSY: return MUTEX_BUSY; + } + m_locked++; + return MUTEX_NO_ERROR; } wxMutexError wxMutex::Unlock() { - if (m_locked > 0) - m_locked--; - else - return MUTEX_UNLOCKED; - pthread_mutex_unlock(&(p_internal->p_mutex)); - return MUTEX_NO_ERROR; + if (m_locked > 0) + m_locked--; + else + return MUTEX_UNLOCKED; + + pthread_mutex_unlock(&(p_internal->p_mutex)); + return MUTEX_NO_ERROR; } -///////////////////////////////////////////////////////////////////////////// -// wxThread: Posix Thread implementation (Condition) -///////////////////////////////////////////////////////////////////////////// +//-------------------------------------------------------------------- +// wxCondition (Posix implementation) +//-------------------------------------------------------------------- -class wxConditionInternal { +class wxConditionInternal +{ public: pthread_cond_t p_condition; }; wxCondition::wxCondition() { - p_internal = new wxConditionInternal; - pthread_cond_init(&(p_internal->p_condition), NULL); + p_internal = new wxConditionInternal; + pthread_cond_init(&(p_internal->p_condition), NULL); } wxCondition::~wxCondition() { - pthread_cond_destroy(&(p_internal->p_condition)); - delete p_internal; + pthread_cond_destroy(&(p_internal->p_condition)); + delete p_internal; } void wxCondition::Wait(wxMutex& mutex) { - pthread_cond_wait(&(p_internal->p_condition), &(mutex.p_internal->p_mutex)); + pthread_cond_wait(&(p_internal->p_condition), &(mutex.p_internal->p_mutex)); } bool wxCondition::Wait(wxMutex& mutex, unsigned long sec, unsigned long nsec) { - struct timespec tspec; + struct timespec tspec; - tspec.tv_sec = time(NULL)+sec; - tspec.tv_nsec = nsec; - return (pthread_cond_timedwait(&(p_internal->p_condition), &(mutex.p_internal->p_mutex), &tspec) != ETIMEDOUT); + tspec.tv_sec = time(NULL)+sec; + tspec.tv_nsec = nsec; + return (pthread_cond_timedwait(&(p_internal->p_condition), &(mutex.p_internal->p_mutex), &tspec) != ETIMEDOUT); } void wxCondition::Signal() { - pthread_cond_signal(&(p_internal->p_condition)); + pthread_cond_signal(&(p_internal->p_condition)); } void wxCondition::Broadcast() { - pthread_cond_broadcast(&(p_internal->p_condition)); + pthread_cond_broadcast(&(p_internal->p_condition)); } -///////////////////////////////////////////////////////////////////////////// -// wxThread: Posix Thread implementation (Thread) -///////////////////////////////////////////////////////////////////////////// +//-------------------------------------------------------------------- +// wxThread (Posix implementation) +//-------------------------------------------------------------------- -class wxThreadInternal { +class wxThreadInternal +{ public: wxThreadInternal() { state = STATE_IDLE; } ~wxThreadInternal() {} @@ -163,234 +173,227 @@ public: int state; int prio; int defer_destroy; - int id; }; void *wxThreadInternal::PthreadStart(void *ptr) { - wxThread *thread = (wxThread *)ptr; - - // Add the current thread to the list - p_list_mutex.Lock(); - thread->p_internal->id = p_threads_list.Number(); - p_threads_list.Append((wxObject *)thread); - p_list_mutex.Unlock(); + wxThread *thread = (wxThread *)ptr; - // Call the main entry - pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); - void* status = thread->Entry(); + // Call the main entry + pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); + void* status = thread->Entry(); - thread->Exit(status); + thread->Exit(status); - return NULL; + return NULL; } wxThreadError wxThread::Create() { - pthread_attr_t a; - int min_prio, max_prio, p; - struct sched_param sp; + pthread_attr_t a; + int min_prio, max_prio, p; + struct sched_param sp; - if (p_internal->state != STATE_IDLE) - return THREAD_RUNNING; + if (p_internal->state != STATE_IDLE) + return THREAD_RUNNING; - // Change thread priority - pthread_attr_init(&a); - pthread_attr_getschedpolicy(&a, &p); + // Change thread priority + pthread_attr_init(&a); + pthread_attr_getschedpolicy(&a, &p); - min_prio = sched_get_priority_min(p); - max_prio = sched_get_priority_max(p); + min_prio = sched_get_priority_min(p); + max_prio = sched_get_priority_max(p); - pthread_attr_getschedparam(&a, &sp); - sp.sched_priority = min_prio + + pthread_attr_getschedparam(&a, &sp); + sp.sched_priority = min_prio + (p_internal->prio*(max_prio-min_prio))/100; - pthread_attr_setschedparam(&a, &sp); + pthread_attr_setschedparam(&a, &sp); - // this is the point of no return - p_internal->state = STATE_RUNNING; - if (pthread_create(&p_internal->thread_id, &a, - wxThreadInternal::PthreadStart, (void *)this) != 0) { - p_internal->state = STATE_IDLE; + // this is the point of no return + p_internal->state = STATE_RUNNING; + if (pthread_create(&p_internal->thread_id, &a, + wxThreadInternal::PthreadStart, (void *)this) != 0) + { + p_internal->state = STATE_IDLE; + pthread_attr_destroy(&a); + return THREAD_NO_RESOURCE; + } pthread_attr_destroy(&a); - return THREAD_NO_RESOURCE; - } - pthread_attr_destroy(&a); - return THREAD_NO_ERROR; + return THREAD_NO_ERROR; } void wxThread::SetPriority(int prio) { - if (p_internal->state == STATE_RUNNING) - return; - - if (prio > 100) - prio = 100; - if (prio < 0) - prio = 0; - p_internal->prio = prio; + if (p_internal->state == STATE_RUNNING) + return; + + if (prio > 100) prio = 100; + + if (prio < 0) prio = 0; + + p_internal->prio = prio; } int wxThread::GetPriority() const { - return p_internal->prio; + return p_internal->prio; } void wxThread::DeferDestroy(bool on) { - if (on) - pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL); - else - pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); + if (on) + pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL); + else + pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); } wxThreadError wxThread::Destroy() { - int res = 0; + int res = 0; - if (p_internal->state == STATE_RUNNING) { - res = pthread_cancel(p_internal->thread_id); - if (res == 0) - p_internal->state = STATE_CANCELED; - } + if (p_internal->state == STATE_RUNNING) + { + res = pthread_cancel(p_internal->thread_id); + if (res == 0) + p_internal->state = STATE_CANCELED; + } - return THREAD_NO_ERROR; + return THREAD_NO_ERROR; } wxThreadError wxThread::Pause() { - if (p_internal->state != STATE_RUNNING) - return THREAD_NOT_RUNNING; + if (p_internal->state != STATE_RUNNING) + return THREAD_NOT_RUNNING; - if (!p_internal->defer_destroy) - return THREAD_MISC_ERROR; + if (!p_internal->defer_destroy) + return THREAD_MISC_ERROR; - p_internal->state = STATE_PAUSING; - return THREAD_NO_ERROR; + p_internal->state = STATE_PAUSING; + return THREAD_NO_ERROR; } wxThreadError wxThread::Resume() { - if (p_internal->state == STATE_PAUSING || p_internal->state == STATE_PAUSED) - p_internal->state = STATE_RUNNING; + if (p_internal->state == STATE_PAUSING || p_internal->state == STATE_PAUSED) + p_internal->state = STATE_RUNNING; - return THREAD_NO_ERROR; + return THREAD_NO_ERROR; } void *wxThread::Join() { - void* status = 0; - - if (p_internal->state != STATE_IDLE) { - bool do_unlock = wxThread::IsMain(); + void* status = 0; - while (p_internal->state == STATE_RUNNING) - wxYield(); + if (p_internal->state != STATE_IDLE) + { + bool do_unlock = wxThread::IsMain(); - if (do_unlock) - wxMainMutex->Unlock(); - pthread_join(p_internal->thread_id, &status); - if (do_unlock) - wxMainMutex->Lock(); + while (p_internal->state == STATE_RUNNING) + wxYield(); - p_list_mutex.Lock(); - delete p_threads_list.Nth(p_internal->id); - p_list_mutex.Unlock(); + if (do_unlock) wxMainMutex->Unlock(); + + pthread_join(p_internal->thread_id, &status); + + if (do_unlock) wxMainMutex->Lock(); - p_internal->state = STATE_IDLE; - } - return status; + p_internal->state = STATE_IDLE; + } + + return status; } unsigned long wxThread::GetID() const { - return p_internal->id; -} - -wxThread *wxThread::GetThreadFromID(unsigned long id) -{ - wxNode *node = p_threads_list.Nth(id); - - if (!node) - return NULL; - return (wxThread *)node->Data(); + return p_internal->thread_id; } void wxThread::Exit(void *status) { - wxThread* ptr = this; + wxThread* ptr = this; - THREAD_SEND_EXIT_MSG(ptr); - p_internal->state = STATE_EXITED; - pthread_exit(status); + THREAD_SEND_EXIT_MSG(ptr); + p_internal->state = STATE_EXITED; + pthread_exit(status); } void wxThread::TestDestroy() { - if (p_internal->state == STATE_PAUSING) { - p_internal->state = STATE_PAUSED; - while (p_internal->state == STATE_PAUSED) { - pthread_testcancel(); - usleep(1); + if (p_internal->state == STATE_PAUSING) + { + p_internal->state = STATE_PAUSED; + while (p_internal->state == STATE_PAUSED) + { + pthread_testcancel(); + usleep(1); + } } - } - pthread_testcancel(); + pthread_testcancel(); } bool wxThread::IsMain() { - return (bool)pthread_equal(pthread_self(), p_mainid); + return (bool)pthread_equal(pthread_self(), p_mainid); } bool wxThread::IsRunning() const { - return (p_internal->state == STATE_RUNNING); + return (p_internal->state == STATE_RUNNING); } bool wxThread::IsAlive() const { - return (p_internal->state == STATE_RUNNING) || - (p_internal->state == STATE_PAUSING) || - (p_internal->state == STATE_PAUSED); + return (p_internal->state == STATE_RUNNING) || + (p_internal->state == STATE_PAUSING) || + (p_internal->state == STATE_PAUSED); } wxThread::wxThread() { - p_internal = new wxThreadInternal(); + p_internal = new wxThreadInternal(); } wxThread::~wxThread() { - Destroy(); - Join(); - delete p_internal; + Destroy(); + Join(); + delete p_internal; } // The default callback just joins the thread and throws away the result. void wxThread::OnExit() { - Join(); + Join(); } -// Automatic initialization -class wxThreadModule : public wxModule { +//-------------------------------------------------------------------- +// wxThreadModule +//-------------------------------------------------------------------- + +class wxThreadModule : public wxModule +{ DECLARE_DYNAMIC_CLASS(wxThreadModule) + public: - virtual bool OnInit() { - wxMainMutex = new wxMutex(); - wxThreadGuiInit(); - p_mainid = pthread_self(); -// p_threads_list = wxList(wxKEY_INTEGER); - wxMainMutex->Lock(); - - return TRUE; - } + virtual bool OnInit() + { + wxMainMutex = new wxMutex(); + wxThreadGuiInit(); + p_mainid = pthread_self(); + wxMainMutex->Lock(); + + return TRUE; + } - virtual void OnExit() { - wxMainMutex->Unlock(); - wxThreadGuiExit(); - delete wxMainMutex; + virtual void OnExit() + { + wxMainMutex->Unlock(); + wxThreadGuiExit(); + delete wxMainMutex; } }; IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule) + -- 2.45.2