author | Brad Lassey <blassey@mozilla.com> |
Thu, 26 May 2011 14:48:59 -0400 | |
changeset 70213 | b20b6d500c056a2965acc0adfd8fc31c53a21796 |
parent 70212 | d6de4c330619d227326b4172b29832af41d320d9 |
child 70214 | 3ce0d40d9ebaec16fb80c9a1e60a1f9d2e90ebad |
push id | 20237 |
push user | blassey@mozilla.com |
push date | Thu, 26 May 2011 19:37:16 +0000 |
treeherder | mozilla-central@b20b6d500c05 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
bugs | 617115, 647820, 564851, 650474 |
milestone | 7.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/nsprpub/build/autoconf/config.sub +++ b/nsprpub/build/autoconf/config.sub @@ -1,15 +1,15 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2009-12-04' +timestamp='2011-01-03' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -1427,16 +1427,19 @@ case $os in os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; + -android*) + os=android + ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; @@ -1681,16 +1684,19 @@ case $basic_machine in vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; + *-android*|*-linuxandroid*) + vendor=linux- + ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit
new file mode 100644 --- /dev/null +++ b/nsprpub/build/win32/pgomerge.py @@ -0,0 +1,40 @@ +#!/usr/bin/python +# Usage: pgomerge.py <binary basename> <dist/bin> +# Gathers .pgc files from dist/bin and merges them into +# $PWD/$basename.pgd using pgomgr, then deletes them. +# No errors if any of these files don't exist. + +import sys, os, os.path, subprocess +if not sys.platform == "win32": + raise Exception("This script was only meant for Windows.") + +def MergePGOFiles(basename, pgddir, pgcdir): + """Merge pgc files produced from an instrumented binary + into the pgd file for the second pass of profile-guided optimization + with MSVC. |basename| is the name of the DLL or EXE without the + extension. |pgddir| is the path that contains <basename>.pgd + (should be the objdir it was built in). |pgcdir| is the path + containing basename!N.pgc files, which is probably dist/bin. + Calls pgomgr to merge each pgc file into the pgd, then deletes + the pgc files.""" + if not os.path.isdir(pgddir) or not os.path.isdir(pgcdir): + return + pgdfile = os.path.abspath(os.path.join(pgddir, basename + ".pgd")) + if not os.path.isfile(pgdfile): + return + for file in os.listdir(pgcdir): + if file.startswith(basename+"!") and file.endswith(".pgc"): + try: + pgcfile = os.path.normpath(os.path.join(pgcdir, file)) + subprocess.call(['pgomgr', '-merge', + pgcfile, + pgdfile]) + os.remove(pgcfile) + except OSError: + pass + +if __name__ == '__main__': + if len(sys.argv) != 3: + print >>sys.stderr, "Usage: pgomerge.py <binary basename> <dist/bin>" + sys.exit(1) + MergePGOFiles(sys.argv[1], os.getcwd(), sys.argv[2])
--- a/nsprpub/config/config.mk +++ b/nsprpub/config/config.mk @@ -73,21 +73,23 @@ NOMD_CCFLAGS = $(CCC_ONLY_FLAGS) $(OPTIM $(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS) LDFLAGS = $(OS_LDFLAGS) # Enable profile-guided optimization ifdef MOZ_PROFILE_GENERATE CFLAGS += $(PROFILE_GEN_CFLAGS) LDFLAGS += $(PROFILE_GEN_LDFLAGS) +DLLFLAGS += $(PROFILE_GEN_LDFLAGS) endif # MOZ_PROFILE_GENERATE ifdef MOZ_PROFILE_USE CFLAGS += $(PROFILE_USE_CFLAGS) LDFLAGS += $(PROFILE_USE_LDFLAGS) +DLLFLAGS += $(PROFILE_USE_LDFLAGS) endif # MOZ_PROFILE_USE define MAKE_OBJDIR if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi endef LINK_DLL = $(LD) $(OS_DLLFLAGS) $(DLLFLAGS)
--- a/nsprpub/config/rules.mk +++ b/nsprpub/config/rules.mk @@ -275,23 +275,35 @@ alltags: find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs ctags -a $(NFSPWD): cd $(@D); $(MAKE) $(@F) $(PROGRAM): $(OBJS) @$(MAKE_OBJDIR) ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT) +ifdef MOZ_PROFILE_USE +# In the second pass, we need to merge the pgc files into the pgd file. +# The compiler would do this for us automatically if they were in the right +# place, but they're in dist/bin. + python $(topsrcdir)/build/win32/pgomerge.py \ + $(notdir $(PROGRAM:.exe=)) $(DIST)/bin +endif # MOZ_PROFILE_USE $(CC) $(OBJS) -Fe$@ -link $(LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS) ifdef MT @if test -f $@.manifest; then \ $(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \ rm -f $@.manifest; \ fi endif # MSVC with manifest tool +ifdef MOZ_PROFILE_GENERATE +# touch it a few seconds into the future to work around FAT's +# 2-second granularity + touch -t `date +%Y%m%d%H%M.%S -d "now+5seconds"` pgo.relink +endif # MOZ_PROFILE_GENERATE else # WINNT && !GCC $(CC) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS) endif # WINNT && !GCC ifdef ENABLE_STRIP $(STRIP) $@ endif $(LIBRARY): $(OBJS) @@ -321,31 +333,56 @@ ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1) nm -B -C -g $(OBJS) \ | awk '/ [T,D] / {print $$3}' \ | sed -e 's/^\.//' \ | sort -u >> $(OBJDIR)/lib$(LIBRARY_NAME)_syms $(LD) $(XCFLAGS) -o $@ $(OBJS) -bE:$(OBJDIR)/lib$(LIBRARY_NAME)_syms \ -bM:SRE -bnoentry $(OS_LIBS) $(EXTRA_LIBS) else # AIX 4.1 ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT) +ifdef MOZ_PROFILE_USE + python $(topsrcdir)/build/win32/pgomerge.py \ + $(notdir $(SHARED_LIBRARY:.$(DLL_SUFFIX)=)) $(DIST)/bin +endif # MOZ_PROFILE_USE $(LINK_DLL) -MAP $(DLLBASE) $(DLL_LIBS) $(EXTRA_LIBS) $(OBJS) $(RES) ifdef MT @if test -f $@.manifest; then \ $(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;2; \ rm -f $@.manifest; \ fi endif # MSVC with manifest tool +ifdef MOZ_PROFILE_GENERATE + touch -t `date +%Y%m%d%H%M.%S -d "now+5seconds"` pgo.relink +endif # MOZ_PROFILE_GENERATE else # WINNT && !GCC $(MKSHLIB) $(OBJS) $(RES) $(LDFLAGS) $(EXTRA_LIBS) endif # WINNT && !GCC endif # AIX 4.1 ifdef ENABLE_STRIP $(STRIP) $@ endif +################################################################################ + +ifdef MOZ_PROFILE_USE +ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT) +# When building with PGO, we have to make sure to re-link +# in the MOZ_PROFILE_USE phase if we linked in the +# MOZ_PROFILE_GENERATE phase. We'll touch this pgo.relink +# file in the link rule in the GENERATE phase to indicate +# that we need a relink. +$(SHARED_LIBRARY): pgo.relink + +$(PROGRAM): pgo.relink + +endif # WINNT && !GCC +endif # MOZ_PROFILE_USE + +################################################################################ + ifeq ($(OS_ARCH),WINNT) $(RES): $(RESNAME) @$(MAKE_OBJDIR) # The resource compiler does not understand the -U option. ifdef NS_USE_GCC $(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $< else $(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$@ $<
--- a/nsprpub/configure +++ b/nsprpub/configure @@ -837,37 +837,50 @@ fi # Check whether --with-android-platform or --without-android-platform was given. if test "${with_android_platform+set}" = set; then withval="$with_android_platform" android_platform=$withval fi -if test "$target" = "arm-android-eabi" ; then +case "$target" in +arm-linux*-android*|*-linuxandroid*) + android_tool_prefix="arm-linux-androideabi" + ;; +arm-android-eabi) + android_tool_prefix="arm-eabi" + ;; +*) + android_tool_prefix="$target_os" + ;; +esac + +case "$target" in +*-android*|*-linuxandroid*) if test -z "$android_ndk" ; then { echo "configure: error: You must specify --with-android-ndk=/path/to/ndk when targeting Android." 1>&2; exit 1; } fi if test -z "$android_toolchain" ; then android_toolchain="$android_ndk"/build/prebuilt/`uname -s | tr "[:upper:]" "[:lower:]"`-x86/arm-eabi-4.4.0 fi if test -z "$android_platform" ; then android_platform="$android_ndk"/build/platforms/android-5/arch-arm fi - AS="$android_toolchain"/bin/arm-eabi-as - CC="$android_toolchain"/bin/arm-eabi-gcc - CXX="$android_toolchain"/bin/arm-eabi-g++ - CPP="$android_toolchain"/bin/arm-eabi-cpp - LD="$android_toolchain"/bin/arm-eabi-ld - AR="$android_toolchain"/bin/arm-eabi-ar - RANLIB="$android_toolchain"/bin/arm-eabi-ranlib - STRIP="$android_toolchain"/bin/arm-eabi-strip + AS="$android_toolchain"/bin/"$android_tool_prefix"-as + CC="$android_toolchain"/bin/"$android_tool_prefix"-gcc + CXX="$android_toolchain"/bin/"$android_tool_prefix"-g++ + CPP="$android_toolchain"/bin/"$android_tool_prefix"-cpp + LD="$android_toolchain"/bin/"$android_tool_prefix"-ld + AR="$android_toolchain"/bin/"$android_tool_prefix"-ar + RANLIB="$android_toolchain"/bin/"$android_tool_prefix"-ranlib + STRIP="$android_toolchain"/bin/"$android_tool_prefix"-strip CPPFLAGS="-I$android_platform/usr/include $CPPFLAGS" CFLAGS="-mandroid -I$android_platform/usr/include -msoft-float -fno-short-enums -fno-exceptions $CFLAGS" CXXFLAGS="-mandroid -I$android_platform/usr/include -msoft-float -fpic -fno-short-enums -fno-exceptions $CXXFLAGS" LDFLAGS="-mandroid -L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform $LDFLAGS" if test -z "$HOST_CPPFLAGS" ; then HOST_CPPFLAGS=" " @@ -883,17 +896,18 @@ if test "$target" = "arm-android-eabi" ; fi WRAP_MALLOC_CFLAGS="-Wl,--wrap=dlopen -Wl,--wrap=dlclose -Wl,--wrap=dlerror -Wl,--wrap=dlsym -Wl,--wrap=dladdr" cat >> confdefs.h <<\EOF #define ANDROID 1 EOF -fi + ;; +esac dist_prefix='${MOD_DEPTH}/dist' dist_bindir='${dist_prefix}/bin' dist_includedir='${dist_prefix}/include/nspr' dist_libdir='${dist_prefix}/lib' if test "${includedir}" = '${prefix}/include'; then includedir='${prefix}/include/nspr' fi @@ -1177,17 +1191,17 @@ if test -z "$CXX"; then esac fi if test -z "$SKIP_PATH_CHECKS"; then # Extract the first word of "$WHOAMI whoami", so it can be a program name with args. set dummy $WHOAMI whoami; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1186: checking for $ac_word" >&5 +echo "configure:1200: 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 case "$WHOAMI" in /*) ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a path. ;; ?:/*) @@ -1248,23 +1262,23 @@ if test "$target" != "$host"; then echo "cross compiling from $host to $target" cross_compiling=yes _SAVE_CC="$CC" _SAVE_CFLAGS="$CFLAGS" _SAVE_LDFLAGS="$LDFLAGS" echo $ac_n "checking for $host compiler""... $ac_c" 1>&6 -echo "configure:1257: checking for $host compiler" >&5 +echo "configure:1271: checking for $host compiler" >&5 for ac_prog in $HOST_CC gcc cc /usr/ucb/cc 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:1263: checking for $ac_word" >&5 +echo "configure:1277: 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 if test -n "$HOST_CC"; then ac_cv_prog_HOST_CC="$HOST_CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" @@ -1300,26 +1314,26 @@ test -n "$HOST_CC" || HOST_CC="""" HOST_LDFLAGS="$LDFLAGS" fi CC="$HOST_CC" CFLAGS="$HOST_CFLAGS" LDFLAGS="$HOST_LDFLAGS" echo $ac_n "checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1309: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5 +echo "configure:1323: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5 cat > conftest.$ac_ext <<EOF -#line 1311 "configure" +#line 1325 "configure" #include "confdefs.h" int main() { return(0); ; return 0; } EOF -if { (eval echo configure:1318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_prog_host_cc_works=1 echo "$ac_t""yes" 1>&6 else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* { echo "configure: error: installation or configuration problem: $host compiler $HOST_CC cannot create executables." 1>&2; exit 1; } fi @@ -1338,17 +1352,17 @@ rm -f conftest* ;; esac for ac_prog in $CC "${target_alias}-gcc" "${target}-gcc" 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:1347: checking for $ac_word" >&5 +echo "configure:1361: 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 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" @@ -1372,17 +1386,17 @@ fi test -n "$CC" && break done test -n "$CC" || CC="echo" unset ac_cv_prog_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:1381: checking for $ac_word" >&5 +echo "configure:1395: 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 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" @@ -1402,17 +1416,17 @@ if test -n "$CC"; then else echo "$ac_t""no" 1>&6 fi 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:1411: checking for $ac_word" >&5 +echo "configure:1425: 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 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no @@ -1453,17 +1467,17 @@ else fi if test -z "$CC"; then case "`uname -s`" in *win32* | *WIN32*) # 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:1462: checking for $ac_word" >&5 +echo "configure:1476: 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 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" @@ -1485,33 +1499,33 @@ else fi ;; esac fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1494: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1508: 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. 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 cat > conftest.$ac_ext << EOF -#line 1505 "configure" +#line 1519 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1524: \"$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 ac_cv_prog_cc_cross=no else ac_cv_prog_cc_cross=yes fi else @@ -1527,31 +1541,31 @@ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAG 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_t""$ac_cv_prog_cc_works" 1>&6 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:1536: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1550: 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:1541: checking whether we are using GNU C" >&5 +echo "configure:1555: 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 cat > conftest.c <<EOF #ifdef __GNUC__ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1550: \"$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:1564: \"$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 fi fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 @@ -1560,17 +1574,17 @@ if test $ac_cv_prog_gcc = yes; then else GCC= fi 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:1569: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1583: 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 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ac_cv_prog_cc_g=yes else ac_cv_prog_cc_g=no @@ -1597,17 +1611,17 @@ else fi if test -n "$USE_CPLUS"; then for ac_prog in $CXX "${target_alias}-g++" "${target}-g++" 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:1606: checking for $ac_word" >&5 +echo "configure:1620: 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 if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" @@ -1633,17 +1647,17 @@ done test -n "$CXX" || CXX="echo" unset ac_cv_prog_CXX for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl 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:1642: checking for $ac_word" >&5 +echo "configure:1656: 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 if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" @@ -1665,33 +1679,33 @@ else fi test -n "$CXX" && break done test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1674: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:1688: 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. 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 cat > conftest.$ac_ext << EOF -#line 1685 "configure" +#line 1699 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:1690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1704: \"$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 ac_cv_prog_cxx_cross=no else ac_cv_prog_cxx_cross=yes fi else @@ -1707,31 +1721,31 @@ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAG 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_t""$ac_cv_prog_cxx_works" 1>&6 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:1716: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1730: 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:1721: checking whether we are using GNU C++" >&5 +echo "configure:1735: 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 cat > conftest.C <<EOF #ifdef __GNUC__ yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1730: \"$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:1744: \"$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 fi fi echo "$ac_t""$ac_cv_prog_gxx" 1>&6 @@ -1740,17 +1754,17 @@ if test $ac_cv_prog_gxx = yes; then else GXX= fi 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:1749: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:1763: 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 echo 'void f(){}' > conftest.cc if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then ac_cv_prog_cxx_g=yes else ac_cv_prog_cxx_g=no @@ -1785,17 +1799,17 @@ fi ;; esac for ac_prog in $RANLIB "${target_alias}-ranlib" "${target}-ranlib" 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:1794: checking for $ac_word" >&5 +echo "configure:1808: 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 if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" @@ -1820,17 +1834,17 @@ test -n "$RANLIB" && break done test -n "$RANLIB" || RANLIB="echo" for ac_prog in $AR "${target_alias}-ar" "${target}-ar" 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:1829: checking for $ac_word" >&5 +echo "configure:1843: 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 if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" @@ -1855,17 +1869,17 @@ test -n "$AR" && break done test -n "$AR" || AR="echo" for ac_prog in $AS "${target_alias}-as" "${target}-as" 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:1864: checking for $ac_word" >&5 +echo "configure:1878: 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 if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" @@ -1890,17 +1904,17 @@ test -n "$AS" && break done test -n "$AS" || AS="echo" for ac_prog in $LD "${target_alias}-ld" "${target}-ld" 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:1899: checking for $ac_word" >&5 +echo "configure:1913: 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 if test -n "$LD"; then ac_cv_prog_LD="$LD" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" @@ -1925,17 +1939,17 @@ test -n "$LD" && break done test -n "$LD" || LD="echo" for ac_prog in $STRIP "${target_alias}-strip" "${target}-strip" 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:1934: checking for $ac_word" >&5 +echo "configure:1948: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" @@ -1960,17 +1974,17 @@ test -n "$STRIP" && break done test -n "$STRIP" || STRIP="echo" for ac_prog in $WINDRES "${target_alias}-windres" "${target}-windres" 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:1969: checking for $ac_word" >&5 +echo "configure:1983: 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 if test -n "$WINDRES"; then ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" @@ -1995,17 +2009,17 @@ test -n "$WINDRES" && break done test -n "$WINDRES" || WINDRES="echo" 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:2004: checking for $ac_word" >&5 +echo "configure:2018: 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 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" @@ -2025,17 +2039,17 @@ if test -n "$CC"; then else echo "$ac_t""no" 1>&6 fi 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:2034: checking for $ac_word" >&5 +echo "configure:2048: 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 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no @@ -2076,17 +2090,17 @@ else fi if test -z "$CC"; then case "`uname -s`" in *win32* | *WIN32*) # 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:2085: checking for $ac_word" >&5 +echo "configure:2099: 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 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" @@ -2108,33 +2122,33 @@ else fi ;; esac fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2117: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2131: 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. 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 cat > conftest.$ac_ext << EOF -#line 2128 "configure" +#line 2142 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2147: \"$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 ac_cv_prog_cc_cross=no else ac_cv_prog_cc_cross=yes fi else @@ -2150,31 +2164,31 @@ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAG 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_t""$ac_cv_prog_cc_works" 1>&6 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:2159: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2173: 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:2164: checking whether we are using GNU C" >&5 +echo "configure:2178: 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 cat > conftest.c <<EOF #ifdef __GNUC__ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2173: \"$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:2187: \"$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 fi fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 @@ -2183,17 +2197,17 @@ if test $ac_cv_prog_gcc = yes; then else GCC= fi 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:2192: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2206: 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 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ac_cv_prog_cc_g=yes else ac_cv_prog_cc_g=no @@ -2223,17 +2237,17 @@ fi if test "$CC" = "cl" -a -z "$CXX"; then CXX=$CC else for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl 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:2232: checking for $ac_word" >&5 +echo "configure:2246: 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 if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" @@ -2255,33 +2269,33 @@ else fi test -n "$CXX" && break done test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2264: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:2278: 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. 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 cat > conftest.$ac_ext << EOF -#line 2275 "configure" +#line 2289 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:2280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2294: \"$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 ac_cv_prog_cxx_cross=no else ac_cv_prog_cxx_cross=yes fi else @@ -2297,31 +2311,31 @@ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAG 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_t""$ac_cv_prog_cxx_works" 1>&6 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:2306: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2320: 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:2311: checking whether we are using GNU C++" >&5 +echo "configure:2325: 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 cat > conftest.C <<EOF #ifdef __GNUC__ yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2320: \"$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:2334: \"$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 fi fi echo "$ac_t""$ac_cv_prog_gxx" 1>&6 @@ -2330,17 +2344,17 @@ if test $ac_cv_prog_gxx = yes; then else GXX= fi 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:2339: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:2353: 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 echo 'void f(){}' > conftest.cc if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then ac_cv_prog_cxx_g=yes else ac_cv_prog_cxx_g=no @@ -2364,72 +2378,72 @@ else else CXXFLAGS= fi fi fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2373: checking how to run the C preprocessor" >&5 +echo "configure:2387: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get # substituted into the Makefile and "${CC-cc}" will confuse make. CPP="${CC-cc} -E" # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 2388 "configure" +#line 2402 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2408: \"$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 : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 2405 "configure" +#line 2419 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2425: \"$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 : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 2422 "configure" +#line 2436 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2442: \"$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 : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* @@ -2446,17 +2460,17 @@ fi else ac_cv_prog_CPP="$CPP" fi echo "$ac_t""$CPP" 1>&6 # 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:2455: checking for $ac_word" >&5 +echo "configure:2469: 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 if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" @@ -2478,17 +2492,17 @@ else echo "$ac_t""no" 1>&6 fi for ac_prog in as 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:2487: checking for $ac_word" >&5 +echo "configure:2501: 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 case "$AS" in /*) ac_cv_path_AS="$AS" # Let the user override the test with a path. ;; ?:/*) @@ -2519,17 +2533,17 @@ test -n "$AS" && break done test -n "$AS" || AS="$CC" for ac_prog in ar 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:2528: checking for $ac_word" >&5 +echo "configure:2542: 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 case "$AR" in /*) ac_cv_path_AR="$AR" # Let the user override the test with a path. ;; ?:/*) @@ -2560,17 +2574,17 @@ test -n "$AR" && break done test -n "$AR" || AR="echo not_ar" for ac_prog in ld link 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:2569: checking for $ac_word" >&5 +echo "configure:2583: 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 case "$LD" in /*) ac_cv_path_LD="$LD" # Let the user override the test with a path. ;; ?:/*) @@ -2601,17 +2615,17 @@ test -n "$LD" && break done test -n "$LD" || LD="echo not_ld" for ac_prog in strip 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:2610: checking for $ac_word" >&5 +echo "configure:2624: 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 case "$STRIP" in /*) ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path. ;; ?:/*) @@ -2642,17 +2656,17 @@ test -n "$STRIP" && break done test -n "$STRIP" || STRIP="echo not_strip" for ac_prog in windres 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:2651: checking for $ac_word" >&5 +echo "configure:2665: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_WINDRES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$WINDRES" in /*) ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a path. ;; ?:/*) @@ -2710,39 +2724,39 @@ esac if test "$cross_compiling" = "yes"; then CROSS_COMPILE=1 else CROSS_COMPILE= fi echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6 -echo "configure:2719: checking for gcc -pipe support" >&5 +echo "configure:2733: checking for gcc -pipe support" >&5 if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then echo '#include <stdio.h>' > dummy-hello.c echo 'int main() { printf("Hello World\n"); return 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 <<EOF -#line 2734 "configure" +#line 2748 "configure" #include "confdefs.h" #include <stdio.h> int main() { printf("Hello World\n"); ; return 0; } EOF -if { (eval echo configure:2741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2755: \"$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 @@ -2762,26 +2776,26 @@ else echo "$ac_t""no" 1>&6 fi _SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction" echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6 -echo "configure:2771: checking whether C compiler supports -fprofile-generate" >&5 +echo "configure:2785: checking whether C compiler supports -fprofile-generate" >&5 cat > conftest.$ac_ext <<EOF -#line 2773 "configure" +#line 2787 "configure" #include "confdefs.h" int main() { return 0; ; return 0; } EOF -if { (eval echo configure:2780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* PROFILE_GEN_CFLAGS="-fprofile-generate" result="yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* result="no" @@ -2794,17 +2808,17 @@ if test $result = "yes"; then PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch -freorder-blocks-and-partition" PROFILE_USE_LDFLAGS="-fprofile-use" fi CFLAGS="$_SAVE_CFLAGS" if test "$GNU_CC"; then echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6 -echo "configure:2803: checking for visibility(hidden) attribute" >&5 +echo "configure:2817: checking for visibility(hidden) attribute" >&5 if eval "test \"`echo '$''{'ac_cv_visibility_hidden'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <<EOF int foo __attribute__ ((visibility ("hidden"))) = 1; EOF ac_cv_visibility_hidden=no if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then @@ -2818,17 +2832,17 @@ fi echo "$ac_t""$ac_cv_visibility_hidden" 1>&6 if test "$ac_cv_visibility_hidden" = "yes"; then cat >> confdefs.h <<\EOF #define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1 EOF echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6 -echo "configure:2827: checking for visibility pragma support" >&5 +echo "configure:2841: checking for visibility pragma support" >&5 if eval "test \"`echo '$''{'ac_cv_visibility_pragma'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <<EOF #pragma GCC visibility push(hidden) int foo_hidden = 1; #pragma GCC visibility push(default) int foo_default = 1; @@ -2871,17 +2885,17 @@ fi # GNU_CC fi # SKIP_COMPILER_CHECKS if test -z "$SKIP_PATH_CHECKS"; then for ac_prog in perl5 perl 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:2880: checking for $ac_word" >&5 +echo "configure:2894: 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 case "$PERL" in /*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; ?:/*) @@ -3157,27 +3171,27 @@ EOF cat >> confdefs.h <<\EOF #define SYSV 1 EOF DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib' ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6 -echo "configure:3166: checking for sys/atomic_op.h" >&5 +echo "configure:3180: checking for sys/atomic_op.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 -#line 3171 "configure" +#line 3185 "configure" #include "confdefs.h" #include <sys/atomic_op.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3190: \"$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 @@ -3296,16 +3310,55 @@ EOF OBJECT_MODE=64 else MDCPUCFG_H=_aix32.cfg fi PR_MD_CSRCS=aix.c RESOLVE_LINK_SYMBOLS=1 ;; +*-android*|*-linuxandroid*) + if test -z "$USE_NSPR_THREADS"; then + USE_PTHREADS=1 + IMPL_STRATEGY=_PTH + fi + cat >> confdefs.h <<\EOF +#define XP_UNIX 1 +EOF + + cat >> confdefs.h <<\EOF +#define _GNU_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_FCNTL_FILE_LOCKING 1 +EOF + + cat >> confdefs.h <<\EOF +#define LINUX 1 +EOF + + CFLAGS="$CFLAGS -Wall" + CXXFLAGS="$CXXFLAGS -Wall" + MDCPUCFG_H=_linux.cfg + PR_MD_CSRCS=linux.c + MKSHLIB='$(CC) $(DSO_LDOPTS) $(WRAP_MALLOC_LIB) -o $@' + DSO_CFLAGS=-fPIC + DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)' + _OPTIMIZE_FLAGS=-O2 + _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that + # combo is not yet good at debugging inlined + # functions (even when using DWARF2 as the + # debugging format) + COMPILER_TAG=_glibc + CPU_ARCH=arm + CPU_ARCH_TAG=_arm + OS_TARGET=Android + ;; + *-beos*) cat >> confdefs.h <<\EOF #define XP_BEOS 1 EOF cat >> confdefs.h <<\EOF #define BeOS 1 EOF @@ -3324,36 +3377,36 @@ EOF PR_MD_ARCH_DIR=beos RESOLVE_LINK_SYMBOLS=1 case "${target_cpu}" in i*86) _OPTIMIZE_FLAGS=-O2 _DEBUG_FLAGS='-gdwarf-2 -O0' MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@' echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6 -echo "configure:3333: checking for gethostbyaddr in -lbind" >&5 +echo "configure:3386: checking for gethostbyaddr in -lbind" >&5 ac_lib_var=`echo bind'_'gethostbyaddr | 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="-lbind $LIBS" cat > conftest.$ac_ext <<EOF -#line 3341 "configure" +#line 3394 "configure" #include "confdefs.h" /* 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 gethostbyaddr(); int main() { gethostbyaddr() ; return 0; } EOF -if { (eval echo configure:3352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3405: \"$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 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -4051,55 +4104,16 @@ EOF cat >> confdefs.h <<\EOF #define _PR_HAVE_SGI_PRDA_PROCMASK 1 EOF ;; esac ;; -arm-android-eabi) - if test -z "$USE_NSPR_THREADS"; then - USE_PTHREADS=1 - IMPL_STRATEGY=_PTH - fi - cat >> confdefs.h <<\EOF -#define XP_UNIX 1 -EOF - - cat >> confdefs.h <<\EOF -#define _GNU_SOURCE 1 -EOF - - cat >> confdefs.h <<\EOF -#define HAVE_FCNTL_FILE_LOCKING 1 -EOF - - cat >> confdefs.h <<\EOF -#define LINUX 1 -EOF - - CFLAGS="$CFLAGS -Wall" - CXXFLAGS="$CXXFLAGS -Wall" - MDCPUCFG_H=_linux.cfg - PR_MD_CSRCS=linux.c - MKSHLIB='$(CC) $(DSO_LDOPTS) $(WRAP_MALLOC_LIB) -o $@' - DSO_CFLAGS=-fPIC - DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)' - _OPTIMIZE_FLAGS=-O2 - _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that - # combo is not yet good at debugging inlined - # functions (even when using DWARF2 as the - # debugging format) - COMPILER_TAG=_glibc - CPU_ARCH=arm - CPU_ARCH_TAG=_arm - OS_TARGET=Android - ;; - *-linux*|*-gnu*|*-k*bsd*-gnu) if test -z "$USE_NSPR_THREADS"; then USE_PTHREADS=1 IMPL_STRATEGY=_PTH fi cat >> confdefs.h <<\EOF #define XP_UNIX 1 EOF @@ -4201,18 +4215,18 @@ EOF cat >> confdefs.h <<\EOF #define WIN32 1 EOF PR_MD_ARCH_DIR=windows RESOLVE_LINK_SYMBOLS=1 if test -n "$GNU_CC"; then - CC="$CC -mno-cygwin" - CXX="$CXX -mno-cygwin" + CC="$CC -mwindows" + CXX="$CXX -mwindows" DLL_SUFFIX=dll MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))' RC=$WINDRES # Use temp file for windres (bug 213281) RCFLAGS='-O coff --use-temp-file' else CC=cl CXX=cl @@ -4734,27 +4748,27 @@ EOF if test -z "$GNU_CC"; then CC="$CC -std1 -ieee_with_inexact" if test "$OS_RELEASE" != "V2.0"; then CC="$CC -readonly_strings" fi _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000" ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6 -echo "configure:4743: checking for machine/builtins.h" >&5 +echo "configure:4757: checking for machine/builtins.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 -#line 4748 "configure" +#line 4762 "configure" #include "confdefs.h" #include <machine/builtins.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4767: \"$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 @@ -5393,63 +5407,63 @@ if test -z "$SKIP_LIBRARY_CHECKS"; then case $target in *-darwin*|*-beos*|*-os2*) ;; *) echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:5402: checking for dlopen in -ldl" >&5 +echo "configure:5416: 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 <<EOF -#line 5410 "configure" +#line 5424 "configure" #include "confdefs.h" /* 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 dlopen(); int main() { dlopen() ; return 0; } EOF -if { (eval echo configure:5421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5435: \"$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 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_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:5438: checking for dlfcn.h" >&5 +echo "configure:5452: checking for dlfcn.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5443 "configure" +#line 5457 "configure" #include "confdefs.h" #include <dlfcn.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5462: \"$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 @@ -5472,23 +5486,23 @@ fi ;; esac if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:5481: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:5495: 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 <<EOF -#line 5487 "configure" +#line 5501 "configure" #include "confdefs.h" #include <sgtty.h> 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 @@ -5496,17 +5510,17 @@ 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 <<EOF -#line 5505 "configure" +#line 5519 "configure" #include "confdefs.h" #include <termio.h> 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 @@ -5520,22 +5534,22 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi for ac_func in lchown strerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5529: checking for $ac_func" >&5 +echo "configure:5543: 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 <<EOF -#line 5534 "configure" +#line 5548 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ #include <assert.h> /* 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(); @@ -5548,17 +5562,17 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF -if { (eval echo configure:5557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5571: \"$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 @@ -5599,17 +5613,17 @@ if test "$CCACHE" != "no"; then fi fi fi for ac_prog in $CCACHE ccache 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:5608: checking for $ac_word" >&5 +echo "configure:5622: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CCACHE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$CCACHE" in /*) ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path. ;; ?:/*) @@ -5658,17 +5672,17 @@ if test "${enable_strip+set}" = set; the fi case "${target_os}" in hpux*) if test -z "$GNU_CC"; then echo $ac_n "checking for +Olit support""... $ac_c" 1>&6 -echo "configure:5667: checking for +Olit support" >&5 +echo "configure:5681: checking for +Olit support" >&5 if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_hpux_usable_olit_option=no rm -f conftest* echo 'int main() { return 0; }' | cat > conftest.c ${CC-cc} ${CFLAGS} +Olit=all -o conftest conftest.c > conftest.out 2>&1 if test $? -eq 0; then @@ -5700,17 +5714,17 @@ darwin*) _HAVE_PTHREADS=1 ;; wince*) _HAVE_PTHREADS= ;; *) echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:5709: checking for pthread_create in -lpthreads" >&5 +echo "configure:5723: checking for pthread_create in -lpthreads" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } int main() { pthread_t t; if (!pthread_create(&t, 0, &foo, 0)) { pthread_join(t, 0); } @@ -5722,17 +5736,17 @@ echo " rm -f dummy.c dummy${ac_exeext} ; if test "$_res" = "0"; then echo "$ac_t""yes" 1>&6 _HAVE_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:5731: checking for pthread_create in -lpthread" >&5 +echo "configure:5745: checking for pthread_create in -lpthread" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } int main() { pthread_t t; if (!pthread_create(&t, 0, &foo, 0)) { pthread_join(t, 0); } @@ -5744,17 +5758,17 @@ echo " rm -f dummy.c dummy${ac_exeext} ; if test "$_res" = "0"; then echo "$ac_t""yes" 1>&6 _HAVE_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:5753: checking for pthread_create in -lc_r" >&5 +echo "configure:5767: checking for pthread_create in -lc_r" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } int main() { pthread_t t; if (!pthread_create(&t, 0, &foo, 0)) { pthread_join(t, 0); } @@ -5766,17 +5780,17 @@ echo " rm -f dummy.c dummy${ac_exeext} ; if test "$_res" = "0"; then echo "$ac_t""yes" 1>&6 _HAVE_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:5775: checking for pthread_create in -lc" >&5 +echo "configure:5789: checking for pthread_create in -lc" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } int main() { pthread_t t; if (!pthread_create(&t, 0, &foo, 0)) { pthread_join(t, 0); } @@ -5884,17 +5898,17 @@ if test "${enable_ipv6+set}" = set; then fi fi if test -n "$USE_PTHREADS"; 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:5893: checking whether ${CC-cc} accepts -pthread" >&5 +echo "configure:5907: 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 case "$target_os" in freebsd*) # Freebsd doesn't use -pthread for compiles, it uses them for linking @@ -5907,17 +5921,17 @@ echo "configure:5893: checking whether $ 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:5916: checking whether ${CC-cc} accepts -pthreads" >&5 +echo "configure:5930: 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
--- a/nsprpub/configure.in +++ b/nsprpub/configure.in @@ -147,38 +147,51 @@ AC_ARG_WITH(android-toolchain, location of the android toolchain, default NDK/build/prebuilt/HOST/arm-eabi-4.4.0], android_toolchain=$withval) AC_ARG_WITH(android-platform, [ --with-android-platform=DIR location of platform dir, default NDK/build/platforms/android-5/arch-arm], android_platform=$withval) -if test "$target" = "arm-android-eabi" ; then +case "$target" in +arm-linux*-android*|*-linuxandroid*) + android_tool_prefix="arm-linux-androideabi" + ;; +arm-android-eabi) + android_tool_prefix="arm-eabi" + ;; +*) + android_tool_prefix="$target_os" + ;; +esac + +case "$target" in +*-android*|*-linuxandroid*) if test -z "$android_ndk" ; then AC_MSG_ERROR([You must specify --with-android-ndk=/path/to/ndk when targeting Android.]) fi if test -z "$android_toolchain" ; then android_toolchain="$android_ndk"/build/prebuilt/`uname -s | tr "[[:upper:]]" "[[:lower:]]"`-x86/arm-eabi-4.4.0 fi if test -z "$android_platform" ; then android_platform="$android_ndk"/build/platforms/android-5/arch-arm fi dnl set up compilers - AS="$android_toolchain"/bin/arm-eabi-as - CC="$android_toolchain"/bin/arm-eabi-gcc - CXX="$android_toolchain"/bin/arm-eabi-g++ - CPP="$android_toolchain"/bin/arm-eabi-cpp - LD="$android_toolchain"/bin/arm-eabi-ld - AR="$android_toolchain"/bin/arm-eabi-ar - RANLIB="$android_toolchain"/bin/arm-eabi-ranlib - STRIP="$android_toolchain"/bin/arm-eabi-strip + AS="$android_toolchain"/bin/"$android_tool_prefix"-as + CC="$android_toolchain"/bin/"$android_tool_prefix"-gcc + CXX="$android_toolchain"/bin/"$android_tool_prefix"-g++ + CPP="$android_toolchain"/bin/"$android_tool_prefix"-cpp + LD="$android_toolchain"/bin/"$android_tool_prefix"-ld + AR="$android_toolchain"/bin/"$android_tool_prefix"-ar + RANLIB="$android_toolchain"/bin/"$android_tool_prefix"-ranlib + STRIP="$android_toolchain"/bin/"$android_tool_prefix"-strip CPPFLAGS="-I$android_platform/usr/include $CPPFLAGS" CFLAGS="-mandroid -I$android_platform/usr/include -msoft-float -fno-short-enums -fno-exceptions $CFLAGS" CXXFLAGS="-mandroid -I$android_platform/usr/include -msoft-float -fpic -fno-short-enums -fno-exceptions $CXXFLAGS" LDFLAGS="-mandroid -L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform $LDFLAGS" dnl prevent cross compile section from using these flags as host flags if test -z "$HOST_CPPFLAGS" ; then @@ -192,17 +205,18 @@ if test "$target" = "arm-android-eabi" ; fi if test -z "$HOST_LDFLAGS" ; then HOST_LDFLAGS=" " fi WRAP_MALLOC_CFLAGS="-Wl,--wrap=dlopen -Wl,--wrap=dlclose -Wl,--wrap=dlerror -Wl,--wrap=dlsym -Wl,--wrap=dladdr" AC_DEFINE(ANDROID) -fi + ;; +esac dnl ======================================================== dnl = dnl = Check options that may affect the compiler dnl = dnl ======================================================== dist_prefix='${MOD_DEPTH}/dist' dist_bindir='${dist_prefix}/bin' @@ -1031,16 +1045,43 @@ case "$target" in OBJECT_MODE=64 else MDCPUCFG_H=_aix32.cfg fi PR_MD_CSRCS=aix.c RESOLVE_LINK_SYMBOLS=1 ;; +*-android*|*-linuxandroid*) + if test -z "$USE_NSPR_THREADS"; then + USE_PTHREADS=1 + IMPL_STRATEGY=_PTH + fi + AC_DEFINE(XP_UNIX) + AC_DEFINE(_GNU_SOURCE) + AC_DEFINE(HAVE_FCNTL_FILE_LOCKING) + AC_DEFINE(LINUX) + CFLAGS="$CFLAGS -Wall" + CXXFLAGS="$CXXFLAGS -Wall" + MDCPUCFG_H=_linux.cfg + PR_MD_CSRCS=linux.c + MKSHLIB='$(CC) $(DSO_LDOPTS) $(WRAP_MALLOC_LIB) -o $@' + DSO_CFLAGS=-fPIC + DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)' + _OPTIMIZE_FLAGS=-O2 + _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that + # combo is not yet good at debugging inlined + # functions (even when using DWARF2 as the + # debugging format) + COMPILER_TAG=_glibc + CPU_ARCH=arm + CPU_ARCH_TAG=_arm + OS_TARGET=Android + ;; + *-beos*) AC_DEFINE(XP_BEOS) AC_DEFINE(BeOS) AC_DEFINE(BEOS) AC_DEFINE(_POSIX_SOURCE) DSO_LDOPTS=-nostart MDCPUCFG_H=_beos.cfg USE_BTHREADS=1 @@ -1556,43 +1597,16 @@ tools are selected during the Xcode/Deve irix5*) ;; *) AC_DEFINE(_PR_HAVE_SGI_PRDA_PROCMASK) ;; esac ;; -arm-android-eabi) - if test -z "$USE_NSPR_THREADS"; then - USE_PTHREADS=1 - IMPL_STRATEGY=_PTH - fi - AC_DEFINE(XP_UNIX) - AC_DEFINE(_GNU_SOURCE) - AC_DEFINE(HAVE_FCNTL_FILE_LOCKING) - AC_DEFINE(LINUX) - CFLAGS="$CFLAGS -Wall" - CXXFLAGS="$CXXFLAGS -Wall" - MDCPUCFG_H=_linux.cfg - PR_MD_CSRCS=linux.c - MKSHLIB='$(CC) $(DSO_LDOPTS) $(WRAP_MALLOC_LIB) -o $@' - DSO_CFLAGS=-fPIC - DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)' - _OPTIMIZE_FLAGS=-O2 - _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that - # combo is not yet good at debugging inlined - # functions (even when using DWARF2 as the - # debugging format) - COMPILER_TAG=_glibc - CPU_ARCH=arm - CPU_ARCH_TAG=_arm - OS_TARGET=Android - ;; - *-linux*|*-gnu*|*-k*bsd*-gnu) if test -z "$USE_NSPR_THREADS"; then USE_PTHREADS=1 IMPL_STRATEGY=_PTH fi AC_DEFINE(XP_UNIX) AC_DEFINE(_GNU_SOURCE) AC_DEFINE(HAVE_FCNTL_FILE_LOCKING) @@ -1664,18 +1678,18 @@ arm-android-eabi) *-mingw*|*-cygwin*|*-msvc*|*-mks*) AC_DEFINE(XP_PC) AC_DEFINE(WIN32) PR_MD_ARCH_DIR=windows RESOLVE_LINK_SYMBOLS=1 if test -n "$GNU_CC"; then - CC="$CC -mno-cygwin" - CXX="$CXX -mno-cygwin" + CC="$CC -mwindows" + CXX="$CXX -mwindows" DLL_SUFFIX=dll MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))' RC=$WINDRES # Use temp file for windres (bug 213281) RCFLAGS='-O coff --use-temp-file' else CC=cl CXX=cl
--- a/nsprpub/pr/src/misc/prnetdb.c +++ b/nsprpub/pr/src/misc/prnetdb.c @@ -2073,17 +2073,17 @@ PR_IMPLEMENT(PRAddrInfo *) PR_GetAddrInf * we do not expose ai_socktype through our API, it is okay to do this * here. the application may still choose to create a socket of some * other type. */ hints.ai_socktype = SOCK_STREAM; rv = GETADDRINFO(hostname, NULL, &hints, &res); #ifdef AI_ADDRCONFIG - if (rv == EAI_BADFLAGS) { + if (rv == EAI_BADFLAGS && (hints.ai_flags & AI_ADDRCONFIG)) { hints.ai_flags &= ~AI_ADDRCONFIG; rv = GETADDRINFO(hostname, NULL, &hints, &res); } #endif if (rv == 0) return (PRAddrInfo *) res; PR_SetError(PR_DIRECTORY_LOOKUP_ERROR, rv);