diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 913 |
1 files changed, 546 insertions, 367 deletions
@@ -39,6 +39,9 @@ ac_help="$ac_help ac_help="$ac_help --enable-mdupdate Enable use of certain compilers' mdupdate feature" ac_help="$ac_help + --enable-macos-target=VER (default=10.1) + Set the minimum MacOS version needed at runtime" +ac_help="$ac_help --enable-strip Enable stripping of shared libs and programs" ac_help="$ac_help --with-pthreads Use system pthreads library as thread subsystem" @@ -614,7 +617,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:618: checking host system type" >&5 +echo "configure:621: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -635,7 +638,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:639: checking target system type" >&5 +echo "configure:642: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -653,7 +656,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:657: checking build system type" >&5 +echo "configure:660: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -677,8 +680,8 @@ test "$host_alias" != "$target_alias" && MOD_MAJOR_VERSION=4 -MOD_MINOR_VERSION=2 -MOD_REVISION_VERSION=0 +MOD_MINOR_VERSION=3 +MOD_PATCH_VERSION=0 NSPR_MODNAME=nspr20 _HAVE_PTHREADS= USE_PTHREADS= @@ -689,6 +692,7 @@ USE_64= USE_CPLUS= USE_IPV6= USE_MDUPDATE= +MACOS_DEPLOYMENT_TARGET= _OPTIMIZE_FLAGS=-O _DEBUG_FLAGS=-g MOZ_DEBUG=1 @@ -700,6 +704,7 @@ NSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall' NOSUCHFILE=/no-such-file LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)' LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)' +CYGWIN_WRAPPER= RESOLVE_LINK_SYMBOLS= @@ -710,16 +715,51 @@ HOST_CFLAGS="${HOST_CFLAGS=}" HOST_LDFLAGS="${HOST_LDFLAGS=}" case "$target" in -*-cygwin*) +*-cygwin*|*-mingw*) # Check to see if we are really running in a msvc environemnt _WIN32_MSVC= - if test "$CC" = "cl" || test "$CXX" = "cl"; then - _WIN32_MSVC=1 - elif test -z "$CC"; then + for ac_prog in 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:727: 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" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$CC" && break +done + + if test "$CC" = "cl"; then echo 'main() { return 0; }' > dummy.c - cl -o dummy dummy.c + ${CC} -o dummy dummy.c >/dev/null 2>&1 if test $? = 0; then _WIN32_MSVC=1 + CXX=$CC + else + echo "configure: warning: $(CC) test failed. Using normal feature tests" 1>&2 fi rm -f dummy dummy.o dummy.obj dummy.exe dummy.c fi @@ -727,7 +767,7 @@ case "$target" in *-msvc*) _WIN32_MSVC=1 ;; -*-mksnt*) +*-mks*) _WIN32_MSVC=1 ;; esac @@ -871,6 +911,15 @@ if test "${enable_mdupdate+set}" = set; then fi +# Check whether --enable-macos-target or --disable-macos-target was given. +if test "${enable_macos_target+set}" = set; then + enableval="$enable_macos_target" + MACOS_DEPLOYMENT_TARGET_STR=$enableval +else + MACOS_DEPLOYMENT_TARGET_STR=10.1 +fi + + case "$target" in *-aix*) @@ -905,6 +954,10 @@ if test -z "$CC"; then CC=cc ;; + *-openvms*) + CC=cc + ;; + *-osf*) CC=cc ;; @@ -945,6 +998,10 @@ if test -z "$CXX"; then CXX=CC ;; + *-openvms*) + CXX=cxx + ;; + *-osf*) CXX=cxx ;; @@ -960,7 +1017,7 @@ 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:964: checking for $ac_word" >&5 +echo "configure:1021: 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 @@ -993,8 +1050,6 @@ else echo "$ac_t""no" 1>&6 fi -elif test -z "$WHOAMI"; then - WHOAMI=whoami fi if test -n "$MOZ_DEBUG"; then @@ -1002,11 +1057,19 @@ if test -n "$MOZ_DEBUG"; then #define DEBUG 1 EOF - cat >> confdefs.h <<EOF -#define DEBUG_`$WHOAMI` 1 -EOF - DEFINES="$DEFINES -UNDEBUG" + + case "${target_os}" in + beos*) + DEFINES="$DEFINES -DDEBUG_${USER}" + ;; + msvc*|mks*|cygwin*|mingw*|os2*) + DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`" + ;; + *) + DEFINES="$DEFINES -DDEBUG_`$WHOAMI`" + ;; + esac else cat >> confdefs.h <<\EOF #define NDEBUG 1 @@ -1025,14 +1088,14 @@ if test "$target" != "$host"; then _SAVE_LDFLAGS="$LDFLAGS" echo $ac_n "checking for $host compiler""... $ac_c" 1>&6 -echo "configure:1029: checking for $host compiler" >&5 +echo "configure:1092: checking for $host compiler" >&5 if test -z "$HOST_CC"; then for ac_prog in 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:1036: checking for $ac_word" >&5 +echo "configure:1099: 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 @@ -1079,16 +1142,16 @@ test -n "$HOST_CC" || HOST_CC="""" LDFLAGS="$HOST_LDFLAGS" echo $ac_n "checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1083: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5 +echo "configure:1146: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5 cat > conftest.$ac_ext <<EOF -#line 1085 "configure" +#line 1148 "configure" #include "confdefs.h" int main() { return(0); ; return 0; } EOF -if { (eval echo configure:1092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1155: \"$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 @@ -1109,7 +1172,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:1113: checking for $ac_word" >&5 +echo "configure:1176: 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 @@ -1144,7 +1207,7 @@ test -n "$CC" || CC="echo" # 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:1148: checking for $ac_word" >&5 +echo "configure:1211: 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 @@ -1174,7 +1237,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:1178: checking for $ac_word" >&5 +echo "configure:1241: 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 @@ -1225,7 +1288,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:1229: checking for $ac_word" >&5 +echo "configure:1292: 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 @@ -1257,7 +1320,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1261: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1324: 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. @@ -1268,12 +1331,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1272 "configure" +#line 1335 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1340: \"$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 @@ -1299,12 +1362,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:1303: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1366: 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:1308: checking whether we are using GNU C" >&5 +echo "configure:1371: 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 @@ -1313,7 +1376,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1317: \"$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:1380: \"$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 @@ -1332,7 +1395,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:1336: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1399: 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 @@ -1369,7 +1432,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:1373: checking for $ac_word" >&5 +echo "configure:1436: 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 @@ -1406,7 +1469,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:1410: checking for $ac_word" >&5 +echo "configure:1473: 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 @@ -1438,7 +1501,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1442: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:1505: 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. @@ -1449,12 +1512,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 1453 "configure" +#line 1516 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:1458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1521: \"$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 @@ -1480,12 +1543,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:1484: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1547: 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:1489: checking whether we are using GNU C++" >&5 +echo "configure:1552: 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 @@ -1494,7 +1557,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1498: \"$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:1561: \"$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 @@ -1513,7 +1576,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:1517: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:1580: 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 @@ -1550,7 +1613,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:1554: checking for $ac_word" >&5 +echo "configure:1617: 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 @@ -1587,7 +1650,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:1591: checking for $ac_word" >&5 +echo "configure:1654: 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 @@ -1624,7 +1687,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:1628: checking for $ac_word" >&5 +echo "configure:1691: 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 @@ -1661,7 +1724,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:1665: checking for $ac_word" >&5 +echo "configure:1728: 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 @@ -1698,7 +1761,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:1702: checking for $ac_word" >&5 +echo "configure:1765: 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 @@ -1729,50 +1792,13 @@ done test -n "$STRIP" || STRIP="echo" fi - if test -z "$DLLTOOL"; then - for ac_prog in "${target_alias}-dlltool" "${target}-dlltool" -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:1739: 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 - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_DLLTOOL="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -DLLTOOL="$ac_cv_prog_DLLTOOL" -if test -n "$DLLTOOL"; then - echo "$ac_t""$DLLTOOL" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$DLLTOOL" && break -done -test -n "$DLLTOOL" || DLLTOOL="echo" - - fi if test -z "$WINDRES"; then for ac_prog in "${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:1776: checking for $ac_word" >&5 +echo "configure:1802: 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 @@ -1810,7 +1836,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:1814: checking for $ac_word" >&5 +echo "configure:1840: 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 @@ -1842,7 +1868,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1846: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:1872: 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. @@ -1853,12 +1879,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 1857 "configure" +#line 1883 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:1862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1888: \"$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 @@ -1884,12 +1910,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:1888: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1914: 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:1893: checking whether we are using GNU C++" >&5 +echo "configure:1919: 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 @@ -1898,7 +1924,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1902: \"$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:1928: \"$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 @@ -1917,7 +1943,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:1921: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:1947: 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 @@ -1954,7 +1980,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1958: checking for $ac_word" >&5 +echo "configure:1984: 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 @@ -1984,7 +2010,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:1988: checking for $ac_word" >&5 +echo "configure:2014: 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 @@ -2035,7 +2061,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:2039: checking for $ac_word" >&5 +echo "configure:2065: 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 @@ -2067,7 +2093,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2071: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2097: 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. @@ -2078,12 +2104,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2082 "configure" +#line 2108 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2113: \"$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 @@ -2109,12 +2135,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:2113: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2139: 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:2118: checking whether we are using GNU C" >&5 +echo "configure:2144: 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 @@ -2123,7 +2149,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2127: \"$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:2153: \"$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 @@ -2142,7 +2168,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:2146: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2172: 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 @@ -2175,7 +2201,7 @@ fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2179: checking how to run the C preprocessor" >&5 +echo "configure:2205: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2190,13 +2216,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 2194 "configure" +#line 2220 "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:2200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2226: \"$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 : @@ -2207,13 +2233,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 2211 "configure" +#line 2237 "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:2217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2243: \"$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 : @@ -2224,13 +2250,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 2228 "configure" +#line 2254 "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:2234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2260: \"$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 : @@ -2257,7 +2283,7 @@ 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:2261: checking for $ac_word" >&5 +echo "configure:2287: 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 @@ -2289,7 +2315,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:2293: checking for $ac_word" >&5 +echo "configure:2319: 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 @@ -2330,7 +2356,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:2334: checking for $ac_word" >&5 +echo "configure:2360: 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 @@ -2371,7 +2397,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:2375: checking for $ac_word" >&5 +echo "configure:2401: 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 @@ -2412,7 +2438,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:2416: checking for $ac_word" >&5 +echo "configure:2442: 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 @@ -2448,53 +2474,12 @@ test -n "$STRIP" && break done test -n "$STRIP" || STRIP="echo not_strip" - for ac_prog in dlltool -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:2457: 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 - case "$DLLTOOL" in - /*) - ac_cv_path_DLLTOOL="$DLLTOOL" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_DLLTOOL="$DLLTOOL" # 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_DLLTOOL="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - ;; -esac -fi -DLLTOOL="$ac_cv_path_DLLTOOL" -if test -n "$DLLTOOL"; then - echo "$ac_t""$DLLTOOL" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$DLLTOOL" && break -done -test -n "$DLLTOOL" || DLLTOOL="echo not_dlltool" - 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:2498: checking for $ac_word" >&5 +echo "configure:2483: 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 @@ -2544,7 +2529,7 @@ fi if test "$GXX" = "yes"; then GNU_CXX=1 fi -if test "`echo | $AS -V 2>&1 | grep -c GNU`" != "0"; then +if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then GNU_AS=1 fi rm -f a.out @@ -2556,10 +2541,10 @@ else fi echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6 -echo "configure:2560: checking for gcc -pipe support" >&5 +echo "configure:2545: 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"); exit(0); }' >> 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 @@ -2571,14 +2556,14 @@ if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then _SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -pipe" cat > conftest.$ac_ext <<EOF -#line 2575 "configure" +#line 2560 "configure" #include "confdefs.h" #include <stdio.h> int main() { printf("Hello World\n"); ; return 0; } EOF -if { (eval echo configure:2582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* _res_gcc_pipe="yes" else @@ -2611,7 +2596,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:2615: checking for $ac_word" >&5 +echo "configure:2600: 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 @@ -2671,12 +2656,21 @@ if test "$OS_ARCH" = "IRIX64"; then OS_ARCH=IRIX fi +if test "$OS_ARCH" = "AIX"; then + OS_RELEASE=`uname -v`.`uname -r` +fi + +if test "$OS_ARCH" = "FreeBSD"; then + OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'` +fi + if test "$OS_ARCH" = "Linux"; then OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'` + OS_RELEASE=`echo $OS_RELEASE | awk -F\. '{ print $1 "." $2 }'` fi -if test "$OS_ARCH" = "POSIX_for_OpenVMS_AXP"; then - OS_ARCH=OpenVMS +if test "$OS_ARCH" = "OpenVMS"; then + OS_RELEASE=`uname -v` fi ####################################################################### @@ -2714,10 +2708,7 @@ elif test "$OS_ARCH" = 'Windows_95'; then elif test "$OS_ARCH" = 'Windows_98'; then OS_ARCH=Windows_NT OS_TARGET=WIN95 -elif test "$OS_ARCH" = "CYGWIN_95-4.0"; then - OS_ARCH='CYGWIN_NT-4.0' - OS_TARGET=WIN95 -elif test "$OS_ARCH" = "CYGWIN_98-4.10"; then +elif test "`echo $OS_ARCH | egrep -c '^(CYGWIN_9|CYGWIN_ME)' 2>/dev/null`" != 0; then OS_ARCH='CYGWIN_NT-4.0' OS_TARGET=WIN95 elif test "$OS_ARCH" = "OS_2"; then @@ -2805,7 +2796,7 @@ OS_CONFIG="${OS_TARGET}${OS_RELEASE}" case "$host" in -*-mingw*|*-cygwin*|*-msvc*|*-mksnt*) +*-mingw*|*-cygwin*|*-msvc*|*-mks*) ;; *-beos*) HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE" @@ -2835,17 +2826,17 @@ EOF DSO_LDOPTS='-brtl -bM:SRE -bnoentry -bexpall' 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:2839: checking for sys/atomic_op.h" >&5 +echo "configure:2830: 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 2844 "configure" +#line 2835 "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:2849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2840: \"$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* @@ -2922,7 +2913,7 @@ EOF EOF cat >> confdefs.h <<\EOF -#define AIX4_3 1 +#define AIX4_3_PLUS 1 EOF cat >> confdefs.h <<\EOF @@ -2946,6 +2937,10 @@ EOF EOF cat >> confdefs.h <<\EOF +#define AIX4_3_PLUS 1 +EOF + + cat >> confdefs.h <<\EOF #define HAVE_SOCKLEN_T 1 EOF @@ -2967,11 +2962,7 @@ EOF MDCPUCFG_H=_aix64.cfg OBJECT_MODE=64 else - if test -n "$USE_IPV6"; then - MDCPUCFG_H=_aix32in6.cfg - else - MDCPUCFG_H=_aix32.cfg - fi + MDCPUCFG_H=_aix32.cfg fi PR_MD_CSRCS=aix.c RESOLVE_LINK_SYMBOLS=1 @@ -3000,10 +2991,50 @@ EOF PR_MD_ARCH_DIR=beos RESOLVE_LINK_SYMBOLS=1 case "${target_cpu}" in - i?86) + 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:3000: 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 3008 "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:3019: \"$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 + OS_LIBS="$OS_LIBS -lbind -lsocket" +else + echo "$ac_t""no" 1>&6 +fi + ;; powerpc) CC=mwcc @@ -3087,7 +3118,7 @@ EOF PR_MD_ASFILES=os_BSD_OS_386_2.s ;; - bsdi4.*) + bsdi4.* | bsdi5.*) cat >> confdefs.h <<\EOF #define _PR_SELECT_CONST_TIMEVAL 1 EOF @@ -3113,7 +3144,7 @@ EOF DSO_LDOPTS='-shared -Wl,-soname,$(@:$(OBJDIR)/%.so=%.so)' STRIP="$STRIP -d" case "$target_os" in - bsdi4.2*) + bsdi4.2* | bsdi4.3* | bsdi5.*) cat >> confdefs.h <<\EOF #define _PR_HAVE_GETPROTO_R 1 EOF @@ -3166,7 +3197,6 @@ EOF CFLAGS="$CFLAGS -Wmost -fno-common" if echo $OS_TEST | grep -c 86 2>/dev/null; then - CFLAGS="$CFLAGS -mno-486" cat >> confdefs.h <<\EOF #define i386 1 EOF @@ -3188,6 +3218,34 @@ EOF USE_PTHREADS=1 MDCPUCFG_H=_darwin.cfg PR_MD_CSRCS=darwin.c + if test "$CPU_ARCH" = "ppc"; then + PR_MD_ASFILES=os_Darwin_ppc.s + fi + + # Add Mac OS X support for loading CFM & CFBundle plugins + if test -f /System/Library/Frameworks/Carbon.framework/Carbon; then + cat >> confdefs.h <<\EOF +#define XP_MACOSX 1 +EOF + + OS_TARGET=MacOSX + + + MACOS_VERSION_MAJOR=`echo $MACOS_DEPLOYMENT_TARGET_STR | cut -d . -f 1` + MACOS_VERSION_MINOR=`echo $MACOS_DEPLOYMENT_TARGET_STR | cut -d . -f 2` + MACOS_VERSION_MICRO=`echo $MACOS_DEPLOYMENT_TARGET_STR | cut -d . -f 3` + if test -z "$MACOS_VERSION_MINOR"; then + MACOS_VERSION_MINOR=0 + fi + if test -z "$MACOS_VERSION_MICRO"; then + MACOS_VERSION_MICRO=0 + fi + MACOS_DEPLOYMENT_TARGET=`printf "%02d%02d%02d" "$MACOS_VERSION_MAJOR" "$MACOS_VERSION_MINOR" "$MACOS_VERSION_MICRO"` + cat >> confdefs.h <<EOF +#define MACOS_DEPLOYMENT_TARGET $MACOS_DEPLOYMENT_TARGET +EOF + + fi ;; *-dgux*) @@ -3249,8 +3307,9 @@ EOF else DLL_SUFFIX=so.1.0 fi + MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' DSO_CFLAGS=-fPIC - DSO_LDOPTS=-Bshareable + DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)' MDCPUCFG_H=_freebsd.cfg PR_MD_CSRCS=freebsd.c ;; @@ -3272,10 +3331,24 @@ EOF #define hppa 1 EOF + # OSF1 and HPUX report the POLLHUP event for a socket when the + # shutdown(SHUT_WR) operation is called for the remote end, even though + # the socket is still writeable. Use select(), instead of poll(), to + # workaround this problem. + cat >> confdefs.h <<\EOF +#define _PR_POLL_WITH_SELECT 1 +EOF + + cat >> confdefs.h <<\EOF +#define _USE_BIG_FDS 1 +EOF + DLL_SUFFIX=sl DSO_LDOPTS='-b +h $(notdir $@)' PR_MD_CSRCS=hpux.c - PR_MD_ASFILES=os_HPUX.s + if test "$OS_TEST" != "ia64"; then + PR_MD_ASFILES=os_HPUX.s + fi if test -n "$USE_64"; then MDCPUCFG_H=_hpux64.cfg else @@ -3284,8 +3357,6 @@ EOF if test -z "$GNU_CC"; then CC="$CC -Ae" CXX="$CXX -ext" - CFLAGS="$CFLAGS +ESlit" - CXXFLAGS="$CXXFLAGS +ESlit" DSO_CFLAGS=+Z else DSO_CFLAGS=-fPIC @@ -3329,13 +3400,22 @@ EOF fi - if echo "$OS_RELEASE" | egrep '^(B.10.30|B.11.00|B.11.11)' >/dev/null; then + if echo "$OS_RELEASE" | egrep '^(B.10.30|B.11)' >/dev/null; then cat >> confdefs.h <<\EOF #define HAVE_POINTER_LOCALTIME_R 1 EOF fi + # HP-UX 11i (B.11.11) or higher + + case "$OS_RELEASE" in + [C-Z]*|B.[2-9]*|B.1[2-9]*|B.11.[2-9]*|B.11.1[1-9]*) + USE_IPV6=1 + ;; + esac + + if test "$OS_RELEASE" = "B.10.01"; then cat >> confdefs.h <<\EOF #define HPUX10 1 @@ -3388,7 +3468,7 @@ EOF DEFAULT_IMPL_STRATEGY=_PTH fi - if echo "$OS_RELEASE" | egrep '^(B.11.00|B.11.11)' >/dev/null; then + if echo "$OS_RELEASE" | grep ^B.11 >/dev/null; then cat >> confdefs.h <<\EOF #define HPUX10 1 EOF @@ -3411,11 +3491,21 @@ EOF if test -z "$GNU_CC"; then if test -z "$USE_64"; then - CFLAGS="$CFLAGS +DAportable +DS2.0" - CXXFLAGS="$CXXFLAGS +DAportable +DS2.0" + if test "$OS_TEST" = "ia64"; then + CFLAGS="$CFLAGS +DD32" + CXXFLAGS="$CXXFLAGS +DD32" + else + CFLAGS="$CFLAGS +DAportable +DS2.0" + CXXFLAGS="$CXXFLAGS +DAportable +DS2.0" + fi else - CFLAGS="$CFLAGS +DA2.0W +DS2.0" - CXXFLAGS="$CXXFLAGS +DA2.0W +DS2.0" + if test "$OS_TEST" = "ia64"; then + CFLAGS="$CFLAGS +DD64" + CXXFLAGS="$CXXFLAGS +DD64" + else + CFLAGS="$CFLAGS +DA2.0W +DS2.0" + CXXFLAGS="$CXXFLAGS +DA2.0W +DS2.0" + fi fi fi DEFAULT_IMPL_STRATEGY=_PTH @@ -3509,7 +3599,7 @@ EOF if test "$USE_MDUPDATE"; then CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)" fi - case "$target}" in + case "${target}" in *-irix6.*) CFLAGS="$CFLAGS -multigot" DSO_LDOPTS="-no_unresolved" @@ -3597,10 +3687,6 @@ EOF #define LINUX 1 EOF - cat >> confdefs.h <<\EOF -#define linux 1 -EOF - CFLAGS="$CFLAGS -ansi -Wall" CXXFLAGS="$CXXFLAGS -ansi -Wall" MDCPUCFG_H=_linux.cfg @@ -3608,8 +3694,11 @@ EOF MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' DSO_CFLAGS=-fPIC DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)' - OS_LIBS="$OS_LIBS -lc" _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 if echo "$OS_TEST" | grep -c 86 >/dev/null; then CPU_ARCH=x86 @@ -3630,7 +3719,7 @@ EOF CFLAGS="$CFLAGS -mieee" CXXFLAGS="$CXXFLAGS -mieee" ;; - i?86) + i*86) cat >> confdefs.h <<\EOF #define i386 1 EOF @@ -3641,19 +3730,13 @@ EOF PR_MD_ASFILES=os_Linux_ia64.s ;; m68k) - CFLAGS="$CFLAGS -m68020-40" - CXXFLAGS="$CXXFLAGS -m68020-40" - # - # gcc on Linux/m68k either has a bug or triggers a code-sequence - # bug in the 68060 which causes gcc to crash. The simplest way to - # avoid this is to enable a minimum level of optimization. - # - _DEBUG_FLAGS="$_DEBUG_FLAGS -O" + CFLAGS="$CFLAGS -m68020-60" + CXXFLAGS="$CXXFLAGS -m68020-60" ;; esac ;; -*-mingw*|*-cygwin*|*-msvc*|*-mksnt*) +*-mingw*|*-cygwin*|*-msvc*|*-mks*) cat >> confdefs.h <<\EOF #define XP_PC 1 EOF @@ -3664,13 +3747,18 @@ EOF PR_MD_ARCH_DIR=windows RESOLVE_LINK_SYMBOLS=1 + NSINSTALL='$(CYGWIN_WRAPPER) nsinstall' + if test `echo "${PATH}" | grep -c \;` = 0; then + CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper' + fi if test -n "$GNU_CC"; then - cat >> confdefs.h <<\EOF -#define NONAMELESSUNION 1 -EOF - - MKSHLIB='$(DLLTOOL) --as=$(AS) -k --dllname $*.dll --output-lib $@' + CC="$CC -mno-cygwin" + CXX="$CXX -mno-cygwin" + DLL_SUFFIX=dll + MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))' + RC=$WINDRES + RCFLAGS='-O coff' else CC=cl CXX=cl @@ -3679,12 +3767,11 @@ EOF AR_FLAGS= RANLIB='echo not_ranlib' STRIP='echo not_strip' - NSINSTALL=nsinstall RC=rc.exe GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb' - OBJ_SUFFIX=obj - LIB_SUFFIX=lib - DLL_SUFFIX=dll + OBJ_SUFFIX=obj + LIB_SUFFIX=lib + DLL_SUFFIX=dll CFLAGS="$CFLAGS -W3 -nologo -GF -Gy" @@ -3756,6 +3843,8 @@ EOF #define WIN95 1 EOF + # undefine WINNT as some versions of mingw gcc define it by default + DEFINES="$DEFINES -UWINNT" cat >> confdefs.h <<\EOF #define _PR_GLOBAL_THREADS_ONLY 1 EOF @@ -3790,7 +3879,7 @@ EOF esac case "$target_cpu" in - i?86) + i*86) cat >> confdefs.h <<\EOF #define _X86_ 1 EOF @@ -4059,31 +4148,19 @@ EOF EOF cat >> confdefs.h <<\EOF -#define VMS_AS_IS 1 -EOF - - cat >> confdefs.h <<\EOF -#define _SOCKADDR_LEN 1 -EOF - - cat >> confdefs.h <<\EOF -#define GENERIC_PTHREAD_REDEFINES 1 +#define PR_GETIPNODE_NOT_THREADSAFE 1 EOF RESOLVE_LINK_SYMBOLS=1 - CROSS_COMPILE=1 - _HAVE_PTHREADS=1 - HOST_CC=c89 - HOST_CXX=cxx - HOST_CFLAGS=-O - HOST_CXXFLAGS=-O - CC=ccc - CXX=ccc - CFLAGS="$CFLAGS -Wc,names=\(short,as\)" - CXXFLAGS="$CXXFLAGS -Wc,names=\(short,as\)" + AR_FLAGS='c $@' MDCPUCFG_H=_openvms.cfg PR_MD_CSRCS=openvms.c - MKSHLIB='vmsld $(OPTIMIZER)' + DSO_LDOPTS='-shared -auto_symvec $(LDFLAGS)' + if test -n "$MOZ_DEBUG"; then + DSO_LDOPTS="$DSO_LDOPTS $_DEBUG_FLAGS" + else + DSO_LDOPTS="$DSO_LDOPTS $_OPTIMIZE_FLAGS" + fi ;; *-osf*) @@ -4100,19 +4177,38 @@ EOF #define _REENTRANT 1 EOF - ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'` + # OSF1 and HPUX report the POLLHUP event for a socket when the + # shutdown(SHUT_WR) operation is called for the remote end, even though + # the socket is still writeable. Use select(), instead of poll(), to + # workaround this problem. + cat >> confdefs.h <<\EOF +#define _PR_POLL_WITH_SELECT 1 +EOF + + + if echo "$OS_RELEASE" | egrep -c '(V2.0|V3.2)' 2>/dev/null ; then + USE_NSPR_THREADS=1 + fi + + 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:4106: checking for machine/builtins.h" >&5 +echo "configure:4202: 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 4111 "configure" +#line 4207 "configure" #include "confdefs.h" #include <machine/builtins.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4212: \"$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* @@ -4136,17 +4232,9 @@ else echo "$ac_t""no" 1>&6 fi - - if echo "$OS_RELEASE" | egrep -c '(V2.0|V3.2)' 2>/dev/null ; then - USE_NSPR_THREADS=1 - fi - - 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" + else + CFLAGS="$CFLAGS -mieee" + CXXFLAGS="$CXXFLAGS -mieee" fi if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then @@ -4355,11 +4443,18 @@ EOF MDCPUCFG_H=_solaris32.cfg fi PR_MD_CSRCS=solaris.c - DSO_LDOPTS='-G -h $(notdir $@)' + LD=/usr/ccs/bin/ld + MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' + RESOLVE_LINK_SYMBOLS=1 if test -n "$GNU_CC"; then DSO_CFLAGS=-fPIC + if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then + GCC_USE_GNU_LD=1 + fi + DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs' else DSO_CFLAGS=-KPIC + DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs' fi if test -z "$GNU_AS"; then ASFLAGS="$ASFLAGS -Wa,-P" @@ -4372,12 +4467,13 @@ EOF CXXFLAGS="$CXXFLAGS -MDupdate \$(DEPENDENCIES)" fi else - CC="$CC -xstrconst" - CXX="$CXX -Qoption cg -xstrconst" + CFLAGS="$CFLAGS -xstrconst" + CXXFLAGS="$CXXFLAGS -Qoption cg -xstrconst" if test -z "$MOZ_OPTIMIZE"; then CFLAGS="$CFLAGS -xs" CXXFLAGS="$CXXFLAGS -xs" fi + _OPTIMIZE_FLAGS=-xO4 fi if test -n "$USE_64" && test -z "$GNU_CC"; then CC="$CC -xarch=v9" @@ -4443,11 +4539,14 @@ EOF # 64-bit Solaris requires SPARC V9 architecture, so the following # is not needed. if test -z "$USE_64"; then - ULTRASPARC_LIBRARY=ultrasparc - ULTRASPARC_FILTER_LIBRARY=libatomic.so - DSO_LDOPTS="$DSO_LDOPTS -f "'$(ULTRASPARC_FILTER_LIBRARY)' + ULTRASPARC_LIBRARY=nspr_flt fi fi + # Purify requires that binaries linked against nspr also + # be linked against -lrt (or -lposix4) so add it to OS_LIBS + _rev=`uname -r` + _librt=`echo $_rev 5.6 | awk '{ if ($1 > $2) print "-lrt"; else print "-lposix4" }'` + OS_LIBS="$OS_LIBS $_librt" ;; *-sco-sysv5*) @@ -4502,22 +4601,19 @@ EOF EOF cat >> confdefs.h <<\EOF -#define BSD_SELECT 1 +#define XP_PC 1 EOF cat >> confdefs.h <<\EOF -#define XP_PC 1 +#define BSD_SELECT 1 EOF cat >> confdefs.h <<\EOF #define _PR_GLOBAL_THREADS_ONLY 1 EOF - OBJ_SUFFIX=obj LIB_SUFFIX=lib DLL_SUFFIX=dll - ASM_SUFFIX=asm - DLLTOOL='' RC=rc.exe PR_MD_ARCH_DIR=os2 PROG_SUFFIX=.exe @@ -4526,7 +4622,7 @@ EOF RESOLVE_LINK_SYMBOLS=1 # EMX/GCC build - if test "$GNU_CC"; then + if test -n "$GNU_CC"; then cat >> confdefs.h <<\EOF #define XP_OS2_EMX 1 EOF @@ -4537,29 +4633,30 @@ EOF AR=emxomfar AR_FLAGS='-p256 r $@' - CFLAGS="-Zmtd -Zomf" - HOST_CFLAGS="$CFLAGS" - CXXFLAGS="-Zmtd -Zomf" + CFLAGS="$CFLAGS -Wall -Zmtd -Zomf" + CXXFLAGS="$CFLAGS -Wall -Zmtd -Zomf" + MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' + DSO_CFLAGS= + DSO_LDOPTS='-Zomf -Zdll -Zmtd' + _OPTIMIZE_FLAGS="-O2 -s" + _DEBUG_FLAGS="-g -fno-inline" + if test -n "$MOZ_OPTIMIZE"; then + DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA" + fi OS_LIBS="-lsocket -lemxio" - LD='$(CC)' IMPLIB='emximp -o' - FILTER='emxexp' - OS_DLLFLAGS='$(DSO_LDOPTS) -o $@' - _OPTIMIZE_FLAGS=-O3 - _DEBUG_FLAGS=-g - if test -n "$MOZ_DEBUG"; then - DLLFLAGS='-g' - EXEFLAGS='-g $(OMF_FLAG) -Zmtd -L$(DIST)/lib -o $@' - DSO_LDOPTS='-g -Zomf -Zdll -Zmt -Zcrtdll -Zlinker /NOO' - else - DLLFLAGS= - EXEFLAGS='-Zmtd -o $@' - DSO_LDOPTS='-Zomf -Zdll -Zmt -Zcrtdll -Zlinker /NOO' + FILTER='emxexp -o' + + if test -z "$EMXOMFLD_LINKER"; then + # using LINK386.EXE + DSO_LDOPTS="$DSO_LDOPTS -Zlinker /NOO" fi - fi - + + # GCC for OS/2 currently predefines these, but we don't want them + DEFINES="$DEFINES -Uunix -U__unix -U__unix__" + # Visual Age C++ build - if test "$VACPP" = "yes"; then + elif test "$VACPP" = "yes"; then cat >> confdefs.h <<\EOF #define XP_OS2_VACPP 1 EOF @@ -4576,8 +4673,10 @@ EOF #define _X86_ 1 EOF + OBJ_SUFFIX=obj AS=alp ASFLAGS='-Mb' + ASM_SUFFIX=asm AR=-ilib AR_FLAGS='/NOL /NOI /O:$(subst /,\\,$@)' CFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9' @@ -4590,7 +4689,7 @@ EOF MKSHLIB='$(LD) $(DSO_LDOPTS)' IMPLIB='implib -nologo -noignorecase' FILTER='cppfilt -q -B -P' - _OPTIMIZE_FLAGS='/O+ /Gl+ /Gx+ /qtune=pentium /qarch=pentium' + _OPTIMIZE_FLAGS='/O+ /Gl+ /qtune=pentium /qarch=pentium' _DEBUG_FLAGS='/Ti+ ' LDFLAGS='/NOL /M /L' DLLFLAGS='/O:$@ /DLL /INC:_dllentry /MAP:$(@:.dll=.map) /L /NOL' @@ -4621,55 +4720,14 @@ esac if test -z "$SKIP_LIBRARY_CHECKS"; then -echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -echo "configure:4626: checking for dlopen" >&5 -if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 4631 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen(); 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 dlopen(); - -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_dlopen) || defined (__stub___dlopen) -choke me -#else -dlopen(); -#endif -; return 0; } -EOF -if { (eval echo configure:4654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_dlopen=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_dlopen=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:4673: checking for dlopen in -ldl" >&5 +case $target in +*-darwin*) + ;; +*) + echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +echo "configure:4731: 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 @@ -4677,7 +4735,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <<EOF -#line 4681 "configure" +#line 4739 "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 @@ -4688,7 +4746,7 @@ int main() { dlopen() ; return 0; } EOF -if { (eval echo configure:4692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4750: \"$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 @@ -4703,26 +4761,58 @@ 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:4767: 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 4772 "configure" +#include "confdefs.h" +#include <dlfcn.h> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4777: \"$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 OS_LIBS="-ldl $OS_LIBS" else echo "$ac_t""no" 1>&6 fi - +else + echo "$ac_t""no" 1>&6 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:4720: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:4810: 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 4726 "configure" +#line 4816 "configure" #include "confdefs.h" #include <sgtty.h> Autoconf TIOCGETP @@ -4740,7 +4830,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext <<EOF -#line 4744 "configure" +#line 4834 "configure" #include "confdefs.h" #include <termio.h> Autoconf TCGETA @@ -4764,12 +4854,12 @@ fi for ac_func in lchown strerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4768: checking for $ac_func" >&5 +echo "configure:4858: 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 4773 "configure" +#line 4863 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4792,7 +4882,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4886: \"$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 @@ -4826,20 +4916,55 @@ if test "${enable_strip+set}" = set; then 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:4925: 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 + if test -z "`egrep -i '(unrecognize|unknown)' conftest.out`"; then + ac_cv_hpux_usable_olit_option=yes + fi + fi + rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_hpux_usable_olit_option" 1>&6 + + if test "$ac_cv_hpux_usable_olit_option" = "yes"; then + CFLAGS="$CFLAGS +Olit=all" + CXXFLAGS="$CXXFLAGS +Olit=all" + else + CFLAGS="$CFLAGS +ESlit" + CXXFLAGS="$CXXFLAGS +ESlit" + fi +fi +;; +esac + echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:4834: checking for pthread_create in -lpthreads" >&5 +echo "configure:4959: checking for pthread_create in -lpthreads" >&5 echo " #include <pthread.h> - void *foo(void *v) { int a = 1; } + void *foo(void *v) { return v; } int main() { pthread_t t; if (!pthread_create(&t, 0, &foo, 0)) { pthread_join(t, 0); } - exit(0); + return 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; @@ -4852,16 +4977,16 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:4856: checking for pthread_create in -lpthread" >&5 +echo "configure:4981: checking for pthread_create in -lpthread" >&5 echo " #include <pthread.h> - void *foo(void *v) { int a = 1; } + void *foo(void *v) { return v; } int main() { pthread_t t; if (!pthread_create(&t, 0, &foo, 0)) { pthread_join(t, 0); } - exit(0); + return 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; @@ -4874,16 +4999,16 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:4878: checking for pthread_create in -lc_r" >&5 +echo "configure:5003: checking for pthread_create in -lc_r" >&5 echo " #include <pthread.h> - void *foo(void *v) { int a = 1; } + void *foo(void *v) { return v; } int main() { pthread_t t; if (!pthread_create(&t, 0, &foo, 0)) { pthread_join(t, 0); } - exit(0); + return 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; @@ -4896,16 +5021,16 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -echo "configure:4900: checking for pthread_create in -lc" >&5 +echo "configure:5025: checking for pthread_create in -lc" >&5 echo " #include <pthread.h> - void *foo(void *v) { int a = 1; } + void *foo(void *v) { return v; } int main() { pthread_t t; if (!pthread_create(&t, 0, &foo, 0)) { pthread_join(t, 0); } - exit(0); + return 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; @@ -4946,7 +5071,7 @@ if test "${with_pthreads+set}" = set; then _PTHREAD_LDFLAGS= fi else - if test -n "$_HAVE_PTHREADS" && test -z "$USE_USER_PTHREADS" && test -z "$USER_NSPR_THREADS"; then + if test -n "$_HAVE_PTHREADS" && test -z "$USE_USER_PTHREADS" && test -z "$USE_NSPR_THREADS"; then USE_PTHREADS=1 USE_USER_PTHREADS= USE_NSPR_THREADS= @@ -5024,6 +5149,8 @@ if test "${enable_ipv6+set}" = set; then enableval="$enable_ipv6" if test "$enableval" = "yes"; then USE_IPV6=1 + else + USE_IPV6= fi fi @@ -5046,14 +5173,21 @@ 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:5050: checking whether ${CC-cc} accepts -pthread" >&5 +echo "configure:5177: 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" + case "$target_os" in + freebsd*) +# Freebsd doesn't use -pthread for compiles, it uses them for linking + ;; + *) + CFLAGS="$CFLAGS -pthread" + CXXFLAGS="$CXXFLAGS -pthread" + ;; + esac fi fi rm -f conftest* @@ -5062,7 +5196,7 @@ echo "configure:5050: checking whether ${CC-cc} accepts -pthread" >&5 ac_cv_have_dash_pthreads=no if test "$ac_cv_have_dash_pthread" = "no"; then echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6 -echo "configure:5066: checking whether ${CC-cc} accepts -pthreads" >&5 +echo "configure:5200: 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 @@ -5082,7 +5216,22 @@ echo "configure:5066: checking whether ${CC-cc} accepts -pthreads" >&5 _PTHREAD_LDFLAGS= fi ;; - *-freebsd*|*-openbsd*|*-bsdi*|*-netbsd*) + *-freebsd*) + 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="-pthread" + else + _PTHREAD_LDFLAGS="-lc_r" + fi + ;; + *-openbsd*|*-bsdi*|*-netbsd*) cat >> confdefs.h <<\EOF #define _THREAD_SAFE 1 EOF @@ -5147,6 +5296,20 @@ EOF fi ;; + *) + if test -z "$USE_NSPR_THREADS"; then + cat >> confdefs.h <<\EOF +#define HAVE_POINTER_LOCALTIME_R 1 +EOF + + fi + if test -n "$USE_PTHREADS"; then + cat >> confdefs.h <<\EOF +#define _PR_HAVE_THREADSAFE_GETHOST 1 +EOF + + fi + ;; esac ;; *-bsdi*) @@ -5222,12 +5385,12 @@ EOF fi ;; -*-mingw*|*-cygwin*|*-msvc*|*-mksnt*) +*-mingw*|*-cygwin*|*-msvc*|*-mks*) USE_PTHREADS= _PTHREAD_LDFLAGS= USE_USER_PTHREADS= ;; -*-netbsd*) +*-netbsd*|*-openbsd*) if test -n "$USE_NSPR_THREADS"; then cat >> confdefs.h <<\EOF #define _PR_LOCAL_THREADS_ONLY 1 @@ -5328,6 +5491,15 @@ fi RELEASE_OBJDIR_NAME="${OS_CONFIG}${CPU_ARCH_TAG}${COMPILER_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}.${OBJDIR_SUFFIX}" +case "$target_os" in +mingw*|cygwin*|msvc*|mks*) + CC="\$(CYGWIN_WRAPPER) $CC" + CXX="\$(CYGWIN_WRAPPER) $CXX" + RC="\$(CYGWIN_WRAPPER) $RC" + ;; +esac + + @@ -5430,6 +5602,11 @@ lib/libc/Makefile lib/libc/include/Makefile lib/libc/src/Makefile lib/tests/Makefile +pkg/Makefile +pkg/linux/Makefile +pkg/solaris/Makefile +pkg/solaris/SUNWpr/Makefile +pkg/solaris/SUNWprx/Makefile pr/Makefile pr/include/Makefile pr/include/md/Makefile @@ -5620,20 +5797,19 @@ s%@build_alias@%$build_alias%g s%@build_cpu@%$build_cpu%g s%@build_vendor@%$build_vendor%g s%@build_os@%$build_os%g +s%@CC@%$CC%g s%@dist_prefix@%$dist_prefix%g s%@dist_bindir@%$dist_bindir%g s%@dist_includedir@%$dist_includedir%g s%@dist_libdir@%$dist_libdir%g s%@WHOAMI@%$WHOAMI%g s%@HOST_CC@%$HOST_CC%g -s%@CC@%$CC%g s%@CXX@%$CXX%g s%@RANLIB@%$RANLIB%g s%@AR@%$AR%g s%@AS@%$AS%g s%@LD@%$LD%g s%@STRIP@%$STRIP%g -s%@DLLTOOL@%$DLLTOOL%g s%@WINDRES@%$WINDRES%g s%@CPP@%$CPP%g s%@PERL@%$PERL%g @@ -5641,6 +5817,7 @@ s%@SHELL_OVERRIDE@%$SHELL_OVERRIDE%g s%@MOZILLA_CLIENT@%$MOZILLA_CLIENT%g s%@HOST_CFLAGS@%$HOST_CFLAGS%g s%@GNU_CC@%$GNU_CC%g +s%@GCC_USE_GNU_LD@%$GCC_USE_GNU_LD%g s%@CROSS_COMPILE@%$CROSS_COMPILE%g s%@MOZ_OPTIMIZE@%$MOZ_OPTIMIZE%g s%@USE_CPLUS@%$USE_CPLUS%g @@ -5659,7 +5836,7 @@ s%@LIBNSPR@%$LIBNSPR%g s%@LIBPLC@%$LIBPLC%g s%@MOD_MAJOR_VERSION@%$MOD_MAJOR_VERSION%g s%@MOD_MINOR_VERSION@%$MOD_MINOR_VERSION%g -s%@MOD_REVISION_VERSION@%$MOD_REVISION_VERSION%g +s%@MOD_PATCH_VERSION@%$MOD_PATCH_VERSION%g s%@NSPR_MODNAME@%$NSPR_MODNAME%g s%@MDCPUCFG_H@%$MDCPUCFG_H%g s%@PR_MD_CSRCS@%$PR_MD_CSRCS%g @@ -5677,6 +5854,7 @@ s%@OS_TARGET@%$OS_TARGET%g s%@OS_ARCH@%$OS_ARCH%g s%@OS_RELEASE@%$OS_RELEASE%g s%@OS_TEST@%$OS_TEST%g +s%@MACOS_DEPLOYMENT_TARGET@%$MACOS_DEPLOYMENT_TARGET%g s%@DEFINES@%$DEFINES%g s%@AR_FLAGS@%$AR_FLAGS%g s%@ASFLAGS@%$ASFLAGS%g @@ -5688,16 +5866,17 @@ s%@AIX_LINK_OPTS@%$AIX_LINK_OPTS%g s%@NOSUCHFILE@%$NOSUCHFILE%g s%@MOZ_OBJFORMAT@%$MOZ_OBJFORMAT%g s%@ULTRASPARC_LIBRARY@%$ULTRASPARC_LIBRARY%g -s%@ULTRASPARC_FILTER_LIBRARY@%$ULTRASPARC_FILTER_LIBRARY%g s%@OBJDIR@%$OBJDIR%g s%@OBJDIR_NAME@%$OBJDIR_NAME%g s%@RELEASE_OBJDIR_NAME@%$RELEASE_OBJDIR_NAME%g s%@NSINSTALL@%$NSINSTALL%g s%@OPTIMIZER@%$OPTIMIZER%g s%@RC@%$RC%g +s%@RCFLAGS@%$RCFLAGS%g s%@DLLFLAGS@%$DLLFLAGS%g s%@EXEFLAGS@%$EXEFLAGS%g s%@OS_DLLFLAGS@%$OS_DLLFLAGS%g +s%@CYGWIN_WRAPPER@%$CYGWIN_WRAPPER%g CEOF EOF |