From 75f996dae555b0f41e8ac700ca4de9dc0b23b9e9 Mon Sep 17 00:00:00 2001 From: "alex%croczilla.com" Date: Mon, 15 May 2006 22:34:19 +0000 Subject: [PATCH] Trunk merge and *partial* fixes for the changes introduced by bug#326273 git-svn-id: svn://10.0.0.236/branches/ZAP_20050610_BRANCH@196606 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/client.mk | 62 +- mozilla/configure | 3106 +++++++++-------- mozilla/configure.in | 685 ++-- mozilla/extensions/jssh/nsIJSSh.idl | 18 +- mozilla/extensions/jssh/nsIJSShServer.idl | 18 +- mozilla/extensions/jssh/nsJSSh.cpp | 105 +- mozilla/extensions/jssh/nsJSSh.h | 18 +- mozilla/extensions/jssh/nsJSShModule.cpp | 18 +- mozilla/extensions/jssh/nsJSShServer.cpp | 30 +- mozilla/extensions/jssh/nsJSShServer.h | 18 +- .../jssh/resources/content/jssh-debug.js | 18 +- mozilla/js/src/xpconnect/src/xpcprivate.h | 10 +- mozilla/netwerk/base/public/Makefile.in | 1 - mozilla/netwerk/base/src/Makefile.in | 2 - mozilla/netwerk/base/src/nsUDPSocket.cpp | 93 +- mozilla/netwerk/build/nsNetCID.h | 14 - mozilla/netwerk/build/nsNetModule.cpp | 12 +- .../proxy/public/nsIProxyObjectManager.idl | 16 +- mozilla/xpcom/proxy/src/nsProxyEvent.cpp | 571 +-- mozilla/xpcom/proxy/src/nsProxyEvent.h | 18 +- mozilla/xpcom/proxy/src/nsProxyEventClass.cpp | 96 +- .../xpcom/proxy/src/nsProxyEventObject.cpp | 123 +- mozilla/xpcom/proxy/src/nsProxyEventPrivate.h | 32 +- .../xpcom/proxy/src/nsProxyObjectManager.cpp | 227 +- mozilla/xpcom/threads/nsEventQueue.cpp | 737 +--- mozilla/xpcom/threads/nsEventQueue.h | 119 +- mozilla/zap/base/AsyncUtils.js | 12 +- mozilla/zap/netutils/src/zapStunResolver.js | 2 +- mozilla/zap/sip/SipResolver.js | 2 +- mozilla/zap/sip/SipUtils.js | 17 +- mozilla/zap/zmk/src/zapAudioIO.cpp | 15 +- mozilla/zap/zmk/src/zapAudioIO.h | 4 +- mozilla/zap/zmk/src/zapAudioIn.cpp | 65 +- mozilla/zap/zmk/src/zapAudioIn.h | 37 +- mozilla/zap/zmk/src/zapAudioOut.h | 4 +- mozilla/zap/zmk/src/zapIMediaGraph.idl | 6 +- mozilla/zap/zmk/src/zapMediaGraph.cpp | 17 +- mozilla/zap/zmk/src/zapMediaGraph.h | 4 +- mozilla/zap/zmk/src/zapStunClient.cpp | 4 +- mozilla/zap/zmk/src/zapStunServer.cpp | 2 +- 40 files changed, 2834 insertions(+), 3524 deletions(-) diff --git a/mozilla/client.mk b/mozilla/client.mk index df1bdc34f62..851a485b279 100644 --- a/mozilla/client.mk +++ b/mozilla/client.mk @@ -194,6 +194,8 @@ LOCALES_core := \ BOOTSTRAP_core := \ mozilla/browser/config/version.txt \ mozilla/mail/config/version.txt \ + mozilla/calendar/sunbird/config/version.txt \ + $(NULL) MODULES_NS_toolkit := \ $(MODULES_NS_core) \ @@ -399,7 +401,7 @@ MODULES_all := \ MOZ_CO_TAG = ZAP_20050610_BRANCH NSPR_CO_TAG = NSPRPUB_PRE_4_2_CLIENT_BRANCH -NSS_CO_TAG = NSS_3_11_20060403_TAG +NSS_CO_TAG = NSS_3_11_20060512_TAG LDAPCSDK_CO_TAG = ldapcsdk_5_17_client_branch LOCALES_CO_TAG = @@ -1140,6 +1142,33 @@ echo_objdir: # js/src/xpconnect/Makefile.in # js/src/xpconnect/src/xpcmodule.cpp # js/src/xpconnect/src/xpcprivate.h +# xpcom/threads/nsEventQueue.cpp +# xpcom/threads/nsEventQueue.h +# xpcom/threads/nsPIEventQueueChain.h (removed) +# xpcom/threads/nsIEventQueue.idl (removed) +# xpcom/threads/plevent.c (removed) +# xpcom/threads/plevent.h (removed) +# xpcom/proxy/public/nsProxyEvent.h (moved to ../src/) +# xpcom/proxy/src/nsProxyObjectManager.cpp +# xpcom/proxy/src/nsProxyEventObject.cpp +# xpcom/proxy/src/nsProxyEventPrivate.h +# extensions/jssh/ChangeLog +# extensions/jssh/Makefile.in +# extensions/jssh/install.js +# extensions/jssh/jar.mn +# extensions/jssh/nsIJSSh.idl +# extensions/jssh/nsIJSShServer.idl +# extensions/jssh/nsJSSh.cpp +# extensions/jssh/nsJSSh.h +# extensions/jssh/nsJSShModule.cpp +# extensions/jssh/nsJSShServer.cpp +# extensions/jssh/nsJSShServer.h +# extensions/jssh/nsJSShStarter.js +# extensions/jssh/resources/content/configure.xul +# extensions/jssh/resources/content/contents.rdf +# extensions/jssh/resources/content/jssh-debug.js +# extensions/jssh/resources/content/tasksOverlay.xul +# extensions/jssh/xemacs/moz-jssh.el ZAP_BRANCH_MODIFIED_FILES = \ js/src/xpconnect/Makefile.in \ @@ -1170,19 +1199,34 @@ ZAP_BRANCH_MODIFIED_FILES = \ xpcom/io/Makefile.in \ xpcom/io/nsScriptableInputStream.cpp \ xpcom/io/nsScriptableInputStream.h \ - xpcom/proxy/public/nsProxyEvent.h \ + xpcom/proxy/public/nsIProxyObjectManager.idl \ xpcom/proxy/src/nsProxyEvent.cpp \ + xpcom/proxy/src/nsProxyEvent.h \ xpcom/proxy/src/nsProxyEventClass.cpp \ xpcom/proxy/src/nsProxyEventObject.cpp \ xpcom/proxy/src/nsProxyEventPrivate.h \ xpcom/proxy/src/nsProxyObjectManager.cpp \ xpcom/threads/nsEventQueue.cpp \ xpcom/threads/nsEventQueue.h \ - xpcom/threads/nsIEventQueue.idl \ - xpcom/threads/nsPIEventQueueChain.h \ - xpcom/threads/plevent.c \ - xpcom/threads/plevent.h \ - xpcom/reflect/xptcall/public/xptcall.h + xpcom/reflect/xptcall/public/xptcall.h \ + extensions/jssh/ChangeLog \ + extensions/jssh/Makefile.in \ + extensions/jssh/install.js \ + extensions/jssh/jar.mn \ + extensions/jssh/nsIJSSh.idl \ + extensions/jssh/nsIJSShServer.idl \ + extensions/jssh/nsJSSh.cpp \ + extensions/jssh/nsJSSh.h \ + extensions/jssh/nsJSShModule.cpp \ + extensions/jssh/nsJSShServer.cpp \ + extensions/jssh/nsJSShServer.h \ + extensions/jssh/nsJSShStarter.js \ + extensions/jssh/resources/content/configure.xul \ + extensions/jssh/resources/content/contents.rdf \ + extensions/jssh/resources/content/jssh-debug.js \ + extensions/jssh/resources/content/tasksOverlay.xul \ + extensions/jssh/xemacs/moz-jssh.el + ZAP_BRANCH_NEW_FILES = \ js/src/xpconnect/loader/ComponentUtils.jsm \ @@ -1194,8 +1238,8 @@ ZAP_BRANCH_NEW_FILES = \ netwerk/base/src/nsUDPSocket.cpp \ netwerk/base/src/nsUDPSocket.h \ xpcom/io/nsIScriptableInputStreamEx.idl \ - zap \ - extensions/jssh + zap + commit_zap: diff --git a/mozilla/configure b/mozilla/configure index ae3ade43b09..11fcff617f9 100755 --- a/mozilla/configure +++ b/mozilla/configure @@ -70,6 +70,25 @@ ac_help="$ac_help --with-java-include-path=dir Location of Java SDK headers" ac_help="$ac_help --with-java-bin-path=dir Location of Java binaries (java, javac, jar)" +ac_help="$ac_help + --enable-application=APP + Options include: + suite + browser (Firefox) + mail (Thunderbird) + minimo + composer + calendar + xulrunner + zap (SIP client) + macbrowser (Camino) + content/xslt (Standalone Transformiix XSLT) + tools/update-packaging (AUS-related packaging tools) + standalone (use this for standalone + xpcom/xpconnect or to manually drive a build)" +ac_help="$ac_help + --with-embedding-profile=default|basic|minimal + see http://wiki.mozilla.org/Gecko:Small_Device_Support" ac_help="$ac_help --enable-default-toolkit=TK Select default toolkit @@ -89,25 +108,6 @@ ac_help="$ac_help --disable-gtktest Do not try to compile and run a test GTK program" ac_help="$ac_help --with-qtdir=\$dir Specify Qt directory " -ac_help="$ac_help - --enable-application=APP - Options include: - suite - browser (Firefox) - mail (Thunderbird) - minimo - composer - calendar - xulrunner - macbrowser (Camino) - zap (SIP client) - content/xslt (Standalone Transformiix XSLT) - tools/update-packaging (AUS-related packaging tools) - standalone (use this for standalone - xpcom/xpconnect or to manually drive a build)" -ac_help="$ac_help - --with-embedding-profile=default|basic|minimal - see http://wiki.mozilla.org/Gecko:Small_Device_Support" ac_help="$ac_help --enable-ui-locale=ab-CD Select the user interface locale (default: en-US)" @@ -159,7 +159,7 @@ ac_help="$ac_help ac_help="$ac_help --disable-view-source Disable view source support" ac_help="$ac_help - --disable-accessibility Disable accessibility support" + --disable-accessibility Disable accessibility support (off by default on OS X)" ac_help="$ac_help --disable-xpfe-components Disable xpfe components" @@ -406,6 +406,8 @@ ac_help="$ac_help --disable-xul Disable XUL" ac_help="$ac_help --disable-profilesharing Disable profile sharing" +ac_help="$ac_help + --enable-ipcd Enable IPC daemon" ac_help="$ac_help --disable-profilelocking Disable profile locking" ac_help="$ac_help @@ -978,7 +980,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:982: checking host system type" >&5 +echo "configure:984: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -999,7 +1001,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:1003: checking target system type" >&5 +echo "configure:1005: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -1017,7 +1019,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1021: checking build system type" >&5 +echo "configure:1023: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1095,7 +1097,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:1099: checking for $ac_word" >&5 +echo "configure:1101: 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 @@ -1193,7 +1195,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:1197: checking for $ac_word" >&5 +echo "configure:1199: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_NSINSTALL_BIN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1262,13 +1264,13 @@ if test -n "$CROSS_COMPILE" && test "$target" != "$host"; then _SAVE_LDFLAGS="$LDFLAGS" echo $ac_n "checking for host c compiler""... $ac_c" 1>&6 -echo "configure:1266: checking for host c compiler" >&5 +echo "configure:1268: checking for host c compiler" >&5 for ac_prog in $HOST_CC gcc cc /usr/ucb/cc cl icc 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:1272: checking for $ac_word" >&5 +echo "configure:1274: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1303,13 +1305,13 @@ test -n "$HOST_CC" || HOST_CC="""" fi echo "$ac_t""$HOST_CC" 1>&6 echo $ac_n "checking for host c++ compiler""... $ac_c" 1>&6 -echo "configure:1307: checking for host c++ compiler" >&5 +echo "configure:1309: checking for host c++ compiler" >&5 for ac_prog in $HOST_CXX $CCC c++ g++ gcc CC cxx cc++ cl icc 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:1313: checking for $ac_word" >&5 +echo "configure:1315: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_HOST_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1358,7 +1360,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:1362: checking for $ac_word" >&5 +echo "configure:1364: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_HOST_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1393,7 +1395,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:1397: checking for $ac_word" >&5 +echo "configure:1399: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_HOST_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1428,16 +1430,16 @@ test -n "$HOST_AR" || HOST_AR="ar" LDFLAGS="$HOST_LDFLAGS" echo $ac_n "checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1432: checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5 +echo "configure:1434: checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_prog_hostcc_works=1 echo "$ac_t""yes" 1>&6 else @@ -1452,16 +1454,16 @@ rm -f conftest* CFLAGS="$HOST_CXXFLAGS" echo $ac_n "checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1456: checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works" >&5 +echo "configure:1458: checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_prog_hostcxx_works=1 echo "$ac_t""yes" 1>&6 else @@ -1490,7 +1492,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:1494: checking for $ac_word" >&5 +echo "configure:1496: 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 @@ -1524,7 +1526,7 @@ test -n "$CC" || CC=":" # 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:1528: checking for $ac_word" >&5 +echo "configure:1530: 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 @@ -1554,7 +1556,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:1558: checking for $ac_word" >&5 +echo "configure:1560: 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 @@ -1605,7 +1607,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1609: checking for $ac_word" >&5 +echo "configure:1611: 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 @@ -1637,7 +1639,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1641: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1643: 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. @@ -1648,12 +1650,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1652 "configure" +#line 1654 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 @@ -1679,12 +1681,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:1683: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1685: 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:1688: checking whether we are using GNU C" >&5 +echo "configure:1690: 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 @@ -1693,7 +1695,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1697: \"$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:1699: \"$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 @@ -1712,7 +1714,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1716: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1718: 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 @@ -1748,7 +1750,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:1752: checking for $ac_word" >&5 +echo "configure:1754: 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 @@ -1784,7 +1786,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:1788: checking for $ac_word" >&5 +echo "configure:1790: 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 @@ -1816,7 +1818,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1820: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:1822: 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. @@ -1827,12 +1829,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 1831 "configure" +#line 1833 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:1836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1858,12 +1860,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:1862: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1864: 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:1867: checking whether we are using GNU C++" >&5 +echo "configure:1869: 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 @@ -1872,7 +1874,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1876: \"$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:1878: \"$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 @@ -1891,7 +1893,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:1895: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:1897: 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 @@ -1935,7 +1937,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:1939: checking for $ac_word" >&5 +echo "configure:1941: 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 @@ -1970,7 +1972,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:1974: checking for $ac_word" >&5 +echo "configure:1976: 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 @@ -2005,7 +2007,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:2009: checking for $ac_word" >&5 +echo "configure:2011: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2046,7 +2048,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:2050: checking for $ac_word" >&5 +echo "configure:2052: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2081,7 +2083,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:2085: checking for $ac_word" >&5 +echo "configure:2087: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2116,7 +2118,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:2120: checking for $ac_word" >&5 +echo "configure:2122: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2154,7 +2156,7 @@ else # 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:2158: checking for $ac_word" >&5 +echo "configure:2160: 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 @@ -2184,7 +2186,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:2188: checking for $ac_word" >&5 +echo "configure:2190: 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 @@ -2235,7 +2237,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2239: checking for $ac_word" >&5 +echo "configure:2241: 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 @@ -2267,7 +2269,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2271: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2273: 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. @@ -2278,12 +2280,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2282 "configure" +#line 2284 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 @@ -2309,12 +2311,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:2313: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2315: 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:2318: checking whether we are using GNU C" >&5 +echo "configure:2320: 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 @@ -2323,7 +2325,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2327: \"$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:2329: \"$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 @@ -2342,7 +2344,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2346: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2348: 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 @@ -2378,7 +2380,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:2382: checking for $ac_word" >&5 +echo "configure:2384: 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 @@ -2410,7 +2412,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2414: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:2416: 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. @@ -2421,12 +2423,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 2425 "configure" +#line 2427 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2452,12 +2454,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:2456: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2458: 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:2461: checking whether we are using GNU C++" >&5 +echo "configure:2463: 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 @@ -2466,7 +2468,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2470: \"$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:2472: \"$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 @@ -2485,7 +2487,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:2489: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:2491: 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 @@ -2519,7 +2521,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2523: checking for $ac_word" >&5 +echo "configure:2525: 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 @@ -2551,7 +2553,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:2555: checking for $ac_word" >&5 +echo "configure:2557: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2592,7 +2594,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:2596: checking for $ac_word" >&5 +echo "configure:2598: 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 @@ -2627,7 +2629,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:2631: checking for $ac_word" >&5 +echo "configure:2633: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2662,7 +2664,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:2666: checking for $ac_word" >&5 +echo "configure:2668: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2697,7 +2699,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:2701: checking for $ac_word" >&5 +echo "configure:2703: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2812,7 +2814,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:2816: checking for $ac_word" >&5 +echo "configure:2818: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MIDL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2854,14 +2856,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext < int main() { printf("Hello World\n"); ; return 0; } EOF -if { (eval echo configure:2865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -2879,14 +2881,14 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < int main() { unsigned *test = new unsigned(42); ; return 0; } EOF -if { (eval echo configure:2890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -2978,7 +2980,7 @@ EOF _MIDL_REV_VERSION=`echo ${_MIDL_FULL_VERSION} | $AWK -F\. '{ print $3 }'` # Add flags if necessary echo $ac_n "checking for midl flags""... $ac_c" 1>&6 -echo "configure:2982: checking for midl flags" >&5 +echo "configure:2984: checking for midl flags" >&5 if test \( "$_MIDL_MAJOR_VERSION" -gt "6" \) -o \( "$_MIDL_MAJOR_VERSION" = "6" -a "$_MIDL_MINOR_VERSION" -gt "0" \) -o \( "$_MIDL_MAJOR_VERSION" = "6" -a "$_MIDL_MINOR_VERSION" = "00" -a "$_MIDL_REV_VERSION" -gt "359" \); then # Starting with MIDL version 6.0.359, the MIDL compiler # generates /Oicf /robust stubs by default, which is not @@ -3000,9 +3002,9 @@ echo "configure:2982: checking for midl flags" >&5 _W32API_MAJOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $1 }'` _W32API_MINOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $2 }'` echo $ac_n "checking for w32api version >= $W32API_VERSION""... $ac_c" 1>&6 -echo "configure:3004: checking for w32api version >= $W32API_VERSION" >&5 +echo "configure:3006: checking for w32api version >= $W32API_VERSION" >&5 cat > conftest.$ac_ext < int main() { @@ -3014,7 +3016,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* res=yes else @@ -3030,7 +3032,7 @@ rm -f conftest* fi # Check windres version echo $ac_n "checking for windres version >= $WINDRES_VERSION""... $ac_c" 1>&6 -echo "configure:3034: checking for windres version >= $WINDRES_VERSION" >&5 +echo "configure:3036: checking for windres version >= $WINDRES_VERSION" >&5 _WINDRES_VERSION=`${WINDRES} --version 2>&1 | grep -i windres 2>/dev/null | $AWK '{ print $3 }'` echo "$ac_t""$_WINDRES_VERSION" 1>&6 _WINDRES_MAJOR_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $1 }'` @@ -3066,7 +3068,7 @@ if test -n "$_WIN32_MSVC"; then SKIP_COMPILER_CHECKS=1 SKIP_LIBRARY_CHECKS=1 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:3070: checking how to run the C preprocessor" >&5 +echo "configure:3072: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -3081,13 +3083,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:3091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -3098,13 +3100,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:3108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -3115,13 +3117,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -3149,17 +3151,17 @@ for ac_hdr in mmintrin.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3153: checking for $ac_hdr" >&5 +echo "configure:3155: 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:3163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3190,10 +3192,10 @@ fi if test "$CC" != "icc" -a -z "$_WIN32_MSVC"; then 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:3194: checking whether $CC and cc understand -c and -o together" >&5 +echo "configure:3196: 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:3197: checking whether cc understands -c and -o together" >&5 +echo "configure:3199: 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]/_/'`" @@ -3205,16 +3207,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:3209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:3210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; +if { (eval echo configure:3211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:3212: \"$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:3215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:3217: \"$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:3217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:3218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; + if { (eval echo configure:3219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:3220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then # cc works too. : @@ -3250,7 +3252,7 @@ fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:3254: checking how to run the C preprocessor" >&5 +echo "configure:3256: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -3265,13 +3267,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:3275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -3282,13 +3284,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:3292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -3299,13 +3301,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -3330,7 +3332,7 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 -echo "configure:3334: checking how to run the C++ preprocessor" >&5 +echo "configure:3336: 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 @@ -3343,12 +3345,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -3395,7 +3397,7 @@ fi # COMPILE_ENVIRONMENT # 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:3399: checking for a BSD compatible install" >&5 +echo "configure:3401: 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 @@ -3448,7 +3450,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:3452: checking whether ln -s works" >&5 +echo "configure:3454: 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 @@ -3473,7 +3475,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:3477: checking for $ac_word" >&5 +echo "configure:3479: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3513,7 +3515,7 @@ if test -z "$PERL" || test "$PERL" = ":"; then fi echo $ac_n "checking for minimum required perl version >= $PERL_VERSION""... $ac_c" 1>&6 -echo "configure:3517: checking for minimum required perl version >= $PERL_VERSION" >&5 +echo "configure:3519: checking for minimum required perl version >= $PERL_VERSION" >&5 _perl_version=`PERL_VERSION=$PERL_VERSION $PERL -e 'print "$]"; if ($] >= $ENV{PERL_VERSION}) { exit(0); } else { exit(1); }' 2>&5` _perl_res=$? echo "$ac_t""$_perl_version" 1>&6 @@ -3523,7 +3525,7 @@ if test "$_perl_res" != 0; then fi echo $ac_n "checking for full perl installation""... $ac_c" 1>&6 -echo "configure:3527: checking for full perl installation" >&5 +echo "configure:3529: checking for full perl installation" >&5 _perl_archlib=`$PERL -e 'use Config; if ( -d $Config{archlib} ) { exit(0); } else { exit(1); }' 2>&5` _perl_res=$? if test "$_perl_res" != 0; then @@ -3536,7 +3538,7 @@ fi # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3540: checking for $ac_word" >&5 +echo "configure:3542: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_DOXYGEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3572,7 +3574,7 @@ fi # Extract the first word of "whoami", so it can be a program name with args. set dummy whoami; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3576: checking for $ac_word" >&5 +echo "configure:3578: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_WHOAMI'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3608,7 +3610,7 @@ fi # Extract the first word of "autoconf", so it can be a program name with args. set dummy autoconf; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3612: checking for $ac_word" >&5 +echo "configure:3614: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_AUTOCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3644,7 +3646,7 @@ fi # Extract the first word of "unzip", so it can be a program name with args. set dummy unzip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3648: checking for $ac_word" >&5 +echo "configure:3650: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_UNZIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3682,7 +3684,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:3686: checking for $ac_word" >&5 +echo "configure:3688: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ZIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3723,7 +3725,7 @@ fi # Extract the first word of "makedepend", so it can be a program name with args. set dummy makedepend; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3727: checking for $ac_word" >&5 +echo "configure:3729: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SYSTEM_MAKEDEPEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3758,7 +3760,7 @@ fi # Extract the first word of "xargs", so it can be a program name with args. set dummy xargs; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3762: checking for $ac_word" >&5 +echo "configure:3764: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XARGS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3821,7 +3823,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:3825: checking for $ac_word" >&5 +echo "configure:3827: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PBBUILD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3871,7 +3873,7 @@ done # Extract the first word of "sdp", so it can be a program name with args. set dummy sdp; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3875: checking for $ac_word" >&5 +echo "configure:3877: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SDP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3967,7 +3969,7 @@ tools are selected during the Xcode/Developer Tools installation." 1>&2; exit 1; fi echo $ac_n "checking for valid compiler/Mac OS X SDK combination""... $ac_c" 1>&6 -echo "configure:3971: checking for valid compiler/Mac OS X SDK combination" >&5 +echo "configure:3973: checking for valid compiler/Mac OS X SDK combination" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' @@ -3976,7 +3978,7 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < int main() { return 0; } @@ -3984,7 +3986,7 @@ int main() { result=yes ; return 0; } EOF -if { (eval echo configure:3988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* result=no else @@ -4009,7 +4011,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:4013: checking for $ac_word" >&5 +echo "configure:4015: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MAKE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4052,7 +4054,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:4056: checking for $ac_word" >&5 +echo "configure:4058: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MAKE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4120,7 +4122,7 @@ if test "$COMPILE_ENVIRONMENT"; then # 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:4124: checking for X" >&5 +echo "configure:4126: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -4182,12 +4184,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:4191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4256,14 +4258,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${ac_exeext}; then +if { (eval echo configure:4269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -4369,17 +4371,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:4373: checking whether -R must be followed by a space" >&5 +echo "configure:4375: 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${ac_exeext}; then +if { (eval echo configure:4385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -4395,14 +4397,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${ac_exeext}; then +if { (eval echo configure:4408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -4434,7 +4436,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:4438: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:4440: 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 @@ -4442,7 +4444,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4478,7 +4480,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:4482: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:4484: 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 @@ -4486,7 +4488,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4529,12 +4531,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:4533: checking for gethostbyname" >&5 +echo "configure:4535: 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${ac_exeext}; then +if { (eval echo configure:4566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -4581,7 +4583,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:4585: checking for gethostbyname in -lnsl" >&5 +echo "configure:4587: 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 @@ -4589,7 +4591,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4633,12 +4635,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:4637: checking for connect" >&5 +echo "configure:4639: 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${ac_exeext}; then +if { (eval echo configure:4670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -4685,7 +4687,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:4689: checking for connect in -lsocket" >&5 +echo "configure:4691: 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 @@ -4693,7 +4695,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${ac_exeext}; then +if { (eval echo configure:4713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4731,12 +4733,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:4735: checking for remove" >&5 +echo "configure:4737: 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${ac_exeext}; then +if { (eval echo configure:4768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -4783,7 +4785,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:4787: checking for remove in -lposix" >&5 +echo "configure:4789: 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 @@ -4791,7 +4793,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4829,12 +4831,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:4833: checking for shmat" >&5 +echo "configure:4835: 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${ac_exeext}; then +if { (eval echo configure:4866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -4881,7 +4883,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:4885: checking for shmat in -lipc" >&5 +echo "configure:4887: 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 @@ -4889,7 +4891,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4936,7 +4938,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:4940: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:4942: 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 @@ -4944,7 +4946,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5396,7 +5398,7 @@ MKSHLIB_UNFORCE_ALL= if test "$COMPILE_ENVIRONMENT"; then if test "$GNU_CC"; then echo $ac_n "checking whether ld has archive extraction flags""... $ac_c" 1>&6 -echo "configure:5400: checking whether ld has archive extraction flags" >&5 +echo "configure:5402: checking whether ld has archive extraction flags" >&5 if eval "test \"`echo '$''{'ac_cv_mkshlib_force_and_unforce'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5413,14 +5415,14 @@ LOOP_INPUT LDFLAGS=$force LIBS=$unforce cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_mkshlib_force_and_unforce=$line; break else @@ -5455,17 +5457,17 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking for 64-bit OS""... $ac_c" 1>&6 -echo "configure:5459: checking for 64-bit OS" >&5 +echo "configure:5461: checking for 64-bit OS" >&5 if test "$cross_compiling" = yes; then result="maybe" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then result="yes" else @@ -5621,9 +5623,9 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for VisualAge C++ compiler version >= 5.0.2.0""... $ac_c" 1>&6 -echo "configure:5625: checking for VisualAge C++ compiler version >= 5.0.2.0" >&5 +echo "configure:5627: checking for VisualAge C++ compiler version >= 5.0.2.0" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* _BAD_COMPILER= else @@ -5670,17 +5672,17 @@ cross_compiling=$ac_cv_prog_cxx_cross do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5674: checking for $ac_hdr" >&5 +echo "configure:5676: 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:5684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5722,7 +5724,7 @@ EOF LIBS="$LIBS -lbe" if test "$COMPILE_ENVIRONMENT"; then echo $ac_n "checking for main in -lbind""... $ac_c" 1>&6 -echo "configure:5726: checking for main in -lbind" >&5 +echo "configure:5728: checking for main in -lbind" >&5 ac_lib_var=`echo bind'_'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 @@ -5730,14 +5732,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lbind $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5758,7 +5760,7 @@ else fi echo $ac_n "checking for main in -lzeta""... $ac_c" 1>&6 -echo "configure:5762: checking for main in -lzeta" >&5 +echo "configure:5764: checking for main in -lzeta" >&5 ac_lib_var=`echo zeta'_'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 @@ -5766,14 +5768,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lzeta $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5837,18 +5839,18 @@ fi MACOSX=1 echo $ac_n "checking for -dead_strip option to ld""... $ac_c" 1>&6 -echo "configure:5841: checking for -dead_strip option to ld" >&5 +echo "configure:5843: checking for -dead_strip option to ld" >&5 _SAVE_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-dead_strip" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* _HAVE_DEAD_STRIP=1 else @@ -6542,19 +6544,19 @@ EOF _DEFINES_CXXFLAGS="$_DEFINES_CXXFLAGS -Uunix -U__unix -U__unix__" echo $ac_n "checking for __declspec(dllexport)""... $ac_c" 1>&6 -echo "configure:6546: checking for __declspec(dllexport)" >&5 +echo "configure:6548: checking for __declspec(dllexport)" >&5 if eval "test \"`echo '$''{'ac_os2_declspec'+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:6560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_os2_declspec="yes" else @@ -6733,14 +6735,14 @@ EOF _SAVE_LDFLAGS=$LDFLAGS LDFLAGS="-M /usr/lib/ld/map.noexstk $LDFLAGS" cat > conftest.$ac_ext < int main() { printf("Hello World\n"); ; return 0; } EOF -if { (eval echo configure:6744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then : else echo "configure: failed program was:" >&5 @@ -6768,7 +6770,7 @@ rm -f conftest* CC_VERSION=`$CC -V 2>&1 | grep '^cc:' 2>/dev/null | $AWK -F\: '{ print $2 }'` CXX_VERSION=`$CXX -V 2>&1 | grep '^CC:' 2>/dev/null | $AWK -F\: '{ print $2 }'` echo $ac_n "checking for Forte compiler version >= WS6U2""... $ac_c" 1>&6 -echo "configure:6772: checking for Forte compiler version >= WS6U2" >&5 +echo "configure:6774: checking for Forte compiler version >= WS6U2" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -6778,7 +6780,7 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* _BAD_COMPILER= else @@ -6916,7 +6918,7 @@ case "$target" in ;; *-darwin*) echo $ac_n "checking for -exported_symbols_list option to ld""... $ac_c" 1>&6 -echo "configure:6920: checking for -exported_symbols_list option to ld" >&5 +echo "configure:6922: checking for -exported_symbols_list option to ld" >&5 if eval "test \"`echo '$''{'ac_cv_exported_symbols_list'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6956,12 +6958,12 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:6960: checking for ANSI C header files" >&5 +echo "configure:6962: 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 @@ -6969,7 +6971,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6986,7 +6988,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 @@ -7004,7 +7006,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 @@ -7025,7 +7027,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -7036,7 +7038,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:7040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -7060,12 +7062,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:7064: checking for working const" >&5 +echo "configure:7066: 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:7120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -7135,12 +7137,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:7139: checking for mode_t" >&5 +echo "configure:7141: 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 @@ -7168,12 +7170,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:7172: checking for off_t" >&5 +echo "configure:7174: 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 @@ -7201,12 +7203,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:7205: checking for pid_t" >&5 +echo "configure:7207: 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 @@ -7234,12 +7236,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:7238: checking for size_t" >&5 +echo "configure:7240: 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 @@ -7267,12 +7269,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:7271: checking for st_blksize in struct stat" >&5 +echo "configure:7273: 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 @@ -7280,7 +7282,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:7284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -7301,12 +7303,12 @@ EOF fi echo $ac_n "checking for siginfo_t""... $ac_c" 1>&6 -echo "configure:7305: checking for siginfo_t" >&5 +echo "configure:7307: checking for siginfo_t" >&5 if eval "test \"`echo '$''{'ac_cv_siginfo_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -7314,7 +7316,7 @@ int main() { siginfo_t* info; ; return 0; } EOF -if { (eval echo configure:7318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_siginfo_t=true else @@ -7348,12 +7350,12 @@ EOF fi echo $ac_n "checking for int16_t""... $ac_c" 1>&6 -echo "configure:7352: checking for int16_t" >&5 +echo "configure:7354: checking for int16_t" >&5 if eval "test \"`echo '$''{'ac_cv_int16_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7361,7 +7363,7 @@ int main() { int16_t foo = 0; ; return 0; } EOF -if { (eval echo configure:7365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_int16_t=true else @@ -7383,12 +7385,12 @@ else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for int32_t""... $ac_c" 1>&6 -echo "configure:7387: checking for int32_t" >&5 +echo "configure:7389: checking for int32_t" >&5 if eval "test \"`echo '$''{'ac_cv_int32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7396,7 +7398,7 @@ int main() { int32_t foo = 0; ; return 0; } EOF -if { (eval echo configure:7400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_int32_t=true else @@ -7418,12 +7420,12 @@ else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for int64_t""... $ac_c" 1>&6 -echo "configure:7422: checking for int64_t" >&5 +echo "configure:7424: checking for int64_t" >&5 if eval "test \"`echo '$''{'ac_cv_int64_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7431,7 +7433,7 @@ int main() { int64_t foo = 0; ; return 0; } EOF -if { (eval echo configure:7435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_int64_t=true else @@ -7453,12 +7455,12 @@ else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for int64""... $ac_c" 1>&6 -echo "configure:7457: checking for int64" >&5 +echo "configure:7459: checking for int64" >&5 if eval "test \"`echo '$''{'ac_cv_int64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7466,7 +7468,7 @@ int main() { int64 foo = 0; ; return 0; } EOF -if { (eval echo configure:7470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_int64=true else @@ -7488,12 +7490,12 @@ else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for uint""... $ac_c" 1>&6 -echo "configure:7492: checking for uint" >&5 +echo "configure:7494: checking for uint" >&5 if eval "test \"`echo '$''{'ac_cv_uint'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7501,7 +7503,7 @@ int main() { uint foo = 0; ; return 0; } EOF -if { (eval echo configure:7505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_uint=true else @@ -7523,12 +7525,12 @@ else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for uint_t""... $ac_c" 1>&6 -echo "configure:7527: checking for uint_t" >&5 +echo "configure:7529: checking for uint_t" >&5 if eval "test \"`echo '$''{'ac_cv_uint_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7536,7 +7538,7 @@ int main() { uint_t foo = 0; ; return 0; } EOF -if { (eval echo configure:7540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_uint_t=true else @@ -7558,12 +7560,12 @@ else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for uint16_t""... $ac_c" 1>&6 -echo "configure:7562: checking for uint16_t" >&5 +echo "configure:7564: checking for uint16_t" >&5 if eval "test \"`echo '$''{'ac_cv_uint16_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7571,7 +7573,7 @@ int main() { uint16_t foo = 0; ; return 0; } EOF -if { (eval echo configure:7575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_uint16_t=true else @@ -7602,12 +7604,12 @@ cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for uname.domainname""... $ac_c" 1>&6 -echo "configure:7606: checking for uname.domainname" >&5 +echo "configure:7608: checking for uname.domainname" >&5 if eval "test \"`echo '$''{'ac_cv_have_uname_domainname_field'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -7615,7 +7617,7 @@ int main() { (void)uname(res); if (res != 0) { domain = res->domainname; } ; return 0; } EOF -if { (eval echo configure:7619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_uname_domainname_field=true else @@ -7639,12 +7641,12 @@ else fi echo $ac_n "checking for uname.__domainname""... $ac_c" 1>&6 -echo "configure:7643: checking for uname.__domainname" >&5 +echo "configure:7645: checking for uname.__domainname" >&5 if eval "test \"`echo '$''{'ac_cv_have_uname_us_domainname_field'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -7652,7 +7654,7 @@ int main() { (void)uname(res); if (res != 0) { domain = res->__domainname; } ; return 0; } EOF -if { (eval echo configure:7656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_uname_us_domainname_field=true else @@ -7685,7 +7687,7 @@ cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking for usable wchar_t (2 bytes, unsigned)""... $ac_c" 1>&6 -echo "configure:7689: checking for usable wchar_t (2 bytes, unsigned)" >&5 +echo "configure:7691: checking for usable wchar_t (2 bytes, unsigned)" >&5 if eval "test \"`echo '$''{'ac_cv_have_usable_wchar'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7693,14 +7695,14 @@ else ac_cv_have_usable_wchar="maybe" else cat > conftest.$ac_ext < int main () { return (sizeof(wchar_t) != 2) || (wchar_t)-1 < (wchar_t) 0 ; } EOF -if { (eval echo configure:7704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_have_usable_wchar="yes" else @@ -7735,7 +7737,7 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXFLAGS="$CXXFLAGS -fshort-wchar" echo $ac_n "checking for compiler -fshort-wchar option""... $ac_c" 1>&6 -echo "configure:7739: checking for compiler -fshort-wchar option" >&5 +echo "configure:7741: checking for compiler -fshort-wchar option" >&5 if eval "test \"`echo '$''{'ac_cv_have_usable_wchar_option'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7743,7 +7745,7 @@ else ac_cv_have_usable_wchar_option="maybe" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_have_usable_wchar_option="yes" else @@ -7789,7 +7791,7 @@ fi if test "$GNU_CC"; then echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6 -echo "configure:7793: checking for visibility(hidden) attribute" >&5 +echo "configure:7795: checking for visibility(hidden) attribute" >&5 if eval "test \"`echo '$''{'ac_cv_visibility_hidden'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7814,7 +7816,7 @@ EOF echo $ac_n "checking for visibility(default) attribute""... $ac_c" 1>&6 -echo "configure:7818: checking for visibility(default) attribute" >&5 +echo "configure:7820: checking for visibility(default) attribute" >&5 if eval "test \"`echo '$''{'ac_cv_visibility_default'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7839,7 +7841,7 @@ EOF echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6 -echo "configure:7843: checking for visibility pragma support" >&5 +echo "configure:7845: checking for visibility pragma support" >&5 if eval "test \"`echo '$''{'ac_cv_visibility_pragma'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7864,7 +7866,7 @@ fi echo "$ac_t""$ac_cv_visibility_pragma" 1>&6 if test "$ac_cv_visibility_pragma" = "yes"; then echo $ac_n "checking For gcc visibility bug with class-level attributes (GCC bug 26905)""... $ac_c" 1>&6 -echo "configure:7868: checking For gcc visibility bug with class-level attributes (GCC bug 26905)" >&5 +echo "configure:7870: checking For gcc visibility bug with class-level attributes (GCC bug 26905)" >&5 if eval "test \"`echo '$''{'ac_cv_have_visibility_class_bug'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7892,7 +7894,7 @@ fi echo "$ac_t""$ac_cv_have_visibility_class_bug" 1>&6 echo $ac_n "checking For x86_64 gcc visibility bug with builtins (GCC bug 20297)""... $ac_c" 1>&6 -echo "configure:7896: checking For x86_64 gcc visibility bug with builtins (GCC bug 20297)" >&5 +echo "configure:7898: checking For x86_64 gcc visibility bug with builtins (GCC bug 20297)" >&5 if eval "test \"`echo '$''{'ac_cv_have_visibility_builtin_bug'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7940,12 +7942,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:7944: checking for $ac_hdr that defines DIR" >&5 +echo "configure:7946: 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> @@ -7953,7 +7955,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:7957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -7978,7 +7980,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:7982: checking for opendir in -ldir" >&5 +echo "configure:7984: 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 @@ -7986,7 +7988,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8019,7 +8021,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:8023: checking for opendir in -lx" >&5 +echo "configure:8025: 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 @@ -8027,7 +8029,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8070,17 +8072,17 @@ for ac_hdr in sys/byteorder.h compat.h getopt.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8074: checking for $ac_hdr" >&5 +echo "configure:8076: 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:8084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8110,17 +8112,17 @@ for ac_hdr in sys/bitypes.h memory.h unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8114: checking for $ac_hdr" >&5 +echo "configure:8116: 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:8124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8150,17 +8152,17 @@ for ac_hdr in gnu/libc-version.h nl_types.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8154: checking for $ac_hdr" >&5 +echo "configure:8156: 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:8164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8190,17 +8192,17 @@ for ac_hdr in malloc.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8194: checking for $ac_hdr" >&5 +echo "configure:8196: 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:8204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8230,17 +8232,17 @@ for ac_hdr in X11/XKBlib.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8234: checking for $ac_hdr" >&5 +echo "configure:8236: 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:8244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8271,17 +8273,17 @@ for ac_hdr in sys/statvfs.h sys/statfs.h sys/vfs.h sys/mount.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8275: checking for $ac_hdr" >&5 +echo "configure:8277: 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:8285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8312,17 +8314,17 @@ for ac_hdr in mmintrin.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8316: checking for $ac_hdr" >&5 +echo "configure:8318: 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:8326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8359,17 +8361,17 @@ cross_compiling=$ac_cv_prog_cxx_cross NEW_H=new.h ac_safe=`echo "new" | sed 'y%./+-%__p_%'` echo $ac_n "checking for new""... $ac_c" 1>&6 -echo "configure:8363: checking for new" >&5 +echo "configure:8365: checking for new" >&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:8373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8410,17 +8412,17 @@ case $target in do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8414: checking for $ac_hdr" >&5 +echo "configure:8416: 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:8424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8454,7 +8456,7 @@ case $target in ;; *) echo $ac_n "checking for gethostbyname_r in -lc_r""... $ac_c" 1>&6 -echo "configure:8458: checking for gethostbyname_r in -lc_r" >&5 +echo "configure:8460: checking for gethostbyname_r in -lc_r" >&5 ac_lib_var=`echo c_r'_'gethostbyname_r | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8462,7 +8464,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8510,7 +8512,7 @@ case $target in ;; *) echo $ac_n "checking for atan in -lm""... $ac_c" 1>&6 -echo "configure:8514: checking for atan in -lm" >&5 +echo "configure:8516: checking for atan in -lm" >&5 ac_lib_var=`echo m'_'atan | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8518,7 +8520,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8557,7 +8559,7 @@ else fi echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:8561: checking for dlopen in -ldl" >&5 +echo "configure:8563: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8565,7 +8567,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8593,17 +8595,17 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:8597: checking for dlfcn.h" >&5 +echo "configure:8599: checking for dlfcn.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8639,7 +8641,7 @@ if test ! "$GNU_CXX"; then case $target in *-aix*) echo $ac_n "checking for demangle in -lC_r""... $ac_c" 1>&6 -echo "configure:8643: checking for demangle in -lC_r" >&5 +echo "configure:8645: checking for demangle in -lC_r" >&5 ac_lib_var=`echo C_r'_'demangle | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8647,7 +8649,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lC_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8688,7 +8690,7 @@ fi ;; *) echo $ac_n "checking for demangle in -lC""... $ac_c" 1>&6 -echo "configure:8692: checking for demangle in -lC" >&5 +echo "configure:8694: checking for demangle in -lC" >&5 ac_lib_var=`echo C'_'demangle | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8696,7 +8698,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lC $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8738,7 +8740,7 @@ fi esac fi echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:8742: checking for socket in -lsocket" >&5 +echo "configure:8744: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8746,7 +8748,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8802,7 +8804,7 @@ EOF _SAVE_LDFLAGS="$LDFLAGS" LDFLAGS="$XLDFLAGS $LDFLAGS" echo $ac_n "checking for XDrawLines in -lX11""... $ac_c" 1>&6 -echo "configure:8806: checking for XDrawLines in -lX11" >&5 +echo "configure:8808: checking for XDrawLines in -lX11" >&5 ac_lib_var=`echo X11'_'XDrawLines | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8810,7 +8812,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lX11 $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8843,7 +8845,7 @@ MISSING_X="$MISSING_X -lX11" fi echo $ac_n "checking for XextAddDisplay in -lXext""... $ac_c" 1>&6 -echo "configure:8847: checking for XextAddDisplay in -lXext" >&5 +echo "configure:8849: checking for XextAddDisplay in -lXext" >&5 ac_lib_var=`echo Xext'_'XextAddDisplay | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8851,7 +8853,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXext $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8886,7 +8888,7 @@ fi echo $ac_n "checking for XtFree in -lXt""... $ac_c" 1>&6 -echo "configure:8890: checking for XtFree in -lXt" >&5 +echo "configure:8892: checking for XtFree in -lXt" >&5 ac_lib_var=`echo Xt'_'XtFree | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8894,7 +8896,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8926,7 +8928,7 @@ else unset ac_cv_lib_Xt_XtFree echo $ac_n "checking for IceFlush in -lICE""... $ac_c" 1>&6 -echo "configure:8930: checking for IceFlush in -lICE" >&5 +echo "configure:8932: checking for IceFlush in -lICE" >&5 ac_lib_var=`echo ICE'_'IceFlush | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8934,7 +8936,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $XT_LIBS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8966,7 +8968,7 @@ else fi echo $ac_n "checking for SmcCloseConnection in -lSM""... $ac_c" 1>&6 -echo "configure:8970: checking for SmcCloseConnection in -lSM" >&5 +echo "configure:8972: checking for SmcCloseConnection in -lSM" >&5 ac_lib_var=`echo SM'_'SmcCloseConnection | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8974,7 +8976,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lSM $XT_LIBS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9006,7 +9008,7 @@ else fi echo $ac_n "checking for XtFree in -lXt""... $ac_c" 1>&6 -echo "configure:9010: checking for XtFree in -lXt" >&5 +echo "configure:9012: checking for XtFree in -lXt" >&5 ac_lib_var=`echo Xt'_'XtFree | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9014,7 +9016,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXt $X_PRE_LIBS $XT_LIBS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9059,7 +9061,7 @@ fi esac echo $ac_n "checking for XineramaIsActive in -lXinerama""... $ac_c" 1>&6 -echo "configure:9063: checking for XineramaIsActive in -lXinerama" >&5 +echo "configure:9065: checking for XineramaIsActive in -lXinerama" >&5 ac_lib_var=`echo Xinerama'_'XineramaIsActive | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9067,7 +9069,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXinerama $XLIBS $XEXT_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9100,17 +9102,17 @@ fi ac_safe=`echo "X11/extensions/Xinerama.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/Xinerama.h""... $ac_c" 1>&6 -echo "configure:9104: checking for X11/extensions/Xinerama.h" >&5 +echo "configure:9106: checking for X11/extensions/Xinerama.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:9114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9133,7 +9135,7 @@ fi echo $ac_n "checking for XShmCreateImage in -lXext""... $ac_c" 1>&6 -echo "configure:9137: checking for XShmCreateImage in -lXext" >&5 +echo "configure:9139: checking for XShmCreateImage in -lXext" >&5 ac_lib_var=`echo Xext'_'XShmCreateImage | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9141,7 +9143,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXext $XLIBS $XEXT_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9174,17 +9176,17 @@ fi ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6 -echo "configure:9178: checking for X11/extensions/XShm.h" >&5 +echo "configure:9180: checking for X11/extensions/XShm.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:9188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9214,7 +9216,7 @@ EOF fi echo $ac_n "checking for XieFloGeometry in -lXIE""... $ac_c" 1>&6 -echo "configure:9218: checking for XieFloGeometry in -lXIE" >&5 +echo "configure:9220: checking for XieFloGeometry in -lXIE" >&5 ac_lib_var=`echo XIE'_'XieFloGeometry | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9222,7 +9224,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXIE $XLIBS $XEXT_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9255,17 +9257,17 @@ fi ac_safe=`echo "X11/extensions/XIElib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/XIElib.h""... $ac_c" 1>&6 -echo "configure:9259: checking for X11/extensions/XIElib.h" >&5 +echo "configure:9261: checking for X11/extensions/XIElib.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:9269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9339,7 +9341,7 @@ fi # Extract the first word of "freetype-config", so it can be a program name with args. set dummy freetype-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:9343: checking for $ac_word" >&5 +echo "configure:9345: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_FT2_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9375,7 +9377,7 @@ fi min_ft_version=6.1.0 echo $ac_n "checking for FreeType - version >= $min_ft_version""... $ac_c" 1>&6 -echo "configure:9379: checking for FreeType - version >= $min_ft_version" >&5 +echo "configure:9381: checking for FreeType - version >= $min_ft_version" >&5 no_ft="" if test "$FT2_CONFIG" = "no" ; then no_ft=yes @@ -9423,7 +9425,7 @@ else echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -9449,7 +9451,7 @@ main() } EOF -if { (eval echo configure:9453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -9506,7 +9508,7 @@ darwin*) *) echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:9510: checking for pthread_create in -lpthreads" >&5 +echo "configure:9512: checking for pthread_create in -lpthreads" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -9528,7 +9530,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:9532: checking for pthread_create in -lpthread" >&5 +echo "configure:9534: checking for pthread_create in -lpthread" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -9550,7 +9552,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:9554: checking for pthread_create in -lc_r" >&5 +echo "configure:9556: checking for pthread_create in -lc_r" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -9572,7 +9574,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -echo "configure:9576: checking for pthread_create in -lc" >&5 +echo "configure:9578: checking for pthread_create in -lc" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -9630,7 +9632,7 @@ then rm -f conftest* ac_cv_have_dash_pthread=no echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6 -echo "configure:9634: checking whether ${CC-cc} accepts -pthread" >&5 +echo "configure:9636: checking whether ${CC-cc} accepts -pthread" >&5 echo 'int main() { return 0; }' | cat > conftest.c ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1 if test $? -eq 0; then @@ -9653,7 +9655,7 @@ echo "configure:9634: checking whether ${CC-cc} accepts -pthread" >&5 ac_cv_have_dash_pthreads=no if test "$ac_cv_have_dash_pthread" = "no"; then echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6 -echo "configure:9657: checking whether ${CC-cc} accepts -pthreads" >&5 +echo "configure:9659: checking whether ${CC-cc} accepts -pthreads" >&5 echo 'int main() { return 0; }' | cat > conftest.c ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1 if test $? -eq 0; then @@ -9775,7 +9777,7 @@ esac echo $ac_n "checking whether mmap() sees write()s""... $ac_c" 1>&6 -echo "configure:9779: checking whether mmap() sees write()s" >&5 +echo "configure:9781: checking whether mmap() sees write()s" >&5 mmap_test_prog=' @@ -9814,11 +9816,11 @@ if test "$cross_compiling" = yes; then result="yes" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then result="yes" else @@ -9843,13 +9845,13 @@ fi if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:9847: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:9849: 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 @@ -9867,7 +9869,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -9889,7 +9891,7 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:9893: checking for 8-bit clean memcmp" >&5 +echo "configure:9895: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9897,7 +9899,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -9927,12 +9929,12 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" for ac_func in random strerror lchown fchmod snprintf statvfs memmove rint stat64 lstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9931: checking for $ac_func" >&5 +echo "configure:9933: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9982,12 +9984,12 @@ done for ac_func in flockfile getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9986: checking for $ac_func" >&5 +echo "configure:9988: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10039,12 +10041,12 @@ if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET" -ge "10 for ac_func in localtime_r strtok_r do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10043: checking for $ac_func" >&5 +echo "configure:10045: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10103,19 +10105,19 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for wcrtomb""... $ac_c" 1>&6 -echo "configure:10107: checking for wcrtomb" >&5 +echo "configure:10109: checking for wcrtomb" >&5 if eval "test \"`echo '$''{'ac_cv_have_wcrtomb'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { mbstate_t ps={0};wcrtomb(0,'f',&ps); ; return 0; } EOF -if { (eval echo configure:10119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_have_wcrtomb="yes" else @@ -10135,19 +10137,19 @@ EOF fi echo $ac_n "checking for mbrtowc""... $ac_c" 1>&6 -echo "configure:10139: checking for mbrtowc" >&5 +echo "configure:10141: checking for mbrtowc" >&5 if eval "test \"`echo '$''{'ac_cv_have_mbrtowc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { mbstate_t ps={0};mbrtowc(0,0,0,&ps); ; return 0; } EOF -if { (eval echo configure:10151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_have_mbrtowc="yes" else @@ -10176,12 +10178,12 @@ cross_compiling=$ac_cv_prog_cc_cross fi echo $ac_n "checking for res_ninit()""... $ac_c" 1>&6 -echo "configure:10180: checking for res_ninit()" >&5 +echo "configure:10182: checking for res_ninit()" >&5 if eval "test \"`echo '$''{'ac_cv_func_res_ninit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_res_ninit=yes else @@ -10223,12 +10225,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for gnu_get_libc_version()""... $ac_c" 1>&6 -echo "configure:10227: checking for gnu_get_libc_version()" >&5 +echo "configure:10229: checking for gnu_get_libc_version()" >&5 if eval "test \"`echo '$''{'ac_cv_func_gnu_get_libc_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_gnu_get_libc_version=yes else @@ -10268,7 +10270,7 @@ case $target_os in *) echo $ac_n "checking for iconv in -lc""... $ac_c" 1>&6 -echo "configure:10272: checking for iconv in -lc" >&5 +echo "configure:10274: checking for iconv in -lc" >&5 ac_lib_var=`echo c'_'iconv | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10276,7 +10278,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10309,7 +10311,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6 -echo "configure:10313: checking for iconv in -liconv" >&5 +echo "configure:10315: checking for iconv in -liconv" >&5 ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10317,7 +10319,7 @@ else ac_save_LIBS="$LIBS" LIBS="-liconv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10350,7 +10352,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for libiconv in -liconv""... $ac_c" 1>&6 -echo "configure:10354: checking for libiconv in -liconv" >&5 +echo "configure:10356: checking for libiconv in -liconv" >&5 ac_lib_var=`echo iconv'_'libiconv | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10358,7 +10360,7 @@ else ac_save_LIBS="$LIBS" LIBS="-liconv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10399,12 +10401,12 @@ fi _SAVE_LIBS=$LIBS LIBS="$LIBS $_ICONV_LIBS" echo $ac_n "checking for iconv()""... $ac_c" 1>&6 -echo "configure:10403: checking for iconv()" >&5 +echo "configure:10405: checking for iconv()" >&5 if eval "test \"`echo '$''{'ac_cv_func_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -10418,7 +10420,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:10422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_iconv=yes else @@ -10442,12 +10444,12 @@ EOF LIBXUL_LIBS="$LIBXUL_LIBS $_ICONV_LIBS" LIBICONV="$_ICONV_LIBS" echo $ac_n "checking for iconv() with const input""... $ac_c" 1>&6 -echo "configure:10446: checking for iconv() with const input" >&5 +echo "configure:10448: checking for iconv() with const input" >&5 if eval "test \"`echo '$''{'ac_cv_func_const_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -10462,7 +10464,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:10466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_func_const_iconv=yes else @@ -10491,19 +10493,19 @@ esac echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6 -echo "configure:10495: checking for nl_langinfo and CODESET" >&5 +echo "configure:10497: checking for nl_langinfo and CODESET" >&5 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char* cs = nl_langinfo(CODESET); ; return 0; } EOF -if { (eval echo configure:10507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_langinfo_codeset=yes else @@ -10535,7 +10537,7 @@ cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking for an implementation of va_copy()""... $ac_c" 1>&6 -echo "configure:10539: checking for an implementation of va_copy()" >&5 +echo "configure:10541: checking for an implementation of va_copy()" >&5 if eval "test \"`echo '$''{'ac_cv_va_copy'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10545,7 +10547,7 @@ else else cat > conftest.$ac_ext < @@ -10559,7 +10561,7 @@ else } int main() { f (0, 42); return 0; } EOF -if { (eval echo configure:10563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_va_copy=yes else @@ -10576,7 +10578,7 @@ fi echo "$ac_t""$ac_cv_va_copy" 1>&6 echo $ac_n "checking for an implementation of __va_copy()""... $ac_c" 1>&6 -echo "configure:10580: checking for an implementation of __va_copy()" >&5 +echo "configure:10582: checking for an implementation of __va_copy()" >&5 if eval "test \"`echo '$''{'ac_cv___va_copy'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10586,7 +10588,7 @@ else else cat > conftest.$ac_ext < @@ -10600,7 +10602,7 @@ else } int main() { f (0, 42); return 0; } EOF -if { (eval echo configure:10604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv___va_copy=yes else @@ -10617,7 +10619,7 @@ fi echo "$ac_t""$ac_cv___va_copy" 1>&6 echo $ac_n "checking whether va_lists can be copied by value""... $ac_c" 1>&6 -echo "configure:10621: checking whether va_lists can be copied by value" >&5 +echo "configure:10623: checking whether va_lists can be copied by value" >&5 if eval "test \"`echo '$''{'ac_cv_va_val_copy'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10627,7 +10629,7 @@ else else cat > conftest.$ac_ext < @@ -10641,7 +10643,7 @@ else } int main() { f (0, 42); return 0; } EOF -if { (eval echo configure:10645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_va_val_copy=yes else @@ -10740,7 +10742,7 @@ esac if test "$GNU_CXX"; then echo $ac_n "checking for C++ exceptions flag""... $ac_c" 1>&6 -echo "configure:10744: checking for C++ exceptions flag" >&5 +echo "configure:10746: checking for C++ exceptions flag" >&5 if eval "test \"`echo '$''{'ac_cv_cxx_exceptions_flags'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10775,12 +10777,12 @@ cross_compiling=$ac_cv_prog_cxx_cross HAVE_GCC3_ABI= if test "$GNU_CC"; then echo $ac_n "checking for gcc 3.0 ABI""... $ac_c" 1>&6 -echo "configure:10779: checking for gcc 3.0 ABI" >&5 +echo "configure:10781: checking for gcc 3.0 ABI" >&5 if eval "test \"`echo '$''{'ac_cv_gcc_three_abi'+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:10799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_gcc_three_abi="yes" else @@ -10817,12 +10819,12 @@ fi echo $ac_n "checking for C++ \"explicit\" keyword""... $ac_c" 1>&6 -echo "configure:10821: checking for C++ \"explicit\" keyword" >&5 +echo "configure:10823: checking for C++ \"explicit\" keyword" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_explicit'+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:10838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_explicit=yes else @@ -10853,12 +10855,12 @@ EOF fi echo $ac_n "checking for C++ \"typename\" keyword""... $ac_c" 1>&6 -echo "configure:10857: checking for C++ \"typename\" keyword" >&5 +echo "configure:10859: checking for C++ \"typename\" keyword" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_typename'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < A; A.foo(0); ; return 0; } EOF -if { (eval echo configure:10881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_typename=yes else @@ -10898,12 +10900,12 @@ EOF fi echo $ac_n "checking for modern C++ template specialization syntax support""... $ac_c" 1>&6 -echo "configure:10902: checking for modern C++ template specialization syntax support" >&5 +echo "configure:10904: checking for modern C++ template specialization syntax support" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_modern_specialize_template_syntax'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < struct X { int a; }; class Y {}; @@ -10913,7 +10915,7 @@ X int_x; X y_x; ; return 0; } EOF -if { (eval echo configure:10917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_modern_specialize_template_syntax=yes else @@ -10935,12 +10937,12 @@ fi echo $ac_n "checking whether partial template specialization works""... $ac_c" 1>&6 -echo "configure:10939: checking whether partial template specialization works" >&5 +echo "configure:10941: checking whether partial template specialization works" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_partial_specialization'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < class Foo {}; template class Foo {}; @@ -10948,7 +10950,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:10952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_partial_specialization=yes else @@ -10969,12 +10971,12 @@ EOF fi echo $ac_n "checking whether operators must be re-defined for templates derived from templates""... $ac_c" 1>&6 -echo "configure:10973: checking whether operators must be re-defined for templates derived from templates" >&5 +echo "configure:10975: checking whether operators must be re-defined for templates derived from templates" >&5 if eval "test \"`echo '$''{'ac_cv_need_derived_template_operators'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < class Base { }; template @@ -10986,7 +10988,7 @@ Derived a, b; return 0; ; return 0; } EOF -if { (eval echo configure:10990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_need_derived_template_operators=no else @@ -11008,12 +11010,12 @@ fi echo $ac_n "checking whether we need to cast a derived template to pass as its base class""... $ac_c" 1>&6 -echo "configure:11012: checking whether we need to cast a derived template to pass as its base class" >&5 +echo "configure:11014: checking whether we need to cast a derived template to pass as its base class" >&5 if eval "test \"`echo '$''{'ac_cv_need_cpp_template_cast_to_base'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < class Base { }; template class Derived : public Base { }; @@ -11022,7 +11024,7 @@ int main() { Derived bar; return foo(bar); ; return 0; } EOF -if { (eval echo configure:11026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_need_cpp_template_cast_to_base=no else @@ -11043,12 +11045,12 @@ EOF fi echo $ac_n "checking whether the compiler can resolve const ambiguities for templates""... $ac_c" 1>&6 -echo "configure:11047: checking whether the compiler can resolve const ambiguities for templates" >&5 +echo "configure:11049: checking whether the compiler can resolve const ambiguities for templates" >&5 if eval "test \"`echo '$''{'ac_cv_can_resolve_const_ambiguity'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < class ptrClass { @@ -11069,7 +11071,7 @@ int main() { a(&i); ; return 0; } EOF -if { (eval echo configure:11073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_can_resolve_const_ambiguity=yes else @@ -11091,12 +11093,12 @@ fi echo $ac_n "checking whether the C++ \"using\" keyword can change access""... $ac_c" 1>&6 -echo "configure:11095: checking whether the C++ \"using\" keyword can change access" >&5 +echo "configure:11097: checking whether the C++ \"using\" keyword can change access" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_access_changing_using2'+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:11110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_access_changing_using2=no else @@ -11143,12 +11145,12 @@ EOF fi echo $ac_n "checking whether the C++ \"using\" keyword resolves ambiguity""... $ac_c" 1>&6 -echo "configure:11147: checking whether the C++ \"using\" keyword resolves ambiguity" >&5 +echo "configure:11149: checking whether the C++ \"using\" keyword resolves ambiguity" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_ambiguity_resolving_using'+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:11170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_ambiguity_resolving_using=yes else @@ -11185,19 +11187,19 @@ EOF fi echo $ac_n "checking for \"std::\" namespace""... $ac_c" 1>&6 -echo "configure:11189: checking for \"std::\" namespace" >&5 +echo "configure:11191: checking for \"std::\" namespace" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_namespace_std'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return std::min(0, 1); ; return 0; } EOF -if { (eval echo configure:11201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_namespace_std=yes else @@ -11218,12 +11220,12 @@ EOF fi echo $ac_n "checking whether standard template operator!=() is ambiguous""... $ac_c" 1>&6 -echo "configure:11222: checking whether standard template operator!=() is ambiguous" >&5 +echo "configure:11224: checking whether standard template operator!=() is ambiguous" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_unambiguous_std_notequal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < struct T1 {}; @@ -11233,7 +11235,7 @@ int main() { T1 a,b; return a != b; ; return 0; } EOF -if { (eval echo configure:11237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_unambiguous_std_notequal=unambiguous else @@ -11255,12 +11257,12 @@ fi echo $ac_n "checking for C++ reinterpret_cast""... $ac_c" 1>&6 -echo "configure:11259: checking for C++ reinterpret_cast" >&5 +echo "configure:11261: checking for C++ reinterpret_cast" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_reinterpret_cast'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <(z); ; return 0; } EOF -if { (eval echo configure:11272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_reinterpret_cast=yes else @@ -11289,7 +11291,7 @@ EOF fi echo $ac_n "checking for C++ dynamic_cast to void*""... $ac_c" 1>&6 -echo "configure:11293: checking for C++ dynamic_cast to void*" >&5 +echo "configure:11295: checking for C++ dynamic_cast to void*" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_dynamic_cast_void_ptr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11297,7 +11299,7 @@ else ac_cv_cpp_dynamic_cast_void_ptr=no else cat > conftest.$ac_ext <(suby)))); } EOF -if { (eval echo configure:11320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_cpp_dynamic_cast_void_ptr=yes else @@ -11340,19 +11342,19 @@ fi echo $ac_n "checking whether C++ requires implementation of unused virtual methods""... $ac_c" 1>&6 -echo "configure:11344: checking whether C++ requires implementation of unused virtual methods" >&5 +echo "configure:11346: checking whether C++ requires implementation of unused virtual methods" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_unused_required'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_cpp_unused_required=no else @@ -11375,12 +11377,12 @@ fi echo $ac_n "checking for trouble comparing to zero near std::operator!=()""... $ac_c" 1>&6 -echo "configure:11379: checking for trouble comparing to zero near std::operator!=()" >&5 +echo "configure:11381: checking for trouble comparing to zero near std::operator!=()" >&5 if eval "test \"`echo '$''{'ac_cv_trouble_comparing_to_zero'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < template class Foo {}; @@ -11391,7 +11393,7 @@ int main() { Foo f; return (0 != f); ; return 0; } EOF -if { (eval echo configure:11395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_trouble_comparing_to_zero=no else @@ -11423,19 +11425,19 @@ cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:11427: checking for LC_MESSAGES" >&5 +echo "configure:11429: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'ac_cv_i18n_lc_messages'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int category = LC_MESSAGES; ; return 0; } EOF -if { (eval echo configure:11439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_i18n_lc_messages=yes else @@ -11538,7 +11540,7 @@ fi # Extract the first word of "nspr-config", so it can be a program name with args. set dummy nspr-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:11542: checking for $ac_word" >&5 +echo "configure:11544: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_NSPR_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11573,7 +11575,7 @@ fi min_nspr_version=4.0.0 echo $ac_n "checking for NSPR - version >= $min_nspr_version (skipping)""... $ac_c" 1>&6 -echo "configure:11577: checking for NSPR - version >= $min_nspr_version (skipping)" >&5 +echo "configure:11579: checking for NSPR - version >= $min_nspr_version (skipping)" >&5 no_nspr="" if test "$NSPR_CONFIG" = "no"; then @@ -11675,7 +11677,7 @@ fi # Extract the first word of "nss-config", so it can be a program name with args. set dummy nss-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:11679: checking for $ac_word" >&5 +echo "configure:11681: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_NSS_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11710,7 +11712,7 @@ fi min_nss_version=3.0.0 echo $ac_n "checking for NSS - version >= $min_nss_version (skipping)""... $ac_c" 1>&6 -echo "configure:11714: checking for NSS - version >= $min_nss_version (skipping)" >&5 +echo "configure:11716: checking for NSS - version >= $min_nss_version (skipping)" >&5 no_nss="" if test "$NSS_CONFIG" = "no"; then @@ -11783,7 +11785,7 @@ if test -z "$JPEG_DIR" -o "$JPEG_DIR" = no; then SYSTEM_JPEG= else echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6 -echo "configure:11787: checking for jpeg_destroy_compress in -ljpeg" >&5 +echo "configure:11789: checking for jpeg_destroy_compress in -ljpeg" >&5 ac_lib_var=`echo jpeg'_'jpeg_destroy_compress | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11791,7 +11793,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ljpeg $JPEG_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11831,7 +11833,7 @@ if test "$SYSTEM_JPEG" = 1; then SYSTEM_JPEG= else cat > conftest.$ac_ext < #include @@ -11845,7 +11847,7 @@ else } EOF -if { (eval echo configure:11849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SYSTEM_JPEG=1 else @@ -11886,7 +11888,7 @@ if test -z "$ZLIB_DIR" -o "$ZLIB_DIR" = no; then SYSTEM_ZLIB= else echo $ac_n "checking for gzread in -lz""... $ac_c" 1>&6 -echo "configure:11890: checking for gzread in -lz" >&5 +echo "configure:11892: checking for gzread in -lz" >&5 ac_lib_var=`echo z'_'gzread | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11894,7 +11896,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lz $ZLIB_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11933,7 +11935,7 @@ if test "$SYSTEM_ZLIB" = 1; then SYSTEM_ZLIB= else cat > conftest.$ac_ext < @@ -11954,7 +11956,7 @@ else } EOF -if { (eval echo configure:11958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SYSTEM_ZLIB=1 else @@ -11997,7 +11999,7 @@ if test -z "$PNG_DIR" -o "$PNG_DIR" = no; then SYSTEM_PNG= else echo $ac_n "checking for png_get_valid in -lpng""... $ac_c" 1>&6 -echo "configure:12001: checking for png_get_valid in -lpng" >&5 +echo "configure:12003: checking for png_get_valid in -lpng" >&5 ac_lib_var=`echo png'_'png_get_valid | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12005,7 +12007,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpng $PNG_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12044,7 +12046,7 @@ if test "$SYSTEM_PNG" = 1; then SYSTEM_PNG= else cat > conftest.$ac_ext < #include @@ -12058,7 +12060,7 @@ else } EOF -if { (eval echo configure:12062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SYSTEM_PNG=1 else @@ -12118,848 +12120,9 @@ if test "${with_java_bin_path+set}" = set; then fi -# Toolkit Options - - # Check whether --enable-default-toolkit or --disable-default-toolkit was given. -if test "${enable_default_toolkit+set}" = set; then - enableval="$enable_default_toolkit" - _DEFAULT_TOOLKIT=$enableval -else - _DEFAULT_TOOLKIT=$_PLATFORM_DEFAULT_TOOLKIT -fi - - - if test "$_DEFAULT_TOOLKIT" = "gtk" \ - -o "$_DEFAULT_TOOLKIT" = "qt" \ - -o "$_DEFAULT_TOOLKIT" = "gtk2" \ - -o "$_DEFAULT_TOOLKIT" = "xlib" \ - -o "$_DEFAULT_TOOLKIT" = "os2" \ - -o "$_DEFAULT_TOOLKIT" = "beos" \ - -o "$_DEFAULT_TOOLKIT" = "photon" \ - -o "$_DEFAULT_TOOLKIT" = "mac" \ - -o "$_DEFAULT_TOOLKIT" = "windows" \ - -o "$_DEFAULT_TOOLKIT" = "cocoa" \ - -o "$_DEFAULT_TOOLKIT" = "cairo-windows" \ - -o "$_DEFAULT_TOOLKIT" = "cairo-gtk2" \ - -o "$_DEFAULT_TOOLKIT" = "cairo-beos" \ - -o "$_DEFAULT_TOOLKIT" = "cairo-xlib" \ - -o "$_DEFAULT_TOOLKIT" = "cairo-mac" \ - -o "$_DEFAULT_TOOLKIT" = "cairo-cocoa" - then - MOZ_WIDGET_TOOLKIT=`echo "$_DEFAULT_TOOLKIT" | sed -e "s/,.*$//"` - else - if test "$no_x" != "yes"; then - { echo "configure: error: Toolkit must be xlib, gtk, gtk2 or qt." 1>&2; exit 1; } - else - { echo "configure: error: Toolkit must be $_PLATFORM_DEFAULT_TOOLKIT or cairo-$_PLATFORM_DEFAULT_TOOLKIT (if supported)." 1>&2; exit 1; } - fi - fi - -cat >> confdefs.h <> confdefs.h <<\EOF -#define MOZ_WIDGET_GTK 1 -EOF - - ;; - -gtk2) - MOZ_ENABLE_GTK2=1 - MOZ_ENABLE_XREMOTE=1 - MOZ_ENABLE_COREXFONTS=${MOZ_ENABLE_COREXFONTS-} - TK_CFLAGS='$(MOZ_GTK2_CFLAGS)' - TK_LIBS='$(MOZ_GTK2_LIBS)' - cat >> confdefs.h <<\EOF -#define MOZ_WIDGET_GTK2 1 -EOF - - ;; - -xlib) - MOZ_ENABLE_XLIB=1 - if test "$_HAVE_FREETYPE2"; then - MOZ_ENABLE_FREETYPE2=1 - fi - MOZ_ENABLE_XPRINT=1 - TK_CFLAGS='$(MOZ_XLIB_CFLAGS)' - TK_LIBS='$(MOZ_XLIB_LDFLAGS)' - cat >> confdefs.h <<\EOF -#define MOZ_WIDGET_XLIB 1 -EOF - - ;; - -qt) - MOZ_ENABLE_QT=1 - if test "$_HAVE_FREETYPE2"; then - MOZ_ENABLE_FREETYPE2=1 - fi - MOZ_ENABLE_XPRINT=1 - TK_CFLAGS='$(MOZ_QT_CFLAGS)' - TK_LIBS='$(MOZ_QT_LDFLAGS)' - cat >> confdefs.h <<\EOF -#define MOZ_WIDGET_QT 1 -EOF - - ;; - -photon) - MOZ_ENABLE_PHOTON=1 - cat >> confdefs.h <<\EOF -#define MOZ_WIDGET_PHOTON 1 -EOF - - ;; -mac|cocoa) - TK_LIBS='-framework Carbon' - TK_CFLAGS="-I${MACOS_SDK_DIR}/Developer/Headers/FlatCarbon" - CFLAGS="$CFLAGS $TK_CFLAGS" - CXXFLAGS="$CXXFLAGS $TK_CFLAGS" - MOZ_USER_DIR="Mozilla" - cat >> confdefs.h <<\EOF -#define XP_MACOSX 1 -EOF - - cat >> confdefs.h <<\EOF -#define TARGET_CARBON 1 -EOF - - cat >> confdefs.h <<\EOF -#define TARGET_API_MAC_CARBON 1 -EOF - - if test "$MOZ_WIDGET_TOOLKIT" = "cocoa"; then - MOZ_ENABLE_COCOA=1 - cat >> confdefs.h <<\EOF -#define MOZ_WIDGET_COCOA 1 -EOF - - fi - ;; - -cairo-windows) - MOZ_WIDGET_TOOLKIT=windows - MOZ_GFX_TOOLKIT=cairo - MOZ_ENABLE_CAIRO_GFX=1 - ;; - -cairo-gtk2) - MOZ_WIDGET_TOOLKIT=gtk2 - MOZ_GFX_TOOLKIT=cairo - MOZ_ENABLE_CAIRO_GFX=1 - MOZ_ENABLE_GTK2=1 - MOZ_ENABLE_XREMOTE=1 - TK_CFLAGS='$(MOZ_GTK2_CFLAGS) $(MOZ_CAIRO_CFLAGS)' - TK_LIBS='$(MOZ_GTK2_LIBS) $(MOZ_CAIRO_LIBS)' - cat >> confdefs.h <<\EOF -#define MOZ_WIDGET_GTK2 1 -EOF - - ;; -cairo-beos) - MOZ_WIDGET_TOOLKIT=beos - MOZ_GFX_TOOLKIT=cairo - MOZ_ENABLE_CAIRO_GFX=1 - TK_CFLAGS='$(MOZ_CAIRO_CFLAGS)' - TK_LIBS='$(MOZ_CAIRO_LIBS)' - ;; -cairo-xlib) - MOZ_WIDGET_TOOLKIT=xlib - MOZ_GFX_TOOLKIT=cairo - MOZ_ENABLE_CAIRO_GFX=1 - MOZ_ENABLE_XLIB=1 - TK_CFLAGS='$(MOZ_XLIB_CFLAGS) $(MOZ_CAIRO_FLAGS)' - TK_LIBS='$(MOZ_XLIB_LDFLAGS) $(MOZ_CAIRO_LIBS)' - cat >> confdefs.h <<\EOF -#define MOZ_WIDGET_XLIB 1 -EOF - - ;; -cairo-mac|cairo-cocoa) - if test "$MOZ_WIDGET_TOOLKIT" = "cairo-cocoa"; then - MOZ_WIDGET_TOOLKIT=cocoa - cat >> confdefs.h <<\EOF -#define MOZ_WIDGET_COCOA 1 -EOF - - MOZ_ENABLE_COCOA=1 - else - MOZ_WIDGET_TOOLKIT=mac - fi - MOZ_ENABLE_CAIRO_GFX=1 - MOZ_GFX_TOOLKIT=cairo - MOZ_USER_DIR="Mozilla" - cat >> confdefs.h <<\EOF -#define XP_MACOSX 1 -EOF - - cat >> confdefs.h <<\EOF -#define TARGET_CARBON 1 -EOF - - cat >> confdefs.h <<\EOF -#define TARGET_API_MAC_CARBON 1 -EOF - - TK_LIBS='-framework Carbon' - TK_CFLAGS="-I${MACOS_SDK_DIR}/Developer/Headers/FlatCarbon" - CFLAGS="$CFLAGS $TK_CFLAGS" - CXXFLAGS="$CXXFLAGS $TK_CFLAGS" - ;; -esac - -if test "$MOZ_ENABLE_XREMOTE"; then - cat >> confdefs.h <<\EOF -#define MOZ_ENABLE_XREMOTE 1 -EOF - -fi - -if test "$COMPILE_ENVIRONMENT"; then -if test "$MOZ_ENABLE_GTK" -then - # Check whether --with-gtk-prefix or --without-gtk-prefix was given. -if test "${with_gtk_prefix+set}" = set; then - withval="$with_gtk_prefix" - gtk_config_prefix="$withval" -else - gtk_config_prefix="" -fi - -# Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given. -if test "${with_gtk_exec_prefix+set}" = set; then - withval="$with_gtk_exec_prefix" - gtk_config_exec_prefix="$withval" -else - gtk_config_exec_prefix="" -fi - -# Check whether --enable-gtktest or --disable-gtktest was given. -if test "${enable_gtktest+set}" = set; then - enableval="$enable_gtktest" - : -else - enable_gtktest=yes -fi - - - if test x$gtk_config_exec_prefix != x ; then - gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" - if test x${GTK_CONFIG+set} != xset ; then - GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config - fi - fi - if test x$gtk_config_prefix != x ; then - gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" - if test x${GTK_CONFIG+set} != xset ; then - GTK_CONFIG=$gtk_config_prefix/bin/gtk-config - fi - fi - - unset ac_cv_path_GTK_CONFIG - - # 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:12379: 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 - case "$GTK_CONFIG" in - /*) - ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no" - ;; -esac -fi -GTK_CONFIG="$ac_cv_path_GTK_CONFIG" -if test -n "$GTK_CONFIG"; then - echo "$ac_t""$GTK_CONFIG" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - min_gtk_version=$GTK_VERSION - echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 -echo "configure:12414: checking for GTK - version >= $min_gtk_version" >&5 - no_gtk="" - if test "$GTK_CONFIG" = "no" ; then - no_gtk=yes - else - GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` - GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` - gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` - gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` - gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` - if test "x$enable_gtktest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GTK_CFLAGS" - LIBS="$LIBS $GTK_LIBS" - rm -f conf.gtktest - if test "$cross_compiling" = yes; then - echo $ac_n "cross compiling; assumed OK... $ac_c" -else - cat > conftest.$ac_ext < -#include -#include - -int -main () -{ - int major, minor, micro; - char *tmp_version; - - system ("touch conf.gtktest"); - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = g_strdup("$min_gtk_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_gtk_version"); - exit(1); - } - - if ((gtk_major_version != $gtk_config_major_version) || - (gtk_minor_version != $gtk_config_minor_version) || - (gtk_micro_version != $gtk_config_micro_version)) - { - printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", - $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, - gtk_major_version, gtk_minor_version, gtk_micro_version); - printf ("*** was found! If gtk-config was correct, then it is best\n"); - printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); - printf("*** by modifying your LD_LIBRARY_PATH environment variable, or by editing\n"); - printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); - printf("*** required on your system.\n"); - printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); - printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); - printf("*** before re-running configure\n"); - } -#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) - else if ((gtk_major_version != GTK_MAJOR_VERSION) || - (gtk_minor_version != GTK_MINOR_VERSION) || - (gtk_micro_version != GTK_MICRO_VERSION)) - { - printf("*** GTK+ header files (version %d.%d.%d) do not match\n", - GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); - printf("*** library (version %d.%d.%d)\n", - gtk_major_version, gtk_minor_version, gtk_micro_version); - } -#endif /* defined (GTK_MAJOR_VERSION) ... */ - else - { - if ((gtk_major_version > major) || - ((gtk_major_version == major) && (gtk_minor_version > minor)) || - ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", - gtk_major_version, gtk_minor_version, gtk_micro_version); - printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", - major, minor, micro); - printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); - printf("***\n"); - printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); - printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); - printf("*** correct copy of gtk-config. (In this case, you will have to\n"); - printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n"); - printf("*** so that the correct libraries are found at run-time))\n"); - } - } - return 1; -} - -EOF -if { (eval echo configure:12515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - no_gtk=yes -fi -rm -fr conftest* -fi - - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_gtk" = x ; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - if test "$GTK_CONFIG" = "no" ; then - echo "*** The gtk-config script installed by GTK could not be found." - echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the GTK_CONFIG environment variable to the" - echo "*** full path to gtk-config." - echo "*** GTK+ is available from ftp://ftp.gtk.org/pub/gtk" - else - if test -f conf.gtktest ; then - : - else - echo "*** Could not run GTK test program, checking why..." - CFLAGS="$CFLAGS $GTK_CFLAGS" - LIBS="$LIBS $GTK_LIBS" - cat > conftest.$ac_ext < -#include - -int main() { - return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); -; return 0; } -EOF -if { (eval echo configure:12560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GTK or finding the wrong" - echo "*** version of GTK. If it is not finding GTK, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" - echo "***" - echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" - echo "*** came with the system with the command" - echo "***" - echo "*** rpm --erase --nodeps gtk gtk-devel" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GTK was incorrectly installed" - echo "*** or that you have moved GTK since it was installed. In the latter case, you" - echo "*** may want to edit the gtk-config script: $GTK_CONFIG" -fi -rm -f conftest* - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - GTK_CFLAGS="" - GTK_LIBS="" - { echo "configure: error: Test for GTK failed." 1>&2; exit 1; } - fi - - - rm -f conf.gtktest - - - MOZ_GTK_LDFLAGS=$GTK_LIBS - MOZ_GTK_CFLAGS=$GTK_CFLAGS -fi - -if test "$MOZ_ENABLE_GTK2" -then - succeeded=no - - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:12611: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$PKG_CONFIG" in - /*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -if test -n "$PKG_CONFIG"; then - echo "$ac_t""$PKG_CONFIG" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo $ac_n "checking for gtk+-2.0 >= 1.3.7 gdk-x11-2.0 glib-2.0 gobject-2.0""... $ac_c" 1>&6 -echo "configure:12655: checking for gtk+-2.0 >= 1.3.7 gdk-x11-2.0 glib-2.0 gobject-2.0" >&5 - - if $PKG_CONFIG --exists "gtk+-2.0 >= 1.3.7 gdk-x11-2.0 glib-2.0 gobject-2.0" ; then - echo "$ac_t""yes" 1>&6 - succeeded=yes - - echo $ac_n "checking MOZ_GTK2_CFLAGS""... $ac_c" 1>&6 -echo "configure:12662: checking MOZ_GTK2_CFLAGS" >&5 - MOZ_GTK2_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 1.3.7 gdk-x11-2.0 glib-2.0 gobject-2.0"` - echo "$ac_t""$MOZ_GTK2_CFLAGS" 1>&6 - - echo $ac_n "checking MOZ_GTK2_LIBS""... $ac_c" 1>&6 -echo "configure:12667: checking MOZ_GTK2_LIBS" >&5 - ## Remove evil flags like -Wl,--export-dynamic - MOZ_GTK2_LIBS="`$PKG_CONFIG --libs \"gtk+-2.0 >= 1.3.7 gdk-x11-2.0 glib-2.0 gobject-2.0\" |sed s/-Wl,--export-dynamic//g`" - echo "$ac_t""$MOZ_GTK2_LIBS" 1>&6 - else - MOZ_GTK2_CFLAGS="" - MOZ_GTK2_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - MOZ_GTK2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 1.3.7 gdk-x11-2.0 glib-2.0 gobject-2.0"` - echo $MOZ_GTK2_PKG_ERRORS - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - : - else - { echo "configure: error: Library requirements (gtk+-2.0 >= 1.3.7 gdk-x11-2.0 glib-2.0 gobject-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; exit 1; } - fi - -fi - -if test "$MOZ_ENABLE_XLIB" -then - MOZ_XLIB_CFLAGS="$X_CFLAGS" - MOZ_XLIB_LDFLAGS="$XLDFLAGS" - MOZ_XLIB_LDFLAGS="$MOZ_XLIB_LDFLAGS $XEXT_LIBS $X11_LIBS" -fi - -if test "$MOZ_ENABLE_QT" -then - # Check whether --with-qtdir or --without-qtdir was given. -if test "${with_qtdir+set}" = set; then - withval="$with_qtdir" - QTDIR=$withval -fi - - - if test -z "$QTDIR"; then - QTDIR="/usr" - fi - QTINCDIR="/include/qt" - if test ! -d "$QTDIR$QTINCDIR"; then - QTINCDIR="/include/X11/qt" - fi - if test ! -d "$QTDIR$QTINCDIR"; then - QTINCDIR="/include" - fi - - if test -x "$QTDIR/bin/moc"; then - HOST_MOC="$QTDIR/bin/moc" - else - for ac_prog in moc -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:12731: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_HOST_MOC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$HOST_MOC"; then - ac_cv_prog_HOST_MOC="$HOST_MOC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_HOST_MOC="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -HOST_MOC="$ac_cv_prog_HOST_MOC" -if test -n "$HOST_MOC"; then - echo "$ac_t""$HOST_MOC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$HOST_MOC" && break -done -test -n "$HOST_MOC" || HOST_MOC="""" - - fi - if test -z "$HOST_MOC"; then - { echo "configure: error: no acceptable moc preprocessor found" 1>&2; exit 1; } - fi - MOC=$HOST_MOC - - QT_CFLAGS="-I${QTDIR}${QTINCDIR} -DQT_GENUINE_STR -DQT_NO_STL" - if test -z "$MOZ_DEBUG"; then - QT_CFLAGS="$QT_CFLAGS -DQT_NO_DEBUG -DNO_DEBUG" - fi - _SAVE_LDFLAGS=$LDFLAGS - QT_LDFLAGS=-L${QTDIR}/lib - LDFLAGS="$LDFLAGS $QT_LDFLAGS" - - ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross - - echo $ac_n "checking for main in -lqt""... $ac_c" 1>&6 -echo "configure:12783: checking for main in -lqt" >&5 -ac_lib_var=`echo qt'_'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 -else - ac_save_LIBS="$LIBS" -LIBS="-lqt $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - QT_LIB=-lqt -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for main in -lqt-mt""... $ac_c" 1>&6 -echo "configure:12817: checking for main in -lqt-mt" >&5 -ac_lib_var=`echo qt-mt'_'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 -else - ac_save_LIBS="$LIBS" -LIBS="-lqt-mt $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - QT_LIB=-lqt-mt -else - echo "$ac_t""no" 1>&6 -{ echo "configure: error: Cannot find QT libraries." 1>&2; exit 1; } -fi - -fi - - LDFLAGS=$_SAVE_LDFLAGS - QT_LIBS="-L/usr/X11R6/lib $QT_LDFLAGS $QT_LIB -lXext -lX11" - - MOZ_QT_LDFLAGS=$QT_LIBS - MOZ_QT_CFLAGS=$QT_CFLAGS - - _SAVE_CXXFLAGS=$CXXFLAGS - _SAVE_LIBS=$LIBS - - CXXFLAGS="$CXXFLAGS $QT_CFLAGS" - LIBS="$LIBS $QT_LIBS" - - echo $ac_n "checking Qt - version >= $QT_VERSION""... $ac_c" 1>&6 -echo "configure:12868: checking Qt - version >= $QT_VERSION" >&5 - cat > conftest.$ac_ext < -int main() { - - #if (QT_VERSION < $QT_VERSION_NUM) - #error "QT_VERSION too old" - #endif - -; return 0; } -EOF -if { (eval echo configure:12881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - result="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - result="no" -fi -rm -f conftest* - - echo "$ac_t"""$result"" 1>&6 - if test "$result" = "no"; then - { echo "configure: error: Qt Mozilla requires at least version $QT_VERSION of Qt" 1>&2; exit 1; } - fi - CXXFLAGS=$_SAVE_CXXFLAGS - LIBS=$_SAVE_LIBS - - ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -fi -fi # COMPILE_ENVIRONMENT - - - - - - - - - - - - - - - - - - - - - - - - - - - -if test "$MOZ_ENABLE_CAIRO_GFX" -then - cat >> confdefs.h <<\EOF -#define MOZ_THEBES 1 -EOF - - cat >> confdefs.h <<\EOF -#define MOZ_CAIRO_GFX 1 -EOF - -fi - -if test "$MOZ_ENABLE_GTK" \ -|| test "$MOZ_ENABLE_QT" \ -|| test "$MOZ_ENABLE_XLIB" \ -|| test "$MOZ_ENABLE_GTK2" -then - cat >> confdefs.h <<\EOF -#define MOZ_X11 1 -EOF - - MOZ_X11=1 -fi - - # Application -ACCESSIBILITY=1 BUILD_MODULES=all BUILD_STATIC_LIBS= ENABLE_TESTS=1 @@ -13034,6 +12197,16 @@ SUNCTL= JS_STATIC_BUILD= XPC_IDISPATCH_SUPPORT= + +case "$target_os" in +darwin*) + ACCESSIBILITY= + ;; +*) + ACCESSIBILITY=1 + ;; +esac + case "$target_os" in msvc*|mks*|cygwin*|mingw*) if test -z "$GNU_CC"; then @@ -13239,7 +12412,6 @@ EOF minimo) MOZ_APP_NAME=minimo MOZ_APP_DISPLAYNAME=minimo - ACCESSIBILITY= cat >> confdefs.h <<\EOF #define MINIMO 1 EOF @@ -13328,20 +12500,6 @@ EOF fi ;; -macbrowser) - MOZ_APP_NAME=mozilla - MOZ_APP_DISPLAYNAME=Mozilla - MOZ_APP_VERSION=$MOZILLA_VERSION - MOZ_EXTENSIONS_DEFAULT=" cookie typeaheadfind permissions" - MOZ_AUTH_EXTENSION= - MOZ_PREF_EXTENSIONS= - MOZ_WEBSERVICES= - cat >> confdefs.h <<\EOF -#define MOZ_MACBROWSER 1 -EOF - - ;; - zap) MOZ_APP_NAME=xulrunner MOZ_APP_DISPLAYNAME=Mozilla @@ -13362,6 +12520,31 @@ EOF #define MOZ_ZAP 1 EOF + + if test "$LIBXUL_SDK"; then + { echo "configure: error: Building zap/XULRunner --with-libxul-sdk doesn't make sense" 1>&2; exit 1; } + fi + ;; + + +macbrowser) + MOZ_APP_NAME=mozilla + _PLATFORM_DEFAULT_TOOLKIT=cocoa + ENABLE_TESTS= + ACCESSIBILITY= + MOZ_JSDEBUGGER= + MOZ_SINGLE_PROFILE=1 + MOZ_APP_DISPLAYNAME=Mozilla + MOZ_APP_VERSION=$MOZILLA_VERSION + MOZ_EXTENSIONS_DEFAULT=" cookie typeaheadfind permissions" +# MOZ_XUL_APP=1 + MOZ_AUTH_EXTENSION= + MOZ_PREF_EXTENSIONS= + MOZ_WEBSERVICES= + cat >> confdefs.h <<\EOF +#define MOZ_MACBROWSER 1 +EOF + ;; content/xslt) @@ -13425,6 +12608,846 @@ EOF fi +# Toolkit Options + + # Check whether --enable-default-toolkit or --disable-default-toolkit was given. +if test "${enable_default_toolkit+set}" = set; then + enableval="$enable_default_toolkit" + _DEFAULT_TOOLKIT=$enableval +else + _DEFAULT_TOOLKIT=$_PLATFORM_DEFAULT_TOOLKIT +fi + + + if test "$_DEFAULT_TOOLKIT" = "gtk" \ + -o "$_DEFAULT_TOOLKIT" = "qt" \ + -o "$_DEFAULT_TOOLKIT" = "gtk2" \ + -o "$_DEFAULT_TOOLKIT" = "xlib" \ + -o "$_DEFAULT_TOOLKIT" = "os2" \ + -o "$_DEFAULT_TOOLKIT" = "beos" \ + -o "$_DEFAULT_TOOLKIT" = "photon" \ + -o "$_DEFAULT_TOOLKIT" = "mac" \ + -o "$_DEFAULT_TOOLKIT" = "windows" \ + -o "$_DEFAULT_TOOLKIT" = "cocoa" \ + -o "$_DEFAULT_TOOLKIT" = "cairo-windows" \ + -o "$_DEFAULT_TOOLKIT" = "cairo-gtk2" \ + -o "$_DEFAULT_TOOLKIT" = "cairo-beos" \ + -o "$_DEFAULT_TOOLKIT" = "cairo-xlib" \ + -o "$_DEFAULT_TOOLKIT" = "cairo-mac" \ + -o "$_DEFAULT_TOOLKIT" = "cairo-cocoa" + then + MOZ_WIDGET_TOOLKIT=`echo "$_DEFAULT_TOOLKIT" | sed -e "s/,.*$//"` + else + if test "$no_x" != "yes"; then + { echo "configure: error: Toolkit must be xlib, gtk, gtk2 or qt." 1>&2; exit 1; } + else + { echo "configure: error: Toolkit must be $_PLATFORM_DEFAULT_TOOLKIT or cairo-$_PLATFORM_DEFAULT_TOOLKIT (if supported)." 1>&2; exit 1; } + fi + fi + +cat >> confdefs.h <> confdefs.h <<\EOF +#define MOZ_WIDGET_GTK 1 +EOF + + ;; + +gtk2) + MOZ_ENABLE_GTK2=1 + MOZ_ENABLE_XREMOTE=1 + MOZ_ENABLE_COREXFONTS=${MOZ_ENABLE_COREXFONTS-} + TK_CFLAGS='$(MOZ_GTK2_CFLAGS)' + TK_LIBS='$(MOZ_GTK2_LIBS)' + cat >> confdefs.h <<\EOF +#define MOZ_WIDGET_GTK2 1 +EOF + + ;; + +xlib) + MOZ_ENABLE_XLIB=1 + if test "$_HAVE_FREETYPE2"; then + MOZ_ENABLE_FREETYPE2=1 + fi + MOZ_ENABLE_XPRINT=1 + TK_CFLAGS='$(MOZ_XLIB_CFLAGS)' + TK_LIBS='$(MOZ_XLIB_LDFLAGS)' + cat >> confdefs.h <<\EOF +#define MOZ_WIDGET_XLIB 1 +EOF + + ;; + +qt) + MOZ_ENABLE_QT=1 + if test "$_HAVE_FREETYPE2"; then + MOZ_ENABLE_FREETYPE2=1 + fi + MOZ_ENABLE_XPRINT=1 + TK_CFLAGS='$(MOZ_QT_CFLAGS)' + TK_LIBS='$(MOZ_QT_LDFLAGS)' + cat >> confdefs.h <<\EOF +#define MOZ_WIDGET_QT 1 +EOF + + ;; + +photon) + MOZ_ENABLE_PHOTON=1 + cat >> confdefs.h <<\EOF +#define MOZ_WIDGET_PHOTON 1 +EOF + + ;; +mac|cocoa) + TK_LIBS='-framework Carbon' + TK_CFLAGS="-I${MACOS_SDK_DIR}/Developer/Headers/FlatCarbon" + CFLAGS="$CFLAGS $TK_CFLAGS" + CXXFLAGS="$CXXFLAGS $TK_CFLAGS" + MOZ_USER_DIR="Mozilla" + cat >> confdefs.h <<\EOF +#define XP_MACOSX 1 +EOF + + cat >> confdefs.h <<\EOF +#define TARGET_CARBON 1 +EOF + + cat >> confdefs.h <<\EOF +#define TARGET_API_MAC_CARBON 1 +EOF + + if test "$MOZ_WIDGET_TOOLKIT" = "cocoa"; then + MOZ_ENABLE_COCOA=1 + cat >> confdefs.h <<\EOF +#define MOZ_WIDGET_COCOA 1 +EOF + + fi + ;; + +cairo-windows) + MOZ_WIDGET_TOOLKIT=windows + MOZ_GFX_TOOLKIT=cairo + MOZ_ENABLE_CAIRO_GFX=1 + ;; + +cairo-gtk2) + MOZ_WIDGET_TOOLKIT=gtk2 + MOZ_GFX_TOOLKIT=cairo + MOZ_ENABLE_CAIRO_GFX=1 + MOZ_ENABLE_GTK2=1 + MOZ_ENABLE_XREMOTE=1 + TK_CFLAGS='$(MOZ_GTK2_CFLAGS) $(MOZ_CAIRO_CFLAGS)' + TK_LIBS='$(MOZ_GTK2_LIBS) $(MOZ_CAIRO_LIBS)' + cat >> confdefs.h <<\EOF +#define MOZ_WIDGET_GTK2 1 +EOF + + ;; +cairo-beos) + MOZ_WIDGET_TOOLKIT=beos + MOZ_GFX_TOOLKIT=cairo + MOZ_ENABLE_CAIRO_GFX=1 + TK_CFLAGS='$(MOZ_CAIRO_CFLAGS)' + TK_LIBS='$(MOZ_CAIRO_LIBS)' + ;; + +cairo-xlib) + MOZ_WIDGET_TOOLKIT=xlib + MOZ_GFX_TOOLKIT=cairo + MOZ_ENABLE_CAIRO_GFX=1 + MOZ_ENABLE_XLIB=1 + TK_CFLAGS='$(MOZ_XLIB_CFLAGS) $(MOZ_CAIRO_FLAGS)' + TK_LIBS='$(MOZ_XLIB_LDFLAGS) $(MOZ_CAIRO_LIBS)' + cat >> confdefs.h <<\EOF +#define MOZ_WIDGET_XLIB 1 +EOF + + ;; + +cairo-mac|cairo-cocoa) + if test "$MOZ_WIDGET_TOOLKIT" = "cairo-cocoa"; then + MOZ_WIDGET_TOOLKIT=cocoa + cat >> confdefs.h <<\EOF +#define MOZ_WIDGET_COCOA 1 +EOF + + MOZ_ENABLE_COCOA=1 + else + MOZ_WIDGET_TOOLKIT=mac + fi + MOZ_ENABLE_CAIRO_GFX=1 + MOZ_GFX_TOOLKIT=cairo + MOZ_USER_DIR="Mozilla" + cat >> confdefs.h <<\EOF +#define XP_MACOSX 1 +EOF + + cat >> confdefs.h <<\EOF +#define TARGET_CARBON 1 +EOF + + cat >> confdefs.h <<\EOF +#define TARGET_API_MAC_CARBON 1 +EOF + + TK_LIBS='-framework Carbon' + TK_CFLAGS="-I${MACOS_SDK_DIR}/Developer/Headers/FlatCarbon" + CFLAGS="$CFLAGS $TK_CFLAGS" + CXXFLAGS="$CXXFLAGS $TK_CFLAGS" + ;; +esac + +if test "$MOZ_ENABLE_XREMOTE"; then + cat >> confdefs.h <<\EOF +#define MOZ_ENABLE_XREMOTE 1 +EOF + +fi + +if test "$COMPILE_ENVIRONMENT"; then +if test "$MOZ_ENABLE_GTK" +then + # Check whether --with-gtk-prefix or --without-gtk-prefix was given. +if test "${with_gtk_prefix+set}" = set; then + withval="$with_gtk_prefix" + gtk_config_prefix="$withval" +else + gtk_config_prefix="" +fi + +# Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given. +if test "${with_gtk_exec_prefix+set}" = set; then + withval="$with_gtk_exec_prefix" + gtk_config_exec_prefix="$withval" +else + gtk_config_exec_prefix="" +fi + +# Check whether --enable-gtktest or --disable-gtktest was given. +if test "${enable_gtktest+set}" = set; then + enableval="$enable_gtktest" + : +else + enable_gtktest=yes +fi + + + if test x$gtk_config_exec_prefix != x ; then + gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config + fi + fi + if test x$gtk_config_prefix != x ; then + gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_prefix/bin/gtk-config + fi + fi + + unset ac_cv_path_GTK_CONFIG + + # 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:12871: 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 + case "$GTK_CONFIG" in + /*) + ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no" + ;; +esac +fi +GTK_CONFIG="$ac_cv_path_GTK_CONFIG" +if test -n "$GTK_CONFIG"; then + echo "$ac_t""$GTK_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + min_gtk_version=$GTK_VERSION + echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 +echo "configure:12906: checking for GTK - version >= $min_gtk_version" >&5 + no_gtk="" + if test "$GTK_CONFIG" = "no" ; then + no_gtk=yes + else + GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` + GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` + gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + if test "x$enable_gtktest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + rm -f conf.gtktest + if test "$cross_compiling" = yes; then + echo $ac_n "cross compiling; assumed OK... $ac_c" +else + cat > conftest.$ac_ext < +#include +#include + +int +main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.gtktest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_gtk_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gtk_version"); + exit(1); + } + + if ((gtk_major_version != $gtk_config_major_version) || + (gtk_minor_version != $gtk_config_minor_version) || + (gtk_micro_version != $gtk_config_micro_version)) + { + printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf ("*** was found! If gtk-config was correct, then it is best\n"); + printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH environment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); + printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); + printf("*** before re-running configure\n"); + } +#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) + else if ((gtk_major_version != GTK_MAJOR_VERSION) || + (gtk_minor_version != GTK_MINOR_VERSION) || + (gtk_micro_version != GTK_MICRO_VERSION)) + { + printf("*** GTK+ header files (version %d.%d.%d) do not match\n", + GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); + printf("*** library (version %d.%d.%d)\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + } +#endif /* defined (GTK_MAJOR_VERSION) ... */ + else + { + if ((gtk_major_version > major) || + ((gtk_major_version == major) && (gtk_minor_version > minor)) || + ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); + printf("*** correct copy of gtk-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; +} + +EOF +if { (eval echo configure:13007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + no_gtk=yes +fi +rm -fr conftest* +fi + + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gtk" = x ; then + echo "$ac_t""yes" 1>&6 + : + else + echo "$ac_t""no" 1>&6 + if test "$GTK_CONFIG" = "no" ; then + echo "*** The gtk-config script installed by GTK could not be found." + echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the GTK_CONFIG environment variable to the" + echo "*** full path to gtk-config." + echo "*** GTK+ is available from ftp://ftp.gtk.org/pub/gtk" + else + if test -f conf.gtktest ; then + : + else + echo "*** Could not run GTK test program, checking why..." + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + cat > conftest.$ac_ext < +#include + +int main() { + return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); +; return 0; } +EOF +if { (eval echo configure:13052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GTK or finding the wrong" + echo "*** version of GTK. If it is not finding GTK, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" + echo "***" + echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" + echo "*** came with the system with the command" + echo "***" + echo "*** rpm --erase --nodeps gtk gtk-devel" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GTK was incorrectly installed" + echo "*** or that you have moved GTK since it was installed. In the latter case, you" + echo "*** may want to edit the gtk-config script: $GTK_CONFIG" +fi +rm -f conftest* + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GTK_CFLAGS="" + GTK_LIBS="" + { echo "configure: error: Test for GTK failed." 1>&2; exit 1; } + fi + + + rm -f conf.gtktest + + + MOZ_GTK_LDFLAGS=$GTK_LIBS + MOZ_GTK_CFLAGS=$GTK_CFLAGS +fi + +if test "$MOZ_ENABLE_GTK2" +then + succeeded=no + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:13103: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$PKG_CONFIG" in + /*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +if test -n "$PKG_CONFIG"; then + echo "$ac_t""$PKG_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for gtk+-2.0 >= 1.3.7 gdk-x11-2.0 glib-2.0 gobject-2.0""... $ac_c" 1>&6 +echo "configure:13147: checking for gtk+-2.0 >= 1.3.7 gdk-x11-2.0 glib-2.0 gobject-2.0" >&5 + + if $PKG_CONFIG --exists "gtk+-2.0 >= 1.3.7 gdk-x11-2.0 glib-2.0 gobject-2.0" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking MOZ_GTK2_CFLAGS""... $ac_c" 1>&6 +echo "configure:13154: checking MOZ_GTK2_CFLAGS" >&5 + MOZ_GTK2_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 1.3.7 gdk-x11-2.0 glib-2.0 gobject-2.0"` + echo "$ac_t""$MOZ_GTK2_CFLAGS" 1>&6 + + echo $ac_n "checking MOZ_GTK2_LIBS""... $ac_c" 1>&6 +echo "configure:13159: checking MOZ_GTK2_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + MOZ_GTK2_LIBS="`$PKG_CONFIG --libs \"gtk+-2.0 >= 1.3.7 gdk-x11-2.0 glib-2.0 gobject-2.0\" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$MOZ_GTK2_LIBS" 1>&6 + else + MOZ_GTK2_CFLAGS="" + MOZ_GTK2_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + MOZ_GTK2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 1.3.7 gdk-x11-2.0 glib-2.0 gobject-2.0"` + echo $MOZ_GTK2_PKG_ERRORS + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + : + else + { echo "configure: error: Library requirements (gtk+-2.0 >= 1.3.7 gdk-x11-2.0 glib-2.0 gobject-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; exit 1; } + fi + +fi + +if test "$MOZ_ENABLE_XLIB" +then + MOZ_XLIB_CFLAGS="$X_CFLAGS" + MOZ_XLIB_LDFLAGS="$XLDFLAGS" + MOZ_XLIB_LDFLAGS="$MOZ_XLIB_LDFLAGS $XEXT_LIBS $X11_LIBS" +fi + +if test "$MOZ_ENABLE_QT" +then + # Check whether --with-qtdir or --without-qtdir was given. +if test "${with_qtdir+set}" = set; then + withval="$with_qtdir" + QTDIR=$withval +fi + + + if test -z "$QTDIR"; then + QTDIR="/usr" + fi + QTINCDIR="/include/qt" + if test ! -d "$QTDIR$QTINCDIR"; then + QTINCDIR="/include/X11/qt" + fi + if test ! -d "$QTDIR$QTINCDIR"; then + QTINCDIR="/include" + fi + + if test -x "$QTDIR/bin/moc"; then + HOST_MOC="$QTDIR/bin/moc" + else + for ac_prog in moc +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:13223: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_HOST_MOC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$HOST_MOC"; then + ac_cv_prog_HOST_MOC="$HOST_MOC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_HOST_MOC="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +HOST_MOC="$ac_cv_prog_HOST_MOC" +if test -n "$HOST_MOC"; then + echo "$ac_t""$HOST_MOC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$HOST_MOC" && break +done +test -n "$HOST_MOC" || HOST_MOC="""" + + fi + if test -z "$HOST_MOC"; then + { echo "configure: error: no acceptable moc preprocessor found" 1>&2; exit 1; } + fi + MOC=$HOST_MOC + + QT_CFLAGS="-I${QTDIR}${QTINCDIR} -DQT_GENUINE_STR -DQT_NO_STL" + if test -z "$MOZ_DEBUG"; then + QT_CFLAGS="$QT_CFLAGS -DQT_NO_DEBUG -DNO_DEBUG" + fi + _SAVE_LDFLAGS=$LDFLAGS + QT_LDFLAGS=-L${QTDIR}/lib + LDFLAGS="$LDFLAGS $QT_LDFLAGS" + + ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + + echo $ac_n "checking for main in -lqt""... $ac_c" 1>&6 +echo "configure:13275: checking for main in -lqt" >&5 +ac_lib_var=`echo qt'_'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 +else + ac_save_LIBS="$LIBS" +LIBS="-lqt $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + QT_LIB=-lqt +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for main in -lqt-mt""... $ac_c" 1>&6 +echo "configure:13309: checking for main in -lqt-mt" >&5 +ac_lib_var=`echo qt-mt'_'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 +else + ac_save_LIBS="$LIBS" +LIBS="-lqt-mt $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + QT_LIB=-lqt-mt +else + echo "$ac_t""no" 1>&6 +{ echo "configure: error: Cannot find QT libraries." 1>&2; exit 1; } +fi + +fi + + LDFLAGS=$_SAVE_LDFLAGS + QT_LIBS="-L/usr/X11R6/lib $QT_LDFLAGS $QT_LIB -lXext -lX11" + + MOZ_QT_LDFLAGS=$QT_LIBS + MOZ_QT_CFLAGS=$QT_CFLAGS + + _SAVE_CXXFLAGS=$CXXFLAGS + _SAVE_LIBS=$LIBS + + CXXFLAGS="$CXXFLAGS $QT_CFLAGS" + LIBS="$LIBS $QT_LIBS" + + echo $ac_n "checking Qt - version >= $QT_VERSION""... $ac_c" 1>&6 +echo "configure:13360: checking Qt - version >= $QT_VERSION" >&5 + cat > conftest.$ac_ext < +int main() { + + #if (QT_VERSION < $QT_VERSION_NUM) + #error "QT_VERSION too old" + #endif + +; return 0; } +EOF +if { (eval echo configure:13373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + result="yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + result="no" +fi +rm -f conftest* + + echo "$ac_t"""$result"" 1>&6 + if test "$result" = "no"; then + { echo "configure: error: Qt Mozilla requires at least version $QT_VERSION of Qt" 1>&2; exit 1; } + fi + CXXFLAGS=$_SAVE_CXXFLAGS + LIBS=$_SAVE_LIBS + + ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +fi +fi # COMPILE_ENVIRONMENT + + + + + + + + + + + + + + + + + + + + + + + + + + + +if test "$MOZ_ENABLE_CAIRO_GFX" +then + cat >> confdefs.h <<\EOF +#define MOZ_THEBES 1 +EOF + + cat >> confdefs.h <<\EOF +#define MOZ_CAIRO_GFX 1 +EOF + +fi + +if test "$MOZ_ENABLE_GTK" \ +|| test "$MOZ_ENABLE_QT" \ +|| test "$MOZ_ENABLE_XLIB" \ +|| test "$MOZ_ENABLE_GTK2" +then + cat >> confdefs.h <<\EOF +#define MOZ_X11 1 +EOF + + MOZ_X11=1 +fi + + # Components and Features # Check whether --enable-ui-locale or --disable-ui-locale was given. @@ -13614,7 +13637,7 @@ EOF # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:13618: checking for $ac_word" >&5 +echo "configure:13641: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13658,19 +13681,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for xft""... $ac_c" 1>&6 -echo "configure:13662: checking for xft" >&5 +echo "configure:13685: checking for xft" >&5 if $PKG_CONFIG --exists "xft" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_XFT_CFLAGS""... $ac_c" 1>&6 -echo "configure:13669: checking MOZ_XFT_CFLAGS" >&5 +echo "configure:13692: checking MOZ_XFT_CFLAGS" >&5 MOZ_XFT_CFLAGS=`$PKG_CONFIG --cflags "xft"` echo "$ac_t""$MOZ_XFT_CFLAGS" 1>&6 echo $ac_n "checking MOZ_XFT_LIBS""... $ac_c" 1>&6 -echo "configure:13674: checking MOZ_XFT_LIBS" >&5 +echo "configure:13697: checking MOZ_XFT_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic MOZ_XFT_LIBS="`$PKG_CONFIG --libs \"xft\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$MOZ_XFT_LIBS" 1>&6 @@ -13703,7 +13726,7 @@ echo "configure:13674: checking MOZ_XFT_LIBS" >&5 # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:13707: checking for $ac_word" >&5 +echo "configure:13730: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13747,19 +13770,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for pango >= 1.1.0""... $ac_c" 1>&6 -echo "configure:13751: checking for pango >= 1.1.0" >&5 +echo "configure:13774: checking for pango >= 1.1.0" >&5 if $PKG_CONFIG --exists "pango >= 1.1.0" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking _PANGOCHK_CFLAGS""... $ac_c" 1>&6 -echo "configure:13758: checking _PANGOCHK_CFLAGS" >&5 +echo "configure:13781: checking _PANGOCHK_CFLAGS" >&5 _PANGOCHK_CFLAGS=`$PKG_CONFIG --cflags "pango >= 1.1.0"` echo "$ac_t""$_PANGOCHK_CFLAGS" 1>&6 echo $ac_n "checking _PANGOCHK_LIBS""... $ac_c" 1>&6 -echo "configure:13763: checking _PANGOCHK_LIBS" >&5 +echo "configure:13786: checking _PANGOCHK_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic _PANGOCHK_LIBS="`$PKG_CONFIG --libs \"pango >= 1.1.0\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$_PANGOCHK_LIBS" 1>&6 @@ -13817,7 +13840,7 @@ EOF # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:13821: checking for $ac_word" >&5 +echo "configure:13844: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13861,19 +13884,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for pango >= 1.6.0 pangoft2 >= 1.6.0""... $ac_c" 1>&6 -echo "configure:13865: checking for pango >= 1.6.0 pangoft2 >= 1.6.0" >&5 +echo "configure:13888: checking for pango >= 1.6.0 pangoft2 >= 1.6.0" >&5 if $PKG_CONFIG --exists "pango >= 1.6.0 pangoft2 >= 1.6.0" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_PANGO_CFLAGS""... $ac_c" 1>&6 -echo "configure:13872: checking MOZ_PANGO_CFLAGS" >&5 +echo "configure:13895: checking MOZ_PANGO_CFLAGS" >&5 MOZ_PANGO_CFLAGS=`$PKG_CONFIG --cflags "pango >= 1.6.0 pangoft2 >= 1.6.0"` echo "$ac_t""$MOZ_PANGO_CFLAGS" 1>&6 echo $ac_n "checking MOZ_PANGO_LIBS""... $ac_c" 1>&6 -echo "configure:13877: checking MOZ_PANGO_LIBS" >&5 +echo "configure:13900: checking MOZ_PANGO_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic MOZ_PANGO_LIBS="`$PKG_CONFIG --libs \"pango >= 1.6.0 pangoft2 >= 1.6.0\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$MOZ_PANGO_LIBS" 1>&6 @@ -13929,7 +13952,7 @@ EOF # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:13933: checking for $ac_word" >&5 +echo "configure:13956: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13973,19 +13996,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for pango >= 1.6.0 pangoft2 >= 1.6.0 pangoxft >= 1.6.0""... $ac_c" 1>&6 -echo "configure:13977: checking for pango >= 1.6.0 pangoft2 >= 1.6.0 pangoxft >= 1.6.0" >&5 +echo "configure:14000: checking for pango >= 1.6.0 pangoft2 >= 1.6.0 pangoxft >= 1.6.0" >&5 if $PKG_CONFIG --exists "pango >= 1.6.0 pangoft2 >= 1.6.0 pangoxft >= 1.6.0" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_PANGO_CFLAGS""... $ac_c" 1>&6 -echo "configure:13984: checking MOZ_PANGO_CFLAGS" >&5 +echo "configure:14007: checking MOZ_PANGO_CFLAGS" >&5 MOZ_PANGO_CFLAGS=`$PKG_CONFIG --cflags "pango >= 1.6.0 pangoft2 >= 1.6.0 pangoxft >= 1.6.0"` echo "$ac_t""$MOZ_PANGO_CFLAGS" 1>&6 echo $ac_n "checking MOZ_PANGO_LIBS""... $ac_c" 1>&6 -echo "configure:13989: checking MOZ_PANGO_LIBS" >&5 +echo "configure:14012: checking MOZ_PANGO_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic MOZ_PANGO_LIBS="`$PKG_CONFIG --libs \"pango >= 1.6.0 pangoft2 >= 1.6.0 pangoxft >= 1.6.0\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$MOZ_PANGO_LIBS" 1>&6 @@ -14019,7 +14042,7 @@ echo "configure:13989: checking MOZ_PANGO_LIBS" >&5 # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:14023: checking for $ac_word" >&5 +echo "configure:14046: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14063,19 +14086,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for pango >= 1.6.0 pangoft2 >= 1.6.0""... $ac_c" 1>&6 -echo "configure:14067: checking for pango >= 1.6.0 pangoft2 >= 1.6.0" >&5 +echo "configure:14090: checking for pango >= 1.6.0 pangoft2 >= 1.6.0" >&5 if $PKG_CONFIG --exists "pango >= 1.6.0 pangoft2 >= 1.6.0" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_PANGO_CFLAGS""... $ac_c" 1>&6 -echo "configure:14074: checking MOZ_PANGO_CFLAGS" >&5 +echo "configure:14097: checking MOZ_PANGO_CFLAGS" >&5 MOZ_PANGO_CFLAGS=`$PKG_CONFIG --cflags "pango >= 1.6.0 pangoft2 >= 1.6.0"` echo "$ac_t""$MOZ_PANGO_CFLAGS" 1>&6 echo $ac_n "checking MOZ_PANGO_LIBS""... $ac_c" 1>&6 -echo "configure:14079: checking MOZ_PANGO_LIBS" >&5 +echo "configure:14102: checking MOZ_PANGO_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic MOZ_PANGO_LIBS="`$PKG_CONFIG --libs \"pango >= 1.6.0 pangoft2 >= 1.6.0\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$MOZ_PANGO_LIBS" 1>&6 @@ -14143,7 +14166,7 @@ then _SAVE_LDFLAGS="$LDFLAGS" LDFLAGS="$XLDFLAGS $LDFLAGS" echo $ac_n "checking for XpGetPrinterList in -lXp""... $ac_c" 1>&6 -echo "configure:14147: checking for XpGetPrinterList in -lXp" >&5 +echo "configure:14170: checking for XpGetPrinterList in -lXp" >&5 ac_lib_var=`echo Xp'_'XpGetPrinterList | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14151,7 +14174,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXp $XEXT_LIBS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14234,7 +14257,7 @@ fi # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:14238: checking for $ac_word" >&5 +echo "configure:14261: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14278,19 +14301,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION""... $ac_c" 1>&6 -echo "configure:14282: checking for gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION" >&5 +echo "configure:14305: checking for gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION" >&5 if $PKG_CONFIG --exists "gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_GNOMEVFS_CFLAGS""... $ac_c" 1>&6 -echo "configure:14289: checking MOZ_GNOMEVFS_CFLAGS" >&5 +echo "configure:14312: checking MOZ_GNOMEVFS_CFLAGS" >&5 MOZ_GNOMEVFS_CFLAGS=`$PKG_CONFIG --cflags "gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION"` echo "$ac_t""$MOZ_GNOMEVFS_CFLAGS" 1>&6 echo $ac_n "checking MOZ_GNOMEVFS_LIBS""... $ac_c" 1>&6 -echo "configure:14294: checking MOZ_GNOMEVFS_LIBS" >&5 +echo "configure:14317: checking MOZ_GNOMEVFS_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic MOZ_GNOMEVFS_LIBS="`$PKG_CONFIG --libs \"gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$MOZ_GNOMEVFS_LIBS" 1>&6 @@ -14338,7 +14361,7 @@ echo "configure:14294: checking MOZ_GNOMEVFS_LIBS" >&5 # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:14342: checking for $ac_word" >&5 +echo "configure:14365: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14382,19 +14405,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for gconf-2.0 >= $GCONF_VERSION""... $ac_c" 1>&6 -echo "configure:14386: checking for gconf-2.0 >= $GCONF_VERSION" >&5 +echo "configure:14409: checking for gconf-2.0 >= $GCONF_VERSION" >&5 if $PKG_CONFIG --exists "gconf-2.0 >= $GCONF_VERSION" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_GCONF_CFLAGS""... $ac_c" 1>&6 -echo "configure:14393: checking MOZ_GCONF_CFLAGS" >&5 +echo "configure:14416: checking MOZ_GCONF_CFLAGS" >&5 MOZ_GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= $GCONF_VERSION"` echo "$ac_t""$MOZ_GCONF_CFLAGS" 1>&6 echo $ac_n "checking MOZ_GCONF_LIBS""... $ac_c" 1>&6 -echo "configure:14398: checking MOZ_GCONF_LIBS" >&5 +echo "configure:14421: checking MOZ_GCONF_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic MOZ_GCONF_LIBS="`$PKG_CONFIG --libs \"gconf-2.0 >= $GCONF_VERSION\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$MOZ_GCONF_LIBS" 1>&6 @@ -14438,7 +14461,7 @@ echo "configure:14398: checking MOZ_GCONF_LIBS" >&5 # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:14442: checking for $ac_word" >&5 +echo "configure:14465: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14482,19 +14505,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for libgnome-2.0 >= $LIBGNOME_VERSION""... $ac_c" 1>&6 -echo "configure:14486: checking for libgnome-2.0 >= $LIBGNOME_VERSION" >&5 +echo "configure:14509: checking for libgnome-2.0 >= $LIBGNOME_VERSION" >&5 if $PKG_CONFIG --exists "libgnome-2.0 >= $LIBGNOME_VERSION" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_LIBGNOME_CFLAGS""... $ac_c" 1>&6 -echo "configure:14493: checking MOZ_LIBGNOME_CFLAGS" >&5 +echo "configure:14516: checking MOZ_LIBGNOME_CFLAGS" >&5 MOZ_LIBGNOME_CFLAGS=`$PKG_CONFIG --cflags "libgnome-2.0 >= $LIBGNOME_VERSION"` echo "$ac_t""$MOZ_LIBGNOME_CFLAGS" 1>&6 echo $ac_n "checking MOZ_LIBGNOME_LIBS""... $ac_c" 1>&6 -echo "configure:14498: checking MOZ_LIBGNOME_LIBS" >&5 +echo "configure:14521: checking MOZ_LIBGNOME_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic MOZ_LIBGNOME_LIBS="`$PKG_CONFIG --libs \"libgnome-2.0 >= $LIBGNOME_VERSION\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$MOZ_LIBGNOME_LIBS" 1>&6 @@ -14569,7 +14592,7 @@ fi # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:14573: checking for $ac_word" >&5 +echo "configure:14596: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14613,19 +14636,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for libgnomeui-2.0 >= $GNOMEUI_VERSION""... $ac_c" 1>&6 -echo "configure:14617: checking for libgnomeui-2.0 >= $GNOMEUI_VERSION" >&5 +echo "configure:14640: checking for libgnomeui-2.0 >= $GNOMEUI_VERSION" >&5 if $PKG_CONFIG --exists "libgnomeui-2.0 >= $GNOMEUI_VERSION" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_GNOMEUI_CFLAGS""... $ac_c" 1>&6 -echo "configure:14624: checking MOZ_GNOMEUI_CFLAGS" >&5 +echo "configure:14647: checking MOZ_GNOMEUI_CFLAGS" >&5 MOZ_GNOMEUI_CFLAGS=`$PKG_CONFIG --cflags "libgnomeui-2.0 >= $GNOMEUI_VERSION"` echo "$ac_t""$MOZ_GNOMEUI_CFLAGS" 1>&6 echo $ac_n "checking MOZ_GNOMEUI_LIBS""... $ac_c" 1>&6 -echo "configure:14629: checking MOZ_GNOMEUI_LIBS" >&5 +echo "configure:14652: checking MOZ_GNOMEUI_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic MOZ_GNOMEUI_LIBS="`$PKG_CONFIG --libs \"libgnomeui-2.0 >= $GNOMEUI_VERSION\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$MOZ_GNOMEUI_LIBS" 1>&6 @@ -15142,7 +15165,7 @@ if test -n "${MOZ_JAVAXPCOM}"; then # Extract the first word of "javac", so it can be a program name with args. set dummy javac; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:15146: checking for $ac_word" >&5 +echo "configure:15169: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_JAVAC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15178,7 +15201,7 @@ fi # Extract the first word of "jar", so it can be a program name with args. set dummy jar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:15182: checking for $ac_word" >&5 +echo "configure:15205: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_JAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15500,13 +15523,13 @@ fi echo $ac_n "checking for tar archiver""... $ac_c" 1>&6 -echo "configure:15504: checking for tar archiver" >&5 +echo "configure:15527: checking for tar archiver" >&5 for ac_prog in gnutar gtar tar 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:15510: checking for $ac_word" >&5 +echo "configure:15533: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_TAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15561,13 +15584,13 @@ case "$target_os" in msvc*|mks*|cygwin*|mingw*|wince*) if test -n "$MOZ_UPDATER"; then echo $ac_n "checking for iconv""... $ac_c" 1>&6 -echo "configure:15565: checking for iconv" >&5 +echo "configure:15588: checking for iconv" >&5 for ac_prog in $HOST_ICONV "iconv" 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:15571: checking for $ac_word" >&5 +echo "configure:15594: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_HOST_ICONV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15932,18 +15955,18 @@ MOZ_DEBUG_DISABLE_DEFS="-DNDEBUG -DTRIMMED" if test -n "$MOZ_DEBUG"; then echo $ac_n "checking for valid debug flags""... $ac_c" 1>&6 -echo "configure:15936: checking for valid debug flags" >&5 +echo "configure:15959: checking for valid debug flags" >&5 _SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $MOZ_DEBUG_FLAGS" cat > conftest.$ac_ext < int main() { printf("Hello World\n"); ; return 0; } EOF -if { (eval echo configure:15947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* _results=yes else @@ -15984,18 +16007,18 @@ fi if test "$COMPILE_ENVIRONMENT"; then if test -n "$MOZ_OPTIMIZE"; then echo $ac_n "checking for valid optimization flags""... $ac_c" 1>&6 -echo "configure:15988: checking for valid optimization flags" >&5 +echo "configure:16011: checking for valid optimization flags" >&5 _SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS" cat > conftest.$ac_ext < int main() { printf("Hello World\n"); ; return 0; } EOF -if { (eval echo configure:15999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* _results=yes else @@ -16148,7 +16171,7 @@ fi if test -n "$_ENABLE_EFENCE"; then echo $ac_n "checking for malloc in -lefence""... $ac_c" 1>&6 -echo "configure:16152: checking for malloc in -lefence" >&5 +echo "configure:16175: checking for malloc in -lefence" >&5 ac_lib_var=`echo efence'_'malloc | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -16156,7 +16179,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lefence $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -16268,12 +16291,12 @@ cross_compiling=$ac_cv_prog_cxx_cross for ac_func in __builtin_vec_new __builtin_vec_delete __builtin_new __builtin_delete __pure_virtual do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16272: checking for $ac_func" >&5 +echo "configure:16295: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -16542,12 +16565,12 @@ cross_compiling=$ac_cv_prog_cxx_cross for ac_func in __cxa_demangle do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16546: checking for $ac_func" >&5 +echo "configure:16569: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -16711,7 +16734,7 @@ if test -z "$SKIP_COMPILER_CHECKS"; then # Compiler Options echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6 -echo "configure:16715: checking for gcc -pipe support" >&5 +echo "configure:16738: checking for gcc -pipe support" >&5 if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then echo '#include ' > dummy-hello.c echo 'int main() { printf("Hello World\n"); exit(0); }' >> dummy-hello.c @@ -16726,14 +16749,14 @@ if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then _SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -pipe" cat > conftest.$ac_ext < int main() { printf("Hello World\n"); ; return 0; } EOF -if { (eval echo configure:16737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* _res_gcc_pipe="yes" else @@ -16775,16 +16798,16 @@ if test "$_IGNORE_LONG_LONG_WARNINGS"; then _SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS ${_COMPILER_PREFIX}-Wno-long-long" echo $ac_n "checking whether compiler supports -Wno-long-long""... $ac_c" 1>&6 -echo "configure:16779: checking whether compiler supports -Wno-long-long" >&5 +echo "configure:16802: checking whether compiler supports -Wno-long-long" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} ${_COMPILER_PREFIX}-Wno-long-long" _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-Wno-long-long" @@ -16805,16 +16828,16 @@ _SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fprofile-generate" echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6 -echo "configure:16809: checking whether C compiler supports -fprofile-generate" >&5 +echo "configure:16832: checking whether C compiler supports -fprofile-generate" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* PROFILE_GEN_CFLAGS="-fprofile-generate" result="yes" @@ -16832,16 +16855,16 @@ if test $result = "yes"; then else CFLAGS="$_SAVE_CFLAGS -fprofile-arcs" echo $ac_n "checking whether C compiler supports -fprofile-arcs""... $ac_c" 1>&6 -echo "configure:16836: checking whether C compiler supports -fprofile-arcs" >&5 +echo "configure:16859: checking whether C compiler supports -fprofile-arcs" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* PROFILE_GEN_CFLAGS="-fprofile-arcs" result="yes" @@ -16887,12 +16910,12 @@ if test "$_PEDANTIC"; then _SAVE_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic" echo $ac_n "checking whether C++ compiler has -pedantic long long bug""... $ac_c" 1>&6 -echo "configure:16891: checking whether C++ compiler has -pedantic long long bug" >&5 +echo "configure:16914: checking whether C++ compiler has -pedantic long long bug" >&5 if test "$cross_compiling" = yes; then result="maybe" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:16928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then result="no" else @@ -16931,12 +16954,12 @@ fi fi echo $ac_n "checking for correct temporary object destruction order""... $ac_c" 1>&6 -echo "configure:16935: checking for correct temporary object destruction order" >&5 +echo "configure:16958: checking for correct temporary object destruction order" >&5 if test "$cross_compiling" = yes; then result="maybe" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:16986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then result="yes" else @@ -16980,12 +17003,12 @@ fi _SAVE_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS}" echo $ac_n "checking for correct overload resolution with const and templates""... $ac_c" 1>&6 -echo "configure:16984: checking for correct overload resolution with const and templates" >&5 +echo "configure:17007: checking for correct overload resolution with const and templates" >&5 if eval "test \"`echo '$''{'ac_nscap_nonconst_opeq_bug'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -17015,7 +17038,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:17019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_nscap_nonconst_opeq_bug="no" else @@ -17288,7 +17311,7 @@ then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:17292: checking for $ac_word" >&5 +echo "configure:17315: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -17332,19 +17355,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for libIDL-2.0 >= 0.8.0 glib-2.0 gobject-2.0""... $ac_c" 1>&6 -echo "configure:17336: checking for libIDL-2.0 >= 0.8.0 glib-2.0 gobject-2.0" >&5 +echo "configure:17359: checking for libIDL-2.0 >= 0.8.0 glib-2.0 gobject-2.0" >&5 if $PKG_CONFIG --exists "libIDL-2.0 >= 0.8.0 glib-2.0 gobject-2.0" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking LIBIDL_CFLAGS""... $ac_c" 1>&6 -echo "configure:17343: checking LIBIDL_CFLAGS" >&5 +echo "configure:17366: checking LIBIDL_CFLAGS" >&5 LIBIDL_CFLAGS=`$PKG_CONFIG --cflags "libIDL-2.0 >= 0.8.0 glib-2.0 gobject-2.0"` echo "$ac_t""$LIBIDL_CFLAGS" 1>&6 echo $ac_n "checking LIBIDL_LIBS""... $ac_c" 1>&6 -echo "configure:17348: checking LIBIDL_LIBS" >&5 +echo "configure:17371: checking LIBIDL_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic LIBIDL_LIBS="`$PKG_CONFIG --libs \"libIDL-2.0 >= 0.8.0 glib-2.0 gobject-2.0\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$LIBIDL_LIBS" 1>&6 @@ -17466,7 +17489,7 @@ fi # Extract the first word of "glib-config", so it can be a program name with args. set dummy glib-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:17470: checking for $ac_word" >&5 +echo "configure:17493: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -17501,7 +17524,7 @@ fi min_glib_version=1.2.0 echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 -echo "configure:17505: checking for GLIB - version >= $min_glib_version" >&5 +echo "configure:17528: checking for GLIB - version >= $min_glib_version" >&5 no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes @@ -17524,7 +17547,7 @@ echo "configure:17505: checking for GLIB - version >= $min_glib_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -17600,7 +17623,7 @@ main () } EOF -if { (eval echo configure:17604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:17627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -17634,7 +17657,7 @@ fi CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat > conftest.$ac_ext < @@ -17644,7 +17667,7 @@ int main() { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } EOF -if { (eval echo configure:17648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" @@ -17688,7 +17711,7 @@ rm -f conftest* # Extract the first word of "libIDL-config", so it can be a program name with args. set dummy libIDL-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:17692: checking for $ac_word" >&5 +echo "configure:17715: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_LIBIDL_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -17723,7 +17746,7 @@ fi min_libIDL_version=$LIBIDL_VERSION echo $ac_n "checking for libIDL - version >= $min_libIDL_version""... $ac_c" 1>&6 -echo "configure:17727: checking for libIDL - version >= $min_libIDL_version" >&5 +echo "configure:17750: checking for libIDL - version >= $min_libIDL_version" >&5 no_libIDL="" if test "$LIBIDL_CONFIG" = "no" ; then no_libIDL=yes @@ -17750,7 +17773,7 @@ echo "configure:17727: checking for libIDL - version >= $min_libIDL_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -17836,7 +17859,7 @@ main () } EOF -if { (eval echo configure:17840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:17863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -17870,7 +17893,7 @@ fi CFLAGS="$CFLAGS $LIBIDL_CFLAGS" LIBS="$LIBS $LIBIDL_LIBS" cat > conftest.$ac_ext < @@ -17881,7 +17904,7 @@ int main() { return IDL_get_libver_string ? 1 : 0; ; return 0; } EOF -if { (eval echo configure:17885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding libIDL or finding the wrong" @@ -18009,7 +18032,7 @@ fi # Extract the first word of "glib-config", so it can be a program name with args. set dummy glib-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:18013: checking for $ac_word" >&5 +echo "configure:18036: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -18044,7 +18067,7 @@ fi min_glib_version=1.2.0 echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 -echo "configure:18048: checking for GLIB - version >= $min_glib_version" >&5 +echo "configure:18071: checking for GLIB - version >= $min_glib_version" >&5 no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes @@ -18067,7 +18090,7 @@ echo "configure:18048: checking for GLIB - version >= $min_glib_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -18143,7 +18166,7 @@ main () } EOF -if { (eval echo configure:18147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:18170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -18177,7 +18200,7 @@ fi CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat > conftest.$ac_ext < @@ -18187,7 +18210,7 @@ int main() { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } EOF -if { (eval echo configure:18191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" @@ -18231,7 +18254,7 @@ rm -f conftest* # Extract the first word of "libIDL-config", so it can be a program name with args. set dummy libIDL-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:18235: checking for $ac_word" >&5 +echo "configure:18258: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_LIBIDL_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -18266,7 +18289,7 @@ fi min_libIDL_version=$LIBIDL_VERSION echo $ac_n "checking for libIDL - version >= $min_libIDL_version""... $ac_c" 1>&6 -echo "configure:18270: checking for libIDL - version >= $min_libIDL_version" >&5 +echo "configure:18293: checking for libIDL - version >= $min_libIDL_version" >&5 no_libIDL="" if test "$LIBIDL_CONFIG" = "no" ; then no_libIDL=yes @@ -18293,7 +18316,7 @@ echo "configure:18270: checking for libIDL - version >= $min_libIDL_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -18379,7 +18402,7 @@ main () } EOF -if { (eval echo configure:18383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:18406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -18413,7 +18436,7 @@ fi CFLAGS="$CFLAGS $LIBIDL_CFLAGS" LIBS="$LIBS $LIBIDL_LIBS" cat > conftest.$ac_ext < @@ -18424,7 +18447,7 @@ int main() { return IDL_get_libver_string ? 1 : 0; ; return 0; } EOF -if { (eval echo configure:18428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding libIDL or finding the wrong" @@ -18464,7 +18487,7 @@ rm -f conftest* # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:18468: checking for $ac_word" >&5 +echo "configure:18491: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -18508,19 +18531,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for libIDL-2.0 >= 0.8.0""... $ac_c" 1>&6 -echo "configure:18512: checking for libIDL-2.0 >= 0.8.0" >&5 +echo "configure:18535: checking for libIDL-2.0 >= 0.8.0" >&5 if $PKG_CONFIG --exists "libIDL-2.0 >= 0.8.0" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking LIBIDL_CFLAGS""... $ac_c" 1>&6 -echo "configure:18519: checking LIBIDL_CFLAGS" >&5 +echo "configure:18542: checking LIBIDL_CFLAGS" >&5 LIBIDL_CFLAGS=`$PKG_CONFIG --cflags "libIDL-2.0 >= 0.8.0"` echo "$ac_t""$LIBIDL_CFLAGS" 1>&6 echo $ac_n "checking LIBIDL_LIBS""... $ac_c" 1>&6 -echo "configure:18524: checking LIBIDL_LIBS" >&5 +echo "configure:18547: checking LIBIDL_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic LIBIDL_LIBS="`$PKG_CONFIG --libs \"libIDL-2.0 >= 0.8.0\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$LIBIDL_LIBS" 1>&6 @@ -18555,7 +18578,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:18559: checking for $ac_word" >&5 +echo "configure:18582: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ORBIT_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -18592,7 +18615,7 @@ done if test -n "$ORBIT_CONFIG"; then echo $ac_n "checking for ORBit libIDL usability""... $ac_c" 1>&6 -echo "configure:18596: checking for ORBit libIDL usability" >&5 +echo "configure:18619: checking for ORBit libIDL usability" >&5 _ORBIT_CFLAGS=`${ORBIT_CONFIG} client --cflags` _ORBIT_LIBS=`${ORBIT_CONFIG} client --libs` _ORBIT_INC_PATH=`${PERL} -e '{ for $f (@ARGV) { print "$f " if ($f =~ m/^-I/); } }' -- ${_ORBIT_CFLAGS}` @@ -18609,7 +18632,7 @@ echo "configure:18596: checking for ORBit libIDL usability" >&5 result="maybe" else cat > conftest.$ac_ext < @@ -18624,7 +18647,7 @@ int main() { } EOF -if { (eval echo configure:18628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:18651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then _LIBIDL_FOUND=1 result="yes" @@ -18680,7 +18703,7 @@ if test -z "${GLIB_CFLAGS}" || test -z "${GLIB_LIBS}" ; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:18684: checking for $ac_word" >&5 +echo "configure:18707: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -18724,19 +18747,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for glib-2.0 >= 1.3.7 gobject-2.0""... $ac_c" 1>&6 -echo "configure:18728: checking for glib-2.0 >= 1.3.7 gobject-2.0" >&5 +echo "configure:18751: checking for glib-2.0 >= 1.3.7 gobject-2.0" >&5 if $PKG_CONFIG --exists "glib-2.0 >= 1.3.7 gobject-2.0" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking GLIB_CFLAGS""... $ac_c" 1>&6 -echo "configure:18735: checking GLIB_CFLAGS" >&5 +echo "configure:18758: checking GLIB_CFLAGS" >&5 GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 1.3.7 gobject-2.0"` echo "$ac_t""$GLIB_CFLAGS" 1>&6 echo $ac_n "checking GLIB_LIBS""... $ac_c" 1>&6 -echo "configure:18740: checking GLIB_LIBS" >&5 +echo "configure:18763: checking GLIB_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic GLIB_LIBS="`$PKG_CONFIG --libs \"glib-2.0 >= 1.3.7 gobject-2.0\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$GLIB_LIBS" 1>&6 @@ -18819,7 +18842,7 @@ fi # Extract the first word of "glib-config", so it can be a program name with args. set dummy glib-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:18823: checking for $ac_word" >&5 +echo "configure:18846: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -18854,7 +18877,7 @@ fi min_glib_version=${GLIB_VERSION} echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 -echo "configure:18858: checking for GLIB - version >= $min_glib_version" >&5 +echo "configure:18881: checking for GLIB - version >= $min_glib_version" >&5 no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes @@ -18877,7 +18900,7 @@ echo "configure:18858: checking for GLIB - version >= $min_glib_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -18953,7 +18976,7 @@ main () } EOF -if { (eval echo configure:18957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:18980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -18987,7 +19010,7 @@ fi CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat > conftest.$ac_ext < @@ -18997,7 +19020,7 @@ int main() { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } EOF -if { (eval echo configure:19001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" @@ -19077,19 +19100,19 @@ mk_add_options MOZ_CO_MODULE=mozilla/other-licenses/libart_lgpl" 1>&2; exit 1; } # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:19081: checking for working alloca.h" >&5 +echo "configure:19104: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:19093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -19110,12 +19133,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:19114: checking for alloca" >&5 +echo "configure:19137: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -19175,12 +19198,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:19179: checking whether alloca needs Cray hooks" >&5 +echo "configure:19202: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:19209: checking for $ac_func" >&5 +echo "configure:19232: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -19260,7 +19283,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:19264: checking stack direction for C alloca" >&5 +echo "configure:19287: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -19268,7 +19291,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:19314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -19336,17 +19359,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:19340: checking for $ac_hdr" >&5 +echo "configure:19363: 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:19350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:19373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -19415,7 +19438,7 @@ EOF # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:19419: checking for $ac_word" >&5 +echo "configure:19442: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -19459,19 +19482,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for fontconfig freetype2""... $ac_c" 1>&6 -echo "configure:19463: checking for fontconfig freetype2" >&5 +echo "configure:19486: checking for fontconfig freetype2" >&5 if $PKG_CONFIG --exists "fontconfig freetype2" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking CAIRO_FT_CFLAGS""... $ac_c" 1>&6 -echo "configure:19470: checking CAIRO_FT_CFLAGS" >&5 +echo "configure:19493: checking CAIRO_FT_CFLAGS" >&5 CAIRO_FT_CFLAGS=`$PKG_CONFIG --cflags "fontconfig freetype2"` echo "$ac_t""$CAIRO_FT_CFLAGS" 1>&6 echo $ac_n "checking CAIRO_FT_LIBS""... $ac_c" 1>&6 -echo "configure:19475: checking CAIRO_FT_LIBS" >&5 +echo "configure:19498: checking CAIRO_FT_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic CAIRO_FT_LIBS="`$PKG_CONFIG --libs \"fontconfig freetype2\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$CAIRO_FT_LIBS" 1>&6 @@ -19559,7 +19582,7 @@ echo "configure:19475: checking CAIRO_FT_LIBS" >&5 # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:19563: checking for $ac_word" >&5 +echo "configure:19586: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -19603,19 +19626,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for cairo >= $CAIRO_VERSION freetype2 fontconfig""... $ac_c" 1>&6 -echo "configure:19607: checking for cairo >= $CAIRO_VERSION freetype2 fontconfig" >&5 +echo "configure:19630: checking for cairo >= $CAIRO_VERSION freetype2 fontconfig" >&5 if $PKG_CONFIG --exists "cairo >= $CAIRO_VERSION freetype2 fontconfig" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking CAIRO_CFLAGS""... $ac_c" 1>&6 -echo "configure:19614: checking CAIRO_CFLAGS" >&5 +echo "configure:19637: checking CAIRO_CFLAGS" >&5 CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= $CAIRO_VERSION freetype2 fontconfig"` echo "$ac_t""$CAIRO_CFLAGS" 1>&6 echo $ac_n "checking CAIRO_LIBS""... $ac_c" 1>&6 -echo "configure:19619: checking CAIRO_LIBS" >&5 +echo "configure:19642: checking CAIRO_LIBS" >&5 ## Remove evil flags like -Wl,--export-dynamic CAIRO_LIBS="`$PKG_CONFIG --libs \"cairo >= $CAIRO_VERSION freetype2 fontconfig\" |sed s/-Wl,--export-dynamic//g`" echo "$ac_t""$CAIRO_LIBS" 1>&6 @@ -19679,7 +19702,7 @@ if test `echo "$MOZ_EXTENSIONS" | grep -c python` -ne 0; then # Extract the first word of "python", so it can be a program name with args. set dummy python; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:19683: checking for $ac_word" >&5 +echo "configure:19706: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PYTHON'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -19786,6 +19809,19 @@ EOF fi +# Check whether --enable-ipcd or --disable-ipcd was given. +if test "${enable_ipcd+set}" = set; then + enableval="$enable_ipcd" + if test "$enableval" = "yes"; then + MOZ_IPCD=1 + elif test "$enableval" = "no"; then + MOZ_IPCD= + else + { echo "configure: error: Option, ipcd, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + # Check whether --enable-profilelocking or --disable-profilelocking was given. if test "${enable_profilelocking+set}" = set; then enableval="$enable_profilelocking" @@ -19967,14 +20003,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext < int main() { int x = 1; x++; ; return 0; } EOF -if { (eval echo configure:19978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:20014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -20154,7 +20190,6 @@ fi # COMPILE_ENVIRONMENT - CFLAGS=`echo \ @@ -20281,7 +20316,7 @@ if test "$MOZ_X11"; then _SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $XCFLAGS" cat > conftest.$ac_ext < @@ -20298,7 +20333,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:20302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:20337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -20753,6 +20788,18 @@ s%@NSPR_LIBS@%$NSPR_LIBS%g s%@NSS_CONFIG@%$NSS_CONFIG%g s%@NSS_CFLAGS@%$NSS_CFLAGS%g s%@NSS_LIBS@%$NSS_LIBS%g +s%@MOZ_EMBEDDING_LEVEL_DEFAULT@%$MOZ_EMBEDDING_LEVEL_DEFAULT%g +s%@MOZ_EMBEDDING_LEVEL_BASIC@%$MOZ_EMBEDDING_LEVEL_BASIC%g +s%@MOZ_EMBEDDING_LEVEL_MINIMAL@%$MOZ_EMBEDDING_LEVEL_MINIMAL%g +s%@MOZ_BUILD_APP@%$MOZ_BUILD_APP%g +s%@MOZ_XUL_APP@%$MOZ_XUL_APP%g +s%@MOZ_SUITE@%$MOZ_SUITE%g +s%@MOZ_PHOENIX@%$MOZ_PHOENIX%g +s%@MOZ_THUNDERBIRD@%$MOZ_THUNDERBIRD%g +s%@MOZ_STANDALONE_COMPOSER@%$MOZ_STANDALONE_COMPOSER%g +s%@MOZ_SUNBIRD@%$MOZ_SUNBIRD%g +s%@MOZ_XULRUNNER@%$MOZ_XULRUNNER%g +s%@MOZ_ZAP@%$MOZ_ZAP%g s%@GTK_CONFIG@%$GTK_CONFIG%g s%@GTK_CFLAGS@%$GTK_CFLAGS%g s%@GTK_LIBS@%$GTK_LIBS%g @@ -20780,18 +20827,6 @@ s%@MOZ_QT_CFLAGS@%$MOZ_QT_CFLAGS%g s%@MOZ_QT_LDFLAGS@%$MOZ_QT_LDFLAGS%g s%@MOC@%$MOC%g s%@MOZ_X11@%$MOZ_X11%g -s%@MOZ_EMBEDDING_LEVEL_DEFAULT@%$MOZ_EMBEDDING_LEVEL_DEFAULT%g -s%@MOZ_EMBEDDING_LEVEL_BASIC@%$MOZ_EMBEDDING_LEVEL_BASIC%g -s%@MOZ_EMBEDDING_LEVEL_MINIMAL@%$MOZ_EMBEDDING_LEVEL_MINIMAL%g -s%@MOZ_BUILD_APP@%$MOZ_BUILD_APP%g -s%@MOZ_XUL_APP@%$MOZ_XUL_APP%g -s%@MOZ_SUITE@%$MOZ_SUITE%g -s%@MOZ_PHOENIX@%$MOZ_PHOENIX%g -s%@MOZ_THUNDERBIRD@%$MOZ_THUNDERBIRD%g -s%@MOZ_STANDALONE_COMPOSER@%$MOZ_STANDALONE_COMPOSER%g -s%@MOZ_SUNBIRD@%$MOZ_SUNBIRD%g -s%@MOZ_XULRUNNER@%$MOZ_XULRUNNER%g -s%@MOZ_ZAP@%$MOZ_ZAP%g s%@MOZ_UI_LOCALE@%$MOZ_UI_LOCALE%g s%@MOZ_CALENDAR@%$MOZ_CALENDAR%g s%@MOZ_MAIL_NEWS@%$MOZ_MAIL_NEWS%g @@ -20963,7 +20998,6 @@ s%@MOZ_LEAKY@%$MOZ_LEAKY%g s%@MOZ_JPROF@%$MOZ_JPROF%g s%@MOZ_XPCTOOLS@%$MOZ_XPCTOOLS%g s%@MOZ_JSLOADER@%$MOZ_JSLOADER%g -s%@MOZ_JSCODELIB@%$MOZ_JSCODELIB%g s%@MOZ_USE_NATIVE_UCONV@%$MOZ_USE_NATIVE_UCONV%g s%@MOZ_INSURE@%$MOZ_INSURE%g s%@MOZ_INSURE_DIRS@%$MOZ_INSURE_DIRS%g diff --git a/mozilla/configure.in b/mozilla/configure.in index eefe77d55e1..456264dff9b 100644 --- a/mozilla/configure.in +++ b/mozilla/configure.in @@ -3983,317 +3983,6 @@ MOZ_ARG_WITH_STRING(java-bin-path, [ --with-java-bin-path=dir Location of Java binaries (java, javac, jar)], JAVA_BIN_PATH=$withval) -dnl ======================================================== -dnl = -dnl = Toolkit Options -dnl = -dnl ======================================================== -MOZ_ARG_HEADER(Toolkit Options) - - dnl ======================================================== - dnl = Select the default toolkit - dnl ======================================================== - MOZ_ARG_ENABLE_STRING(default-toolkit, - [ --enable-default-toolkit=TK - Select default toolkit - Platform specific defaults: - BeOS - beos - Mac OS X - mac (carbon) - Neutrino/QNX - photon - OS/2 - os2 - Win32 - windows - * - gtk], - [ _DEFAULT_TOOLKIT=$enableval ], - [ _DEFAULT_TOOLKIT=$_PLATFORM_DEFAULT_TOOLKIT]) - - if test "$_DEFAULT_TOOLKIT" = "gtk" \ - -o "$_DEFAULT_TOOLKIT" = "qt" \ - -o "$_DEFAULT_TOOLKIT" = "gtk2" \ - -o "$_DEFAULT_TOOLKIT" = "xlib" \ - -o "$_DEFAULT_TOOLKIT" = "os2" \ - -o "$_DEFAULT_TOOLKIT" = "beos" \ - -o "$_DEFAULT_TOOLKIT" = "photon" \ - -o "$_DEFAULT_TOOLKIT" = "mac" \ - -o "$_DEFAULT_TOOLKIT" = "windows" \ - -o "$_DEFAULT_TOOLKIT" = "cocoa" \ - -o "$_DEFAULT_TOOLKIT" = "cairo-windows" \ - -o "$_DEFAULT_TOOLKIT" = "cairo-gtk2" \ - -o "$_DEFAULT_TOOLKIT" = "cairo-beos" \ - -o "$_DEFAULT_TOOLKIT" = "cairo-xlib" \ - -o "$_DEFAULT_TOOLKIT" = "cairo-mac" \ - -o "$_DEFAULT_TOOLKIT" = "cairo-cocoa" - then - dnl nglayout only supports building with one toolkit, - dnl so ignore everything after the first comma (","). - MOZ_WIDGET_TOOLKIT=`echo "$_DEFAULT_TOOLKIT" | sed -e "s/,.*$//"` - else - if test "$no_x" != "yes"; then - AC_MSG_ERROR([Toolkit must be xlib, gtk, gtk2 or qt.]) - else - AC_MSG_ERROR([Toolkit must be $_PLATFORM_DEFAULT_TOOLKIT or cairo-$_PLATFORM_DEFAULT_TOOLKIT (if supported).]) - fi - fi - -AC_DEFINE_UNQUOTED(MOZ_DEFAULT_TOOLKIT,"$MOZ_WIDGET_TOOLKIT") - -dnl ======================================================== -dnl = Enable the toolkit as needed = -dnl ======================================================== - -case "$MOZ_WIDGET_TOOLKIT" in -gtk) - MOZ_ENABLE_GTK=1 - MOZ_ENABLE_XREMOTE=1 - if test "$_HAVE_FREETYPE2"; then - MOZ_ENABLE_FREETYPE2=1 - fi - MOZ_ENABLE_XPRINT=1 - TK_CFLAGS='$(MOZ_GTK_CFLAGS)' - TK_LIBS='$(MOZ_GTK_LDFLAGS)' - AC_DEFINE(MOZ_WIDGET_GTK) - ;; - -gtk2) - MOZ_ENABLE_GTK2=1 - MOZ_ENABLE_XREMOTE=1 - MOZ_ENABLE_COREXFONTS=${MOZ_ENABLE_COREXFONTS-} - TK_CFLAGS='$(MOZ_GTK2_CFLAGS)' - TK_LIBS='$(MOZ_GTK2_LIBS)' - AC_DEFINE(MOZ_WIDGET_GTK2) - ;; - -xlib) - MOZ_ENABLE_XLIB=1 - if test "$_HAVE_FREETYPE2"; then - MOZ_ENABLE_FREETYPE2=1 - fi - MOZ_ENABLE_XPRINT=1 - TK_CFLAGS='$(MOZ_XLIB_CFLAGS)' - TK_LIBS='$(MOZ_XLIB_LDFLAGS)' - AC_DEFINE(MOZ_WIDGET_XLIB) - ;; - -qt) - MOZ_ENABLE_QT=1 - if test "$_HAVE_FREETYPE2"; then - MOZ_ENABLE_FREETYPE2=1 - fi - MOZ_ENABLE_XPRINT=1 - TK_CFLAGS='$(MOZ_QT_CFLAGS)' - TK_LIBS='$(MOZ_QT_LDFLAGS)' - AC_DEFINE(MOZ_WIDGET_QT) - ;; - -photon) - MOZ_ENABLE_PHOTON=1 - AC_DEFINE(MOZ_WIDGET_PHOTON) - ;; -mac|cocoa) - TK_LIBS='-framework Carbon' - TK_CFLAGS="-I${MACOS_SDK_DIR}/Developer/Headers/FlatCarbon" - CFLAGS="$CFLAGS $TK_CFLAGS" - CXXFLAGS="$CXXFLAGS $TK_CFLAGS" - MOZ_USER_DIR="Mozilla" - AC_DEFINE(XP_MACOSX) - AC_DEFINE(TARGET_CARBON) - AC_DEFINE(TARGET_API_MAC_CARBON) - if test "$MOZ_WIDGET_TOOLKIT" = "cocoa"; then - MOZ_ENABLE_COCOA=1 - AC_DEFINE(MOZ_WIDGET_COCOA) - fi - ;; - -cairo-windows) - MOZ_WIDGET_TOOLKIT=windows - MOZ_GFX_TOOLKIT=cairo - MOZ_ENABLE_CAIRO_GFX=1 - ;; - -cairo-gtk2) - MOZ_WIDGET_TOOLKIT=gtk2 - MOZ_GFX_TOOLKIT=cairo - MOZ_ENABLE_CAIRO_GFX=1 - MOZ_ENABLE_GTK2=1 - MOZ_ENABLE_XREMOTE=1 - TK_CFLAGS='$(MOZ_GTK2_CFLAGS) $(MOZ_CAIRO_CFLAGS)' - TK_LIBS='$(MOZ_GTK2_LIBS) $(MOZ_CAIRO_LIBS)' - AC_DEFINE(MOZ_WIDGET_GTK2) - ;; -cairo-beos) - MOZ_WIDGET_TOOLKIT=beos - MOZ_GFX_TOOLKIT=cairo - MOZ_ENABLE_CAIRO_GFX=1 - TK_CFLAGS='$(MOZ_CAIRO_CFLAGS)' - TK_LIBS='$(MOZ_CAIRO_LIBS)' - ;; -cairo-xlib) - MOZ_WIDGET_TOOLKIT=xlib - MOZ_GFX_TOOLKIT=cairo - MOZ_ENABLE_CAIRO_GFX=1 - MOZ_ENABLE_XLIB=1 - TK_CFLAGS='$(MOZ_XLIB_CFLAGS) $(MOZ_CAIRO_FLAGS)' - TK_LIBS='$(MOZ_XLIB_LDFLAGS) $(MOZ_CAIRO_LIBS)' - AC_DEFINE(MOZ_WIDGET_XLIB) - ;; -cairo-mac|cairo-cocoa) - if test "$MOZ_WIDGET_TOOLKIT" = "cairo-cocoa"; then - MOZ_WIDGET_TOOLKIT=cocoa - AC_DEFINE(MOZ_WIDGET_COCOA) - MOZ_ENABLE_COCOA=1 - else - MOZ_WIDGET_TOOLKIT=mac - fi - MOZ_ENABLE_CAIRO_GFX=1 - MOZ_GFX_TOOLKIT=cairo - MOZ_USER_DIR="Mozilla" - AC_DEFINE(XP_MACOSX) - AC_DEFINE(TARGET_CARBON) - AC_DEFINE(TARGET_API_MAC_CARBON) - TK_LIBS='-framework Carbon' - TK_CFLAGS="-I${MACOS_SDK_DIR}/Developer/Headers/FlatCarbon" - CFLAGS="$CFLAGS $TK_CFLAGS" - CXXFLAGS="$CXXFLAGS $TK_CFLAGS" - ;; -esac - -if test "$MOZ_ENABLE_XREMOTE"; then - AC_DEFINE(MOZ_ENABLE_XREMOTE) -fi - -if test "$COMPILE_ENVIRONMENT"; then -if test "$MOZ_ENABLE_GTK" -then - AM_PATH_GTK($GTK_VERSION,, - AC_MSG_ERROR(Test for GTK failed.)) - - MOZ_GTK_LDFLAGS=$GTK_LIBS - MOZ_GTK_CFLAGS=$GTK_CFLAGS -fi - -if test "$MOZ_ENABLE_GTK2" -then - PKG_CHECK_MODULES(MOZ_GTK2, gtk+-2.0 >= 1.3.7 gdk-x11-2.0 glib-2.0 gobject-2.0) -fi - -if test "$MOZ_ENABLE_XLIB" -then - MOZ_XLIB_CFLAGS="$X_CFLAGS" - MOZ_XLIB_LDFLAGS="$XLDFLAGS" - MOZ_XLIB_LDFLAGS="$MOZ_XLIB_LDFLAGS $XEXT_LIBS $X11_LIBS" -fi - -if test "$MOZ_ENABLE_QT" -then - MOZ_ARG_WITH_STRING(qtdir, - [ --with-qtdir=\$dir Specify Qt directory ], - [ QTDIR=$withval]) - - if test -z "$QTDIR"; then - QTDIR="/usr" - fi - QTINCDIR="/include/qt" - if test ! -d "$QTDIR$QTINCDIR"; then - QTINCDIR="/include/X11/qt" - fi - if test ! -d "$QTDIR$QTINCDIR"; then - QTINCDIR="/include" - fi - - if test -x "$QTDIR/bin/moc"; then - HOST_MOC="$QTDIR/bin/moc" - else - AC_CHECK_PROGS(HOST_MOC, moc, "") - fi - if test -z "$HOST_MOC"; then - AC_MSG_ERROR([no acceptable moc preprocessor found]) - fi - MOC=$HOST_MOC - - QT_CFLAGS="-I${QTDIR}${QTINCDIR} -DQT_GENUINE_STR -DQT_NO_STL" - if test -z "$MOZ_DEBUG"; then - QT_CFLAGS="$QT_CFLAGS -DQT_NO_DEBUG -DNO_DEBUG" - fi - _SAVE_LDFLAGS=$LDFLAGS - QT_LDFLAGS=-L${QTDIR}/lib - LDFLAGS="$LDFLAGS $QT_LDFLAGS" - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_CHECK_LIB(qt, main, QT_LIB=-lqt, - AC_CHECK_LIB(qt-mt, main, QT_LIB=-lqt-mt, - AC_MSG_ERROR([Cannot find QT libraries.]))) - LDFLAGS=$_SAVE_LDFLAGS - QT_LIBS="-L/usr/X11R6/lib $QT_LDFLAGS $QT_LIB -lXext -lX11" - - MOZ_QT_LDFLAGS=$QT_LIBS - MOZ_QT_CFLAGS=$QT_CFLAGS - - _SAVE_CXXFLAGS=$CXXFLAGS - _SAVE_LIBS=$LIBS - - CXXFLAGS="$CXXFLAGS $QT_CFLAGS" - LIBS="$LIBS $QT_LIBS" - - AC_MSG_CHECKING(Qt - version >= $QT_VERSION) - AC_TRY_COMPILE([#include ], - [ - #if (QT_VERSION < $QT_VERSION_NUM) - #error "QT_VERSION too old" - #endif - ],result="yes",result="no") - - AC_MSG_RESULT("$result") - if test "$result" = "no"; then - AC_MSG_ERROR([Qt Mozilla requires at least version $QT_VERSION of Qt]) - fi - CXXFLAGS=$_SAVE_CXXFLAGS - LIBS=$_SAVE_LIBS - - AC_LANG_RESTORE -fi -fi # COMPILE_ENVIRONMENT - -AC_SUBST(MOZ_DEFAULT_TOOLKIT) - -AC_SUBST(GTK_CONFIG) -AC_SUBST(TK_CFLAGS) -AC_SUBST(TK_LIBS) - -AC_SUBST(MOZ_ENABLE_GTK) -AC_SUBST(MOZ_ENABLE_XLIB) -AC_SUBST(MOZ_ENABLE_GTK2) -AC_SUBST(MOZ_ENABLE_QT) -AC_SUBST(MOZ_ENABLE_PHOTON) -AC_SUBST(MOZ_ENABLE_COCOA) -AC_SUBST(MOZ_ENABLE_CAIRO_GFX) -AC_SUBST(MOZ_ENABLE_GLITZ) -AC_SUBST(MOZ_ENABLE_XREMOTE) -AC_SUBST(MOZ_GTK_CFLAGS) -AC_SUBST(MOZ_GTK_LDFLAGS) -AC_SUBST(MOZ_GTK2_CFLAGS) -AC_SUBST(MOZ_GTK2_LIBS) -AC_SUBST(MOZ_XLIB_CFLAGS) -AC_SUBST(MOZ_XLIB_LDFLAGS) -AC_SUBST(MOZ_QT_CFLAGS) -AC_SUBST(MOZ_QT_LDFLAGS) - -AC_SUBST(MOC) - -if test "$MOZ_ENABLE_CAIRO_GFX" -then - AC_DEFINE(MOZ_THEBES) - AC_DEFINE(MOZ_CAIRO_GFX) -fi - -if test "$MOZ_ENABLE_GTK" \ -|| test "$MOZ_ENABLE_QT" \ -|| test "$MOZ_ENABLE_XLIB" \ -|| test "$MOZ_ENABLE_GTK2" -then - AC_DEFINE(MOZ_X11) - MOZ_X11=1 -fi -AC_SUBST(MOZ_X11) - dnl ======================================================== dnl = dnl = Application @@ -4302,7 +3991,6 @@ dnl ======================================================== MOZ_ARG_HEADER(Application) -ACCESSIBILITY=1 BUILD_MODULES=all BUILD_STATIC_LIBS= ENABLE_TESTS=1 @@ -4377,6 +4065,16 @@ SUNCTL= JS_STATIC_BUILD= XPC_IDISPATCH_SUPPORT= + +case "$target_os" in +darwin*) + ACCESSIBILITY= + ;; +*) + ACCESSIBILITY=1 + ;; +esac + case "$target_os" in msvc*|mks*|cygwin*|mingw*) if test -z "$GNU_CC"; then @@ -4397,8 +4095,8 @@ MOZ_ARG_ENABLE_STRING(application, composer calendar xulrunner - macbrowser (Camino) zap (SIP client) + macbrowser (Camino) content/xslt (Standalone Transformiix XSLT) tools/update-packaging (AUS-related packaging tools) standalone (use this for standalone @@ -4567,7 +4265,6 @@ browser) minimo) MOZ_APP_NAME=minimo MOZ_APP_DISPLAYNAME=minimo - ACCESSIBILITY= AC_DEFINE(MINIMO) MINIMO=1 MOZ_APP_VERSION=`cat $topsrcdir/minimo/config/version.txt` @@ -4641,17 +4338,6 @@ xulrunner) fi ;; -macbrowser) - MOZ_APP_NAME=mozilla - MOZ_APP_DISPLAYNAME=Mozilla - MOZ_APP_VERSION=$MOZILLA_VERSION - MOZ_EXTENSIONS_DEFAULT=" cookie typeaheadfind permissions" - MOZ_AUTH_EXTENSION= - MOZ_PREF_EXTENSIONS= - MOZ_WEBSERVICES= - AC_DEFINE(MOZ_MACBROWSER) - ;; - zap) MOZ_APP_NAME=xulrunner MOZ_APP_DISPLAYNAME=Mozilla @@ -4666,6 +4352,28 @@ zap) MOZ_NO_XPCOM_OBSOLETE=1 AC_DEFINE(MOZ_XULRUNNER) AC_DEFINE(MOZ_ZAP) + + if test "$LIBXUL_SDK"; then + AC_MSG_ERROR([Building zap/XULRunner --with-libxul-sdk doesn't make sense]) + fi + ;; + + +macbrowser) + MOZ_APP_NAME=mozilla + _PLATFORM_DEFAULT_TOOLKIT=cocoa + ENABLE_TESTS= + ACCESSIBILITY= + MOZ_JSDEBUGGER= + MOZ_SINGLE_PROFILE=1 + MOZ_APP_DISPLAYNAME=Mozilla + MOZ_APP_VERSION=$MOZILLA_VERSION + MOZ_EXTENSIONS_DEFAULT=" cookie typeaheadfind permissions" +# MOZ_XUL_APP=1 + MOZ_AUTH_EXTENSION= + MOZ_PREF_EXTENSIONS= + MOZ_WEBSERVICES= + AC_DEFINE(MOZ_MACBROWSER) ;; content/xslt) @@ -4720,6 +4428,319 @@ if test "$MOZ_XUL_APP"; then AC_DEFINE(MOZ_XUL_APP) fi +dnl ======================================================== +dnl = +dnl = Toolkit Options +dnl = +dnl ======================================================== +MOZ_ARG_HEADER(Toolkit Options) + + dnl ======================================================== + dnl = Select the default toolkit + dnl ======================================================== + MOZ_ARG_ENABLE_STRING(default-toolkit, + [ --enable-default-toolkit=TK + Select default toolkit + Platform specific defaults: + BeOS - beos + Mac OS X - mac (carbon) + Neutrino/QNX - photon + OS/2 - os2 + Win32 - windows + * - gtk], + [ _DEFAULT_TOOLKIT=$enableval ], + [ _DEFAULT_TOOLKIT=$_PLATFORM_DEFAULT_TOOLKIT]) + + if test "$_DEFAULT_TOOLKIT" = "gtk" \ + -o "$_DEFAULT_TOOLKIT" = "qt" \ + -o "$_DEFAULT_TOOLKIT" = "gtk2" \ + -o "$_DEFAULT_TOOLKIT" = "xlib" \ + -o "$_DEFAULT_TOOLKIT" = "os2" \ + -o "$_DEFAULT_TOOLKIT" = "beos" \ + -o "$_DEFAULT_TOOLKIT" = "photon" \ + -o "$_DEFAULT_TOOLKIT" = "mac" \ + -o "$_DEFAULT_TOOLKIT" = "windows" \ + -o "$_DEFAULT_TOOLKIT" = "cocoa" \ + -o "$_DEFAULT_TOOLKIT" = "cairo-windows" \ + -o "$_DEFAULT_TOOLKIT" = "cairo-gtk2" \ + -o "$_DEFAULT_TOOLKIT" = "cairo-beos" \ + -o "$_DEFAULT_TOOLKIT" = "cairo-xlib" \ + -o "$_DEFAULT_TOOLKIT" = "cairo-mac" \ + -o "$_DEFAULT_TOOLKIT" = "cairo-cocoa" + then + dnl nglayout only supports building with one toolkit, + dnl so ignore everything after the first comma (","). + MOZ_WIDGET_TOOLKIT=`echo "$_DEFAULT_TOOLKIT" | sed -e "s/,.*$//"` + else + if test "$no_x" != "yes"; then + AC_MSG_ERROR([Toolkit must be xlib, gtk, gtk2 or qt.]) + else + AC_MSG_ERROR([Toolkit must be $_PLATFORM_DEFAULT_TOOLKIT or cairo-$_PLATFORM_DEFAULT_TOOLKIT (if supported).]) + fi + fi + +AC_DEFINE_UNQUOTED(MOZ_DEFAULT_TOOLKIT,"$MOZ_WIDGET_TOOLKIT") + +dnl ======================================================== +dnl = Enable the toolkit as needed = +dnl ======================================================== + +case "$MOZ_WIDGET_TOOLKIT" in +gtk) + MOZ_ENABLE_GTK=1 + MOZ_ENABLE_XREMOTE=1 + if test "$_HAVE_FREETYPE2"; then + MOZ_ENABLE_FREETYPE2=1 + fi + MOZ_ENABLE_XPRINT=1 + TK_CFLAGS='$(MOZ_GTK_CFLAGS)' + TK_LIBS='$(MOZ_GTK_LDFLAGS)' + AC_DEFINE(MOZ_WIDGET_GTK) + ;; + +gtk2) + MOZ_ENABLE_GTK2=1 + MOZ_ENABLE_XREMOTE=1 + MOZ_ENABLE_COREXFONTS=${MOZ_ENABLE_COREXFONTS-} + TK_CFLAGS='$(MOZ_GTK2_CFLAGS)' + TK_LIBS='$(MOZ_GTK2_LIBS)' + AC_DEFINE(MOZ_WIDGET_GTK2) + ;; + +xlib) + MOZ_ENABLE_XLIB=1 + if test "$_HAVE_FREETYPE2"; then + MOZ_ENABLE_FREETYPE2=1 + fi + MOZ_ENABLE_XPRINT=1 + TK_CFLAGS='$(MOZ_XLIB_CFLAGS)' + TK_LIBS='$(MOZ_XLIB_LDFLAGS)' + AC_DEFINE(MOZ_WIDGET_XLIB) + ;; + +qt) + MOZ_ENABLE_QT=1 + if test "$_HAVE_FREETYPE2"; then + MOZ_ENABLE_FREETYPE2=1 + fi + MOZ_ENABLE_XPRINT=1 + TK_CFLAGS='$(MOZ_QT_CFLAGS)' + TK_LIBS='$(MOZ_QT_LDFLAGS)' + AC_DEFINE(MOZ_WIDGET_QT) + ;; + +photon) + MOZ_ENABLE_PHOTON=1 + AC_DEFINE(MOZ_WIDGET_PHOTON) + ;; +mac|cocoa) + TK_LIBS='-framework Carbon' + TK_CFLAGS="-I${MACOS_SDK_DIR}/Developer/Headers/FlatCarbon" + CFLAGS="$CFLAGS $TK_CFLAGS" + CXXFLAGS="$CXXFLAGS $TK_CFLAGS" + MOZ_USER_DIR="Mozilla" + AC_DEFINE(XP_MACOSX) + AC_DEFINE(TARGET_CARBON) + AC_DEFINE(TARGET_API_MAC_CARBON) + if test "$MOZ_WIDGET_TOOLKIT" = "cocoa"; then + MOZ_ENABLE_COCOA=1 + AC_DEFINE(MOZ_WIDGET_COCOA) + fi + ;; + +cairo-windows) + MOZ_WIDGET_TOOLKIT=windows + MOZ_GFX_TOOLKIT=cairo + MOZ_ENABLE_CAIRO_GFX=1 + ;; + +cairo-gtk2) + MOZ_WIDGET_TOOLKIT=gtk2 + MOZ_GFX_TOOLKIT=cairo + MOZ_ENABLE_CAIRO_GFX=1 + MOZ_ENABLE_GTK2=1 + MOZ_ENABLE_XREMOTE=1 + TK_CFLAGS='$(MOZ_GTK2_CFLAGS) $(MOZ_CAIRO_CFLAGS)' + TK_LIBS='$(MOZ_GTK2_LIBS) $(MOZ_CAIRO_LIBS)' + AC_DEFINE(MOZ_WIDGET_GTK2) + ;; +cairo-beos) + MOZ_WIDGET_TOOLKIT=beos + MOZ_GFX_TOOLKIT=cairo + MOZ_ENABLE_CAIRO_GFX=1 + TK_CFLAGS='$(MOZ_CAIRO_CFLAGS)' + TK_LIBS='$(MOZ_CAIRO_LIBS)' + ;; + +cairo-xlib) + MOZ_WIDGET_TOOLKIT=xlib + MOZ_GFX_TOOLKIT=cairo + MOZ_ENABLE_CAIRO_GFX=1 + MOZ_ENABLE_XLIB=1 + TK_CFLAGS='$(MOZ_XLIB_CFLAGS) $(MOZ_CAIRO_FLAGS)' + TK_LIBS='$(MOZ_XLIB_LDFLAGS) $(MOZ_CAIRO_LIBS)' + AC_DEFINE(MOZ_WIDGET_XLIB) + ;; + +cairo-mac|cairo-cocoa) + if test "$MOZ_WIDGET_TOOLKIT" = "cairo-cocoa"; then + MOZ_WIDGET_TOOLKIT=cocoa + AC_DEFINE(MOZ_WIDGET_COCOA) + MOZ_ENABLE_COCOA=1 + else + MOZ_WIDGET_TOOLKIT=mac + fi + MOZ_ENABLE_CAIRO_GFX=1 + MOZ_GFX_TOOLKIT=cairo + MOZ_USER_DIR="Mozilla" + AC_DEFINE(XP_MACOSX) + AC_DEFINE(TARGET_CARBON) + AC_DEFINE(TARGET_API_MAC_CARBON) + TK_LIBS='-framework Carbon' + TK_CFLAGS="-I${MACOS_SDK_DIR}/Developer/Headers/FlatCarbon" + CFLAGS="$CFLAGS $TK_CFLAGS" + CXXFLAGS="$CXXFLAGS $TK_CFLAGS" + ;; +esac + +if test "$MOZ_ENABLE_XREMOTE"; then + AC_DEFINE(MOZ_ENABLE_XREMOTE) +fi + +if test "$COMPILE_ENVIRONMENT"; then +if test "$MOZ_ENABLE_GTK" +then + AM_PATH_GTK($GTK_VERSION,, + AC_MSG_ERROR(Test for GTK failed.)) + + MOZ_GTK_LDFLAGS=$GTK_LIBS + MOZ_GTK_CFLAGS=$GTK_CFLAGS +fi + +if test "$MOZ_ENABLE_GTK2" +then + PKG_CHECK_MODULES(MOZ_GTK2, gtk+-2.0 >= 1.3.7 gdk-x11-2.0 glib-2.0 gobject-2.0) +fi + +if test "$MOZ_ENABLE_XLIB" +then + MOZ_XLIB_CFLAGS="$X_CFLAGS" + MOZ_XLIB_LDFLAGS="$XLDFLAGS" + MOZ_XLIB_LDFLAGS="$MOZ_XLIB_LDFLAGS $XEXT_LIBS $X11_LIBS" +fi + +if test "$MOZ_ENABLE_QT" +then + MOZ_ARG_WITH_STRING(qtdir, + [ --with-qtdir=\$dir Specify Qt directory ], + [ QTDIR=$withval]) + + if test -z "$QTDIR"; then + QTDIR="/usr" + fi + QTINCDIR="/include/qt" + if test ! -d "$QTDIR$QTINCDIR"; then + QTINCDIR="/include/X11/qt" + fi + if test ! -d "$QTDIR$QTINCDIR"; then + QTINCDIR="/include" + fi + + if test -x "$QTDIR/bin/moc"; then + HOST_MOC="$QTDIR/bin/moc" + else + AC_CHECK_PROGS(HOST_MOC, moc, "") + fi + if test -z "$HOST_MOC"; then + AC_MSG_ERROR([no acceptable moc preprocessor found]) + fi + MOC=$HOST_MOC + + QT_CFLAGS="-I${QTDIR}${QTINCDIR} -DQT_GENUINE_STR -DQT_NO_STL" + if test -z "$MOZ_DEBUG"; then + QT_CFLAGS="$QT_CFLAGS -DQT_NO_DEBUG -DNO_DEBUG" + fi + _SAVE_LDFLAGS=$LDFLAGS + QT_LDFLAGS=-L${QTDIR}/lib + LDFLAGS="$LDFLAGS $QT_LDFLAGS" + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_CHECK_LIB(qt, main, QT_LIB=-lqt, + AC_CHECK_LIB(qt-mt, main, QT_LIB=-lqt-mt, + AC_MSG_ERROR([Cannot find QT libraries.]))) + LDFLAGS=$_SAVE_LDFLAGS + QT_LIBS="-L/usr/X11R6/lib $QT_LDFLAGS $QT_LIB -lXext -lX11" + + MOZ_QT_LDFLAGS=$QT_LIBS + MOZ_QT_CFLAGS=$QT_CFLAGS + + _SAVE_CXXFLAGS=$CXXFLAGS + _SAVE_LIBS=$LIBS + + CXXFLAGS="$CXXFLAGS $QT_CFLAGS" + LIBS="$LIBS $QT_LIBS" + + AC_MSG_CHECKING(Qt - version >= $QT_VERSION) + AC_TRY_COMPILE([#include ], + [ + #if (QT_VERSION < $QT_VERSION_NUM) + #error "QT_VERSION too old" + #endif + ],result="yes",result="no") + + AC_MSG_RESULT("$result") + if test "$result" = "no"; then + AC_MSG_ERROR([Qt Mozilla requires at least version $QT_VERSION of Qt]) + fi + CXXFLAGS=$_SAVE_CXXFLAGS + LIBS=$_SAVE_LIBS + + AC_LANG_RESTORE +fi +fi # COMPILE_ENVIRONMENT + +AC_SUBST(MOZ_DEFAULT_TOOLKIT) + +AC_SUBST(GTK_CONFIG) +AC_SUBST(TK_CFLAGS) +AC_SUBST(TK_LIBS) + +AC_SUBST(MOZ_ENABLE_GTK) +AC_SUBST(MOZ_ENABLE_XLIB) +AC_SUBST(MOZ_ENABLE_GTK2) +AC_SUBST(MOZ_ENABLE_QT) +AC_SUBST(MOZ_ENABLE_PHOTON) +AC_SUBST(MOZ_ENABLE_COCOA) +AC_SUBST(MOZ_ENABLE_CAIRO_GFX) +AC_SUBST(MOZ_ENABLE_GLITZ) +AC_SUBST(MOZ_ENABLE_XREMOTE) +AC_SUBST(MOZ_GTK_CFLAGS) +AC_SUBST(MOZ_GTK_LDFLAGS) +AC_SUBST(MOZ_GTK2_CFLAGS) +AC_SUBST(MOZ_GTK2_LIBS) +AC_SUBST(MOZ_XLIB_CFLAGS) +AC_SUBST(MOZ_XLIB_LDFLAGS) +AC_SUBST(MOZ_QT_CFLAGS) +AC_SUBST(MOZ_QT_LDFLAGS) + +AC_SUBST(MOC) + +if test "$MOZ_ENABLE_CAIRO_GFX" +then + AC_DEFINE(MOZ_THEBES) + AC_DEFINE(MOZ_CAIRO_GFX) +fi + +if test "$MOZ_ENABLE_GTK" \ +|| test "$MOZ_ENABLE_QT" \ +|| test "$MOZ_ENABLE_XLIB" \ +|| test "$MOZ_ENABLE_GTK2" +then + AC_DEFINE(MOZ_X11) + MOZ_X11=1 +fi +AC_SUBST(MOZ_X11) + dnl ======================================================== dnl = dnl = Components & Features @@ -5164,10 +5185,11 @@ fi dnl ======================================================== -dnl accessibility support on by default +dnl accessibility support on by default on all platforms +dnl except OS X. dnl ======================================================== MOZ_ARG_DISABLE_BOOL(accessibility, -[ --disable-accessibility Disable accessibility support], +[ --disable-accessibility Disable accessibility support (off by default on OS X)], ACCESSIBILITY=, ACCESSIBILITY=1 ) if test "$ACCESSIBILITY"; then @@ -7153,6 +7175,14 @@ if test "$MOZ_PROFILESHARING"; then AC_DEFINE(MOZ_PROFILESHARING) fi +dnl ======================================================== +dnl enable ipc/ipcd +dnl ======================================================== +MOZ_ARG_ENABLE_BOOL(ipcd, +[ --enable-ipcd Enable IPC daemon], + MOZ_IPCD=1, + MOZ_IPCD= ) + dnl ======================================================== dnl disable profile locking dnl do no use this in applications that can have more than @@ -7365,7 +7395,6 @@ AC_SUBST(MOZ_LEAKY) AC_SUBST(MOZ_JPROF) AC_SUBST(MOZ_XPCTOOLS) AC_SUBST(MOZ_JSLOADER) -AC_SUBST(MOZ_JSCODELIB) AC_SUBST(MOZ_USE_NATIVE_UCONV) AC_SUBST(MOZ_INSURE) AC_SUBST(MOZ_INSURE_DIRS) diff --git a/mozilla/extensions/jssh/nsIJSSh.idl b/mozilla/extensions/jssh/nsIJSSh.idl index 270277b1f51..d6552cf33f1 100644 --- a/mozilla/extensions/jssh/nsIJSSh.idl +++ b/mozilla/extensions/jssh/nsIJSSh.idl @@ -1,10 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ----- BEGIN LICENSE BLOCK ----- +/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, @@ -14,27 +14,27 @@ * * The Original Code is the Mozilla JavaScript Shell project. * - * The Initial Developer of the Original Code is + * The Initial Developer of the Original Code is * Alex Fritze. * Portions created by the Initial Developer are Copyright (C) 2003 * the Initial Developer. All Rights Reserved. * * Contributor(s): - * Alex Fritze + * Alex Fritze * * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or + * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the NPL, indicate your + * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * - * ----- END LICENSE BLOCK ----- */ + * ***** END LICENSE BLOCK ***** */ #include "nsISupports.idl" diff --git a/mozilla/extensions/jssh/nsIJSShServer.idl b/mozilla/extensions/jssh/nsIJSShServer.idl index 2ca0e6db04d..9a56ee0613a 100644 --- a/mozilla/extensions/jssh/nsIJSShServer.idl +++ b/mozilla/extensions/jssh/nsIJSShServer.idl @@ -1,10 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ----- BEGIN LICENSE BLOCK ----- +/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, @@ -14,27 +14,27 @@ * * The Original Code is Mozilla JavaScript Shell project. * - * The Initial Developer of the Original Code is + * The Initial Developer of the Original Code is * Alex Fritze. * Portions created by the Initial Developer are Copyright (C) 2003 * the Initial Developer. All Rights Reserved. * * Contributor(s): - * Alex Fritze + * Alex Fritze * * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or + * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the NPL, indicate your + * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * - * ----- END LICENSE BLOCK ----- */ + * ***** END LICENSE BLOCK ***** */ #include "nsISupports.idl" diff --git a/mozilla/extensions/jssh/nsJSSh.cpp b/mozilla/extensions/jssh/nsJSSh.cpp index 6b5d5195a07..8389d4c0701 100644 --- a/mozilla/extensions/jssh/nsJSSh.cpp +++ b/mozilla/extensions/jssh/nsJSSh.cpp @@ -1,10 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ----- BEGIN LICENSE BLOCK ----- +/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, @@ -14,45 +14,41 @@ * * The Original Code is the Mozilla JavaScript Shell project. * - * The Initial Developer of the Original Code is + * The Initial Developer of the Original Code is * Alex Fritze. * Portions created by the Initial Developer are Copyright (C) 2003 * the Initial Developer. All Rights Reserved. * * Contributor(s): - * Alex Fritze + * Alex Fritze * * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or + * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the NPL, indicate your + * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * - * ----- END LICENSE BLOCK ----- */ + * ***** END LICENSE BLOCK ***** */ #include "nsJSSh.h" #include "nsIJSRuntimeService.h" #include "nsIServiceManager.h" #include "nsIXPConnect.h" #include "nsIProxyObjectManager.h" -#include "nsIEventQueueService.h" #include "nsIScriptSecurityManager.h" #include "nsDependentString.h" #include "nsIIOService.h" #include "nsNetCID.h" #include "nsIChannel.h" -#include "nsIThread.h" -#include "nsIEventQueueService.h" +#include "nsThreadUtils.h" static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); -static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID); -static NS_DEFINE_CID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID); //********************************************************************** @@ -202,20 +198,7 @@ FlushEventQueue(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rv nsJSSh* shell; if (!GetJSShGlobal(cx, obj, &shell)) return JS_FALSE; - nsCOMPtr pEventQService = - do_GetService(kEventQueueServiceCID); - nsCOMPtr eventQueue; - pEventQService->GetThreadEventQueue(NS_CURRENT_THREAD, - getter_AddRefs(eventQueue)); - PRBool avail; - while(NS_SUCCEEDED(eventQueue->EventAvailable(avail)) && avail) { -#ifdef DEBUG - printf("."); -#endif - PLEvent *ev; - eventQueue->GetEvent(&ev); - eventQueue->HandleEvent(ev); - } + NS_ProcessPendingEvents(nsnull); return JS_TRUE; } @@ -226,28 +209,15 @@ Suspend(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) nsJSSh* shell; if (!GetJSShGlobal(cx, obj, &shell)) return JS_FALSE; - nsCOMPtr pEventQService = - do_GetService(kEventQueueServiceCID); - nsCOMPtr eventQueue; - pEventQService->GetThreadEventQueue(NS_CURRENT_THREAD, - getter_AddRefs(eventQueue)); + nsCOMPtr thread = do_GetCurrentThread(); + PR_AtomicIncrement(&shell->mSuspendCount); - PLEvent *ev; - while(shell->mSuspendCount) { + while (shell->mSuspendCount) { #ifdef DEBUG printf("|"); #endif - -// eventQueue->ProcessPendingEvents(); -// XXX We can't use ProcessPendingEvents() here, because the JSSh -// itself gets called from an AppShell's call to -// ProcessPendingEvents() (via a proxy-event) and -// ProcessPendingEvents() guards against recursive entry. We have -// to pump events manually: - - eventQueue->WaitForEvent(&ev); - eventQueue->HandleEvent(ev); + NS_ProcessNextEvent(thread); } return JS_TRUE; @@ -298,17 +268,10 @@ SetProtocol(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) if (!strcmp(protocol, "interactive")) { shell->mEmitHeader = PR_FALSE; - shell->mPrompt = NS_LITERAL_CSTRING("\n> "); shell->mProtocol = protocol; } else if (!strcmp(protocol, "synchronous")) { shell->mEmitHeader = PR_TRUE; - shell->mPrompt = NS_LITERAL_CSTRING("\n> "); - shell->mProtocol = protocol; - } - else if (!strcmp(protocol, "plain")) { - shell->mEmitHeader = PR_FALSE; - shell->mPrompt = NS_LITERAL_CSTRING("\n"); shell->mProtocol = protocol; } else return JS_FALSE; @@ -495,23 +458,12 @@ NS_INTERFACE_MAP_END NS_IMETHODIMP nsJSSh::Run() { nsCOMPtr proxied_shell; - nsCOMPtr eventQService = - do_GetService(kEventQueueServiceCID); - nsCOMPtr currentEventQ; - eventQService->GetSpecialEventQueue(nsIEventQueueService::CURRENT_THREAD_EVENT_QUEUE, - getter_AddRefs(currentEventQ)); - nsCOMPtr mainEventQ; - eventQService->GetSpecialEventQueue(nsIEventQueueService::UI_THREAD_EVENT_QUEUE, - getter_AddRefs(mainEventQ)); - if (!SameCOMIdentity(mainEventQ, currentEventQ)) { - nsCOMPtr proxyObjMgr = - do_GetService(kProxyObjectManagerCID); - NS_ASSERTION(proxyObjMgr, "no proxy object manager!"); - proxyObjMgr->GetProxyForObject(NS_UI_THREAD_EVENTQ, - NS_GET_IID(nsIJSSh), - (nsIJSSh*)this, - PROXY_SYNC, - getter_AddRefs(proxied_shell)); + if (!NS_IsMainThread()) { + NS_GetProxyForObject(NS_PROXY_TO_MAIN_THREAD, + NS_GET_IID(nsIJSSh), + (nsIJSSh*)this, + NS_PROXY_SYNC, + getter_AddRefs(proxied_shell)); } else { #ifdef DEBUG @@ -524,7 +476,7 @@ NS_IMETHODIMP nsJSSh::Run() if (mInput) { // read-eval-print loop PRUint32 bytesWritten; - if (mOutput && mProtocol != NS_LITERAL_CSTRING("plain")) + if (mOutput) mOutput->Write(gWelcome, strlen(gWelcome), &bytesWritten); while (!mQuit) { @@ -561,6 +513,19 @@ NS_IMETHODIMP nsJSSh::Run() } proxied_shell->Cleanup(); + + if (!NS_IsMainThread()) { + // Shutdown the current thread, which must be done from the main thread. + nsCOMPtr thread = do_GetCurrentThread(); + nsCOMPtr proxied_thread; + NS_GetProxyForObject(NS_PROXY_TO_MAIN_THREAD, + NS_GET_IID(nsIThread), + thread.get(), + NS_PROXY_ASYNC, + getter_AddRefs(proxied_thread)); + if (proxied_thread) + proxied_thread->Shutdown(); + } return NS_OK; } diff --git a/mozilla/extensions/jssh/nsJSSh.h b/mozilla/extensions/jssh/nsJSSh.h index d06d637c68a..6fcd97aa247 100644 --- a/mozilla/extensions/jssh/nsJSSh.h +++ b/mozilla/extensions/jssh/nsJSSh.h @@ -1,10 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ----- BEGIN LICENSE BLOCK ----- +/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, @@ -14,27 +14,27 @@ * * The Original Code is Mozilla JavaScript Shell project. * - * The Initial Developer of the Original Code is + * The Initial Developer of the Original Code is * Alex Fritze. * Portions created by the Initial Developer are Copyright (C) 2003 * the Initial Developer. All Rights Reserved. * * Contributor(s): - * Alex Fritze + * Alex Fritze * * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or + * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the NPL, indicate your + * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * - * ----- END LICENSE BLOCK ----- */ + * ***** END LICENSE BLOCK ***** */ #ifndef __NS_JSSH_H__ #define __NS_JSSH_H__ diff --git a/mozilla/extensions/jssh/nsJSShModule.cpp b/mozilla/extensions/jssh/nsJSShModule.cpp index 395ff0b7c76..7880b3a7d12 100644 --- a/mozilla/extensions/jssh/nsJSShModule.cpp +++ b/mozilla/extensions/jssh/nsJSShModule.cpp @@ -1,10 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ----- BEGIN LICENSE BLOCK ----- +/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, @@ -14,27 +14,27 @@ * * The Original Code is Mozilla JavaScript Shell project. * - * The Initial Developer of the Original Code is + * The Initial Developer of the Original Code is * Alex Fritze. * Portions created by the Initial Developer are Copyright (C) 2003 * the Initial Developer. All Rights Reserved. * * Contributor(s): - * Alex Fritze + * Alex Fritze * * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or + * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the NPL, indicate your + * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * - * ----- END LICENSE BLOCK ----- */ + * ***** END LICENSE BLOCK ***** */ #include "nsIGenericFactory.h" #include "nsJSShServer.h" diff --git a/mozilla/extensions/jssh/nsJSShServer.cpp b/mozilla/extensions/jssh/nsJSShServer.cpp index 57d4f1e433d..eafbf977cad 100644 --- a/mozilla/extensions/jssh/nsJSShServer.cpp +++ b/mozilla/extensions/jssh/nsJSShServer.cpp @@ -1,10 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ----- BEGIN LICENSE BLOCK ----- +/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, @@ -14,27 +14,27 @@ * * The Original Code is Mozilla JavaScript Shell project. * - * The Initial Developer of the Original Code is + * The Initial Developer of the Original Code is * Alex Fritze. * Portions created by the Initial Developer are Copyright (C) 2003 * the Initial Developer. All Rights Reserved. * * Contributor(s): - * Alex Fritze + * Alex Fritze * * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or + * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the NPL, indicate your + * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * - * ----- END LICENSE BLOCK ----- */ + * ***** END LICENSE BLOCK ***** */ #include "nsJSShServer.h" #include "nsNetCID.h" @@ -42,11 +42,10 @@ #include "nsIComponentManager.h" #include "nsIInputStream.h" #include "nsIOutputStream.h" -#include "nsIThread.h" +#include "nsThreadUtils.h" #include "nsJSSh.h" static NS_DEFINE_CID(kServerSocketCID, NS_SERVERSOCKET_CID); -static NS_DEFINE_CID(kThreadCID, NS_THREAD_CID); //********************************************************************** // ConnectionListener helper class @@ -110,8 +109,9 @@ NS_IMETHODIMP ConnectionListener::OnSocketAccepted(nsIServerSocket *aServ, nsISo #endif nsCOMPtr shell = CreateJSSh(input, output, mStartupURI); - nsCOMPtr thread = do_CreateInstance(kThreadCID); - thread->Init(shell, 0, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD , PR_UNJOINABLE_THREAD); + + nsCOMPtr thread; + NS_NewThread(getter_AddRefs(thread), shell); return NS_OK; } @@ -210,8 +210,8 @@ nsJSShServer::RunShell(nsIInputStream *input, nsIOutputStream *output, { nsCOMPtr shell = CreateJSSh(input, output, nsCString(startupURI)); if (!blocking) { - nsCOMPtr thread = do_CreateInstance(kThreadCID); - thread->Init(shell, 0, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD , PR_UNJOINABLE_THREAD); + nsCOMPtr thread; + NS_NewThread(getter_AddRefs(thread), shell); } else shell->Run(); diff --git a/mozilla/extensions/jssh/nsJSShServer.h b/mozilla/extensions/jssh/nsJSShServer.h index 04bc40a81e0..bddc2e20f70 100644 --- a/mozilla/extensions/jssh/nsJSShServer.h +++ b/mozilla/extensions/jssh/nsJSShServer.h @@ -1,10 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ----- BEGIN LICENSE BLOCK ----- +/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, @@ -14,27 +14,27 @@ * * The Original Code is Mozilla JavaScript Shell project. * - * The Initial Developer of the Original Code is + * The Initial Developer of the Original Code is * Alex Fritze. * Portions created by the Initial Developer are Copyright (C) 2003 * the Initial Developer. All Rights Reserved. * * Contributor(s): - * Alex Fritze + * Alex Fritze * * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or + * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the NPL, indicate your + * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * - * ----- END LICENSE BLOCK ----- */ + * ***** END LICENSE BLOCK ***** */ #ifndef __NS_JSSHSERVER_H__ #define __NS_JSSHSERVER_H__ diff --git a/mozilla/extensions/jssh/resources/content/jssh-debug.js b/mozilla/extensions/jssh/resources/content/jssh-debug.js index 82f3f88f4ad..448ee2c3033 100644 --- a/mozilla/extensions/jssh/resources/content/jssh-debug.js +++ b/mozilla/extensions/jssh/resources/content/jssh-debug.js @@ -1,10 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ----- BEGIN LICENSE BLOCK ----- +/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, @@ -14,27 +14,27 @@ * * The Original Code is Mozilla JavaScript Shell project. * - * The Initial Developer of the Original Code is + * The Initial Developer of the Original Code is * Alex Fritze. * Portions created by the Initial Developer are Copyright (C) 2003 * the Initial Developer. All Rights Reserved. * * Contributor(s): - * Alex Fritze + * Alex Fritze * * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or + * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the NPL, indicate your + * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * - * ----- END LICENSE BLOCK ----- */ + * ***** END LICENSE BLOCK ***** */ //********************************************************************** // a startup script with some debugging functions for JSSh diff --git a/mozilla/js/src/xpconnect/src/xpcprivate.h b/mozilla/js/src/xpconnect/src/xpcprivate.h index 7b950b9da6c..ba2881b7048 100644 --- a/mozilla/js/src/xpconnect/src/xpcprivate.h +++ b/mozilla/js/src/xpconnect/src/xpcprivate.h @@ -93,9 +93,8 @@ #include "nsReadableUtils.h" #include "nsXPIDLString.h" -#include "nsIThread.h" +#include "nsThreadUtils.h" #include "nsIJSContextStack.h" -#include "prthread.h" #include "nsDeque.h" #include "nsVoidArray.h" @@ -455,9 +454,6 @@ public: static JSBool IsISupportsDescendant(nsIInterfaceInfo* info); - static PRThread* GetMainThread() - {return gMainThread ? gMainThread : FindMainThread();} - nsIXPCSecurityManager* GetDefaultSecurityManager() const {return mDefaultSecurityManager;} @@ -498,7 +494,6 @@ private: // Singleton instance static nsXPConnect* gSelf; static JSBool gOnceAliveNowDead; - static PRThread* gMainThread; XPCJSRuntime* mRuntime; nsCOMPtr mInterfaceInfoManager; @@ -2099,8 +2094,7 @@ private: #ifdef XPC_CHECK_WRAPPER_THREADSAFETY public: - PRThread* mThread; // Don't want to overload _mOwningThread - static PRThread* gMainThread; + nsCOMPtr mThread; // Don't want to overload _mOwningThread #endif }; diff --git a/mozilla/netwerk/base/public/Makefile.in b/mozilla/netwerk/base/public/Makefile.in index 9a101208e4f..149feae4220 100644 --- a/mozilla/netwerk/base/public/Makefile.in +++ b/mozilla/netwerk/base/public/Makefile.in @@ -94,7 +94,6 @@ XPIDLSRCS = \ nsIServerSocket.idl \ nsIResumableChannel.idl \ nsIRequestObserverProxy.idl \ - nsIStreamListenerProxy.idl \ nsIStreamListenerTee.idl \ nsISimpleStreamListener.idl \ nsIStreamTransportService.idl \ diff --git a/mozilla/netwerk/base/src/Makefile.in b/mozilla/netwerk/base/src/Makefile.in index 42f31ecaba6..32d368655c2 100644 --- a/mozilla/netwerk/base/src/Makefile.in +++ b/mozilla/netwerk/base/src/Makefile.in @@ -56,10 +56,8 @@ REQUIRES = xpcom \ $(NULL) CPPSRCS = \ - nsIOThreadPool.cpp \ nsTransportUtils.cpp \ nsAsyncStreamCopier.cpp \ - nsAsyncStreamListener.cpp \ nsBaseChannel.cpp \ nsBaseContentStream.cpp \ nsBufferedStreams.cpp \ diff --git a/mozilla/netwerk/base/src/nsUDPSocket.cpp b/mozilla/netwerk/base/src/nsUDPSocket.cpp index b6028a94aa0..95c0e791353 100644 --- a/mozilla/netwerk/base/src/nsUDPSocket.cpp +++ b/mozilla/netwerk/base/src/nsUDPSocket.cpp @@ -6,10 +6,12 @@ #include "nsAutoPtr.h" #include "nsNetError.h" #include "nsNetCID.h" +#include "nsProxyRelease.h" #include "prnetdb.h" #include "prio.h" #include "prerror.h" + static NS_DEFINE_CID(kSocketTransportServiceCID, NS_SOCKETTRANSPORTSERVICE_CID); //----------------------------------------------------------------------------- @@ -69,96 +71,45 @@ NS_IMETHODIMP nsDatagram::GetPort(PRInt32 *aPort) typedef void (nsUDPSocket:: *nsUDPSocketFunc)(void); -struct nsUDPSocketEvent : PLEvent -{ - nsUDPSocketEvent(nsUDPSocket *s, nsUDPSocketFunc f) - : func(f) - { - NS_ADDREF(s); - PL_InitEvent(this, s, EventHandler, EventCleanup); - } - - PR_STATIC_CALLBACK(void *) - EventHandler(PLEvent *ev) - { - nsUDPSocket *s = (nsUDPSocket *) ev->owner; - nsUDPSocketEvent *event = (nsUDPSocketEvent *) ev; - nsUDPSocketFunc func = event->func; - (s->*func)(); - return nsnull; - } - - PR_STATIC_CALLBACK(void) - EventCleanup(PLEvent *ev) - { - nsUDPSocket *s = (nsUDPSocket *) ev->owner; - NS_RELEASE(s); - delete (nsUDPSocketEvent *) ev; - } - - nsUDPSocketFunc func; -}; - static nsresult PostEvent(nsUDPSocket *s, nsUDPSocketFunc func) { - nsUDPSocketEvent *ev = new nsUDPSocketEvent(s, func); + nsCOMPtr ev = new nsRunnableMethod(s, func); if (!ev) return NS_ERROR_OUT_OF_MEMORY; - nsresult rv = gSocketTransportService->PostEvent(ev); - if (NS_FAILED(rv)) - PL_DestroyEvent(ev); - return rv; + return gSocketTransportService->Dispatch(ev, NS_DISPATCH_NORMAL); } //---------------------------------------------------------------------------- // A 'send' event for proxying nsIUDPSocket::send onto the socket thread. // XXX Not sure its neccessary actually. -struct nsUDPSendEvent : PLEvent +class nsUDPSendEvent : public nsRunnable { - nsUDPSendEvent(nsUDPSocket *s, nsDatagram* dg) - : datagram(dg) - { - NS_ADDREF(s); - NS_ADDREF(dg); - PL_InitEvent(this, s, EventHandler, EventCleanup); +public: + nsUDPSendEvent(nsUDPSocket *s, nsDatagram *dg) + : mSocket(s), mDatagram(dg) { } - PR_STATIC_CALLBACK(void *) - EventHandler(PLEvent *ev) - { - nsUDPSocket *s = (nsUDPSocket *) ev->owner; - nsUDPSendEvent *event = (nsUDPSendEvent *) ev; - s->OnMsgSend(event->datagram); - return nsnull; + NS_IMETHOD Run() { + mSocket->OnMsgSend(mDatagram); + return NS_OK; } - - PR_STATIC_CALLBACK(void) - EventCleanup(PLEvent *ev) - { - nsUDPSocket *s = (nsUDPSocket *) ev->owner; - nsUDPSendEvent *event = (nsUDPSendEvent *) ev; - NS_RELEASE(s); - NS_RELEASE(event->datagram); - delete event; - } - - nsDatagram *datagram; + +private: + nsRefPtr mSocket; + nsRefPtr mDatagram; }; static nsresult PostSendEvent(nsUDPSocket *s, nsDatagram *datagram) { - nsUDPSendEvent *ev = new nsUDPSendEvent(s, datagram); + nsCOMPtr ev = new nsUDPSendEvent(s, datagram); if (!ev) return NS_ERROR_OUT_OF_MEMORY; - nsresult rv = gSocketTransportService->PostEvent(ev); - if (NS_FAILED(rv)) - PL_DestroyEvent(ev); - return rv; + return gSocketTransportService->Dispatch(ev, NS_DISPATCH_NORMAL); } //----------------------------------------------------------------------------- @@ -274,16 +225,14 @@ nsUDPSocket::TryAttach() // if (!gSocketTransportService->CanAttachSocket()) { - PLEvent *event = new nsUDPSocketEvent(this, &nsUDPSocket::OnMsgAttach); + nsCOMPtr event = + NS_NEW_RUNNABLE_METHOD(nsUDPSocket, this, OnMsgAttach); if (!event) return NS_ERROR_OUT_OF_MEMORY; nsresult rv = gSocketTransportService->NotifyWhenCanAttachSocket(event); if (NS_FAILED(rv)) - { - PL_DestroyEvent(event); return rv; - } } // @@ -521,10 +470,10 @@ nsUDPSocket::SetReceiver(nsIUDPReceiver *aReceiver) NS_ENSURE_TRUE(mReceiver == nsnull, NS_ERROR_IN_PROGRESS); { nsAutoLock lock(mLock); - nsresult rv = NS_GetProxyForObject(NS_CURRENT_EVENTQ, + nsresult rv = NS_GetProxyForObject(NS_PROXY_TO_CURRENT_THREAD, NS_GET_IID(nsIUDPReceiver), aReceiver, - PROXY_ASYNC | PROXY_ALWAYS, + NS_PROXY_ASYNC | NS_PROXY_ALWAYS, getter_AddRefs(mReceiver)); if (NS_FAILED(rv)) return rv; diff --git a/mozilla/netwerk/build/nsNetCID.h b/mozilla/netwerk/build/nsNetCID.h index 6d7fa45495f..bacfba0f7c6 100644 --- a/mozilla/netwerk/build/nsNetCID.h +++ b/mozilla/netwerk/build/nsNetCID.h @@ -61,20 +61,6 @@ #define NS_NETUTIL_CONTRACTID \ "@mozilla.org/network/util;1" -// service implementing nsIEventTarget. events dispatched to this event -// target will be executed on one of necko's background i/o threads. -#define NS_IOTHREADPOOL_CLASSNAME \ - "nsIOThreadPool" -#define NS_IOTHREADPOOL_CONTRACTID \ - "@mozilla.org/network/io-thread-pool;1" -#define NS_IOTHREADPOOL_CID \ -{ /* f1d62b49-5051-48e2-9155-c3509428461e */ \ - 0xf1d62b49, \ - 0x5051, \ - 0x48e2, \ - {0x91, 0x55, 0xc3, 0x50, 0x94, 0x28, 0x46, 0x1e} \ -} - // service implementing nsIProtocolProxyService and nsPIProtocolProxyService. #define NS_PROTOCOLPROXYSERVICE_CLASSNAME \ "nsProtocolProxyService" diff --git a/mozilla/netwerk/build/nsNetModule.cpp b/mozilla/netwerk/build/nsNetModule.cpp index edcf3fca1ad..5ffd7758039 100644 --- a/mozilla/netwerk/build/nsNetModule.cpp +++ b/mozilla/netwerk/build/nsNetModule.cpp @@ -50,13 +50,11 @@ #include "nsLoadGroup.h" #include "nsStreamLoader.h" #include "nsUnicharStreamLoader.h" -#include "nsAsyncStreamListener.h" #include "nsFileStreams.h" #include "nsBufferedStreams.h" #include "nsMIMEInputStream.h" #include "nsSOCKSSocketProvider.h" #include "nsCacheService.h" -#include "nsIOThreadPool.h" #include "nsMimeTypes.h" #include "nsNetStrings.h" @@ -83,7 +81,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsProtocolProxyService, Init) NS_DECL_CLASSINFO(nsProtocolProxyService) #include "nsStreamTransportService.h" -NS_GENERIC_FACTORY_CONSTRUCTOR(nsStreamTransportService) +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsStreamTransportService, Init) #include "nsSocketTransportService2.h" #undef LOG @@ -633,10 +631,6 @@ static const nsModuleComponentInfo gNetModuleInfo[] = { NS_IOSERVICE_CID, NS_NETUTIL_CONTRACTID, nsIOServiceConstructor }, - { NS_IOTHREADPOOL_CLASSNAME, - NS_IOTHREADPOOL_CID, - NS_IOTHREADPOOL_CONTRACTID, - net_NewIOThreadPool }, { NS_STREAMTRANSPORTSERVICE_CLASSNAME, NS_STREAMTRANSPORTSERVICE_CID, NS_STREAMTRANSPORTSERVICE_CONTRACTID, @@ -705,10 +699,6 @@ static const nsModuleComponentInfo gNetModuleInfo[] = { NS_SIMPLESTREAMLISTENER_CID, NS_SIMPLESTREAMLISTENER_CONTRACTID, nsSimpleStreamListenerConstructor }, - { NS_ASYNCSTREAMLISTENER_CLASSNAME, - NS_ASYNCSTREAMLISTENER_CID, - NS_ASYNCSTREAMLISTENER_CONTRACTID, - nsAsyncStreamListener::Create }, { NS_STREAMLISTENERTEE_CLASSNAME, NS_STREAMLISTENERTEE_CID, NS_STREAMLISTENERTEE_CONTRACTID, diff --git a/mozilla/xpcom/proxy/public/nsIProxyObjectManager.idl b/mozilla/xpcom/proxy/public/nsIProxyObjectManager.idl index 16f2e5e3b9c..ff7651fd0e1 100644 --- a/mozilla/xpcom/proxy/public/nsIProxyObjectManager.idl +++ b/mozilla/xpcom/proxy/public/nsIProxyObjectManager.idl @@ -78,6 +78,19 @@ interface nsIProxyObjectManager : nsISupports */ const long FORCE_PROXY_CREATION = 0x0004; + /** + * 'Autoproxify' all interface parameters. + * + * Ensures that all 'in' interfaces are accessed on the caller's + * thread and all 'out' interfaces are accessed on this proxy's + * thread. If a parameter is already proxied it will be accessed + * via the existing proxy. 'inout' parameters will not be + * proxified. + * + * For C++ callers, NS_PROXY_AUTOPROXIFY is a synonym for this flag. + */ + const long AUTOPROXIFY = 0x0008; + /** * Create a proxy for the given object. The proxy implements the specified * interface, but when its methods are invoked, it causes the corresponding @@ -116,7 +129,8 @@ interface nsIProxyObjectManager : nsISupports #define NS_PROXY_SYNC nsIProxyObjectManager::INVOKE_SYNC #define NS_PROXY_ASYNC nsIProxyObjectManager::INVOKE_ASYNC #define NS_PROXY_ALWAYS nsIProxyObjectManager::FORCE_PROXY_CREATION - +#define NS_PROXY_AUTOPROXIFY nsIProxyObjectManager::AUTOPROXIFY + /** * Pass this value as the target to {NS_}GetProxyForObject to specify the current * thread as the target for the proxy object. diff --git a/mozilla/xpcom/proxy/src/nsProxyEvent.cpp b/mozilla/xpcom/proxy/src/nsProxyEvent.cpp index b973c87d5ae..8fed1070dd1 100644 --- a/mozilla/xpcom/proxy/src/nsProxyEvent.cpp +++ b/mozilla/xpcom/proxy/src/nsProxyEvent.cpp @@ -1,4 +1,6 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:set ts=4 sw=4 sts=4 ci et: */ +/* * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -57,12 +59,19 @@ #include "prmem.h" #include "xptcall.h" +#include "nsXPCOMCID.h" +#include "nsServiceManagerUtils.h" #include "nsIComponentManager.h" +#include "nsIThreadInternal.h" +#include "nsThreadUtils.h" +#include "nsEventQueue.h" #include "nsMemory.h" -#include "nsIEventQueueService.h" -#include "nsIThread.h" -#include "nsIAtom.h" //hack! Need a way to define a component as threadsafe (ie. sta). +#include "prlog.h" +#ifdef PR_LOGGING +static PRLogModuleInfo *sLog = PR_NewLogModule("xpcomproxy"); +#endif +#define LOG(args) PR_LOG(sLog, PR_LOG_DEBUG, args) /** * Map the nsAUTF8String, nsUTF8String classes to the nsACString and @@ -74,20 +83,157 @@ static NS_DEFINE_IID(kProxyObject_Identity_Class_IID, NS_PROXYEVENT_IDENTITY_CLASS_IID); -static void* PR_CALLBACK EventHandler(PLEvent *self); -static void PR_CALLBACK DestroyHandler(PLEvent *self); -static void* PR_CALLBACK CompletedEventHandler(PLEvent *self); -static void PR_CALLBACK CompletedDestroyHandler(PLEvent *self) ; -static void* PR_CALLBACK ProxyDestructorEventHandler(PLEvent *self); -static void PR_CALLBACK ProxyDestructorDestroyHandler(PLEvent *self) ; +//----------------------------------------------------------------------------- -nsProxyObjectCallInfo::nsProxyObjectCallInfo( nsProxyObject* owner, - nsXPTMethodInfo *methodInfo, - PRUint32 methodIndex, - nsXPTCVariant* parameterList, - PRUint32 parameterCount, - nsIInterfaceInfo *interfaceInfo, - PLEvent *event) +#define NS_PROXYEVENT_IID \ +{ /* 9a24dc5e-2b42-4a5a-aeca-37b8c8fd8ccd */ \ + 0x9a24dc5e, \ + 0x2b42, \ + 0x4a5a, \ + {0xae, 0xca, 0x37, 0xb8, 0xc8, 0xfd, 0x8c, 0xcd} \ +} + +class nsProxyEvent : public nsIRunnable +{ +public: + NS_DECLARE_STATIC_IID_ACCESSOR(NS_PROXYEVENT_IID) + NS_DECL_ISUPPORTS + + nsProxyEvent(nsProxyObjectCallInfo *info = nsnull) + : mInfo(info) + {} + + void SetInfo(nsProxyObjectCallInfo *info) + { + NS_ASSERTION(info, "null info"); + NS_ASSERTION(!mInfo, "unexpected change to mInfo"); + mInfo = info; + } + + PRBool IsSyncProxyEvent() + { + return mInfo->GetProxyObject()->GetProxyType() & NS_PROXY_SYNC; + } + +protected: + nsProxyObjectCallInfo *mInfo; +}; +NS_DEFINE_STATIC_IID_ACCESSOR(nsProxyEvent, NS_PROXYEVENT_IID) +NS_IMPL_THREADSAFE_ISUPPORTS2(nsProxyEvent, nsProxyEvent, nsIRunnable) + +//----------------------------------------------------------------------------- + +class nsProxyThreadFilter : public nsIThreadEventFilter +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSITHREADEVENTFILTER +}; + +NS_IMPL_THREADSAFE_ISUPPORTS1(nsProxyThreadFilter, nsIThreadEventFilter) + +NS_IMETHODIMP_(PRBool) +nsProxyThreadFilter::AcceptEvent(nsIRunnable *event) +{ + LOG(("PROXY(%p): filter event [%p]\n", this, event)); + + // If we encounter one of our proxy events that is for a synchronous method + // call, then we want to put it in our event queue for processing. Else, + // we want to allow the event to be dispatched to the thread's event queue + // for processing later once we complete the current sync method call. + + nsCOMPtr pe = do_QueryInterface(event); + return pe && pe->IsSyncProxyEvent(); +} + +//----------------------------------------------------------------------------- + +class nsProxyCallEvent : public nsProxyEvent +{ +public: + nsProxyCallEvent() + : nsProxyEvent() + {} + + NS_IMETHOD Run() + { + NS_ASSERTION(mInfo, "no info"); + Invoke(); + if (IsSyncProxyEvent()) { + mInfo->PostCompleted(); + } else { + delete mInfo; + mInfo = nsnull; + } + return NS_OK; + } + + void Invoke() + { + LOG(("PROXY(%p): Invoke\n", this)); + + nsProxyObject *proxyObject = mInfo->GetProxyObject(); + if (proxyObject) + { + // invoke the magic of xptc... + nsresult rv = XPTC_InvokeByIndex(proxyObject->GetRealObject(), + mInfo->GetMethodIndex(), + mInfo->GetParameterCount(), + mInfo->GetParameterList()); + mInfo->SetResult(rv); + } + else + { + mInfo->SetResult(NS_ERROR_OUT_OF_MEMORY); + } + } +}; + +//----------------------------------------------------------------------------- + +class nsProxyCallCompletedEvent : public nsProxyEvent +{ +public: + nsProxyCallCompletedEvent(nsProxyObjectCallInfo *info) + : nsProxyEvent(info) + {} + + NS_IMETHOD Run() + { + NS_ASSERTION(mInfo, "no info"); + mInfo->SetCompleted(); + return NS_OK; + } +}; + +//----------------------------------------------------------------------------- + +class nsProxyDestructorEvent : public nsRunnable +{ +public: + nsProxyDestructorEvent(nsProxyObject *doomed) + : mDoomed(doomed) + {} + + NS_IMETHOD Run() + { + delete mDoomed; + return NS_OK; + } + +private: + nsProxyObject *mDoomed; +}; + +//----------------------------------------------------------------------------- + +nsProxyObjectCallInfo::nsProxyObjectCallInfo(nsProxyObject* owner, + nsXPTMethodInfo *methodInfo, + PRUint32 methodIndex, + nsXPTCVariant* parameterList, + PRUint32 parameterCount, + nsIInterfaceInfo *interfaceInfo, + nsIRunnable *event) { NS_ASSERTION(owner, "No nsProxyObject!"); NS_ASSERTION(methodInfo, "No nsXPTMethodInfo!"); @@ -98,44 +244,43 @@ nsProxyObjectCallInfo::nsProxyObjectCallInfo( nsProxyObject* owner, mParameterList = parameterList; mParameterCount = parameterCount; mInterfaceInfo = interfaceInfo; - mEvent = event; + mEvent = event; // XXX strong or weak ref? mMethodInfo = methodInfo; - mCallersEventQ = nsnull; + mCallersTarget = nsnull; mOwner = owner; - if (mOwner->GetProxyType() & PROXY_ASYNC) + if (mOwner->GetProxyType() & NS_PROXY_ASYNC) CopyStrings(PR_TRUE); } + nsProxyObjectCallInfo::~nsProxyObjectCallInfo() { - if ((mOwner->GetProxyType() & PROXY_ASYNC)) { - if (!(mOwner->GetProxyType() & PROXY_AUTOPROXIFY)) + if ((mOwner->GetProxyType() & NS_PROXY_ASYNC)) { + if (!(mOwner->GetProxyType() & NS_PROXY_AUTOPROXIFY)) RefCountInInterfacePointers(PR_FALSE); - CopyStrings(PR_FALSE); + CopyStrings(PR_FALSE); } mOwner = nsnull; - PR_FREEIF(mEvent); - if (mParameterList) - free( (void*) mParameterList); + free((void*) mParameterList); } nsresult nsProxyObjectCallInfo::Init() { - if (mOwner->GetProxyType() & PROXY_AUTOPROXIFY) { + if (mOwner->GetProxyType() & NS_PROXY_AUTOPROXIFY) { nsresult rv; rv = mOwner->AutoproxifyInParameterList(mParameterList, mParameterCount, mMethodInfo, mMethodIndex, mInterfaceInfo); if (NS_FAILED(rv)) return rv; } - else if (mOwner->GetProxyType() & PROXY_ASYNC) - RefCountInInterfacePointers(PR_TRUE); + else if (mOwner->GetProxyType() & NS_PROXY_ASYNC) + RefCountInInterfacePointers(PR_FALSE); return NS_OK; } @@ -157,7 +302,7 @@ nsProxyObjectCallInfo::RefCountInInterfacePointers(PRBool addRef) if (anInterface) { - if(addRef) + if (addRef) anInterface->AddRef(); else anInterface->Release(); @@ -175,7 +320,7 @@ nsProxyObjectCallInfo::CopyStrings(PRBool copy) { const nsXPTParamInfo paramInfo = mMethodInfo->GetParam(i); - if(paramInfo.IsIn()) + if (paramInfo.IsIn()) { const nsXPTType& type = paramInfo.GetType(); uint8 type_tag = type.TagPart(); @@ -250,77 +395,55 @@ nsProxyObjectCallInfo::GetCompleted() void nsProxyObjectCallInfo::SetCompleted() { + LOG(("PROXY(%p): SetCompleted\n", this)); PR_AtomicSet(&mCompleted, 1); } void nsProxyObjectCallInfo::PostCompleted() { + LOG(("PROXY(%p): PostCompleted\n", this)); + // perform autoproxification cleanup and proxification of 'out' // params on proxied object's thread: - if (mOwner->GetProxyType() & PROXY_AUTOPROXIFY) { - PRBool bAsync = mOwner->GetProxyType() & PROXY_ASYNC; + if (mOwner->GetProxyType() & NS_PROXY_AUTOPROXIFY) { + PRBool bAsync = mOwner->GetProxyType() & NS_PROXY_ASYNC; mOwner->AutoproxifyOutParameterList(mParameterList, mParameterCount, mMethodInfo, mMethodIndex, mInterfaceInfo, !bAsync && NS_SUCCEEDED(mResult)); } - - if (mCallersEventQ) - { - PLEvent *event = PR_NEW(PLEvent); - PL_InitEvent(event, - this, - CompletedEventHandler, - CompletedDestroyHandler); - - mCallersEventQ->PostSynchronousEvent(event, nsnull); - PR_FREEIF(event); - } - else - { - // caller does not have an eventQ? This is an error! - SetCompleted(); + if (mCallersTarget) { + nsCOMPtr event = + new nsProxyCallCompletedEvent(this); + if (event && + NS_SUCCEEDED(mCallersTarget->Dispatch(event, NS_DISPATCH_NORMAL))) + return; } + + // OOM? caller does not have a target? This is an error! + NS_WARNING("Failed to dispatch nsProxyCallCompletedEvent"); + SetCompleted(); } -nsIEventQueue* -nsProxyObjectCallInfo::GetCallersQueue() +nsIEventTarget* +nsProxyObjectCallInfo::GetCallersTarget() { - return mCallersEventQ; -} -void -nsProxyObjectCallInfo::SetCallersQueue(nsIEventQueue* queue) -{ - mCallersEventQ = queue; -} - - -nsProxyObject::nsProxyObject(nsIEventQueue *destQueue, PRInt32 proxyType, nsISupports *realObject, - nsIEventQueueService* eventQService) -{ - mEventQService = eventQService; - - mRealObject = realObject; - mDestQueue = do_QueryInterface(destQueue); - mProxyType = proxyType; + return mCallersTarget; } - -nsProxyObject::nsProxyObject(nsIEventQueue *destQueue, PRInt32 proxyType, const nsCID &aClass, - nsISupports *aDelegate, const nsIID &aIID, nsIEventQueueService* eventQService) +void +nsProxyObjectCallInfo::SetCallersTarget(nsIEventTarget* target) { - mEventQService = eventQService; + mCallersTarget = target; +} - nsCOMPtr compMgr; - NS_GetComponentManager(getter_AddRefs(compMgr)); - compMgr->CreateInstance(aClass, - aDelegate, - aIID, - getter_AddRefs(mRealObject)); - - mDestQueue = do_QueryInterface(destQueue); +nsProxyObject::nsProxyObject(nsIEventTarget *target, PRInt32 proxyType, + nsISupports *realObject) +{ + mRealObject = realObject; + mTarget = target; mProxyType = proxyType; } @@ -330,10 +453,9 @@ nsProxyObject::~nsProxyObject() // do not remove assignments. mRealObject = 0; - mDestQueue = 0; + mTarget = 0; } - void nsProxyObject::AddRef() { @@ -344,113 +466,81 @@ nsProxyObject::AddRef() void nsProxyObject::Release(void) { - NS_PRECONDITION(0 != mRefCnt, "dup release"); + NS_PRECONDITION(0 != mRefCnt, "dup release"); - nsrefcnt count = PR_AtomicDecrement((PRInt32 *)&mRefCnt); - NS_LOG_RELEASE(this, count, "nsProxyObject"); + nsrefcnt count = PR_AtomicDecrement((PRInt32 *)&mRefCnt); + NS_LOG_RELEASE(this, count, "nsProxyObject"); - if (count == 0) - { - mRefCnt = 1; /* stabilize */ + if (count == 0) + { + mRefCnt = 1; /* stabilize */ - PRBool callDirectly; - mDestQueue->IsOnCurrentThread(&callDirectly); + PRBool callDirectly; + mTarget->IsOnCurrentThread(&callDirectly); - if (callDirectly) - { - delete this; - return; - } + if (callDirectly) + { + delete this; + return; + } - // need to do something special here so that - // the real object will always be deleted on - // the correct thread.. + // need to do something special here so that + // the real object will always be deleted on + // the correct thread.. - PLEvent *event = PR_NEW(PLEvent); - if (event == nsnull) - { - NS_ASSERTION(0, "Could not create a plevent. Leaking nsProxyObject!"); - return; // if this happens we are going to leak. - } - - PL_InitEvent(event, - this, - ProxyDestructorEventHandler, - ProxyDestructorDestroyHandler); + nsCOMPtr event = new nsProxyDestructorEvent(this); + if (event == nsnull) + { + NS_NOTREACHED("Leaking nsProxyObject!"); + return; // if this happens we are going to leak. + } - mDestQueue->PostEvent(event); - } -} + if (NS_FAILED(mTarget->Dispatch(event, NS_DISPATCH_NORMAL))) + NS_WARNING("Failed to dispatch nsProxyDestructorEvent"); + } +} nsresult nsProxyObject::PostAndWait(nsProxyObjectCallInfo *proxyInfo) { - if (proxyInfo == nsnull || mEventQService == nsnull) - return NS_ERROR_NULL_POINTER; - - PRBool eventLoopCreated = PR_FALSE; - nsresult rv; + LOG(("PROXY(%p): PostAndWait enter [%p]\n", this, proxyInfo)); - nsCOMPtr eventQ; - rv = mEventQService->GetThreadEventQueue(NS_CURRENT_THREAD, getter_AddRefs(eventQ)); - if (NS_FAILED(rv)) - { - rv = mEventQService->CreateMonitoredThreadEventQueue(); - eventLoopCreated = PR_TRUE; - if (NS_FAILED(rv)) - return rv; - - rv = mEventQService->GetThreadEventQueue(NS_CURRENT_THREAD, getter_AddRefs(eventQ)); - } - else if (mProxyType & PROXY_NESTED_QUEUES) - { - eventQ = nsnull; - rv = mEventQService->PushThreadEventQueue(getter_AddRefs(eventQ)); - if (NS_FAILED(rv)) - return rv; + NS_ENSURE_ARG_POINTER(proxyInfo); - // Tag the nested thread queue, so that calls being proxied - // back from our destQ to the caller thread will not deadlock: - PLEventQueue *destQ; - mDestQueue->GetPLEventQueue(&destQ); - eventQ->SetProxyThreadTag(PL_GetEventQueueThread(destQ)); - } - - if (NS_FAILED(rv)) - return rv; - - proxyInfo->SetCallersQueue(eventQ); - - PLEvent* event = proxyInfo->GetPLEvent(); + nsIRunnable* event = proxyInfo->GetEvent(); if (!event) return NS_ERROR_NULL_POINTER; - { - // Resolve destination queue (in case there is a nested queue - // tagged for our thread), and post: - nsCOMPtr proxyDestQ; - mDestQueue->GetProxyTaggedQueue(getter_AddRefs(proxyDestQ)); - proxyDestQ->PostEvent(event); - } - - while (! proxyInfo->GetCompleted()) - { - PLEvent *nextEvent; - rv = eventQ->WaitForEvent(&nextEvent); - if (NS_FAILED(rv)) break; - - eventQ->HandleEvent(nextEvent); - } + nsIThread *thread = NS_GetCurrentThread(); + nsCOMPtr threadInt = do_QueryInterface(thread); + NS_ENSURE_STATE(threadInt); - if (eventLoopCreated) - { - mEventQService->DestroyThreadEventQueue(); - eventQ = 0; - } - else if (mProxyType & PROXY_NESTED_QUEUES) { - mEventQService->PopThreadEventQueue(eventQ); + // Install thread filter to limit event processing only to subclasses of + // nsProxyEvent. XXX Add support for sequencing? + nsRefPtr filter = new nsProxyThreadFilter(); + if (!filter) + return NS_ERROR_OUT_OF_MEMORY; + threadInt->PushEventQueue(filter); + + proxyInfo->SetCallersTarget(thread); + + // Dispatch can fail if the thread is shutting down + nsresult rv = mTarget->Dispatch(event, NS_DISPATCH_NORMAL); + if (NS_SUCCEEDED(rv)) { + while (!proxyInfo->GetCompleted()) { + if (!NS_ProcessNextEvent(thread)) { + rv = NS_ERROR_UNEXPECTED; + break; + } + } + } else { + NS_WARNING("Failed to dispatch nsProxyCallEvent"); } + + threadInt->PopEventQueue(); + + LOG(("PROXY(%p): PostAndWait exit [%p %x]\n", this, proxyInfo, rv)); return rv; } @@ -475,7 +565,7 @@ nsProxyObject::convertMiniVariantToVariant(nsXPTMethodInfo *methodInfo, for (int i = 0; i < paramCount; i++) { const nsXPTParamInfo& paramInfo = methodInfo->GetParam(i); - if ((mProxyType & PROXY_ASYNC) && paramInfo.IsDipper()) + if ((mProxyType & NS_PROXY_ASYNC) && paramInfo.IsDipper()) { NS_WARNING("Async proxying of out parameters is not supported"); return NS_ERROR_PROXY_INVALID_OUT_PARAMETER; @@ -553,7 +643,7 @@ nsProxyObject::AutoproxifyInParameterList(nsXPTCVariant *params, uint8 paramCoun } nsIID iid; - + if (!GetIIDForParam(params, i, methodInfo, methodIndex, interfaceInfo, &iid)) { NS_WARNING("Couldn't get IID for parameter"); return NS_ERROR_FAILURE; @@ -562,7 +652,7 @@ nsProxyObject::AutoproxifyInParameterList(nsXPTCVariant *params, uint8 paramCoun // get a proxy for the given object: nsISupports* proxy; - NS_GetProxyForObject(NS_CURRENT_EVENTQ, iid, itf, + NS_GetProxyForObject(NS_PROXY_TO_CURRENT_THREAD, iid, itf, GetProxyType(), (void**)&proxy); if (!proxy) { @@ -625,7 +715,7 @@ nsProxyObject::AutoproxifyOutParameterList(nsXPTCVariant *params, uint8 paramCou // get a proxy for the given object: nsISupports* proxy; - NS_GetProxyForObject(mDestQueue, iid, itf, + NS_GetProxyForObject(mTarget, iid, itf, GetProxyType(), (void**)&proxy); if (!proxy) { @@ -655,7 +745,7 @@ nsProxyObject::AutoproxifyOutParameterList(nsXPTCVariant *params, uint8 paramCou } return rv; } - + nsresult nsProxyObject::Post( PRUint32 methodIndex, nsXPTMethodInfo *methodInfo, @@ -664,7 +754,7 @@ nsProxyObject::Post( PRUint32 methodIndex, { nsresult rv = NS_OK; - if (! mDestQueue || ! mRealObject) + if (! mTarget || ! mRealObject) return NS_ERROR_OUT_OF_MEMORY; if (methodInfo->IsNotXPCOM()) @@ -676,27 +766,27 @@ nsProxyObject::Post( PRUint32 methodIndex, if (NS_FAILED(rv)) return rv; - + PRBool callDirectly; // see if we should call into the method directly. Either it is a QI function call // (methodIndex == 0), or it is a sync proxy and this code is running on the same thread - // as the destination event queue. - if ( (!(mProxyType & PROXY_ISUPPORTS) && methodIndex == 0) || - ((mProxyType & PROXY_SYNC) && !(mProxyType & PROXY_SAMETHREAD) && - NS_SUCCEEDED(mDestQueue->IsOnCurrentThread(&callDirectly)) && + // as the destination dispatch target. + if ( (methodIndex == 0) || + (mProxyType & NS_PROXY_SYNC && + NS_SUCCEEDED(mTarget->IsOnCurrentThread(&callDirectly)) && callDirectly)) { - if (mProxyType & PROXY_AUTOPROXIFY) + if (mProxyType & NS_PROXY_AUTOPROXIFY) AutoproxifyInParameterList(fullParam, paramCount, methodInfo, methodIndex, interfaceInfo); - + // invoke the magic of xptc... nsresult rv = XPTC_InvokeByIndex( mRealObject, methodIndex, paramCount, fullParam); - - if (mProxyType & PROXY_AUTOPROXIFY) + + if (mProxyType & NS_PROXY_AUTOPROXIFY) AutoproxifyOutParameterList(fullParam, paramCount, methodInfo, methodIndex, interfaceInfo); if (fullParam) @@ -704,43 +794,38 @@ nsProxyObject::Post( PRUint32 methodIndex, return rv; } - PLEvent *event = PR_NEW(PLEvent); - - if (event == nsnull) { + nsRefPtr event = new nsProxyCallEvent(); + if (!event) { if (fullParam) free(fullParam); return NS_ERROR_OUT_OF_MEMORY; } - - nsProxyObjectCallInfo *proxyInfo = new nsProxyObjectCallInfo(this, - methodInfo, - methodIndex, - fullParam, // will be deleted by ~() - paramCount, - interfaceInfo, - event); // will be deleted by ~() - if (proxyInfo == nsnull) { - PR_DELETE(event); + nsProxyObjectCallInfo *proxyInfo = + new nsProxyObjectCallInfo(this, + methodInfo, + methodIndex, + fullParam, // will be deleted by ~() + paramCount, + interfaceInfo, + event); // will be deleted by ~() + + if (!proxyInfo) { if (fullParam) free(fullParam); return NS_ERROR_OUT_OF_MEMORY; } if (NS_FAILED(proxyInfo->Init())) { - PR_DELETE(event); if (fullParam) free(fullParam); delete proxyInfo; return NS_ERROR_FAILURE; } + + event->SetInfo(proxyInfo); - PL_InitEvent(event, - proxyInfo, - EventHandler, - DestroyHandler); - - if (mProxyType & PROXY_SYNC) + if (mProxyType & NS_PROXY_SYNC) { rv = PostAndWait(proxyInfo); @@ -750,82 +835,10 @@ nsProxyObject::Post( PRUint32 methodIndex, return rv; } - if (mProxyType & PROXY_ASYNC) + if (mProxyType & NS_PROXY_ASYNC) { - // Resolve destination queue (in case there is a nested queue - // tagged for our thread), and post: - nsCOMPtr proxyDestQ; - mDestQueue->GetProxyTaggedQueue(getter_AddRefs(proxyDestQ)); - proxyDestQ->PostEvent(event); + mTarget->Dispatch(event, NS_DISPATCH_NORMAL); return NS_OK; } return NS_ERROR_UNEXPECTED; } - - - -static void DestroyHandler(PLEvent *self) -{ - nsProxyObjectCallInfo* owner = (nsProxyObjectCallInfo*)PL_GetEventOwner(self); - nsProxyObject* proxyObject = owner->GetProxyObject(); - - if (proxyObject == nsnull) - return; - - if (proxyObject->GetProxyType() & PROXY_ASYNC) - { - delete owner; - } - else - { - owner->PostCompleted(); - } - -} - -static void* EventHandler(PLEvent *self) -{ - nsProxyObjectCallInfo *info = (nsProxyObjectCallInfo*)PL_GetEventOwner(self); - NS_ASSERTION(info, "No nsProxyObjectCallInfo!"); - - nsProxyObject *proxyObject = info->GetProxyObject(); - - if (proxyObject) - { - // invoke the magic of xptc... - nsresult rv = XPTC_InvokeByIndex( proxyObject->GetRealObject(), - info->GetMethodIndex(), - info->GetParameterCount(), - info->GetParameterList()); - info->SetResult(rv); - } - else - { - info->SetResult(NS_ERROR_OUT_OF_MEMORY); - } - return NULL; -} - -static void CompletedDestroyHandler(PLEvent *self) -{ -} - -static void* CompletedEventHandler(PLEvent *self) -{ - nsProxyObjectCallInfo* owner = (nsProxyObjectCallInfo*)PL_GetEventOwner(self); - owner->SetCompleted(); - return nsnull; -} - -static void* ProxyDestructorEventHandler(PLEvent *self) -{ - nsProxyObject* owner = (nsProxyObject*) PL_GetEventOwner(self); - NS_DELETEXPCOM(owner); - return nsnull; -} - -static void ProxyDestructorDestroyHandler(PLEvent *self) -{ - PR_DELETE(self); -} - diff --git a/mozilla/xpcom/proxy/src/nsProxyEvent.h b/mozilla/xpcom/proxy/src/nsProxyEvent.h index 33754126ce5..a93d55a4529 100644 --- a/mozilla/xpcom/proxy/src/nsProxyEvent.h +++ b/mozilla/xpcom/proxy/src/nsProxyEvent.h @@ -101,6 +101,18 @@ public: nsIEventTarget* GetTarget() const { return mTarget; } PRInt32 GetProxyType() const { return mProxyType; } + nsresult AutoproxifyInParameterList(nsXPTCVariant *params, + uint8 paramCount, + nsXPTMethodInfo *methodInfo, + PRUint32 methodIndex, + nsIInterfaceInfo* interfaceInfo); + nsresult AutoproxifyOutParameterList(nsXPTCVariant *params, + uint8 paramCount, + nsXPTMethodInfo *methodInfo, + PRUint32 methodIndex, + nsIInterfaceInfo* interfaceInfo, + PRBool proxifyOutPars = PR_TRUE); + friend class nsProxyEventObject; private: @@ -128,11 +140,14 @@ public: nsXPTMethodInfo *methodInfo, PRUint32 methodIndex, nsXPTCVariant* parameterList, - PRUint32 parameterCount, + PRUint32 parameterCount, + nsIInterfaceInfo *interfaceInfo, nsIRunnable *event); ~nsProxyObjectCallInfo(); + nsresult Init(); + PRUint32 GetMethodIndex() const { return mMethodIndex; } nsXPTCVariant* GetParameterList() const { return mParameterList; } PRUint32 GetParameterCount() const { return mParameterCount; } @@ -156,6 +171,7 @@ private: PRUint32 mMethodIndex; /* which method to be called? */ nsXPTCVariant *mParameterList; /* marshalled in parameter buffer */ PRUint32 mParameterCount; /* number of params */ + nsCOMPtr mInterfaceInfo; /* interface info for current interface */ nsIRunnable *mEvent; /* the current runnable */ PRInt32 mCompleted; /* is true when the method has been called. */ diff --git a/mozilla/xpcom/proxy/src/nsProxyEventClass.cpp b/mozilla/xpcom/proxy/src/nsProxyEventClass.cpp index a967c9c98f5..b1e7355e97f 100644 --- a/mozilla/xpcom/proxy/src/nsProxyEventClass.cpp +++ b/mozilla/xpcom/proxy/src/nsProxyEventClass.cpp @@ -1,4 +1,5 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:set ts=4 sw=4 sts=4 ci et: */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * @@ -76,12 +77,13 @@ nsProxyEventClass::GetNewOrUsedClass(REFNSIID aIID) /* find in our hash table */ nsProxyObjectManager *manager = nsProxyObjectManager::GetInstance(); - if (manager == nsnull) return nsnull; + if (manager == nsnull) + return nsnull; - // don't need to lock the map, because this is only called - // by nsProxyEventClass::GetNewOrUsed which locks it for us. + // don't need to lock the map, because this is only called by + // nsProxyEventClass::GetNewOrUsed which locks it for us. - nsHashtable *iidToClassMap = manager->GetIIDToProxyClassMap(); + nsHashtable *iidToClassMap = manager->GetIIDToProxyClassMap(); if (iidToClassMap == nsnull) { @@ -94,7 +96,7 @@ nsProxyEventClass::GetNewOrUsedClass(REFNSIID aIID) #ifdef PROXYEVENTCLASS_DEBUG char* iidStr = aIID.ToString(); printf("GetNewOrUsedClass %s\n", iidStr); - nsCRT::free(iidStr); + PR_Free(iidStr); #endif clazz = (nsProxyEventClass*) iidToClassMap->Get(&key); @@ -104,7 +106,7 @@ nsProxyEventClass::GetNewOrUsedClass(REFNSIID aIID) #ifdef PROXYEVENTCLASS_DEBUG char* iidStr = aIID.ToString(); printf("GetNewOrUsedClass %s hit\n", iidStr); - nsCRT::free(iidStr); + PR_Free(iidStr); #endif } else @@ -142,7 +144,7 @@ nsProxyEventClass::GetNewOrUsedClass(REFNSIID aIID) if (isISupportsDescendent) { clazz = new nsProxyEventClass(aIID, info); - if(!clazz->mDescriptors) + if (!clazz->mDescriptors) NS_RELEASE(clazz); // sets clazz to NULL } } @@ -153,12 +155,12 @@ nsProxyEventClass::GetNewOrUsedClass(REFNSIID aIID) nsProxyEventClass::nsProxyEventClass() { - NS_WARNING("This constructor should never be called"); + NS_NOTREACHED("This constructor should never be called"); } nsProxyEventClass::nsProxyEventClass(REFNSIID aIID, nsIInterfaceInfo* aInfo) -: mIID(aIID), - mDescriptors(NULL) + : mIID(aIID), + mDescriptors(NULL) { NS_ADDREF_THIS(); @@ -168,7 +170,8 @@ nsProxyEventClass::nsProxyEventClass(REFNSIID aIID, nsIInterfaceInfo* aInfo) nsIDKey key(aIID); nsProxyObjectManager *manager = nsProxyObjectManager::GetInstance(); - if (manager == nsnull) return; + if (manager == nsnull) + return; // don't need to lock the map, because this is only called // by GetNewOrUsed which locks it for us. @@ -184,7 +187,7 @@ nsProxyEventClass::nsProxyEventClass(REFNSIID aIID, nsIInterfaceInfo* aInfo) #ifdef PROXYEVENTCLASS_DEBUG char* iidStr = aIID.ToString(); printf("GetNewOrUsedClass %s put\n", iidStr); - nsCRT::free(iidStr); + PR_Free(iidStr); #endif } @@ -208,7 +211,7 @@ nsProxyEventClass::nsProxyEventClass(REFNSIID aIID, nsIInterfaceInfo* aInfo) nsProxyEventClass::~nsProxyEventClass() { - if(mDescriptors && mDescriptors != &zero_methods_descriptor) + if (mDescriptors && mDescriptors != &zero_methods_descriptor) delete [] mDescriptors; if (nsProxyObjectManager::IsManagerShutdown()) @@ -227,7 +230,7 @@ nsProxyEventClass::~nsProxyEventClass() #ifdef PROXYEVENTCLASS_DEBUG char* iidStr = mIID.ToString(); printf("GetNewOrUsedClass %s remove\n", iidStr); - nsCRT::free(iidStr); + PR_Free(iidStr); #endif } #endif @@ -242,7 +245,6 @@ nsProxyEventClass::CallQueryInterfaceOnProxy(nsProxyEventObject* self, REFNSIID *aInstancePtr = nsnull; // in case of error. - // The functions we will call: QueryInterface(REFNSIID aIID, void** aInstancePtr) nsXPTCMiniVariant var[2]; @@ -263,7 +265,7 @@ nsProxyEventClass::CallQueryInterfaceOnProxy(nsProxyEventObject* self, REFNSIID rv = self->CallMethod(0, mi, var); // proxify result if it hasn't been proxified already - if (NS_SUCCEEDED(rv) && !(self->GetProxyType() & PROXY_AUTOPROXIFY)) + if (NS_SUCCEEDED(rv) && !(self->GetProxyType() & NS_PROXY_AUTOPROXIFY)) { nsISupports *aIdentificationObject; @@ -279,7 +281,7 @@ nsProxyEventClass::CallQueryInterfaceOnProxy(nsProxyEventObject* self, REFNSIID return NS_ERROR_FAILURE; } - rv = manager->GetProxyForObject(self->GetQueue(), + rv = manager->GetProxyForObject(self->GetTarget(), aIID, self->GetRealObject(), self->GetProxyType(), @@ -312,7 +314,7 @@ public: static ProxyEventClassIdentity* singleton = NULL; if(!singleton) singleton = new ProxyEventClassIdentity(); - return (void*) singleton; + return singleton; } }; @@ -334,41 +336,41 @@ nsProxyEventClass::DelegatedQueryInterface(nsProxyEventObject* self, nsProxyEventObject* sibling; { - nsProxyObjectManager* manager = nsProxyObjectManager::GetInstance(); - nsAutoMonitor mon(manager->GetMonitor()); + nsProxyObjectManager* manager = nsProxyObjectManager::GetInstance(); + nsAutoMonitor mon(manager->GetMonitor()); - // This includes checking for nsISupports and the iid of self. - // And it also checks for other wrappers that have been constructed - // for this object. - if(nsnull != (sibling = self->LockedFind(aIID))) - { - NS_ADDREF(sibling); - *aInstancePtr = (void*) sibling; - return NS_OK; - } - - // check if asking for an interface that we inherit from - nsCOMPtr current = GetInterfaceInfo(); - nsCOMPtr parent; - - while(NS_SUCCEEDED(current->GetParent(getter_AddRefs(parent))) && parent) - { - current = parent; - - nsIID* iid; - if(NS_SUCCEEDED(current->GetInterfaceIID(&iid)) && iid) + // This includes checking for nsISupports and the iid of self. + // And it also checks for other wrappers that have been constructed + // for this object. + if (nsnull != (sibling = self->LockedFind(aIID))) { - PRBool found = aIID.Equals(*iid); - nsMemory::Free(iid); - if(found) + NS_ADDREF(sibling); + *aInstancePtr = (void*) sibling; + return NS_OK; + } + + // check if asking for an interface that we inherit from + nsCOMPtr current = GetInterfaceInfo(); + nsCOMPtr parent; + + while (NS_SUCCEEDED(current->GetParent(getter_AddRefs(parent))) && parent) + { + current = parent; + + nsIID* iid; + if (NS_SUCCEEDED(current->GetInterfaceIID(&iid)) && iid) { - *aInstancePtr = (void*) self; - NS_ADDREF(self); - return NS_OK; + PRBool found = aIID.Equals(*iid); + nsMemory::Free(iid); + if (found) + { + *aInstancePtr = (void*) self; + NS_ADDREF(self); + return NS_OK; + } } } } - } return CallQueryInterfaceOnProxy(self, aIID, (nsProxyEventObject**)aInstancePtr); } diff --git a/mozilla/xpcom/proxy/src/nsProxyEventObject.cpp b/mozilla/xpcom/proxy/src/nsProxyEventObject.cpp index bcf067d075a..f1c577dbf4e 100644 --- a/mozilla/xpcom/proxy/src/nsProxyEventObject.cpp +++ b/mozilla/xpcom/proxy/src/nsProxyEventObject.cpp @@ -44,7 +44,6 @@ #include "nsIProxyObjectManager.h" #include "nsProxyEventPrivate.h" -#include "nsIEventQueueService.h" #include "nsServiceManagerUtils.h" #include "nsHashtable.h" @@ -55,41 +54,35 @@ #include "nsAutoLock.h" static NS_DEFINE_IID(kProxyObject_Identity_Class_IID, NS_PROXYEVENT_IDENTITY_CLASS_IID); -static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID); - -static void* PR_CALLBACK ProxyObjectDestructorEventHandler(PLEvent *self); -static void PR_CALLBACK ProxyObjectDestructorDestroyHandler(PLEvent *self); - - //////////////////////////////////////////////////////////////////////////////// class nsProxyEventKey : public nsHashKey { public: - nsProxyEventKey(void* rootObjectKey, void* destQueueKey, PRInt32 proxyType) - : mRootObjectKey(rootObjectKey), mDestQueueKey(destQueueKey), mProxyType(proxyType) { + nsProxyEventKey(void* rootObjectKey, void* targetKey, PRInt32 proxyType) + : mRootObjectKey(rootObjectKey), mTargetKey(targetKey), mProxyType(proxyType) { } PRUint32 HashCode(void) const { return NS_PTR_TO_INT32(mRootObjectKey) ^ - NS_PTR_TO_INT32(mDestQueueKey) ^ mProxyType; + NS_PTR_TO_INT32(mTargetKey) ^ mProxyType; } PRBool Equals(const nsHashKey *aKey) const { const nsProxyEventKey* other = (const nsProxyEventKey*)aKey; return mRootObjectKey == other->mRootObjectKey - && mDestQueueKey == other->mDestQueueKey + && mTargetKey == other->mTargetKey && mProxyType == other->mProxyType; } nsHashKey *Clone() const { - return new nsProxyEventKey(mRootObjectKey, mDestQueueKey, mProxyType); + return new nsProxyEventKey(mRootObjectKey, mTargetKey, mProxyType); } protected: void* mRootObjectKey; - void* mDestQueueKey; + void* mTargetKey; PRInt32 mProxyType; }; @@ -132,7 +125,7 @@ nsProxyEventObject::DebugDump(const char * message, PRUint32 hashKey) printf("%s wrapper around @ %x\n", isRoot ? "ROOT":"non-root\n", GetRealObject()); nsCOMPtr rootObject = do_QueryInterface(mProxyObject->mRealObject); - nsCOMPtr rootQueue = do_QueryInterface(mProxyObject->mDestQueue); + nsCOMPtr rootQueue = do_QueryInterface(mProxyObject->mTarget); nsProxyEventKey key(rootObject, rootQueue, mProxyObject->mProxyType); printf("Hashkey: %d\n", key.HashCode()); @@ -172,7 +165,7 @@ nsProxyEventObject::DebugDump(const char * message, PRUint32 hashKey) // ////////////////////////////////////////////////////////////////////////////////////////////////// nsProxyEventObject* -nsProxyEventObject::GetNewOrUsedProxy(nsIEventQueue *destQueue, +nsProxyEventObject::GetNewOrUsedProxy(nsIEventTarget *target, PRInt32 proxyType, nsISupports *aObj, REFNSIID aIID) @@ -204,7 +197,7 @@ nsProxyEventObject::GetNewOrUsedProxy(nsIEventQueue *destQueue, // if you hit this assertion, you might want to check out how // you are using proxies. You shouldn't need to be creating // a proxy from a proxy. -- dougt@netscape.com - NS_ASSERTION(0, "Someone is building a proxy from a proxy"); + NS_WARNING("Someone is building a proxy from a proxy"); NS_ASSERTION(identificationObject, "where did my identification object go!"); if (!identificationObject) { @@ -234,7 +227,7 @@ nsProxyEventObject::GetNewOrUsedProxy(nsIEventQueue *destQueue, // Get the root nsISupports of the event queue... This is used later, // as part of the hashtable key... - nsCOMPtr destQRoot = do_QueryInterface(destQueue, &rv); + nsCOMPtr destQRoot = do_QueryInterface(target, &rv); if (NS_FAILED(rv) || !destQRoot) { return nsnull; } @@ -252,10 +245,6 @@ nsProxyEventObject::GetNewOrUsedProxy(nsIEventQueue *destQueue, return nsnull; } - nsCOMPtr eventQService(do_GetService(kEventQueueServiceCID, &rv)); - if (NS_FAILED(rv)) - return nsnull; - nsAutoMonitor mon(manager->GetMonitor()); // Get the hash table containing root proxy objects... @@ -304,12 +293,11 @@ nsProxyEventObject::GetNewOrUsedProxy(nsIEventQueue *destQueue, return nsnull; } - peo = new nsProxyEventObject(destQueue, + peo = new nsProxyEventObject(target, proxyType, rootObject, rootClazz, - nsnull, - eventQService); + nsnull); if(!peo) { // Ouch... Out of memory! return nsnull; @@ -357,12 +345,11 @@ nsProxyEventObject::GetNewOrUsedProxy(nsIEventQueue *destQueue, return nsnull; } - peo = new nsProxyEventObject(destQueue, + peo = new nsProxyEventObject(target, proxyType, rawInterface, proxyClazz, - rootProxy, - eventQService); + rootProxy); if (!peo) { // Ouch... Out of memory! return nsnull; @@ -407,19 +394,18 @@ nsProxyEventObject::nsProxyEventObject() NS_WARNING("This constructor should never be called"); } -nsProxyEventObject::nsProxyEventObject(nsIEventQueue *destQueue, +nsProxyEventObject::nsProxyEventObject(nsIEventTarget *target, PRInt32 proxyType, nsISupports* aObj, nsProxyEventClass* aClass, - nsProxyEventObject* root, - nsIEventQueueService* eventQService) + nsProxyEventObject* root) : mClass(aClass), mRoot(root), mNext(nsnull) { NS_IF_ADDREF(mRoot); - mProxyObject = new nsProxyObject(destQueue, proxyType, aObj, eventQService); + mProxyObject = new nsProxyObject(target, proxyType, aObj); #ifdef DEBUG_xpcom_proxy DebugDump("Create", 0); @@ -431,17 +417,7 @@ nsProxyEventObject::~nsProxyEventObject() #ifdef DEBUG_xpcom_proxy DebugDump("Delete", 0); #endif - - // Be pessimistic about whether the manager or even the monitor - // exist... This is to protect against shutdown issues where a - // proxy object could be destroyed after (or while) the Proxy - // Manager is being destroyed... - nsProxyObjectManager* manager = nsProxyObjectManager::GetInstance(); - if (mRoot) { - - nsAutoMonitor mon(manager ? manager->GetMonitor() : nsnull); - // // This proxy is not the root interface so it must be removed // from the chain of proxies... @@ -464,16 +440,14 @@ nsProxyEventObject::~nsProxyEventObject() // to zero, it safe to remove it because no proxies are in its chain. // if (! nsProxyObjectManager::IsManagerShutdown()) { - + nsProxyObjectManager* manager = nsProxyObjectManager::GetInstance(); nsHashtable *realToProxyMap = manager->GetRealObjectToProxyObjectMap(); NS_ASSERTION(!mNext, "There are still proxies in the chain!"); if (realToProxyMap != nsnull) { - nsAutoMonitor mon(manager->GetMonitor()); - nsCOMPtr rootObject = do_QueryInterface(mProxyObject->mRealObject); - nsCOMPtr rootQueue = do_QueryInterface(mProxyObject->mDestQueue); + nsCOMPtr rootQueue = do_QueryInterface(mProxyObject->mTarget); nsProxyEventKey key(rootObject, rootQueue, mProxyObject->mProxyType); #ifdef DEBUG_dougt void* value = @@ -502,45 +476,28 @@ NS_IMPL_THREADSAFE_ADDREF(nsProxyEventObject) NS_IMETHODIMP_(nsrefcnt) nsProxyEventObject::Release(void) { + // + // Be pessimistic about whether the manager or even the monitor exist... + // This is to protect against shutdown issues where a proxy object could + // be destroyed after (or while) the Proxy Manager is being destroyed... + // + nsProxyObjectManager* manager = nsProxyObjectManager::GetInstance(); + nsAutoMonitor mon(manager ? manager->GetMonitor() : nsnull); + nsrefcnt count; NS_PRECONDITION(0 != mRefCnt, "dup release"); - + // Decrement atomically - in case the Proxy Object Manager has already + // been deleted and the monitor is unavailable... count = PR_AtomicDecrement((PRInt32 *)&mRefCnt); NS_LOG_RELEASE(this, count, "nsProxyEventObject"); if (0 == count) { - mRefCnt = 1; /* stabilize */ + mRefCnt = 1; /* stabilize */ // // Remove the proxy from the hashtable (if necessary) or its - // proxy chain. - - if (!mRoot && (mProxyObject->GetProxyType() & PROXY_ISUPPORTS)) { - // we must make sure that this root proxy is deleted on - // the proxied object's thread - PRBool callDirectly; - mProxyObject->GetQueue()->IsOnCurrentThread(&callDirectly); - if (callDirectly) - { - NS_DELETEXPCOM(this); - return 0; - } - - PLEvent *event = PR_NEW(PLEvent); - if (event == nsnull) - { - NS_ERROR("Could not create a plevent. Leaking nsProxyEventObject"); - return 0; - } - - PL_InitEvent(event, - this, - ProxyObjectDestructorEventHandler, - ProxyObjectDestructorDestroyHandler); - - mProxyObject->GetQueue()->PostEvent(event); - } - else { - NS_DELETEXPCOM(this); - } + // proxy chain. This must be done inside of the proxy lock to + // prevent GetNewOrUsedProxy(...) from ressurecting it... + // + NS_DELETEXPCOM(this); return 0; } return count; @@ -597,15 +554,3 @@ nsProxyEventObject::CallMethod(PRUint16 methodIndex, return rv; } - -static void* ProxyObjectDestructorEventHandler(PLEvent *self) -{ - nsProxyEventObject* owner = (nsProxyEventObject*) PL_GetEventOwner(self); - NS_DELETEXPCOM(owner); - return nsnull; -} - -static void ProxyObjectDestructorDestroyHandler(PLEvent *self) -{ - PR_DELETE(self); -} diff --git a/mozilla/xpcom/proxy/src/nsProxyEventPrivate.h b/mozilla/xpcom/proxy/src/nsProxyEventPrivate.h index ab28ac0bcaa..42f1a134b2a 100644 --- a/mozilla/xpcom/proxy/src/nsProxyEventPrivate.h +++ b/mozilla/xpcom/proxy/src/nsProxyEventPrivate.h @@ -36,20 +36,19 @@ * * ***** END LICENSE BLOCK ***** */ -#ifndef __nsProxyEventPrivate_h_ -#define __nsProxyEventPrivate_h_ +#ifndef nsProxyEventPrivate_h__ +#define nsProxyEventPrivate_h__ #include "nscore.h" #include "nsISupports.h" #include "nsIFactory.h" #include "nsHashtable.h" -#include "plevent.h" #include "xptcall.h" // defines nsXPTCVariant -#include "nsIEventQueue.h" #include "nsProxyEvent.h" #include "nsIProxyObjectManager.h" +#include "prmon.h" class nsProxyEventObject; class nsProxyEventClass; @@ -113,7 +112,7 @@ public: NS_DECLARE_STATIC_IID_ACCESSOR(NS_PROXYEVENT_OBJECT_IID) - static nsProxyEventObject* GetNewOrUsedProxy(nsIEventQueue *destQueue, + static nsProxyEventObject* GetNewOrUsedProxy(nsIEventTarget *target, PRInt32 proxyType, nsISupports *aObj, REFNSIID aIID); @@ -126,19 +125,16 @@ public: nsProxyEventClass* GetClass() const { return mClass; } - nsIEventQueue* GetQueue() const { return (mProxyObject ? mProxyObject->GetQueue() : nsnull);} + nsIEventTarget* GetTarget() const { return (mProxyObject ? mProxyObject->GetTarget() : nsnull);} nsISupports* GetRealObject() const { return (mProxyObject ? mProxyObject->GetRealObject(): nsnull);} PRInt32 GetProxyType() const { return (mProxyObject ? mProxyObject->GetProxyType() : nsnull);} nsProxyEventObject(); - nsProxyEventObject(nsIEventQueue *destQueue, + nsProxyEventObject(nsIEventTarget *target, PRInt32 proxyType, nsISupports* aObj, nsProxyEventClass* aClass, - nsProxyEventObject* root, - nsIEventQueueService* eventQService); - - ~nsProxyEventObject(); + nsProxyEventObject* root); nsProxyEventObject* LockedFind(REFNSIID aIID); @@ -146,6 +142,9 @@ public: void DebugDump(const char * message, PRUint32 hashKey); #endif +private: + ~nsProxyEventObject(); + protected: void LockedRemoveProxy(); @@ -169,11 +168,9 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsProxyEventObject, NS_PROXYEVENT_OBJECT_IID) class nsProxyObjectManager: public nsIProxyObjectManager { public: - NS_DECL_ISUPPORTS NS_DECL_NSIPROXYOBJECTMANAGER - static NS_METHOD Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr); nsProxyObjectManager(); @@ -197,5 +194,12 @@ private: PRMonitor *mProxyCreationMonitor; }; +#define NS_XPCOMPROXY_CLASSNAME "nsProxyObjectManager" +#define NS_PROXYEVENT_MANAGER_CID \ +{ 0xeea90d41, \ + 0xb059, \ + 0x11d2, \ + {0x91, 0x5e, 0xc1, 0x2b, 0x69, 0x6c, 0x93, 0x33} \ +} -#endif +#endif // nsProxyEventPrivate_h__ diff --git a/mozilla/xpcom/proxy/src/nsProxyObjectManager.cpp b/mozilla/xpcom/proxy/src/nsProxyObjectManager.cpp index 10015e5136e..afac93313ed 100644 --- a/mozilla/xpcom/proxy/src/nsProxyObjectManager.cpp +++ b/mozilla/xpcom/proxy/src/nsProxyObjectManager.cpp @@ -50,59 +50,15 @@ #include "nsProxyEvent.h" #include "nsIProxyObjectManager.h" #include "nsProxyEventPrivate.h" - -#include "nsIProxyCreateInstance.h" +#include "nsThreadUtils.h" #include "nsIComponentManager.h" #include "nsIServiceManager.h" #include "nsCOMPtr.h" -#include "nsIEventQueueService.h" #include "nsIThread.h" -static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID); - -/***************************************************************************/ -/* nsProxyCreateInstance */ -/* This private class will allow us to create Instances on another thread */ -/***************************************************************************/ -class nsProxyCreateInstance : public nsIProxyCreateInstance -{ - NS_DECL_ISUPPORTS - NS_IMETHOD CreateInstanceByIID(const nsIID & cid, nsISupports *aOuter, const nsIID & iid, void * *result); - NS_IMETHOD CreateInstanceByContractID(const char *aContractID, nsISupports *aOuter, const nsIID & iid, void * *result); - - nsProxyCreateInstance() - { - NS_GetComponentManager(getter_AddRefs(mCompMgr)); - NS_ASSERTION(mCompMgr, "no component manager"); - } - -private: - - nsCOMPtr mCompMgr; -}; - -NS_IMPL_ISUPPORTS1(nsProxyCreateInstance, nsIProxyCreateInstance) - -NS_IMETHODIMP nsProxyCreateInstance::CreateInstanceByIID(const nsIID & cid, nsISupports *aOuter, const nsIID & iid, void * *result) -{ - return mCompMgr->CreateInstance(cid, - aOuter, - iid, - result); -} - - -NS_IMETHODIMP nsProxyCreateInstance::CreateInstanceByContractID(const char *aContractID, nsISupports *aOuter, const nsIID & iid, void * *result) -{ - return mCompMgr->CreateInstanceByContractID(aContractID, - aOuter, - iid, - result); -} - ///////////////////////////////////////////////////////////////////////// // nsProxyObjectManager ///////////////////////////////////////////////////////////////////////// @@ -118,20 +74,20 @@ nsProxyObjectManager::nsProxyObjectManager() mProxyCreationMonitor = PR_NewMonitor(); } -static PRBool PurgeProxyClasses(nsHashKey *aKey, void *aData, void* closure) +static PRIntn +PurgeProxyClasses(nsHashKey *aKey, void *aData, void* closure) { - nsProxyEventClass* ptr = NS_REINTERPRET_CAST(nsProxyEventClass*, aData); + nsProxyEventClass* ptr = NS_STATIC_CAST(nsProxyEventClass*, aData); NS_RELEASE(ptr); - return PR_TRUE; + return kHashEnumerateNext; } nsProxyObjectManager::~nsProxyObjectManager() { - mProxyClassMap.Reset((nsHashtableEnumFunc)PurgeProxyClasses, nsnull); + mProxyClassMap.Reset(PurgeProxyClasses, nsnull); - if (mProxyCreationMonitor) { + if (mProxyCreationMonitor) PR_DestroyMonitor(mProxyCreationMonitor); - } nsProxyObjectManager::mInstance = nsnull; } @@ -139,179 +95,73 @@ nsProxyObjectManager::~nsProxyObjectManager() PRBool nsProxyObjectManager::IsManagerShutdown() { - if (mInstance) - return PR_FALSE; - return PR_TRUE; + return mInstance == nsnull; } nsProxyObjectManager * nsProxyObjectManager::GetInstance() { - if (! mInstance) - { + if (!mInstance) mInstance = new nsProxyObjectManager(); - } return mInstance; } - void nsProxyObjectManager::Shutdown() { mInstance = nsnull; } - -// Helpers NS_IMETHODIMP -nsProxyObjectManager::Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr) +nsProxyObjectManager::Create(nsISupports* outer, const nsIID& aIID, + void* *aInstancePtr) { nsProxyObjectManager *proxyObjectManager = GetInstance(); - - if (proxyObjectManager == nsnull) + if (!proxyObjectManager) return NS_ERROR_OUT_OF_MEMORY; return proxyObjectManager->QueryInterface(aIID, aInstancePtr); } - NS_IMETHODIMP -nsProxyObjectManager::GetProxyForObject(nsIEventQueue *destQueue, +nsProxyObjectManager::GetProxyForObject(nsIEventTarget* aTarget, REFNSIID aIID, nsISupports* aObj, PRInt32 proxyType, void** aProxyObject) { - if (!aObj) return NS_ERROR_NULL_POINTER; - if (!aProxyObject) return NS_ERROR_NULL_POINTER; - - nsresult rv; - nsCOMPtr postQ; - + NS_ENSURE_ARG_POINTER(aObj); *aProxyObject = nsnull; - // check to see if the destination Q is a special case. - - nsCOMPtr eventQService = - do_GetService(kEventQueueServiceCID, &rv); - if (NS_FAILED(rv)) - return rv; - - rv = eventQService->ResolveEventQueue(destQueue, getter_AddRefs(postQ)); - if (NS_FAILED(rv)) - return rv; - - // check to see if the eventQ is on our thread. If so, just return the real object. - - if (postQ && !(proxyType & PROXY_ASYNC) && !(proxyType & PROXY_ALWAYS)) - { - PRBool aResult; - postQ->IsOnCurrentThread(&aResult); - - if (aResult) - { - return aObj->QueryInterface(aIID, aProxyObject); - } + // handle special values + nsCOMPtr thread; + if (aTarget == NS_PROXY_TO_CURRENT_THREAD) { + aTarget = NS_GetCurrentThread(); + } else if (aTarget == NS_PROXY_TO_MAIN_THREAD) { + thread = do_GetMainThread(); + aTarget = thread.get(); } - // check if we need to create the proxy on the target thread. + // check to see if the target is on our thread. If so, just return the + // real object. - if (postQ && (proxyType & PROXY_ISUPPORTS)) + if (!(proxyType & NS_PROXY_ASYNC) && !(proxyType & NS_PROXY_ALWAYS)) { - PRBool aResult; - postQ->IsOnCurrentThread(&aResult); - - if (!aResult) { - // the object wants ISupports called proxied and we're not on its thread. - // Create an nsProxyObjectManager proxy and proxify the object from there. - nsCOMPtr proxiedPOM; - NS_GetProxyForObject(postQ, GetIID(), this, PROXY_SYNC | PROXY_ALWAYS, - getter_AddRefs(proxiedPOM)); - if (!proxiedPOM) { - NS_ERROR("failed to create proxied proxy object manager"); - return NS_ERROR_FAILURE; - } - return proxiedPOM->GetProxyForObject(postQ, aIID, aObj, proxyType, aProxyObject); - } + PRBool result; + aTarget->IsOnCurrentThread(&result); + + if (result) + return aObj->QueryInterface(aIID, aProxyObject); } // check to see if proxy is there or not. - *aProxyObject = nsProxyEventObject::GetNewOrUsedProxy(postQ, proxyType, aObj, aIID); - - if (*aProxyObject == nsnull) - return NS_ERROR_NO_INTERFACE; //fix error code? + *aProxyObject = nsProxyEventObject::GetNewOrUsedProxy(aTarget, proxyType, + aObj, aIID); + if (!*aProxyObject) + return NS_ERROR_UNEXPECTED; - return NS_OK; -} - - -NS_IMETHODIMP -nsProxyObjectManager::GetProxy( nsIEventQueue *destQueue, - const nsCID &aClass, - nsISupports *aDelegate, - const nsIID &aIID, - PRInt32 proxyType, - void** aProxyObject) -{ - if (!aProxyObject) return NS_ERROR_NULL_POINTER; - *aProxyObject = nsnull; - - // 1. Create a proxy for creating an instance on another thread. - - nsIProxyCreateInstance* ciProxy = nsnull; - - nsProxyCreateInstance* ciObject = new nsProxyCreateInstance(); - - if (ciObject == nsnull) - return NS_ERROR_NULL_POINTER; - - NS_ADDREF(ciObject); - - nsresult rv = GetProxyForObject(destQueue, - NS_GET_IID(nsIProxyCreateInstance), - ciObject, - PROXY_SYNC, - (void**)&ciProxy); - - if (NS_FAILED(rv)) - { - NS_RELEASE(ciObject); - return rv; - } - - // 2. now create a new instance of the request object via our proxy. - - nsISupports* aObj; - - rv = ciProxy->CreateInstanceByIID(aClass, - aDelegate, - aIID, - (void**)&aObj); - - - // 3. Delete the create instance proxy and its real object. - - NS_RELEASE(ciProxy); - NS_RELEASE(ciObject); - - // 4. Check to see if creating the requested instance failed. - if ( NS_FAILED(rv)) - { - return rv; - } - - // 5. Now create a proxy object for the requested object. - - rv = GetProxyForObject(destQueue, aIID, aObj, proxyType, aProxyObject); - - // 6. release ownership of aObj so that aProxyObject owns it. - - NS_RELEASE(aObj); - - // 7. return the error returned from GetProxyForObject. Either way, we our out of here. - - return rv; + return NS_OK; } /** @@ -322,7 +172,7 @@ nsProxyObjectManager::GetProxy( nsIEventQueue *destQueue, * readable. */ NS_COM nsresult -NS_GetProxyForObject(nsIEventQueue *destQueue, +NS_GetProxyForObject(nsIEventTarget *target, REFNSIID aIID, nsISupports* aObj, PRInt32 proxyType, @@ -330,18 +180,17 @@ NS_GetProxyForObject(nsIEventQueue *destQueue, { static NS_DEFINE_CID(proxyObjMgrCID, NS_PROXYEVENT_MANAGER_CID); - nsresult rv; // temp for return value + nsresult rv; // get the proxy object manager // nsCOMPtr proxyObjMgr = do_GetService(proxyObjMgrCID, &rv); - if (NS_FAILED(rv)) - return NS_ERROR_FAILURE; + return rv; // and try to get the proxy object // - return proxyObjMgr->GetProxyForObject(destQueue, aIID, aObj, + return proxyObjMgr->GetProxyForObject(target, aIID, aObj, proxyType, aProxyObject); } diff --git a/mozilla/xpcom/threads/nsEventQueue.cpp b/mozilla/xpcom/threads/nsEventQueue.cpp index 1f48af7a64a..9d294fc7121 100644 --- a/mozilla/xpcom/threads/nsEventQueue.cpp +++ b/mozilla/xpcom/threads/nsEventQueue.cpp @@ -1,4 +1,5 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * @@ -12,18 +13,18 @@ * for the specific language governing rights and limitations under the * License. * - * The Original Code is Mozilla Communicator client code. + * The Original Code is Mozilla code. * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 + * The Initial Developer of the Original Code is Google Inc. + * Portions created by the Initial Developer are Copyright (C) 2006 * the Initial Developer. All Rights Reserved. * * Contributor(s): + * Darin Fisher * * Alternatively, the contents of this file may be used under the terms of - * either of the GNU General Public License Version 2 or later (the "GPL"), - * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to @@ -35,678 +36,96 @@ * * ***** END LICENSE BLOCK ***** */ -#include "nsCOMPtr.h" #include "nsEventQueue.h" -#include "nsIEventQueueService.h" -#include "nsIThread.h" - -#include "nsIServiceManager.h" -#include "nsIObserverService.h" - -#include "nsString.h" - +#include "nsAutoLock.h" +#include "nsCOMPtr.h" #include "prlog.h" -#ifdef NS_DEBUG -#include "prprf.h" +#ifdef PR_LOGGING +static PRLogModuleInfo *sLog = PR_NewLogModule("nsEventQueue"); #endif +#define LOG(args) PR_LOG(sLog, PR_LOG_DEBUG, args) -#if defined(PR_LOGGING) && defined(DEBUG_danm) -/* found these logs useful in conjunction with netlibStreamEvent logging - from netwerk. */ -PRLogModuleInfo* gEventQueueLog = 0; -PRUint32 gEventQueueLogCount = 0; -PRUint32 gEventQueueLogPPCount = 0; -static int gEventQueueLogPPLevel = 0; -static PLEventQueue *gEventQueueLogQueue = 0; -static PRThread *gEventQueueLogThread = 0; -#endif - -// in a real system, these would be members in a header class... -static const char gActivatedNotification[] = "nsIEventQueueActivated"; -static const char gDestroyedNotification[] = "nsIEventQueueDestroyed"; - -nsEventQueueImpl::nsEventQueueImpl() +nsEventQueue::nsEventQueue() + : mMonitor(nsAutoMonitor::NewMonitor("xpcom.eventqueue")) + , mHead(nsnull) + , mTail(nsnull) + , mOffsetHead(0) + , mOffsetTail(0) { - NS_ADDREF_THIS(); - /* The slightly weird ownership model for eventqueues goes like this: - - General: - There's an addref from the factory generally held by whoever asked for - the queue. The queue addrefs itself (right here) and releases itself - after someone calls StopAcceptingEvents() on the queue and when it is - dark and empty (in CheckForDeactivation()). - - Chained queues: - - Eldest queue: - The eldest queue in a chain is held on to by the EventQueueService - in a hash table, so it is possible that the eldest queue may not be - released until the EventQueueService is shutdown. - You may not call StopAcceptingEvents() on this queue until you have - done so on all younger queues. - - General: - Each queue holds a reference to their immediate elder link and a weak - reference to their immediate younger link. Because you must shut down - queues from youngest to eldest, all the references will be removed. - - It happens something like: - queue->StopAcceptingEvents() - { - CheckForDeactivation() - { - -- hopefully we are able to shutdown now -- - Unlink() - { - -- remove the reference we hold to our elder queue -- - -- NULL out our elder queues weak reference to us -- - } - RELEASE ourself (to balance the ADDREF here in the constructor) - -- and we should go away. -- - } - } - - - Notes: - A dark queue no longer accepts events. An empty queue simply has no events. - */ - -#if defined(PR_LOGGING) && defined(DEBUG_danm) - PR_LOG(gEventQueueLog, PR_LOG_DEBUG, - ("EventQueue: Created [queue=%lx]",(long)mEventQueue)); - ++gEventQueueLogCount; -#endif - - mYoungerQueue = nsnull; - mEventQueue = nsnull; - mAcceptingEvents = PR_TRUE; - mCouldHaveEvents = PR_TRUE; - mProxyThreadTag = nsnull; } -nsEventQueueImpl::~nsEventQueueImpl() +nsEventQueue::~nsEventQueue() { - Unlink(); + if (mMonitor) + nsAutoMonitor::DestroyMonitor(mMonitor); +} -#if defined(PR_LOGGING) && defined(DEBUG_danm) - PR_LOG(gEventQueueLog, PR_LOG_DEBUG, - ("EventQueue: Destroyed [queue=%lx]",(long)mEventQueue)); - ++gEventQueueLogCount; -#endif +PRBool +nsEventQueue::GetEvent(PRBool mayWait, nsIRunnable **result) +{ + nsAutoMonitor mon(mMonitor); - if (mEventQueue) { - // Perhaps CheckForDeactivation wasn't called... - if (mCouldHaveEvents) - NotifyObservers(gDestroyedNotification); - PL_DestroyEventQueue(mEventQueue); + while (IsEmpty()) { + if (!mayWait) { + if (result) + *result = nsnull; + return PR_FALSE; + } + LOG(("EVENTQ(%p): wait begin\n", this)); + mon.Wait(); + LOG(("EVENTQ(%p): wait end\n", this)); } + + if (result) { + *result = mHead->mEvents[mOffsetHead++]; + + // Check if mHead points to empty Page + if (mOffsetHead == EVENTS_PER_PAGE) { + Page *dead = mHead; + mHead = mHead->mNext; + FreePage(dead); + mOffsetHead = 0; + } + } + + return PR_TRUE; } -NS_IMETHODIMP -nsEventQueueImpl::Init(PRBool aNative) +PRBool +nsEventQueue::PutEvent(nsIRunnable *runnable) { - PRThread *thread = PR_GetCurrentThread(); - if (aNative) - mEventQueue = PL_CreateNativeEventQueue("Thread event queue...", thread); - else - mEventQueue = PL_CreateMonitoredEventQueue("Thread event queue...", thread); - if (!mEventQueue) - return NS_ERROR_FAILURE; - NotifyObservers(gActivatedNotification); - return NS_OK; -} - -NS_IMETHODIMP -nsEventQueueImpl::InitFromPRThread(PRThread* thread, PRBool aNative) -{ - if (thread == NS_CURRENT_THREAD) + // Avoid calling AddRef+Release while holding our monitor. + nsCOMPtr event(runnable); + PRBool rv = PR_TRUE; { - thread = PR_GetCurrentThread(); - } - else if (thread == NS_UI_THREAD) - { - nsCOMPtr mainIThread; - nsresult rv; + nsAutoMonitor mon(mMonitor); - // Get the primordial thread - rv = nsIThread::GetMainThread(getter_AddRefs(mainIThread)); - if (NS_FAILED(rv)) return rv; - - rv = mainIThread->GetPRThread(&thread); - if (NS_FAILED(rv)) return rv; - } - - if (aNative) - mEventQueue = PL_CreateNativeEventQueue("Thread event queue...", thread); - else - mEventQueue = PL_CreateMonitoredEventQueue("Thread event queue...", thread); - if (!mEventQueue) - return NS_ERROR_FAILURE; - - NotifyObservers(gActivatedNotification); - return NS_OK; -} - -NS_IMETHODIMP -nsEventQueueImpl::InitFromPLQueue(PLEventQueue* aQueue) -{ - mEventQueue = aQueue; - NotifyObservers(gActivatedNotification); - return NS_OK; -} - -/* nsISupports interface implementation... */ -NS_IMPL_THREADSAFE_ISUPPORTS3(nsEventQueueImpl, - nsIEventQueue, - nsIEventTarget, - nsPIEventQueueChain) - -/* nsIEventQueue interface implementation... */ - -NS_IMETHODIMP -nsEventQueueImpl::StopAcceptingEvents() -{ - if (mYoungerQueue) { - NS_ERROR("Should not shut down eventq while child queues are active"); - mYoungerQueue->StopAcceptingEvents(); - } - - // XXXThis method can be called from any thread: do we need to protect this - // with a lock? - mAcceptingEvents = PR_FALSE; - CheckForDeactivation(); -#if defined(PR_LOGGING) && defined(DEBUG_danm) - PR_LOG(gEventQueueLog, PR_LOG_DEBUG, - ("EventQueue: StopAccepting [queue=%lx, accept=%d, could=%d]", - (long)mEventQueue,(int)mAcceptingEvents,(int)mCouldHaveEvents)); - ++gEventQueueLogCount; -#endif - return NS_OK; -} - -NS_IMETHODIMP -nsEventQueueImpl::SetProxyThreadTag(PRThread *thread) -{ - mProxyThreadTag = thread; - return NS_OK; -} - -NS_IMETHODIMP -nsEventQueueImpl::GetProxyTaggedQueue(nsIEventQueue **aQueue) -{ - nsCOMPtr answer; - - if (mYoungerQueue) - mYoungerQueue->GetYoungestActiveProxyTagged(PR_GetCurrentThread(), - getter_AddRefs(answer)); - - if (!answer) - answer = NS_STATIC_CAST(nsIEventQueue*, this); - - *aQueue = answer; - NS_IF_ADDREF(*aQueue); - return NS_OK; -} - -// utility funtion to send observers a notification -void -nsEventQueueImpl::NotifyObservers(const char *aTopic) -{ - // only send out this notification for native event queues - if (!PL_IsQueueNative(mEventQueue)) - return; - - // we should not call out to the observer service from background threads! - NS_ASSERTION(nsIThread::IsMainThread(), - "Native event queues should only be used on the main thread"); - - nsresult rv; - nsCOMPtr os = do_GetService("@mozilla.org/observer-service;1", &rv); - if (NS_SUCCEEDED(rv)) { - nsCOMPtr kungFuDeathGrip(this); - nsCOMPtr us(do_QueryInterface(kungFuDeathGrip)); - os->NotifyObservers(us, aTopic, NULL); - } -} - -void -nsEventQueueImpl::CheckForDeactivation() -{ - if (mCouldHaveEvents && !mAcceptingEvents && !PL_EventAvailable(mEventQueue)) { - if (PL_IsQueueOnCurrentThread(mEventQueue)) { - mCouldHaveEvents = PR_FALSE; - NotifyObservers(gDestroyedNotification); - NS_RELEASE_THIS(); // balance ADDREF from the constructor - } else - NS_ERROR("CheckForDeactivation called from wrong thread!"); - } -} - - -NS_IMETHODIMP -nsEventQueueImpl::InitEvent(PLEvent* aEvent, - void* owner, - PLHandleEventProc handler, - PLDestroyEventProc destructor) -{ - PL_InitEvent(aEvent, owner, handler, destructor); - return NS_OK; -} - - -NS_IMETHODIMP -nsEventQueueImpl::PostEvent(PLEvent* aEvent) -{ - if (!mAcceptingEvents) { -#if defined(PR_LOGGING) && defined(DEBUG_danm) - PR_LOG(gEventQueueLog, PR_LOG_DEBUG, - ("EventQueue: Punt posted event [queue=%lx, accept=%d, could=%d]", - (long)mEventQueue,(int)mAcceptingEvents,(int)mCouldHaveEvents)); - ++gEventQueueLogCount; -#endif - nsresult rv = NS_ERROR_FAILURE; - NS_ASSERTION(mElderQueue, "event dropped because event chain is dead"); - if (mElderQueue) { - nsCOMPtr elder(do_QueryInterface(mElderQueue)); - if (elder) - rv = elder->PostEvent(aEvent); + if (!mHead) { + mHead = NewPage(); + if (!mHead) { + rv = PR_FALSE; + } else { + mTail = mHead; + mOffsetHead = 0; + mOffsetTail = 0; + } + } else if (mOffsetTail == EVENTS_PER_PAGE) { + Page *page = NewPage(); + if (!page) { + rv = PR_FALSE; + } else { + mTail->mNext = page; + mTail = page; + mOffsetTail = 0; + } } - return rv; - } -#if defined(PR_LOGGING) && defined(DEBUG_danm) - PR_LOG(gEventQueueLog, PR_LOG_DEBUG, - ("EventQueue: Posting event [queue=%lx]", (long)mEventQueue)); - ++gEventQueueLogCount; -#endif - return PL_PostEvent(mEventQueue, aEvent) == PR_SUCCESS ? NS_OK : NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsEventQueueImpl::PostSynchronousEvent(PLEvent* aEvent, void** aResult) -{ - if (!mAcceptingEvents) { -#if defined(PR_LOGGING) && defined(DEBUG_danm) - PR_LOG(gEventQueueLog, PR_LOG_DEBUG, - ("EventQueue: Punt posted synchronous event [queue=%lx, accept=%d, could=%d]", - (long)mEventQueue,(int)mAcceptingEvents,(int)mCouldHaveEvents)); - ++gEventQueueLogCount; -#endif - nsresult rv = NS_ERROR_NO_INTERFACE; - NS_ASSERTION(mElderQueue, "event dropped because event chain is dead"); - if (mElderQueue) { - nsCOMPtr elder(do_QueryInterface(mElderQueue)); - if (elder) - rv = elder->PostSynchronousEvent(aEvent, aResult); - return rv; + if (rv) { + event.swap(mTail->mEvents[mOffsetTail]); + ++mOffsetTail; + LOG(("EVENTQ(%p): notify\n", this)); + mon.NotifyAll(); } - return NS_ERROR_ABORT; - } - -#if defined(PR_LOGGING) && defined(DEBUG_danm) - PR_LOG(gEventQueueLog, PR_LOG_DEBUG, - ("EventQueue: Posting synchronous event [queue=%lx]", (long)mEventQueue)); - ++gEventQueueLogCount; -#endif - void* result = PL_PostSynchronousEvent(mEventQueue, aEvent); - if (aResult) - *aResult = result; - - return NS_OK; -} - -NS_IMETHODIMP -nsEventQueueImpl::EnterMonitor() -{ - PL_ENTER_EVENT_QUEUE_MONITOR(mEventQueue); - return NS_OK; -} - -NS_IMETHODIMP -nsEventQueueImpl::ExitMonitor() -{ - PL_EXIT_EVENT_QUEUE_MONITOR(mEventQueue); - return NS_OK; -} - - -NS_IMETHODIMP -nsEventQueueImpl::RevokeEvents(void* owner) -{ - nsCOMPtr youngest; - GetYoungest(getter_AddRefs(youngest)); - NS_ASSERTION(youngest, "How could we possibly not have a youngest queue?"); - nsCOMPtr youngestAsChain(do_QueryInterface(youngest)); - NS_ASSERTION(youngestAsChain, "RevokeEvents won't work; expect crashes"); - return youngestAsChain->RevokeEventsInternal(owner); -} - - -NS_IMETHODIMP -nsEventQueueImpl::GetPLEventQueue(PLEventQueue** aEventQueue) -{ - if (!mEventQueue) - return NS_ERROR_NULL_POINTER; - - *aEventQueue = mEventQueue; - return NS_OK; -} - -NS_IMETHODIMP -nsEventQueueImpl::IsOnCurrentThread(PRBool *aResult) -{ - *aResult = PL_IsQueueOnCurrentThread( mEventQueue ); - return NS_OK; -} - - -NS_IMETHODIMP -nsEventQueueImpl::IsQueueNative(PRBool *aResult) -{ - *aResult = PL_IsQueueNative(mEventQueue); - return NS_OK; -} - -NS_IMETHODIMP -nsEventQueueImpl::PendingEvents(PRBool *aResult) -{ - *aResult = PL_EventAvailable(mEventQueue); - if (!*aResult && mElderQueue) { - nsCOMPtr elder(do_QueryInterface(mElderQueue)); - if (elder) - return elder->EventAvailable(*aResult); - } - return NS_OK; -} - - -NS_IMETHODIMP -nsEventQueueImpl::ProcessPendingEvents() -{ - PRBool correctThread = PL_IsQueueOnCurrentThread(mEventQueue); - - NS_ASSERTION(correctThread, "attemping to process events on the wrong thread"); - - if (!correctThread) - return NS_ERROR_FAILURE; -#if defined(PR_LOGGING) && defined(DEBUG_danm) - ++gEventQueueLogPPLevel; - if ((gEventQueueLogQueue != mEventQueue || gEventQueueLogThread != PR_GetCurrentThread() || - gEventQueueLogCount != gEventQueueLogPPCount) && gEventQueueLogPPLevel == 1) { - PR_LOG(gEventQueueLog, PR_LOG_DEBUG, - ("EventQueue: Process pending [queue=%lx, accept=%d, could=%d]", - (long)mEventQueue,(int)mAcceptingEvents,(int)mCouldHaveEvents)); - gEventQueueLogPPCount = ++gEventQueueLogCount; - gEventQueueLogQueue = mEventQueue; - gEventQueueLogThread = PR_GetCurrentThread(); - } -#endif - PL_ProcessPendingEvents(mEventQueue); - - // if we're no longer accepting events and there are still events in the - // queue, then process remaining events. - if (!mAcceptingEvents && PL_EventAvailable(mEventQueue)) - PL_ProcessPendingEvents(mEventQueue); - - CheckForDeactivation(); - - if (mElderQueue) { - nsCOMPtr elder(do_QueryInterface(mElderQueue)); - if (elder) - elder->ProcessPendingEvents(); - } -#if defined(PR_LOGGING) && defined(DEBUG_danm) - --gEventQueueLogPPLevel; -#endif - return NS_OK; -} - -NS_IMETHODIMP -nsEventQueueImpl::EventLoop() -{ - PRBool correctThread = PL_IsQueueOnCurrentThread(mEventQueue); - - NS_ASSERTION(correctThread, "attemping to process events on the wrong thread"); - - if (!correctThread) - return NS_ERROR_FAILURE; - - PL_EventLoop(mEventQueue); - return NS_OK; -} - -NS_IMETHODIMP -nsEventQueueImpl::EventAvailable(PRBool& aResult) -{ - aResult = PL_EventAvailable(mEventQueue); - return NS_OK; -} - -NS_IMETHODIMP -nsEventQueueImpl::GetEvent(PLEvent** aResult) -{ - *aResult = PL_GetEvent(mEventQueue); - CheckForDeactivation(); - return NS_OK; -} - -NS_IMETHODIMP -nsEventQueueImpl::HandleEvent(PLEvent* aEvent) -{ - PRBool correctThread = PL_IsQueueOnCurrentThread(mEventQueue); - NS_ASSERTION(correctThread, "attemping to process events on the wrong thread"); - if (!correctThread) - return NS_ERROR_FAILURE; - -#if defined(PR_LOGGING) && defined(DEBUG_danm) - PR_LOG(gEventQueueLog, PR_LOG_DEBUG, - ("EventQueue: handle event [queue=%lx, accept=%d, could=%d]", - (long)mEventQueue,(int)mAcceptingEvents,(int)mCouldHaveEvents)); - ++gEventQueueLogCount; -#endif - PL_HandleEvent(aEvent); - return NS_OK; -} - -NS_IMETHODIMP -nsEventQueueImpl::WaitForEvent(PLEvent** aResult) -{ - PRBool correctThread = PL_IsQueueOnCurrentThread(mEventQueue); - NS_ASSERTION(correctThread, "attemping to process events on the wrong thread"); - if (!correctThread) - return NS_ERROR_FAILURE; - -#if defined(PR_LOGGING) && defined(DEBUG_danm) -PR_LOG(gEventQueueLog, PR_LOG_DEBUG, - ("EventQueue: wait for event [queue=%lx, accept=%d, could=%d]", - (long)mEventQueue,(int)mAcceptingEvents,(int)mCouldHaveEvents)); -++gEventQueueLogCount; -#endif - *aResult = PL_WaitForEvent(mEventQueue); - CheckForDeactivation(); - return NS_OK; -} - -NS_IMETHODIMP_(PRInt32) -nsEventQueueImpl::GetEventQueueSelectFD() -{ - return PL_GetEventQueueSelectFD(mEventQueue); -} - -NS_METHOD -nsEventQueueImpl::Create(nsISupports *aOuter, - REFNSIID aIID, - void **aResult) -{ - nsEventQueueImpl* evt = new nsEventQueueImpl(); - if (evt == NULL) - return NS_ERROR_OUT_OF_MEMORY; - nsresult rv = evt->QueryInterface(aIID, aResult); - if (NS_FAILED(rv)) { - delete evt; } return rv; } - -// ---------------- nsPIEventQueueChain ----------------- - -NS_IMETHODIMP -nsEventQueueImpl::AppendQueue(nsIEventQueue *aQueue) -{ - nsresult rv; - nsCOMPtr end; - nsCOMPtr queueChain(do_QueryInterface(aQueue)); - - if (!aQueue) - return NS_ERROR_NO_INTERFACE; - -/* this would be nice - NS_ASSERTION(aQueue->mYoungerQueue == NULL && aQueue->mElderQueue == NULL, - "event queue repeatedly appended to queue chain"); -*/ - rv = NS_ERROR_NO_INTERFACE; - -#ifdef NS_DEBUG - int depth = 0; - nsEventQueueImpl *next = this; - while (next && depth < 100) { - next = NS_STATIC_CAST(nsEventQueueImpl *, next->mYoungerQueue); - ++depth; - } - if (depth > 5) { - char warning[80]; - PR_snprintf(warning, sizeof(warning), - "event queue chain length is %d. this is almost certainly a leak.", depth); - NS_WARNING(warning); - } -#endif - - // (be careful doing this outside nsEventQueueService's mEventQMonitor) - - GetYoungest(getter_AddRefs(end)); - nsCOMPtr endChain(do_QueryInterface(end)); - if (endChain) { - endChain->SetYounger(queueChain); - queueChain->SetElder(endChain); - rv = NS_OK; - } - return rv; -} - -NS_IMETHODIMP -nsEventQueueImpl::Unlink() -{ - nsCOMPtr young = mYoungerQueue, - old = mElderQueue; - -#if defined(PR_LOGGING) && defined(DEBUG_danm) - PR_LOG(gEventQueueLog, PR_LOG_DEBUG, - ("EventQueue: unlink [queue=%lx, younger=%lx, elder=%lx]", - (long)mEventQueue,(long)mYoungerQueue, (long)mElderQueue.get())); - ++gEventQueueLogCount; -#endif - - // this is probably OK, but shouldn't happen by design, so tell me if it does - NS_ASSERTION(!mYoungerQueue, "event queue chain broken in middle"); - - // break links early in case the Release cascades back onto us - mYoungerQueue = nsnull; - mElderQueue = nsnull; - - if (young) - young->SetElder(old); - if (old) { - old->SetYounger(young); - } - return NS_OK; -} - -NS_IMETHODIMP -nsEventQueueImpl::GetYoungest(nsIEventQueue **aQueue) -{ - if (mYoungerQueue) - return mYoungerQueue->GetYoungest(aQueue); - - nsIEventQueue *answer = NS_STATIC_CAST(nsIEventQueue *, this); - NS_ADDREF(answer); - *aQueue = answer; - return NS_OK; -} - -NS_IMETHODIMP -nsEventQueueImpl::GetYoungestActive(nsIEventQueue **aQueue) -{ - nsCOMPtr answer; - - if (mYoungerQueue) - mYoungerQueue->GetYoungestActive(getter_AddRefs(answer)); - if (!answer) { - if (mAcceptingEvents && mCouldHaveEvents) - answer = NS_STATIC_CAST(nsIEventQueue *, this); - } - *aQueue = answer; - NS_IF_ADDREF(*aQueue); - return NS_OK; -} - -NS_IMETHODIMP -nsEventQueueImpl::GetYoungestActiveProxyTagged(PRThread *aThread, - nsIEventQueue **aQueue) -{ - nsCOMPtr answer; - - if (mYoungerQueue) - mYoungerQueue->GetYoungestActiveProxyTagged(aThread, - getter_AddRefs(answer)); - if (!answer) { - if (mAcceptingEvents && mCouldHaveEvents && (mProxyThreadTag == aThread)) - answer = NS_STATIC_CAST(nsIEventQueue *, this); - } - *aQueue = answer; - NS_IF_ADDREF(*aQueue); - return NS_OK; -} - -NS_IMETHODIMP -nsEventQueueImpl::SetYounger(nsPIEventQueueChain *aQueue) -{ - mYoungerQueue = aQueue; - return NS_OK; -} - -NS_IMETHODIMP -nsEventQueueImpl::SetElder(nsPIEventQueueChain *aQueue) -{ - mElderQueue = aQueue; - return NS_OK; -} - -NS_IMETHODIMP -nsEventQueueImpl::GetYounger(nsIEventQueue **aQueue) -{ - if (!mYoungerQueue) { - *aQueue = nsnull; - return NS_OK; - } - return mYoungerQueue->QueryInterface(NS_GET_IID(nsIEventQueue), (void**)&aQueue); -} - -NS_IMETHODIMP -nsEventQueueImpl::GetElder(nsIEventQueue **aQueue) -{ - if (!mElderQueue) { - *aQueue = nsnull; - return NS_OK; - } - return mElderQueue->QueryInterface(NS_GET_IID(nsIEventQueue), (void**)&aQueue); -} - -NS_IMETHODIMP -nsEventQueueImpl::RevokeEventsInternal(void* aOwner) -{ - PL_RevokeEvents(mEventQueue, aOwner); - if (mElderQueue) { - mElderQueue->RevokeEventsInternal(aOwner); - } - return NS_OK; -} diff --git a/mozilla/xpcom/threads/nsEventQueue.h b/mozilla/xpcom/threads/nsEventQueue.h index f69c3fac6d2..4f019aa3345 100644 --- a/mozilla/xpcom/threads/nsEventQueue.h +++ b/mozilla/xpcom/threads/nsEventQueue.h @@ -1,4 +1,5 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * @@ -12,19 +13,18 @@ * for the specific language governing rights and limitations under the * License. * - * The Original Code is Mozilla Communicator client code. + * The Original Code is Mozilla code. * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 + * The Initial Developer of the Original Code is Google Inc. + * Portions created by the Initial Developer are Copyright (C) 2006 * the Initial Developer. All Rights Reserved. * * Contributor(s): - * Pierre Phaneuf + * Darin Fisher * * Alternatively, the contents of this file may be used under the terms of - * either of the GNU General Public License Version 2 or later (the "GPL"), - * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to @@ -36,47 +36,88 @@ * * ***** END LICENSE BLOCK ***** */ -#include "prmon.h" -#include "nsIEventQueue.h" -#include "nsPIEventQueueChain.h" +#ifndef nsEventQueue_h__ +#define nsEventQueue_h__ -class nsEventQueueImpl : public nsPIEventQueueChain +#include +#include "prmon.h" +#include "nsIRunnable.h" + +// A threadsafe FIFO event queue... +class NS_COM nsEventQueue { public: - nsEventQueueImpl(); + nsEventQueue(); + ~nsEventQueue(); - NS_DECL_ISUPPORTS - NS_DECL_NSIEVENTTARGET - NS_DECL_NSIEVENTQUEUE + // Returns "true" if the event queue has been completely constructed. + PRBool IsInitialized() { return mMonitor != nsnull; } - // Helpers - static NS_METHOD Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr); + // This method adds a new event to the pending event queue. The event object + // is AddRef'd if this method succeeds. This method returns PR_TRUE if the + // event was stored in the event queue, and it returns PR_FALSE if it could + // not allocate sufficient memory. + PRBool PutEvent(nsIRunnable *event); - static const nsCID& CID() { static nsCID cid = NS_EVENTQUEUE_CID; return cid; } + // This method gets an event from the event queue. If mayWait is true, then + // the method will block the calling thread until an event is available. If + // the event is null, then the method returns immediately indicating whether + // or not an event is pending. When the resulting event is non-null, the + // caller is responsible for releasing the event object. This method does + // not alter the reference count of the resulting event. + PRBool GetEvent(PRBool mayWait, nsIRunnable **event); - // nsPIEventQueueChain interface - NS_IMETHOD AppendQueue(nsIEventQueue *aQueue); - NS_IMETHOD Unlink(); - NS_IMETHOD GetYoungest(nsIEventQueue **aQueue); - NS_IMETHOD GetYoungestActive(nsIEventQueue **aQueue); - NS_IMETHOD GetYoungestActiveProxyTagged(PRThread *aThread, nsIEventQueue **aQueue); - NS_IMETHOD SetYounger(nsPIEventQueueChain *aQueue); - NS_IMETHOD GetYounger(nsIEventQueue **aQueue); - NS_IMETHOD SetElder(nsPIEventQueueChain *aQueue); - NS_IMETHOD GetElder(nsIEventQueue **aQueue); - NS_IMETHOD RevokeEventsInternal(void* aOwner); + // This method returns true if there is a pending event. + PRBool HasPendingEvent() { + return GetEvent(PR_FALSE, nsnull); + } + + // This method returns the next pending event or null. + PRBool GetPendingEvent(nsIRunnable **runnable) { + return GetEvent(PR_FALSE, runnable); + } + + // This method waits for and returns the next pending event. + PRBool WaitPendingEvent(nsIRunnable **runnable) { + return GetEvent(PR_TRUE, runnable); + } + + // Expose the event queue's monitor for "power users" + PRMonitor *Monitor() { + return mMonitor; + } private: - ~nsEventQueueImpl(); - PLEventQueue *mEventQueue; - PRBool mAcceptingEvents, // accept new events or pass them on? - mCouldHaveEvents; // accepting new ones, or still have old ones? - nsCOMPtr mElderQueue; // younger can hold on to elder - nsPIEventQueueChain *mYoungerQueue; // but elder can't hold on to younger + PRBool IsEmpty() { + return !mHead || (mHead == mTail && mOffsetHead == mOffsetTail); + } - PRThread *mProxyThreadTag; // do we accept proxy events from the given thread? - - void NotifyObservers(const char *aTopic); - void CheckForDeactivation(); + enum { EVENTS_PER_PAGE = 250 }; + + // Page objects are linked together to form a simple deque. + + struct Page; friend struct Page; // VC6! + struct Page { + struct Page *mNext; + nsIRunnable *mEvents[EVENTS_PER_PAGE]; + }; + + static Page *NewPage() { + return NS_STATIC_CAST(Page *, calloc(1, sizeof(Page))); + } + + static void FreePage(Page *p) { + free(p); + } + + PRMonitor *mMonitor; + + Page *mHead; + Page *mTail; + + PRUint16 mOffsetHead; // offset into mHead where next item is removed + PRUint16 mOffsetTail; // offset into mTail where next item is added }; + +#endif // nsEventQueue_h__ diff --git a/mozilla/zap/base/AsyncUtils.js b/mozilla/zap/base/AsyncUtils.js index 64b6a5e2427..052b5788924 100644 --- a/mozilla/zap/base/AsyncUtils.js +++ b/mozilla/zap/base/AsyncUtils.js @@ -38,7 +38,7 @@ Components.utils.importModule("gre:FunctionUtils.js"); -EXPORTED_SYMBOLS = [ "getUIEventQ", +EXPORTED_SYMBOLS = [ "getMainThread", "makeOneShotTimer", "resetOneShotTimer", "schedule", @@ -50,13 +50,13 @@ var _doc_ = {}; //////////////////////////////////////////////////////////////////////// -// Event queues +// Threads -var getEventQService = makeServiceGetter("@mozilla.org/event-queue-service;1", - Components.interfaces.nsIEventQueueService); +var getThreadManager = makeServiceGetter("@mozilla.org/thread-manager;1", + Components.interfaces.nsIThreadManager); -function getUIEventQ() { - return getEventQService().getSpecialEventQueue(Components.interfaces.nsIEventQueueService.UI_THREAD_EVENT_QUEUE); +function getMainThread() { + return getThreadManager().mainThread; } //////////////////////////////////////////////////////////////////////// diff --git a/mozilla/zap/netutils/src/zapStunResolver.js b/mozilla/zap/netutils/src/zapStunResolver.js index beeefbf860f..83bf1453c1d 100644 --- a/mozilla/zap/netutils/src/zapStunResolver.js +++ b/mozilla/zap/netutils/src/zapStunResolver.js @@ -119,7 +119,7 @@ zapStunResolver.fun( else this.defaultPort = 3478; // firstly look up the stun server address: - getDNSService().asyncResolve(host, 0, this, getUIEventQ()); + getDNSService().asyncResolve(host, 0, this, getMainThread()); // -> onLookupComplete }); diff --git a/mozilla/zap/sip/SipResolver.js b/mozilla/zap/sip/SipResolver.js index df39d156f3f..288a4fa8311 100644 --- a/mozilla/zap/sip/SipResolver.js +++ b/mozilla/zap/sip/SipResolver.js @@ -93,7 +93,7 @@ SipResolver.fun( } }; - getDNSService().asyncResolve(uri.host, 0, dnsListener, getSIPEventQ()); + getDNSService().asyncResolve(uri.host, 0, dnsListener, getSIPThread()); }); diff --git a/mozilla/zap/sip/SipUtils.js b/mozilla/zap/sip/SipUtils.js index c06a3f5ea15..5c45674938b 100644 --- a/mozilla/zap/sip/SipUtils.js +++ b/mozilla/zap/sip/SipUtils.js @@ -48,7 +48,7 @@ Components.utils.importModule("gre:FunctionUtils.js"); Components.utils.importModule("gre:AsyncUtils.js"); EXPORTED_SYMBOLS = ["BRANCH_COOKIE", - "getSIPEventQ", + "getSIPThread", "getProxyOnSIPThread", "gSyntaxFactory", "getDNSService", @@ -84,7 +84,7 @@ var BRANCH_COOKIE = "z9hG4bK"; // The SIP stack runs on the main UI thread; handing off to other // threads for asynchronous actions, such as sending data or querying // dns. -var getSIPEventQ = getUIEventQ; // from AsyncUtils.js +var getSIPThread = getMainThread; // from AsyncUtils.js // Some of our objects need to be manually proxied so that they only // get called on the main SIP thread, @@ -95,12 +95,15 @@ var getSIPEventQ = getUIEventQ; // from AsyncUtils.js // QueryInterface in js though, because we want to be able to call // js objects transparently from js or c++. function getProxyOnSIPThread(aObject, aInterface) { - var proxyManager = Components. classes["@mozilla.org/xpcomproxy;1"]. - getService(Components.interfaces.nsIProxyObjectManager); + var IProxyManager = Components.interfaces.nsIProxyManager; + + var proxyManager = Components. classes["@mozilla.org/xpcomproxy;1"]. + getService(IProxyManager); - return proxyManager.getProxyForObject(getSIPEventQ(), - aInterface, aObject, 5); - // 5 == PROXY_ALWAYS | PROXY_SYNC + return proxyManager.getProxyForObject(getSIPThread(), + aInterface, aObject, + IProxyManager.INVOKE_SYNC | + IProxyManager.FORCE_PROXY_CREATION); } diff --git a/mozilla/zap/zmk/src/zapAudioIO.cpp b/mozilla/zap/zmk/src/zapAudioIO.cpp index 5cc24348156..8587c2aca88 100644 --- a/mozilla/zap/zmk/src/zapAudioIO.cpp +++ b/mozilla/zap/zmk/src/zapAudioIO.cpp @@ -202,7 +202,7 @@ zapAudioIO::AddedToGraph(zapIMediaGraph *graph, // down. mGraph = graph; - graph->GetEventQueue(getter_AddRefs(mEventQ)); + graph->GetEventTarget(getter_AddRefs(mEventTarget)); // node parameter defaults: mInputDevice = Pa_GetDefaultInputDeviceID(); @@ -246,7 +246,7 @@ zapAudioIO::RemovedFromGraph(zapIMediaGraph *graph) printf("(audioio removed from graph)"); #endif CloseStream(); - mEventQ = nsnull; + mEventTarget = nsnull; return NS_OK; } @@ -417,19 +417,18 @@ int AudioIOCallback(void* inputBuffer, void* outputBuffer, { zapAudioIO* audioio = (zapAudioIO*)userData; - audioio->mEventQ->EnterMonitor(); - void* result=(void*)PR_FALSE; + //audioio->mEventQ->EnterMonitor(); // only post event if we're still supposed to be running: // (otherwise we might end in deadlock) if (audioio->mKeepRunning) { zapAudioIOEvent* ev = new zapAudioIOEvent(audioio, outTime, inputBuffer, outputBuffer); - audioio->mEventQ->PostSynchronousEvent(ev, &result); + audioio->mEventTarget->Dispatch(ev, NS_DISPATCH_SYNC); } - audioio->mEventQ->ExitMonitor(); + //audioio->mEventQ->ExitMonitor(); - // stop stream if event was cancelled or mKeepRunning is false - return (result==(void*)PR_TRUE ? 0 : 1); + // stop stream if mKeepRunning is false + return !mKeepRunning; } //---------------------------------------------------------------------- diff --git a/mozilla/zap/zmk/src/zapAudioIO.h b/mozilla/zap/zmk/src/zapAudioIO.h index 48dfe49821d..4360694bdda 100644 --- a/mozilla/zap/zmk/src/zapAudioIO.h +++ b/mozilla/zap/zmk/src/zapAudioIO.h @@ -45,7 +45,7 @@ #include "zapIAudioIO.h" #include "nsCOMPtr.h" #include "portaudio.h" -#include "nsIEventQueue.h" +#include "nsIEventTarget.h" #include "nsIWritablePropertyBag2.h" #include "zapAudioStreamUtils.h" @@ -91,7 +91,7 @@ private: void CloseStream(); nsCOMPtr mGraph; - nsCOMPtr mEventQ; // media graph event queue + nsCOMPtr mEventTarget; // media graph event target // node parameters (set in zapIMediaGraph::AddNode()): PRUint32 mBuffers; // number of internal port audio buffers (>=2) diff --git a/mozilla/zap/zmk/src/zapAudioIn.cpp b/mozilla/zap/zmk/src/zapAudioIn.cpp index d9224c97bb5..200298714c1 100644 --- a/mozilla/zap/zmk/src/zapAudioIn.cpp +++ b/mozilla/zap/zmk/src/zapAudioIn.cpp @@ -42,6 +42,19 @@ #include "nsIProxyObjectManager.h" #include "nsAutoLock.h" +/////////////////////////////////////////////////////////////////////// +// zapAudioInEvent + +NS_IMETHODIMP +zapAudioInEvent::Run() +{ + if (!mAudioIn) return NS_OK; + + mAudioIn->CreateFrame(data, timestamp); + mAudioIn->AudioInEventDone(); + return NS_OK; +} + //////////////////////////////////////////////////////////////////////// // zapAudioIn @@ -103,7 +116,7 @@ zapAudioIn::AddedToGraph(zapIMediaGraph *graph, // down. mGraph = graph; - graph->GetEventQueue(getter_AddRefs(mEventQ)); + graph->GetEventTarget(getter_AddRefs(mEventTarget)); // node parameter defaults: mInputDevice = Pa_GetDefaultInputDeviceID(); @@ -144,7 +157,7 @@ zapAudioIn::RemovedFromGraph(zapIMediaGraph *graph) printf("(audioin removed from graph)"); #endif Stop(); - mEventQ = nsnull; + mEventTarget = nsnull; return NS_OK; } @@ -211,7 +224,7 @@ zapAudioIn::ProduceFrame(zapIMediaFrame ** frame) NS_IMETHODIMP zapAudioIn::Play() { - if (!mEventQ) + if (!mEventTarget) return NS_ERROR_FAILURE; if (!mStream) @@ -245,34 +258,6 @@ zapAudioIn::GetDefaultInputDevice(zapIAudioDevice * *aDefaultInputDevice) //---------------------------------------------------------------------- // portaudio audio source callback: -class zapAudioInSendEvent : public PLEvent -{ -public: - zapAudioInSendEvent(zapAudioIn* audioin) - { - PL_InitEvent(this, audioin, EventHandler, EventCleanup); - } - - PR_STATIC_CALLBACK(void *) EventHandler(PLEvent* ev) - { - zapAudioInSendEvent* rev = (zapAudioInSendEvent*) ev; - zapAudioIn* audioin = (zapAudioIn*) ev->owner; - - audioin->CreateFrame(rev->data, rev->timestamp); - - return (void*)PR_TRUE; - } - - PR_STATIC_CALLBACK(void) EventCleanup(PLEvent* ev) - { - delete (zapAudioInSendEvent*) ev; - } - - nsCString data; - double timestamp; -}; - - int AudioInCallback(void* inputBuffer, void* outputBuffer, unsigned long framesPerBuffer, PaTimestamp outTime, void* userData) @@ -293,21 +278,20 @@ int AudioInCallback(void* inputBuffer, void* outputBuffer, } // Post the frame. We need to do this synchronously to pace the callback. - audioin->mEventQ->EnterMonitor(); + + // XXX We should really enter the event queue's monitor here // Unlock the callback lock, so that the stream can be closed while // we're waiting for the event. It is important to do this AFTER // entering the eventQ monitor but BEFORE posting, to coordinate the // request revocation in CloseStream() lock.unlock(); - zapAudioInSendEvent* ev = new zapAudioInSendEvent(audioin); + nsRefPtr ev = new zapAudioInEvent(audioin); PRUint32 bufferLength = audioin->mStreamParameters.GetSamplesPerFrame() * GetPortAudioSampleSize(audioin->mStreamParameters.sample_format); ev->data.SetLength(bufferLength); memcpy(ev->data.BeginWriting(), inputBuffer, bufferLength); ev->timestamp = outTime; - void* result; - audioin->mEventQ->PostSynchronousEvent(ev, &result); - audioin->mEventQ->ExitMonitor(); + audioin->mEventTarget->Dispatch(ev, NS_DISPATCH_SYNC); #ifdef DEBUG_afri_zmk // printf("}"); @@ -365,9 +349,7 @@ void zapAudioIn::CloseStream() mKeepRunning = PR_FALSE; lock.unlock(); // cancel any outstanding CreateFrame() notifications: - mEventQ->EnterMonitor(); - mEventQ->RevokeEvents(this); - mEventQ->ExitMonitor(); + mEvent.Revoke(); Pa_CloseStream(mStream); mStream = nsnull; @@ -403,3 +385,8 @@ void zapAudioIn::CreateFrame(const nsACString& data, double timestamp) mOutput->ConsumeFrame(frame); } + +void zapAudioIn::AudioInEventDone() +{ + mEvent.Forget(); +} diff --git a/mozilla/zap/zmk/src/zapAudioIn.h b/mozilla/zap/zmk/src/zapAudioIn.h index 0f1f44a4307..ff5b2302c3f 100644 --- a/mozilla/zap/zmk/src/zapAudioIn.h +++ b/mozilla/zap/zmk/src/zapAudioIn.h @@ -45,9 +45,36 @@ #include "zapIAudioIn.h" #include "nsCOMPtr.h" #include "portaudio.h" -#include "nsIEventQueue.h" #include "nsIWritablePropertyBag2.h" #include "zapAudioStreamUtils.h" +#include "nsThreadUtils.h" + +class zapAudioIn; + +//////////////////////////////////////////////////////////////////////// +// zapAudioInEvent +// revocable event helper class + +class zapAudioInEvent : public nsRunnable +{ +public: + zapAudioInEvent(zapAudioIn* audioin) + : mAudioIn(audioin) + { + } + + NS_IMETHOD Run(); + + void Revoke() { + mAudioIn = nsnull; + } + + nsCString data; + double timestamp; + +private: + zapAudioIn *mAudioIn; // weak ref +}; //////////////////////////////////////////////////////////////////////// // zapAudioIn @@ -72,9 +99,14 @@ public: NS_DECL_ZAPIAUDIOIN private: + friend class zapAudioInEvent; + nsRevocableEventPtr mEvent; + nsresult StartStream(); void CloseStream(); + void CreateFrame(const nsACString& data, double timestamp); + void AudioInEventDone(); // node parameters (set from zapIMediaGraph::AddNode()): PaDeviceID mInputDevice; @@ -86,9 +118,8 @@ private: nsCOMPtr mStreamInfo; nsCOMPtr mGraph; // media graph in which this node lives - nsCOMPtr mEventQ; // media graph event queue + nsCOMPtr mEventTarget; // media graph event target - friend class zapAudioInSendEvent; friend int AudioInCallback(void* inputBuffer, void* outputBuffer, unsigned long framesPerBuffer, PaTimestamp outTime, void* userData); diff --git a/mozilla/zap/zmk/src/zapAudioOut.h b/mozilla/zap/zmk/src/zapAudioOut.h index 4db6100cd9f..a4a838cac66 100644 --- a/mozilla/zap/zmk/src/zapAudioOut.h +++ b/mozilla/zap/zmk/src/zapAudioOut.h @@ -45,7 +45,7 @@ #include "zapIAudioOut.h" #include "nsCOMPtr.h" #include "portaudio.h" -#include "nsIEventQueue.h" +#include "nsIEventTarget.h" #include "nsIPropertyBag2.h" #include "zapAudioStreamUtils.h" @@ -83,7 +83,7 @@ private: void CloseStream(); nsCOMPtr mGraph; - nsCOMPtr mEventQ; // media graph event queue + nsCOMPtr mEventTarget; // media graph event target // node parameters (set in zapIMediaGraph::AddNode()): PaDeviceID mOutputDevice; diff --git a/mozilla/zap/zmk/src/zapIMediaGraph.idl b/mozilla/zap/zmk/src/zapIMediaGraph.idl index 22789682d6d..f35134e1444 100644 --- a/mozilla/zap/zmk/src/zapIMediaGraph.idl +++ b/mozilla/zap/zmk/src/zapIMediaGraph.idl @@ -36,7 +36,7 @@ #include "nsISupports.idl" interface nsIPropertyBag2; -interface nsIEventQueue; +interface nsIEventTarget; /** * \defgroup ZMK_MODULE ZAP Media Kit (ZMK) module @@ -77,9 +77,9 @@ interface zapIMediaGraph : nsISupports void shutdown(); /** - * The event queue for this media graph + * The event target for this media graph */ - readonly attribute nsIEventQueue eventQueue; + readonly attribute nsIEventTarget eventTarget; }; %{ C++ diff --git a/mozilla/zap/zmk/src/zapMediaGraph.cpp b/mozilla/zap/zmk/src/zapMediaGraph.cpp index adf2117e1f3..482f9fa6c40 100644 --- a/mozilla/zap/zmk/src/zapMediaGraph.cpp +++ b/mozilla/zap/zmk/src/zapMediaGraph.cpp @@ -159,7 +159,7 @@ zapMediaGraph::Run() if (!eventQService) return NS_ERROR_FAILURE; #ifdef SAME_THREAD_MEDIA_GRAPH - eventQService->GetSpecialEventQueue(nsIEventQueueService::CURRENT_THREAD_EVENT_QUEUE, getter_AddRefs(mEventQ)); + eventQService->GetSpecialEventQueue(nsIEventQueueService::CURRENT_THREAD_EVENT_QUEUE, getter_AddRefs(mEventTarget)); #else // create an event queue: eventQService->CreateFromIThread(mMediaThread, PR_FALSE, @@ -493,12 +493,12 @@ zapMediaGraph::Shutdown() return NS_OK; } -/* readonly attribute nsIEventQueue eventQueue; */ +/* readonly attribute nsIEventTarget eventTarget; */ NS_IMETHODIMP -zapMediaGraph::GetEventQueue(nsIEventQueue * *aEventQueue) +zapMediaGraph::GetEventTarget(nsIEventTarget * *aEventTarget) { - *aEventQueue = mEventQ; - NS_IF_ADDREF(*aEventQueue); + *aEventTarget = mEventTarget; + NS_IF_ADDREF(*aEventTarget); return NS_OK; } @@ -526,12 +526,12 @@ NS_IMETHODIMP ConstructMediaGraph(nsISupports *aOuter, REFNSIID aIID, NS_ADDREF(mediaGraph); nsCOMPtr mediaThread; - nsCOMPtr eventQ; + nsCOMPtr eventTarget; #ifdef SAME_THREAD_MEDIA_GRAPH nsIThread::GetCurrent(getter_AddRefs(mediaThread)); eventQService->GetSpecialEventQueue(nsIEventQueueService::CURRENT_THREAD_EVENT_QUEUE, - getter_AddRefs(eventQ)); + getter_AddRefs(eventTarget)); // For the 'SAME THREAD' case, Run() doesn't go into an event loop, // but it still has to be called to initialize the media graph: rv = mediaGraph->Run(); @@ -565,8 +565,7 @@ NS_IMETHODIMP ConstructMediaGraph(nsISupports *aOuter, REFNSIID aIID, // Return a proxy for the media graph: rv = NS_GetProxyForObject(eventQ, aIID, mediaGraph, - PROXY_SYNC | PROXY_ALWAYS | PROXY_AUTOPROXIFY | - PROXY_NESTED_QUEUES + PROXY_SYNC | PROXY_ALWAYS | PROXY_AUTOPROXIFY /* | PROXY_ISUPPORTS */, result); if (NS_FAILED(rv)) { diff --git a/mozilla/zap/zmk/src/zapMediaGraph.h b/mozilla/zap/zmk/src/zapMediaGraph.h index 3c171429868..20428abdfef 100644 --- a/mozilla/zap/zmk/src/zapMediaGraph.h +++ b/mozilla/zap/zmk/src/zapMediaGraph.h @@ -38,7 +38,7 @@ #define __ZAP_MEDIAGRAPH_H__ #include "zapIMediaGraph.h" -#include "nsIEventQueue.h" +#include "nsIEventTarget.h" #include "nsIThread.h" #include "nsIRunnable.h" #include "nsCOMPtr.h" @@ -134,7 +134,7 @@ private: void RemoveNodeDescriptorConnections(NodeDescriptor* d); nsCOMPtr mMediaThread; - nsCOMPtr mEventQ; + nsCOMPtr mEventTarget; PRBool mPumpingEvents; PRUint32 mNodeIdCounter; PRUint32 mConnectionIdCounter; diff --git a/mozilla/zap/zmk/src/zapStunClient.cpp b/mozilla/zap/zmk/src/zapStunClient.cpp index 78584f6cf87..d834f4c2cea 100644 --- a/mozilla/zap/zmk/src/zapStunClient.cpp +++ b/mozilla/zap/zmk/src/zapStunClient.cpp @@ -38,7 +38,7 @@ #include "nsIServiceManager.h" #include "nsIDNSService.h" #include "nsIDNSRecord.h" -#include "nsIEventQueue.h" +#include "nsIEventTarget.h" #include "zapMediaUtils.h" #include "zapDatagramFrame.h" #include "nsICancelable.h" @@ -151,7 +151,7 @@ zapStunBindingRequest::Init(zapStunClient* stunClient, } // XXX SRV lookup - nsCOMPtr eventQ; + nsCOMPtr eventTarget; stunClient->mGraph->GetEventQueue(getter_AddRefs(eventQ)); nsCOMPtr dnsService = do_GetService("@mozilla.org/network/dns-service;1"); if (NS_FAILED(dnsService->AsyncResolve(mStunServerAddress, 0, this, diff --git a/mozilla/zap/zmk/src/zapStunServer.cpp b/mozilla/zap/zmk/src/zapStunServer.cpp index db278752c6a..3ce6be47eaa 100644 --- a/mozilla/zap/zmk/src/zapStunServer.cpp +++ b/mozilla/zap/zmk/src/zapStunServer.cpp @@ -38,7 +38,7 @@ #include "nsIServiceManager.h" #include "nsIDNSService.h" #include "nsIDNSRecord.h" -#include "nsIEventQueue.h" +#include "nsIEventTarget.h" #include "zapMediaUtils.h" #include "zapDatagramFrame.h"