From 0386eaf366c6ee6bcf0daae5ec63a0cc298421e1 Mon Sep 17 00:00:00 2001 From: "seawood%netscape.com" Date: Fri, 26 Oct 2001 08:36:28 +0000 Subject: [PATCH] Massive reorganization of configure options into logical groups. The following options were renamed: --with-jpeg --with-system-jpeg --with-zlib --with-system-zlib --with-png --with-system-png --with-mng --with-system-mng --enable-toolkit --enable-default-toolkit --with-gtk --enable-toolkit-gtk --with-xlib --enable-toolkit-xlib --with-qt --enable-toolkit-qt --enable-gle --enable-gle-support --with-extensions --enable-extensions --enable-modules --enable-standalone-modules --enable-lea --enable-xpcom-lea --enable-ultrasparc --enable-js-ultrasparc --enable-strip-libs --enable-strip --with-debug-modules --enable-debug-modules --with-dbgrinfo-modules --enable-debugger-info-modules --with-profile-modules --enable-profile-modules --enable-eazel-profiler --enable-eazel-profiler-support --enable-homedir --with-user-appdir --enable-static-components --enable-meta-component-modules The following options were removed: --enable-monolithic-toolkit --disable-jar-packaging zip is now required to build since NSS unconditionally requires it. Bug #61907 --- config/autoconf.mk.in | 11 +- config/rules.mk | 13 +- configure | 11466 ++++++++++++++-------------- configure.in | 3293 ++++---- webshell/tests/viewer/Makefile.in | 13 +- 5 files changed, 7188 insertions(+), 7608 deletions(-) diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index d42df6b1cddd..814cbf2a5ff9 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -28,17 +28,11 @@ BUILD_MODULES = @BUILD_MODULES@ DIST = $(DEPTH)/dist -MOZ_DISABLE_JAR_PACKAGING = @MOZ_DISABLE_JAR_PACKAGING@ MOZ_CHROME_FILE_FORMAT = @MOZ_CHROME_FILE_FORMAT@ MOZ_WIDGET_TOOLKIT = @MOZ_WIDGET_TOOLKIT@ MOZ_GFX_TOOLKIT = $(MOZ_WIDGET_TOOLKIT) -MOZ_MONOLITHIC_TOOLKIT = @MOZ_MONOLITHIC_TOOLKIT@ - -### XXX ### BROKEN MOZ_XLIBRGB_LDFLAGS = @MOZ_XLIBRGB_LDFLAGS@ -### XXX ### BROKEN MOZ_USING_XLIBRGB = @MOZ_USING_XLIBRGB@ - MOZ_JS_LIBS = @MOZ_JS_LIBS@ MOZ_UNICHARUTIL_LIBS = $(DIST)/lib/libunicharutil_s.$(LIB_SUFFIX) @@ -64,12 +58,10 @@ MOZ_XPCTOOLS = @MOZ_XPCTOOLS@ ENABLE_EAZEL_PROFILER=@ENABLE_EAZEL_PROFILER@ EAZEL_PROFILER_CFLAGS=@EAZEL_PROFILER_CFLAGS@ EAZEL_PROFILER_LIBS=@EAZEL_PROFILER_LIBS@ -DETECT_WEBSHELL_LEAKS = @DETECT_WEBSHELL_LEAKS@ GC_LEAK_DETECTOR = @GC_LEAK_DETECTOR@ NS_TRACE_MALLOC = @NS_TRACE_MALLOC@ USE_ELF_DYNSTR_GC = @USE_ELF_DYNSTR_GC@ MOZ_MAIL_NEWS = @MOZ_MAIL_NEWS@ -MOZ_BRPROF = @MOZ_BRPROF@ BUILD_SHARED_LIBS = @BUILD_SHARED_LIBS@ BUILD_STATIC_LIBS = @BUILD_STATIC_LIBS@ MOZ_STATIC_COMPONENTS = @MOZ_STATIC_COMPONENTS@ @@ -92,6 +84,8 @@ XPCOM_LIBS=@XPCOM_LIBS@ MOZ_REORDER=@MOZ_REORDER@ MOZ_TIMELINE=@MOZ_TIMELINE@ +ENABLE_STRIP = @ENABLE_STRIP@ + ClientWallet=1 CookieManagement=1 SingleSignon=1 @@ -190,6 +184,7 @@ HOST_LIBIDL_LIBS = @HOST_LIBIDL_LIBS@ TARGET_NSPR_MDCPUCFG = @TARGET_NSPR_MDCPUCFG@ TARGET_CPU = @TARGET_CPU@ +TARGET_VENDOR = @TARGET_VENDOR@ TARGET_OS = @TARGET_OS@ TARGET_MD_ARCH = @TARGET_MD_ARCH@ diff --git a/config/rules.mk b/config/rules.mk index 1619003759c7..c25e1cbe4077 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -662,11 +662,13 @@ ifeq ($(MOZ_OS2_TOOLS),VACPP) else ifeq ($(CPP_PROG_LINK),1) $(CCC) -o $@ $(CXXFLAGS) $(WRAP_MALLOC_CFLAGS) $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS) - $(MOZ_POST_PROGRAM_COMMAND) $@ else # ! CPP_PROG_LINK $(CC) -o $@ $(CFLAGS) $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) endif # CPP_PROG_LINK endif # OS2 +ifdef ENABLE_STRIP + $(STRIP) $@ +endif ifeq ($(OS_ARCH),BeOS) ifdef BEOS_PROGRAM_RESOURCE xres -o $@ $(BEOS_PROGRAM_RESOURCE) @@ -698,14 +700,15 @@ ifeq ($(MOZ_OS2_TOOLS),VACPP) else $(CCC) $(WRAP_MALLOC_CFLAGS) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS) endif - $(MOZ_POST_PROGRAM_COMMAND) $@ else ifeq ($(MOZ_OS2_TOOLS),VACPP) $(LD) /Out:$@ $< $(LDFLAGS) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS) else $(CC) $(WRAP_MALLOC_CFLAGS) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS) endif - $(MOZ_POST_PROGRAM_COMMAND) $@ +endif +ifdef ENABLE_STRIP + $(STRIP) $@ endif $(HOST_SIMPLE_PROGRAMS): host_%$(BIN_SUFFIX): %.ho $(HOST_EXTRA_DEPS) Makefile Makefile.in @@ -833,7 +836,9 @@ else endif endif # OS2 chmod +x $@ - $(MOZ_POST_DSO_LIB_COMMAND) $@ +ifdef ENABLE_STRIP + $(STRIP) $@ +endif ifeq ($(OS_ARCH),OS2) $(DLL): $(OBJS) $(EXTRA_LIBS) diff --git a/configure b/configure index a9264dc7a747..fc1932ed3df2 100755 --- a/configure +++ b/configure @@ -17,24 +17,38 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_default_prefix=`pwd`/dist -ac_help="$ac_help - --disable-gcc-pipe Disable -pipe check for gcc" ac_help="$ac_help --with-x use the X Window System" ac_help="$ac_help - --enable-toolkit=\$val Enable \$val fe (defaults to gtk)" + --with-pthreads Force use of system pthread library with NSPR " ac_help="$ac_help - --without-system-nspr Skip system installed NSPR checks" + --without-system-nspr Do not use system installed NSPR" ac_help="$ac_help --with-nspr-prefix=PFX Prefix where NSPR is installed" ac_help="$ac_help --with-nspr-exec-prefix=PFX Exec prefix where NSPR is installed" ac_help="$ac_help - --enable-xinerama Enable Xinerama support - ( not safe for Red Hat 7.0 ) " + --with-system-jpeg[=PFX] + Use installed libjpeg [installed at prefix PFX]" ac_help="$ac_help - --with-gtk Enable GTK+ support " + --with-system-zlib[=PFX] + Use installed libz [installed at prefix PFX]" +ac_help="$ac_help + --with-system-png[=PFX] + Use installed libpng [installed at prefix PFX]" +ac_help="$ac_help + --with-system-mng[=PFX] + Use installed libmng [installed at prefix PFX]" +ac_help="$ac_help + --enable-default-toolkit=TK + Select default toolkit (default=gtk)" +ac_help="$ac_help + --enable-toolkit-gtk Enable GTK+ toolkit support " +ac_help="$ac_help + --enable-toolkit-xlib Enable xlib toolkit support " +ac_help="$ac_help + --enable-toolkit-qt Enable Qt Toolkit support " ac_help="$ac_help --with-gtk-prefix=PFX Prefix where GTK is installed (optional)" ac_help="$ac_help @@ -43,23 +57,166 @@ ac_help="$ac_help ac_help="$ac_help --disable-gtktest Do not try to compile and run a test GTK program" ac_help="$ac_help - --with-java-supplement Enable Blackwood Java Code" -ac_help="$ac_help - --with-gle GLE support (for debugging gtk widgets) " + --enable-gle-support + GLE support (for debugging gtk widgets) " ac_help="$ac_help --with-static-gtk Link GTK statically if possible" -ac_help="$ac_help - --disable-xprint Disable Xprint support " -ac_help="$ac_help - --with-xlib Enable xlib support " -ac_help="$ac_help - --with-qt Enable Qt support " ac_help="$ac_help --with-qtdir=\$dir Specify Qt directory " ac_help="$ac_help --with-static-qt Link qt statically if possible" ac_help="$ac_help - --without-libIDL Skip check for libIDL" + --disable-mailnews Disable building of mail & news components" +ac_help="$ac_help + --disable-ldap Disable LDAP support" +ac_help="$ac_help + --disable-xprint Disable Xprint support " +ac_help="$ac_help + --enable-crypto Enable crypto support (Personal Security Manager)" +ac_help="$ac_help + --disable-jsd Disable JavaScript debug library" +ac_help="$ac_help + --enable-java-supplement + Enable Blackwood Java Code" +ac_help="$ac_help + --enable-xinerama Enable Xinerama support + ( not safe for Red Hat 7.0 ) " +ac_help="$ac_help + --disable-bidi Disable bi-directional support" +ac_help="$ac_help + --enable-ctl Enable Thai Complex Script support" +ac_help="$ac_help + --disable-accessibility Disable accessibility support" +ac_help="$ac_help + --enable-extensions Enable extensions" +ac_help="$ac_help + --enable-idlc Build idl tool " +ac_help="$ac_help + --enable-ldap-experimental + Enable LDAP experimental features" +ac_help="$ac_help + --enable-mathml Enable MathML " +ac_help="$ac_help + --enable-svg Enable SVG " +ac_help="$ac_help + --disable-tests Do not build test libraries & programs" +ac_help="$ac_help + --enable-xpcom-lea Enable Lea malloc in xpcom " +ac_help="$ac_help + --enable-js-ultrasparc Enable UltraSPARC optimizations in JS" +ac_help="$ac_help + --enable-leaky Enable leaky memory tool (needs mozilla/tools/leaky)" +ac_help="$ac_help + --enable-jprof Enable jprof profiling tool (needs mozilla/tools/jprof)" +ac_help="$ac_help + --enable-xpctools Build JS profiling tool (needs mozilla/js/src/xpconnect/tools)" +ac_help="$ac_help + --disable-debug Disable building with debug info" +ac_help="$ac_help + --enable-optimize[=OPT] Enable compiler optimizations (default=-O) " +ac_help="$ac_help + --enable-debug-modules Enable/disable debug info for specific modules" +ac_help="$ac_help + --enable-debugger-info-modules + Enable/disable debugger info for specific modules" +ac_help="$ac_help + --disable-dtd-debug Disable DTD debugging code in the parser" +ac_help="$ac_help + --enable-boehm Enable the Boehm Garbage Collector" +ac_help="$ac_help + --disable-logging Disable logging facilities" +ac_help="$ac_help + --enable-crash-on-assert + Make NS_ASSERTION crash on Unix" +ac_help="$ac_help + --enable-reorder Enable function reordering " +ac_help="$ac_help + --enable-logrefcnt Enable logging of refcounts (default=debug) " +ac_help="$ac_help + --enable-detect-webshell-leaks + Enable detection of webshell leaks + (default=debug)" +ac_help="$ac_help + --disable-double-buffer Disable double buffering" +ac_help="$ac_help + --enable-wrap-malloc Wrap malloc calls (gnu linker only)" +ac_help="$ac_help + --with-wrap-malloc=DIR Location of malloc wrapper library" +ac_help="$ac_help + --enable-efence Link with Electric Fence" +ac_help="$ac_help + --enable-strip Enable stripping of libs & executables " +ac_help="$ac_help + --enable-elf-dynstr-gc Enable elf dynstr garbage collector (opt builds only)" +ac_help="$ac_help + --enable-timeline Enable timeline services " +ac_help="$ac_help + --enable-reflow-perf Enable reflow performance tracing" +ac_help="$ac_help + --enable-perf-metrics Enable performance metrics" +ac_help="$ac_help + --enable-trace-malloc Enable malloc tracing" +ac_help="$ac_help + --enable-eazel-profiler-support + Enable Corel/Eazel profiler support" +ac_help="$ac_help + --enable-profile-modules + Enable/disable profiling for specific modules" +ac_help="$ac_help + --enable-insure Enable insure++ instrumentation (linux only)" +ac_help="$ac_help + --with-insure-dirs=DIRS + Dirs to instrument with insure " +ac_help="$ac_help + --with-insure-exclude-dirs=DIRS + Dirs to not instrument with insure " +ac_help="$ac_help + --enable-xterm-updates Update XTERM titles with current command." +ac_help="$ac_help + --enable-chrome-format=FORMAT + Select FORMAT of chrome files (default=jar)" +ac_help="$ac_help + --enable-default-mozilla-five-home + Set the default value for MOZILLA_FIVE_HOME" +ac_help="$ac_help + --with-user-appdir=DIR Set user-specific appdir (default=.mozilla)" +ac_help="$ac_help + --disable-verbose-config-defs + Do not output the contents of config-defs.h" +ac_help="$ac_help + --disable-gcc-pipe Disable -pipe check for gcc" +ac_help="$ac_help + --disable-pedantic Issue all warnings demanded by strict ANSI C " +ac_help="$ac_help + --enable-long-long-warning + Warn about use of non-ANSI long long type" +ac_help="$ac_help + --enable-cpp-rtti Enable C++ RTTI " +ac_help="$ac_help + --enable-cpp-exceptions Enable C++ exceptions " +ac_help="$ac_help + --with-os2emx=FORMAT Build for OS/2 with emx+gcc, set to OMF or A.OUT" +ac_help="$ac_help + --with-os2vacpp Build for OS/2 with VAC++" +ac_help="$ac_help + --disable-auto-deps Do not automatically generate dependency info" +ac_help="$ac_help + --disable-md Do not use compiler-based dependencies " +ac_help="$ac_help + --disable-shared Disable building of internal shared libs" +ac_help="$ac_help + --enable-static Enable building of internal static libs" +ac_help="$ac_help + --enable-meta-component-modules=mod1[,mod2] + Build single meta-component from specified modules" +ac_help="$ac_help + --enable-meta-components + Build predefined meta-components" +ac_help="$ac_help + --enable-standalone-modules=mod1[,mod2] + Enable standalone build of specific modules" +ac_help="$ac_help + --without-libIDL Skip check for libIDL (standalone modules only)" ac_help="$ac_help --with-libIDL-prefix=PFX Prefix where libIDL is installed (optional)" @@ -83,162 +240,7 @@ ac_help="$ac_help ac_help="$ac_help --disable-glibtest Do not try to compile and run a test GLIB program" ac_help="$ac_help - --with-pthreads Force use of system pthread library with NSPR " -ac_help="$ac_help - --disable-logging Disable logging facilities" -ac_help="$ac_help - --disable-mailnews Disable building of mail & news components" -ac_help="$ac_help - --enable-reflow-perf Enable reflow performance tracing" -ac_help="$ac_help - --disable-tests Do not build tests libraries & programs" -ac_help="$ac_help - --disable-bidi Disable bi-directional support" -ac_help="$ac_help - --enable-ctl Enable Thai Complex Script support" -ac_help="$ac_help - --disable-accessibility Disable accessibility support" -ac_help="$ac_help - --enable-monolithic-toolkit - Link the toolkit into the app" -ac_help="$ac_help - --enable-standalone-modules=mod1[,mod2] - Enable standalone build of specific modules" -ac_help="$ac_help - --disable-pic-dso-cflags - Do not generate PIC for shared libs" -ac_help="$ac_help - --enable-crash-on-assert - Make NS_ASSERTION crash on Unix" -ac_help="$ac_help - --enable-lea Enable Lea malloc " -ac_help="$ac_help - --enable-optimize(=val) Enable compiler optimizations (val, ie. -O2) " -ac_help="$ac_help - --enable-reorder Enable function reordering " -ac_help="$ac_help - --enable-timeline Enable timeline " -ac_help="$ac_help - --disable-debug Disable building with debug info" -ac_help="$ac_help - --enable-strip-libs Enable stripping of .so and .a libs " -ac_help="$ac_help - --enable-elf-dynstr-gc Enable elf dynstr garbage collector (opt builds only)" -ac_help="$ac_help - --enable-trace-malloc Enable malloc tracing" -ac_help="$ac_help - --with-default-mozilla-five-home - Set the default value for MOZILLA_FIVE_HOME" -ac_help="$ac_help - --with-debug-modules Enable/disable debug info for specific modules" -ac_help="$ac_help - --with-dbgrinfo-modules Enable/disable debugger info for specific modules" -ac_help="$ac_help - --enable-crypto Enable crypto (Personal Security Manager)" -ac_help="$ac_help - --disable-jsd Disable JavaScript debug library" -ac_help="$ac_help - --with-extensions Enable extensions (dirs in extensions/)" -ac_help="$ac_help - --disable-jar-packaging Disable jar packaging of chrome (Deprecated) " -ac_help="$ac_help - --enable-chrome-format=[jar|flat|both] - Select format of chrome files (defaults to jar)" -ac_help="$ac_help - --disable-auto-deps Do not automatically generate dependency info" -ac_help="$ac_help - --disable-md Do not use compiler-based dependencies " -ac_help="$ac_help - --disable-pedantic Issue all warnings demanded by strict ANSI C " -ac_help="$ac_help - --enable-long-long-warning - Pass -Wno-long-long to the compiler" -ac_help="$ac_help - --enable-cpp-rtti Enable C++ RTTI " -ac_help="$ac_help - --enable-cpp-exceptions Enable C++ exceptions " -ac_help="$ac_help - --enable-ultrasparc Enable UltraSPARC specific compiler options " -ac_help="$ac_help - --enable-eazel-profiler Enable Corel/Eazel profiler" -ac_help="$ac_help - --with-profile-modules Enable/disable profiling for specific modules" -ac_help="$ac_help - --enable-perf-metrics Enable performance metrics" -ac_help="$ac_help - --enable-insure Enable insure++ instrumentation (linux only)" -ac_help="$ac_help - --with-insure-dirs=\$dirs - Dirs to instrument with insure " -ac_help="$ac_help - --with-insure-exclude-dirs=\$dirs - Dirs to not instrument with insure " -ac_help="$ac_help - --enable-boehm Enable the Boehm Garbage Collector" -ac_help="$ac_help - --enable-logrefcnt Enable Logging of refcounts (default=debug) " -ac_help="$ac_help - --enable-leaky Enable leaky memory tool" -ac_help="$ac_help - --enable-jprof Enable jprof profiling tool (pull tools/jprof)" -ac_help="$ac_help - --enable-xpctools Build JS profiling tool" -ac_help="$ac_help - --enable-detect-webshell-leaks - Enable detection of webshell leaks - (default=yes, unless --disable-debug is used)" -ac_help="$ac_help - --disable-double-buffer Disable double buffering" -ac_help="$ac_help - --enable-wrap-malloc Wrap malloc calls (gnu linker only)" -ac_help="$ac_help - --with-wrap-malloc=\$dir Location of malloc wrapper library" -ac_help="$ac_help - --enable-efence Link with Electric Fence" -ac_help="$ac_help - --enable-homedir=\$val Set the homedir to \$val" -ac_help="$ac_help - --enable-idlc Build idl tool " -ac_help="$ac_help - --enable-xterm-updates Update XTERM titles with current command." -ac_help="$ac_help - --disable-ldap Disable LDAP support" -ac_help="$ac_help - --enable-ldap-experimental - Enable LDAP experimental features" -ac_help="$ac_help - --disable-xul Disable XUL " -ac_help="$ac_help - --enable-mathml Enable MathML " -ac_help="$ac_help - --enable-svg Enable SVG " -ac_help="$ac_help - --disable-verbose-config-defs - Do not output the contents of config-defs.h" -ac_help="$ac_help - --disable-dtd-debug Disable some DTD debuggin code in the parser)" -ac_help="$ac_help - --with-os2emx=\$val Build for OS/2 with emx+gcc, set to OMF or A.OUT" -ac_help="$ac_help - --with-os2vacpp Build for OS/2 with VAC++" -ac_help="$ac_help - --disable-shared Disable building of internal shared libs" -ac_help="$ac_help - --enable-static Enable building of internal static libs" -ac_help="$ac_help - --enable-static-components - Build meta-component from specific components" -ac_help="$ac_help - --enable-meta-components - Build predefined meta-components" -ac_help="$ac_help - --with-jpeg[=\$dir] Use system libjpeg [installed at prefix \$dir]" -ac_help="$ac_help - --with-zlib[=\$dir] Use system libz [installed at prefix \$dir]" -ac_help="$ac_help - --with-png[=\$dir] Use system libpng [installed at prefix \$dir]" -ac_help="$ac_help - --with-mng[=\$dir] Use system libmng [installed at prefix \$dir]" + --disable-xul Disable XUL (standalone modules only)" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -796,7 +798,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:800: checking host system type" >&5 +echo "configure:802: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -817,7 +819,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:821: checking target system type" >&5 +echo "configure:823: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -835,7 +837,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:839: checking build system type" >&5 +echo "configure:841: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -859,6 +861,7 @@ test "$host_alias" != "$target_alias" && TARGET_CPU="${target_cpu}" +TARGET_VENDOR="${target_vendor}" TARGET_OS="${target_os}" CFLAGS="${CFLAGS=}" @@ -894,7 +897,6 @@ QT_VERSION=2.2.0 QT_VERSION_NUM=220 GTK2_VERSION=1.3.7 -MISSING_NSPR= MISSING_X= USE_PTHREADS= @@ -941,14 +943,14 @@ 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:945: checking for host c compiler" >&5 +echo "configure:947: checking for host c compiler" >&5 if test -z "$HOST_CC"; then for ac_prog in gcc cc /usr/ucb/cc 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:952: checking for $ac_word" >&5 +echo "configure:954: 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 @@ -984,14 +986,14 @@ 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:988: checking for host c++ compiler" >&5 +echo "configure:990: checking for host c++ compiler" >&5 if test -z "$HOST_CXX"; then for ac_prog in $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:995: checking for $ac_word" >&5 +echo "configure:997: 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 @@ -1040,7 +1042,7 @@ test -n "$HOST_CXX" || HOST_CXX="""" # 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:1044: checking for $ac_word" >&5 +echo "configure:1046: 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 @@ -1072,7 +1074,7 @@ fi # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1076: checking for $ac_word" >&5 +echo "configure:1078: 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 @@ -1105,16 +1107,16 @@ fi 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:1109: checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5 +echo "configure:1111: 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:1120: \"$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 @@ -1129,16 +1131,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:1133: checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works" >&5 +echo "configure:1135: 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:1144: \"$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 @@ -1159,7 +1161,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:1163: checking for $ac_word" >&5 +echo "configure:1165: 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 @@ -1194,7 +1196,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:1198: checking for $ac_word" >&5 +echo "configure:1200: 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 @@ -1224,7 +1226,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:1228: checking for $ac_word" >&5 +echo "configure:1230: 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 @@ -1275,7 +1277,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:1279: checking for $ac_word" >&5 +echo "configure:1281: 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 @@ -1307,7 +1309,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1311: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1313: 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. @@ -1318,12 +1320,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1322 "configure" +#line 1324 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1329: \"$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 @@ -1349,12 +1351,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:1353: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1355: 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:1358: checking whether we are using GNU C" >&5 +echo "configure:1360: 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 @@ -1363,7 +1365,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1367: \"$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:1369: \"$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 @@ -1382,7 +1384,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:1386: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1388: 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 @@ -1419,7 +1421,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:1423: checking for $ac_word" >&5 +echo "configure:1425: 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 @@ -1456,7 +1458,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:1460: checking for $ac_word" >&5 +echo "configure:1462: 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 @@ -1488,7 +1490,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1492: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:1494: 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. @@ -1499,12 +1501,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 1503 "configure" +#line 1505 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:1508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1510: \"$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 @@ -1530,12 +1532,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:1534: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1536: 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:1539: checking whether we are using GNU C++" >&5 +echo "configure:1541: 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 @@ -1544,7 +1546,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1548: \"$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:1550: \"$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 @@ -1563,7 +1565,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:1567: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:1569: 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 @@ -1600,7 +1602,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:1604: checking for $ac_word" >&5 +echo "configure:1606: 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 @@ -1637,7 +1639,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:1641: checking for $ac_word" >&5 +echo "configure:1643: 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 @@ -1674,7 +1676,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:1678: checking for $ac_word" >&5 +echo "configure:1680: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1711,7 +1713,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:1715: checking for $ac_word" >&5 +echo "configure:1717: 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 @@ -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_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1785,7 +1787,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:1789: checking for $ac_word" >&5 +echo "configure:1791: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1822,7 +1824,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:1826: checking for $ac_word" >&5 +echo "configure:1828: 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 @@ -1861,7 +1863,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:1865: checking for $ac_word" >&5 +echo "configure:1867: 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 @@ -1891,7 +1893,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:1895: checking for $ac_word" >&5 +echo "configure:1897: 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 @@ -1942,7 +1944,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:1946: checking for $ac_word" >&5 +echo "configure:1948: 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 @@ -1974,7 +1976,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1978: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1980: 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. @@ -1985,12 +1987,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1989 "configure" +#line 1991 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1996: \"$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 @@ -2016,12 +2018,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:2020: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2022: 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:2025: checking whether we are using GNU C" >&5 +echo "configure:2027: 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 @@ -2030,7 +2032,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2034: \"$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:2036: \"$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 @@ -2049,7 +2051,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:2053: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2055: 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 @@ -2085,7 +2087,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:2089: checking for $ac_word" >&5 +echo "configure:2091: 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 @@ -2117,7 +2119,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2121: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:2123: 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. @@ -2128,12 +2130,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 2132 "configure" +#line 2134 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:2137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2139: \"$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 @@ -2159,12 +2161,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:2163: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2165: 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:2168: checking whether we are using GNU C++" >&5 +echo "configure:2170: 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 @@ -2173,7 +2175,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2177: \"$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:2179: \"$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 @@ -2192,7 +2194,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:2196: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:2198: 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 @@ -2226,7 +2228,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:2230: checking for $ac_word" >&5 +echo "configure:2232: 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 @@ -2258,7 +2260,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:2262: checking for $ac_word" >&5 +echo "configure:2264: 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 @@ -2299,7 +2301,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:2303: checking for $ac_word" >&5 +echo "configure:2305: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2340,7 +2342,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:2344: checking for $ac_word" >&5 +echo "configure:2346: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2381,7 +2383,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:2385: checking for $ac_word" >&5 +echo "configure:2387: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2422,7 +2424,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:2426: checking for $ac_word" >&5 +echo "configure:2428: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2484,10 +2486,10 @@ fi if test "$CC" != "icc"; 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:2488: checking whether $CC and cc understand -c and -o together" >&5 +echo "configure:2490: 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:2491: checking whether cc understands -c and -o together" >&5 +echo "configure:2493: 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]/_/'`" @@ -2499,16 +2501,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:2503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:2504: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; +if { (eval echo configure:2505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:2506: \"$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:2509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:2511: \"$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:2511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:2512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; + if { (eval echo configure:2513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:2514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then # cc works too. : @@ -2561,72 +2563,8 @@ rm -f a.out -# Check whether --enable-gcc-pipe or --disable-gcc-pipe was given. -if test "${enable_gcc_pipe+set}" = set; then - enableval="$enable_gcc_pipe" - if test "$enableval" = "no"; then - NO_GCC_PIPE=1 - elif test "$enableval" = "yes"; then - : - else - { echo "configure: error: Option, gcc-pipe, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6 -echo "configure:2579: checking for gcc -pipe support" >&5 - -if test -n "$NO_GCC_PIPE"; then - echo "$ac_t""disabled" 1>&6 -elif 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 - ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5 - cat dummy-hello.s | ${AS} -o dummy-hello.S - 2>&5 - if test $? = 0; then - _res_as_stdin="yes" - else - _res_as_stdin="no" - fi - if test "$_res_as_stdin" = "yes"; then - _SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -pipe" - cat > conftest.$ac_ext < -int main() { -printf("Hello World\n"); -; return 0; } -EOF -if { (eval echo configure:2604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - _res_gcc_pipe="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - _res_gcc_pipe="no" -fi -rm -f conftest* - CFLAGS=$_SAVE_CFLAGS - fi - if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then - _res="yes"; - CFLAGS="$CFLAGS -pipe" - CXXFLAGS="$CXXFLAGS -pipe" - else - _res="no" - fi - rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out - echo "$ac_t""$_res" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2630: checking how to run the C preprocessor" >&5 +echo "configure:2568: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2641,13 +2579,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:2651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2589: \"$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 : @@ -2658,13 +2596,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:2668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2675,13 +2613,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:2685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2623: \"$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 : @@ -2706,7 +2644,7 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 -echo "configure:2710: checking how to run the C++ preprocessor" >&5 +echo "configure:2648: 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 @@ -2719,12 +2657,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:2728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2666: \"$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 : @@ -2760,7 +2698,7 @@ echo "$ac_t""$CXXCPP" 1>&6 # 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:2764: checking for a BSD compatible install" >&5 +echo "configure:2702: 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 @@ -2813,7 +2751,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:2817: checking whether ln -s works" >&5 +echo "configure:2755: 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 @@ -2838,7 +2776,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:2842: checking for $ac_word" >&5 +echo "configure:2780: 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 @@ -2872,7 +2810,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:2876: checking for $ac_word" >&5 +echo "configure:2814: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_EMACS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2913,7 +2851,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:2917: checking for $ac_word" >&5 +echo "configure:2855: 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 @@ -2953,7 +2891,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:2957: checking for minimum required perl version >= $PERL_VERSION" >&5 +echo "configure:2895: 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 @@ -2963,7 +2901,7 @@ if test "$_perl_res" != 0; then fi echo $ac_n "checking for full perl installation""... $ac_c" 1>&6 -echo "configure:2967: checking for full perl installation" >&5 +echo "configure:2905: 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 @@ -2976,7 +2914,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:2980: checking for $ac_word" >&5 +echo "configure:2918: 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 @@ -3012,7 +2950,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:3016: checking for $ac_word" >&5 +echo "configure:2954: 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 @@ -3048,7 +2986,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:3052: checking for $ac_word" >&5 +echo "configure:2990: 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 @@ -3086,7 +3024,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:3090: checking for $ac_word" >&5 +echo "configure:3028: 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 @@ -3122,13 +3060,12 @@ test -n "$ZIP" && break done if test -z "$ZIP" || test "$ZIP" = ":"; then - echo "configure: warning: zip not found in \$PATH. Disabling jar packaging" 1>&2 - MOZ_DISABLE_JAR_PACKAGING=1 + { echo "configure: error: zip not found in \$PATH" 1>&2; exit 1; } 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:3132: checking for $ac_word" >&5 +echo "configure:3069: 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 @@ -3163,7 +3100,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:3167: checking for $ac_word" >&5 +echo "configure:3104: 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 @@ -3195,13 +3132,16 @@ else echo "$ac_t""no" 1>&6 fi +if test -z "$XARGS" || test "$XARGS" = ":"; then + { echo "configure: error: xargs not found in \$PATH ." 1>&2; exit 1; } +fi for ac_prog in gmake make 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:3205: checking for $ac_word" >&5 +echo "configure:3145: 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 @@ -3257,7 +3197,7 @@ then fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:3261: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:3201: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3289,7 +3229,7 @@ fi # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:3293: checking for X" >&5 +echo "configure:3233: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -3351,12 +3291,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:3360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3300: \"$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* @@ -3425,14 +3365,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:3376: \"$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. @@ -3538,17 +3478,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:3542: checking whether -R must be followed by a space" >&5 +echo "configure:3482: 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:3492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -3564,14 +3504,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:3515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -3603,7 +3543,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:3607: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:3547: 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 @@ -3611,7 +3551,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:3566: \"$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 @@ -3644,7 +3584,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:3648: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:3588: 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 @@ -3652,7 +3592,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:3607: \"$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 @@ -3692,12 +3632,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:3696: checking for gethostbyname" >&5 +echo "configure:3636: 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:3664: \"$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 @@ -3741,7 +3681,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:3745: checking for gethostbyname in -lnsl" >&5 +echo "configure:3685: 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 @@ -3749,7 +3689,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:3704: \"$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 @@ -3790,12 +3730,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:3794: checking for connect" >&5 +echo "configure:3734: 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:3762: \"$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 @@ -3839,7 +3779,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:3843: checking for connect in -lsocket" >&5 +echo "configure:3783: 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 @@ -3847,7 +3787,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:3802: \"$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 @@ -3882,12 +3822,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:3886: checking for remove" >&5 +echo "configure:3826: 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:3854: \"$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 @@ -3931,7 +3871,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:3935: checking for remove in -lposix" >&5 +echo "configure:3875: 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 @@ -3939,7 +3879,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:3894: \"$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 @@ -3974,12 +3914,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:3978: checking for shmat" >&5 +echo "configure:3918: 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:3946: \"$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 @@ -4023,7 +3963,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:4027: checking for shmat in -lipc" >&5 +echo "configure:3967: 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 @@ -4031,7 +3971,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:3986: \"$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 @@ -4075,7 +4015,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:4079: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:4019: 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 @@ -4083,7 +4023,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:4038: \"$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 @@ -4123,6 +4063,8 @@ if test "$no_x" != "yes"; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" fi +XCFLAGS="$X_CFLAGS" + AR_FLAGS='cr $@' AR_LIST='$(AR) t' AR_EXTRACT='$(AR) x' @@ -4151,6 +4093,11 @@ XPCOM_LIBS='-L$(DIST)/bin -lxpcom' MOZ_COMPONENT_NSPR_LIBS='-L$(DIST)/bin $(NSPR_LIBS)' MOZ_COMPONENT_XPCOM_LIBS='-L$(DIST)/bin -lxpcom' +MOZ_WIDGET_TOOLKIT_LDFLAGS='-lwidget_$(MOZ_WIDGET_TOOLKIT)' +MOZ_GFX_TOOLKIT_LDFLAGS='-lgfx_$(MOZ_WIDGET_TOOLKIT) $(MOZ_XLIBRGB_LDFLAGS)' +WIDGET_DLL='\"libwidget_$(MOZ_WIDGET_TOOLKIT)$(DLL_SUFFIX)\"' +GFXWIN_DLL='\"libgfx_$(MOZ_GFX_TOOLKIT)$(DLL_SUFFIX)\"' + if test -n "$CROSS_COMPILE"; then OS_TARGET="${target_os}" OS_ARCH=`echo $target_os | sed -e 's|/|_|g'` @@ -4221,7 +4168,7 @@ MKSHLIB_FORCE_ALL= MKSHLIB_UNFORCE_ALL= if test "$GNU_CC"; then echo $ac_n "checking whether ld has archive extraction flags""... $ac_c" 1>&6 -echo "configure:4225: checking whether ld has archive extraction flags" >&5 +echo "configure:4172: 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 @@ -4238,14 +4185,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:4196: \"$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 @@ -4280,15 +4227,6 @@ case "$host" in esac - -case "$target" in -*-solaris*) - if test ! "$GNU_CC" && test ! -z "`${CC} -V 2>&1 | head -1 | grep '4.2'`"; then - { echo "configure: error: SUNWspro4.2 is too old. Use a newer version or gcc." 1>&2; exit 1; } - fi - ;; -esac - case "$target" in *-aix*) if test ! "$GNU_CC"; then @@ -4311,16 +4249,14 @@ EOF ;; *-beos*) - cat >> confdefs.h <<\EOF -#define NO_X11 1 -EOF - + no_x=yes MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -o $@' + MOZ_WIDGET_TOOLKIT="beos" DSO_LDOPTS='-nostart -Wl,-h -Wl,$@' TK_LIBS='-lbe -lroot' LIBS="$LIBS -lbe" echo $ac_n "checking for main in -lbind""... $ac_c" 1>&6 -echo "configure:4324: checking for main in -lbind" >&5 +echo "configure:4260: 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 @@ -4328,14 +4264,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:4275: \"$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 @@ -4606,6 +4542,9 @@ EOF _PTHREAD_LDFLAGS="" LIBS="$LIBS -L/usr/lib -lsocket -lm -lstdc++" HAVE_DEV_ZERO=1 + MOZ_WIDGET_TOOLKIT="photon" + TK_CFLAGS='-I/usr/include/photon' + TK_LIBS='-lph -lphrender' ;; *-openbsd*) @@ -4627,7 +4566,6 @@ EOF if test "$OS_TARGET" = "POSIX_for_OpenVMS_AXP"; then _OPENVMS_CROSS_COMPILE=1 fi - MISSING_NSPR="yes" cat >> confdefs.h <<\EOF #define NO_PW_GECOS 1 EOF @@ -4658,6 +4596,11 @@ EOF DSO_PIC_CFLAGS='' OS_ARCH=OS2 OS_TARGET=OS2 + MOZ_WIDGET_TOOLKIT=os2 + MOZ_WIDGET_TOOLKIT_LDFLAGS='$(DIST)/lib/wdgt$(MOZ_WIDGET_TOOLKIT)' + MOZ_GFX_TOOLKIT_LDFLAGS='$(DIST)/lib/gfx_$(MOZ_WIDGET_TOOLKIT)' + WIDGET_DLL='\"wdgt$(MOZ_WIDGET_TOOLKIT)$(DLL_SUFFIX)\"' + GFXWIN_DLL='\"gfx_$(MOZ_GFX_TOOLKIT)$(DLL_SUFFIX)\"' case "$target" in *-*-os2_emx) @@ -4785,10 +4728,10 @@ EOF EOF if test "$no_x" = "yes"; then - MOZ_WIDGET_TOOLKIT='photon' - TK_CFLAGS='-I/usr/nto/include/photon' - TK_LIBS='-lphoton -lphrender' - cat >> confdefs.h <<\EOF + MOZ_WIDGET_TOOLKIT='photon' + TK_CFLAGS='-I/usr/nto/include/photon' + TK_LIBS='-lphoton -lphrender' + cat >> confdefs.h <<\EOF #define NO_X11 1 EOF @@ -4924,7 +4867,7 @@ EOF NO_LD_ARCHIVE_FLAGS= -if test -z "$MKSHLIB_FORCE_ALL"; then +if test -z "$MKSHLIB_FORCE_ALL" || test -z "$MKSHLIB_UNFORCE_ALL"; then NO_LD_ARCHIVE_FLAGS=1 fi case "$target" in @@ -4940,6 +4883,1561 @@ case "$target" in esac +case "$target" in + *-hpux*) + cat >> confdefs.h <<\EOF +#define MOZ_OJI_REQUIRE_THREAD_SAFE_ON_STARTUP 1 +EOF + + ;; +esac + + +case "$target" in + *-linux*) + MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script' + ;; + *-nto*) + MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script' + ;; +esac + + +echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:4908: 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 <j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if { (eval echo configure:4962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF + +fi + +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:4983: 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 +#include +#include +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4996: \"$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* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +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 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +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 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +if test "$cross_compiling" = yes; then + : +else + cat > conftest.$ac_ext < +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + +EOF +if { (eval echo configure:5063: \"$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* + ac_cv_header_stdc=no +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + +echo $ac_n "checking for mode_t""... $ac_c" 1>&6 +echo "configure:5087: 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 +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_mode_t=yes +else + rm -rf conftest* + ac_cv_type_mode_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_mode_t" 1>&6 +if test $ac_cv_type_mode_t = no; then + cat >> confdefs.h <<\EOF +#define mode_t int +EOF + +fi + +echo $ac_n "checking for off_t""... $ac_c" 1>&6 +echo "configure:5120: 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 +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_off_t=yes +else + rm -rf conftest* + ac_cv_type_off_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_off_t" 1>&6 +if test $ac_cv_type_off_t = no; then + cat >> confdefs.h <<\EOF +#define off_t long +EOF + +fi + +echo $ac_n "checking for pid_t""... $ac_c" 1>&6 +echo "configure:5153: 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 +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_pid_t=yes +else + rm -rf conftest* + ac_cv_type_pid_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_pid_t" 1>&6 +if test $ac_cv_type_pid_t = no; then + cat >> confdefs.h <<\EOF +#define pid_t int +EOF + +fi + +echo $ac_n "checking for size_t""... $ac_c" 1>&6 +echo "configure:5186: 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 +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_size_t=yes +else + rm -rf conftest* + ac_cv_type_size_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_size_t" 1>&6 +if test $ac_cv_type_size_t = no; then + cat >> confdefs.h <<\EOF +#define size_t unsigned +EOF + +fi + +echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 +echo "configure:5219: checking for uid_t in sys/types.h" >&5 +if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "uid_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_uid_t=yes +else + rm -rf conftest* + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_type_uid_t" 1>&6 +if test $ac_cv_type_uid_t = no; then + cat >> confdefs.h <<\EOF +#define uid_t int +EOF + + cat >> confdefs.h <<\EOF +#define gid_t int +EOF + +fi + +echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 +echo "configure:5253: 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 +int main() { +struct stat s; s.st_blksize; +; return 0; } +EOF +if { (eval echo configure:5266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_blksize=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_st_blksize=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 +if test $ac_cv_struct_st_blksize = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_BLKSIZE 1 +EOF + +fi + + +case "$target" in + *-*-os2_vacpp) + cat >> confdefs.h <<\EOF +#define __size_t 1 +EOF + + cat >> confdefs.h <<\EOF +#define __off_t 1 +EOF + + ;; +esac + +echo $ac_n "checking for int16_t""... $ac_c" 1>&6 +echo "configure:5301: 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 +int main() { +int16_t foo = 0; +; return 0; } +EOF +if { (eval echo configure:5314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_int16_t=true +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_int16_t=false +fi +rm -f conftest* +fi + +if test "$ac_cv_int16_t" = true ; then + cat >> confdefs.h <<\EOF +#define HAVE_INT16_T 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi +echo $ac_n "checking for int32_t""... $ac_c" 1>&6 +echo "configure:5336: 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 +int main() { +int32_t foo = 0; +; return 0; } +EOF +if { (eval echo configure:5349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_int32_t=true +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_int32_t=false +fi +rm -f conftest* +fi + +if test "$ac_cv_int32_t" = true ; then + cat >> confdefs.h <<\EOF +#define HAVE_INT32_T 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi +echo $ac_n "checking for int64_t""... $ac_c" 1>&6 +echo "configure:5371: 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 +int main() { +int64_t foo = 0; +; return 0; } +EOF +if { (eval echo configure:5384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_int64_t=true +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_int64_t=false +fi +rm -f conftest* +fi + +if test "$ac_cv_int64_t" = true ; then + cat >> confdefs.h <<\EOF +#define HAVE_INT64_T 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi +echo $ac_n "checking for int64""... $ac_c" 1>&6 +echo "configure:5406: 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 +int main() { +int64 foo = 0; +; return 0; } +EOF +if { (eval echo configure:5419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_int64=true +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_int64=false +fi +rm -f conftest* +fi + +if test "$ac_cv_int64" = true ; then + cat >> confdefs.h <<\EOF +#define HAVE_INT64 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi +echo $ac_n "checking for uint""... $ac_c" 1>&6 +echo "configure:5441: 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 +int main() { +uint foo = 0; +; return 0; } +EOF +if { (eval echo configure:5454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_uint=true +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_uint=false +fi +rm -f conftest* +fi + +if test "$ac_cv_uint" = true ; then + cat >> confdefs.h <<\EOF +#define HAVE_UINT 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi +echo $ac_n "checking for uint_t""... $ac_c" 1>&6 +echo "configure:5476: 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 +int main() { +uint_t foo = 0; +; return 0; } +EOF +if { (eval echo configure:5489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_uint_t=true +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_uint_t=false +fi +rm -f conftest* +fi + +if test "$ac_cv_uint_t" = true ; then + cat >> confdefs.h <<\EOF +#define HAVE_UINT_T 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi +echo $ac_n "checking for uint16_t""... $ac_c" 1>&6 +echo "configure:5511: 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 +int main() { +uint16_t foo = 0; +; return 0; } +EOF +if { (eval echo configure:5524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_uint16_t=true +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_uint16_t=false +fi +rm -f conftest* +fi + +if test "$ac_cv_uint16_t" = true ; then + cat >> confdefs.h <<\EOF +#define HAVE_UINT16_T 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +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 uname.domainname""... $ac_c" 1>&6 +echo "configure:5555: 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() { + struct utsname *res; char *domain; + (void)uname(res); if (res != 0) { domain = res->domainname; } +; return 0; } +EOF +if { (eval echo configure:5568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_uname_domainname_field=true +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_have_uname_domainname_field=false +fi +rm -f conftest* +fi + + +if test "$ac_cv_have_uname_domainname_field" = "true"; then + cat >> confdefs.h <<\EOF +#define HAVE_UNAME_DOMAINNAME_FIELD 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking for uname.__domainname""... $ac_c" 1>&6 +echo "configure:5592: 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() { + struct utsname *res; char *domain; + (void)uname(res); if (res != 0) { domain = res->__domainname; } +; return 0; } +EOF +if { (eval echo configure:5605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_uname_us_domainname_field=true +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_have_uname_us_domainname_field=false +fi +rm -f conftest* +fi + + +if test "$ac_cv_have_uname_us_domainname_field" = "true"; then + cat >> confdefs.h <<\EOF +#define HAVE_UNAME_US_DOMAINNAME_FIELD 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +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 + + +echo $ac_n "checking for 64-bit OS""... $ac_c" 1>&6 +echo "configure:5637: 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 +then + result="yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + result="no" +fi +rm -fr conftest* +fi + +echo "$ac_t"""$result"" 1>&6 +if test "$result" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_64BIT_OS 1 +EOF + + HAVE_64BIT_OS=1 +fi + + +if test "$HAVE_64BIT_OS"; then + case "$target_os" in + solaris*) TARGET_NSPR_MDCPUCFG='\"md/_solaris64.cfg\"' ;; + esac +fi + + +echo $ac_n "checking for usable wchar_t (2 bytes, unsigned)""... $ac_c" 1>&6 +echo "configure:5677: 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 + if test "$cross_compiling" = yes; then + 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:5692: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_have_usable_wchar="no" +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_have_usable_wchar" 1>&6 +if test "$ac_cv_have_usable_wchar" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_CPP_2BYTE_WCHAR_T 1 +EOF + + HAVE_CPP_2BYTE_WCHAR_T=1 +else + + _SAVE_CFLAGS=$CFLAGS + _SAVE_CC=$CC + CC=$CXX + CFLAGS="$CFLAGS -fshort-wchar" + + echo $ac_n "checking for compiler -fshort-wchar option""... $ac_c" 1>&6 +echo "configure:5721: 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 + if test "$cross_compiling" = yes; then + ac_cv_have_usable_wchar_option="maybe" +else + cat > conftest.$ac_ext < + int main () { + return (sizeof(wchar_t) != 2) || + (wchar_t)-1 < (wchar_t) 0 ; } +EOF +if { (eval echo configure:5736: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_have_usable_wchar_option="no" +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_have_usable_wchar_option" 1>&6 + + if test "$ac_cv_have_usable_wchar_option" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_CPP_2BYTE_WCHAR_T 1 +EOF + + HAVE_CPP_2BYTE_WCHAR_T=1 + CXXFLAGS="$CXXFLAGS -fshort-wchar" + else + CFLAGS=$_SAVE_CFLAGS + fi + CC=$_SAVE_CC +fi + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 +echo "configure:5770: 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> +int main() { +DIR *dirp = 0; +; return 0; } +EOF +if { (eval echo configure:5783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +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:5808: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-ldir $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 + LIBS="$LIBS -ldir" +else + echo "$ac_t""no" 1>&6 +fi + +else +echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 +echo "configure:5849: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lx $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 + LIBS="$LIBS -lx" +else + echo "$ac_t""no" 1>&6 +fi + +fi + +case "$target_os" in +os2*) + LIBS= + ;; +esac +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:5899: 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:5909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in sys/bittypes.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:5939: 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:5949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +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:5979: 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:5989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +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:6019: 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:6029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + +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:6060: 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:6070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + +case $target in +*-aix4.3*) + ;; +*) + for ac_hdr in sys/cdefs.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:6105: 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:6115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + ;; +esac + +case $target in +*-hpux11.*) + ;; +*) + echo $ac_n "checking for gethostbyname_r in -lc_r""... $ac_c" 1>&6 +echo "configure:6149: 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 +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 + 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 + ac_tr_lib=HAVE_LIB`echo c_r | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + ;; +esac +echo $ac_n "checking for atan in -lm""... $ac_c" 1>&6 +echo "configure:6198: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lm $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 + ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + +echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +echo "configure:6245: checking for dlopen in -ldl" >&5 +ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + +if test ! "$GNU_CXX"; then + + case $target in + *-aix*) + echo $ac_n "checking for demangle in -lC_r""... $ac_c" 1>&6 +echo "configure:6296: 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 +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 + 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 + ac_tr_lib=HAVE_LIB`echo C_r | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + ;; + *) + echo $ac_n "checking for demangle in -lC""... $ac_c" 1>&6 +echo "configure:6345: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lC $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 + ac_tr_lib=HAVE_LIB`echo C | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + ;; + esac +fi +echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 +echo "configure:6395: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lsocket $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 + ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + XLDFLAGS="$X_LIBS" XLIBS="$X_EXTRA_LIBS" @@ -4949,7 +6447,7 @@ then _SAVE_LDFLAGS="$LDFLAGS" LDFLAGS="$XLDFLAGS $LDFLAGS" echo $ac_n "checking for XDrawLines in -lX11""... $ac_c" 1>&6 -echo "configure:4953: checking for XDrawLines in -lX11" >&5 +echo "configure:6451: 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 @@ -4957,7 +6455,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:6470: \"$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 @@ -4990,7 +6488,7 @@ MISSING_X="$MISSING_X -lX11" fi echo $ac_n "checking for XextAddDisplay in -lXext""... $ac_c" 1>&6 -echo "configure:4994: checking for XextAddDisplay in -lXext" >&5 +echo "configure:6492: 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 @@ -4998,7 +6496,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:6511: \"$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 @@ -5031,7 +6529,7 @@ MISSING_X="$MISSING_X -lXext" fi echo $ac_n "checking for IceFlush in -lICE""... $ac_c" 1>&6 -echo "configure:5035: checking for IceFlush in -lICE" >&5 +echo "configure:6533: 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 @@ -5039,7 +6537,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6552: \"$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 @@ -5071,7 +6569,7 @@ else fi echo $ac_n "checking for SmcCloseConnection in -lSM""... $ac_c" 1>&6 -echo "configure:5075: checking for SmcCloseConnection in -lSM" >&5 +echo "configure:6573: 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 @@ -5079,7 +6577,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lSM $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6592: \"$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 @@ -5111,7 +6609,7 @@ else fi echo $ac_n "checking for XtFree in -lXt""... $ac_c" 1>&6 -echo "configure:5115: checking for XtFree in -lXt" >&5 +echo "configure:6613: 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 @@ -5119,7 +6617,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXt $X_PRE_LIBS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6632: \"$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 @@ -5151,50 +6649,9 @@ else MISSING_X="$MISSING_X -lXt" fi - echo $ac_n "checking for XmuLookupString in -lXmu""... $ac_c" 1>&6 -echo "configure:5156: checking for XmuLookupString in -lXmu" >&5 -ac_lib_var=`echo Xmu'_'XmuLookupString | 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="-lXmu $X_PRE_LIBS $XLIBS $XT_LIBS $XEXT_LIBS $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 - XMU_LIBS="-lXmu" -else - echo "$ac_t""no" 1>&6 -MISSING_X="$MISSING_X -lXmu" -fi - - - echo $ac_n "checking for XineramaIsActive in -lXinerama""... $ac_c" 1>&6 -echo "configure:5198: checking for XineramaIsActive in -lXinerama" >&5 + echo $ac_n "checking for XineramaIsActive in -lXinerama""... $ac_c" 1>&6 +echo "configure:6655: 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 @@ -5202,7 +6659,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:6674: \"$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 @@ -5235,17 +6692,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:5239: checking for X11/extensions/Xinerama.h" >&5 +echo "configure:6696: 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:5249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6706: \"$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* @@ -5267,8 +6724,8 @@ else fi - echo $ac_n "checking for XieFloGeometry in -lXIE""... $ac_c" 1>&6 -echo "configure:5272: checking for XieFloGeometry in -lXIE" >&5 + echo $ac_n "checking for XieFloGeometry in -lXIE""... $ac_c" 1>&6 +echo "configure:6729: 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 @@ -5276,7 +6733,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:6748: \"$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 @@ -5309,17 +6766,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:5313: checking for X11/extensions/XIElib.h" >&5 +echo "configure:6770: 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:5323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6780: \"$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* @@ -5342,7 +6799,7 @@ fi if test "$MOZ_XIE_LIBS"; then - case $target in + case $target in *-hpux*) ;; *) @@ -5353,34 +6810,1408 @@ fi LDFLAGS="$_SAVE_LDFLAGS" - # Check whether --enable-toolkit or --disable-toolkit was given. -if test "${enable_toolkit+set}" = set; then - enableval="$enable_toolkit" - if test "$enableval" = "gtk" \ - -o "$enableval" = "qt" \ - -o "$enableval" = "gtk2" \ - -o "$enableval" = "xlib" - then - MOZ_WIDGET_TOOLKIT=`echo "$enableval" | sed -e "s/,.*$//"` - else - { echo "configure: error: Toolkit must be xlib" 1>&2; exit 1; } - fi -else - MOZ_WIDGET_TOOLKIT="gtk" -fi - fi # $no_x + + + + +echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 +echo "configure:6822: checking for pthread_create in -lpthreads" >&5 +echo " + #include + void *foo(void *v) { int a = 1; } + int main() { + pthread_t t; + if (!pthread_create(&t, 0, &foo, 0)) { + pthread_join(t, 0); + } + exit(0); + }" > dummy.c ; + echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS" 1>&5; + ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS 2>&5; + _res=$? ; + rm -f dummy.c dummy${ac_exeext} ; + if test "$_res" = "0"; then + echo "$ac_t""yes" 1>&6 + USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads" + else + echo "$ac_t""no" 1>&6 + +echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 +echo "configure:6844: checking for pthread_create in -lpthread" >&5 +echo " + #include + void *foo(void *v) { int a = 1; } + int main() { + pthread_t t; + if (!pthread_create(&t, 0, &foo, 0)) { + pthread_join(t, 0); + } + exit(0); + }" > dummy.c ; + echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS" 1>&5; + ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS 2>&5; + _res=$? ; + rm -f dummy.c dummy${ac_exeext} ; + if test "$_res" = "0"; then + echo "$ac_t""yes" 1>&6 + USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread" + else + echo "$ac_t""no" 1>&6 + +echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 +echo "configure:6866: checking for pthread_create in -lc_r" >&5 +echo " + #include + void *foo(void *v) { int a = 1; } + int main() { + pthread_t t; + if (!pthread_create(&t, 0, &foo, 0)) { + pthread_join(t, 0); + } + exit(0); + }" > dummy.c ; + echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS" 1>&5; + ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS 2>&5; + _res=$? ; + rm -f dummy.c dummy${ac_exeext} ; + if test "$_res" = "0"; then + echo "$ac_t""yes" 1>&6 + USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r" + else + echo "$ac_t""no" 1>&6 + +echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 +echo "configure:6888: checking for pthread_create in -lc" >&5 +echo " + #include + void *foo(void *v) { int a = 1; } + int main() { + pthread_t t; + if (!pthread_create(&t, 0, &foo, 0)) { + pthread_join(t, 0); + } + exit(0); + }" > dummy.c ; + echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS" 1>&5; + ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS 2>&5; + _res=$? ; + rm -f dummy.c dummy${ac_exeext} ; + if test "$_res" = "0"; then + echo "$ac_t""yes" 1>&6 + USE_PTHREADS=1 + + else + echo "$ac_t""no" 1>&6 + + fi + + + fi + + + fi + + + fi + + +# Check whether --with-pthreads or --without-pthreads was given. +if test "${with_pthreads+set}" = set; then + withval="$with_pthreads" + if test "$enableval" = "yes"; then + if test "$USE_PTHREADS"x = x; then + { echo "configure: error: --with-pthreads specified for a system without pthread support " 1>&2; exit 1; }; +fi + elif test "$enableval" = "no"; then + USE_PTHREADS= + _PTHREAD_LDFLAGS= + + else + { echo "configure: error: Option, pthreads, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +if test "$USE_PTHREADS"x != x +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:6944: 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 + if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then + ac_cv_have_dash_pthread=yes + CFLAGS="$CFLAGS -pthread" + CXXFLAGS="$CXXFLAGS -pthread" + fi + fi + rm -f conftest* + echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6 + + 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:6960: 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 + if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then + ac_cv_have_dash_pthreads=yes + CFLAGS="$CFLAGS -pthreads" + CXXFLAGS="$CXXFLAGS -pthreads" + fi + fi + rm -f conftest* + echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6 + fi + + case "$target" in + *-*-freebsd*|*-*-openbsd*|*-*-bsdi*) + cat >> confdefs.h <<\EOF +#define _REENTRANT 1 +EOF + + cat >> confdefs.h <<\EOF +#define _THREAD_SAFE 1 +EOF + + if test "$ac_cv_have_dash_pthread" = "yes"; then + _PTHREAD_LDFLAGS="" + else + _PTHREAD_LDFLAGS="-lc_r" + fi + ;; + + *-*-linux*) + cat >> confdefs.h <<\EOF +#define _REENTRANT 1 +EOF + + ;; + + *-*-nto*) + cat >> confdefs.h <<\EOF +#define _REENTRANT 1 +EOF + + ;; + + *-aix4.3*) + cat >> confdefs.h <<\EOF +#define _REENTRANT 1 +EOF + + ;; + + *-hpux11.*) + cat >> confdefs.h <<\EOF +#define _REENTRANT 1 +EOF + + ;; + + *-*-os2*) + USE_PTHREADS= + _PTHREAD_LDFLAGS= + ;; + + alpha*-*-osf*) + cat >> confdefs.h <<\EOF +#define _REENTRANT 1 +EOF + + ;; + + *-*-solaris*) + cat >> confdefs.h <<\EOF +#define _REENTRANT 1 +EOF + + if test ! "$GNU_CC"; then + CFLAGS="$CFLAGS -mt" + CXXFLAGS="$CXXFLAGS -mt" + fi + ;; + *-*-netbsd*) + USE_PTHREADS= + _PTHREAD_LDFLAGS= + esac +fi + +echo $ac_n "checking whether mmap() sees write()s""... $ac_c" 1>&6 +echo "configure:7048: checking whether mmap() sees write()s" >&5 + + +mmap_test_prog=' + #include + #include + #include + #include + #include + #include + + char fname[] = "conftest.file"; + char zbuff[1024]; /* Fractional page is probably worst case */ + + int main() { + char *map; + int fd; + int i; + unlink(fname); + fd = open(fname, O_RDWR | O_CREAT, 0660); + if(fd<0) return 1; + unlink(fname); + write(fd, zbuff, sizeof(zbuff)); + lseek(fd, 0, SEEK_SET); + map = (char*)mmap(0, sizeof(zbuff), PROT_READ, MAP_SHARED, fd, 0); + if(map==(char*)-1) return 2; + for(i=0; fname[i]; i++) { + int rc = write(fd, &fname[i], 1); + if(map[i]!=fname[i]) return 4; + } + return 0; + } +' + + +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 +then + result="yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + result="no" +fi +rm -fr conftest* +fi + + +echo "$ac_t"""$result"" 1>&6 + +if test "$result" = "no"; then + cat >> confdefs.h <<\EOF +#define MMAP_MISSES_WRITES 1 +EOF + +fi + + +if test $ac_cv_prog_gcc = yes; then + echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 +echo "configure:7116: 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 +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "$ac_pattern" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_prog_gcc_traditional=yes +else + rm -rf conftest* + ac_cv_prog_gcc_traditional=no +fi +rm -f conftest* + + + if test $ac_cv_prog_gcc_traditional = no; then + cat > conftest.$ac_ext < +Autoconf TCGETA +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "$ac_pattern" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_prog_gcc_traditional=yes +fi +rm -f conftest* + + fi +fi + +echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi +fi + +echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 +echo "configure:7162: 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 + if test "$cross_compiling" = yes; then + 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 +then + ac_cv_func_memcmp_clean=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_memcmp_clean=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 +test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" + +for ac_func in random strerror lchown fchmod snprintf localtime_r statvfs memmove rint +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:7200: 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 < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:7228: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in nl_langinfo strtok_r +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:7255: 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 < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:7283: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + +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 gnu_get_libc_version()""... $ac_c" 1>&6 +echo "configure:7316: 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 < + #endif + +int main() { +const char *glibc_version = gnu_get_libc_version(); +; return 0; } +EOF +if { (eval echo configure:7332: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func_gnu_get_libc_version=no + +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_func_gnu_get_libc_version" 1>&6 + +if test "$ac_cv_func_gnu_get_libc_version" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_GNU_GET_LIBC_VERSION 1 +EOF + +fi +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 + + +echo $ac_n "checking whether va_list assignments need array notation""... $ac_c" 1>&6 +echo "configure:7363: checking whether va_list assignments need array notation" >&5 +if eval "test \"`echo '$''{'ac_cv_valistisarray'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_valistisarray=false +else + cat > conftest.$ac_ext < + #include + void foo(int i, ...) { + va_list ap1, ap2; + va_start(ap1, i); + ap2 = ap1; + if (va_arg(ap2, int) != 123 || va_arg(ap1, int) != 123) { exit(1); } + va_end(ap1); va_end(ap2); + } + int main() { foo(0, 123); return(0); } +EOF +if { (eval echo configure:7384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_valistisarray=false +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_valistisarray=true +fi +rm -fr conftest* +fi + +fi + + +if test "$ac_cv_valistisarray" = true ; then + cat >> confdefs.h <<\EOF +#define HAVE_VA_LIST_AS_ARRAY 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +case "$target" in + *-linux*) + curdir=`pwd` + rm -f conftest* /tmp/conftest* + cat >> conftest.C <<\EOF +#include +#include +#include +#ifdef _dl_loaded +void __dump_link_map(void) { + struct link_map *map = _dl_loaded; + while (NULL != map) {printf("0x%08x %s\n", map->l_addr, map->l_name); map = map->l_next;} +} +int main() { + dlopen("./conftest1.so",RTLD_LAZY); + dlopen("./../tmp/conftest1.so",RTLD_LAZY); + dlopen("/tmp/conftest1.so",RTLD_LAZY); + dlopen("/tmp/../tmp/conftest1.so",RTLD_LAZY); + __dump_link_map(); +} +#else +/* _dl_loaded isn't defined, so this should be either a libc5 (glibc1) system, or a glibc2 system that doesn't have the multiple load bug (i.e., RH6.0).*/ +int main() { printf("./conftest1.so\n"); } +#endif +EOF + + cat >> conftest1.C <<\EOF +#include +void foo(void) {printf("foo in dll called\n");} +EOF + + ${CXX-g++} -fPIC -c -g conftest1.C + ${CXX-g++} -shared -Wl,-h -Wl,conftest1.so -o conftest1.so conftest1.o + ${CXX-g++} -g conftest.C -o conftest -ldl + cp -f conftest1.so conftest /tmp + cd /tmp + if test `./conftest | grep conftest1.so | wc -l` -gt 1 + then + echo + echo "*** Your libc has a bug that can result in loading the same dynamic" + echo "*** library multiple times. This bug is known to be fixed in glibc-2.0.7-32" + echo "*** or later. However, if you choose not to upgrade, the only effect" + echo "*** will be excessive memory usage at runtime." + echo + fi + cd ${curdir} + rm -f conftest* /tmp/conftest* + ;; +esac + +if test "$GNU_CXX"; then + + _MOZ_RTTI_FLAGS=${_COMPILER_PREFIX}-fno-rtti + + echo $ac_n "checking for C++ exceptions flag""... $ac_c" 1>&6 +echo "configure:7464: 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 +else + echo "int main() { return 0; }" | cat > conftest.C + + ${CXX-g++} ${CXXFLAGS} -c -fno-handle-exceptions conftest.C > conftest.out 2>&1 + + if egrep "warning.*renamed" conftest.out >/dev/null; then + ac_cv_cxx_exceptions_flags=${_COMPILER_PREFIX}-fno-exceptions + else + ac_cv_cxx_exceptions_flags=${_COMPILER_PREFIX}-fno-handle-exceptions + fi + + rm -f conftest* +fi + + + echo "$ac_t""$ac_cv_cxx_exceptions_flags" 1>&6 + _MOZ_EXCEPTIONS_FLAGS=$ac_cv_cxx_exceptions_flags +fi +if test "$MIPSPRO_CXX"; then + _MOZ_EXCEPTIONS_FLAGS="-LANG:exceptions=OFF" +fi + +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 ios::binary""... $ac_c" 1>&6 +echo "configure:7499: checking for ios::binary" >&5 +if eval "test \"`echo '$''{'ac_cv_ios_binary'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < + #include +int main() { +char *buffer = "config.log"; + fstream *mFileStream=new fstream(buffer, ios::binary); +; return 0; } +EOF +if { (eval echo configure:7513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_ios_binary=true +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_ios_binary=false +fi +rm -f conftest* +fi + +if test "$ac_cv_ios_binary" = true ; then + cat >> confdefs.h <<\EOF +#define HAVE_IOS_BINARY 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +echo $ac_n "checking for ios::bin""... $ac_c" 1>&6 +echo "configure:7537: checking for ios::bin" >&5 +if eval "test \"`echo '$''{'ac_cv_ios_bin'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < + #include +int main() { +char *buffer = "config.log"; + fstream *mFileStream=new fstream(buffer, ios::bin); +; return 0; } +EOF +if { (eval echo configure:7551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_ios_bin=true +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_ios_bin=false +fi +rm -f conftest* +fi + +if test "$ac_cv_ios_bin" = true ; then + cat >> confdefs.h <<\EOF +#define HAVE_IOS_BIN 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking for C++ \"explicit\" keyword""... $ac_c" 1>&6 +echo "configure:7574: 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 + rm -rf conftest* + ac_cv_cpp_explicit=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cpp_explicit=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_cpp_explicit" 1>&6 +if test "$ac_cv_cpp_explicit" = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_CPP_EXPLICIT 1 +EOF + +fi + +echo $ac_n "checking for C++ template specialization support""... $ac_c" 1>&6 +echo "configure:7610: checking for C++ template specialization support" >&5 +if eval "test \"`echo '$''{'ac_cv_cpp_template_specialization'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < struct X { int a; }; + class Y {}; + struct X { double a; }; +int main() { +X int_x; + X y_x; +; return 0; } +EOF +if { (eval echo configure:7625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cpp_template_specialization=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cpp_template_specialization=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_cpp_template_specialization" 1>&6 +case "$target" in + *-*-solaris*) + if test ! "$GNU_CC"; then + if test ! -z "`${CC} -V 2>&1 | head -1 | grep '4.2'`"; then + ac_cv_cpp_template_specialization=no + fi + fi + ;; +esac +if test "$ac_cv_cpp_template_specialization" = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_CPP_SPECIALIZATION 1 +EOF + +fi + +echo $ac_n "checking for modern C++ template specialization syntax support""... $ac_c" 1>&6 +echo "configure:7655: 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 {}; + template <> struct X { double a; }; +int main() { +X int_x; + X y_x; +; return 0; } +EOF +if { (eval echo configure:7670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cpp_modern_specialize_template_syntax=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cpp_modern_specialize_template_syntax=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_cpp_modern_specialize_template_syntax" 1>&6 +if test "$ac_cv_cpp_modern_specialize_template_syntax" = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX 1 +EOF + +fi + + +echo $ac_n "checking whether partial template specialization works""... $ac_c" 1>&6 +echo "configure:7692: 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 {}; +int main() { +return 0; +; return 0; } +EOF +if { (eval echo configure:7705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cpp_partial_specialization=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cpp_partial_specialization=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_cpp_partial_specialization" 1>&6 +if test "$ac_cv_cpp_partial_specialization" = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_CPP_PARTIAL_SPECIALIZATION 1 +EOF + +fi + + +echo $ac_n "checking whether operators must be re-defined for templates derived from templates""... $ac_c" 1>&6 +echo "configure:7727: 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 + Base operator+(const Base& lhs, const Base& rhs) { return lhs; } + template class Derived : public Base { }; +int main() { +Derived a, b; + Base c = a + b; + return 0; +; return 0; } +EOF +if { (eval echo configure:7744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_need_derived_template_operators=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_need_derived_template_operators=yes +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_need_derived_template_operators" 1>&6 +if test "$ac_cv_need_derived_template_operators" = yes ; then + cat >> confdefs.h <<\EOF +#define NEED_CPP_DERIVED_TEMPLATE_OPERATORS 1 +EOF + +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:7766: 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 { }; + template int foo(const Base&) { return 0; } +int main() { +Derived bar; return foo(bar); +; return 0; } +EOF +if { (eval echo configure:7780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_need_cpp_template_cast_to_base=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_need_cpp_template_cast_to_base=yes +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_need_cpp_template_cast_to_base" 1>&6 +if test "$ac_cv_need_cpp_template_cast_to_base" = yes ; then + cat >> confdefs.h <<\EOF +#define NEED_CPP_TEMPLATE_CAST_TO_BASE 1 +EOF + +fi + +echo $ac_n "checking whether the compiler can resolve const ambiguities for templates""... $ac_c" 1>&6 +echo "configure:7801: 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 { + public: T* ptr; + }; + + template T* a(ptrClass *arg) { + return arg->ptr; + } + + template + const T* a(const ptrClass *arg) { + return arg->ptr; + } + +int main() { + ptrClass i; + a(&i); +; return 0; } +EOF +if { (eval echo configure:7827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_can_resolve_const_ambiguity=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_can_resolve_const_ambiguity=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_can_resolve_const_ambiguity" 1>&6 +if test "$ac_cv_can_resolve_const_ambiguity" = no ; then + cat >> confdefs.h <<\EOF +#define CANT_RESOLVE_CPP_CONST_AMBIGUITY 1 +EOF + +fi + + +echo $ac_n "checking whether the C++ \"using\" keyword can change access""... $ac_c" 1>&6 +echo "configure:7849: checking whether the C++ \"using\" keyword can change access" >&5 +if eval "test \"`echo '$''{'ac_cv_cpp_access_changing_using'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cpp_access_changing_using=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cpp_access_changing_using=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_cpp_access_changing_using" 1>&6 +if test "$ac_cv_cpp_access_changing_using" = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_CPP_ACCESS_CHANGING_USING 1 +EOF + +fi + +echo $ac_n "checking whether the C++ \"using\" keyword resolves ambiguity""... $ac_c" 1>&6 +echo "configure:7886: 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 + rm -rf conftest* + ac_cv_cpp_ambiguity_resolving_using=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cpp_ambiguity_resolving_using=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_cpp_ambiguity_resolving_using" 1>&6 +if test "$ac_cv_cpp_ambiguity_resolving_using" = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_CPP_AMBIGUITY_RESOLVING_USING 1 +EOF + +fi + +echo $ac_n "checking for \"std::\" namespace""... $ac_c" 1>&6 +echo "configure:7928: 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:7940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cpp_namespace_std=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cpp_namespace_std=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_cpp_namespace_std" 1>&6 +if test "$ac_cv_cpp_namespace_std" = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_CPP_NAMESPACE_STD 1 +EOF + +fi + +echo $ac_n "checking whether standard template operator!=() is ambiguous""... $ac_c" 1>&6 +echo "configure:7961: 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 {}; + int operator==(const T1&, const T1&) { return 0; } + int operator!=(const T1&, const T1&) { return 0; } +int main() { +T1 a,b; return a != b; +; return 0; } +EOF +if { (eval echo configure:7976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cpp_unambiguous_std_notequal=unambiguous +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cpp_unambiguous_std_notequal=ambiguous +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_cpp_unambiguous_std_notequal" 1>&6 +if test "$ac_cv_cpp_unambiguous_std_notequal" = unambiguous ; then + cat >> confdefs.h <<\EOF +#define HAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL 1 +EOF + +fi + + +echo $ac_n "checking for C++ reinterpret_cast""... $ac_c" 1>&6 +echo "configure:7998: 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:8011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cpp_reinterpret_cast=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cpp_reinterpret_cast=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_cpp_reinterpret_cast" 1>&6 +if test "$ac_cv_cpp_reinterpret_cast" = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_CPP_NEW_CASTS 1 +EOF + +fi + +echo $ac_n "checking for C++ dynamic_cast to void*""... $ac_c" 1>&6 +echo "configure:8032: 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 + if test "$cross_compiling" = yes; then + ac_cv_cpp_dynamic_cast_void_ptr=no +else + cat > conftest.$ac_ext <(subx))) || + (((void*)&mdo != (void*)suby) && + ((void*)&mdo == dynamic_cast(suby)))); + } +EOF +if { (eval echo configure:8059: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_cpp_dynamic_cast_void_ptr=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_cpp_dynamic_cast_void_ptr" 1>&6 +if test "$ac_cv_cpp_dynamic_cast_void_ptr" = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR 1 +EOF + +fi + + +echo $ac_n "checking whether C++ requires implementation of unused virtual methods""... $ac_c" 1>&6 +echo "configure:8083: 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 + rm -rf conftest* + ac_cv_cpp_unused_required=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cpp_unused_required=yes +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_cpp_unused_required" 1>&6 +if test "$ac_cv_cpp_unused_required" = yes ; then + cat >> confdefs.h <<\EOF +#define NEED_CPP_UNUSED_IMPLEMENTATIONS 1 +EOF + +fi + + + +echo $ac_n "checking for trouble comparing to zero near std::operator!=()""... $ac_c" 1>&6 +echo "configure:8118: 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 {}; + class T2; + template int operator==(const T2*, const T&) { return 0; } + template int operator!=(const T2*, const T&) { return 0; } +int main() { +Foo f; return (0 != f); +; return 0; } +EOF +if { (eval echo configure:8134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_trouble_comparing_to_zero=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_trouble_comparing_to_zero=yes +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_trouble_comparing_to_zero" 1>&6 +if test "$ac_cv_trouble_comparing_to_zero" = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_CPP_TROUBLE_COMPARING_TO_ZERO 1 +EOF + +fi + + + +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 + + + +echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 +echo "configure:8166: 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:8178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_i18n_lc_messages=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_i18n_lc_messages=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_i18n_lc_messages" 1>&6 +if test "$ac_cv_i18n_lc_messages" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_I18N_LC_MESSAGES 1 +EOF + +fi + + + + +# External Packages + # Check whether --with-system-nspr or --without-system-nspr was given. if test "${with_system_nspr+set}" = set; then withval="$with_system_nspr" - if test "$withval" = "no"; then - _NO_NSPR=1 - fi + if test "$enableval" = "no"; then + _NO_NSPR=1 + elif test "$enableval" = "yes"; then + : + else + { echo "configure: error: Option, system-nspr, does not take an argument ($enableval)." 1>&2; exit 1; } + fi fi - + if test -z "$_NO_NSPR"; then # Check whether --with-nspr-prefix or --without-nspr-prefix was given. @@ -5418,7 +8249,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:5422: checking for $ac_word" >&5 +echo "configure:8253: 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 @@ -5453,7 +8284,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:5457: checking for NSPR - version >= $min_nspr_version (skipping)" >&5 +echo "configure:8288: checking for NSPR - version >= $min_nspr_version (skipping)" >&5 no_nspr="" if test "$NSPR_CONFIG" = "no"; then @@ -5497,109 +8328,553 @@ if test -z "$MOZ_NATIVE_NSPR"; then esac fi +if test -z "$with_system_jpeg" && test "$with_jpeg"; then + with_system_jpeg=$with_jpeg +fi +# Check whether --with-system-jpeg or --without-system-jpeg was given. +if test "${with_system_jpeg+set}" = set; then + withval="$with_system_jpeg" + JPEG_DIR=$withval +fi -# Check whether --enable-xinerama or --disable-xinerama was given. -if test "${enable_xinerama+set}" = set; then - enableval="$enable_xinerama" - if test "$enableval" = "yes"; then - if test -n "$MOZ_XINERAMA_LIBS" && \ - test -n "$ac_cv_header_X11_extensions_Xinerama_h"; then - MOZ_ENABLE_XINERAMA=1 - cat >> confdefs.h <<\EOF -#define MOZ_ENABLE_XINERAMA 1 +_SAVE_CFLAGS=$CFLAGS +_SAVE_LDFLAGS=$LDFLAGS +_SAVE_LIBS=$LIBS +if test -n "${JPEG_DIR}"; then + CFLAGS="-I${JPEG_DIR}/include $CFLAGS" + LDFLAGS="-L${JPEG_DIR}/lib $LDFLAGS" +fi +if test "$JPEG_DIR" = no; then + SYSTEM_JPEG= +else + echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6 +echo "configure:8353: 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 +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 + 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 +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SYSTEM_JPEG=1 JPEG_LIBS="-ljpeg $JPEG_LIBS" +else + echo "$ac_t""no" 1>&6 +SYSTEM_JPEG= +fi +fi + +if test "$SYSTEM_JPEG" = 1; then + LIBS="$JPEG_LIBS $LIBS" + if test "$cross_compiling" = yes; then + SYSTEM_JPEG= +else + cat > conftest.$ac_ext < + #include + #include + int main () { + #if JPEG_LIB_VERSION >= $MOZJPEG + exit(0); + #else + exit(1); + #endif + } + +EOF +if { (eval echo configure:8415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + SYSTEM_JPEG=1 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + SYSTEM_JPEG= JPEG_CFLAGS= JPEG_LIBS= +fi +rm -fr conftest* +fi + + rm -f core +fi +CFLAGS=$_SAVE_CFLAGS +LDFLAGS=$_SAVE_LDFLAGS +LIBS=$_SAVE_LIBS + +if test -n "${JPEG_DIR}" -a -d "${JPEG_DIR}" -a "$SYSTEM_JPEG" = 1; then + JPEG_CFLAGS="-I${JPEG_DIR}/include" + JPEG_LIBS="-L${JPEG_DIR}/lib ${JPEG_LIBS}" +fi + +if test -z "$with_system_zlib" && test "$with_zlib"; then + with_system_zlib=$with_zlib +fi +# Check whether --with-system-zlib or --without-system-zlib was given. +if test "${with_system_zlib+set}" = set; then + withval="$with_system_zlib" + ZLIB_DIR=$withval +fi + + +_SAVE_CFLAGS=$CFLAGS +_SAVE_LDFLAGS=$LDFLAGS +if test -n "${ZLIB_DIR}"; then + CFLAGS="-I${ZLIB_DIR}/include $CFLAGS" + LDFLAGS="-L${ZLIB_DIR}/lib $LDFLAGS" +fi +if test "$ZLIB_DIR" = no; then + SYSTEM_ZLIB= +else + echo $ac_n "checking "for zlib.h"""... $ac_c" 1>&6 +echo "configure:8458: checking "for zlib.h"" >&5 + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + result="yes" SYSTEM_ZLIB=1 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + result="no" SYSTEM_ZLIB= +fi +rm -f conftest* + echo "$ac_t"""$result"" 1>&6 +fi +if test "$SYSTEM_ZLIB" = 1; then + echo $ac_n "checking for gzread in -lz""... $ac_c" 1>&6 +echo "configure:8481: 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 +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 + 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 + SYSTEM_ZLIB=1 ZLIB_LIBS="-lz $ZLIB_LIBS" +else + echo "$ac_t""no" 1>&6 +SYSTEM_ZLIB= ZLIB_CFLAGS= ZLIB_LIBS= +fi + +fi +CFLAGS=$_SAVE_CFLAGS +LDFLAGS=$_SAVE_LDFLAGS + +if test "${ZLIB_DIR}" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then + ZLIB_CFLAGS="-I${ZLIB_DIR}/include" + ZLIB_LIBS="-L${ZLIB_DIR}/lib ${ZLIB_LIBS}" +fi + +if test -z "$with_system_png" && test "$with_png"; then + with_system_png=$with_png +fi +# Check whether --with-system-png or --without-system-png was given. +if test "${with_system_png+set}" = set; then + withval="$with_system_png" + PNG_DIR=$withval +fi + + +_SAVE_CFLAGS=$CFLAGS +_SAVE_LDFLAGS=$LDFLAGS +_SAVE_LIBS=$LIBS +CFLAGS="$ZLIB_CFLAGS $CFLAGS" +LDFLAGS="$ZLIB_LIBS -lz $LDFLAGS" +if test -n "${PNG_DIR}"; then + CFLAGS="-I${PNG_DIR}/include $CFLAGS" + LDFLAGS="-L${PNG_DIR}/lib $LDFLAGS" +fi +if test "$PNG_DIR" = no; then + SYSTEM_PNG= +else + echo $ac_n "checking for png_get_valid in -lpng""... $ac_c" 1>&6 +echo "configure:8553: 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 +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 + 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 + SYSTEM_PNG=1 PNG_LIBS="-lpng $PNG_LIBS" +else + echo "$ac_t""no" 1>&6 +SYSTEM_PNG= +fi + +fi +if test "$SYSTEM_PNG" = 1; then + LIBS="$PNG_LIBS $LIBS" + if test "$cross_compiling" = yes; then + SYSTEM_PNG= +else + cat > conftest.$ac_ext < + #include + #include + int main () { + #if PNG_LIBPNG_VER >= $MOZPNG + exit(0); + #else + exit(1); + #endif + } + +EOF +if { (eval echo configure:8614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + SYSTEM_PNG=1 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + SYSTEM_PNG= PNG_CFLAGS= PNG_LIBS= +fi +rm -fr conftest* +fi + + rm -f core +fi +CFLAGS=$_SAVE_CFLAGS +LDFLAGS=$_SAVE_LDFLAGS +LIBS=$_SAVE_LIBS + +if test "${PNG_DIR}" -a -d "${PNG_DIR}" -a "$SYSTEM_PNG" = 1; then + PNG_CFLAGS="-I${PNG_DIR}/include" + PNG_LIBS="-L${PNG_DIR}/lib ${PNG_LIBS}" +fi + +if test -z "$with_system_mng" && test "$with_mng"; then + with_system_mng=$with_mng +fi +# Check whether --with-system-mng or --without-system-mng was given. +if test "${with_system_mng+set}" = set; then + withval="$with_system_mng" + MNG_DIR=$withval +fi + + +_SAVE_CFLAGS=$CFLAGS +_SAVE_LDFLAGS=$LDFLAGS +_SAVE_LIBS=$LIBS +CFLAGS="$ZLIB_CFLAGS $CFLAGS" +LDFLAGS="$ZLIB_LIBS -lz $LDFLAGS" +if test -n "${MNG_DIR}"; then + CFLAGS="-I${MNG_DIR}/include $CFLAGS" + LDFLAGS="-L${MNG_DIR}/lib $LDFLAGS" +fi +if test "$MNG_DIR" = no; then + SYSTEM_MNG= +else + echo $ac_n "checking for mng_initialize in -lmng""... $ac_c" 1>&6 +echo "configure:8660: checking for mng_initialize in -lmng" >&5 +ac_lib_var=`echo mng'_'mng_initialize | 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="-lmng $MNG_LIBS $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 + SYSTEM_MNG=1 MNG_LIBS="-lmng $MNG_LIBS" +else + echo "$ac_t""no" 1>&6 +SYSTEM_MNG= +fi + +fi +if test "$SYSTEM_MNG" = 1; then + LIBS="$MNG_LIBS $LIBS" + if test "$cross_compiling" = yes; then + SYSTEM_MNG= +else + cat > conftest.$ac_ext < + #include + #include + int main () { + #if (((MNG_VERSION_MAJOR)<<16)|((MNG_VERSION_MINOR)<<8)|(MNG_VERSION_RELEASE)) >= $MOZMNG + exit(0); + #else + exit(1); + #endif + } + +EOF +if { (eval echo configure:8721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + SYSTEM_MNG=1 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + SYSTEM_MNG= MNG_CFLAGS= MNG_LIBS= +fi +rm -fr conftest* +fi + + rm -f core +fi +CFLAGS=$_SAVE_CFLAGS +LDFLAGS=$_SAVE_LDFLAGS +LIBS=$_SAVE_LIBS + +if test "${MNG_DIR}" -a -d "${MNG_DIR}" -a "$SYSTEM_MNG" = 1; then + MNG_CFLAGS="-I${MNG_DIR}/include" + MNG_LIBS="-L${MNG_DIR}/lib ${MNG_LIBS}" +fi + + +# Toolkit Options + +if test "$no_x" != "yes"; then + if test -z "$enable_default_toolkit" && test "$enable_toolkit"; then + enable_default_toolkit=$enable_toolkit + fi + # 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=gtk +fi + + + if test "$_DEFAULT_TOOLKIT" = "gtk" \ + -o "$_DEFAULT_TOOLKIT" = "qt" \ + -o "$_DEFAULT_TOOLKIT" = "gtk2" \ + -o "$_DEFAULT_TOOLKIT" = "xlib" + then + MOZ_WIDGET_TOOLKIT=`echo "$_DEFAULT_TOOLKIT" | sed -e "s/,.*$//"` + else + { echo "configure: error: Toolkit must be xlib" 1>&2; exit 1; } + fi + + if test -z "$enable_toolkit_gtk" && test "$with_gtk"; then + enable_toolkit_gtk=$with_gtk + fi + # Check whether --enable-toolkit-gtk or --disable-toolkit-gtk was given. +if test "${enable_toolkit_gtk+set}" = set; then + enableval="$enable_toolkit_gtk" + if test "$enableval" = "yes"; then + MOZ_ENABLE_GTK=1 elif test "$enableval" = "no"; then - : + MOZ_ENABLE_GTK= else - { echo "configure: error: Option, xinerama, does not take an argument ($enableval)." 1>&2; exit 1; } + { echo "configure: error: Option, toolkit-gtk, does not take an argument ($enableval)." 1>&2; exit 1; } fi fi -MOZ_WIDGET_TOOLKIT_LDFLAGS='-lwidget_$(MOZ_WIDGET_TOOLKIT)' -MOZ_GFX_TOOLKIT_LDFLAGS='-lgfx_$(MOZ_WIDGET_TOOLKIT) $(MOZ_XLIBRGB_LDFLAGS)' -WIDGET_DLL='\"libwidget_$(MOZ_WIDGET_TOOLKIT)$(DLL_SUFFIX)\"' -GFXWIN_DLL='\"libgfx_$(MOZ_GFX_TOOLKIT)$(DLL_SUFFIX)\"' + if test -z "$enable_toolkit_xlib" && test "$with_xlib"; then + enable_toolkit_xlib=$with_xlib + fi + # Check whether --enable-toolkit-xlib or --disable-toolkit-xlib was given. +if test "${enable_toolkit_xlib+set}" = set; then + enableval="$enable_toolkit_xlib" + if test "$enableval" = "yes"; then + MOZ_ENABLE_XLIB=1 + elif test "$enableval" = "no"; then + MOZ_ENABLE_XLIB= + else + { echo "configure: error: Option, toolkit-xlib, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi -case "$target_os" in -beos*) - MOZ_WIDGET_TOOLKIT="beos" - ;; -nto*) - MOZ_WIDGET_TOOLKIT="photon" - cat >> confdefs.h <<\EOF -#define NO_X11 1 + if test -z "$enable_toolkit_qt" && test "$with_qt"; then + enable_toolkit_qt=$with_qt + fi + # Check whether --enable-toolkit-qt or --disable-toolkit-qt was given. +if test "${enable_toolkit_qt+set}" = set; then + enableval="$enable_toolkit_qt" + if test "$enableval" = "yes"; then + MOZ_ENABLE_QT=1 + elif test "$enableval" = "no"; then + MOZ_ENABLE_QT= + else + { echo "configure: error: Option, toolkit-qt, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +fi # !no_x + +cat >> confdefs.h <> confdefs.h <<\EOF #define MOZ_WIDGET_GTK 1 EOF -fi + ;; -if test "$MOZ_WIDGET_TOOLKIT" = "gtk2" -then +gtk2) MOZ_ENABLE_GTK2=1 + TK_CFLAGS='$(MOZ_GTK2_CFLAGS)' + TK_LIBS='$(MOZ_GTK2_LIBS)' cat >> confdefs.h <<\EOF #define MOZ_WIDGET_GTK2 1 EOF -fi + ;; -if test "$MOZ_WIDGET_TOOLKIT" = "xlib" -then +xlib) MOZ_ENABLE_XLIB=1 MOZ_ENABLE_XREMOTE=1 + TK_CFLAGS='$(MOZ_XLIB_CFLAGS)' + TK_LIBS='$(MOZ_XLIB_LDFLAGS)' cat >> confdefs.h <<\EOF #define MOZ_WIDGET_XLIB 1 EOF -fi + ;; -if test "$MOZ_WIDGET_TOOLKIT" = "qt" -then +qt) MOZ_ENABLE_QT=1 MOZ_ENABLE_XREMOTE=1 + TK_CFLAGS='$(MOZ_QT_CFLAGS)' + TK_LIBS='$(MOZ_QT_LDFLAGS)' cat >> confdefs.h <<\EOF #define MOZ_WIDGET_QT 1 EOF -fi + ;; -if test "$MOZ_WIDGET_TOOLKIT" = "photon" -then +photon) MOZ_ENABLE_PHOTON=1 cat >> confdefs.h <<\EOF #define MOZ_WIDGET_PHOTON 1 EOF -fi - + ;; +esac if test "$MOZ_ENABLE_XREMOTE"; then cat >> confdefs.h <<\EOF @@ -5608,23 +8883,6 @@ EOF fi -if test "$no_x" != "yes" -then - # Check whether --with-gtk or --without-gtk was given. -if test "${with_gtk+set}" = set; then - withval="$with_gtk" - - if test "$withval" = "yes" - then - MOZ_ENABLE_GTK=1 - else - MOZ_ENABLE_GTK= - fi - -fi - -fi - if test "$MOZ_ENABLE_GTK" then # Check whether --with-gtk-prefix or --without-gtk-prefix was given. @@ -5670,7 +8928,7 @@ fi # Extract the first word of "gtk-config", so it can be a program name with args. set dummy gtk-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5674: checking for $ac_word" >&5 +echo "configure:8932: 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 @@ -5705,7 +8963,7 @@ fi min_gtk_version=$GTK_VERSION echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 -echo "configure:5709: checking for GTK - version >= $min_gtk_version" >&5 +echo "configure:8967: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes @@ -5728,7 +8986,7 @@ echo "configure:5709: checking for GTK - version >= $min_gtk_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -5806,7 +9064,7 @@ main () } EOF -if { (eval echo configure:5810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -5841,7 +9099,7 @@ fi CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat > conftest.$ac_ext < @@ -5851,7 +9109,7 @@ int main() { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } EOF -if { (eval echo configure:5855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9113: \"$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" @@ -5890,59 +9148,48 @@ rm -f conftest* rm -f conf.gtktest -if test "$no_x" != "yes" -then - # Check whether --with-java-supplement or --without-java-supplement was given. -if test "${with_java_supplement+set}" = set; then - withval="$with_java_supplement" - - if test "$withval" = "yes" - then - MOZ_JAVA_SUPPLEMENT=1 - else - MOZ_JAVA_SUPPLEMENT= - fi - -fi - -fi - - MOZ_GLE= + MOZ_GLE= MOZ_GLE_LDFLAGS= - # Check whether --with-gle or --without-gle was given. -if test "${with_gle+set}" = set; then - withval="$with_gle" - - if test "$withval" = "yes" - then - MOZ_GLE=1 - MOZ_GLE_LDFLAGS=-lgle - cat >> confdefs.h <<\EOF + if test -z "$enable_gle_support" && test "$enable_gle"; then + enable_gle_support=$enable_gle + fi + # Check whether --enable-gle or --disable-gle was given. +if test "${enable_gle+set}" = set; then + enableval="$enable_gle" + if test "$enableval" = "yes"; then + MOZ_GLE=1 + MOZ_GLE_LDFLAGS=-lgle + cat >> confdefs.h <<\EOF #define MOZ_GLE 1 EOF - else - MOZ_GLE= - MOZ_GLE_LDFLAGS= - fi - + elif test "$enableval" = "no"; then + MOZ_GLE= + MOZ_GLE_LDFLAGS= + else + { echo "configure: error: Option, gle, does not take an argument ($enableval)." 1>&2; exit 1; } + fi fi # Check whether --with-static-gtk or --without-static-gtk was given. if test "${with_static_gtk+set}" = set; then withval="$with_static_gtk" - sysstaticgtk=$withval + if test "$enableval" = "yes"; then + sysstaticgtk=$enableval + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, static-gtk, does not take an argument ($enableval)." 1>&2; exit 1; } + fi fi - if test "$sysstaticgtk" != "yes" - then + if test "$sysstaticgtk" != "yes"; then MOZ_GTK_LDFLAGS=$GTK_LIBS - if test "$MOZ_GLE" - then + if test "$MOZ_GLE"; then MOZ_GTK_LDFLAGS=`echo $MOZ_GTK_LDFLAGS | sed -e 's/-lgtk/-lgle -lgtk/'` fi else @@ -5976,7 +9223,6 @@ fi fi - if test "$MOZ_ENABLE_GTK2" then @@ -5986,7 +9232,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:5990: checking for $ac_word" >&5 +echo "configure:9236: 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 @@ -6031,19 +9277,19 @@ fi echo "*** See http://www.freedesktop.org/software/pkgconfig" else echo $ac_n "checking for gtk+-2.0 >= 1.3.7""... $ac_c" 1>&6 -echo "configure:6035: checking for gtk+-2.0 >= 1.3.7" >&5 +echo "configure:9281: checking for gtk+-2.0 >= 1.3.7" >&5 if $PKG_CONFIG --exists "gtk+-2.0 >= 1.3.7" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_GTK2_CFLAGS""... $ac_c" 1>&6 -echo "configure:6042: checking MOZ_GTK2_CFLAGS" >&5 +echo "configure:9288: checking MOZ_GTK2_CFLAGS" >&5 MOZ_GTK2_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 1.3.7"` echo "$ac_t""$MOZ_GTK2_CFLAGS" 1>&6 echo $ac_n "checking MOZ_GTK2_LIBS""... $ac_c" 1>&6 -echo "configure:6047: checking MOZ_GTK2_LIBS" >&5 +echo "configure:9293: checking MOZ_GTK2_LIBS" >&5 MOZ_GTK2_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 1.3.7"` echo "$ac_t""$MOZ_GTK2_LIBS" 1>&6 else @@ -6068,129 +9314,13 @@ echo "configure:6047: checking MOZ_GTK2_LIBS" >&5 fi -if test "$no_x" != "yes" -then - MOZ_ENABLE_XPRINT=1 - - _SAVE_LDFLAGS="$LDFLAGS" - LDFLAGS="$XLDFLAGS $LDFLAGS" - echo $ac_n "checking for XpGetPrinterList in -lXp""... $ac_c" 1>&6 -echo "configure:6079: 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 -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 - 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 - XPRINT_LIBS="-lXp" -else - echo "$ac_t""no" 1>&6 -MOZ_ENABLE_XPRINT= -fi - - LDFLAGS="$_SAVE_LDFLAGS" - - MOZ_XPRINT_CFLAGS="$X_CFLAGS" - MOZ_XPRINT_LDFLAGS="$XLDFLAGS $XPRINT_LIBS" - MOZ_XPRINT_LDFLAGS="$MOZ_XPRINT_LDFLAGS $XEXT_LIBS $X11_LIBS" - - # Check whether --enable-xprint or --disable-xprint was given. -if test "${enable_xprint+set}" = set; then - enableval="$enable_xprint" - if test "$enableval" = "no"; then - - if test "$enableval" = "no"; then - MOZ_ENABLE_XPRINT= - fi - - elif test "$enableval" = "yes"; then - : - else - { echo "configure: error: Option, xprint, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - if test "$MOZ_ENABLE_XPRINT"; then - echo "configure: warning: Xprint support enabled" 1>&2 - else - echo "configure: warning: Xprint support disabled" 1>&2 - fi -fi - - -if test "$no_x" != "yes" -then - # Check whether --with-xlib or --without-xlib was given. -if test "${with_xlib+set}" = set; then - withval="$with_xlib" - - if test "$withval" = "yes" - then - MOZ_ENABLE_XLIB=1 - else - MOZ_ENABLE_XLIB= - fi - -fi - -fi - if test "$MOZ_ENABLE_XLIB" then - echo $ac_n "checking for xlib insanity""... $ac_c" 1>&6 -echo "configure:6169: checking for xlib insanity" >&5 - echo "$ac_t""yes" 1>&6 - MOZ_XLIB_CFLAGS="$X_CFLAGS" MOZ_XLIB_LDFLAGS="$XLDFLAGS" MOZ_XLIB_LDFLAGS="$MOZ_XLIB_LDFLAGS $XEXT_LIBS $X11_LIBS" fi - -if test "$no_x" != "yes" -then - # Check whether --with-qt or --without-qt was given. -if test "${with_qt+set}" = set; then - withval="$with_qt" - - if test "$withval" = "yes" - then - MOZ_ENABLE_QT=1 - else - MOZ_ENABLE_QT= - fi - -fi - -fi - if test "$MOZ_ENABLE_QT" then QTINCDIR="/include" @@ -6214,7 +9344,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:6218: checking for $ac_word" >&5 +echo "configure:9348: 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 @@ -6248,7 +9378,6 @@ test -n "$HOST_MOC" || HOST_MOC="""" if test -z "$HOST_MOC"; then { echo "configure: error: no acceptable moc preprocessor found" 1>&2; exit 1; } fi - echo "$ac_t""$HOST_MOC" 1>&6 MOC=$HOST_MOC QT_CFLAGS="-I${QTDIR}${QTINCDIR} -DQT_GENUINE_STR" @@ -6257,7 +9386,13 @@ test -n "$HOST_MOC" || HOST_MOC="""" # Check whether --with-static-qt or --without-static-qt was given. if test "${with_static_qt+set}" = set; then withval="$with_static_qt" - sysstaticqt=$withval + if test "$enableval" = "yes"; then + sysstaticqt=$withval + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, static-qt, does not take an argument ($enableval)." 1>&2; exit 1; } + fi fi @@ -6295,9 +9430,9 @@ cross_compiling=$ac_cv_prog_cxx_cross LIBS="$LIBS $QT_LIBS" echo $ac_n "checking Qt - version >= $QT_VERSION""... $ac_c" 1>&6 -echo "configure:6299: checking Qt - version >= $QT_VERSION" >&5 +echo "configure:9434: checking Qt - version >= $QT_VERSION" >&5 cat > conftest.$ac_ext < int main() { @@ -6308,7 +9443,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* result="yes" else @@ -6337,33 +9472,6 @@ fi -if test "$MOZ_WIDGET_TOOLKIT" = "gtk" -then - TK_CFLAGS="$MOZ_GTK_CFLAGS" - TK_LIBS="$MOZ_GTK_LDFLAGS" -fi - -if test "$MOZ_WIDGET_TOOLKIT" = "gtk2" -then - TK_CFLAGS="$MOZ_GTK2_CFLAGS" - TK_LIBS="$MOZ_GTK2_LIBS" -fi - -if test "$MOZ_WIDGET_TOOLKIT" = "xlib" -then - TK_CFLAGS="$MOZ_XLIB_CFLAGS" - TK_LIBS="$MOZ_XLIB_LDFLAGS" -fi - -if test "$MOZ_WIDGET_TOOLKIT" = "qt" -then - TK_CFLAGS="$MOZ_QT_CFLAGS" - TK_LIBS="$MOZ_QT_LDFLAGS" -fi - -cat >> confdefs.h <> confdefs.h <<\EOF + cat >> confdefs.h <<\EOF #define MOZ_X11 1 EOF fi +# Components and Features + +MOZ_MAIL_NEWS=1 +# Check whether --enable-mailnews or --disable-mailnews was given. +if test "${enable_mailnews+set}" = set; then + enableval="$enable_mailnews" + if test "$enableval" = "no"; then + MOZ_MAIL_NEWS= + elif test "$enableval" = "yes"; then + : + else + { echo "configure: error: Option, mailnews, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + + +MOZ_LDAP_XPCOM=1 +# Check whether --enable-ldap or --disable-ldap was given. +if test "${enable_ldap+set}" = set; then + enableval="$enable_ldap" + if test "$enableval" = "no"; then + MOZ_LDAP_XPCOM= + elif test "$enableval" = "yes"; then + : + else + { echo "configure: error: Option, ldap, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +if test "$no_x" != "yes" +then + MOZ_ENABLE_XPRINT=1 + + _SAVE_LDFLAGS="$LDFLAGS" + LDFLAGS="$XLDFLAGS $LDFLAGS" + echo $ac_n "checking for XpGetPrinterList in -lXp""... $ac_c" 1>&6 +echo "configure:9545: 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 +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 + 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 + XPRINT_LIBS="-lXp" +else + echo "$ac_t""no" 1>&6 +MOZ_ENABLE_XPRINT= +fi + + LDFLAGS="$_SAVE_LDFLAGS" + + MOZ_XPRINT_CFLAGS="$X_CFLAGS" + MOZ_XPRINT_LDFLAGS="$XLDFLAGS $XPRINT_LIBS" + MOZ_XPRINT_LDFLAGS="$MOZ_XPRINT_LDFLAGS $XEXT_LIBS $X11_LIBS" + + # Check whether --enable-xprint or --disable-xprint was given. +if test "${enable_xprint+set}" = set; then + enableval="$enable_xprint" + if test "$enableval" = "no"; then + MOZ_ENABLE_XPRINT= + elif test "$enableval" = "yes"; then + MOZ_ENABLE_XPRINT=1 + else + { echo "configure: error: Option, xprint, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + +fi + +MOZ_PSM= +# Check whether --enable-crypto or --disable-crypto was given. +if test "${enable_crypto+set}" = set; then + enableval="$enable_crypto" + if test "$enableval" = "yes"; then + MOZ_PSM=1 + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, crypto, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +MOZ_JSDEBUGGER=1 +# Check whether --enable-jsd or --disable-jsd was given. +if test "${enable_jsd+set}" = set; then + enableval="$enable_jsd" + if test "$enableval" = "no"; then + MOZ_JSDEBUGGER= + elif test "$enableval" = "yes"; then + : + else + { echo "configure: error: Option, jsd, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + + +if test "$no_x" != "yes" +then + # Check whether --enable-java-supplement or --disable-java-supplement was given. +if test "${enable_java_supplement+set}" = set; then + enableval="$enable_java_supplement" + + if test "$enableval" = "yes" + then + MOZ_JAVA_SUPPLEMENT=1 + else + MOZ_JAVA_SUPPLEMENT= + fi + +fi + +fi + +# Check whether --enable-xinerama or --disable-xinerama was given. +if test "${enable_xinerama+set}" = set; then + enableval="$enable_xinerama" + if test "$enableval" = "yes"; then + if test -n "$MOZ_XINERAMA_LIBS" && \ + test -n "$ac_cv_header_X11_extensions_Xinerama_h"; then + MOZ_ENABLE_XINERAMA=1 + cat >> confdefs.h <<\EOF +#define MOZ_ENABLE_XINERAMA 1 +EOF + +fi + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, xinerama, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +IBMBIDI=1 +# Check whether --enable-bidi or --disable-bidi was given. +if test "${enable_bidi+set}" = set; then + enableval="$enable_bidi" + if test "$enableval" = "no"; then + IBMBIDI= + elif test "$enableval" = "yes"; then + : + else + { echo "configure: error: Option, bidi, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + +if test "$IBMBIDI"; then + cat >> confdefs.h <<\EOF +#define IBMBIDI 1 +EOF + +fi + +SUNCTL= +# Check whether --enable-ctl or --disable-ctl was given. +if test "${enable_ctl+set}" = set; then + enableval="$enable_ctl" + if test "$enableval" = "yes"; then + SUNCTL=1 + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, ctl, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + +if test "$SUNCTL"; then + cat >> confdefs.h <<\EOF +#define SUNCTL 1 +EOF + +fi + +ACCESSIBILITY=1 +# Check whether --enable-accessibility or --disable-accessibility was given. +if test "${enable_accessibility+set}" = set; then + enableval="$enable_accessibility" + if test "$enableval" = "no"; then + ACCESSIBILITY= + elif test "$enableval" = "yes"; then + : + else + { echo "configure: error: Option, accessibility, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + +if test "$ACCESSIBILITY"; then + cat >> confdefs.h <<\EOF +#define ACCESSIBILITY 1 +EOF + +fi + + +MOZ_EXTENSIONS_DEFAULT="cookie wallet content-packs xml-rpc xmlextras help transformiix venkman" +MOZ_EXTENSIONS_ALL="$MOZ_EXTENSIONS_DEFAULT irc xmlterm inspector access-builtin ctl" + +if test -n "$SUNCTL"; then + MOZ_EXTENSIONS_DEFAULT="$MOZ_EXTENSIONS_DEFAULT ctl" +fi + +if test -z "$enable_extensions" && test "$with_extensions"; then + enable_extensions=$with_extensions +fi +# Check whether --enable-extensions or --disable-extensions was given. +if test "${enable_extensions+set}" = set; then + enableval="$enable_extensions" + for option in `echo $enableval | sed 's/,/ /g'`; do + if test "$option" = "yes" || test "$option" = "all"; then + MOZ_EXTENSIONS="$MOZ_EXTENSIONS $MOZ_EXTENSIONS_ALL" + elif test "$option" = "no" || test "$option" = "none"; then + MOZ_EXTENSIONS="" + elif test "$option" = "default"; then + MOZ_EXTENSIONS="$MOZ_EXTENSIONS $MOZ_EXTENSIONS_DEFAULT" + else + MOZ_EXTENSIONS="$MOZ_EXTENSIONS $option" + fi +done +else + MOZ_EXTENSIONS="$MOZ_EXTENSIONS_DEFAULT" +fi + + +if test -z "$MOZ_ENABLE_GTK" && test `echo "$MOZ_EXTENSIONS" | grep -c xmlterm` -ne 0; then + echo "configure: warning: Cannot build xmlterm without gtk toolkit. Removing xmlterm from MOZ_EXTENSIONS." 1>&2 + MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|xmlterm||'` +fi + +if test -z "$MOZ_JSDEBUGGER" && test `echo "$MOZ_EXTENSIONS" | grep -c venkman` -ne 0; then + echo "configure: warning: Cannot build venkman without JavaScript debug library. Removing venkman from MOZ_EXTENSIONS." 1>&2 + MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|venkman||'` +fi + +if test -z "$MOZ_ENABLE_GTK" && test `echo "$MOZ_EXTENSIONS" | grep -c ctl` -ne 0; then + echo "configure: warning: Cannot build ctl without glib. Removing ctl from MOZ_EXTENSIONS." 1>&2 + MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|ctl||'` +fi + +# Check whether --enable-idltool or --disable-idltool was given. +if test "${enable_idltool+set}" = set; then + enableval="$enable_idltool" + if test "$enableval" = "yes"; then + BUILD_IDLC=1 + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, idltool, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +# Check whether --enable-ldap-experimental or --disable-ldap-experimental was given. +if test "${enable_ldap_experimental+set}" = set; then + enableval="$enable_ldap_experimental" + if test "$enableval" = "yes"; then + MOZ_LDAP_XPCOM_EXPERIMENTAL=1 + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, ldap-experimental, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +# Check whether --enable-mathml or --disable-mathml was given. +if test "${enable_mathml+set}" = set; then + enableval="$enable_mathml" + if test "$enableval" = "yes"; then + MOZ_MATHML=1 + cat >> confdefs.h <<\EOF +#define MOZ_MATHML 1 +EOF + + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, mathml, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +# Check whether --enable-svg or --disable-svg was given. +if test "${enable_svg+set}" = set; then + enableval="$enable_svg" + if test "$enableval" = "yes"; then + MOZ_SVG=1 + cat >> confdefs.h <<\EOF +#define MOZ_SVG 1 +EOF + + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, svg, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +if test "$TX_EXE"; then + cat >> confdefs.h <<\EOF +#define TX_EXE 1 +EOF + + echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 +echo "configure:9842: checking whether byte ordering is bigendian" >&5 +if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_c_bigendian=unknown +# See if sys/param.h defines the BYTE_ORDER macro. +cat > conftest.$ac_ext < +#include +int main() { + +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif +; return 0; } +EOF +if { (eval echo configure:9860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + # It does; now see whether it defined to BIG_ENDIAN or not. +cat > conftest.$ac_ext < +#include +int main() { + +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif +; return 0; } +EOF +if { (eval echo configure:9875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_bigendian=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_bigendian=no +fi +rm -f conftest* +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +if test $ac_cv_c_bigendian = unknown; then +if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_c_bigendian=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_c_bigendian=yes +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_c_bigendian" 1>&6 +if test $ac_cv_c_bigendian = yes; then + cat >> confdefs.h <<\EOF +#define WORDS_BIGENDIAN 1 +EOF + +fi + + if test $ac_cv_c_bigendian = yes; then + cat >> confdefs.h <<\EOF +#define IS_BIG_ENDIAN 1 +EOF + + fi +fi + + +ENABLE_TESTS=1 +# Check whether --enable-tests or --disable-tests was given. +if test "${enable_tests+set}" = set; then + enableval="$enable_tests" + if test "$enableval" = "no"; then + ENABLE_TESTS= + elif test "$enableval" = "yes"; then + : + else + { echo "configure: error: Option, tests, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +# Individual module options + +if test -z "$enable_xpcom_lea" && test "$enable_lea"; then + enable_xpcom_lea=$enable_lea +fi +# Check whether --enable-xpcom-lea or --disable-xpcom-lea was given. +if test "${enable_xpcom_lea+set}" = set; then + enableval="$enable_xpcom_lea" + if test "$enableval" = "yes"; then + XPCOM_USE_LEA=1 cat >> confdefs.h <<\EOF +#define XPCOM_USE_LEA 1 +EOF + + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, xpcom-lea, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +if test -z "$enable_js_ultrasparc" && test "$enable_ultrasparc"; then + enable_js_ultrasparc=$enable_ultrasparc +fi +# Check whether --enable-js-ultrasparc or --disable-js-ultrasparc was given. +if test "${enable_js_ultrasparc+set}" = set; then + enableval="$enable_js_ultrasparc" + if test "$enableval" = "yes"; then + case "$target_os" in + solaris*) + case $OS_TEST in + sun4u) + JS_ULTRASPARC_OPTS=1 + ;; + esac + ;; +esac + + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, js-ultrasparc, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + + +# Features that require extra sources + +# Check whether --enable-leaky or --disable-leaky was given. +if test "${enable_leaky+set}" = set; then + enableval="$enable_leaky" + if test "$enableval" = "yes"; then + MOZ_LEAKY=1 + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, leaky, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +# Check whether --enable-jprof or --disable-jprof was given. +if test "${enable_jprof+set}" = set; then + enableval="$enable_jprof" + if test "$enableval" = "yes"; then + MOZ_JPROF=1 + cat >> confdefs.h <<\EOF +#define MOZ_JPROF 1 +EOF + + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, jprof, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +# Check whether --enable-xpctools or --disable-xpctools was given. +if test "${enable_xpctools+set}" = set; then + enableval="$enable_xpctools" + if test "$enableval" = "yes"; then + MOZ_XPCTOOLS=1 + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, xpctools, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +# Debugging and Optimizations + +MOZ_DEBUG=1 + +if test ! "$MOZ_DEBUG_FLAGS" +then + case "$target" in + *-irix*) + if test "$GNU_CC"; then + GCC_VERSION=`$CC -v 2>&1 | awk '/version/ { print $3 }'` + case "$GCC_VERSION" in + 2.95.*) + MOZ_DEBUG_FLAGS="" + ;; + *) + MOZ_DEBUG_FLAGS="-g" + ;; + esac + else + MOZ_DEBUG_FLAGS="-g" + fi + ;; + *) + MOZ_DEBUG_FLAGS="-g" + ;; + esac +fi + +# Check whether --enable-debug or --disable-debug was given. +if test "${enable_debug+set}" = set; then + enableval="$enable_debug" + if test "$enableval" = "no"; then + MOZ_DEBUG= + elif test "$enableval" = "yes"; then + : + else + { echo "configure: error: Option, debug, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +MOZ_DEBUG_ENABLE_DEFS="-DDEBUG" + case "${target_os}" in + beos*) + MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_${USER}" + ;; + *) + MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_`$WHOAMI`" + ;; + esac +MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DTRACING" + +MOZ_DEBUG_DISABLE_DEFS="-DNDEBUG -DTRIMMED" + +if test "$MOZ_DEBUG" +then + LDFLAGS="$LDFLAGS $MOZ_DEBUG_LDFLAGS" +fi + +MOZ_OPTIMIZE= +if test ! "$MOZ_OPTIMIZE_FLAGS" +then + MOZ_OPTIMIZE_FLAGS="-O" +fi + +# Check whether --enable-optimize or --disable-optimize was given. +if test "${enable_optimize+set}" = set; then + enableval="$enable_optimize" + MOZ_OPTIMIZE=1 + if test -n "$enableval" && test "$enableval" != "yes"; then + MOZ_OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'` + fi +fi + + +if test "$MOZ_OPTIMIZE" +then + CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS" + CXXFLAGS="$CXXFLAGS $MOZ_OPTIMIZE_FLAGS" + LDFLAGS="$LDFLAGS $MOZ_OPTIMIZE_LDFLAGS" +fi + +if test -z "$enable_debug_modules" && test "$with_debug_modules"; then + enable_debug_modules=$with_debug_modules +fi +# Check whether --enable-debug-modules or --disable-debug-modules was given. +if test "${enable_debug_modules+set}" = set; then + enableval="$enable_debug_modules" + MOZ_DEBUG_MODULES=`echo $enableval| sed 's/,/ /g'` +fi + + +if test -z "$enable_debugger_info_modules" && test "$with_dbgrinfo_modules"; then + enable_debugger_info_modules=$with_dbgrinfo_modules +fi +MOZ_DBGRINFO_MODULES= +# Check whether --enable-debugger-info-modules or --disable-debugger-info-modules was given. +if test "${enable_debugger_info_modules+set}" = set; then + enableval="$enable_debugger_info_modules" + for i in `echo $enableval | sed 's/,/ /g'`; do + if test "$i" = "no"; then + i="^ALL_MODULES" + fi + if test "$i" = "yes"; then + i="ALL_MODULES" + fi + MOZ_DBGRINFO_MODULES="$i $MOZ_DBGRINFO_MODULES"; + done +fi + + +MOZ_DISABLE_DTD_DEBUG= +# Check whether --enable-dtd-debug or --disable-dtd-debug was given. +if test "${enable_dtd_debug+set}" = set; then + enableval="$enable_dtd_debug" + if test "$enableval" = "no"; then + MOZ_DISABLE_DTD_DEBUG=1 + cat >> confdefs.h <<\EOF +#define MOZ_DISABLE_DTD_DEBUG 1 +EOF + + elif test "$enableval" = "yes"; then + : + else + { echo "configure: error: Option, dtd-debug, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +# Check whether --enable-boehm or --disable-boehm was given. +if test "${enable_boehm+set}" = set; then + enableval="$enable_boehm" + if test "$enableval" = "yes"; then + cat >> confdefs.h <<\EOF +#define GC_LEAK_DETECTOR 1 +EOF + + GC_LEAK_DETECTOR=1 + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, boehm, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +# Check whether --enable-logging or --disable-logging was given. +if test "${enable_logging+set}" = set; then + enableval="$enable_logging" + if test "$enableval" = "no"; then + NS_DISABLE_LOGGING=1 + elif test "$enableval" = "yes"; then + : + else + { echo "configure: error: Option, logging, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + +if test "$NS_DISABLE_LOGGING"; then + cat >> confdefs.h <<\EOF +#define NS_DISABLE_LOGGING 1 +EOF + +else + cat >> confdefs.h <<\EOF +#define MOZ_LOGGING 1 +EOF + +fi + +# Check whether --enable-crash-on-assert or --disable-crash-on-assert was given. +if test "${enable_crash_on_assert+set}" = set; then + enableval="$enable_crash_on_assert" + if test "$enableval" = "yes"; then + cat >> confdefs.h <<\EOF +#define UNIX_CRASH_ON_ASSERT 1 +EOF + + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, crash-on-assert, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +MOZ_REORDER= +# Check whether --enable-reorder or --disable-reorder was given. +if test "${enable_reorder+set}" = set; then + enableval="$enable_reorder" + if test "$enableval" = "yes"; then + MOZ_REORDER=1 + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, reorder, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +# Check whether --enable-logrefcnt or --disable-logrefcnt was given. +if test "${enable_logrefcnt+set}" = set; then + enableval="$enable_logrefcnt" + if test "$enableval" = "yes"; then + _ENABLE_LOGREFCNT=1 + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, logrefcnt, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + +if test "$_ENABLE_LOGREFCNT"; then + cat >> confdefs.h <<\EOF +#define FORCE_BUILD_REFCNT_LOGGING 1 +EOF + +else + cat >> confdefs.h <<\EOF +#define NO_BUILD_REFCNT_LOGGING 1 +EOF + +fi + +# Check whether --enable-detect-webshell-leaks or --disable-detect-webshell-leaks was given. +if test "${enable_detect_webshell_leaks+set}" = set; then + enableval="$enable_detect_webshell_leaks" + if test "$enableval" = "yes"; then + _DETECT_WEBSHELL_LEAKS=1 + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, detect-webshell-leaks, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +else + if test "$MOZ_DEBUG"; then + _DETECT_WEBSHELL_LEAKS=1 + fi +fi + + +if test "$_DETECT_WEBSHELL_LEAKS"; then + cat >> confdefs.h <<\EOF +#define DETECT_WEBSHELL_LEAKS 1 +EOF + + +fi + +# Check whether --enable-double-buffer or --disable-double-buffer was given. +if test "${enable_double_buffer+set}" = set; then + enableval="$enable_double_buffer" + if test "$enableval" = "no"; then + cat >> confdefs.h <<\EOF +#define NO_DOUBLE_BUFFER 1 +EOF + + elif test "$enableval" = "yes"; then + : + else + { echo "configure: error: Option, double-buffer, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +# Check whether --enable-wrap-malloc or --disable-wrap-malloc was given. +if test "${enable_wrap_malloc+set}" = set; then + enableval="$enable_wrap_malloc" + if test "$enableval" = "yes"; then + if test "$GNU_CC"; then + WRAP_MALLOC_CFLAGS="${LDFLAGS} -Wl,--wrap -Wl,malloc -Wl,--wrap -Wl,free -Wl,--wrap -Wl,realloc -Wl,--wrap -Wl,__builtin_new -Wl,--wrap -Wl,__builtin_vec_new -Wl,--wrap -Wl,__builtin_delete -Wl,--wrap -Wl,__builtin_vec_delete -Wl,--wrap -Wl,PR_Free -Wl,--wrap -Wl,PR_Malloc -Wl,--wrap -Wl,PR_Calloc -Wl,--wrap -Wl,PR_Realloc" + MKSHLIB='$(CXX) $(DSO_LDOPTS) $(WRAP_MALLOC_CFLAGS) -o $@' +fi + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, wrap-malloc, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +# Check whether --with-wrap-malloc or --without-wrap-malloc was given. +if test "${with_wrap_malloc+set}" = set; then + withval="$with_wrap_malloc" + WRAP_MALLOC_LIB=$withval +fi + + +# Check whether --enable-efence or --disable-efence was given. +if test "${enable_efence+set}" = set; then + enableval="$enable_efence" + if test "$enableval" = "yes"; then + echo $ac_n "checking for malloc in -lefence""... $ac_c" 1>&6 +echo "configure:10339: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lefence $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 + ac_tr_lib=HAVE_LIB`echo efence | sed -e 's/^a-zA-Z0-9_/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, efence, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +if test -z "$enable_strip" && test "$enable_strip_libs"; then + enable_strip=$enable_strip_libs +fi +# Check whether --enable-strip or --disable-strip was given. +if test "${enable_strip+set}" = set; then + enableval="$enable_strip" + if test "$enableval" = "yes"; then + ENABLE_STRIP=1 + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, strip, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +# Check whether --enable-elf-dynstr-gc or --disable-elf-dynstr-gc was given. +if test "${enable_elf_dynstr_gc+set}" = set; then + enableval="$enable_elf_dynstr_gc" + if test "$enableval" = "yes"; then + USE_ELF_DYNSTR_GC=1 + elif test "$enableval" = "no"; then + USE_ELF_DYNSTR_GC= + else + { echo "configure: error: Option, elf-dynstr-gc, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +# Profiling and Instrumenting + +MOZ_TIMELINE= +# Check whether --enable-timeline or --disable-timeline was given. +if test "${enable_timeline+set}" = set; then + enableval="$enable_timeline" + if test "$enableval" = "yes"; then + cat >> confdefs.h <<\EOF +#define MOZ_TIMELINE 1 +EOF + + MOZ_TIMELINE=1 + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, timeline, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +MOZ_REFLOW_PERF= +# Check whether --enable-reflow-perf or --disable-reflow-perf was given. +if test "${enable_reflow_perf+set}" = set; then + enableval="$enable_reflow_perf" + if test "$enableval" = "yes"; then + MOZ_REFLOW_PERF=1 + cat >> confdefs.h <<\EOF +#define MOZ_REFLOW_PREF 1 +EOF + + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, reflow-perf, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + + +# Check whether --enable-perf-metrics or --disable-perf-metrics was given. +if test "${enable_perf_metrics+set}" = set; then + enableval="$enable_perf_metrics" + if test "$enableval" = "yes"; then + MOZ_PERF_METRICS=1 + cat >> confdefs.h <<\EOF +#define MOZ_PERF_METRICS 1 +EOF + + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, perf-metrics, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +NS_TRACE_MALLOC= +# Check whether --enable-trace-malloc or --disable-trace-malloc was given. +if test "${enable_trace_malloc+set}" = set; then + enableval="$enable_trace_malloc" + if test "$enableval" = "yes"; then + NS_TRACE_MALLOC=1 + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, trace-malloc, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + +if test "$NS_TRACE_MALLOC"; then + # Please, Mr. Linker Man, don't take away our symbol names + MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS= + USE_ELF_DYNSTR_GC= + cat >> confdefs.h <<\EOF +#define NS_TRACE_MALLOC 1 +EOF + +fi + + +if test -z "$enable_eazel_profiler_support" && test "$enable_eazel_profiler"; then + enable_eazel_profiler_support=$enable_eazel_profiler +fi +# Check whether --enable-eazel-profiler-support or --disable-eazel-profiler-support was given. +if test "${enable_eazel_profiler_support+set}" = set; then + enableval="$enable_eazel_profiler_support" + if test "$enableval" = "yes"; then + ENABLE_EAZEL_PROFILER=1 + cat >> confdefs.h <<\EOF +#define ENABLE_EAZEL_PROFILER 1 +EOF + + USE_ELF_DYNSTR_GC= + MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS= + EAZEL_PROFILER_CFLAGS="-g -O -gdwarf-2 -finstrument-functions -D__NO_STRING_INLINES -D__NO_MATH_INLINES" + EAZEL_PROFILER_LIBS="-lprofiler -lpthread" + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, eazel-profiler-support, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +if test -z "$enable_profile_modules" && test "$with_profile_modules"; then + enable_profile_modules=$with_profile_modules +fi +# Check whether --enable-profile-modules or --disable-profile-modules was given. +if test "${enable_profile_modules+set}" = set; then + enableval="$enable_profile_modules" + MOZ_PROFILE_MODULES=`echo $enableval| sed 's/,/ /g'` +fi + + +# Check whether --enable-insure or --disable-insure was given. +if test "${enable_insure+set}" = set; then + enableval="$enable_insure" + if test "$enableval" = "yes"; then + MOZ_INSURE="insure" MOZ_INSURIFYING=1 MOZ_INSURE_DIRS="." MOZ_INSURE_EXCLUDE_DIRS="config" + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, insure, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +# Check whether --with-insure-dirs or --without-insure-dirs was given. +if test "${with_insure_dirs+set}" = set; then + withval="$with_insure_dirs" + MOZ_INSURE_DIRS=$withval +fi + + +# Check whether --with-insure-exclude-dirs or --without-insure-exclude-dirs was given. +if test "${with_insure_exclude_dirs+set}" = set; then + withval="$with_insure_exclude_dirs" + MOZ_INSURE_EXCLUDE_DIRS="config $withval" +fi + + +echo $ac_n "checking for cplus_demangle in -liberty""... $ac_c" 1>&6 +echo "configure:10564: checking for cplus_demangle in -liberty" >&5 +ac_lib_var=`echo iberty'_'cplus_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 +else + ac_save_LIBS="$LIBS" +LIBS="-liberty "-liberty" $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 + HAVE_DEMANGLE=1 +else + echo "$ac_t""no" 1>&6 +HAVE_DEMANGLE= +fi + + +MOZ_DEMANGLE_SYMBOLS= + +if test "$HAVE_DEMANGLE" +then + case "$target" in + *-linux*) + # Demangle only for debug or trace-malloc builds + if test "$MOZ_DEBUG" || test "$NS_TRACE_MALLOC" + then + MOZ_DEMANGLE_SYMBOLS=1 + cat >> confdefs.h <<\EOF +#define MOZ_DEMANGLE_SYMBOLS 1 +EOF + + fi + ;; + *-solaris*) + # Demangle only for debug builds which are using the Gnu compiler. + if test "$GNU_CC" + then + if test "$MOZ_DEBUG" + then + MOZ_DEMANGLE_SYMBOLS=1 + cat >> confdefs.h <<\EOF +#define MOZ_DEMANGLE_SYMBOLS 1 +EOF + + fi + fi + ;; + esac +fi + + + + +# Misc. Options + +# Check whether --enable-xterm-updates or --disable-xterm-updates was given. +if test "${enable_xterm_updates+set}" = set; then + enableval="$enable_xterm_updates" + if test "$enableval" = "yes"; then + MOZ_UPDATE_XTERM=1 + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, xterm-updates, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +if test -z "$enable_chrome_format" && test "$enable_chrome"; then + enable_chrome_format=$enable_chrome +fi +# Check whether --enable-chrome-format or --disable-chrome-format was given. +if test "${enable_chrome_format+set}" = set; then + enableval="$enable_chrome_format" + MOZ_CHROME_FILE_FORMAT=`echo $enableval | tr A-Z a-z` +fi + + +if test -z "$MOZ_CHROME_FILE_FORMAT"; then + MOZ_CHROME_FILE_FORMAT=jar +fi + +if test "$MOZ_CHROME_FILE_FORMAT" != "jar" && + test "$MOZ_CHROME_FILE_FORMAT" != "flat" && + test "$MOZ_CHROME_FILE_FORMAT" != "both"; then + { echo "configure: error: --enable-chrome-format must be set to either jar, flat or both" 1>&2; exit 1; } +fi + +# Check whether --with-default-mozilla-five-home or --without-default-mozilla-five-home was given. +if test "${with_default_mozilla_five_home+set}" = set; then + withval="$with_default_mozilla_five_home" + val=`echo $withval` + cat >> confdefs.h </dev/null; then + { echo "configure: error: "Homedir must be single relative path."" 1>&2; exit 1; } +else + cat >> confdefs.h <> confdefs.h <<\EOF +#define MOZ_USER_DIR ".mozilla" +EOF + +fi + + +VERBOSE_CONFIG_DEFS=1 +# Check whether --enable-verbose-config-defs or --disable-verbose-config-defs was given. +if test "${enable_verbose_config_defs+set}" = set; then + enableval="$enable_verbose_config_defs" + if test "$enableval" = "yes"; then + VERBOSE_CONFIG_DEFS= + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, verbose-config-defs, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +# Compiler Options + +# Check whether --enable-gcc-pipe or --disable-gcc-pipe was given. +if test "${enable_gcc_pipe+set}" = set; then + enableval="$enable_gcc_pipe" + if test "$enableval" = "no"; then + NO_GCC_PIPE=1 + elif test "$enableval" = "yes"; then + : + else + { echo "configure: error: Option, gcc-pipe, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6 +echo "configure:10740: checking for gcc -pipe support" >&5 +if test -n "$NO_GCC_PIPE"; then + echo "$ac_t""disabled" 1>&6 +elif 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 + ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5 + cat dummy-hello.s | ${AS} -o dummy-hello.S - 2>&5 + if test $? = 0; then + _res_as_stdin="yes" + else + _res_as_stdin="no" + fi + if test "$_res_as_stdin" = "yes"; then + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -pipe" + cat > conftest.$ac_ext < +int main() { +printf("Hello World\n"); +; return 0; } +EOF +if { (eval echo configure:10764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + _res_gcc_pipe="yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + _res_gcc_pipe="no" +fi +rm -f conftest* + CFLAGS=$_SAVE_CFLAGS + fi + if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then + _res="yes"; + CFLAGS="$CFLAGS -pipe" + CXXFLAGS="$CXXFLAGS -pipe" + else + _res="no" + fi + rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out + echo "$ac_t""$_res" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +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 + + +# Check whether --enable-pedantic or --disable-pedantic was given. +if test "${enable_pedantic+set}" = set; then + enableval="$enable_pedantic" + if test "$enableval" = "no"; then + _PEDANTIC= + elif test "$enableval" = "yes"; then + : + else + { echo "configure: error: Option, pedantic, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + +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:10813: 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 +then + result="no" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + result="yes" +fi +rm -fr conftest* +fi + + echo "$ac_t""$result" 1>&6 + CXXFLAGS="$_SAVE_CXXFLAGS" + + case "$result" in + no) + _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} ${_COMPILER_PREFIX}-pedantic" + _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic" + ;; + yes) + { echo "configure: error: Your compiler appears to have a known bug where long long is miscompiled when using -pedantic. Reconfigure using --disable-pedantic. " 1>&2; exit 1; } + ;; + maybe) + echo "configure: warning: Cannot test -pedantic long long bug when cross-compiling." 1>&2 + ;; + esac +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:10860: 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 < + class Pointer + { + public: + T* myPtr; + }; + + template + int operator==(const Pointer& rhs, U* lhs) + { + return rhs.myPtr == lhs; + } + + template + int operator==(const Pointer& rhs, const U* lhs) + { + return rhs.myPtr == lhs; + } + +int main() { + + Pointer foo; + const int* bar; + return foo == bar; + +; return 0; } +EOF +if { (eval echo configure:10895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_nscap_nonconst_opeq_bug="no" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_nscap_nonconst_opeq_bug="yes" +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_nscap_nonconst_opeq_bug" 1>&6 +CXXFLAGS="$_SAVE_CXXFLAGS" + +if test "$ac_nscap_nonconst_opeq_bug" = "yes" ; then + cat >> confdefs.h <<\EOF +#define NSCAP_DONT_PROVIDE_NONCONST_OPEQ 1 +EOF + +fi + +# Check whether --enable-long-long-warning or --disable-long-long-warning was given. +if test "${enable_long_long_warning+set}" = set; then + enableval="$enable_long_long_warning" + if test "$enableval" = "yes"; then + _IGNORE_LONG_LONG_WARNINGS= + elif test "$enableval" = "no"; then + _IGNORE_LONG_LONG_WARNINGS=1 + else + { echo "configure: error: Option, long-long-warning, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +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:10934: checking whether compiler supports -Wno-long-long" >&5 + cat > conftest.$ac_ext <&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" + 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 + CFLAGS="$_SAVE_CFLAGS" +fi + +# Check whether --enable-cpp-rtti or --disable-cpp-rtti was given. +if test "${enable_cpp_rtti+set}" = set; then + enableval="$enable_cpp_rtti" + if test "$enableval" = "yes"; then + _MOZ_RTTI_FLAGS=-frtti + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, cpp-rtti, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +# Check whether --enable-cpp-exceptions or --disable-cpp-exceptions was given. +if test "${enable_cpp_exceptions+set}" = set; then + enableval="$enable_cpp_exceptions" + if test "$enableval" = "yes"; then + if test "$MIPSPRO_CXX"; then + _MOZ_EXCEPTIONS_FLAGS=-LANG:exceptions=ON +else + _MOZ_EXCEPTIONS_FLAGS=-fexceptions +fi + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, cpp-exceptions, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +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 + + +# OS/2 Build Options + +# Check whether --with-os2emx or --without-os2emx was given. +if test "${with_os2emx+set}" = set; then + withval="$with_os2emx" + MOZ_OS2_TOOLS=EMX + MOZ_OS2_EMX_OBJECTFORMAT="$withval" + cat >> confdefs.h <<\EOF +#define XP_OS2_EMX 1 +EOF + +fi + + +# Check whether --with-os2vacpp or --without-os2vacpp was given. +if test "${with_os2vacpp+set}" = set; then + withval="$with_os2vacpp" + if test "$enableval" = "yes"; then + MOZ_OS2_TOOLS=VACPP + cat >> confdefs.h <<\EOF +#define XP_OS2_VACPP 1 +EOF + + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, os2vacpp, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +# Build dependencies + +MOZ_AUTO_DEPS=1 +# Check whether --enable-auto-deps or --disable-auto-deps was given. +if test "${enable_auto_deps+set}" = set; then + enableval="$enable_auto_deps" + if test "$enableval" = "no"; then + MOZ_AUTO_DEPS= + elif test "$enableval" = "yes"; then + : + else + { echo "configure: error: Option, auto-deps, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +if test -n "$MOZ_AUTO_DEPS"; then +_cpp_md_flag= +# Check whether --enable-md or --disable-md was given. +if test "${enable_md+set}" = set; then + enableval="$enable_md" + if test "$enableval" = "no"; then + : + elif test "$enableval" = "yes"; then + _cpp_md_flag=1 + else + { echo "configure: error: Option, md, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +else + if test "$GNU_CC" -a "$GNU_CXX"; then + _cpp_md_flag=1 + fi +fi + +if test "$_cpp_md_flag"; then + COMPILER_DEPEND=1 + _DEPEND_CFLAGS='$(filter-out %/.pp,-Wp,-MD,$(MDDEPDIR)/$(*F).pp)' +fi +fi # MOZ_AUTO_DEPS +MDDEPDIR='.deps' + + + + + +# Static build options + +BUILD_SHARED_LIBS=1 +BUILD_STATIC_LIBS= +MOZ_STATIC_COMPONENT_LIBS= + +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + if test "$enableval" = "no"; then + BUILD_SHARED_LIBS= + elif test "$enableval" = "yes"; then + : + else + { echo "configure: error: Option, shared, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +# Check whether --enable-static or --disable-static was given. +if test "${enable_static+set}" = set; then + enableval="$enable_static" + if test "$enableval" = "yes"; then + BUILD_STATIC_LIBS=1 + MOZ_STATIC_COMPONENT_LIBS=1 + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, static, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + + +if (test -z "$BUILD_SHARED_LIBS" && test -z "$BUILD_STATIC_LIBS") || + (test -n "$BUILD_SHARED_LIBS" && test -n "$BUILD_STATIC_LIBS") ; then + { echo "configure: error: Only one of --enable-shared or --enable-static must be specified." 1>&2; exit 1; } +fi + +if test -z "$enable_meta_component_modules" && test "$enable_static_components"; then + enable_meta_component_modules=$enable_static_components +fi +# Check whether --enable-meta-component-modules or --disable-meta-component-modules was given. +if test "${enable_meta_component_modules+set}" = set; then + enableval="$enable_meta_component_modules" + MOZ_STATIC_COMPONENTS=`echo $enableval | sed 's/,/ /g'` +fi + + +# Check whether --enable-meta-components or --disable-meta-components was given. +if test "${enable_meta_components+set}" = set; then + enableval="$enable_meta_components" + MOZ_META_COMPONENTS=`echo $enableval | sed 's/,/ /g'` +fi + + +if test -n "$MOZ_STATIC_COMPONENTS" && test -n "$MOZ_META_COMPONENTS"; then + { echo "configure: error: Simultaneous use of static-components & meta-components is not supported." 1>&2; exit 1; } +fi + +case "$target" in + *-*-aix*) + if test -z "${BUILD_STATIC_LIBS}" -o -n "${BUILD_SHARED_LIBS}"; then + if test -f /usr/lpp/xlC/bin/makeC++SharedLib_r; then + AIX_SHLIB_BIN='/usr/lpp/xlC/bin/makeC++SharedLib_r' + elif test -f /usr/ibmcxx/bin/makeC++SharedLib_r; then + AIX_SHLIB_BIN='/usr/ibmcxx/bin/makeC++SharedLib_r' + fi + # Extract the first word of "makeC++SharedLib_r", so it can be a program name with args. +set dummy makeC++SharedLib_r; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:11143: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_AIX_SHLIB_BIN'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$AIX_SHLIB_BIN" in + /*) + ac_cv_path_AIX_SHLIB_BIN="$AIX_SHLIB_BIN" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_AIX_SHLIB_BIN="$AIX_SHLIB_BIN" # 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_AIX_SHLIB_BIN="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_AIX_SHLIB_BIN" && ac_cv_path_AIX_SHLIB_BIN=":" + ;; +esac +fi +AIX_SHLIB_BIN="$ac_cv_path_AIX_SHLIB_BIN" +if test -n "$AIX_SHLIB_BIN"; then + echo "$ac_t""$AIX_SHLIB_BIN" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test ! -n "$AIX_SHLIB_BIN"; then + echo + echo "*** Unable to locate makeC++SharedLib_r, needed for creation of shared" + echo "*** libraries on AIX. You will only be able to build static libraries." + echo + BUILD_STATIC_LIBS=1 + BUILD_SHARED_LIBS= + fi + fi + + ;; + +*-os2*) + if test "${BUILD_STATIC_LIBS}" = "1"; then + MOZ_JS_LIBS='$(DIST)/lib/libmozjs.lib' + MOZ_COMPONENT_XPCOM_LIBS='$(DIST)/lib/libxpcom.lib' + XPCOM_LIBS='$(DIST)/lib/libxpcom.lib' + MOZ_JPEG_LIBS='$(DIST)/lib/libmozjpeg.$(LIB_SUFFIX)' + MOZ_ZLIB_LIBS='$(DIST)/lib/libmozz.$(LIB_SUFFIX)' + MOZ_PNG_LIBS='$(DIST)/lib/libmozpng.$(LIB_SUFFIX)' + MOZ_MNG_LIBS='$(DIST)/lib/libmozmng.$(LIB_SUFFIX)' + else + MOZ_JS_LIBS='$(DIST)/lib/mozjs.lib' + MOZ_COMPONENT_XPCOM_LIBS='$(DIST)/lib/xpcom.lib' + XPCOM_LIBS='$(DIST)/lib/xpcom.lib' + MOZ_JPEG_LIBS='$(DIST)/lib/libmozjpeg.$(LIB_SUFFIX)' + MOZ_ZLIB_LIBS='$(DIST)/lib/mozz.$(LIB_SUFFIX)' + MOZ_PNG_LIBS='$(DIST)/lib/libmozpng.$(LIB_SUFFIX)' + MOZ_MNG_LIBS='$(DIST)/lib/libmozmng.$(LIB_SUFFIX)' + fi + ;; + +esac + +# Standalone module options (Not for building Mozilla) + +BUILD_MODULES=all +# Check whether --enable-standalone-modules or --disable-standalone-modules was given. +if test "${enable_standalone_modules+set}" = set; then + enableval="$enable_standalone_modules" + BUILD_MODULES=`echo $enableval | sed 's/,/ /g'` +fi + + +if test "${BUILD_MODULES}" = "all" && test -n "$enable_modules"; then + BUILD_MODULES=`echo $enable_modules | sed 's/,/ /g'` +fi + +if test "$BUILD_MODULES" != "all" && + test `echo "$BUILD_MODULES" | grep -c ldap` -ne 0 && + test "$enable_ldap" != "yes"; then + MOZ_LDAP_XPCOM= +fi + SKIP_IDL_CHECK="no" # Check whether --with-libIDL or --without-libIDL was given. if test "${with_libIDL+set}" = set; then withval="$with_libIDL" - if test "$withval" = "no"; then - SKIP_IDL_CHECK="yes" - fi + if test "$enableval" = "no"; then + SKIP_IDL_CHECK="yes" + elif test "$enableval" = "yes"; then + : + else + { echo "configure: error: Option, libIDL, does not take an argument ($enableval)." 1>&2; exit 1; } + fi fi @@ -6519,7 +11336,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:6523: checking for $ac_word" >&5 +echo "configure:11340: 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 @@ -6554,7 +11371,7 @@ fi min_glib_version=1.2.0 echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 -echo "configure:6558: checking for GLIB - version >= $min_glib_version" >&5 +echo "configure:11375: checking for GLIB - version >= $min_glib_version" >&5 no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes @@ -6577,7 +11394,7 @@ echo "configure:6558: checking for GLIB - version >= $min_glib_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -6653,7 +11470,7 @@ main () } EOF -if { (eval echo configure:6657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -6687,7 +11504,7 @@ fi CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat > conftest.$ac_ext < @@ -6697,7 +11514,7 @@ int main() { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } EOF -if { (eval echo configure:6701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11518: \"$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" @@ -6741,7 +11558,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:6745: checking for $ac_word" >&5 +echo "configure:11562: 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 @@ -6776,7 +11593,7 @@ fi min_libIDL_version=$LIBIDL_VERSION echo $ac_n "checking for libIDL - version >= $min_libIDL_version""... $ac_c" 1>&6 -echo "configure:6780: checking for libIDL - version >= $min_libIDL_version" >&5 +echo "configure:11597: checking for libIDL - version >= $min_libIDL_version" >&5 no_libIDL="" if test "$LIBIDL_CONFIG" = "no" ; then no_libIDL=yes @@ -6803,7 +11620,7 @@ echo "configure:6780: checking for libIDL - version >= $min_libIDL_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -6889,7 +11706,7 @@ main () } EOF -if { (eval echo configure:6893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -6923,7 +11740,7 @@ fi CFLAGS="$CFLAGS $LIBIDL_CFLAGS" LIBS="$LIBS $LIBIDL_LIBS" cat > conftest.$ac_ext < @@ -6934,7 +11751,7 @@ int main() { return IDL_get_libver_string ? 1 : 0; ; return 0; } EOF -if { (eval echo configure:6938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11755: \"$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" @@ -6973,7 +11790,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:6977: checking for $ac_word" >&5 +echo "configure:11794: 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 @@ -7099,7 +11916,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:7103: checking for $ac_word" >&5 +echo "configure:11920: 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 @@ -7134,7 +11951,7 @@ fi min_glib_version=${GLIB_VERSION} echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 -echo "configure:7138: checking for GLIB - version >= $min_glib_version" >&5 +echo "configure:11955: checking for GLIB - version >= $min_glib_version" >&5 no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes @@ -7157,7 +11974,7 @@ echo "configure:7138: checking for GLIB - version >= $min_glib_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -7233,7 +12050,7 @@ main () } EOF -if { (eval echo configure:7237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -7267,7 +12084,7 @@ fi CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat > conftest.$ac_ext < @@ -7277,7 +12094,7 @@ int main() { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } EOF -if { (eval echo configure:7281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12098: \"$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" @@ -7322,4258 +12139,7 @@ fi -echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:7327: 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 <j = 5; -} -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; -} - -; return 0; } -EOF -if { (eval echo configure:7381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_const=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_const=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_c_const" 1>&6 -if test $ac_cv_c_const = no; then - cat >> confdefs.h <<\EOF -#define const -EOF - -fi - -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:7402: 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 -#include -#include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7415: \"$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* - ac_cv_header_stdc=yes -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_stdc=no -fi -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 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -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 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -if test "$cross_compiling" = yes; then - : -else - cat > conftest.$ac_ext < -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } - -EOF -if { (eval echo configure:7482: \"$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* - ac_cv_header_stdc=no -fi -rm -fr conftest* -fi - -fi -fi - -echo "$ac_t""$ac_cv_header_stdc" 1>&6 -if test $ac_cv_header_stdc = yes; then - cat >> confdefs.h <<\EOF -#define STDC_HEADERS 1 -EOF - -fi - -echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:7506: 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 -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_mode_t=yes -else - rm -rf conftest* - ac_cv_type_mode_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_mode_t" 1>&6 -if test $ac_cv_type_mode_t = no; then - cat >> confdefs.h <<\EOF -#define mode_t int -EOF - -fi - -echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:7539: 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 -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_off_t=yes -else - rm -rf conftest* - ac_cv_type_off_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_off_t" 1>&6 -if test $ac_cv_type_off_t = no; then - cat >> confdefs.h <<\EOF -#define off_t long -EOF - -fi - -echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:7572: 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 -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_pid_t=yes -else - rm -rf conftest* - ac_cv_type_pid_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_pid_t" 1>&6 -if test $ac_cv_type_pid_t = no; then - cat >> confdefs.h <<\EOF -#define pid_t int -EOF - -fi - -echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:7605: 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 -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_size_t=yes -else - rm -rf conftest* - ac_cv_type_size_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_size_t" 1>&6 -if test $ac_cv_type_size_t = no; then - cat >> confdefs.h <<\EOF -#define size_t unsigned -EOF - -fi - -echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:7638: checking for uid_t in sys/types.h" >&5 -if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "uid_t" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_uid_t=yes -else - rm -rf conftest* - ac_cv_type_uid_t=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_type_uid_t" 1>&6 -if test $ac_cv_type_uid_t = no; then - cat >> confdefs.h <<\EOF -#define uid_t int -EOF - - cat >> confdefs.h <<\EOF -#define gid_t int -EOF - -fi - -echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:7672: 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 -int main() { -struct stat s; s.st_blksize; -; return 0; } -EOF -if { (eval echo configure:7685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_blksize=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_st_blksize=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 -if test $ac_cv_struct_st_blksize = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ST_BLKSIZE 1 -EOF - -fi - - -case "$target" in - *-*-os2_vacpp) - cat >> confdefs.h <<\EOF -#define __size_t 1 -EOF - - cat >> confdefs.h <<\EOF -#define __off_t 1 -EOF - - ;; -esac - -echo $ac_n "checking for int16_t""... $ac_c" 1>&6 -echo "configure:7720: 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 -int main() { -int16_t foo = 0; -; return 0; } -EOF -if { (eval echo configure:7733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_int16_t=true -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_int16_t=false -fi -rm -f conftest* -fi - -if test "$ac_cv_int16_t" = true ; then - cat >> confdefs.h <<\EOF -#define HAVE_INT16_T 1 -EOF - - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi -echo $ac_n "checking for int32_t""... $ac_c" 1>&6 -echo "configure:7755: 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 -int main() { -int32_t foo = 0; -; return 0; } -EOF -if { (eval echo configure:7768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_int32_t=true -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_int32_t=false -fi -rm -f conftest* -fi - -if test "$ac_cv_int32_t" = true ; then - cat >> confdefs.h <<\EOF -#define HAVE_INT32_T 1 -EOF - - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi -echo $ac_n "checking for int64_t""... $ac_c" 1>&6 -echo "configure:7790: 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 -int main() { -int64_t foo = 0; -; return 0; } -EOF -if { (eval echo configure:7803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_int64_t=true -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_int64_t=false -fi -rm -f conftest* -fi - -if test "$ac_cv_int64_t" = true ; then - cat >> confdefs.h <<\EOF -#define HAVE_INT64_T 1 -EOF - - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi -echo $ac_n "checking for int64""... $ac_c" 1>&6 -echo "configure:7825: 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 -int main() { -int64 foo = 0; -; return 0; } -EOF -if { (eval echo configure:7838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_int64=true -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_int64=false -fi -rm -f conftest* -fi - -if test "$ac_cv_int64" = true ; then - cat >> confdefs.h <<\EOF -#define HAVE_INT64 1 -EOF - - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi -echo $ac_n "checking for uint""... $ac_c" 1>&6 -echo "configure:7860: 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 -int main() { -uint foo = 0; -; return 0; } -EOF -if { (eval echo configure:7873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_uint=true -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_uint=false -fi -rm -f conftest* -fi - -if test "$ac_cv_uint" = true ; then - cat >> confdefs.h <<\EOF -#define HAVE_UINT 1 -EOF - - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi -echo $ac_n "checking for uint_t""... $ac_c" 1>&6 -echo "configure:7895: 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 -int main() { -uint_t foo = 0; -; return 0; } -EOF -if { (eval echo configure:7908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_uint_t=true -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_uint_t=false -fi -rm -f conftest* -fi - -if test "$ac_cv_uint_t" = true ; then - cat >> confdefs.h <<\EOF -#define HAVE_UINT_T 1 -EOF - - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi -echo $ac_n "checking for uint16_t""... $ac_c" 1>&6 -echo "configure:7930: 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 -int main() { -uint16_t foo = 0; -; return 0; } -EOF -if { (eval echo configure:7943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_uint16_t=true -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_uint16_t=false -fi -rm -f conftest* -fi - -if test "$ac_cv_uint16_t" = true ; then - cat >> confdefs.h <<\EOF -#define HAVE_UINT16_T 1 -EOF - - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -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 uname.domainname""... $ac_c" 1>&6 -echo "configure:7974: 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() { - struct utsname *res; char *domain; - (void)uname(res); if (res != 0) { domain = res->domainname; } -; return 0; } -EOF -if { (eval echo configure:7987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_uname_domainname_field=true -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_uname_domainname_field=false -fi -rm -f conftest* -fi - - -if test "$ac_cv_have_uname_domainname_field" = "true"; then - cat >> confdefs.h <<\EOF -#define HAVE_UNAME_DOMAINNAME_FIELD 1 -EOF - - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -echo $ac_n "checking for uname.__domainname""... $ac_c" 1>&6 -echo "configure:8011: 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() { - struct utsname *res; char *domain; - (void)uname(res); if (res != 0) { domain = res->__domainname; } -; return 0; } -EOF -if { (eval echo configure:8024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_uname_us_domainname_field=true -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_uname_us_domainname_field=false -fi -rm -f conftest* -fi - - -if test "$ac_cv_have_uname_us_domainname_field" = "true"; then - cat >> confdefs.h <<\EOF -#define HAVE_UNAME_US_DOMAINNAME_FIELD 1 -EOF - - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -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 - - -echo $ac_n "checking for 64-bit OS""... $ac_c" 1>&6 -echo "configure:8056: 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 -then - result="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - result="no" -fi -rm -fr conftest* -fi - -echo "$ac_t"""$result"" 1>&6 -if test "$result" = "yes"; then - cat >> confdefs.h <<\EOF -#define HAVE_64BIT_OS 1 -EOF - - HAVE_64BIT_OS=1 -fi - - -if test "$HAVE_64BIT_OS"; then - case "$target_os" in - solaris*) TARGET_NSPR_MDCPUCFG='\"md/_solaris64.cfg\"' ;; - esac -fi - - -echo $ac_n "checking for usable wchar_t (2 bytes, unsigned)""... $ac_c" 1>&6 -echo "configure:8096: 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 - if test "$cross_compiling" = yes; then - 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:8111: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_have_usable_wchar="no" -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_have_usable_wchar" 1>&6 -if test "$ac_cv_have_usable_wchar" = "yes"; then - cat >> confdefs.h <<\EOF -#define HAVE_CPP_2BYTE_WCHAR_T 1 -EOF - - HAVE_CPP_2BYTE_WCHAR_T=1 -else - - _SAVE_CFLAGS=$CFLAGS - _SAVE_CC=$CC - CC=$CXX - CFLAGS="$CFLAGS -fshort-wchar" - - echo $ac_n "checking for compiler -fshort-wchar option""... $ac_c" 1>&6 -echo "configure:8140: 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 - if test "$cross_compiling" = yes; then - ac_cv_have_usable_wchar_option="maybe" -else - cat > conftest.$ac_ext < - int main () { - return (sizeof(wchar_t) != 2) || - (wchar_t)-1 < (wchar_t) 0 ; } -EOF -if { (eval echo configure:8155: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_have_usable_wchar_option="no" -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_have_usable_wchar_option" 1>&6 - - if test "$ac_cv_have_usable_wchar_option" = "yes"; then - cat >> confdefs.h <<\EOF -#define HAVE_CPP_2BYTE_WCHAR_T 1 -EOF - - HAVE_CPP_2BYTE_WCHAR_T=1 - CXXFLAGS="$CXXFLAGS -fshort-wchar" - else - CFLAGS=$_SAVE_CFLAGS - fi - CC=$_SAVE_CC -fi - -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:8189: 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> -int main() { -DIR *dirp = 0; -; return 0; } -EOF -if { (eval echo configure:8202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - eval "ac_cv_header_dirent_$ac_safe=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_dirent_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -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:8227: 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 -else - ac_save_LIBS="$LIBS" -LIBS="-ldir $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 - LIBS="$LIBS -ldir" -else - echo "$ac_t""no" 1>&6 -fi - -else -echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:8268: 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 -else - ac_save_LIBS="$LIBS" -LIBS="-lx $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 - LIBS="$LIBS -lx" -else - echo "$ac_t""no" 1>&6 -fi - -fi - -case "$target_os" in -os2*) - LIBS= - ;; -esac -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: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: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* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in sys/bittypes.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:8358: 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:8368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -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:8398: 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:8408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -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:8438: 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:8448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - - -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:8479: 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:8489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - - -case $target in -*-aix4.3*) - ;; -*) - for ac_hdr in sys/cdefs.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8524: 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:8534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - - ;; -esac - -case $target in -*-hpux11.*) - ;; -*) - echo $ac_n "checking for gethostbyname_r in -lc_r""... $ac_c" 1>&6 -echo "configure:8568: 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 -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 - 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 - ac_tr_lib=HAVE_LIB`echo c_r | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - ;; -esac -echo $ac_n "checking for atan in -lm""... $ac_c" 1>&6 -echo "configure:8617: 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 -else - ac_save_LIBS="$LIBS" -LIBS="-lm $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 - ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - -echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:8664: checking for dlopen in -ldl" >&5 -ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - -if test ! "$GNU_CXX"; then - - case $target in - *-aix*) - echo $ac_n "checking for demangle in -lC_r""... $ac_c" 1>&6 -echo "configure:8715: 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 -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 - 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 - ac_tr_lib=HAVE_LIB`echo C_r | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - ;; - *) - echo $ac_n "checking for demangle in -lC""... $ac_c" 1>&6 -echo "configure:8764: 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 -else - ac_save_LIBS="$LIBS" -LIBS="-lC $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 - ac_tr_lib=HAVE_LIB`echo C | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - ;; - esac -fi -echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:8814: 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 -else - ac_save_LIBS="$LIBS" -LIBS="-lsocket $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 - ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - - - - -echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:8865: checking for pthread_create in -lpthreads" >&5 -echo " - #include - void *foo(void *v) { int a = 1; } - int main() { - pthread_t t; - if (!pthread_create(&t, 0, &foo, 0)) { - pthread_join(t, 0); - } - exit(0); - }" > dummy.c ; - echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS" 1>&5; - ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS 2>&5; - _res=$? ; - rm -f dummy.c dummy${ac_exeext} ; - if test "$_res" = "0"; then - echo "$ac_t""yes" 1>&6 - USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads" - else - echo "$ac_t""no" 1>&6 - -echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:8887: checking for pthread_create in -lpthread" >&5 -echo " - #include - void *foo(void *v) { int a = 1; } - int main() { - pthread_t t; - if (!pthread_create(&t, 0, &foo, 0)) { - pthread_join(t, 0); - } - exit(0); - }" > dummy.c ; - echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS" 1>&5; - ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS 2>&5; - _res=$? ; - rm -f dummy.c dummy${ac_exeext} ; - if test "$_res" = "0"; then - echo "$ac_t""yes" 1>&6 - USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread" - else - echo "$ac_t""no" 1>&6 - -echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:8909: checking for pthread_create in -lc_r" >&5 -echo " - #include - void *foo(void *v) { int a = 1; } - int main() { - pthread_t t; - if (!pthread_create(&t, 0, &foo, 0)) { - pthread_join(t, 0); - } - exit(0); - }" > dummy.c ; - echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS" 1>&5; - ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS 2>&5; - _res=$? ; - rm -f dummy.c dummy${ac_exeext} ; - if test "$_res" = "0"; then - echo "$ac_t""yes" 1>&6 - USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r" - else - echo "$ac_t""no" 1>&6 - -echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -echo "configure:8931: checking for pthread_create in -lc" >&5 -echo " - #include - void *foo(void *v) { int a = 1; } - int main() { - pthread_t t; - if (!pthread_create(&t, 0, &foo, 0)) { - pthread_join(t, 0); - } - exit(0); - }" > dummy.c ; - echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS" 1>&5; - ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS 2>&5; - _res=$? ; - rm -f dummy.c dummy${ac_exeext} ; - if test "$_res" = "0"; then - echo "$ac_t""yes" 1>&6 - USE_PTHREADS=1 - - else - echo "$ac_t""no" 1>&6 - - fi - - - fi - - - fi - - - fi - - -# Check whether --with-pthreads or --without-pthreads was given. -if test "${with_pthreads+set}" = set; then - withval="$with_pthreads" - if test "$withval" = "yes" - then - if test "$USE_PTHREADS"x = x - then - { echo "configure: error: --with-pthreads specified for a system without pthread support " 1>&2; exit 1; }; - fi - else - USE_PTHREADS= - _PTHREAD_LDFLAGS="" - fi -fi - - -if test "$USE_PTHREADS"x != x -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:8986: 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 - if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then - ac_cv_have_dash_pthread=yes - CFLAGS="$CFLAGS -pthread" - CXXFLAGS="$CXXFLAGS -pthread" - fi - fi - rm -f conftest* - echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6 - - 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:9002: 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 - if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then - ac_cv_have_dash_pthreads=yes - CFLAGS="$CFLAGS -pthreads" - CXXFLAGS="$CXXFLAGS -pthreads" - fi - fi - rm -f conftest* - echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6 - fi - - case "$target" in - *-*-freebsd*|*-*-openbsd*|*-*-bsdi*) - cat >> confdefs.h <<\EOF -#define _REENTRANT 1 -EOF - - cat >> confdefs.h <<\EOF -#define _THREAD_SAFE 1 -EOF - - if test "$ac_cv_have_dash_pthread" = "yes"; then - _PTHREAD_LDFLAGS="" - else - _PTHREAD_LDFLAGS="-lc_r" - fi - ;; - - *-*-linux*) - cat >> confdefs.h <<\EOF -#define _REENTRANT 1 -EOF - - ;; - - *-*-nto*) - cat >> confdefs.h <<\EOF -#define _REENTRANT 1 -EOF - - ;; - - *-aix4.3*) - cat >> confdefs.h <<\EOF -#define _REENTRANT 1 -EOF - - ;; - - *-hpux11.*) - cat >> confdefs.h <<\EOF -#define _REENTRANT 1 -EOF - - ;; - - *-*-os2*) - USE_PTHREADS= - _PTHREAD_LDFLAGS= - ;; - - alpha*-*-osf*) - cat >> confdefs.h <<\EOF -#define _REENTRANT 1 -EOF - - ;; - - *-*-solaris*) - cat >> confdefs.h <<\EOF -#define _REENTRANT 1 -EOF - - if test ! "$GNU_CC"; then - CFLAGS="$CFLAGS -mt" - CXXFLAGS="$CXXFLAGS -mt" - fi - ;; - *-*-netbsd*) - USE_PTHREADS= - _PTHREAD_LDFLAGS= - esac -fi - - - case "$target" in - *-hpux*) - cat >> confdefs.h <<\EOF -#define MOZ_OJI_REQUIRE_THREAD_SAFE_ON_STARTUP 1 -EOF - - ;; - *) - ;; - esac - - -echo $ac_n "checking whether mmap() sees write()s""... $ac_c" 1>&6 -echo "configure:9103: checking whether mmap() sees write()s" >&5 - - -mmap_test_prog=' - #include - #include - #include - #include - #include - #include - - char fname[] = "conftest.file"; - char zbuff[1024]; /* Fractional page is probably worst case */ - - int main() { - char *map; - int fd; - int i; - unlink(fname); - fd = open(fname, O_RDWR | O_CREAT, 0660); - if(fd<0) return 1; - unlink(fname); - write(fd, zbuff, sizeof(zbuff)); - lseek(fd, 0, SEEK_SET); - map = (char*)mmap(0, sizeof(zbuff), PROT_READ, MAP_SHARED, fd, 0); - if(map==(char*)-1) return 2; - for(i=0; fname[i]; i++) { - int rc = write(fd, &fname[i], 1); - if(map[i]!=fname[i]) return 4; - } - return 0; - } -' - - -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 -then - result="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - result="no" -fi -rm -fr conftest* -fi - - -echo "$ac_t"""$result"" 1>&6 - -if test "$result" = "no"; then - cat >> confdefs.h <<\EOF -#define MMAP_MISSES_WRITES 1 -EOF - -fi - - -if test $ac_cv_prog_gcc = yes; then - echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:9171: 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 -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "$ac_pattern" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_prog_gcc_traditional=yes -else - rm -rf conftest* - ac_cv_prog_gcc_traditional=no -fi -rm -f conftest* - - - if test $ac_cv_prog_gcc_traditional = no; then - cat > conftest.$ac_ext < -Autoconf TCGETA -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "$ac_pattern" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_prog_gcc_traditional=yes -fi -rm -f conftest* - - fi -fi - -echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 - if test $ac_cv_prog_gcc_traditional = yes; then - CC="$CC -traditional" - fi -fi - -echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:9217: 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 - if test "$cross_compiling" = yes; then - 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 -then - ac_cv_func_memcmp_clean=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_memcmp_clean=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 -test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" - -for ac_func in random strerror lchown fchmod snprintf localtime_r statvfs memmove rint -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9255: 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 < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9283: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in nl_langinfo strtok_r -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9310: 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 < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9338: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - - -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 gnu_get_libc_version()""... $ac_c" 1>&6 -echo "configure:9371: 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 < - #endif - -int main() { -const char *glibc_version = gnu_get_libc_version(); -; return 0; } -EOF -if { (eval echo configure:9387: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func_gnu_get_libc_version=no - -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_func_gnu_get_libc_version" 1>&6 - -if test "$ac_cv_func_gnu_get_libc_version" = "yes"; then - cat >> confdefs.h <<\EOF -#define HAVE_GNU_GET_LIBC_VERSION 1 -EOF - -fi -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 - - -echo $ac_n "checking whether va_list assignments need array notation""... $ac_c" 1>&6 -echo "configure:9418: checking whether va_list assignments need array notation" >&5 -if eval "test \"`echo '$''{'ac_cv_valistisarray'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_valistisarray=false -else - cat > conftest.$ac_ext < - #include - void foo(int i, ...) { - va_list ap1, ap2; - va_start(ap1, i); - ap2 = ap1; - if (va_arg(ap2, int) != 123 || va_arg(ap1, int) != 123) { exit(1); } - va_end(ap1); va_end(ap2); - } - int main() { foo(0, 123); return(0); } -EOF -if { (eval echo configure:9439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_valistisarray=false -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_valistisarray=true -fi -rm -fr conftest* -fi - -fi - - -if test "$ac_cv_valistisarray" = true ; then - cat >> confdefs.h <<\EOF -#define HAVE_VA_LIST_AS_ARRAY 1 -EOF - - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -case "$target" in - *-linux*) - curdir=`pwd` - rm -f conftest* /tmp/conftest* - cat >> conftest.C <<\EOF -#include -#include -#include -#ifdef _dl_loaded -void __dump_link_map(void) { - struct link_map *map = _dl_loaded; - while (NULL != map) {printf("0x%08x %s\n", map->l_addr, map->l_name); map = map->l_next;} -} -int main() { - dlopen("./conftest1.so",RTLD_LAZY); - dlopen("./../tmp/conftest1.so",RTLD_LAZY); - dlopen("/tmp/conftest1.so",RTLD_LAZY); - dlopen("/tmp/../tmp/conftest1.so",RTLD_LAZY); - __dump_link_map(); -} -#else -/* _dl_loaded isn't defined, so this should be either a libc5 (glibc1) system, or a glibc2 system that doesn't have the multiple load bug (i.e., RH6.0).*/ -int main() { printf("./conftest1.so\n"); } -#endif -EOF - - cat >> conftest1.C <<\EOF -#include -void foo(void) {printf("foo in dll called\n");} -EOF - - ${CXX-g++} -fPIC -c -g conftest1.C - ${CXX-g++} -shared -Wl,-h -Wl,conftest1.so -o conftest1.so conftest1.o - ${CXX-g++} -g conftest.C -o conftest -ldl - cp -f conftest1.so conftest /tmp - cd /tmp - if test `./conftest | grep conftest1.so | wc -l` -gt 1 - then - echo - echo "*** Your libc has a bug that can result in loading the same dynamic" - echo "*** library multiple times. This bug is known to be fixed in glibc-2.0.7-32" - echo "*** or later. However, if you choose not to upgrade, the only effect" - echo "*** will be excessive memory usage at runtime." - echo - fi - cd ${curdir} - rm -f conftest* /tmp/conftest* - ;; -esac - -if test "$GNU_CXX"; then - - _MOZ_RTTI_FLAGS=${_COMPILER_PREFIX}-fno-rtti - - echo $ac_n "checking for C++ exceptions flag""... $ac_c" 1>&6 -echo "configure:9519: 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 -else - echo "int main() { return 0; }" | cat > conftest.C - - ${CXX-g++} ${CXXFLAGS} -c -fno-handle-exceptions conftest.C > conftest.out 2>&1 - - if egrep "warning.*renamed" conftest.out >/dev/null; then - ac_cv_cxx_exceptions_flags=${_COMPILER_PREFIX}-fno-exceptions - else - ac_cv_cxx_exceptions_flags=${_COMPILER_PREFIX}-fno-handle-exceptions - fi - - rm -f conftest* -fi - - - echo "$ac_t""$ac_cv_cxx_exceptions_flags" 1>&6 - _MOZ_EXCEPTIONS_FLAGS=$ac_cv_cxx_exceptions_flags -fi -if test "$MIPSPRO_CXX"; then - _MOZ_EXCEPTIONS_FLAGS="-LANG:exceptions=OFF" -fi - -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 ios::binary""... $ac_c" 1>&6 -echo "configure:9554: checking for ios::binary" >&5 -if eval "test \"`echo '$''{'ac_cv_ios_binary'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < - #include -int main() { -char *buffer = "config.log"; - fstream *mFileStream=new fstream(buffer, ios::binary); -; return 0; } -EOF -if { (eval echo configure:9568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_ios_binary=true -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_ios_binary=false -fi -rm -f conftest* -fi - -if test "$ac_cv_ios_binary" = true ; then - cat >> confdefs.h <<\EOF -#define HAVE_IOS_BINARY 1 -EOF - - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - -echo $ac_n "checking for ios::bin""... $ac_c" 1>&6 -echo "configure:9592: checking for ios::bin" >&5 -if eval "test \"`echo '$''{'ac_cv_ios_bin'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < - #include -int main() { -char *buffer = "config.log"; - fstream *mFileStream=new fstream(buffer, ios::bin); -; return 0; } -EOF -if { (eval echo configure:9606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_ios_bin=true -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_ios_bin=false -fi -rm -f conftest* -fi - -if test "$ac_cv_ios_bin" = true ; then - cat >> confdefs.h <<\EOF -#define HAVE_IOS_BIN 1 -EOF - - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -echo $ac_n "checking for C++ \"explicit\" keyword""... $ac_c" 1>&6 -echo "configure:9629: 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 - rm -rf conftest* - ac_cv_cpp_explicit=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cpp_explicit=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_cpp_explicit" 1>&6 -if test "$ac_cv_cpp_explicit" = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_CPP_EXPLICIT 1 -EOF - -fi - -echo $ac_n "checking for C++ template specialization support""... $ac_c" 1>&6 -echo "configure:9665: checking for C++ template specialization support" >&5 -if eval "test \"`echo '$''{'ac_cv_cpp_template_specialization'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < struct X { int a; }; - class Y {}; - struct X { double a; }; -int main() { -X int_x; - X y_x; -; return 0; } -EOF -if { (eval echo configure:9680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cpp_template_specialization=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cpp_template_specialization=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_cpp_template_specialization" 1>&6 -case "$target" in - *-*-solaris*) - if test ! "$GNU_CC"; then - if test ! -z "`${CC} -V 2>&1 | head -1 | grep '4.2'`"; then - ac_cv_cpp_template_specialization=no - fi - fi - ;; -esac -if test "$ac_cv_cpp_template_specialization" = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_CPP_SPECIALIZATION 1 -EOF - -fi - -echo $ac_n "checking for modern C++ template specialization syntax support""... $ac_c" 1>&6 -echo "configure:9710: 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 {}; - template <> struct X { double a; }; -int main() { -X int_x; - X y_x; -; return 0; } -EOF -if { (eval echo configure:9725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cpp_modern_specialize_template_syntax=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cpp_modern_specialize_template_syntax=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_cpp_modern_specialize_template_syntax" 1>&6 -if test "$ac_cv_cpp_modern_specialize_template_syntax" = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX 1 -EOF - -fi - - -echo $ac_n "checking whether partial template specialization works""... $ac_c" 1>&6 -echo "configure:9747: 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 {}; -int main() { -return 0; -; return 0; } -EOF -if { (eval echo configure:9760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cpp_partial_specialization=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cpp_partial_specialization=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_cpp_partial_specialization" 1>&6 -if test "$ac_cv_cpp_partial_specialization" = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_CPP_PARTIAL_SPECIALIZATION 1 -EOF - -fi - - -echo $ac_n "checking whether operators must be re-defined for templates derived from templates""... $ac_c" 1>&6 -echo "configure:9782: 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 - Base operator+(const Base& lhs, const Base& rhs) { return lhs; } - template class Derived : public Base { }; -int main() { -Derived a, b; - Base c = a + b; - return 0; -; return 0; } -EOF -if { (eval echo configure:9799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_need_derived_template_operators=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_need_derived_template_operators=yes -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_need_derived_template_operators" 1>&6 -if test "$ac_cv_need_derived_template_operators" = yes ; then - cat >> confdefs.h <<\EOF -#define NEED_CPP_DERIVED_TEMPLATE_OPERATORS 1 -EOF - -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:9821: 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 { }; - template int foo(const Base&) { return 0; } -int main() { -Derived bar; return foo(bar); -; return 0; } -EOF -if { (eval echo configure:9835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_need_cpp_template_cast_to_base=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_need_cpp_template_cast_to_base=yes -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_need_cpp_template_cast_to_base" 1>&6 -if test "$ac_cv_need_cpp_template_cast_to_base" = yes ; then - cat >> confdefs.h <<\EOF -#define NEED_CPP_TEMPLATE_CAST_TO_BASE 1 -EOF - -fi - -echo $ac_n "checking whether the compiler can resolve const ambiguities for templates""... $ac_c" 1>&6 -echo "configure:9856: 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 { - public: T* ptr; - }; - - template T* a(ptrClass *arg) { - return arg->ptr; - } - - template - const T* a(const ptrClass *arg) { - return arg->ptr; - } - -int main() { - ptrClass i; - a(&i); -; return 0; } -EOF -if { (eval echo configure:9882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_can_resolve_const_ambiguity=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_can_resolve_const_ambiguity=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_can_resolve_const_ambiguity" 1>&6 -if test "$ac_cv_can_resolve_const_ambiguity" = no ; then - cat >> confdefs.h <<\EOF -#define CANT_RESOLVE_CPP_CONST_AMBIGUITY 1 -EOF - -fi - - -echo $ac_n "checking whether the C++ \"using\" keyword can change access""... $ac_c" 1>&6 -echo "configure:9904: checking whether the C++ \"using\" keyword can change access" >&5 -if eval "test \"`echo '$''{'ac_cv_cpp_access_changing_using'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cpp_access_changing_using=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cpp_access_changing_using=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_cpp_access_changing_using" 1>&6 -if test "$ac_cv_cpp_access_changing_using" = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_CPP_ACCESS_CHANGING_USING 1 -EOF - -fi - -echo $ac_n "checking whether the C++ \"using\" keyword resolves ambiguity""... $ac_c" 1>&6 -echo "configure:9941: 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 - rm -rf conftest* - ac_cv_cpp_ambiguity_resolving_using=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cpp_ambiguity_resolving_using=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_cpp_ambiguity_resolving_using" 1>&6 -if test "$ac_cv_cpp_ambiguity_resolving_using" = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_CPP_AMBIGUITY_RESOLVING_USING 1 -EOF - -fi - -echo $ac_n "checking for \"std::\" namespace""... $ac_c" 1>&6 -echo "configure:9983: 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:9995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cpp_namespace_std=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cpp_namespace_std=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_cpp_namespace_std" 1>&6 -if test "$ac_cv_cpp_namespace_std" = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_CPP_NAMESPACE_STD 1 -EOF - -fi - -echo $ac_n "checking whether standard template operator!=() is ambiguous""... $ac_c" 1>&6 -echo "configure:10016: 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 {}; - int operator==(const T1&, const T1&) { return 0; } - int operator!=(const T1&, const T1&) { return 0; } -int main() { -T1 a,b; return a != b; -; return 0; } -EOF -if { (eval echo configure:10031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cpp_unambiguous_std_notequal=unambiguous -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cpp_unambiguous_std_notequal=ambiguous -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_cpp_unambiguous_std_notequal" 1>&6 -if test "$ac_cv_cpp_unambiguous_std_notequal" = unambiguous ; then - cat >> confdefs.h <<\EOF -#define HAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL 1 -EOF - -fi - - -echo $ac_n "checking for C++ reinterpret_cast""... $ac_c" 1>&6 -echo "configure:10053: 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:10066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cpp_reinterpret_cast=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cpp_reinterpret_cast=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_cpp_reinterpret_cast" 1>&6 -if test "$ac_cv_cpp_reinterpret_cast" = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_CPP_NEW_CASTS 1 -EOF - -fi - -echo $ac_n "checking for C++ dynamic_cast to void*""... $ac_c" 1>&6 -echo "configure:10087: 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 - if test "$cross_compiling" = yes; then - ac_cv_cpp_dynamic_cast_void_ptr=no -else - cat > conftest.$ac_ext <(subx))) || - (((void*)&mdo != (void*)suby) && - ((void*)&mdo == dynamic_cast(suby)))); - } -EOF -if { (eval echo configure:10114: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_cpp_dynamic_cast_void_ptr=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_cpp_dynamic_cast_void_ptr" 1>&6 -if test "$ac_cv_cpp_dynamic_cast_void_ptr" = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR 1 -EOF - -fi - - -echo $ac_n "checking whether C++ requires implementation of unused virtual methods""... $ac_c" 1>&6 -echo "configure:10138: 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 - rm -rf conftest* - ac_cv_cpp_unused_required=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cpp_unused_required=yes -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_cpp_unused_required" 1>&6 -if test "$ac_cv_cpp_unused_required" = yes ; then - cat >> confdefs.h <<\EOF -#define NEED_CPP_UNUSED_IMPLEMENTATIONS 1 -EOF - -fi - - - -echo $ac_n "checking for trouble comparing to zero near std::operator!=()""... $ac_c" 1>&6 -echo "configure:10173: 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 {}; - class T2; - template int operator==(const T2*, const T&) { return 0; } - template int operator!=(const T2*, const T&) { return 0; } -int main() { -Foo f; return (0 != f); -; return 0; } -EOF -if { (eval echo configure:10189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_trouble_comparing_to_zero=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_trouble_comparing_to_zero=yes -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_trouble_comparing_to_zero" 1>&6 -if test "$ac_cv_trouble_comparing_to_zero" = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_CPP_TROUBLE_COMPARING_TO_ZERO 1 -EOF - -fi - - - -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 - - - -echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:10221: 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:10233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_i18n_lc_messages=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_i18n_lc_messages=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_i18n_lc_messages" 1>&6 -if test "$ac_cv_i18n_lc_messages" = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_I18N_LC_MESSAGES 1 -EOF - -fi - - - -# Components and Features - -# Check whether --enable-logging or --disable-logging was given. -if test "${enable_logging+set}" = set; then - enableval="$enable_logging" - if test "$enableval" = "no"; then - NS_DISABLE_LOGGING=1 - elif test "$enableval" = "yes"; then - : - else - { echo "configure: error: Option, logging, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - -if test "$NS_DISABLE_LOGGING"; then - cat >> confdefs.h <<\EOF -#define NS_DISABLE_LOGGING 1 -EOF - -else - cat >> confdefs.h <<\EOF -#define MOZ_LOGGING 1 -EOF - -fi - -MOZ_MAIL_NEWS=1 -# Check whether --enable-mailnews or --disable-mailnews was given. -if test "${enable_mailnews+set}" = set; then - enableval="$enable_mailnews" - if test "$enableval" = "no"; then - MOZ_MAIL_NEWS= - elif test "$enableval" = "yes"; then - : - else - { echo "configure: error: Option, mailnews, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - - -MOZ_REFLOW_PERF= -# Check whether --enable-reflow-perf or --disable-reflow-perf was given. -if test "${enable_reflow_perf+set}" = set; then - enableval="$enable_reflow_perf" - if test "$enableval" = "yes"; then - MOZ_REFLOW_PERF=1 - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, reflow-perf, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - -if test "$MOZ_REFLOW_PERF"; then - cat >> confdefs.h <<\EOF -#define MOZ_REFLOW_PERF 1 -EOF - -fi - - -NS_MT_SUPPORTED=1 -cat >> confdefs.h <<\EOF -#define NS_MT_SUPPORTED 1 -EOF - - -ENABLE_TESTS=1 -# Check whether --enable-tests or --disable-tests was given. -if test "${enable_tests+set}" = set; then - enableval="$enable_tests" - if test "$enableval" = "no"; then - ENABLE_TESTS= - elif test "$enableval" = "yes"; then - : - else - { echo "configure: error: Option, tests, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -IBMBIDI=1 -# Check whether --enable-bidi or --disable-bidi was given. -if test "${enable_bidi+set}" = set; then - enableval="$enable_bidi" - if test "$enableval" = "no"; then - IBMBIDI= - elif test "$enableval" = "yes"; then - : - else - { echo "configure: error: Option, bidi, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - -if test "$IBMBIDI"; then - cat >> confdefs.h <<\EOF -#define IBMBIDI 1 -EOF - -fi - -SUNCTL= -# Check whether --enable-ctl or --disable-ctl was given. -if test "${enable_ctl+set}" = set; then - enableval="$enable_ctl" - if test "$enableval" = "yes"; then - SUNCTL=1 - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, ctl, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - -if test "$SUNCTL"; then - cat >> confdefs.h <<\EOF -#define SUNCTL 1 -EOF - -fi - -ACCESSIBILITY=1 -# Check whether --enable-accessibility or --disable-accessibility was given. -if test "${enable_accessibility+set}" = set; then - enableval="$enable_accessibility" - if test "$enableval" = "no"; then - ACCESSIBILITY= - elif test "$enableval" = "yes"; then - : - else - { echo "configure: error: Option, accessibility, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - -if test "$ACCESSIBILITY"; then - cat >> confdefs.h <<\EOF -#define ACCESSIBILITY 1 -EOF - -fi - - -MOZ_MONOLITHIC_TOOLKIT=1 - -case "$target" in - *-*-linux*) MOZ_MONOLITHIC_TOOLKIT= ;; - *-*-solaris*) MOZ_MONOLITHIC_TOOLKIT= ;; - *-openvms*) MOZ_MONOLITHIC_TOOLKIT= ;; - *-bsdi*) MOZ_MONOLITHIC_TOOLKIT= ;; - *-freebsd*) MOZ_MONOLITHIC_TOOLKIT= ;; - *-netbsd*) MOZ_MONOLITHIC_TOOLKIT= ;; - *-openbsd*) MOZ_MONOLITHIC_TOOLKIT= ;; - *-*-aix*) MOZ_MONOLITHIC_TOOLKIT= ;; - *-*-osf*) MOZ_MONOLITHIC_TOOLKIT= ;; - *-hpux*) MOZ_MONOLITHIC_TOOLKIT= ;; - *-irix*) MOZ_MONOLITHIC_TOOLKIT= ;; - *-nto*) MOZ_MONOLITHIC_TOOLKIT= ;; -esac - - -# Check whether --enable-monolithic-toolkit or --disable-monolithic-toolkit was given. -if test "${enable_monolithic_toolkit+set}" = set; then - enableval="$enable_monolithic_toolkit" - if test "$enableval" = "yes"; then - MOZ_MONOLITHIC_TOOLKIT=1 - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, monolithic-toolkit, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - - -if test "$MOZ_MONOLITHIC_TOOLKIT" -then - cat >> confdefs.h <<\EOF -#define MOZ_MONOLITHIC_TOOLKIT 1 -EOF - -fi - -BUILD_MODULES=all -# Check whether --enable-standalone-modules or --disable-standalone-modules was given. -if test "${enable_standalone_modules+set}" = set; then - enableval="$enable_standalone_modules" - BUILD_MODULES=`echo $enableval | sed 's/,/ /g'` -fi - - -if test "${BUILD_MODULES}" = "all" && test -n "$enable_modules"; then - BUILD_MODULES=`echo $enable_modules | sed 's/,/ /g'` -fi - - - -ENABLE_PIC_DSO_CFLAGS=1 - -# Check whether --enable-pic-dso-cflags or --disable-pic-dso-cflags was given. -if test "${enable_pic_dso_cflags+set}" = set; then - enableval="$enable_pic_dso_cflags" - if test "$enableval" = "no"; then - ENABLE_PIC_DSO_CFLAGS= - elif test "$enableval" = "yes"; then - : - else - { echo "configure: error: Option, pic-dso-cflags, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -if test ! "$ENABLE_PIC_DSO_CFLAGS" -then - DSO_PIC_CFLAGS="" -fi - -# Compiler Options - -# Check whether --enable-crash-on-assert or --disable-crash-on-assert was given. -if test "${enable_crash_on_assert+set}" = set; then - enableval="$enable_crash_on_assert" - if test "$enableval" = "yes"; then - cat >> confdefs.h <<\EOF -#define UNIX_CRASH_ON_ASSERT 1 -EOF - - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, crash-on-assert, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - - -# Check whether --enable-lea or --disable-lea was given. -if test "${enable_lea+set}" = set; then - enableval="$enable_lea" - if test "$enableval" = "yes"; then - XPCOM_USE_LEA=1 - cat >> confdefs.h <<\EOF -#define XPCOM_USE_LEA 1 -EOF - - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, lea, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - - -MOZ_OPTIMIZE= - -if test ! "$MOZ_OPTIMIZE_FLAGS" -then - MOZ_OPTIMIZE_FLAGS="-O" -fi - -# Check whether --enable-optimize or --disable-optimize was given. -if test "${enable_optimize+set}" = set; then - enableval="$enable_optimize" - if test "$enableval" != "no"; then - MOZ_OPTIMIZE=1 - if test -n "$enableval" && test "$enableval" != "yes"; then - MOZ_OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'` - fi - fi -fi - - -if test "$MOZ_OPTIMIZE" -then - CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS" - CXXFLAGS="$CXXFLAGS $MOZ_OPTIMIZE_FLAGS" - LDFLAGS="$LDFLAGS $MOZ_OPTIMIZE_LDFLAGS" -fi - -MOZ_REORDER= -# Check whether --enable-reorder or --disable-reorder was given. -if test "${enable_reorder+set}" = set; then - enableval="$enable_reorder" - if test "$enableval" != "no"; then - MOZ_REORDER=1 - fi -fi - - -MOZ_TIMELINE= -# Check whether --enable-timeline or --disable-timeline was given. -if test "${enable_timeline+set}" = set; then - enableval="$enable_timeline" - if test "$enableval" != "no"; then - cat >> confdefs.h <<\EOF -#define MOZ_TIMELINE 1 -EOF - - MOZ_TIMELINE=1 - fi -fi - - -MOZ_DEBUG=1 - -if test ! "$MOZ_DEBUG_FLAGS" -then - case "$target" in - *-irix*) - if test "$GNU_CC"; then - GCC_VERSION=`$CC -v 2>&1 | awk '/version/ { print $3 }'` - case "$GCC_VERSION" in - 2.95.*) - MOZ_DEBUG_FLAGS="" - ;; - *) - MOZ_DEBUG_FLAGS="-g" - ;; - esac - else - MOZ_DEBUG_FLAGS="-g" - fi - ;; - *) - MOZ_DEBUG_FLAGS="-g" - ;; - esac -fi - -# Check whether --enable-debug or --disable-debug was given. -if test "${enable_debug+set}" = set; then - enableval="$enable_debug" - if test "$enableval" = "no"; then - MOZ_DEBUG= - elif test "$enableval" = "yes"; then - : - else - { echo "configure: error: Option, debug, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -MOZ_DEBUG_ENABLE_DEFS="-DDEBUG" - case "${target_os}" in - beos*) - MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_${USER}" - ;; - *) - MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_`$WHOAMI`" - ;; - esac -MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DTRACING" - -MOZ_DEBUG_DISABLE_DEFS="-DNDEBUG -DTRIMMED" - -if test "$MOZ_DEBUG" -then - LDFLAGS="$LDFLAGS $MOZ_DEBUG_LDFLAGS" -fi - -if test -z "$MOZ_POST_DSO_LIB_COMMAND"; then - MOZ_POST_DSO_LIB_COMMAND=true -fi -if test -z "$MOZ_POST_PROGRAM_COMMAND"; then - MOZ_POST_PROGRAM_COMMAND=true -fi - -case "$target" in -*-*-os2*) - MOZ_POST_DSO_LIB_COMMAND='@echo' - MOZ_POST_PROGRAM_COMMAND='@echo' - ;; -esac - -# Check whether --enable-strip-libs or --disable-strip-libs was given. -if test "${enable_strip_libs+set}" = set; then - enableval="$enable_strip_libs" - if test "$enableval" = "yes"; then - MOZ_POST_DSO_LIB_COMMAND='$(STRIP)' - MOZ_POST_PROGRAM_COMMAND='$(STRIP)' - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, strip-libs, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS= - -if test ! "$MOZ_DEBUG" -then - case "$target" in - *-linux*) - MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script' - ;; - *-nto*) - MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script' - ;; - esac -fi - -# Check whether --enable-elf-dynstr-gc or --disable-elf-dynstr-gc was given. -if test "${enable_elf_dynstr_gc+set}" = set; then - enableval="$enable_elf_dynstr_gc" - if test "$enableval" = "yes"; then - USE_ELF_DYNSTR_GC=1 - elif test "$enableval" = "no"; then - USE_ELF_DYNSTR_GC= - else - { echo "configure: error: Option, elf-dynstr-gc, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - - -NS_TRACE_MALLOC= -# Check whether --enable-trace-malloc or --disable-trace-malloc was given. -if test "${enable_trace_malloc+set}" = set; then - enableval="$enable_trace_malloc" - if test "$enableval" = "yes"; then - NS_TRACE_MALLOC=1 - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, trace-malloc, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - -if test "$NS_TRACE_MALLOC"; then - # Please, Mr. Linker Man, don't take away our symbol names - MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS= - USE_ELF_DYNSTR_GC= - cat >> confdefs.h <<\EOF -#define NS_TRACE_MALLOC 1 -EOF - -fi - - -# Check whether --with-default-mozilla-five-home or --without-default-mozilla-five-home was given. -if test "${with_default_mozilla_five_home+set}" = set; then - withval="$with_default_mozilla_five_home" - val=`echo $withval` - cat >> confdefs.h <&2; exit 1; } - fi -fi - - - -MOZ_JSDEBUGGER=1 - -# Check whether --enable-jsd or --disable-jsd was given. -if test "${enable_jsd+set}" = set; then - enableval="$enable_jsd" - if test "$enableval" = "no"; then - MOZ_JSDEBUGGER= - elif test "$enableval" = "yes"; then - : - else - { echo "configure: error: Option, jsd, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - - -MOZ_EXTENSIONS_DEFAULT="cookie wallet content-packs xml-rpc xmlextras help transformiix venkman" -MOZ_EXTENSIONS_ALL="$MOZ_EXTENSIONS_DEFAULT irc xmlterm inspector access-builtin ctl" - -if test -n "$SUNCTL"; then - MOZ_EXTENSIONS_DEFAULT="$MOZ_EXTENSIONS_DEFAULT ctl" -fi - -# Check whether --with-extensions or --without-extensions was given. -if test "${with_extensions+set}" = set; then - withval="$with_extensions" - MOZ_EXTENSIONS="" - for option in `echo $withval | sed 's/,/ /g'`; do - if test "$option" = "yes" || test "$option" = "all"; then - MOZ_EXTENSIONS="$MOZ_EXTENSIONS $MOZ_EXTENSIONS_ALL" - elif test "$option" = "no" || test "$option" = "none"; then - MOZ_EXTENSIONS="" - elif test "$option" = "default"; then - MOZ_EXTENSIONS="$MOZ_EXTENSIONS $MOZ_EXTENSIONS_DEFAULT" - else - MOZ_EXTENSIONS="$MOZ_EXTENSIONS $option" - fi - done -else - MOZ_EXTENSIONS="$MOZ_EXTENSIONS_DEFAULT" -fi - - -if test -z "$MOZ_ENABLE_GTK" && test `echo "$MOZ_EXTENSIONS" | grep -c xmlterm` -ne 0; then - echo "configure: warning: Cannot build xmlterm without gtk toolkit. Removing xmlterm from MOZ_EXTENSIONS." 1>&2 - MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|xmlterm||'` -fi - -if test -z "$MOZ_JSDEBUGGER" && test `echo "$MOZ_EXTENSIONS" | grep -c venkman` -ne 0; then - echo "configure: warning: Cannot build venkman without JavaScript debug library. Removing venkman from MOZ_EXTENSIONS." 1>&2 - MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|venkman||'` -fi - -if test -z "$MOZ_ENABLE_GTK" && test `echo "$MOZ_EXTENSIONS" | grep -c ctl` -ne 0; then - echo "configure: warning: Cannot build ctl without glib. Removing ctl from MOZ_EXTENSIONS." 1>&2 - MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|ctl||'` -fi - -# Check whether --enable-jar-packaging or --disable-jar-packaging was given. -if test "${enable_jar_packaging+set}" = set; then - enableval="$enable_jar_packaging" - if test "$enableval" = "no"; then - MOZ_DISABLE_JAR_PACKAGING=1 - - elif test "$enableval" = "yes"; then - : - else - { echo "configure: error: Option, jar-packaging, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -# Check whether --enable-chrome-format or --disable-chrome-format was given. -if test "${enable_chrome_format+set}" = set; then - enableval="$enable_chrome_format" - MOZ_CHROME_FILE_FORMAT=`echo $enableval | tr A-Z a-z` -fi - - -if test -z "$MOZ_CHROME_FILE_FORMAT"; then - if test -n "$MOZ_DISABLE_JAR_PACKAGING"; then - MOZ_CHROME_FILE_FORMAT=flat - else - MOZ_CHROME_FILE_FORMAT=jar - fi -fi - -if test "$MOZ_CHROME_FILE_FORMAT" != "jar" && - test "$MOZ_CHROME_FILE_FORMAT" != "flat" && - test "$MOZ_CHROME_FILE_FORMAT" != "both"; then - { echo "configure: error: --enable-chrome-format must be set to either jar, flat or both" 1>&2; exit 1; } -fi - -MOZ_AUTO_DEPS=1 -# Check whether --enable-auto-deps or --disable-auto-deps was given. -if test "${enable_auto_deps+set}" = set; then - enableval="$enable_auto_deps" - if test "$enableval" = "no"; then - MOZ_AUTO_DEPS= - elif test "$enableval" = "yes"; then - : - else - { echo "configure: error: Option, auto-deps, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -if test -n "$MOZ_AUTO_DEPS"; then -_cpp_md_flag= -# Check whether --enable-md or --disable-md was given. -if test "${enable_md+set}" = set; then - enableval="$enable_md" - if test "$enableval" = "no"; then - : - elif test "$enableval" = "yes"; then - _cpp_md_flag=1 - else - { echo "configure: error: Option, md, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -else - if test "$GNU_CC" -a "$GNU_CXX"; then - _cpp_md_flag=1 - fi -fi - -if test "$_cpp_md_flag"; then - COMPILER_DEPEND=1 - _DEPEND_CFLAGS='$(filter-out %/.pp,-Wp,-MD,$(MDDEPDIR)/$(*F).pp)' -fi -fi # MOZ_AUTO_DEPS -MDDEPDIR='.deps' - - - - - -# Check whether --enable-pedantic or --disable-pedantic was given. -if test "${enable_pedantic+set}" = set; then - enableval="$enable_pedantic" - if test "$enableval" = "no"; then - _PEDANTIC= - elif test "$enableval" = "yes"; then - : - else - { echo "configure: error: Option, pedantic, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - -if test "$_PEDANTIC"; then - 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 - - _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:10910: 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 -then - result="no" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - result="yes" -fi -rm -fr conftest* -fi - - echo "$ac_t""$result" 1>&6 - CXXFLAGS="$_SAVE_CXXFLAGS" - 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 - - - case "$result" in - no) - _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} ${_COMPILER_PREFIX}-pedantic" - _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic" - ;; - yes) - { echo "configure: error: Your compiler appears to have a known bug where long long is miscompiled when using -pedantic. Reconfigure using --disable-pedantic. " 1>&2; exit 1; } - ;; - maybe) - echo "configure: warning: Cannot test -pedantic long long bug when cross-compiling." 1>&2 - ;; - esac -fi - - -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 - -_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:10972: 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 < - class Pointer - { - public: - T* myPtr; - }; - - template - int operator==(const Pointer& rhs, U* lhs) - { - return rhs.myPtr == lhs; - } - - template - int operator==(const Pointer& rhs, const U* lhs) - { - return rhs.myPtr == lhs; - } - -int main() { - - Pointer foo; - const int* bar; - return foo == bar; - -; return 0; } -EOF -if { (eval echo configure:11007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_nscap_nonconst_opeq_bug="no" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_nscap_nonconst_opeq_bug="yes" -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_nscap_nonconst_opeq_bug" 1>&6 - -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 - -CXXFLAGS="$_SAVE_CXXFLAGS" - -if test "$ac_nscap_nonconst_opeq_bug" = "yes" ; then - cat >> confdefs.h <<\EOF -#define NSCAP_DONT_PROVIDE_NONCONST_OPEQ 1 -EOF - -fi - -# Check whether --enable-long-long-warning or --disable-long-long-warning was given. -if test "${enable_long_long_warning+set}" = set; then - enableval="$enable_long_long_warning" - if test "$enableval" = "yes"; then - _IGNORE_LONG_LONG_WARNINGS= - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, long-long-warning, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - -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:11053: checking whether compiler supports -Wno-long-long" >&5 - cat > conftest.$ac_ext <&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" - 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 - CFLAGS="$_SAVE_CFLAGS" -fi - -# Check whether --enable-cpp-rtti or --disable-cpp-rtti was given. -if test "${enable_cpp_rtti+set}" = set; then - enableval="$enable_cpp_rtti" - if test "$enableval" = "yes"; then - _MOZ_RTTI_FLAGS=-frtti - - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, cpp-rtti, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -# Check whether --enable-cpp-exceptions or --disable-cpp-exceptions was given. -if test "${enable_cpp_exceptions+set}" = set; then - enableval="$enable_cpp_exceptions" - if test "$enableval" = "yes"; then - if test "$MIPSPRO_CXX"; then - _MOZ_EXCEPTIONS_FLAGS=-LANG:exceptions=ON - else - _MOZ_EXCEPTIONS_FLAGS=-fexceptions - fi - - - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, cpp-exceptions, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -# Check whether --enable-ultrasparc or --disable-ultrasparc was given. -if test "${enable_ultrasparc+set}" = set; then - enableval="$enable_ultrasparc" - if test "$enableval" = "yes"; then - case "$target_os" in - solaris*) - case $OS_TEST in - sun4u) - JS_ULTRASPARC_OPTS=1 - ;; - esac - ;; - esac - - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, ultrasparc, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -# Profiling and Instrumenting - -# Check whether --enable-eazel-profiler or --disable-eazel-profiler was given. -if test "${enable_eazel_profiler+set}" = set; then - enableval="$enable_eazel_profiler" - if test "$enableval" = "yes"; then - ENABLE_EAZEL_PROFILER=1 - cat >> confdefs.h <<\EOF -#define ENABLE_EAZEL_PROFILER 1 -EOF - - USE_ELF_DYNSTR_GC= - MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS= - EAZEL_PROFILER_CFLAGS="-g -O -gdwarf-2 -finstrument-functions -D__NO_STRING_INLINES -D__NO_MATH_INLINES" - EAZEL_PROFILER_LIBS="-lprofiler -lpthread" - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, eazel-profiler, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -# Check whether --with-profile-modules or --without-profile-modules was given. -if test "${with_profile_modules+set}" = set; then - withval="$with_profile_modules" - MOZ_PROFILE_MODULES=`echo $withval | sed 's/,/ /g'` -fi - - -# Check whether --enable-perf-metrics or --disable-perf-metrics was given. -if test "${enable_perf_metrics+set}" = set; then - enableval="$enable_perf_metrics" - if test "$enableval" = "yes"; then - MOZ_PERF_METRICS=1 - cat >> confdefs.h <<\EOF -#define MOZ_PERF_METRICS 1 -EOF - - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, perf-metrics, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -# Check whether --enable-insure or --disable-insure was given. -if test "${enable_insure+set}" = set; then - enableval="$enable_insure" - if test "$enableval" = "yes"; then - MOZ_INSURE="insure" MOZ_INSURIFYING=1 MOZ_INSURE_DIRS="." MOZ_INSURE_EXCLUDE_DIRS="config" - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, insure, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -# Check whether --with-insure-dirs or --without-insure-dirs was given. -if test "${with_insure_dirs+set}" = set; then - withval="$with_insure_dirs" - MOZ_INSURE_DIRS=$withval -fi - - -# Check whether --with-insure-exclude-dirs or --without-insure-exclude-dirs was given. -if test "${with_insure_exclude_dirs+set}" = set; then - withval="$with_insure_exclude_dirs" - MOZ_INSURE_EXCLUDE_DIRS="config $withval" -fi - - -# Check whether --enable-boehm or --disable-boehm was given. -if test "${enable_boehm+set}" = set; then - enableval="$enable_boehm" - if test "$enableval" = "yes"; then - cat >> confdefs.h <<\EOF -#define GC_LEAK_DETECTOR 1 -EOF - - GC_LEAK_DETECTOR=1 - - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, boehm, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -# Check whether --enable-logrefcnt or --disable-logrefcnt was given. -if test "${enable_logrefcnt+set}" = set; then - enableval="$enable_logrefcnt" - if test "$enableval" = "yes"; then - cat >> confdefs.h <<\EOF -#define FORCE_BUILD_REFCNT_LOGGING 1 -EOF - - elif test "$enableval" = "no"; then - cat >> confdefs.h <<\EOF -#define NO_BUILD_REFCNT_LOGGING 1 -EOF - - else - { echo "configure: error: Option, logrefcnt, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - - -# Check whether --enable-leaky or --disable-leaky was given. -if test "${enable_leaky+set}" = set; then - enableval="$enable_leaky" - if test "$enableval" = "yes"; then - MOZ_LEAKY=1 - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, leaky, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -# Check whether --enable-jprof or --disable-jprof was given. -if test "${enable_jprof+set}" = set; then - enableval="$enable_jprof" - if test "$enableval" = "yes"; then - MOZ_JPROF=1 - cat >> confdefs.h <<\EOF -#define MOZ_JPROF 1 -EOF - - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, jprof, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -# Check whether --enable-xpctools or --disable-xpctools was given. -if test "${enable_xpctools+set}" = set; then - enableval="$enable_xpctools" - if test "$enableval" = "yes"; then - MOZ_XPCTOOLS=1 - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, xpctools, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -echo $ac_n "checking webshell leaks option""... $ac_c" 1>&6 -echo "configure:11289: checking webshell leaks option" >&5 -# Check whether --enable-detect-webshell-leaks or --disable-detect-webshell-leaks was given. -if test "${enable_detect_webshell_leaks+set}" = set; then - enableval="$enable_detect_webshell_leaks" - if test "$enableval" = "yes"; then - echo "$ac_t""on (user enabled)" 1>&6 - DETECT_WEBSHELL_LEAKS=1 - elif test "$enableval" = "no"; then - echo "$ac_t""off (user disabled)" 1>&6 - else - { echo "configure: error: Option, detect-webshell-leaks, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -else - if test "$MOZ_DEBUG"; then - echo "$ac_t""on (debug build)" 1>&6 - DETECT_WEBSHELL_LEAKS=1 - else - echo "$ac_t""off (non-debug build)" 1>&6 - fi -fi - - -if test "$DETECT_WEBSHELL_LEAKS"; then - cat >> confdefs.h <<\EOF -#define DETECT_WEBSHELL_LEAKS 1 -EOF - - -fi - -# Check whether --enable-double-buffer or --disable-double-buffer was given. -if test "${enable_double_buffer+set}" = set; then - enableval="$enable_double_buffer" - if test "$enableval" = "no"; then - cat >> confdefs.h <<\EOF -#define NO_DOUBLE_BUFFER 1 -EOF - - elif test "$enableval" = "yes"; then - : - else - { echo "configure: error: Option, double-buffer, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -# Check whether --enable-wrap-malloc or --disable-wrap-malloc was given. -if test "${enable_wrap_malloc+set}" = set; then - enableval="$enable_wrap_malloc" - if test "$enableval" = "yes"; then - if test "$GNU_CC"; then - WRAP_MALLOC_CFLAGS="${LDFLAGS} -Wl,--wrap -Wl,malloc -Wl,--wrap -Wl,free -Wl,--wrap -Wl,realloc -Wl,--wrap -Wl,__builtin_new -Wl,--wrap -Wl,__builtin_vec_new -Wl,--wrap -Wl,__builtin_delete -Wl,--wrap -Wl,__builtin_vec_delete -Wl,--wrap -Wl,PR_Free -Wl,--wrap -Wl,PR_Malloc -Wl,--wrap -Wl,PR_Calloc -Wl,--wrap -Wl,PR_Realloc" - MKSHLIB='$(CXX) $(DSO_LDOPTS) $(WRAP_MALLOC_CFLAGS) -o $@' - fi - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, wrap-malloc, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -# Check whether --with-wrap-malloc or --without-wrap-malloc was given. -if test "${with_wrap_malloc+set}" = set; then - withval="$with_wrap_malloc" - WRAP_MALLOC_LIB=$withval -fi - - -# Check whether --enable-efence or --disable-efence was given. -if test "${enable_efence+set}" = set; then - enableval="$enable_efence" - if test "$enableval" = "yes"; then - echo $ac_n "checking for malloc in -lefence""... $ac_c" 1>&6 -echo "configure:11363: 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 -else - ac_save_LIBS="$LIBS" -LIBS="-lefence $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 - ac_tr_lib=HAVE_LIB`echo efence | sed -e 's/^a-zA-Z0-9_/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, efence, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -echo $ac_n "checking for cplus_demangle in -liberty""... $ac_c" 1>&6 -echo "configure:11418: checking for cplus_demangle in -liberty" >&5 -ac_lib_var=`echo iberty'_'cplus_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 -else - ac_save_LIBS="$LIBS" -LIBS="-liberty "-liberty" $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 - HAVE_DEMANGLE=1 -else - echo "$ac_t""no" 1>&6 -HAVE_DEMANGLE= -fi - - -MOZ_DEMANGLE_SYMBOLS= - -if test "$HAVE_DEMANGLE" -then - case "$target" in - *-linux*) - # Demangle only for debug or trace-malloc builds - if test "$MOZ_DEBUG" || test "$NS_TRACE_MALLOC" - then - MOZ_DEMANGLE_SYMBOLS=1 - cat >> confdefs.h <<\EOF -#define MOZ_DEMANGLE_SYMBOLS 1 -EOF - - fi - ;; - *-solaris*) - # Demangle only for debug builds which are using the Gnu compiler. - if test "$GNU_CC" - then - if test "$MOZ_DEBUG" - then - MOZ_DEMANGLE_SYMBOLS=1 - cat >> confdefs.h <<\EOF -#define MOZ_DEMANGLE_SYMBOLS 1 -EOF - - fi - fi - ;; - esac -fi - - - - - - -# Misc. Options - -# Check whether --enable-homedir or --disable-homedir was given. -if test "${enable_homedir+set}" = set; then - enableval="$enable_homedir" - if echo "$enableval" | grep "\/" >/dev/null; then - { echo "configure: error: "Homedir must be single relative path."" 1>&2; exit 1; } - else - cat >> confdefs.h <> confdefs.h <<\EOF -#define MOZ_USER_DIR ".mozilla" -EOF - -fi - - -# Check whether --enable-idltool or --disable-idltool was given. -if test "${enable_idltool+set}" = set; then - enableval="$enable_idltool" - if test "$enableval" = "yes"; then - BUILD_IDLC=1 - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, idltool, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -# Check whether --enable-xterm-updates or --disable-xterm-updates was given. -if test "${enable_xterm_updates+set}" = set; then - enableval="$enable_xterm_updates" - if test "$enableval" = "yes"; then - MOZ_UPDATE_XTERM=1 - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, xterm-updates, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -if test "$BUILD_MODULES" = "all" || test `echo "$BUILD_MODULES" | grep -c ldap` -ne 0; then - MOZ_LDAP_XPCOM=1 -fi - -# Check whether --enable-ldap or --disable-ldap was given. -if test "${enable_ldap+set}" = set; then - enableval="$enable_ldap" - if test "$enableval" = "no"; then - MOZ_LDAP_XPCOM= - - elif test "$enableval" = "yes"; then - : - else - { echo "configure: error: Option, ldap, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - -if test "$MOZ_LDAP_XPCOM"; then - LDAP_CFLAGS='-I${DIST}/include/ldap' - LDAP_LIBS='-L${DIST}/bin -L${DIST}/lib -lldap40 -llber40' -fi - -# Check whether --enable-ldap-experimental or --disable-ldap-experimental was given. -if test "${enable_ldap_experimental+set}" = set; then - enableval="$enable_ldap_experimental" - if test "$enableval" = "yes"; then - MOZ_LDAP_XPCOM_EXPERIMENTAL=1 - - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, ldap-experimental, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi MOZ_XUL=1 @@ -11601,338 +12167,29 @@ EOF fi +if test "$MOZ_DEBUG" || test "$NS_TRACE_MALLOC"; then + MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS= +fi -# Check whether --enable-mathml or --disable-mathml was given. -if test "${enable_mathml+set}" = set; then - enableval="$enable_mathml" - if test "$enableval" = "yes"; then - MOZ_MATHML=1 - cat >> confdefs.h <<\EOF -#define MOZ_MATHML 1 +if test "$MOZ_LDAP_XPCOM"; then + LDAP_CFLAGS='-I${DIST}/include/ldap' + LDAP_LIBS='-L${DIST}/bin -L${DIST}/lib -lldap40 -llber40' +fi + +NS_MT_SUPPORTED=1 +cat >> confdefs.h <<\EOF +#define NS_MT_SUPPORTED 1 EOF - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, mathml, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -# Check whether --enable-svg or --disable-svg was given. -if test "${enable_svg+set}" = set; then - enableval="$enable_svg" - if test "$enableval" = "yes"; then - MOZ_SVG=1 - cat >> confdefs.h <<\EOF -#define MOZ_SVG 1 -EOF - - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, svg, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -if test "$TX_EXE"; then - cat >> confdefs.h <<\EOF -#define TX_EXE 1 -EOF - - echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:11646: checking whether byte ordering is bigendian" >&5 -if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_cv_c_bigendian=unknown -# See if sys/param.h defines the BYTE_ORDER macro. -cat > conftest.$ac_ext < -#include -int main() { - -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros -#endif -; return 0; } -EOF -if { (eval echo configure:11664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - # It does; now see whether it defined to BIG_ENDIAN or not. -cat > conftest.$ac_ext < -#include -int main() { - -#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif -; return 0; } -EOF -if { (eval echo configure:11679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_bigendian=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_bigendian=no -fi -rm -f conftest* -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -if test $ac_cv_c_bigendian = unknown; then -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_c_bigendian=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_c_bigendian=yes -fi -rm -fr conftest* -fi - -fi -fi - -echo "$ac_t""$ac_cv_c_bigendian" 1>&6 -if test $ac_cv_c_bigendian = yes; then - cat >> confdefs.h <<\EOF -#define WORDS_BIGENDIAN 1 -EOF - -fi - - if test $ac_cv_c_bigendian = yes; then - cat >> confdefs.h <<\EOF -#define IS_BIG_ENDIAN 1 -EOF - - fi -fi - -VERBOSE_CONFIG_DEFS=1 -# Check whether --enable-verbose-config-defs or --disable-verbose-config-defs was given. -if test "${enable_verbose_config_defs+set}" = set; then - enableval="$enable_verbose_config_defs" - if test "$enableval" = "no"; then - VERBOSE_CONFIG_DEFS= - fi -fi - cat >> confdefs.h <<\EOF #define USE_IMG2 1 EOF -MOZ_DISABLE_DTD_DEBUG= - -# Check whether --enable-dtd-debug or --disable-dtd-debug was given. -if test "${enable_dtd_debug+set}" = set; then - enableval="$enable_dtd_debug" - if test "$enableval" = "no"; then - MOZ_DISABLE_DTD_DEBUG=1 - cat >> confdefs.h <<\EOF -#define MOZ_DISABLE_DTD_DEBUG 1 -EOF - - elif test "$enableval" = "yes"; then - : - else - { echo "configure: error: Option, dtd-debug, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -# OS/2 Build Options - -# Check whether --with-os2emx or --without-os2emx was given. -if test "${with_os2emx+set}" = set; then - withval="$with_os2emx" - MOZ_OS2_TOOLS=EMX - MOZ_OS2_EMX_OBJECTFORMAT="$withval" - cat >> confdefs.h <<\EOF -#define XP_OS2_EMX 1 -EOF - -fi - - -# Check whether --with-os2vacpp or --without-os2vacpp was given. -if test "${with_os2vacpp+set}" = set; then - withval="$with_os2vacpp" - MOZ_OS2_TOOLS=VACPP - cat >> confdefs.h <<\EOF -#define XP_OS2_VACPP 1 -EOF - -fi - - - -BUILD_SHARED_LIBS=1 -BUILD_STATIC_LIBS= -MOZ_STATIC_COMPONENT_LIBS= - -# Check whether --enable-shared or --disable-shared was given. -if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - if test "$enableval" = "no"; then - BUILD_SHARED_LIBS= - elif test "$enableval" = "yes"; then - : - else - { echo "configure: error: Option, shared, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -# Check whether --enable-static or --disable-static was given. -if test "${enable_static+set}" = set; then - enableval="$enable_static" - if test "$enableval" = "yes"; then - BUILD_STATIC_LIBS=1 - MOZ_STATIC_COMPONENT_LIBS=1 - elif test "$enableval" = "no"; then - : - else - { echo "configure: error: Option, static, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -fi - - -if (test -z "$BUILD_SHARED_LIBS" && test -z "$BUILD_STATIC_LIBS") || - (test -n "$BUILD_SHARED_LIBS" && test -n "$BUILD_STATIC_LIBS") ; then - { echo "configure: error: Only one of --enable-shared or --enable-static must be specified." 1>&2; exit 1; } -fi - - -# Check whether --enable-static-components or --disable-static-components was given. -if test "${enable_static_components+set}" = set; then - enableval="$enable_static_components" - MOZ_STATIC_COMPONENTS=`echo $enableval | sed 's/,/ /g'` -fi - - - -# Check whether --enable-meta-components or --disable-meta-components was given. -if test "${enable_meta_components+set}" = set; then - enableval="$enable_meta_components" - MOZ_META_COMPONENTS=`echo $enableval | sed 's/,/ /g'` -fi - - -if test -n "$MOZ_STATIC_COMPONENTS" && test -n "$MOZ_META_COMPONENTS"; then - { echo "configure: error: Simultaneous use of static-components & meta-components is not supported." 1>&2; exit 1; } -fi - - -case "$target" in - *-*-aix*) - if test -z "${BUILD_STATIC_LIBS}" -o -n "${BUILD_SHARED_LIBS}"; then - if test -f /usr/lpp/xlC/bin/makeC++SharedLib_r; then - AIX_SHLIB_BIN='/usr/lpp/xlC/bin/makeC++SharedLib_r' - elif test -f /usr/ibmcxx/bin/makeC++SharedLib_r; then - AIX_SHLIB_BIN='/usr/ibmcxx/bin/makeC++SharedLib_r' - fi - # Extract the first word of "makeC++SharedLib_r", so it can be a program name with args. -set dummy makeC++SharedLib_r; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:11871: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_AIX_SHLIB_BIN'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$AIX_SHLIB_BIN" in - /*) - ac_cv_path_AIX_SHLIB_BIN="$AIX_SHLIB_BIN" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_AIX_SHLIB_BIN="$AIX_SHLIB_BIN" # 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_AIX_SHLIB_BIN="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_AIX_SHLIB_BIN" && ac_cv_path_AIX_SHLIB_BIN=":" - ;; -esac -fi -AIX_SHLIB_BIN="$ac_cv_path_AIX_SHLIB_BIN" -if test -n "$AIX_SHLIB_BIN"; then - echo "$ac_t""$AIX_SHLIB_BIN" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - if test ! -n "$AIX_SHLIB_BIN"; then - echo - echo "*** Unable to locate makeC++SharedLib_r, needed for creation of shared" - echo "*** libraries on AIX. You will only be able to build static libraries." - echo - BUILD_STATIC_LIBS=1 - BUILD_SHARED_LIBS= - fi - fi - - ;; -*-os2*) - if test "${BUILD_STATIC_LIBS}" = "1"; then - MOZ_JS_LIBS='$(DIST)/lib/libmozjs.lib' - MOZ_COMPONENT_XPCOM_LIBS='$(DIST)/lib/libxpcom.lib' - XPCOM_LIBS='$(DIST)/lib/libxpcom.lib' - MOZ_JPEG_LIBS='$(DIST)/lib/libmozjpeg.$(LIB_SUFFIX)' - MOZ_ZLIB_LIBS='$(DIST)/lib/libmozz.$(LIB_SUFFIX)' - MOZ_PNG_LIBS='$(DIST)/lib/libmozpng.$(LIB_SUFFIX)' - MOZ_MNG_LIBS='$(DIST)/lib/libmozmng.$(LIB_SUFFIX)' - else - MOZ_JS_LIBS='$(DIST)/lib/mozjs.lib' - MOZ_COMPONENT_XPCOM_LIBS='$(DIST)/lib/xpcom.lib' - XPCOM_LIBS='$(DIST)/lib/xpcom.lib' - MOZ_JPEG_LIBS='$(DIST)/lib/libmozjpeg.$(LIB_SUFFIX)' - MOZ_ZLIB_LIBS='$(DIST)/lib/mozz.$(LIB_SUFFIX)' - MOZ_PNG_LIBS='$(DIST)/lib/libmozpng.$(LIB_SUFFIX)' - MOZ_MNG_LIBS='$(DIST)/lib/libmozmng.$(LIB_SUFFIX)' - fi - ;; -esac @@ -12025,405 +12282,10 @@ esac -# Check whether --with-jpeg or --without-jpeg was given. -if test "${with_jpeg+set}" = set; then - withval="$with_jpeg" - JPEG_DIR=$withval -fi -_SAVE_CFLAGS=$CFLAGS -_SAVE_LDFLAGS=$LDFLAGS -_SAVE_LIBS=$LIBS -if test -n "${JPEG_DIR}"; then - CFLAGS="-I${JPEG_DIR}/include $CFLAGS" - LDFLAGS="-L${JPEG_DIR}/lib $LDFLAGS" -fi -if test "$JPEG_DIR" = no; then - SYSTEM_JPEG= -else - echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6 -echo "configure:12047: 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 -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 - 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 - SYSTEM_JPEG=1 JPEG_LIBS="-ljpeg $JPEG_LIBS" -else - echo "$ac_t""no" 1>&6 -SYSTEM_JPEG= -fi - -fi - -if test "$SYSTEM_JPEG" = 1; then - LIBS="$JPEG_LIBS $LIBS" - if test "$cross_compiling" = yes; then - SYSTEM_JPEG= -else - cat > conftest.$ac_ext < - #include - #include - int main () { - #if JPEG_LIB_VERSION >= $MOZJPEG - exit(0); - #else - exit(1); - #endif - } - -EOF -if { (eval echo configure:12109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - SYSTEM_JPEG=1 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - SYSTEM_JPEG= JPEG_CFLAGS= JPEG_LIBS= -fi -rm -fr conftest* -fi - - rm -f core -fi -CFLAGS=$_SAVE_CFLAGS -LDFLAGS=$_SAVE_LDFLAGS -LIBS=$_SAVE_LIBS - -if test -n "${JPEG_DIR}" -a -d "${JPEG_DIR}" -a "$SYSTEM_JPEG" = 1; then - JPEG_CFLAGS="-I${JPEG_DIR}/include" - JPEG_LIBS="-L${JPEG_DIR}/lib ${JPEG_LIBS}" -fi - -# Check whether --with-zlib or --without-zlib was given. -if test "${with_zlib+set}" = set; then - withval="$with_zlib" - ZLIB_DIR=$withval -fi - - -_SAVE_CFLAGS=$CFLAGS -_SAVE_LDFLAGS=$LDFLAGS -if test -n "${ZLIB_DIR}"; then - CFLAGS="-I${ZLIB_DIR}/include $CFLAGS" - LDFLAGS="-L${ZLIB_DIR}/lib $LDFLAGS" -fi -if test "$ZLIB_DIR" = no; then - SYSTEM_ZLIB= -else - echo $ac_n "checking "for zlib.h"""... $ac_c" 1>&6 -echo "configure:12149: checking "for zlib.h"" >&5 - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - result="yes" SYSTEM_ZLIB=1 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - result="no" SYSTEM_ZLIB= -fi -rm -f conftest* - echo "$ac_t"""$result"" 1>&6 -fi -if test "$SYSTEM_ZLIB" = 1; then - echo $ac_n "checking for gzread in -lz""... $ac_c" 1>&6 -echo "configure:12172: 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 -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 - 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 - SYSTEM_ZLIB=1 ZLIB_LIBS="-lz $ZLIB_LIBS" -else - echo "$ac_t""no" 1>&6 -SYSTEM_ZLIB= ZLIB_CFLAGS= ZLIB_LIBS= -fi - -fi -CFLAGS=$_SAVE_CFLAGS -LDFLAGS=$_SAVE_LDFLAGS - -if test "${ZLIB_DIR}" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then - ZLIB_CFLAGS="-I${ZLIB_DIR}/include" - ZLIB_LIBS="-L${ZLIB_DIR}/lib ${ZLIB_LIBS}" -fi - -# Check whether --with-png or --without-png was given. -if test "${with_png+set}" = set; then - withval="$with_png" - PNG_DIR=$withval -fi - - -_SAVE_CFLAGS=$CFLAGS -_SAVE_LDFLAGS=$LDFLAGS -_SAVE_LIBS=$LIBS -CFLAGS="$ZLIB_CFLAGS $CFLAGS" -LDFLAGS="$ZLIB_LIBS -lz $LDFLAGS" -if test -n "${PNG_DIR}"; then - CFLAGS="-I${PNG_DIR}/include $CFLAGS" - LDFLAGS="-L${PNG_DIR}/lib $LDFLAGS" -fi -if test "$PNG_DIR" = no; then - SYSTEM_PNG= -else - echo $ac_n "checking for png_get_valid in -lpng""... $ac_c" 1>&6 -echo "configure:12241: 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 -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 - 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 - SYSTEM_PNG=1 PNG_LIBS="-lpng $PNG_LIBS" -else - echo "$ac_t""no" 1>&6 -SYSTEM_PNG= -fi - -fi -if test "$SYSTEM_PNG" = 1; then - LIBS="$PNG_LIBS $LIBS" - if test "$cross_compiling" = yes; then - SYSTEM_PNG= -else - cat > conftest.$ac_ext < - #include - #include - int main () { - #if PNG_LIBPNG_VER >= $MOZPNG - exit(0); - #else - exit(1); - #endif - } - -EOF -if { (eval echo configure:12302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - SYSTEM_PNG=1 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - SYSTEM_PNG= PNG_CFLAGS= PNG_LIBS= -fi -rm -fr conftest* -fi - - rm -f core -fi -CFLAGS=$_SAVE_CFLAGS -LDFLAGS=$_SAVE_LDFLAGS -LIBS=$_SAVE_LIBS - -if test "${PNG_DIR}" -a -d "${PNG_DIR}" -a "$SYSTEM_PNG" = 1; then - PNG_CFLAGS="-I${PNG_DIR}/include" - PNG_LIBS="-L${PNG_DIR}/lib ${PNG_LIBS}" -fi - -# Check whether --with-mng or --without-mng was given. -if test "${with_mng+set}" = set; then - withval="$with_mng" - MNG_DIR=$withval -fi - - -_SAVE_CFLAGS=$CFLAGS -_SAVE_LDFLAGS=$LDFLAGS -_SAVE_LIBS=$LIBS -CFLAGS="$ZLIB_CFLAGS $CFLAGS" -LDFLAGS="$ZLIB_LIBS -lz $LDFLAGS" -if test -n "${MNG_DIR}"; then - CFLAGS="-I${MNG_DIR}/include $CFLAGS" - LDFLAGS="-L${MNG_DIR}/lib $LDFLAGS" -fi -if test "$MNG_DIR" = no; then - SYSTEM_MNG= -else - echo $ac_n "checking for mng_initialize in -lmng""... $ac_c" 1>&6 -echo "configure:12345: checking for mng_initialize in -lmng" >&5 -ac_lib_var=`echo mng'_'mng_initialize | 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="-lmng $MNG_LIBS $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 - SYSTEM_MNG=1 MNG_LIBS="-lmng $MNG_LIBS" -else - echo "$ac_t""no" 1>&6 -SYSTEM_MNG= -fi - -fi -if test "$SYSTEM_MNG" = 1; then - LIBS="$MNG_LIBS $LIBS" - if test "$cross_compiling" = yes; then - SYSTEM_MNG= -else - cat > conftest.$ac_ext < - #include - #include - int main () { - #if (((MNG_VERSION_MAJOR)<<16)|((MNG_VERSION_MINOR)<<8)|(MNG_VERSION_RELEASE)) >= $MOZMNG - exit(0); - #else - exit(1); - #endif - } - -EOF -if { (eval echo configure:12406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - SYSTEM_MNG=1 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - SYSTEM_MNG= MNG_CFLAGS= MNG_LIBS= -fi -rm -fr conftest* -fi - - rm -f core -fi -CFLAGS=$_SAVE_CFLAGS -LDFLAGS=$_SAVE_LDFLAGS -LIBS=$_SAVE_LIBS - -if test "${MNG_DIR}" -a -d "${MNG_DIR}" -a "$SYSTEM_MNG" = 1; then - MNG_CFLAGS="-I${MNG_DIR}/include" - MNG_LIBS="-L${MNG_DIR}/lib ${MNG_LIBS}" -fi if test "$MOZ_BYPASS_PROFILE_AT_STARTUP"; then cat >> confdefs.h <<\EOF @@ -12520,9 +12382,6 @@ COMPILE_CXXFLAGS=`echo \ - - - @@ -12879,6 +12738,11 @@ s%@X_PRE_LIBS@%$X_PRE_LIBS%g s%@X_LIBS@%$X_LIBS%g s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g s%@NO_LD_ARCHIVE_FLAGS@%$NO_LD_ARCHIVE_FLAGS%g +s%@HAVE_64BIT_OS@%$HAVE_64BIT_OS%g +s%@XCFLAGS@%$XCFLAGS%g +s%@XLDFLAGS@%$XLDFLAGS%g +s%@XLIBS@%$XLIBS%g +s%@LIBOBJS@%$LIBOBJS%g s%@NSPR_CONFIG@%$NSPR_CONFIG%g s%@NSPR_CFLAGS@%$NSPR_CFLAGS%g s%@NSPR_LIBS@%$NSPR_LIBS%g @@ -12889,6 +12753,7 @@ s%@PKG_CONFIG@%$PKG_CONFIG%g s%@MOZ_GTK2_CFLAGS@%$MOZ_GTK2_CFLAGS%g s%@MOZ_GTK2_LIBS@%$MOZ_GTK2_LIBS%g s%@HOST_MOC@%$HOST_MOC%g +s%@MOZ_DEFAULT_TOOLKIT@%$MOZ_DEFAULT_TOOLKIT%g s%@TK_CFLAGS@%$TK_CFLAGS%g s%@TK_LIBS@%$TK_LIBS%g s%@MOZ_ENABLE_GTK@%$MOZ_ENABLE_GTK%g @@ -12901,20 +12766,19 @@ s%@MOZ_GTK_CFLAGS@%$MOZ_GTK_CFLAGS%g s%@MOZ_GTK_LDFLAGS@%$MOZ_GTK_LDFLAGS%g s%@MOZ_XLIB_CFLAGS@%$MOZ_XLIB_CFLAGS%g s%@MOZ_XLIB_LDFLAGS@%$MOZ_XLIB_LDFLAGS%g -s%@MOZ_XPRINT_CFLAGS@%$MOZ_XPRINT_CFLAGS%g -s%@MOZ_XPRINT_LDFLAGS@%$MOZ_XPRINT_LDFLAGS%g -s%@MOZ_ENABLE_XPRINT@%$MOZ_ENABLE_XPRINT%g s%@MOZ_QT_CFLAGS@%$MOZ_QT_CFLAGS%g s%@MOZ_QT_LDFLAGS@%$MOZ_QT_LDFLAGS%g -s%@MOZ_DEFAULT_TOOLKIT@%$MOZ_DEFAULT_TOOLKIT%g -s%@HAVE_XIE@%$HAVE_XIE%g -s%@MOZ_XIE_LIBS@%$MOZ_XIE_LIBS%g -s%@MOZ_XINERAMA_LIBS@%$MOZ_XINERAMA_LIBS%g -s%@MOZ_ENABLE_XINERAMA@%$MOZ_ENABLE_XINERAMA%g -s%@XCFLAGS@%$XCFLAGS%g -s%@XLDFLAGS@%$XLDFLAGS%g -s%@XLIBS@%$XLIBS%g s%@MOC@%$MOC%g +s%@MOZ_MAIL_NEWS@%$MOZ_MAIL_NEWS%g +s%@JS_ULTRASPARC_OPTS@%$JS_ULTRASPARC_OPTS%g +s%@DETECT_WEBSHELL_LEAKS@%$DETECT_WEBSHELL_LEAKS%g +s%@MOZ_REFLOW_PERF@%$MOZ_REFLOW_PERF%g +s%@NS_TRACE_MALLOC@%$NS_TRACE_MALLOC%g +s%@MOZ_DEMANGLE_SYMBOLS@%$MOZ_DEMANGLE_SYMBOLS%g +s%@MOZ_AUTO_DEPS@%$MOZ_AUTO_DEPS%g +s%@COMPILER_DEPEND@%$COMPILER_DEPEND%g +s%@MDDEPDIR@%$MDDEPDIR%g +s%@AIX_SHLIB_BIN@%$AIX_SHLIB_BIN%g s%@GLIB_CONFIG@%$GLIB_CONFIG%g s%@GLIB_CFLAGS@%$GLIB_CFLAGS%g s%@GLIB_LIBS@%$GLIB_LIBS%g @@ -12922,20 +12786,10 @@ s%@LIBIDL_CONFIG@%$LIBIDL_CONFIG%g s%@LIBIDL_CFLAGS@%$LIBIDL_CFLAGS%g s%@LIBIDL_LIBS@%$LIBIDL_LIBS%g s%@ORBIT_CONFIG@%$ORBIT_CONFIG%g -s%@HAVE_64BIT_OS@%$HAVE_64BIT_OS%g -s%@LIBOBJS@%$LIBOBJS%g -s%@MOZ_MAIL_NEWS@%$MOZ_MAIL_NEWS%g -s%@MOZ_REFLOW_PERF@%$MOZ_REFLOW_PERF%g -s%@NS_TRACE_MALLOC@%$NS_TRACE_MALLOC%g -s%@MOZ_AUTO_DEPS@%$MOZ_AUTO_DEPS%g -s%@COMPILER_DEPEND@%$COMPILER_DEPEND%g -s%@MDDEPDIR@%$MDDEPDIR%g -s%@JS_ULTRASPARC_OPTS@%$JS_ULTRASPARC_OPTS%g -s%@DETECT_WEBSHELL_LEAKS@%$DETECT_WEBSHELL_LEAKS%g -s%@MOZ_DEMANGLE_SYMBOLS@%$MOZ_DEMANGLE_SYMBOLS%g +s%@HOST_LIBIDL_CONFIG@%$HOST_LIBIDL_CONFIG%g +s%@HOST_LIBIDL_CFLAGS@%$HOST_LIBIDL_CFLAGS%g +s%@HOST_LIBIDL_LIBS@%$HOST_LIBIDL_LIBS%g s%@MOZ_XUL@%$MOZ_XUL%g -s%@INCLUDE_XUL@%$INCLUDE_XUL%g -s%@AIX_SHLIB_BIN@%$AIX_SHLIB_BIN%g s%@AR_FLAGS@%$AR_FLAGS%g s%@AR_LIST@%$AR_LIST%g s%@AR_EXTRACT@%$AR_EXTRACT%g @@ -12988,6 +12842,13 @@ s%@MOZ_LDAP_XPCOM@%$MOZ_LDAP_XPCOM%g s%@MOZ_LDAP_XPCOM_EXPERIMENTAL@%$MOZ_LDAP_XPCOM_EXPERIMENTAL%g s%@LDAP_CFLAGS@%$LDAP_CFLAGS%g s%@LDAP_LIBS@%$LDAP_LIBS%g +s%@HAVE_XIE@%$HAVE_XIE%g +s%@MOZ_XIE_LIBS@%$MOZ_XIE_LIBS%g +s%@MOZ_XPRINT_CFLAGS@%$MOZ_XPRINT_CFLAGS%g +s%@MOZ_XPRINT_LDFLAGS@%$MOZ_XPRINT_LDFLAGS%g +s%@MOZ_ENABLE_XPRINT@%$MOZ_ENABLE_XPRINT%g +s%@MOZ_XINERAMA_LIBS@%$MOZ_XINERAMA_LIBS%g +s%@MOZ_ENABLE_XINERAMA@%$MOZ_ENABLE_XINERAMA%g s%@XPCOM_USE_LEA@%$XPCOM_USE_LEA%g s%@UNIX_CRASH_ON_ASSERT@%$UNIX_CRASH_ON_ASSERT%g s%@NO_UNIX_ASYNC_DNS@%$NO_UNIX_ASYNC_DNS%g @@ -13002,6 +12863,7 @@ s%@SUNCTL@%$SUNCTL%g s%@ACCESSIBILITY@%$ACCESSIBILITY%g s%@MOZ_USER_DIR@%$MOZ_USER_DIR%g s%@BUILD_IDLC@%$BUILD_IDLC%g +s%@ENABLE_STRIP@%$ENABLE_STRIP%g s%@USE_ELF_DYNSTR_GC@%$USE_ELF_DYNSTR_GC%g s%@MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS@%$MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS%g s%@MOZ_COMPONENT_NSPR_LIBS@%$MOZ_COMPONENT_NSPR_LIBS%g @@ -13042,10 +12904,8 @@ s%@CROSS_COMPILE@%$CROSS_COMPILE%g s%@HOST_CFLAGS@%$HOST_CFLAGS%g s%@HOST_CXXFLAGS@%$HOST_CXXFLAGS%g s%@HOST_NSPR_MDCPUCFG@%$HOST_NSPR_MDCPUCFG%g -s%@HOST_LIBIDL_CONFIG@%$HOST_LIBIDL_CONFIG%g -s%@HOST_LIBIDL_CFLAGS@%$HOST_LIBIDL_CFLAGS%g -s%@HOST_LIBIDL_LIBS@%$HOST_LIBIDL_LIBS%g s%@TARGET_CPU@%$TARGET_CPU%g +s%@TARGET_VENDOR@%$TARGET_VENDOR%g s%@TARGET_OS@%$TARGET_OS%g s%@TARGET_NSPR_MDCPUCFG@%$TARGET_NSPR_MDCPUCFG%g s%@TARGET_MD_ARCH@%$TARGET_MD_ARCH%g diff --git a/configure.in b/configure.in index cf3af0c0da63..36a5cf7c5319 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,5 @@ dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; -*- +dnl vi: set tabstop=4 shiftwidth=4 expandtab: dnl The contents of this file are subject to the Mozilla Public dnl License Version 1.1 (the "License"); you may not use this file dnl except in compliance with the License. You may obtain a copy of @@ -38,6 +39,7 @@ AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf) AC_CANONICAL_SYSTEM AC_PREFIX_DEFAULT(`pwd`/dist) TARGET_CPU="${target_cpu}" +TARGET_VENDOR="${target_vendor}" TARGET_OS="${target_os}" dnl ======================================================== @@ -91,7 +93,6 @@ GTK2_VERSION=1.3.7 dnl Set various checks dnl ======================================================== -MISSING_NSPR= MISSING_X= dnl Initialize the Pthread test variables early so they can be @@ -295,49 +296,6 @@ AC_SUBST(GNU_AS) AC_SUBST(GNU_CC) AC_SUBST(GNU_CXX) -dnl ======================================================== -dnl Check for gcc -pipe support -dnl ======================================================== -MOZ_ARG_DISABLE_BOOL(gcc-pipe, - [ --disable-gcc-pipe Disable -pipe check for gcc], - NO_GCC_PIPE=1) - -AC_MSG_CHECKING([for gcc -pipe support]) - -if test -n "$NO_GCC_PIPE"; then - AC_MSG_RESULT([disabled]) -elif 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 - ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5 - cat dummy-hello.s | ${AS} -o dummy-hello.S - 2>&5 - if test $? = 0; then - _res_as_stdin="yes" - else - _res_as_stdin="no" - fi - if test "$_res_as_stdin" = "yes"; then - _SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -pipe" - AC_TRY_COMPILE( [ #include ], - [printf("Hello World\n");], - [_res_gcc_pipe="yes"], - [_res_gcc_pipe="no"] ) - CFLAGS=$_SAVE_CFLAGS - fi - if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then - _res="yes"; - CFLAGS="$CFLAGS -pipe" - CXXFLAGS="$CXXFLAGS -pipe" - else - _res="no" - fi - rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out - AC_MSG_RESULT([$_res]) -else - AC_MSG_RESULT([no]) -fi - dnl ======================================================== dnl Checks for programs. dnl ======================================================== @@ -376,14 +334,13 @@ AC_PATH_PROG(AUTOCONF, autoconf, :) AC_PATH_PROG(UNZIP, unzip, :) AC_PATH_PROGS(ZIP, zip) if test -z "$ZIP" || test "$ZIP" = ":"; then - AC_MSG_WARN([zip not found in \$PATH. Disabling jar packaging]) - MOZ_DISABLE_JAR_PACKAGING=1 + AC_MSG_ERROR([zip not found in \$PATH]) fi AC_PATH_PROG(SYSTEM_MAKEDEPEND, makedepend) AC_PATH_PROG(XARGS, xargs) -dnl if test -z "$XARGS" || test "$XARGS" = ":"; then -dnl AC_MSG_ERROR([xargs not found in \$PATH .]) -dnl fi +if test -z "$XARGS" || test "$XARGS" = ":"; then + AC_MSG_ERROR([xargs not found in \$PATH .]) +fi dnl Be sure the make we use is GNU make. AC_PATH_PROGS(MAKE, gmake make, :) @@ -416,6 +373,8 @@ if test "$no_x" != "yes"; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" fi +XCFLAGS="$X_CFLAGS" + dnl ======================================================== dnl set the defaults first dnl ======================================================== @@ -447,6 +406,11 @@ XPCOM_LIBS='-L$(DIST)/bin -lxpcom' MOZ_COMPONENT_NSPR_LIBS='-L$(DIST)/bin $(NSPR_LIBS)' MOZ_COMPONENT_XPCOM_LIBS='-L$(DIST)/bin -lxpcom' +MOZ_WIDGET_TOOLKIT_LDFLAGS='-lwidget_$(MOZ_WIDGET_TOOLKIT)' +MOZ_GFX_TOOLKIT_LDFLAGS='-lgfx_$(MOZ_WIDGET_TOOLKIT) $(MOZ_XLIBRGB_LDFLAGS)' +WIDGET_DLL='\"libwidget_$(MOZ_WIDGET_TOOLKIT)$(DLL_SUFFIX)\"' +GFXWIN_DLL='\"libgfx_$(MOZ_GFX_TOOLKIT)$(DLL_SUFFIX)\"' + if test -n "$CROSS_COMPILE"; then OS_TARGET="${target_os}" OS_ARCH=`echo $target_os | sed -e 's|/|_|g'` @@ -569,32 +533,6 @@ case "$host" in esac -dnl ======================================================= -dnl Check to see if we are using an old version of the Compaq C compiler. -dnl ======================================================= -dnl Even after installing this compiler, this test still fails. -dnl AC_LANG_SAVE -dnl AC_LANG_CPLUSPLUS -dnl AC_MSG_CHECKING(for old DEC C++ compiler) -dnl AC_TRY_COMPILE([], [ -dnl #if defined(__DECCXX) && (__DECCXX_VER<60190029) -dnl #error "Compiler is too old." -dnl #endif ], -dnl [AC_MSG_RESULT([no])], -dnl AC_MSG_ERROR([Compiler is too old. Get a new one: http://www.unix.digital.com/dtk/]) ) -dnl AC_LANG_RESTORE - -dnl ======================================================== -dnl Check for an old version of SUNWspro -dnl ======================================================== -case "$target" in -*-solaris*) - if test ! "$GNU_CC" && test ! -z "`${CC} -V 2>&1 | head -1 | grep '4.2'`"; then - AC_MSG_ERROR([SUNWspro4.2 is too old. Use a newer version or gcc.]) - fi - ;; -esac - dnl ======================================================== dnl System overrides of the defaults for target dnl ======================================================== @@ -617,8 +555,9 @@ case "$target" in ;; *-beos*) - AC_DEFINE(NO_X11) + no_x=yes MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -o $@' + MOZ_WIDGET_TOOLKIT="beos" DSO_LDOPTS='-nostart -Wl,-h -Wl,$@' TK_LIBS='-lbe -lroot' LIBS="$LIBS -lbe" @@ -839,6 +778,9 @@ case "$target" in _PTHREAD_LDFLAGS="" LIBS="$LIBS -L/usr/lib -lsocket -lm -lstdc++" HAVE_DEV_ZERO=1 + MOZ_WIDGET_TOOLKIT="photon" + TK_CFLAGS='-I/usr/include/photon' + TK_LIBS='-lph -lphrender' ;; *-openbsd*) @@ -861,7 +803,6 @@ case "$target" in dnl Hack... _OPENVMS_CROSS_COMPILE=1 fi - MISSING_NSPR="yes" AC_DEFINE(NO_PW_GECOS) AC_DEFINE(NO_UDSOCK) AC_DEFINE(POLL_WITH_XCONNECTIONNUMBER) @@ -883,6 +824,11 @@ case "$target" in DSO_PIC_CFLAGS='' OS_ARCH=OS2 OS_TARGET=OS2 + MOZ_WIDGET_TOOLKIT=os2 + MOZ_WIDGET_TOOLKIT_LDFLAGS='$(DIST)/lib/wdgt$(MOZ_WIDGET_TOOLKIT)' + MOZ_GFX_TOOLKIT_LDFLAGS='$(DIST)/lib/gfx_$(MOZ_WIDGET_TOOLKIT)' + WIDGET_DLL='\"wdgt$(MOZ_WIDGET_TOOLKIT)$(DLL_SUFFIX)\"' + GFXWIN_DLL='\"gfx_$(MOZ_GFX_TOOLKIT)$(DLL_SUFFIX)\"' case "$target" in *-*-os2_emx) @@ -967,10 +913,10 @@ alpha*-*-osf*) AC_DEFINE(NSCAP_DISABLE_TEST_DONTQUERY_CASES) AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES) if test "$no_x" = "yes"; then - MOZ_WIDGET_TOOLKIT='photon' - TK_CFLAGS='-I/usr/nto/include/photon' - TK_LIBS='-lphoton -lphrender' - AC_DEFINE(NO_X11) + MOZ_WIDGET_TOOLKIT='photon' + TK_CFLAGS='-I/usr/nto/include/photon' + TK_LIBS='-lphoton -lphrender' + AC_DEFINE(NO_X11) fi ;; @@ -1073,7 +1019,7 @@ dnl they can link in the static libs that provide the missing dnl symbols. dnl ======================================================== NO_LD_ARCHIVE_FLAGS= -if test -z "$MKSHLIB_FORCE_ALL"; then +if test -z "$MKSHLIB_FORCE_ALL" || test -z "$MKSHLIB_UNFORCE_ALL"; then NO_LD_ARCHIVE_FLAGS=1 fi case "$target" in @@ -1089,713 +1035,30 @@ case "$target" in esac AC_SUBST(NO_LD_ARCHIVE_FLAGS) -XLDFLAGS="$X_LIBS" -XLIBS="$X_EXTRA_LIBS" - +dnl +dnl Indicate that platform requires special thread safe +dnl locking when starting up the OJI JVM +dnl (see mozilla/modules/oji/src/nsJVMManager.cpp) dnl ======================================================== -dnl Checks for X libraries. -dnl Ordering is important. -dnl Xt is dependent upon SM as of X11R6 -dnl ======================================================== -if test "$no_x" != "yes" -then - XLIBS="-lX11 $XLIBS" - _SAVE_LDFLAGS="$LDFLAGS" - LDFLAGS="$XLDFLAGS $LDFLAGS" - AC_CHECK_LIB(X11, XDrawLines, [X11_LIBS="-lX11"], - [MISSING_X="$MISSING_X -lX11"], $XLIBS) - AC_CHECK_LIB(Xext, XextAddDisplay, [XEXT_LIBS="-lXext"], - [MISSING_X="$MISSING_X -lXext"], $XLIBS) - AC_CHECK_LIB(ICE, IceFlush, [XICE_LIBS="-lICE"],, $XLIBS) - AC_CHECK_LIB(SM, SmcCloseConnection, [XSM_LIBS="-lSM"],, $XLIBS) - AC_CHECK_LIB(Xt, XtFree, [ XT_LIBS="-lXt"], - [MISSING_X="$MISSING_X -lXt"], $X_PRE_LIBS $XLIBS) - AC_CHECK_LIB(Xmu, XmuLookupString, [XMU_LIBS="-lXmu"], - [MISSING_X="$MISSING_X -lXmu"], $X_PRE_LIBS $XLIBS $XT_LIBS $XEXT_LIBS) - - dnl ======================================================== - dnl = - dnl = Check for Xinerama - dnl = - dnl ======================================================== - AC_CHECK_LIB(Xinerama, XineramaIsActive, [MOZ_XINERAMA_LIBS="-lXinerama"],, - $XLIBS $XEXT_LIBS) - AC_CHECK_HEADER(X11/extensions/Xinerama.h) - - dnl ======================================================== - dnl = - dnl = Check for XIE - dnl = - dnl ======================================================== - AC_CHECK_LIB(XIE, XieFloGeometry, [MOZ_XIE_LIBS="-lXIE"],, - $XLIBS $XEXT_LIBS) - AC_CHECK_HEADER(X11/extensions/XIElib.h) - - if test "$MOZ_XIE_LIBS"; then - dnl ==================================================== - dnl = - dnl = If XIE is present and is desired, turn it on - dnl = - dnl ==================================================== - case $target in - *-hpux*) - ;; - *) - HAVE_XIE=1 - ;; - esac - fi - - LDFLAGS="$_SAVE_LDFLAGS" - - dnl ======================================================== - dnl = - dnl = --enable-toolkit - dnl = - dnl = Select the default x toolkit - dnl = - dnl ======================================================== - AC_ARG_ENABLE(toolkit, - [ --enable-toolkit=\$val Enable \$val fe (defaults to gtk)], - [ if test "$enableval" = "gtk" \ - -o "$enableval" = "qt" \ - -o "$enableval" = "gtk2" \ - -o "$enableval" = "xlib" - then - dnl nglayout only supports building with one toolkit, - dnl so ignore everything after the first comma (","). - MOZ_WIDGET_TOOLKIT=`echo "$enableval" | sed -e "s/,.*$//"` - else - AC_MSG_ERROR(Toolkit must be xlib, gtk, gtk2 or qt.) - fi], - - [ MOZ_WIDGET_TOOLKIT="gtk" ]) -fi # $no_x - -dnl ======================================================== -dnl = -dnl = If NSPR was not detected in the system, -dnl = use the one in the source tree (mozilla/nsprpub) -dnl = -dnl ======================================================== - -MOZ_ARG_WITH_STRING(system-nspr, - [ --without-system-nspr Skip system installed NSPR checks], - [ if test "$withval" = "no"; then - _NO_NSPR=1 - fi]) - -if test -z "$_NO_NSPR"; then - AM_PATH_NSPR(4.0.0, [MOZ_NATIVE_NSPR=1], [MOZ_NATIVE_NSPR=]) -fi - -if test -z "$MOZ_NATIVE_NSPR"; then - AC_MSG_WARN(Building local copy of NSPR) - NSPR_CFLAGS='`$(DEPTH)/nsprpub/config/nspr-config --prefix=$(DIST) --cflags`' - case "$target" in - *-*-os2_vacpp) - NSPR_LIBS='$(DIST)/lib/nspr'$NSPR_VERSION'.lib $(DIST)/lib/plc'$NSPR_VERSION'.lib $(DIST)/lib/plds'$NSPR_VERSION'.lib '$_PTHREAD_LDFLAGS'' +case "$target" in + *-hpux*) + AC_DEFINE(MOZ_OJI_REQUIRE_THREAD_SAFE_ON_STARTUP) ;; - *) - NSPR_LIBS='`$(DEPTH)/nsprpub/config/nspr-config --prefix=$(DIST) --libs`' - ;; - esac -fi - -dnl ======================================================== -dnl = -dnl = --enable-xinerama -dnl = -dnl = This turns on xinerama support. We just can't use the -dnl = autodetection of the libraries since on Red Hat 7 linking with -dnl = Xinerama crashes the dynamic loader. Make people turn it on -dnl = explicitly. The autodetection is done above in the Xlib -dnl = detection routines. -dnl = -dnl ======================================================== - - -MOZ_ARG_ENABLE_BOOL(xinerama, -[ --enable-xinerama Enable Xinerama support - ( not safe for Red Hat 7.0 ) ], - [ if test -n "$MOZ_XINERAMA_LIBS" && \ - test -n "$ac_cv_header_X11_extensions_Xinerama_h"; then - MOZ_ENABLE_XINERAMA=1 - AC_DEFINE(MOZ_ENABLE_XINERAMA) - fi ] -) - - -MOZ_WIDGET_TOOLKIT_LDFLAGS='-lwidget_$(MOZ_WIDGET_TOOLKIT)' -MOZ_GFX_TOOLKIT_LDFLAGS='-lgfx_$(MOZ_WIDGET_TOOLKIT) $(MOZ_XLIBRGB_LDFLAGS)' -WIDGET_DLL='\"libwidget_$(MOZ_WIDGET_TOOLKIT)$(DLL_SUFFIX)\"' -GFXWIN_DLL='\"libgfx_$(MOZ_GFX_TOOLKIT)$(DLL_SUFFIX)\"' - -case "$target_os" in -beos*) - MOZ_WIDGET_TOOLKIT="beos" - ;; - -nto*) - MOZ_WIDGET_TOOLKIT="photon" - AC_DEFINE(NO_X11) - TK_CFLAGS='-I/usr/include/photon' - TK_LIBS='-lph -lphrender' - ;; - -os2*) - MOZ_WIDGET_TOOLKIT=os2 - MOZ_WIDGET_TOOLKIT_LDFLAGS='$(DIST)/lib/wdgt$(MOZ_WIDGET_TOOLKIT)' - MOZ_GFX_TOOLKIT_LDFLAGS='$(DIST)/lib/gfx_$(MOZ_WIDGET_TOOLKIT)' - WIDGET_DLL='\"wdgt$(MOZ_WIDGET_TOOLKIT)$(DLL_SUFFIX)\"' - GFXWIN_DLL='\"gfx_$(MOZ_GFX_TOOLKIT)$(DLL_SUFFIX)\"' - ;; esac -dnl XXX BROKEN dnl ======================================================== -dnl XXX BROKEN dnl = -dnl XXX BROKEN dnl = --enable-gfx-toolkit -dnl XXX BROKEN dnl = -dnl XXX BROKEN dnl = Select which toolkit to use for gfx (rendering) -dnl XXX BROKEN dnl = -dnl XXX BROKEN dnl = Choices are: -dnl XXX BROKEN dnl = -dnl XXX BROKEN dnl = gtk -dnl XXX BROKEN dnl = xlib -dnl XXX BROKEN dnl = -dnl XXX BROKEN dnl = Default is whatever MOZ_WIDGET_TOOLKIT is -dnl XXX BROKEN dnl = -dnl XXX BROKEN dnl = The only valid combinations are: -dnl XXX BROKEN dnl = -dnl XXX BROKEN dnl = widget gfx -dnl XXX BROKEN dnl = ------ --- -dnl XXX BROKEN dnl = gtk gtk -dnl XXX BROKEN dnl = xlib xlib -dnl XXX BROKEN dnl = -dnl XXX BROKEN dnl = gtk xlib (not tested yet) -dnl XXX BROKEN dnl = -dnl XXX BROKEN dnl ======================================================== -dnl XXX BROKEN dnl MOZ_GFX_TOOLKIT=$MOZ_WIDGET_TOOLKIT -dnl XXX BROKEN dnl -dnl XXX BROKEN dnl AC_ARG_ENABLE(gfx-toolkit, -dnl XXX BROKEN dnl [ --enable-gfx-toolkit=\$val Enable \$val fe (defaults to same as widget)], -dnl XXX BROKEN dnl [ MOZ_GFX_TOOLKIT=`echo "$enableval" | sed -e "s/,.*$//"` ], -dnl XXX BROKEN dnl []) -dnl XXX BROKEN dnl -dnl XXX BROKEN dnl -dnl XXX BROKEN dnl if echo ":$MOZ_GFX_TOOLKIT" | grep "xlib" >/dev/null -dnl XXX BROKEN dnl then -dnl XXX BROKEN dnl MOZ_XLIBRGB_LDFLAGS=-lxlibrgb -dnl XXX BROKEN dnl MOZ_USING_XLIBRGB=1 -dnl XXX BROKEN dnl -dnl XXX BROKEN dnl AC_DEFINE(MOZ_USING_XLIBRGB) -dnl XXX BROKEN dnl -dnl XXX BROKEN dnl AC_SUBST(MOZ_XLIBRGB_LDFLAGS) -dnl XXX BROKEN dnl AC_SUBST(MOZ_USING_XLIBRGB) -dnl XXX BROKEN dnl fi dnl ======================================================== -dnl = = -dnl = Enable the toolkit as needed = -dnl = = +dnl = Flags to strip unused symbols from .so components dnl ======================================================== +case "$target" in + *-linux*) + MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script' + ;; + *-nto*) + MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script' + ;; +esac -if test "$MOZ_WIDGET_TOOLKIT" = "gtk" -then - MOZ_ENABLE_GTK=1 - MOZ_ENABLE_XREMOTE=1 - AC_DEFINE(MOZ_WIDGET_GTK) -fi - -if test "$MOZ_WIDGET_TOOLKIT" = "gtk2" -then - MOZ_ENABLE_GTK2=1 - AC_DEFINE(MOZ_WIDGET_GTK2) -fi - -if test "$MOZ_WIDGET_TOOLKIT" = "xlib" -then - MOZ_ENABLE_XLIB=1 - MOZ_ENABLE_XREMOTE=1 - AC_DEFINE(MOZ_WIDGET_XLIB) -fi - -if test "$MOZ_WIDGET_TOOLKIT" = "qt" -then - MOZ_ENABLE_QT=1 - MOZ_ENABLE_XREMOTE=1 - AC_DEFINE(MOZ_WIDGET_QT) -fi - -if test "$MOZ_WIDGET_TOOLKIT" = "photon" -then - MOZ_ENABLE_PHOTON=1 - AC_DEFINE(MOZ_WIDGET_PHOTON) -fi - - -if test "$MOZ_ENABLE_XREMOTE"; then - AC_DEFINE(MOZ_ENABLE_XREMOTE) -fi - -dnl ======================================================== -dnl = = -dnl = --with-gtk = -dnl = = -dnl = Gtk support hackery = -dnl = = -dnl ======================================================== -if test "$no_x" != "yes" -then - AC_ARG_WITH(gtk, - [ --with-gtk Enable GTK+ support ], - [ - if test "$withval" = "yes" - then - MOZ_ENABLE_GTK=1 - else - MOZ_ENABLE_GTK= - fi - ]) -fi - -if test "$MOZ_ENABLE_GTK" -then - AM_PATH_GTK($GTK_VERSION,, - AC_MSG_ERROR(Test for GTK failed.)) - -dnl ======================================================== -dnl = = -dnl = --with-java-supplement = -dnl = = -dnl = Blackwood Java Code = -dnl = = -dnl ======================================================== -if test "$no_x" != "yes" -then - AC_ARG_WITH(java-supplement, - [ --with-java-supplement Enable Blackwood Java Code], - [ - if test "$withval" = "yes" - then - MOZ_JAVA_SUPPLEMENT=1 - else - MOZ_JAVA_SUPPLEMENT= - fi - ]) -fi - - dnl ======================================================== - dnl = - dnl = GLE support - dnl = - dnl = See http://www.SoftHome.net/pub/users/timj/gle/index.htm - dnl = - dnl ======================================================== - MOZ_GLE= - MOZ_GLE_LDFLAGS= - - AC_ARG_WITH(gle, - [ --with-gle GLE support (for debugging gtk widgets) ], - [ - if test "$withval" = "yes" - then - MOZ_GLE=1 - MOZ_GLE_LDFLAGS=-lgle - AC_DEFINE(MOZ_GLE) - else - MOZ_GLE= - MOZ_GLE_LDFLAGS= - fi - ]) - - AC_ARG_WITH(static-gtk, - [ --with-static-gtk Link GTK statically if possible], - sysstaticgtk=$withval) - - if test "$sysstaticgtk" != "yes" - then - MOZ_GTK_LDFLAGS=$GTK_LIBS - - if test "$MOZ_GLE" - then - MOZ_GTK_LDFLAGS=`echo $MOZ_GTK_LDFLAGS | sed -e 's/-lgtk/-lgle -lgtk/'` - fi - else - changequote(,) - - GTK_LIBS_LOC=`echo $GTK_LIBS | sed 's/\(.*\)\(-lgtk.*\)/\1/'` - - GTK_STATIC_LOC=`echo $GTK_LIBS | sed 's/^ *-L\([^ ]*\) .*$/\1/'` - GTK_STATIC=`echo $GTK_LIBS | sed 's/^.*-l\(gtk[^ ]*\) .*/\1/'` - GDK_STATIC=`echo $GTK_LIBS | sed 's/^.*-l\(gdk[^ ]*\) .*/\1/'` - - GLIB_STATIC_LOC=`echo $GTK_LIBS | sed -e 's/^.*-lgdk[^ ]* *-L\([^ ]*\).*$/\1/' -e 's/^.* -lgdk[^ ]* .*$//'` - if test ! "$GLIB_STATIC_LOC" ; then - GLIB_STATIC_LOC=$GTK_STATIC_LOC - fi - GMODULE_STATIC=`echo $GTK_LIBS | sed 's/^.*-l\(gmodule[^ ]*\) .*/\1/'` - GLIB_STATIC=`echo $GTK_LIBS | sed 's/^.*-l\(glib[^ ]*\) .*/\1/'` - - GTK_OTHER_LIBS=`echo $GTK_LIBS | sed 's/^.*-lglib *\(.*\)/\1/'` - - changequote([,]) - - MOZ_GTK_LDFLAGS="$GTK_STATIC_LOC/lib${GTK_STATIC}.a" - MOZ_GTK_LDFLAGS="$MOZ_GTK_LDFLAGS $GTK_STATIC_LOC/lib${GDK_STATIC}.a" - MOZ_GTK_LDFLAGS="$MOZ_GTK_LDFLAGS $GLIB_STATIC_LOC/lib${GMODULE_STATIC}.a" - MOZ_GTK_LDFLAGS="$MOZ_GTK_LDFLAGS $GLIB_STATIC_LOC/lib${GLIB_STATIC}.a" - MOZ_GTK_LDFLAGS="$MOZ_GTK_LDFLAGS $GTK_LIBS_LOC $GTK_OTHER_LIBS" - fi - - MOZ_GTK_CFLAGS=$GTK_CFLAGS - -fi -dnl ======================================================== -dnl = = -dnl = End Gtk support hackery = -dnl = = -dnl = --disable-mozilla-gtk is down below because = -dnl = order matters to the Build Configurator. = -dnl = = -dnl ======================================================== - -dnl ======================================================== -dnl = Gtk2 support -dnl ======================================================== - -if test "$MOZ_ENABLE_GTK2" -then - PKG_CHECK_MODULES(MOZ_GTK2, gtk+-2.0 >= 1.3.7) -fi - -dnl ======================================================== -dnl = = -dnl = --with-xprint = -dnl = = -dnl = Xprint support hackery = -dnl = = -dnl ======================================================== -if test "$no_x" != "yes" -then - MOZ_ENABLE_XPRINT=1 - - _SAVE_LDFLAGS="$LDFLAGS" - LDFLAGS="$XLDFLAGS $LDFLAGS" - AC_CHECK_LIB(Xp, XpGetPrinterList, [XPRINT_LIBS="-lXp"], - MOZ_ENABLE_XPRINT=, $XEXT_LIBS $XLIBS) - LDFLAGS="$_SAVE_LDFLAGS" - - MOZ_XPRINT_CFLAGS="$X_CFLAGS" - MOZ_XPRINT_LDFLAGS="$XLDFLAGS $XPRINT_LIBS" - MOZ_XPRINT_LDFLAGS="$MOZ_XPRINT_LDFLAGS $XEXT_LIBS $X11_LIBS" - - MOZ_ARG_DISABLE_BOOL(xprint, - [ --disable-xprint Disable Xprint support ], - [ - if test "$enableval" = "no"; then - MOZ_ENABLE_XPRINT= - fi - ]) - if test "$MOZ_ENABLE_XPRINT"; then - AC_MSG_WARN([Xprint support enabled]) - else - AC_MSG_WARN([Xprint support disabled]) - fi -fi - -dnl ======================================================== -dnl = = -dnl = End Xprint support hackery = -dnl = = -dnl ======================================================== - -dnl ======================================================== -dnl = = -dnl = --with-xlib = -dnl = = -dnl = Xlib support hackery = -dnl = = -dnl ======================================================== -if test "$no_x" != "yes" -then - AC_ARG_WITH(xlib, - [ --with-xlib Enable xlib support ], - [ - if test "$withval" = "yes" - then - MOZ_ENABLE_XLIB=1 - else - MOZ_ENABLE_XLIB= - fi - ]) -fi - -if test "$MOZ_ENABLE_XLIB" -then - AC_MSG_CHECKING(for xlib insanity) - AC_MSG_RESULT(yes) - - MOZ_XLIB_CFLAGS="$X_CFLAGS" - MOZ_XLIB_LDFLAGS="$XLDFLAGS" - MOZ_XLIB_LDFLAGS="$MOZ_XLIB_LDFLAGS $XEXT_LIBS $X11_LIBS" -fi -dnl ======================================================== -dnl = = -dnl = End Xlib support hackery = -dnl = = -dnl ======================================================== - - -dnl ======================================================== -dnl = = -dnl = --with-qt = -dnl = = -dnl = Qt support hackery = -dnl = = -dnl ======================================================== -if test "$no_x" != "yes" -then - AC_ARG_WITH(qt, - [ --with-qt Enable Qt support ], - [ - if test "$withval" = "yes" - then - MOZ_ENABLE_QT=1 - else - MOZ_ENABLE_QT= - fi - ]) -fi - -if test "$MOZ_ENABLE_QT" -then - QTINCDIR="/include" - AC_ARG_WITH(qtdir, - [ --with-qtdir=\$dir Specify Qt directory ], - [ QTDIR=$withval]) - - if test -z "$QTDIR"; then - QTDIR="/usr" - QTINCDIR="/include/qt" - 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 - AC_MSG_RESULT([$HOST_MOC]) - MOC=$HOST_MOC - - QT_CFLAGS="-I${QTDIR}${QTINCDIR} -DQT_GENUINE_STR" - QT_LIBS="-L/usr/X11R6/lib -L${QTDIR}/lib -lqt -lXext -lX11" -dnl AM_PATH_QT($QT_VERSION,, -dnl AC_MSG_ERROR(Test for QT failed.)) - - AC_ARG_WITH(static-qt, - [ --with-static-qt Link qt statically if possible], - sysstaticqt=$withval) - - if test "$sysstaticqt" != "yes"; then - MOZ_QT_LDFLAGS=$QT_LIBS - else - changequote(,) - - QT_LIBS_LOC=`echo $QT_LIBS | sed 's/\(.*\)\(-lqt.*\)/\1/'` - - QT_STATIC_LOC=`echo $QT_LIBS | sed 's/^ *-L\([^ ]*\) .*$/\1/'` - QT_STATIC=`echo $QT_LIBS | sed 's/^.*-l\(qt[^ ]*\) .*/\1/'` - - changequote([,]) - - MOZ_QT_LDFLAGS="$QT_STATIC_LOC/lib${QT_STATIC}.a" - MOZ_QT_LDFLAGS="$MOZ_QT_LDFLAGS $QT_STATIC_LOC/lib${QT_STATIC}.a" - MOZ_QT_LDFLAGS="$MOZ_QT_LDFLAGS $QT_LIBS_LOC" - fi - - MOZ_QT_CFLAGS=$QT_CFLAGS - - AC_LANG_CPLUSPLUS - - _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_C -fi -dnl ======================================================== -dnl = = -dnl = End Qt support hackery = -dnl = = -dnl ======================================================== - - - -dnl ======================================================== -dnl = = -dnl = Define TK_LIBS and TK_CFLAGS for apps that need to = -dnl = link in the toolkit (like viewer) = -dnl = = -dnl ======================================================== -if test "$MOZ_WIDGET_TOOLKIT" = "gtk" -then - TK_CFLAGS="$MOZ_GTK_CFLAGS" - TK_LIBS="$MOZ_GTK_LDFLAGS" -fi - -if test "$MOZ_WIDGET_TOOLKIT" = "gtk2" -then - TK_CFLAGS="$MOZ_GTK2_CFLAGS" - TK_LIBS="$MOZ_GTK2_LIBS" -fi - -if test "$MOZ_WIDGET_TOOLKIT" = "xlib" -then - TK_CFLAGS="$MOZ_XLIB_CFLAGS" - TK_LIBS="$MOZ_XLIB_LDFLAGS" -fi - -if test "$MOZ_WIDGET_TOOLKIT" = "qt" -then - TK_CFLAGS="$MOZ_QT_CFLAGS" - TK_LIBS="$MOZ_QT_LDFLAGS" -fi - -dnl ======================================================== -dnl = = -dnl = Make sure a default toolkit is set = -dnl = = -dnl ======================================================== -AC_DEFINE_UNQUOTED(MOZ_DEFAULT_TOOLKIT,"$MOZ_WIDGET_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_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_XPRINT_CFLAGS) -AC_SUBST(MOZ_XPRINT_LDFLAGS) -AC_SUBST(MOZ_ENABLE_XPRINT) -AC_SUBST(MOZ_QT_CFLAGS) -AC_SUBST(MOZ_QT_LDFLAGS) -AC_SUBST(MOZ_DEFAULT_TOOLKIT) - -AC_SUBST(HAVE_XIE) -AC_SUBST(MOZ_XIE_LIBS) - -AC_SUBST(MOZ_XINERAMA_LIBS) -AC_SUBST(MOZ_ENABLE_XINERAMA) - -XCFLAGS="$X_CFLAGS" - -AC_SUBST(XCFLAGS) -AC_SUBST(XLDFLAGS) -AC_SUBST(XLIBS) - -AC_SUBST(MOC) - -if test "$MOZ_ENABLE_GTK" || test "$MOZ_ENABLE_QT" \ -|| test "$MOZ_ENABLE_XLIB" \ -|| test "$MOZ_ENABLE_GTK2" -then -AC_DEFINE(MOZ_X11) -fi - -dnl Check for GLib and libIDL. -dnl ======================================================== -SKIP_IDL_CHECK="no" - -dnl = Allow users to disable libIDL checking for standalone modules -AC_ARG_WITH(libIDL, -[ --without-libIDL Skip check for libIDL], -[ if test "$withval" = "no"; then - SKIP_IDL_CHECK="yes" - fi ]) - -if test "$SKIP_IDL_CHECK" = "no" -then - AM_PATH_LIBIDL($LIBIDL_VERSION,,_LIBIDL_NOT_FOUND=1) - dnl - dnl If we don't have a libIDL config program & not cross-compiling, - dnl look for orbit-config instead. - dnl - if test -n "$_LIBIDL_NOT_FOUND" && test -z "$CROSS_COMPILE"; then - AC_PATH_PROGS(ORBIT_CONFIG, $ORBIT_CONFIG orbit-config) - if test -n "$ORBIT_CONFIG"; then - _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}` - _ORBIT_LIB_PATH=`${PERL} -e '{ for $f (@ARGV) { print "$f " if ($f =~ m/^-L/); } }' -- ${_ORBIT_LIBS}` - LIBIDL_CFLAGS="$_ORBIT_INC_PATH" - LIBIDL_LIBS="$_ORBIT_LIB_PATH -lIDL -lglib" - LIBIDL_CONFIG= - _LIBIDL_NOT_FOUND= - fi - fi - if test -n "$_LIBIDL_NOT_FOUND"; then - AC_MSG_ERROR([libIDL not found. - libIDL $LIBIDL_VERSION or higher is required. - See http://andrewtv.org/libIDL/ for more information.]) - fi -fi - -if test -n "$CROSS_COMPILE"; then - if test -z "$HOST_LIBIDL_CONFIG"; then - HOST_LIBIDL_CONFIG="$LIBIDL_CONFIG" - fi - if test -n "$HOST_LIBIDL_CONFIG"; then - HOST_LIBIDL_CFLAGS=`${HOST_LIBIDL_CONFIG} --cflags` - HOST_LIBIDL_LIBS=`${HOST_LIBIDL_CONFIG} --libs` - else - HOST_LIBIDL_CFLAGS="$LIBIDL_CFLAGS" - HOST_LIBIDL_LIBS="$LIBIDL_LIBS" - fi - if test "$OS_TARGET" = "POSIX_for_OpenVMS_AXP"; then - LIBIDL_CFLAGS=`${LIBIDL_CONFIG}-VMS --cflags` - LIBIDL_LIBS=`${LIBIDL_CONFIG}-VMS --libs` - fi -fi - -if test -z "${GLIB_CFLAGS}" || test -z "${GLIB_LIBS}" ; then - AM_PATH_GLIB(${GLIB_VERSION}) -fi - -AC_SUBST(LIBIDL_CFLAGS) -AC_SUBST(LIBIDL_LIBS) -AC_SUBST(GLIB_CFLAGS) -AC_SUBST(GLIB_LIBS) dnl Checks for typedefs, structures, and compiler characteristics. dnl ======================================================== @@ -2061,16 +1324,67 @@ if test ! "$GNU_CXX"; then fi AC_CHECK_LIB(socket, socket) +XLDFLAGS="$X_LIBS" +XLIBS="$X_EXTRA_LIBS" + +dnl ======================================================== +dnl Checks for X libraries. +dnl Ordering is important. +dnl Xt is dependent upon SM as of X11R6 +dnl ======================================================== +if test "$no_x" != "yes" +then + XLIBS="-lX11 $XLIBS" + _SAVE_LDFLAGS="$LDFLAGS" + LDFLAGS="$XLDFLAGS $LDFLAGS" + AC_CHECK_LIB(X11, XDrawLines, [X11_LIBS="-lX11"], + [MISSING_X="$MISSING_X -lX11"], $XLIBS) + AC_CHECK_LIB(Xext, XextAddDisplay, [XEXT_LIBS="-lXext"], + [MISSING_X="$MISSING_X -lXext"], $XLIBS) + AC_CHECK_LIB(ICE, IceFlush, [XICE_LIBS="-lICE"],, $XLIBS) + AC_CHECK_LIB(SM, SmcCloseConnection, [XSM_LIBS="-lSM"],, $XLIBS) + AC_CHECK_LIB(Xt, XtFree, [ XT_LIBS="-lXt"], + [MISSING_X="$MISSING_X -lXt"], $X_PRE_LIBS $XLIBS) + + dnl ======================================================== + dnl = Check for Xinerama + dnl ======================================================== + AC_CHECK_LIB(Xinerama, XineramaIsActive, [MOZ_XINERAMA_LIBS="-lXinerama"],, + $XLIBS $XEXT_LIBS) + AC_CHECK_HEADER(X11/extensions/Xinerama.h) + + dnl ======================================================== + dnl = Check for XIE + dnl ======================================================== + AC_CHECK_LIB(XIE, XieFloGeometry, [MOZ_XIE_LIBS="-lXIE"],, + $XLIBS $XEXT_LIBS) + AC_CHECK_HEADER(X11/extensions/XIElib.h) + + if test "$MOZ_XIE_LIBS"; then + dnl ==================================================== + dnl = If XIE is present and is desired, turn it on + dnl ==================================================== + case $target in + *-hpux*) + ;; + *) + HAVE_XIE=1 + ;; + esac + fi + + LDFLAGS="$_SAVE_LDFLAGS" + +fi # $no_x + +AC_SUBST(XCFLAGS) +AC_SUBST(XLDFLAGS) +AC_SUBST(XLIBS) + dnl ======================================================== -dnl = dnl = pthread support -dnl = +dnl = Start by checking whether the system support pthreads dnl ======================================================== -dnl -dnl Start by checking whether the system support pthreads -dnl - - MOZ_CHECK_PTHREADS(pthreads, USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads", MOZ_CHECK_PTHREADS(pthread, @@ -2084,25 +1398,21 @@ MOZ_CHECK_PTHREADS(pthreads, ) ) -dnl +dnl ======================================================== dnl Check the command line for --with-pthreads -dnl -AC_ARG_WITH(pthreads, +dnl ======================================================== +MOZ_ARG_WITH_BOOL(pthreads, [ --with-pthreads Force use of system pthread library with NSPR ], - [if test "$withval" = "yes" - then - if test "$USE_PTHREADS"x = x - then - AC_MSG_ERROR([ --with-pthreads specified for a system without pthread support ]); - fi - else - USE_PTHREADS= - _PTHREAD_LDFLAGS="" - fi] ) +[ if test "$USE_PTHREADS"x = x; then + AC_MSG_ERROR([ --with-pthreads specified for a system without pthread support ]); +fi], + USE_PTHREADS= + _PTHREAD_LDFLAGS= +) -dnl +dnl ======================================================== dnl Do the platform specific pthread hackery -dnl +dnl ======================================================== if test "$USE_PTHREADS"x != x then dnl @@ -2192,24 +1502,10 @@ then esac fi -dnl -dnl Indicate that platform requires special thread safe -dnl locking when starting up the OJI JVM -dnl (see mozilla/modules/oji/src/nsJVMManager.cpp) dnl ======================================================== - - case "$target" in - *-hpux*) - AC_DEFINE(MOZ_OJI_REQUIRE_THREAD_SAFE_ON_STARTUP) - ;; - *) - ;; - esac - - dnl See if mmap sees writes -dnl ======================================================== dnl For cross compiling, just define it as no, which is a safe default +dnl ======================================================== AC_MSG_CHECKING(whether mmap() sees write()s) changequote(,) @@ -2362,6 +1658,8 @@ EOF ;; esac +dnl =================================================================== +dnl ======================================================== dnl By default, turn rtti and exceptions off on g++/egcs dnl ======================================================== if test "$GNU_CXX"; then @@ -2391,7 +1689,9 @@ if test "$MIPSPRO_CXX"; then _MOZ_EXCEPTIONS_FLAGS="-LANG:exceptions=OFF" fi +dnl ======================================================== dnl Put your C++ language/feature checks below +dnl ======================================================== AC_LANG_CPLUSPLUS AC_MSG_CHECKING(for ios::binary) @@ -2722,9 +2022,7 @@ dnl End of C++ language/feature checks AC_LANG_C dnl ======================================================== -dnl = dnl = Internationalization checks -dnl = dnl ======================================================== dnl dnl Internationalization and Locale support is different @@ -2748,304 +2046,842 @@ dnl ======================================================== dnl The macros used for command line options dnl are defined in build/autoconf/altoptions.m4. + dnl ======================================================== dnl = -dnl = Components and Features +dnl = Check for external package dependencies +dnl = +dnl ======================================================== +MOZ_ARG_HEADER(External Packages) + +dnl ======================================================== +dnl = If NSPR was not detected in the system, +dnl = use the one in the source tree (mozilla/nsprpub) +dnl ======================================================== +MOZ_ARG_WITHOUT_BOOL(system-nspr, +[ --without-system-nspr Do not use system installed NSPR], + _NO_NSPR=1 ) + +if test -z "$_NO_NSPR"; then + AM_PATH_NSPR(4.0.0, [MOZ_NATIVE_NSPR=1], [MOZ_NATIVE_NSPR=]) +fi + +if test -z "$MOZ_NATIVE_NSPR"; then + AC_MSG_WARN(Building local copy of NSPR) + NSPR_CFLAGS='`$(DEPTH)/nsprpub/config/nspr-config --prefix=$(DIST) --cflags`' + case "$target" in + *-*-os2_vacpp) + NSPR_LIBS='$(DIST)/lib/nspr'$NSPR_VERSION'.lib $(DIST)/lib/plc'$NSPR_VERSION'.lib $(DIST)/lib/plds'$NSPR_VERSION'.lib '$_PTHREAD_LDFLAGS'' + ;; + *) + NSPR_LIBS='`$(DEPTH)/nsprpub/config/nspr-config --prefix=$(DIST) --libs`' + ;; + esac +fi + +dnl system JPEG support +dnl ======================================================== +dnl XXX - remove this next milestone +if test -z "$with_system_jpeg" && test "$with_jpeg"; then + with_system_jpeg=$with_jpeg +fi +MOZ_ARG_WITH_STRING(system-jpeg, +[ --with-system-jpeg[=PFX] + Use installed libjpeg [installed at prefix PFX]], + JPEG_DIR=$withval) + +_SAVE_CFLAGS=$CFLAGS +_SAVE_LDFLAGS=$LDFLAGS +_SAVE_LIBS=$LIBS +if test -n "${JPEG_DIR}"; then + CFLAGS="-I${JPEG_DIR}/include $CFLAGS" + LDFLAGS="-L${JPEG_DIR}/lib $LDFLAGS" +fi +if test "$JPEG_DIR" = no; then + SYSTEM_JPEG= +else + AC_CHECK_LIB(jpeg, jpeg_destroy_compress, [SYSTEM_JPEG=1 JPEG_LIBS="-ljpeg $JPEG_LIBS"], SYSTEM_JPEG=, $JPEG_LIBS) +fi + +if test "$SYSTEM_JPEG" = 1; then + LIBS="$JPEG_LIBS $LIBS" + AC_TRY_RUN( + #include + #include + #include + int main () { + #if JPEG_LIB_VERSION >= $MOZJPEG + exit(0); + #else + exit(1); + #endif + } + , SYSTEM_JPEG=1, [SYSTEM_JPEG= JPEG_CFLAGS= JPEG_LIBS=], SYSTEM_JPEG= ) + rm -f core +fi +CFLAGS=$_SAVE_CFLAGS +LDFLAGS=$_SAVE_LDFLAGS +LIBS=$_SAVE_LIBS + +if test -n "${JPEG_DIR}" -a -d "${JPEG_DIR}" -a "$SYSTEM_JPEG" = 1; then + JPEG_CFLAGS="-I${JPEG_DIR}/include" + JPEG_LIBS="-L${JPEG_DIR}/lib ${JPEG_LIBS}" +fi + +dnl system ZLIB support +dnl ======================================================== +dnl XXX - remove this next milestone +if test -z "$with_system_zlib" && test "$with_zlib"; then + with_system_zlib=$with_zlib +fi +MOZ_ARG_WITH_STRING(system-zlib, +[ --with-system-zlib[=PFX] + Use installed libz [installed at prefix PFX]], + ZLIB_DIR=$withval) + +_SAVE_CFLAGS=$CFLAGS +_SAVE_LDFLAGS=$LDFLAGS +if test -n "${ZLIB_DIR}"; then + CFLAGS="-I${ZLIB_DIR}/include $CFLAGS" + LDFLAGS="-L${ZLIB_DIR}/lib $LDFLAGS" +fi +if test "$ZLIB_DIR" = no; then + SYSTEM_ZLIB= +else + AC_MSG_CHECKING("for zlib.h") + AC_TRY_COMPILE([#include "zlib.h"], [], + [result="yes" SYSTEM_ZLIB=1], + [result="no" SYSTEM_ZLIB=]) + AC_MSG_RESULT("$result") +fi +if test "$SYSTEM_ZLIB" = 1; then + AC_CHECK_LIB(z, gzread, [SYSTEM_ZLIB=1 ZLIB_LIBS="-lz $ZLIB_LIBS"], + [SYSTEM_ZLIB= ZLIB_CFLAGS= ZLIB_LIBS=], $ZLIB_LIBS) +fi +CFLAGS=$_SAVE_CFLAGS +LDFLAGS=$_SAVE_LDFLAGS + +if test "${ZLIB_DIR}" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then + ZLIB_CFLAGS="-I${ZLIB_DIR}/include" + ZLIB_LIBS="-L${ZLIB_DIR}/lib ${ZLIB_LIBS}" +fi + +dnl system PNG Support +dnl ======================================================== +dnl XXX - remove this next milestone +if test -z "$with_system_png" && test "$with_png"; then + with_system_png=$with_png +fi +MOZ_ARG_WITH_STRING(system-png, +[ --with-system-png[=PFX] + Use installed libpng [installed at prefix PFX]], + PNG_DIR=$withval) + +_SAVE_CFLAGS=$CFLAGS +_SAVE_LDFLAGS=$LDFLAGS +_SAVE_LIBS=$LIBS +CFLAGS="$ZLIB_CFLAGS $CFLAGS" +LDFLAGS="$ZLIB_LIBS -lz $LDFLAGS" +if test -n "${PNG_DIR}"; then + CFLAGS="-I${PNG_DIR}/include $CFLAGS" + LDFLAGS="-L${PNG_DIR}/lib $LDFLAGS" +fi +if test "$PNG_DIR" = no; then + SYSTEM_PNG= +else + AC_CHECK_LIB(png, png_get_valid, [SYSTEM_PNG=1 PNG_LIBS="-lpng $PNG_LIBS"], + SYSTEM_PNG=, $PNG_LIBS) +fi +if test "$SYSTEM_PNG" = 1; then + LIBS="$PNG_LIBS $LIBS" + AC_TRY_RUN( + #include + #include + #include + int main () { + #if PNG_LIBPNG_VER >= $MOZPNG + exit(0); + #else + exit(1); + #endif + } + , SYSTEM_PNG=1, [SYSTEM_PNG= PNG_CFLAGS= PNG_LIBS=], SYSTEM_PNG= ) + rm -f core +fi +CFLAGS=$_SAVE_CFLAGS +LDFLAGS=$_SAVE_LDFLAGS +LIBS=$_SAVE_LIBS + +if test "${PNG_DIR}" -a -d "${PNG_DIR}" -a "$SYSTEM_PNG" = 1; then + PNG_CFLAGS="-I${PNG_DIR}/include" + PNG_LIBS="-L${PNG_DIR}/lib ${PNG_LIBS}" +fi + +dnl system MNG Support +dnl ======================================================== +dnl XXX - remove this next milestone +if test -z "$with_system_mng" && test "$with_mng"; then + with_system_mng=$with_mng +fi +MOZ_ARG_WITH_STRING(system-mng, +[ --with-system-mng[=PFX] + Use installed libmng [installed at prefix PFX]], + MNG_DIR=$withval) + +_SAVE_CFLAGS=$CFLAGS +_SAVE_LDFLAGS=$LDFLAGS +_SAVE_LIBS=$LIBS +CFLAGS="$ZLIB_CFLAGS $CFLAGS" +LDFLAGS="$ZLIB_LIBS -lz $LDFLAGS" +if test -n "${MNG_DIR}"; then + CFLAGS="-I${MNG_DIR}/include $CFLAGS" + LDFLAGS="-L${MNG_DIR}/lib $LDFLAGS" +fi +if test "$MNG_DIR" = no; then + SYSTEM_MNG= +else + AC_CHECK_LIB(mng, mng_initialize, [SYSTEM_MNG=1 MNG_LIBS="-lmng $MNG_LIBS"], + SYSTEM_MNG=, $MNG_LIBS) +fi +if test "$SYSTEM_MNG" = 1; then + LIBS="$MNG_LIBS $LIBS" + AC_TRY_RUN( + #include + #include + #include + int main () { + #if (((MNG_VERSION_MAJOR)<<16)|((MNG_VERSION_MINOR)<<8)|(MNG_VERSION_RELEASE)) >= $MOZMNG + exit(0); + #else + exit(1); + #endif + } + , SYSTEM_MNG=1, [SYSTEM_MNG= MNG_CFLAGS= MNG_LIBS=], SYSTEM_MNG= ) + rm -f core +fi +CFLAGS=$_SAVE_CFLAGS +LDFLAGS=$_SAVE_LDFLAGS +LIBS=$_SAVE_LIBS + +if test "${MNG_DIR}" -a -d "${MNG_DIR}" -a "$SYSTEM_MNG" = 1; then + MNG_CFLAGS="-I${MNG_DIR}/include" + MNG_LIBS="-L${MNG_DIR}/lib ${MNG_LIBS}" +fi + + +dnl ======================================================== +dnl = +dnl = Toolkit Options +dnl = +dnl ======================================================== +MOZ_ARG_HEADER(Toolkit Options) + +if test "$no_x" != "yes"; then + dnl ======================================================== + dnl = Select the default x toolkit + dnl ======================================================== + dnl XXX - remove this next milestone + if test -z "$enable_default_toolkit" && test "$enable_toolkit"; then + enable_default_toolkit=$enable_toolkit + fi + MOZ_ARG_ENABLE_STRING(default-toolkit, + [ --enable-default-toolkit=TK + Select default toolkit (default=gtk)], + [ _DEFAULT_TOOLKIT=$enableval ], + [ _DEFAULT_TOOLKIT=gtk ]) + + if test "$_DEFAULT_TOOLKIT" = "gtk" \ + -o "$_DEFAULT_TOOLKIT" = "qt" \ + -o "$_DEFAULT_TOOLKIT" = "gtk2" \ + -o "$_DEFAULT_TOOLKIT" = "xlib" + 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 + AC_MSG_ERROR(Toolkit must be xlib, gtk, gtk2 or qt.) + fi + + dnl ======================================================== + dnl = Gtk support hackery = + dnl ======================================================== + dnl XXX - remove this next milestone + if test -z "$enable_toolkit_gtk" && test "$with_gtk"; then + enable_toolkit_gtk=$with_gtk + fi + MOZ_ARG_ENABLE_BOOL(toolkit-gtk, + [ --enable-toolkit-gtk Enable GTK+ toolkit support ], + MOZ_ENABLE_GTK=1, + MOZ_ENABLE_GTK= ) + + + dnl ======================================================== + dnl = Xlib support hackery = + dnl ======================================================== + dnl XXX - remove this next milestone + if test -z "$enable_toolkit_xlib" && test "$with_xlib"; then + enable_toolkit_xlib=$with_xlib + fi + MOZ_ARG_ENABLE_BOOL(toolkit-xlib, + [ --enable-toolkit-xlib Enable xlib toolkit support ], + MOZ_ENABLE_XLIB=1, + MOZ_ENABLE_XLIB= ) + + dnl ======================================================== + dnl = Qt support hackery = + dnl ======================================================== + dnl XXX - remove this next milestone + if test -z "$enable_toolkit_qt" && test "$with_qt"; then + enable_toolkit_qt=$with_qt + fi + MOZ_ARG_ENABLE_BOOL(toolkit-qt, + [ --enable-toolkit-qt Enable Qt Toolkit support ], + MOZ_ENABLE_QT=1, + MOZ_ENABLE_QT= ) + +fi # !no_x + +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 + TK_CFLAGS='$(MOZ_GTK_CFLAGS)' + TK_LIBS='$(MOZ_GTK_LDFLAGS)' + AC_DEFINE(MOZ_WIDGET_GTK) + ;; + +gtk2) + MOZ_ENABLE_GTK2=1 + TK_CFLAGS='$(MOZ_GTK2_CFLAGS)' + TK_LIBS='$(MOZ_GTK2_LIBS)' + AC_DEFINE(MOZ_WIDGET_GTK2) + ;; + +xlib) + MOZ_ENABLE_XLIB=1 + MOZ_ENABLE_XREMOTE=1 + TK_CFLAGS='$(MOZ_XLIB_CFLAGS)' + TK_LIBS='$(MOZ_XLIB_LDFLAGS)' + AC_DEFINE(MOZ_WIDGET_XLIB) + ;; + +qt) + MOZ_ENABLE_QT=1 + MOZ_ENABLE_XREMOTE=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) + ;; +esac + +if test "$MOZ_ENABLE_XREMOTE"; then + AC_DEFINE(MOZ_ENABLE_XREMOTE) +fi + +if test "$MOZ_ENABLE_GTK" +then + AM_PATH_GTK($GTK_VERSION,, + AC_MSG_ERROR(Test for GTK failed.)) + + dnl ======================================================== + dnl = GLE support + dnl = See http://www.SoftHome.net/pub/users/timj/gle/index.htm + dnl ======================================================== + MOZ_GLE= + MOZ_GLE_LDFLAGS= + + dnl XXX - remove this next milestone + if test -z "$enable_gle_support" && test "$enable_gle"; then + enable_gle_support=$enable_gle + fi + MOZ_ARG_ENABLE_BOOL(gle, + [ --enable-gle-support + GLE support (for debugging gtk widgets) ], + MOZ_GLE=1 + MOZ_GLE_LDFLAGS=-lgle + AC_DEFINE(MOZ_GLE), + MOZ_GLE= + MOZ_GLE_LDFLAGS= ) + + MOZ_ARG_WITH_BOOL(static-gtk, + [ --with-static-gtk Link GTK statically if possible], + sysstaticgtk=$enableval) + + if test "$sysstaticgtk" != "yes"; then + MOZ_GTK_LDFLAGS=$GTK_LIBS + + if test "$MOZ_GLE"; then + MOZ_GTK_LDFLAGS=`echo $MOZ_GTK_LDFLAGS | sed -e 's/-lgtk/-lgle -lgtk/'` + fi + else + changequote(,) + + GTK_LIBS_LOC=`echo $GTK_LIBS | sed 's/\(.*\)\(-lgtk.*\)/\1/'` + + GTK_STATIC_LOC=`echo $GTK_LIBS | sed 's/^ *-L\([^ ]*\) .*$/\1/'` + GTK_STATIC=`echo $GTK_LIBS | sed 's/^.*-l\(gtk[^ ]*\) .*/\1/'` + GDK_STATIC=`echo $GTK_LIBS | sed 's/^.*-l\(gdk[^ ]*\) .*/\1/'` + + GLIB_STATIC_LOC=`echo $GTK_LIBS | sed -e 's/^.*-lgdk[^ ]* *-L\([^ ]*\).*$/\1/' -e 's/^.* -lgdk[^ ]* .*$//'` + if test ! "$GLIB_STATIC_LOC" ; then + GLIB_STATIC_LOC=$GTK_STATIC_LOC + fi + GMODULE_STATIC=`echo $GTK_LIBS | sed 's/^.*-l\(gmodule[^ ]*\) .*/\1/'` + GLIB_STATIC=`echo $GTK_LIBS | sed 's/^.*-l\(glib[^ ]*\) .*/\1/'` + + GTK_OTHER_LIBS=`echo $GTK_LIBS | sed 's/^.*-lglib *\(.*\)/\1/'` + + changequote([,]) + + MOZ_GTK_LDFLAGS="$GTK_STATIC_LOC/lib${GTK_STATIC}.a" + MOZ_GTK_LDFLAGS="$MOZ_GTK_LDFLAGS $GTK_STATIC_LOC/lib${GDK_STATIC}.a" + MOZ_GTK_LDFLAGS="$MOZ_GTK_LDFLAGS $GLIB_STATIC_LOC/lib${GMODULE_STATIC}.a" + MOZ_GTK_LDFLAGS="$MOZ_GTK_LDFLAGS $GLIB_STATIC_LOC/lib${GLIB_STATIC}.a" + MOZ_GTK_LDFLAGS="$MOZ_GTK_LDFLAGS $GTK_LIBS_LOC $GTK_OTHER_LIBS" + fi + + MOZ_GTK_CFLAGS=$GTK_CFLAGS + +fi + +if test "$MOZ_ENABLE_GTK2" +then + PKG_CHECK_MODULES(MOZ_GTK2, gtk+-2.0 >= 1.3.7) +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 + QTINCDIR="/include" + MOZ_ARG_WITH_STRING(qtdir, + [ --with-qtdir=\$dir Specify Qt directory ], + [ QTDIR=$withval]) + + if test -z "$QTDIR"; then + QTDIR="/usr" + QTINCDIR="/include/qt" + 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" + QT_LIBS="-L/usr/X11R6/lib -L${QTDIR}/lib -lqt -lXext -lX11" +dnl AM_PATH_QT($QT_VERSION,, +dnl AC_MSG_ERROR(Test for QT failed.)) + + MOZ_ARG_WITH_BOOL(static-qt, + [ --with-static-qt Link qt statically if possible], + sysstaticqt=$withval) + + if test "$sysstaticqt" != "yes"; then + MOZ_QT_LDFLAGS=$QT_LIBS + else + changequote(,) + + QT_LIBS_LOC=`echo $QT_LIBS | sed 's/\(.*\)\(-lqt.*\)/\1/'` + + QT_STATIC_LOC=`echo $QT_LIBS | sed 's/^ *-L\([^ ]*\) .*$/\1/'` + QT_STATIC=`echo $QT_LIBS | sed 's/^.*-l\(qt[^ ]*\) .*/\1/'` + + changequote([,]) + + MOZ_QT_LDFLAGS="$QT_STATIC_LOC/lib${QT_STATIC}.a" + MOZ_QT_LDFLAGS="$MOZ_QT_LDFLAGS $QT_STATIC_LOC/lib${QT_STATIC}.a" + MOZ_QT_LDFLAGS="$MOZ_QT_LDFLAGS $QT_LIBS_LOC" + fi + + MOZ_QT_CFLAGS=$QT_CFLAGS + + AC_LANG_CPLUSPLUS + + _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_C +fi + +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_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_GTK" || test "$MOZ_ENABLE_QT" \ +|| test "$MOZ_ENABLE_XLIB" \ +|| test "$MOZ_ENABLE_GTK2" +then + AC_DEFINE(MOZ_X11) +fi + +dnl ======================================================== +dnl = +dnl = Components & Features dnl = dnl ======================================================== MOZ_ARG_HEADER(Components and Features) -MOZ_ARG_DISABLE_BOOL(logging, -[ --disable-logging Disable logging facilities], - NS_DISABLE_LOGGING=1) -if test "$NS_DISABLE_LOGGING"; then - AC_DEFINE(NS_DISABLE_LOGGING) -else - AC_DEFINE(MOZ_LOGGING) -fi - -dnl build Mail & News by default +dnl ========================================================= +dnl = Mail & News +dnl ========================================================= MOZ_MAIL_NEWS=1 MOZ_ARG_DISABLE_BOOL(mailnews, [ --disable-mailnews Disable building of mail & news components], - MOZ_MAIL_NEWS= ) + MOZ_MAIL_NEWS= ) AC_SUBST(MOZ_MAIL_NEWS) -dnl Turn on reflow counting -MOZ_REFLOW_PERF= -MOZ_ARG_ENABLE_BOOL(reflow-perf, -[ --enable-reflow-perf Enable reflow performance tracing], - MOZ_REFLOW_PERF=1 ) -if test "$MOZ_REFLOW_PERF"; then - AC_DEFINE(MOZ_REFLOW_PERF) +dnl ========================================================= +dnl = LDAP +dnl ========================================================= +MOZ_LDAP_XPCOM=1 +MOZ_ARG_DISABLE_BOOL(ldap, +[ --disable-ldap Disable LDAP support], + MOZ_LDAP_XPCOM=) + +dnl ======================================================== +dnl = Xprint +dnl ======================================================== +if test "$no_x" != "yes" +then + MOZ_ENABLE_XPRINT=1 + + _SAVE_LDFLAGS="$LDFLAGS" + LDFLAGS="$XLDFLAGS $LDFLAGS" + AC_CHECK_LIB(Xp, XpGetPrinterList, [XPRINT_LIBS="-lXp"], + MOZ_ENABLE_XPRINT=, $XEXT_LIBS $XLIBS) + LDFLAGS="$_SAVE_LDFLAGS" + + MOZ_XPRINT_CFLAGS="$X_CFLAGS" + MOZ_XPRINT_LDFLAGS="$XLDFLAGS $XPRINT_LIBS" + MOZ_XPRINT_LDFLAGS="$MOZ_XPRINT_LDFLAGS $XEXT_LIBS $X11_LIBS" + + MOZ_ARG_DISABLE_BOOL(xprint, + [ --disable-xprint Disable Xprint support ], + MOZ_ENABLE_XPRINT=, + MOZ_ENABLE_XPRINT=1 ) fi -AC_SUBST(MOZ_REFLOW_PERF) -dnl make sure that we compile in multi-processor support -NS_MT_SUPPORTED=1 -AC_DEFINE(NS_MT_SUPPORTED) +dnl ======================================================== +dnl = Build Personal Security Manager +dnl ======================================================== +MOZ_PSM= +MOZ_ARG_ENABLE_BOOL(crypto, +[ --enable-crypto Enable crypto support (Personal Security Manager)], + MOZ_PSM=1 ) -dnl build the tests by default -ENABLE_TESTS=1 -MOZ_ARG_DISABLE_BOOL(tests, -[ --disable-tests Do not build tests libraries & programs], - ENABLE_TESTS= ) +dnl ======================================================== +dnl = JS Debugger XPCOM component (js/jsd) +dnl ======================================================== +MOZ_JSDEBUGGER=1 +MOZ_ARG_DISABLE_BOOL(jsd, +[ --disable-jsd Disable JavaScript debug library], + MOZ_JSDEBUGGER=) + +dnl ========================================================= +dnl = Blackwood Java Code = +dnl ========================================================= +if test "$no_x" != "yes" +then + AC_ARG_ENABLE(java-supplement, + [ --enable-java-supplement + Enable Blackwood Java Code], + [ + if test "$enableval" = "yes" + then + MOZ_JAVA_SUPPLEMENT=1 + else + MOZ_JAVA_SUPPLEMENT= + fi + ]) +fi + +dnl ======================================================== +dnl = This turns on xinerama support. We just can't use the +dnl = autodetection of the libraries since on Red Hat 7 linking with +dnl = Xinerama crashes the dynamic loader. Make people turn it on +dnl = explicitly. The autodetection is done above in the Xlib +dnl = detection routines. +dnl ======================================================== +MOZ_ARG_ENABLE_BOOL(xinerama, +[ --enable-xinerama Enable Xinerama support + ( not safe for Red Hat 7.0 ) ], +[ if test -n "$MOZ_XINERAMA_LIBS" && \ + test -n "$ac_cv_header_X11_extensions_Xinerama_h"; then + MOZ_ENABLE_XINERAMA=1 + AC_DEFINE(MOZ_ENABLE_XINERAMA) +fi ]) + +dnl ======================================================== dnl bi-directional support on by default +dnl ======================================================== IBMBIDI=1 MOZ_ARG_DISABLE_BOOL(bidi, [ --disable-bidi Disable bi-directional support], - IBMBIDI= ) + IBMBIDI= ) if test "$IBMBIDI"; then AC_DEFINE(IBMBIDI) fi +dnl ======================================================== dnl complex text support off by default +dnl ======================================================== SUNCTL= MOZ_ARG_ENABLE_BOOL(ctl, -[ --enable-ctl Enable Thai Complex Script support], - SUNCTL=1 ) +[ --enable-ctl Enable Thai Complex Script support], + SUNCTL=1 ) if test "$SUNCTL"; then AC_DEFINE(SUNCTL) fi +dnl ======================================================== dnl accessibility support on by default +dnl ======================================================== ACCESSIBILITY=1 MOZ_ARG_DISABLE_BOOL(accessibility, [ --disable-accessibility Disable accessibility support], - ACCESSIBILITY= ) + ACCESSIBILITY= ) if test "$ACCESSIBILITY"; then - AC_DEFINE(ACCESSIBILITY) + AC_DEFINE(ACCESSIBILITY) fi dnl ======================================================== -dnl = -dnl = --enable-monolithic-toolkit -dnl = -dnl = We dont need to link in the toolkit statically into the -dnl = app. With the exception of some test programs (most -dnl = notably the gecko viewer) mozilla does not have any -dnl = toolkit specific code in the "app" -dnl = -dnl = The only places where toolkit specific code is needed -dnl = are: -dnl = -dnl = mozilla/widget -dnl = mozilla/widget/timer -dnl = mozilla/gfx -dnl = -dnl = These components themselves link with the toolkit. At -dnl = runtime, Mozilla will dlopen() these components and -dnl = use the code in them without having to link with them. -dnl = -dnl = This all happens through XPCOM. -dnl = -dnl = Doing this makes it possible to have one single set of -dnl = binaries for mozilla which can effectively use a -dnl = different widget toolkit at runtime. -dnl = -dnl = However, on some unik platforms, the linker (ld) and the -dnl = runtime loader (ld.so) might not be smart enough to -dnl = resolve toolkit dependencies linked into components -dnl = which are later dlopen()ed by mozilla. -dnl = -dnl = For this reason, the --enable-monolithic-toolkit flag -dnl = is provided. If set, it will cause the toolkit libs -dnl = to be linked in to mozilla itself, and not the -dnl = 3 components above (widget, gfx and timer). -dnl = -dnl = In the case statement following this comment, I have -dnl = forced the toolkit to be monolithic for all platforms -dnl = that are not Linux and Solaris, as these are the only -dnl = ones that I could test. -dnl = -dnl = If you have questions, comments, or problems getting -dnl = this to work on your platform, send me email: -dnl = -dnl = ramiro@fateware.com -dnl = +dnl = Enable compilation of specific extension modules dnl ======================================================== -dnl Assume life sucks -MOZ_MONOLITHIC_TOOLKIT=1 +dnl Need cookie and wallet to build mozilla, this should +dnl not be the case, 18352 has been filed. +dnl http://bugzilla.mozilla.org/show_bug.cgi?id=18352 +MOZ_EXTENSIONS_DEFAULT="cookie wallet content-packs xml-rpc xmlextras help transformiix venkman" +MOZ_EXTENSIONS_ALL="$MOZ_EXTENSIONS_DEFAULT irc xmlterm inspector access-builtin ctl" -dnl The following are the only platforms I tested -ramiro -dnl OpenVMS added by Colin Blake -dnl Tru64 added by Jim Nance -dnl hpux added by John Gaunt workaround for bug 39747 -dnl irix added for bug 53471 -dnl nto added by Jerry Kirk -case "$target" in - *-*-linux*) MOZ_MONOLITHIC_TOOLKIT= ;; - *-*-solaris*) MOZ_MONOLITHIC_TOOLKIT= ;; - *-openvms*) MOZ_MONOLITHIC_TOOLKIT= ;; - *-bsdi*) MOZ_MONOLITHIC_TOOLKIT= ;; - *-freebsd*) MOZ_MONOLITHIC_TOOLKIT= ;; - *-netbsd*) MOZ_MONOLITHIC_TOOLKIT= ;; - *-openbsd*) MOZ_MONOLITHIC_TOOLKIT= ;; - *-*-aix*) MOZ_MONOLITHIC_TOOLKIT= ;; - *-*-osf*) MOZ_MONOLITHIC_TOOLKIT= ;; - *-hpux*) MOZ_MONOLITHIC_TOOLKIT= ;; - *-irix*) MOZ_MONOLITHIC_TOOLKIT= ;; - *-nto*) MOZ_MONOLITHIC_TOOLKIT= ;; -esac - - -MOZ_ARG_ENABLE_BOOL(monolithic-toolkit, -[ --enable-monolithic-toolkit - Link the toolkit into the app], - MOZ_MONOLITHIC_TOOLKIT=1) - - -if test "$MOZ_MONOLITHIC_TOOLKIT" -then - AC_DEFINE(MOZ_MONOLITHIC_TOOLKIT) +dnl Check if Thai Rendering Extension needs to be enabled +if test -n "$SUNCTL"; then + MOZ_EXTENSIONS_DEFAULT="$MOZ_EXTENSIONS_DEFAULT ctl" fi -dnl ======================================================== -dnl = -dnl = End MOZ_MONOLITHIC_TOOLKIT hacks -dnl = -dnl ======================================================== -dnl ======================================================== -dnl = -dnl = --enable-standalone-modules=mod1,mod2 -dnl = -dnl = Only selectively build modules -dnl = -dnl ======================================================== -BUILD_MODULES=all -MOZ_ARG_ENABLE_STRING(standalone-modules, -[ --enable-standalone-modules=mod1[,mod2] - Enable standalone build of specific modules], - [ BUILD_MODULES=`echo $enableval | sed 's/,/ /g'` ] ) +dnl XXX - remove this next milestone +if test -z "$enable_extensions" && test "$with_extensions"; then + enable_extensions=$with_extensions +fi +MOZ_ARG_ENABLE_STRING(extensions, +[ --enable-extensions Enable extensions], +[ for option in `echo $enableval | sed 's/,/ /g'`; do + if test "$option" = "yes" || test "$option" = "all"; then + MOZ_EXTENSIONS="$MOZ_EXTENSIONS $MOZ_EXTENSIONS_ALL" + elif test "$option" = "no" || test "$option" = "none"; then + MOZ_EXTENSIONS="" + elif test "$option" = "default"; then + MOZ_EXTENSIONS="$MOZ_EXTENSIONS $MOZ_EXTENSIONS_DEFAULT" + else + MOZ_EXTENSIONS="$MOZ_EXTENSIONS $option" + fi +done], + MOZ_EXTENSIONS="$MOZ_EXTENSIONS_DEFAULT") -dnl Temp. also check old --enable-modules option -if test "${BUILD_MODULES}" = "all" && test -n "$enable_modules"; then - BUILD_MODULES=`echo $enable_modules | sed 's/,/ /g'` +if test -z "$MOZ_ENABLE_GTK" && test `echo "$MOZ_EXTENSIONS" | grep -c xmlterm` -ne 0; then + AC_MSG_WARN([Cannot build xmlterm without gtk toolkit. Removing xmlterm from MOZ_EXTENSIONS.]) + MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|xmlterm||'` +fi + +if test -z "$MOZ_JSDEBUGGER" && test `echo "$MOZ_EXTENSIONS" | grep -c venkman` -ne 0; then + AC_MSG_WARN([Cannot build venkman without JavaScript debug library. Removing venkman from MOZ_EXTENSIONS.]) + MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|venkman||'` +fi + +if test -z "$MOZ_ENABLE_GTK" && test `echo "$MOZ_EXTENSIONS" | grep -c ctl` -ne 0; then + AC_MSG_WARN([Cannot build ctl without glib. Removing ctl from MOZ_EXTENSIONS.]) + MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|ctl||'` fi dnl ======================================================== - +dnl build idlc +dnl ======================================================== +MOZ_ARG_ENABLE_BOOL(idltool, +[ --enable-idlc Build idl tool ], + BUILD_IDLC=1) dnl ======================================================== -dnl = -dnl = --diable-pic-dso-cflags -dnl = -dnl = A hack to disable the generation of PIC for shared libs -dnl = +dnl experimental ldap features dnl ======================================================== -ENABLE_PIC_DSO_CFLAGS=1 +MOZ_ARG_ENABLE_BOOL(ldap-experimental, +[ --enable-ldap-experimental + Enable LDAP experimental features], + MOZ_LDAP_XPCOM_EXPERIMENTAL=1) -MOZ_ARG_DISABLE_BOOL(pic-dso-cflags, -[ --disable-pic-dso-cflags - Do not generate PIC for shared libs], - ENABLE_PIC_DSO_CFLAGS= ) +dnl ======================================================== +dnl MATHML +dnl ======================================================== +MOZ_ARG_ENABLE_BOOL(mathml, +[ --enable-mathml Enable MathML ], + MOZ_MATHML=1 + AC_DEFINE(MOZ_MATHML)) -if test ! "$ENABLE_PIC_DSO_CFLAGS" -then - DSO_PIC_CFLAGS="" +dnl ======================================================== +dnl SVG +dnl ======================================================== +MOZ_ARG_ENABLE_BOOL(svg, +[ --enable-svg Enable SVG ], + MOZ_SVG=1 + AC_DEFINE(MOZ_SVG)) + +dnl To build transformiix standalone, set TX_EXE while configuring +if test "$TX_EXE"; then + AC_DEFINE(TX_EXE) + dnl need to know about endianess for standalone + AC_C_BIGENDIAN + if test $ac_cv_c_bigendian = yes; then + AC_DEFINE(IS_BIG_ENDIAN) + fi fi -dnl ======================================================== -dnl = -dnl = Compiler Options -dnl = -dnl ======================================================== -MOZ_ARG_HEADER(Compiler Options) -MOZ_ARG_ENABLE_BOOL(crash-on-assert, -[ --enable-crash-on-assert - Make NS_ASSERTION crash on Unix], - AC_DEFINE(UNIX_CRASH_ON_ASSERT)) +dnl ======================================================== +dnl build the tests by default +dnl ======================================================== +ENABLE_TESTS=1 +MOZ_ARG_DISABLE_BOOL(tests, +[ --disable-tests Do not build test libraries & programs], + ENABLE_TESTS= ) dnl ======================================================== dnl = -dnl = --enable-lea -dnl = +dnl = Module specific options +dnl = +dnl ======================================================== +MOZ_ARG_HEADER(Individual module options) + +dnl ======================================================== dnl = Enable Lea malloc in xpcom. OFF by default. -dnl = dnl ======================================================== - -MOZ_ARG_ENABLE_BOOL(lea, -[ --enable-lea Enable Lea malloc ], - [ XPCOM_USE_LEA=1 - AC_DEFINE(XPCOM_USE_LEA)] ) - - -dnl ======================================================== -dnl = -dnl = --enable-optimize -dnl = -dnl = Enable code optimization. OFF by default. -dnl = -dnl ======================================================== -MOZ_OPTIMIZE= - -if test ! "$MOZ_OPTIMIZE_FLAGS" -then - MOZ_OPTIMIZE_FLAGS="-O" +dnl XXX - this needs to go away next milestone +if test -z "$enable_xpcom_lea" && test "$enable_lea"; then + enable_xpcom_lea=$enable_lea fi +MOZ_ARG_ENABLE_BOOL(xpcom-lea, +[ --enable-xpcom-lea Enable Lea malloc in xpcom ], +[ XPCOM_USE_LEA=1 AC_DEFINE(XPCOM_USE_LEA) ]) -MOZ_ARG_ENABLE_STRING(optimize, -[ --enable-optimize(=val) Enable compiler optimizations (val, ie. -O2) ], - [ if test "$enableval" != "no"; then - MOZ_OPTIMIZE=1 - if test -n "$enableval" && test "$enableval" != "yes"; then - MOZ_OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'` - fi - fi ]) - -if test "$MOZ_OPTIMIZE" -then - CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS" - CXXFLAGS="$CXXFLAGS $MOZ_OPTIMIZE_FLAGS" - LDFLAGS="$LDFLAGS $MOZ_OPTIMIZE_LDFLAGS" +dnl ======================================================== +dnl = Enable Ultrasparc specific optimizations for JS +dnl ======================================================== +dnl XXX - this needs to go away next milestone +if test -z "$enable_js_ultrasparc" && test "$enable_ultrasparc"; then + enable_js_ultrasparc=$enable_ultrasparc fi +MOZ_ARG_ENABLE_BOOL(js-ultrasparc, +[ --enable-js-ultrasparc Enable UltraSPARC optimizations in JS], +[case "$target_os" in + solaris*) + case $OS_TEST in + sun4u) + JS_ULTRASPARC_OPTS=1 + ;; + esac + ;; +esac +]) +AC_SUBST(JS_ULTRASPARC_OPTS) dnl ======================================================== dnl = -dnl = --enable-reorder -dnl = -dnl = Enable function reordering. -dnl = -dnl = Function reordering is off by default. -dnl = +dnl = Feature options that require extra sources to be pulled +dnl = dnl ======================================================== -MOZ_REORDER= -MOZ_ARG_ENABLE_STRING(reorder, -[ --enable-reorder Enable function reordering ], - [ if test "$enableval" != "no"; then - MOZ_REORDER=1 - fi ]) +MOZ_ARG_HEADER(Features that require extra sources) + +dnl ======================================================== +dnl mozilla/tools/leaky not part of default build. +dnl ======================================================== +MOZ_ARG_ENABLE_BOOL(leaky, +[ --enable-leaky Enable leaky memory tool (needs mozilla/tools/leaky)], + MOZ_LEAKY=1) + +dnl ======================================================== +dnl mozilla/tools/jprof not part of default build. +dnl ======================================================== +MOZ_ARG_ENABLE_BOOL(jprof, +[ --enable-jprof Enable jprof profiling tool (needs mozilla/tools/jprof)], + MOZ_JPROF=1 + AC_DEFINE(MOZ_JPROF)) + +dnl ======================================================== +dnl mozilla/js/src/xpconnect/tools is not part of default build. +dnl ======================================================== +MOZ_ARG_ENABLE_BOOL(xpctools, +[ --enable-xpctools Build JS profiling tool (needs mozilla/js/src/xpconnect/tools)], + MOZ_XPCTOOLS=1) dnl ======================================================== dnl = -dnl = --enable-timeline -dnl = -dnl = Enable timeline service, which provides lightweight -dnl = instrumentation of mozilla for performance measurement. -dnl = -dnl = Timeline is off by default. +dnl = Debugging Options dnl = dnl ======================================================== -MOZ_TIMELINE= -MOZ_ARG_ENABLE_STRING(timeline, -[ --enable-timeline Enable timeline ], - [ if test "$enableval" != "no"; then - AC_DEFINE(MOZ_TIMELINE) - MOZ_TIMELINE=1 - fi ]) +MOZ_ARG_HEADER(Debugging and Optimizations) dnl ======================================================== -dnl = -dnl = --disable-debug -dnl = dnl = Disable building with debug info. -dnl = dnl = Debugging is ON by default so that we get more useful dnl = bug reports. -dnl = dnl ======================================================== MOZ_DEBUG=1 @@ -3075,7 +2911,7 @@ fi MOZ_ARG_DISABLE_BOOL(debug, [ --disable-debug Disable building with debug info], - MOZ_DEBUG=) + MOZ_DEBUG=) MOZ_DEBUG_ENABLE_DEFS="-DDEBUG" case "${target_os}" in @@ -3096,133 +2932,54 @@ then fi dnl ======================================================== -dnl = -dnl = --enable-strip-libs -dnl = -dnl = Enable stripping of .so and .a libs -dnl = +dnl = Enable code optimization. OFF by default. dnl ======================================================== -if test -z "$MOZ_POST_DSO_LIB_COMMAND"; then - MOZ_POST_DSO_LIB_COMMAND=true -fi -if test -z "$MOZ_POST_PROGRAM_COMMAND"; then - MOZ_POST_PROGRAM_COMMAND=true -fi - -case "$target" in -*-*-os2*) - MOZ_POST_DSO_LIB_COMMAND='@echo' - MOZ_POST_PROGRAM_COMMAND='@echo' - ;; -esac - -MOZ_ARG_ENABLE_BOOL(strip-libs, -[ --enable-strip-libs Enable stripping of .so and .a libs ], - [ MOZ_POST_DSO_LIB_COMMAND='$(STRIP)' - MOZ_POST_PROGRAM_COMMAND='$(STRIP)' ]) - -dnl ======================================================== -dnl = -dnl = MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS -dnl = -dnl = Flags to strip unused symbols from .so components -dnl = -dnl = On on Linux non debug builds by default -dnl = -dnl ======================================================== -MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS= - -if test ! "$MOZ_DEBUG" +MOZ_OPTIMIZE= +if test ! "$MOZ_OPTIMIZE_FLAGS" then - case "$target" in - *-linux*) - MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script' - ;; - *-nto*) - MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script' - ;; - esac + MOZ_OPTIMIZE_FLAGS="-O" fi -dnl ======================================================== -dnl ======================================================== -dnl = -dnl = --enable-elf-dynstr-gc -dnl = -dnl ======================================================== -MOZ_ARG_ENABLE_BOOL(elf-dynstr-gc, -[ --enable-elf-dynstr-gc Enable elf dynstr garbage collector (opt builds only)], - USE_ELF_DYNSTR_GC=1, - USE_ELF_DYNSTR_GC= ) +MOZ_ARG_ENABLE_STRING(optimize, +[ --enable-optimize[=OPT] Enable compiler optimizations (default=-O) ], +[ MOZ_OPTIMIZE=1 + if test -n "$enableval" && test "$enableval" != "yes"; then + MOZ_OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'` + fi ]) -dnl Don't AC_SUBST it here, because we might override it below for -dnl trace-malloc. - -dnl ======================================================== -dnl = -dnl = --enable-trace-malloc -dnl = -dnl ======================================================== -NS_TRACE_MALLOC= -MOZ_ARG_ENABLE_BOOL(trace-malloc, -[ --enable-trace-malloc Enable malloc tracing], - NS_TRACE_MALLOC=1 ) -if test "$NS_TRACE_MALLOC"; then - # Please, Mr. Linker Man, don't take away our symbol names - MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS= - USE_ELF_DYNSTR_GC= - AC_DEFINE(NS_TRACE_MALLOC) +if test "$MOZ_OPTIMIZE" +then + CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS" + CXXFLAGS="$CXXFLAGS $MOZ_OPTIMIZE_FLAGS" + LDFLAGS="$LDFLAGS $MOZ_OPTIMIZE_LDFLAGS" fi -AC_SUBST(NS_TRACE_MALLOC) dnl ======================================================== -dnl = -dnl = --with-debug-modules=module1,^module2,etc -dnl = -dnl = Enable/disable debug for specific modules only -dnl = module names beginning with ^ will be disabled (this is because you can't -dnl = pass args to --without-debug-modules) -dnl = -dnl ======================================================== -MOZ_ARG_WITH_STRING(default-mozilla-five-home, -[ --with-default-mozilla-five-home - Set the default value for MOZILLA_FIVE_HOME], - [ val=`echo $withval` - AC_DEFINE_UNQUOTED(MOZ_DEFAULT_MOZILLA_FIVE_HOME,"$val") - ]) -dnl ======================================================== - -dnl ======================================================== -dnl = -dnl = --with-debug-modules=module1,^module2,etc -dnl = dnl = Enable/disable debug for specific modules only dnl = module names beginning with ^ will be disabled -dnl = (this is because you can't pass args to --without-debug-modules) -dnl = -dnl ======================================================== - -MOZ_ARG_WITH_STRING(debug-modules, -[ --with-debug-modules Enable/disable debug info for specific modules], - [ MOZ_DEBUG_MODULES=`echo $withval | sed 's/,/ /g'` ] ) dnl ======================================================== +dnl XXX - this needs to go away next milestone +if test -z "$enable_debug_modules" && test "$with_debug_modules"; then + enable_debug_modules=$with_debug_modules +fi +MOZ_ARG_ENABLE_STRING(debug-modules, +[ --enable-debug-modules Enable/disable debug info for specific modules], +[ MOZ_DEBUG_MODULES=`echo $enableval| sed 's/,/ /g'` ] ) dnl ======================================================== -dnl = -dnl = --with-dbgrinfo-modules=module1,^module2,etc -dnl = dnl = Enable/disable generation of debugger info for specific modules only dnl = the special module name ALL_MODULES can be used to denote all modules dnl = module names beginning with ^ will be disabled -dnl = dnl ======================================================== - -MOZ_DBGRINFO_MODULES="" - -MOZ_ARG_WITH_STRING(dbgrinfo-modules, -[ --with-dbgrinfo-modules Enable/disable debugger info for specific modules], - [ for i in `echo $withval | sed 's/,/ /g'`; do - +dnl XXX - this needs to go away next milestone +if test -z "$enable_debugger_info_modules" && test "$with_dbgrinfo_modules"; then + enable_debugger_info_modules=$with_dbgrinfo_modules +fi +MOZ_DBGRINFO_MODULES= +MOZ_ARG_ENABLE_STRING(debugger-info-modules, +[ --enable-debugger-info-modules + Enable/disable debugger info for specific modules], +[ for i in `echo $enableval | sed 's/,/ /g'`; do dnl note that the list of module names is reversed as it is copied dnl this is important, as it will allow config.mk to interpret stuff like dnl "^ALL_MODULES xpcom" properly @@ -3234,380 +2991,226 @@ MOZ_ARG_WITH_STRING(dbgrinfo-modules, fi MOZ_DBGRINFO_MODULES="$i $MOZ_DBGRINFO_MODULES"; done ]) -dnl ======================================================== dnl ======================================================== -dnl = -dnl = --enable-crypto -dnl = -dnl = Build Personal Security Manager -dnl = +dnl = Disable some DTD debugging code in the parser that +dnl = breaks on some compilers because of evil and broken +dnl = streams code in htmlparser/src/prstrm.cpp dnl ======================================================== -MOZ_PSM= - -MOZ_ARG_ENABLE_BOOL(crypto, -[ --enable-crypto Enable crypto (Personal Security Manager)], - MOZ_PSM=1 ) +MOZ_DISABLE_DTD_DEBUG= +MOZ_ARG_DISABLE_BOOL(dtd-debug, +[ --disable-dtd-debug Disable DTD debugging code in the parser], + MOZ_DISABLE_DTD_DEBUG=1 + AC_DEFINE(MOZ_DISABLE_DTD_DEBUG) ) + +dnl ======================================================== +dnl Enable garbage collector +dnl ======================================================== +MOZ_ARG_ENABLE_BOOL(boehm, +[ --enable-boehm Enable the Boehm Garbage Collector], + AC_DEFINE(GC_LEAK_DETECTOR) + GC_LEAK_DETECTOR=1) + +dnl ======================================================== +dnl Disable runtime logging checks +dnl ======================================================== +MOZ_ARG_DISABLE_BOOL(logging, +[ --disable-logging Disable logging facilities], + NS_DISABLE_LOGGING=1) +if test "$NS_DISABLE_LOGGING"; then + AC_DEFINE(NS_DISABLE_LOGGING) +else + AC_DEFINE(MOZ_LOGGING) +fi + +dnl ======================================================== +dnl Crash on assert +dnl ======================================================== +MOZ_ARG_ENABLE_BOOL(crash-on-assert, +[ --enable-crash-on-assert + Make NS_ASSERTION crash on Unix], + AC_DEFINE(UNIX_CRASH_ON_ASSERT)) + +dnl ======================================================== +dnl = Enable function reordering. Off by default +dnl ======================================================== +MOZ_REORDER= +MOZ_ARG_ENABLE_BOOL(reorder, +[ --enable-reorder Enable function reordering ], + MOZ_REORDER=1) + +dnl ======================================================== +dnl = dnl This will enable logging of addref, release, ctor, dtor. +dnl ======================================================== +MOZ_ARG_ENABLE_BOOL(logrefcnt, +[ --enable-logrefcnt Enable logging of refcounts (default=debug) ], + _ENABLE_LOGREFCNT=1) +if test "$_ENABLE_LOGREFCNT"; then + AC_DEFINE(FORCE_BUILD_REFCNT_LOGGING) +else + AC_DEFINE(NO_BUILD_REFCNT_LOGGING) +fi + +dnl ======================================================== +dnl = detect webshell leaks +dnl ======================================================== +MOZ_ARG_ENABLE_BOOL(detect-webshell-leaks, +[ --enable-detect-webshell-leaks + Enable detection of webshell leaks + (default=debug)], + _DETECT_WEBSHELL_LEAKS=1 , , + [ if test "$MOZ_DEBUG"; then + _DETECT_WEBSHELL_LEAKS=1 + fi]) + +if test "$_DETECT_WEBSHELL_LEAKS"; then + AC_DEFINE(DETECT_WEBSHELL_LEAKS) + AC_SUBST(DETECT_WEBSHELL_LEAKS) +fi + +dnl ======================================================== +dnl = Turn off double buffering +dnl ======================================================== +MOZ_ARG_DISABLE_BOOL(double-buffer, +[ --disable-double-buffer Disable double buffering], + AC_DEFINE(NO_DOUBLE_BUFFER)) + +dnl ======================================================== +dnl = Use malloc wrapper lib +dnl ======================================================== +MOZ_ARG_ENABLE_BOOL(wrap-malloc, +[ --enable-wrap-malloc Wrap malloc calls (gnu linker only)], +[ if test "$GNU_CC"; then + WRAP_MALLOC_CFLAGS="${LDFLAGS} -Wl,--wrap -Wl,malloc -Wl,--wrap -Wl,free -Wl,--wrap -Wl,realloc -Wl,--wrap -Wl,__builtin_new -Wl,--wrap -Wl,__builtin_vec_new -Wl,--wrap -Wl,__builtin_delete -Wl,--wrap -Wl,__builtin_vec_delete -Wl,--wrap -Wl,PR_Free -Wl,--wrap -Wl,PR_Malloc -Wl,--wrap -Wl,PR_Calloc -Wl,--wrap -Wl,PR_Realloc" + MKSHLIB='$(CXX) $(DSO_LDOPTS) $(WRAP_MALLOC_CFLAGS) -o $@' +fi]) + +dnl ======================================================== +dnl = Location of malloc wrapper lib +dnl ======================================================== +MOZ_ARG_WITH_STRING(wrap-malloc, +[ --with-wrap-malloc=DIR Location of malloc wrapper library], + WRAP_MALLOC_LIB=$withval) + +dnl ======================================================== +dnl = Use Electric Fence +dnl ======================================================== +MOZ_ARG_ENABLE_BOOL(efence, +[ --enable-efence Link with Electric Fence], + AC_CHECK_LIB(efence,malloc)) + +dnl ======================================================== +dnl = Enable stripping of libs & executables +dnl ======================================================== +dnl XXX - this needs to go away next milestone +if test -z "$enable_strip" && test "$enable_strip_libs"; then + enable_strip=$enable_strip_libs +fi +MOZ_ARG_ENABLE_BOOL(strip, +[ --enable-strip Enable stripping of libs & executables ], + ENABLE_STRIP=1) + +dnl ======================================================== +dnl = --enable-elf-dynstr-gc +dnl ======================================================== +MOZ_ARG_ENABLE_BOOL(elf-dynstr-gc, +[ --enable-elf-dynstr-gc Enable elf dynstr garbage collector (opt builds only)], + USE_ELF_DYNSTR_GC=1, + USE_ELF_DYNSTR_GC= ) dnl ======================================================== -dnl = -dnl = --disable-jsd -dnl = -dnl = JS Debugger XPCOM component (js/jsd) dnl = -dnl ======================================================== - -MOZ_JSDEBUGGER=1 - -MOZ_ARG_DISABLE_BOOL(jsd, -[ --disable-jsd Disable JavaScript debug library], - MOZ_JSDEBUGGER=) - -dnl ======================================================== -dnl = -dnl = --with-extensions=extension1,extension2, -dnl = -dnl = Enable compilation of specific extension modules -dnl = -dnl ======================================================== - -dnl Need cookie and wallet to build mozilla, this should -dnl not be the case, 18352 has been filed. -dnl http://bugzilla.mozilla.org/show_bug.cgi?id=18352 -MOZ_EXTENSIONS_DEFAULT="cookie wallet content-packs xml-rpc xmlextras help transformiix venkman" -MOZ_EXTENSIONS_ALL="$MOZ_EXTENSIONS_DEFAULT irc xmlterm inspector access-builtin ctl" - -dnl Check if Thai Rendering Extension needs to be enabled -if test -n "$SUNCTL"; then - MOZ_EXTENSIONS_DEFAULT="$MOZ_EXTENSIONS_DEFAULT ctl" -fi - -MOZ_ARG_WITH_STRING(extensions, -[ --with-extensions Enable extensions (dirs in extensions/)], - [ MOZ_EXTENSIONS="" - for option in `echo $withval | sed 's/,/ /g'`; do - if test "$option" = "yes" || test "$option" = "all"; then - MOZ_EXTENSIONS="$MOZ_EXTENSIONS $MOZ_EXTENSIONS_ALL" - elif test "$option" = "no" || test "$option" = "none"; then - MOZ_EXTENSIONS="" - elif test "$option" = "default"; then - MOZ_EXTENSIONS="$MOZ_EXTENSIONS $MOZ_EXTENSIONS_DEFAULT" - else - MOZ_EXTENSIONS="$MOZ_EXTENSIONS $option" - fi - done ], - [ MOZ_EXTENSIONS="$MOZ_EXTENSIONS_DEFAULT" ] ) - -if test -z "$MOZ_ENABLE_GTK" && test `echo "$MOZ_EXTENSIONS" | grep -c xmlterm` -ne 0; then - AC_MSG_WARN([Cannot build xmlterm without gtk toolkit. Removing xmlterm from MOZ_EXTENSIONS.]) - MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|xmlterm||'` -fi - -if test -z "$MOZ_JSDEBUGGER" && test `echo "$MOZ_EXTENSIONS" | grep -c venkman` -ne 0; then - AC_MSG_WARN([Cannot build venkman without JavaScript debug library. Removing venkman from MOZ_EXTENSIONS.]) - MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|venkman||'` -fi - -if test -z "$MOZ_ENABLE_GTK" && test `echo "$MOZ_EXTENSIONS" | grep -c ctl` -ne 0; then - AC_MSG_WARN([Cannot build ctl without glib. Removing ctl from MOZ_EXTENSIONS.]) - MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|ctl||'` -fi - -dnl Disable jar packaging -MOZ_ARG_DISABLE_BOOL(jar-packaging, -[ --disable-jar-packaging Disable jar packaging of chrome (Deprecated) ], - MOZ_DISABLE_JAR_PACKAGING=1 -) - -MOZ_ARG_ENABLE_STRING(chrome-format, -[ --enable-chrome-format=[jar|flat|both] - Select format of chrome files (defaults to jar)], - MOZ_CHROME_FILE_FORMAT=`echo $enableval | tr A-Z a-z`) - -if test -z "$MOZ_CHROME_FILE_FORMAT"; then - if test -n "$MOZ_DISABLE_JAR_PACKAGING"; then - MOZ_CHROME_FILE_FORMAT=flat - else - MOZ_CHROME_FILE_FORMAT=jar - fi -fi - -if test "$MOZ_CHROME_FILE_FORMAT" != "jar" && - test "$MOZ_CHROME_FILE_FORMAT" != "flat" && - test "$MOZ_CHROME_FILE_FORMAT" != "both"; then - AC_MSG_ERROR([--enable-chrome-format must be set to either jar, flat or both]) -fi - -dnl ======================================================== -dnl Determine how to handle dependencies -dnl ======================================================== -MOZ_AUTO_DEPS=1 -MOZ_ARG_DISABLE_BOOL(auto-deps, -[ --disable-auto-deps Do not automatically generate dependency info], - MOZ_AUTO_DEPS=) - -if test -n "$MOZ_AUTO_DEPS"; then -_cpp_md_flag= -MOZ_ARG_DISABLE_BOOL(md, -[ --disable-md Do not use compiler-based dependencies ], - [], - [_cpp_md_flag=1], - [dnl Default is to turn on -MD if using GNU-compatible compilers - if test "$GNU_CC" -a "$GNU_CXX"; then - _cpp_md_flag=1 - fi]) -if test "$_cpp_md_flag"; then - COMPILER_DEPEND=1 - _DEPEND_CFLAGS='$(filter-out %/.pp,-Wp,-MD,$(MDDEPDIR)/$(*F).pp)' -fi -fi # MOZ_AUTO_DEPS -MDDEPDIR='.deps' -AC_SUBST(MOZ_AUTO_DEPS) -AC_SUBST(COMPILER_DEPEND) -AC_SUBST(MDDEPDIR) - - -MOZ_ARG_DISABLE_BOOL(pedantic, -[ --disable-pedantic Issue all warnings demanded by strict ANSI C ], - _PEDANTIC= ) -if test "$_PEDANTIC"; then - AC_LANG_CPLUSPLUS - _SAVE_CXXFLAGS=$CXXFLAGS - CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic" - AC_MSG_CHECKING([whether C++ compiler has -pedantic long long bug]) - AC_TRY_RUN([ int main () { - if (sizeof(long long) != 8) { return 1; } - return 0; } ], - result="no", result="yes", result="maybe" ) - AC_MSG_RESULT([$result]) - CXXFLAGS="$_SAVE_CXXFLAGS" - AC_LANG_C - - case "$result" in - no) - _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} ${_COMPILER_PREFIX}-pedantic" - _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic" - ;; - yes) - AC_MSG_ERROR([Your compiler appears to have a known bug where long long is miscompiled when using -pedantic. Reconfigure using --disable-pedantic. ]) - ;; - maybe) - AC_MSG_WARN([Cannot test -pedantic long long bug when cross-compiling.]) - ;; - esac -fi - -dnl Autoconf test for gcc 2.7.2.x (and maybe others?) so that we don't -dnl provide non-const forms of the operator== for comparing nsCOMPtrs to -dnl raw pointers in nsCOMPtr.h. (VC++ has the same bug.) - -AC_LANG_CPLUSPLUS -_SAVE_CXXFLAGS=$CXXFLAGS -CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS}" - -AC_CACHE_CHECK(for correct overload resolution with const and templates, - ac_nscap_nonconst_opeq_bug, - [AC_TRY_COMPILE([ - template - class Pointer - { - public: - T* myPtr; - }; - - template - int operator==(const Pointer& rhs, U* lhs) - { - return rhs.myPtr == lhs; - } - - template - int operator==(const Pointer& rhs, const U* lhs) - { - return rhs.myPtr == lhs; - } - ], - [ - Pointer foo; - const int* bar; - return foo == bar; - ], - ac_nscap_nonconst_opeq_bug="no", - ac_nscap_nonconst_opeq_bug="yes")]) - -AC_LANG_C -CXXFLAGS="$_SAVE_CXXFLAGS" - -if test "$ac_nscap_nonconst_opeq_bug" = "yes" ; then - AC_DEFINE(NSCAP_DONT_PROVIDE_NONCONST_OPEQ) -fi - -dnl pass -Wno-long-long to the compiler -MOZ_ARG_ENABLE_BOOL(long-long-warning, -[ --enable-long-long-warning - Pass -Wno-long-long to the compiler], - _IGNORE_LONG_LONG_WARNINGS=) -if test "$_IGNORE_LONG_LONG_WARNINGS"; then - _SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS ${_COMPILER_PREFIX}-Wno-long-long" - AC_MSG_CHECKING([whether compiler supports -Wno-long-long]) - AC_TRY_COMPILE([], [return(0);], - [ _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} ${_COMPILER_PREFIX}-Wno-long-long" - _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-Wno-long-long" - result="yes" ], result="no") - AC_MSG_RESULT([$result]) - CFLAGS="$_SAVE_CFLAGS" -fi - -dnl C++ rtti (g++/egcs only - for now) -dnl Should be smarter and check that the compiler does indeed have rtti -MOZ_ARG_ENABLE_BOOL(cpp-rtti, -[ --enable-cpp-rtti Enable C++ RTTI ], - [ _MOZ_RTTI_FLAGS=-frtti ] -) - -dnl C++ exceptions (g++/egcs only - for now) -dnl Should be smarter and check that the compiler does indeed have exceptions -MOZ_ARG_ENABLE_BOOL(cpp-exceptions, -[ --enable-cpp-exceptions Enable C++ exceptions ], - [ if test "$MIPSPRO_CXX"; then - _MOZ_EXCEPTIONS_FLAGS=-LANG:exceptions=ON - else - _MOZ_EXCEPTIONS_FLAGS=-fexceptions - fi - ] -) - -dnl Enable Ultrasparc specific compiler options -MOZ_ARG_ENABLE_BOOL(ultrasparc, -[ --enable-ultrasparc Enable UltraSPARC specific compiler options ], - [case "$target_os" in - solaris*) - case $OS_TEST in - sun4u) - JS_ULTRASPARC_OPTS=1 - ;; - esac - ;; - esac -]) -AC_SUBST(JS_ULTRASPARC_OPTS) -dnl ======================================================== -dnl = dnl = Profiling and Instrumenting dnl = dnl ======================================================== MOZ_ARG_HEADER(Profiling and Instrumenting) -MOZ_ARG_ENABLE_BOOL(eazel-profiler, -[ --enable-eazel-profiler Enable Corel/Eazel profiler], - [ ENABLE_EAZEL_PROFILER=1 - AC_DEFINE(ENABLE_EAZEL_PROFILER) - USE_ELF_DYNSTR_GC= - MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS= - EAZEL_PROFILER_CFLAGS="-g -O -gdwarf-2 -finstrument-functions -D__NO_STRING_INLINES -D__NO_MATH_INLINES" - EAZEL_PROFILER_LIBS="-lprofiler -lpthread"]) - -MOZ_ARG_WITH_STRING(profile-modules, -[ --with-profile-modules Enable/disable profiling for specific modules], - [ MOZ_PROFILE_MODULES=`echo $withval | sed 's/,/ /g'` ] ) dnl ======================================================== +dnl = Enable timeline service, which provides lightweight +dnl = instrumentation of mozilla for performance measurement. +dnl = Timeline is off by default. dnl ======================================================== +MOZ_TIMELINE= +MOZ_ARG_ENABLE_BOOL(timeline, +[ --enable-timeline Enable timeline services ], + AC_DEFINE(MOZ_TIMELINE) + MOZ_TIMELINE=1) +dnl ======================================================== +dnl Turn on reflow counting +dnl ======================================================== +MOZ_REFLOW_PERF= +MOZ_ARG_ENABLE_BOOL(reflow-perf, +[ --enable-reflow-perf Enable reflow performance tracing], + MOZ_REFLOW_PERF=1 + AC_DEFINE(MOZ_REFLOW_PREF) ) +AC_SUBST(MOZ_REFLOW_PERF) + +dnl ======================================================== dnl Enable performance metrics. +dnl ======================================================== MOZ_ARG_ENABLE_BOOL(perf-metrics, [ --enable-perf-metrics Enable performance metrics], - MOZ_PERF_METRICS=1 - AC_DEFINE(MOZ_PERF_METRICS)) + MOZ_PERF_METRICS=1 + AC_DEFINE(MOZ_PERF_METRICS)) + +dnl ======================================================== +dnl = Enable trace malloc +dnl ======================================================== +NS_TRACE_MALLOC= +MOZ_ARG_ENABLE_BOOL(trace-malloc, +[ --enable-trace-malloc Enable malloc tracing], + NS_TRACE_MALLOC=1 ) +if test "$NS_TRACE_MALLOC"; then + # Please, Mr. Linker Man, don't take away our symbol names + MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS= + USE_ELF_DYNSTR_GC= + AC_DEFINE(NS_TRACE_MALLOC) +fi +AC_SUBST(NS_TRACE_MALLOC) + +dnl ======================================================== +dnl = Add support for Eazel profiler +dnl ======================================================== +dnl XXX - this needs to go away next milestone +if test -z "$enable_eazel_profiler_support" && test "$enable_eazel_profiler"; then + enable_eazel_profiler_support=$enable_eazel_profiler +fi +MOZ_ARG_ENABLE_BOOL(eazel-profiler-support, +[ --enable-eazel-profiler-support + Enable Corel/Eazel profiler support], + ENABLE_EAZEL_PROFILER=1 + AC_DEFINE(ENABLE_EAZEL_PROFILER) + USE_ELF_DYNSTR_GC= + MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS= + EAZEL_PROFILER_CFLAGS="-g -O -gdwarf-2 -finstrument-functions -D__NO_STRING_INLINES -D__NO_MATH_INLINES" + EAZEL_PROFILER_LIBS="-lprofiler -lpthread") + +dnl XXX - this needs to go away next milestone +if test -z "$enable_profile_modules" && test "$with_profile_modules"; then + enable_profile_modules=$with_profile_modules +fi +MOZ_ARG_ENABLE_STRING(profile-modules, +[ --enable-profile-modules + Enable/disable profiling for specific modules], +[ MOZ_PROFILE_MODULES=`echo $enableval| sed 's/,/ /g'` ] ) MOZ_ARG_ENABLE_BOOL(insure, [ --enable-insure Enable insure++ instrumentation (linux only)], - [ MOZ_INSURE="insure" MOZ_INSURIFYING=1 MOZ_INSURE_DIRS="." MOZ_INSURE_EXCLUDE_DIRS="config" ]) +[ MOZ_INSURE="insure" MOZ_INSURIFYING=1 MOZ_INSURE_DIRS="." MOZ_INSURE_EXCLUDE_DIRS="config" ]) MOZ_ARG_WITH_STRING(insure-dirs, -[ --with-insure-dirs=\$dirs +[ --with-insure-dirs=DIRS Dirs to instrument with insure ], - MOZ_INSURE_DIRS=$withval ) + MOZ_INSURE_DIRS=$withval ) MOZ_ARG_WITH_STRING(insure-exclude-dirs, -[ --with-insure-exclude-dirs=\$dirs +[ --with-insure-exclude-dirs=DIRS Dirs to not instrument with insure ], - MOZ_INSURE_EXCLUDE_DIRS="config $withval" ) - -MOZ_ARG_ENABLE_BOOL(boehm, -[ --enable-boehm Enable the Boehm Garbage Collector], - AC_DEFINE(GC_LEAK_DETECTOR) - GC_LEAK_DETECTOR=1 -) - -dnl This will enable logging of addref, release, ctor, dtor. -MOZ_ARG_ENABLE_BOOL(logrefcnt, -[ --enable-logrefcnt Enable Logging of refcounts (default=debug) ], - AC_DEFINE(FORCE_BUILD_REFCNT_LOGGING), - AC_DEFINE(NO_BUILD_REFCNT_LOGGING)) - - -dnl mozilla/tools/leaky not part of default build. -MOZ_ARG_ENABLE_BOOL(leaky, -[ --enable-leaky Enable leaky memory tool], - MOZ_LEAKY=1) - -dnl mozilla/tools/leaky not part of default build. -MOZ_ARG_ENABLE_BOOL(jprof, -[ --enable-jprof Enable jprof profiling tool (pull tools/jprof)], - MOZ_JPROF=1 - AC_DEFINE(MOZ_JPROF)) - -dnl mozilla/js/src/xpconnect/tools is not part of default build. -MOZ_ARG_ENABLE_BOOL(xpctools, -[ --enable-xpctools Build JS profiling tool], - MOZ_XPCTOOLS=1) - -AC_MSG_CHECKING(webshell leaks option) -MOZ_ARG_ENABLE_BOOL(detect-webshell-leaks, -[ --enable-detect-webshell-leaks - Enable detection of webshell leaks - (default=yes, unless --disable-debug is used)], - [ AC_MSG_RESULT(on (user enabled)) - DETECT_WEBSHELL_LEAKS=1 ], - [ AC_MSG_RESULT(off (user disabled)) ], - [ if test "$MOZ_DEBUG"; then - AC_MSG_RESULT(on (debug build)) - DETECT_WEBSHELL_LEAKS=1 - else - AC_MSG_RESULT(off (non-debug build)) - fi]) - -if test "$DETECT_WEBSHELL_LEAKS"; then - AC_DEFINE(DETECT_WEBSHELL_LEAKS) - AC_SUBST(DETECT_WEBSHELL_LEAKS) -fi - -MOZ_ARG_DISABLE_BOOL(double-buffer, -[ --disable-double-buffer Disable double buffering], - AC_DEFINE(NO_DOUBLE_BUFFER)) - -MOZ_ARG_ENABLE_BOOL(wrap-malloc, -[ --enable-wrap-malloc Wrap malloc calls (gnu linker only)], - [ if test "$GNU_CC"; then - WRAP_MALLOC_CFLAGS="${LDFLAGS} -Wl,--wrap -Wl,malloc -Wl,--wrap -Wl,free -Wl,--wrap -Wl,realloc -Wl,--wrap -Wl,__builtin_new -Wl,--wrap -Wl,__builtin_vec_new -Wl,--wrap -Wl,__builtin_delete -Wl,--wrap -Wl,__builtin_vec_delete -Wl,--wrap -Wl,PR_Free -Wl,--wrap -Wl,PR_Malloc -Wl,--wrap -Wl,PR_Calloc -Wl,--wrap -Wl,PR_Realloc" - MKSHLIB='$(CXX) $(DSO_LDOPTS) $(WRAP_MALLOC_CFLAGS) -o $@' - fi]) - -MOZ_ARG_WITH_STRING(wrap-malloc, -[ --with-wrap-malloc=\$dir Location of malloc wrapper library], - WRAP_MALLOC_LIB=$withval) - -MOZ_ARG_ENABLE_BOOL(efence, -[ --enable-efence Link with Electric Fence], - AC_CHECK_LIB(efence,malloc)) + MOZ_INSURE_EXCLUDE_DIRS="config $withval" ) dnl ======================================================== -dnl = -dnl = MOZ_DEMANGLE_UNDEFINED_SYMBOLS -dnl = dnl = Support for demangling undefined symbols -dnl = dnl ======================================================== AC_CHECK_LIB(iberty, cplus_demangle, [HAVE_DEMANGLE=1], HAVE_DEMANGLE=, "-liberty") @@ -3641,13 +3244,6 @@ fi AC_SUBST(MOZ_DEMANGLE_SYMBOLS) -dnl ======================================================== -dnl = -dnl = End MOZ_DEMANGLE_SYMBOLS -dnl = -dnl ======================================================== - - dnl ======================================================== dnl = @@ -3656,121 +3252,233 @@ dnl = dnl ======================================================== MOZ_ARG_HEADER(Misc. Options) -MOZ_ARG_ENABLE_STRING(homedir, -[ --enable-homedir=\$val Set the homedir to \$val], -dnl [ Location of the mozilla user directory (default is ~/.mozilla).], - [if echo "$enableval" | grep "\/" >/dev/null; then - AC_MSG_ERROR("Homedir must be single relative path.") - else - AC_DEFINE_UNQUOTED(MOZ_USER_DIR,"$enableval") - fi], - AC_DEFINE(MOZ_USER_DIR,".mozilla") ) - -MOZ_ARG_ENABLE_BOOL(idltool, -[ --enable-idlc Build idl tool ], - BUILD_IDLC=1) - +dnl ======================================================== +dnl update xterm title +dnl ======================================================== MOZ_ARG_ENABLE_BOOL(xterm-updates, [ --enable-xterm-updates Update XTERM titles with current command.], - MOZ_UPDATE_XTERM=1) + MOZ_UPDATE_XTERM=1) -dnl -dnl By default, we will now build with LDAP support, which you can -dnl turn off with the --disable-ldap option. We also added the -dnl ldap-experimental flag, which is for experimental LDAP code, -dnl not currently turned on in the default build. -dnl -if test "$BUILD_MODULES" = "all" || test `echo "$BUILD_MODULES" | grep -c ldap` -ne 0; then - MOZ_LDAP_XPCOM=1 +dnl ========================================================= +dnl = Chrome format +dnl ========================================================= +dnl XXX - this needs to go away next milestone +if test -z "$enable_chrome_format" && test "$enable_chrome"; then + enable_chrome_format=$enable_chrome +fi +MOZ_ARG_ENABLE_STRING(chrome-format, +[ --enable-chrome-format=FORMAT + Select FORMAT of chrome files (default=jar)], + MOZ_CHROME_FILE_FORMAT=`echo $enableval | tr A-Z a-z`) + +if test -z "$MOZ_CHROME_FILE_FORMAT"; then + MOZ_CHROME_FILE_FORMAT=jar fi -dnl -dnl --disable-ldap -dnl -MOZ_ARG_DISABLE_BOOL(ldap, -[ --disable-ldap Disable LDAP support], - MOZ_LDAP_XPCOM= - ) -if test "$MOZ_LDAP_XPCOM"; then - LDAP_CFLAGS='-I${DIST}/include/ldap' - LDAP_LIBS='-L${DIST}/bin -L${DIST}/lib -lldap40 -llber40' +if test "$MOZ_CHROME_FILE_FORMAT" != "jar" && + test "$MOZ_CHROME_FILE_FORMAT" != "flat" && + test "$MOZ_CHROME_FILE_FORMAT" != "both"; then + AC_MSG_ERROR([--enable-chrome-format must be set to either jar, flat or both]) fi -dnl --enable-ldap-experimental -dnl -MOZ_ARG_ENABLE_BOOL(ldap-experimental, -[ --enable-ldap-experimental - Enable LDAP experimental features], - MOZ_LDAP_XPCOM_EXPERIMENTAL=1 - ) +dnl ======================================================== +dnl = Define default location for MOZILLA_FIVE_HOME +dnl ======================================================== +MOZ_ARG_WITH_STRING(default-mozilla-five-home, +[ --enable-default-mozilla-five-home + Set the default value for MOZILLA_FIVE_HOME], +[ val=`echo $withval` + AC_DEFINE_UNQUOTED(MOZ_DEFAULT_MOZILLA_FIVE_HOME,"$val") ]) -dnl --disable-xul -dnl -MOZ_XUL=1 -MOZ_ARG_DISABLE_BOOL(xul, -[ --disable-xul Disable XUL ], - MOZ_XUL= ) -if test "$MOZ_XUL"; then - AC_DEFINE(MOZ_XUL) - AC_DEFINE(INCLUDE_XUL) -fi -AC_SUBST(MOZ_XUL) -AC_SUBST(INCLUDE_XUL) - -dnl --enable mathml -dnl TODO: handle include files here ? -dnl -MOZ_ARG_ENABLE_BOOL(mathml, -[ --enable-mathml Enable MathML ], - MOZ_MATHML=1 - AC_DEFINE(MOZ_MATHML)) - -dnl -dnl --enable svg -dnl TODO: handle include files here ? -dnl -MOZ_ARG_ENABLE_BOOL(svg, -[ --enable-svg Enable SVG ], - MOZ_SVG=1 - AC_DEFINE(MOZ_SVG)) - -dnl To build transformiix standalone, set TX_EXE while configuring -if test "$TX_EXE"; then - AC_DEFINE(TX_EXE) - dnl need to know about endianess for standalone - AC_C_BIGENDIAN - if test $ac_cv_c_bigendian = yes; then - AC_DEFINE(IS_BIG_ENDIAN) - fi +dnl ======================================================== +dnl = Location of the mozilla user directory (default is ~/.mozilla).], +dnl ======================================================== +dnl XXX - this needs to go away next milestone +if test -z "$with_user_appdir" && test "$enable_homedir"; then + with_user_appdir=$enable_homedir fi +MOZ_ARG_WITH_STRING(user-appdir, +[ --with-user-appdir=DIR Set user-specific appdir (default=.mozilla)], +[ val=`echo $withval` +if echo "$val" | grep "\/" >/dev/null; then + AC_MSG_ERROR("Homedir must be single relative path.") +else + AC_DEFINE_UNQUOTED(MOZ_USER_DIR,"$val") +fi], + AC_DEFINE(MOZ_USER_DIR,".mozilla") ) dnl Need the contents of config-defs.h in the build logs VERBOSE_CONFIG_DEFS=1 -AC_ARG_ENABLE(verbose-config-defs, +MOZ_ARG_ENABLE_BOOL(verbose-config-defs, [ --disable-verbose-config-defs Do not output the contents of config-defs.h], - [if test "$enableval" = "no"; then - VERBOSE_CONFIG_DEFS= - fi]) - -dnl libpr0n on by default -AC_DEFINE(USE_IMG2) + VERBOSE_CONFIG_DEFS=) dnl ======================================================== dnl = -dnl = --diable-dtd-debug -dnl = -dnl = Disable some DTD debugging code in the parser that -dnl = breaks on some compilers because of evil and broken -dnl = streams code in htmlparser/src/prstrm.cpp -dnl = +dnl = Compiler Options +dnl = dnl ======================================================== -MOZ_DISABLE_DTD_DEBUG= +MOZ_ARG_HEADER(Compiler Options) -MOZ_ARG_DISABLE_BOOL(dtd-debug, -[ --disable-dtd-debug Disable some DTD debuggin code in the parser)], - MOZ_DISABLE_DTD_DEBUG=1 - AC_DEFINE(MOZ_DISABLE_DTD_DEBUG) ) +dnl ======================================================== +dnl Check for gcc -pipe support +dnl ======================================================== +MOZ_ARG_DISABLE_BOOL(gcc-pipe, +[ --disable-gcc-pipe Disable -pipe check for gcc], + NO_GCC_PIPE=1) + +AC_MSG_CHECKING([for gcc -pipe support]) +if test -n "$NO_GCC_PIPE"; then + AC_MSG_RESULT([disabled]) +elif 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 + ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5 + cat dummy-hello.s | ${AS} -o dummy-hello.S - 2>&5 + if test $? = 0; then + _res_as_stdin="yes" + else + _res_as_stdin="no" + fi + if test "$_res_as_stdin" = "yes"; then + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -pipe" + AC_TRY_COMPILE( [ #include ], + [printf("Hello World\n");], + [_res_gcc_pipe="yes"], + [_res_gcc_pipe="no"] ) + CFLAGS=$_SAVE_CFLAGS + fi + if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then + _res="yes"; + CFLAGS="$CFLAGS -pipe" + CXXFLAGS="$CXXFLAGS -pipe" + else + _res="no" + fi + rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out + AC_MSG_RESULT([$_res]) +else + AC_MSG_RESULT([no]) +fi + +AC_LANG_CPLUSPLUS + +dnl ======================================================== +dnl Test for -pedantic bustage +dnl ======================================================== +MOZ_ARG_DISABLE_BOOL(pedantic, +[ --disable-pedantic Issue all warnings demanded by strict ANSI C ], +_PEDANTIC= ) +if test "$_PEDANTIC"; then + _SAVE_CXXFLAGS=$CXXFLAGS + CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic" + AC_MSG_CHECKING([whether C++ compiler has -pedantic long long bug]) + AC_TRY_RUN([ int main () { + if (sizeof(long long) != 8) { return 1; } + return 0; } ], + result="no", result="yes", result="maybe" ) + AC_MSG_RESULT([$result]) + CXXFLAGS="$_SAVE_CXXFLAGS" + + case "$result" in + no) + _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} ${_COMPILER_PREFIX}-pedantic" + _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic" + ;; + yes) + AC_MSG_ERROR([Your compiler appears to have a known bug where long long is miscompiled when using -pedantic. Reconfigure using --disable-pedantic. ]) + ;; + maybe) + AC_MSG_WARN([Cannot test -pedantic long long bug when cross-compiling.]) + ;; + esac +fi + + +dnl ======================================================== +dnl Autoconf test for gcc 2.7.2.x (and maybe others?) so that we don't +dnl provide non-const forms of the operator== for comparing nsCOMPtrs to +dnl raw pointers in nsCOMPtr.h. (VC++ has the same bug.) +dnl ======================================================== +_SAVE_CXXFLAGS=$CXXFLAGS +CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS}" +AC_CACHE_CHECK(for correct overload resolution with const and templates, + ac_nscap_nonconst_opeq_bug, + [AC_TRY_COMPILE([ + template + class Pointer + { + public: + T* myPtr; + }; + + template + int operator==(const Pointer& rhs, U* lhs) + { + return rhs.myPtr == lhs; + } + + template + int operator==(const Pointer& rhs, const U* lhs) + { + return rhs.myPtr == lhs; + } + ], + [ + Pointer foo; + const int* bar; + return foo == bar; + ], + ac_nscap_nonconst_opeq_bug="no", + ac_nscap_nonconst_opeq_bug="yes")]) +CXXFLAGS="$_SAVE_CXXFLAGS" + +if test "$ac_nscap_nonconst_opeq_bug" = "yes" ; then + AC_DEFINE(NSCAP_DONT_PROVIDE_NONCONST_OPEQ) +fi + +dnl pass -Wno-long-long to the compiler +MOZ_ARG_ENABLE_BOOL(long-long-warning, +[ --enable-long-long-warning + Warn about use of non-ANSI long long type], + _IGNORE_LONG_LONG_WARNINGS=, + _IGNORE_LONG_LONG_WARNINGS=1) + +if test "$_IGNORE_LONG_LONG_WARNINGS"; then + _SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS ${_COMPILER_PREFIX}-Wno-long-long" + AC_MSG_CHECKING([whether compiler supports -Wno-long-long]) + AC_TRY_COMPILE([], [return(0);], + [ _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} ${_COMPILER_PREFIX}-Wno-long-long" + _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-Wno-long-long" + result="yes" ], result="no") + AC_MSG_RESULT([$result]) + CFLAGS="$_SAVE_CFLAGS" +fi + +dnl ======================================================== +dnl C++ rtti (g++/egcs only - for now) +dnl Should be smarter and check that the compiler does indeed have rtti +dnl ======================================================== +MOZ_ARG_ENABLE_BOOL(cpp-rtti, +[ --enable-cpp-rtti Enable C++ RTTI ], + _MOZ_RTTI_FLAGS=-frtti) + +dnl ======================================================== +dnl C++ exceptions (g++/egcs only - for now) +dnl Should be smarter and check that the compiler does indeed have exceptions +dnl ======================================================== +MOZ_ARG_ENABLE_BOOL(cpp-exceptions, +[ --enable-cpp-exceptions Enable C++ exceptions ], +[ if test "$MIPSPRO_CXX"; then + _MOZ_EXCEPTIONS_FLAGS=-LANG:exceptions=ON +else + _MOZ_EXCEPTIONS_FLAGS=-fexceptions +fi ]) + +AC_LANG_C dnl ======================================================== dnl = @@ -3780,21 +3488,61 @@ dnl ======================================================== MOZ_ARG_HEADER(OS/2 Build Options) MOZ_ARG_WITH_STRING(os2emx, -[ --with-os2emx=\$val Build for OS/2 with emx+gcc, set to OMF or A.OUT], - [ MOZ_OS2_TOOLS=EMX - MOZ_OS2_EMX_OBJECTFORMAT="$withval" - AC_DEFINE(XP_OS2_EMX) ]) +[ --with-os2emx=FORMAT Build for OS/2 with emx+gcc, set to OMF or A.OUT], + MOZ_OS2_TOOLS=EMX + MOZ_OS2_EMX_OBJECTFORMAT="$withval" + AC_DEFINE(XP_OS2_EMX) ) -MOZ_ARG_WITH_STRING(os2vacpp, +MOZ_ARG_WITH_BOOL(os2vacpp, [ --with-os2vacpp Build for OS/2 with VAC++], - [ MOZ_OS2_TOOLS=VACPP - AC_DEFINE(XP_OS2_VACPP) ]) + MOZ_OS2_TOOLS=VACPP + AC_DEFINE(XP_OS2_VACPP) ) dnl ======================================================== dnl = -dnl = End OS/2 Build Options +dnl = Build depencency options dnl = dnl ======================================================== +MOZ_ARG_HEADER(Build dependencies) + +dnl ======================================================== +dnl = Do not auto generate dependency info +dnl ======================================================== +MOZ_AUTO_DEPS=1 +MOZ_ARG_DISABLE_BOOL(auto-deps, +[ --disable-auto-deps Do not automatically generate dependency info], + MOZ_AUTO_DEPS=) + +if test -n "$MOZ_AUTO_DEPS"; then +dnl ======================================================== +dnl = Use mkdepend instead of $CC -MD for dependency generation +dnl ======================================================== +_cpp_md_flag= +MOZ_ARG_DISABLE_BOOL(md, +[ --disable-md Do not use compiler-based dependencies ], + [], + [_cpp_md_flag=1], + [dnl Default is to turn on -MD if using GNU-compatible compilers + if test "$GNU_CC" -a "$GNU_CXX"; then + _cpp_md_flag=1 + fi]) +if test "$_cpp_md_flag"; then + COMPILER_DEPEND=1 + _DEPEND_CFLAGS='$(filter-out %/.pp,-Wp,-MD,$(MDDEPDIR)/$(*F).pp)' +fi +fi # MOZ_AUTO_DEPS +MDDEPDIR='.deps' +AC_SUBST(MOZ_AUTO_DEPS) +AC_SUBST(COMPILER_DEPEND) +AC_SUBST(MDDEPDIR) + + +dnl ======================================================== +dnl = +dnl = Static Build Options +dnl = +dnl ======================================================== +MOZ_ARG_HEADER(Static build options) BUILD_SHARED_LIBS=1 BUILD_STATIC_LIBS= @@ -3815,16 +3563,20 @@ if (test -z "$BUILD_SHARED_LIBS" && test -z "$BUILD_STATIC_LIBS") || fi dnl ======================================================== - -MOZ_ARG_ENABLE_STRING(static-components, -[ --enable-static-components - Build meta-component from specific components], - [ MOZ_STATIC_COMPONENTS=`echo $enableval | sed 's/,/ /g'` ] ) +dnl Generate static component from list of modules +dnl ======================================================== +dnl XXX - this needs to go away next milestone +if test -z "$enable_meta_component_modules" && test "$enable_static_components"; then + enable_meta_component_modules=$enable_static_components +fi +MOZ_ARG_ENABLE_STRING(meta-component-modules, +[ --enable-meta-component-modules=mod1[,mod2] + Build single meta-component from specified modules], +[ MOZ_STATIC_COMPONENTS=`echo $enableval | sed 's/,/ /g'` ] ) dnl ======================================================== dnl Enable the use of predefined meta components dnl ======================================================== - MOZ_ARG_ENABLE_STRING(meta-components, [ --enable-meta-components Build predefined meta-components], @@ -3834,8 +3586,6 @@ if test -n "$MOZ_STATIC_COMPONENTS" && test -n "$MOZ_META_COMPONENTS"; then AC_MSG_ERROR([Simultaneous use of static-components & meta-components is not supported.]) fi -dnl ======================================================== - case "$target" in *-*-aix*) if test -z "${BUILD_STATIC_LIBS}" -o -n "${BUILD_SHARED_LIBS}"; then @@ -3879,6 +3629,134 @@ case "$target" in esac +dnl ======================================================== +dnl = +dnl = Standalone module options +dnl = +dnl ======================================================== +MOZ_ARG_HEADER(Standalone module options (Not for building Mozilla)) + +dnl ======================================================== +dnl = Only selectively build modules +dnl ======================================================== +BUILD_MODULES=all +MOZ_ARG_ENABLE_STRING(standalone-modules, +[ --enable-standalone-modules=mod1[,mod2] + Enable standalone build of specific modules], +[ BUILD_MODULES=`echo $enableval | sed 's/,/ /g'` ] ) + +dnl XXX also check old --enable-modules option +if test "${BUILD_MODULES}" = "all" && test -n "$enable_modules"; then + BUILD_MODULES=`echo $enable_modules | sed 's/,/ /g'` +fi + +dnl Disable ldap if LDAP is not building all of Mozilla +dnl and ldap isn't in the standalone list +if test "$BUILD_MODULES" != "all" && + test `echo "$BUILD_MODULES" | grep -c ldap` -ne 0 && + test "$enable_ldap" != "yes"; then + MOZ_LDAP_XPCOM= +fi + +dnl Check for GLib and libIDL. +dnl ======================================================== +SKIP_IDL_CHECK="no" + +dnl = Allow users to disable libIDL checking for standalone modules +MOZ_ARG_WITHOUT_BOOL(libIDL, +[ --without-libIDL Skip check for libIDL (standalone modules only)], + SKIP_IDL_CHECK="yes") + +if test "$SKIP_IDL_CHECK" = "no" +then + AM_PATH_LIBIDL($LIBIDL_VERSION,,_LIBIDL_NOT_FOUND=1) + dnl + dnl If we don't have a libIDL config program & not cross-compiling, + dnl look for orbit-config instead. + dnl + if test -n "$_LIBIDL_NOT_FOUND" && test -z "$CROSS_COMPILE"; then + AC_PATH_PROGS(ORBIT_CONFIG, $ORBIT_CONFIG orbit-config) + if test -n "$ORBIT_CONFIG"; then + _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}` + _ORBIT_LIB_PATH=`${PERL} -e '{ for $f (@ARGV) { print "$f " if ($f =~ m/^-L/); } }' -- ${_ORBIT_LIBS}` + LIBIDL_CFLAGS="$_ORBIT_INC_PATH" + LIBIDL_LIBS="$_ORBIT_LIB_PATH -lIDL -lglib" + LIBIDL_CONFIG= + _LIBIDL_NOT_FOUND= + fi + fi + if test -n "$_LIBIDL_NOT_FOUND"; then + AC_MSG_ERROR([libIDL not found. + libIDL $LIBIDL_VERSION or higher is required. + See http://andrewtv.org/libIDL/ for more information.]) + fi +fi + +if test -n "$CROSS_COMPILE"; then + if test -z "$HOST_LIBIDL_CONFIG"; then + HOST_LIBIDL_CONFIG="$LIBIDL_CONFIG" + fi + if test -n "$HOST_LIBIDL_CONFIG"; then + HOST_LIBIDL_CFLAGS=`${HOST_LIBIDL_CONFIG} --cflags` + HOST_LIBIDL_LIBS=`${HOST_LIBIDL_CONFIG} --libs` + else + HOST_LIBIDL_CFLAGS="$LIBIDL_CFLAGS" + HOST_LIBIDL_LIBS="$LIBIDL_LIBS" + fi + if test "$OS_TARGET" = "POSIX_for_OpenVMS_AXP"; then + LIBIDL_CFLAGS=`${LIBIDL_CONFIG}-VMS --cflags` + LIBIDL_LIBS=`${LIBIDL_CONFIG}-VMS --libs` + fi +fi + +if test -z "${GLIB_CFLAGS}" || test -z "${GLIB_LIBS}" ; then + AM_PATH_GLIB(${GLIB_VERSION}) +fi + +AC_SUBST(LIBIDL_CFLAGS) +AC_SUBST(LIBIDL_LIBS) +AC_SUBST(GLIB_CFLAGS) +AC_SUBST(GLIB_LIBS) +AC_SUBST(HOST_LIBIDL_CONFIG) +AC_SUBST(HOST_LIBIDL_CFLAGS) +AC_SUBST(HOST_LIBIDL_LIBS) + +dnl ======================================================== +dnl disable xul +dnl ======================================================== +MOZ_XUL=1 +MOZ_ARG_DISABLE_BOOL(xul, +[ --disable-xul Disable XUL (standalone modules only)], + MOZ_XUL= ) +if test "$MOZ_XUL"; then + AC_DEFINE(MOZ_XUL) + AC_DEFINE(INCLUDE_XUL) +fi +AC_SUBST(MOZ_XUL) + +dnl ======================================================== +dnl = +dnl = Cleanup section for misc ordering snafus +dnl = +dnl ======================================================== +if test "$MOZ_DEBUG" || test "$NS_TRACE_MALLOC"; then + MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS= +fi + +if test "$MOZ_LDAP_XPCOM"; then + LDAP_CFLAGS='-I${DIST}/include/ldap' + LDAP_LIBS='-L${DIST}/bin -L${DIST}/lib -lldap40 -llber40' +fi + +dnl make sure that we compile in multi-processor support +NS_MT_SUPPORTED=1 +AC_DEFINE(NS_MT_SUPPORTED) + +dnl libpr0n on by default +AC_DEFINE(USE_IMG2) + dnl ======================================================== dnl = dnl = Maintainer debug option (no --enable equivalent) @@ -3943,6 +3821,14 @@ AC_SUBST(MOZ_LDAP_XPCOM_EXPERIMENTAL) AC_SUBST(LDAP_CFLAGS) AC_SUBST(LDAP_LIBS) +AC_SUBST(HAVE_XIE) +AC_SUBST(MOZ_XIE_LIBS) +AC_SUBST(MOZ_XPRINT_CFLAGS) +AC_SUBST(MOZ_XPRINT_LDFLAGS) +AC_SUBST(MOZ_ENABLE_XPRINT) +AC_SUBST(MOZ_XINERAMA_LIBS) +AC_SUBST(MOZ_ENABLE_XINERAMA) + AC_SUBST(XPCOM_USE_LEA) AC_SUBST(UNIX_CRASH_ON_ASSERT) AC_SUBST(NO_UNIX_ASYNC_DNS) @@ -3958,6 +3844,7 @@ AC_SUBST(ACCESSIBILITY) AC_SUBST(MOZ_USER_DIR) AC_SUBST(BUILD_IDLC) +AC_SUBST(ENABLE_STRIP) AC_SUBST(USE_ELF_DYNSTR_GC) AC_SUBST(MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS) AC_SUBST(MOZ_COMPONENT_NSPR_LIBS) @@ -3975,175 +3862,6 @@ AC_SUBST(MOZ_POST_PROGRAM_COMMAND) AC_SUBST(MOZ_REORDER) AC_SUBST(MOZ_TIMELINE) -dnl system JPEG support -dnl ======================================================== -AC_ARG_WITH(jpeg, -[ --with-jpeg[=\$dir] Use system libjpeg [installed at prefix \$dir]], - JPEG_DIR=$withval) - -_SAVE_CFLAGS=$CFLAGS -_SAVE_LDFLAGS=$LDFLAGS -_SAVE_LIBS=$LIBS -if test -n "${JPEG_DIR}"; then - CFLAGS="-I${JPEG_DIR}/include $CFLAGS" - LDFLAGS="-L${JPEG_DIR}/lib $LDFLAGS" -fi -if test "$JPEG_DIR" = no; then - SYSTEM_JPEG= -else - AC_CHECK_LIB(jpeg, jpeg_destroy_compress, [SYSTEM_JPEG=1 JPEG_LIBS="-ljpeg $JPEG_LIBS"], SYSTEM_JPEG=, $JPEG_LIBS) -fi - -if test "$SYSTEM_JPEG" = 1; then - LIBS="$JPEG_LIBS $LIBS" - AC_TRY_RUN( - #include - #include - #include - int main () { - #if JPEG_LIB_VERSION >= $MOZJPEG - exit(0); - #else - exit(1); - #endif - } - , SYSTEM_JPEG=1, [SYSTEM_JPEG= JPEG_CFLAGS= JPEG_LIBS=], SYSTEM_JPEG= ) - rm -f core -fi -CFLAGS=$_SAVE_CFLAGS -LDFLAGS=$_SAVE_LDFLAGS -LIBS=$_SAVE_LIBS - -if test -n "${JPEG_DIR}" -a -d "${JPEG_DIR}" -a "$SYSTEM_JPEG" = 1; then - JPEG_CFLAGS="-I${JPEG_DIR}/include" - JPEG_LIBS="-L${JPEG_DIR}/lib ${JPEG_LIBS}" -fi - -dnl system ZLIB support -dnl ======================================================== -AC_ARG_WITH(zlib, -[ --with-zlib[=\$dir] Use system libz [installed at prefix \$dir]], - ZLIB_DIR=$withval) - -_SAVE_CFLAGS=$CFLAGS -_SAVE_LDFLAGS=$LDFLAGS -if test -n "${ZLIB_DIR}"; then - CFLAGS="-I${ZLIB_DIR}/include $CFLAGS" - LDFLAGS="-L${ZLIB_DIR}/lib $LDFLAGS" -fi -if test "$ZLIB_DIR" = no; then - SYSTEM_ZLIB= -else - AC_MSG_CHECKING("for zlib.h") - AC_TRY_COMPILE([#include "zlib.h"], [], - [result="yes" SYSTEM_ZLIB=1], - [result="no" SYSTEM_ZLIB=]) - AC_MSG_RESULT("$result") -fi -if test "$SYSTEM_ZLIB" = 1; then - AC_CHECK_LIB(z, gzread, [SYSTEM_ZLIB=1 ZLIB_LIBS="-lz $ZLIB_LIBS"], - [SYSTEM_ZLIB= ZLIB_CFLAGS= ZLIB_LIBS=], $ZLIB_LIBS) -fi -CFLAGS=$_SAVE_CFLAGS -LDFLAGS=$_SAVE_LDFLAGS - -if test "${ZLIB_DIR}" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then - ZLIB_CFLAGS="-I${ZLIB_DIR}/include" - ZLIB_LIBS="-L${ZLIB_DIR}/lib ${ZLIB_LIBS}" -fi - -dnl system PNG Support -dnl ======================================================== -AC_ARG_WITH(png, -[ --with-png[=\$dir] Use system libpng [installed at prefix \$dir]], - PNG_DIR=$withval) - -_SAVE_CFLAGS=$CFLAGS -_SAVE_LDFLAGS=$LDFLAGS -_SAVE_LIBS=$LIBS -CFLAGS="$ZLIB_CFLAGS $CFLAGS" -LDFLAGS="$ZLIB_LIBS -lz $LDFLAGS" -if test -n "${PNG_DIR}"; then - CFLAGS="-I${PNG_DIR}/include $CFLAGS" - LDFLAGS="-L${PNG_DIR}/lib $LDFLAGS" -fi -if test "$PNG_DIR" = no; then - SYSTEM_PNG= -else - AC_CHECK_LIB(png, png_get_valid, [SYSTEM_PNG=1 PNG_LIBS="-lpng $PNG_LIBS"], - SYSTEM_PNG=, $PNG_LIBS) -fi -if test "$SYSTEM_PNG" = 1; then - LIBS="$PNG_LIBS $LIBS" - AC_TRY_RUN( - #include - #include - #include - int main () { - #if PNG_LIBPNG_VER >= $MOZPNG - exit(0); - #else - exit(1); - #endif - } - , SYSTEM_PNG=1, [SYSTEM_PNG= PNG_CFLAGS= PNG_LIBS=], SYSTEM_PNG= ) - rm -f core -fi -CFLAGS=$_SAVE_CFLAGS -LDFLAGS=$_SAVE_LDFLAGS -LIBS=$_SAVE_LIBS - -if test "${PNG_DIR}" -a -d "${PNG_DIR}" -a "$SYSTEM_PNG" = 1; then - PNG_CFLAGS="-I${PNG_DIR}/include" - PNG_LIBS="-L${PNG_DIR}/lib ${PNG_LIBS}" -fi - -dnl system MNG Support -dnl ======================================================== -AC_ARG_WITH(mng, -[ --with-mng[=\$dir] Use system libmng [installed at prefix \$dir]], - MNG_DIR=$withval) - -_SAVE_CFLAGS=$CFLAGS -_SAVE_LDFLAGS=$LDFLAGS -_SAVE_LIBS=$LIBS -CFLAGS="$ZLIB_CFLAGS $CFLAGS" -LDFLAGS="$ZLIB_LIBS -lz $LDFLAGS" -if test -n "${MNG_DIR}"; then - CFLAGS="-I${MNG_DIR}/include $CFLAGS" - LDFLAGS="-L${MNG_DIR}/lib $LDFLAGS" -fi -if test "$MNG_DIR" = no; then - SYSTEM_MNG= -else - AC_CHECK_LIB(mng, mng_initialize, [SYSTEM_MNG=1 MNG_LIBS="-lmng $MNG_LIBS"], - SYSTEM_MNG=, $MNG_LIBS) -fi -if test "$SYSTEM_MNG" = 1; then - LIBS="$MNG_LIBS $LIBS" - AC_TRY_RUN( - #include - #include - #include - int main () { - #if (((MNG_VERSION_MAJOR)<<16)|((MNG_VERSION_MINOR)<<8)|(MNG_VERSION_RELEASE)) >= $MOZMNG - exit(0); - #else - exit(1); - #endif - } - , SYSTEM_MNG=1, [SYSTEM_MNG= MNG_CFLAGS= MNG_LIBS=], SYSTEM_MNG= ) - rm -f core -fi -CFLAGS=$_SAVE_CFLAGS -LDFLAGS=$_SAVE_LDFLAGS -LIBS=$_SAVE_LIBS - -if test "${MNG_DIR}" -a -d "${MNG_DIR}" -a "$SYSTEM_MNG" = 1; then - MNG_CFLAGS="-I${MNG_DIR}/include" - MNG_LIBS="-L${MNG_DIR}/lib ${MNG_LIBS}" -fi - dnl Disable profile at startup, hack for tinderbox. if test "$MOZ_BYPASS_PROFILE_AT_STARTUP"; then AC_DEFINE(MOZ_BYPASS_PROFILE_AT_STARTUP) @@ -4231,11 +3949,8 @@ AC_SUBST(HOST_AR) AC_SUBST(HOST_RANLIB) AC_SUBST(HOST_NSPR_MDCPUCFG) -AC_SUBST(HOST_LIBIDL_CONFIG) -AC_SUBST(HOST_LIBIDL_CFLAGS) -AC_SUBST(HOST_LIBIDL_LIBS) - AC_SUBST(TARGET_CPU) +AC_SUBST(TARGET_VENDOR) AC_SUBST(TARGET_OS) AC_SUBST(TARGET_NSPR_MDCPUCFG) AC_SUBST(TARGET_MD_ARCH) diff --git a/webshell/tests/viewer/Makefile.in b/webshell/tests/viewer/Makefile.in index c793bf932fa2..88ae765f6fa9 100644 --- a/webshell/tests/viewer/Makefile.in +++ b/webshell/tests/viewer/Makefile.in @@ -184,16 +184,21 @@ unix/xlib/libviewer_xlib_s.a: $(PROGRAM)_gtk: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in unix/gtk/libviewer_gtk_s.a $(CCC) $(CXXFLAGS) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(GTK_LIBS) $(OS_LIBS) $(PROFILER_LIBS) - - $(MOZ_POST_PROGRAM_COMMAND) $@ +ifdef ENABLE_STRIP + $(STRIP) $@ +endif $(PROGRAM)_qt: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in unix/qt/libviewer_qt_s.a $(CCC) $(CXXFLAGS) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(QT_LIBS) $(OS_LIBS) $(PROFILER_LIBS) - $(MOZ_POST_PROGRAM_COMMAND) $@ +ifdef ENABLE_STRIP + $(STRIP) $@ +endif $(PROGRAM)_xlib: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in unix/xlib/libviewer_xlib_s.a $(CCC) $(CXXFLAGS) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(XLIB_LIBS) $(OS_LIBS) $(PROFILER_LIBS) - $(MOZ_POST_PROGRAM_COMMAND) $@ +ifdef ENABLE_STRIP + $(STRIP) $@ +endif ifdef MOZ_ENABLE_GTK install:: $(PROGRAM)_gtk