summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseawood%netscape.com <devnull@localhost>2004-04-12 22:25:52 +0000
committerseawood%netscape.com <devnull@localhost>2004-04-12 22:25:52 +0000
commit7667c3a91c3c01999f52a95a8686752b91b670ab (patch)
tree61af73a68067c73df69c2f63b5857959cf016b76
parent67d9ab0713c7532eb33bd04eba71efbb8486ece4 (diff)
downloadnspr-hg-7667c3a91c3c01999f52a95a8686752b91b670ab.tar.gz
Add support for cross-compiling to i386-mingw32.
Bug #222013 r=wtc
-rw-r--r--config/Makefile.in4
-rw-r--r--config/config.mk4
-rwxr-xr-xconfigure280
-rw-r--r--configure.in77
4 files changed, 176 insertions, 189 deletions
diff --git a/config/Makefile.in b/config/Makefile.in
index 2e07307a..b509ae9a 100644
--- a/config/Makefile.in
+++ b/config/Makefile.in
@@ -59,7 +59,7 @@ CSRCS += nsinstall.c
PLSRCS = nfspwd.pl
endif
-ifeq (,$(filter-out WINNT OS2,$(OS_ARCH)))
+ifeq (,$(CROSS_COMPILE)$(filter-out WINNT OS2,$(OS_ARCH)))
PROG_SUFFIX = .exe
else
PROG_SUFFIX =
@@ -110,7 +110,7 @@ include $(topsrcdir)/config/rules.mk
PROGS = $(OBJDIR)/now$(PROG_SUFFIX)
-ifeq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
+ifeq (,$(CROSS_COMPILE)$(filter-out OS2 WINNT,$(OS_ARCH)))
TARGETS = $(PROGS)
else
PROGS += $(OBJDIR)/nsinstall$(PROG_SUFFIX)
diff --git a/config/config.mk b/config/config.mk
index 815291a1..f66a608d 100644
--- a/config/config.mk
+++ b/config/config.mk
@@ -80,7 +80,7 @@ ifeq ($(OS_ARCH),Darwin)
PWD := $(shell pwd)
endif
-ifneq (,$(filter WINNT OS2, $(OS_ARCH)))
+ifeq (,$(CROSS_COMPILE)$(filter-out WINNT OS2, $(OS_ARCH)))
INSTALL = $(NSINSTALL)
else
ifeq ($(NSDISTMODE),copy)
@@ -99,7 +99,7 @@ else
INSTALL = $(NSINSTALL) -R
endif
endif
-endif # WINNT || OS2
+endif # (WINNT || OS2) && !CROSS_COMPILE
DEPENDENCIES = $(OBJDIR)/.md
diff --git a/configure b/configure
index 7ad8f48b..ede750ec 100755
--- a/configure
+++ b/configure
@@ -1089,13 +1089,12 @@ if test "$target" != "$host"; then
echo $ac_n "checking for $host compiler""... $ac_c" 1>&6
echo "configure:1092: checking for $host compiler" >&5
- if test -z "$HOST_CC"; then
- for ac_prog in gcc cc /usr/ucb/cc
+ 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:1099: checking for $ac_word" >&5
+echo "configure:1098: 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
@@ -1125,16 +1124,15 @@ test -n "$HOST_CC" && break
done
test -n "$HOST_CC" || HOST_CC=""""
- if test -z "$HOST_CC"; then
- { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
- fi
+ if test -z "$HOST_CC"; then
+ { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi
echo "$ac_t""$HOST_CC" 1>&6
if test -z "$HOST_CFLAGS"; then
- HOST_CFLAGS="$CFLAGS"
+ HOST_CFLAGS="$CFLAGS"
fi
if test -z "$HOST_LDFLAGS"; then
- HOST_LDFLAGS="$LDFLAGS"
+ HOST_LDFLAGS="$LDFLAGS"
fi
CC="$HOST_CC"
@@ -1142,16 +1140,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:1146: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
+echo "configure:1144: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
cat > conftest.$ac_ext <<EOF
-#line 1148 "configure"
+#line 1146 "configure"
#include "confdefs.h"
int main() {
return(0);
; return 0; }
EOF
-if { (eval echo configure:1155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1153: \"$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
@@ -1161,18 +1159,17 @@ else
{ echo "configure: error: installation or configuration problem: $host compiler $HOST_CC cannot create executables." 1>&2; exit 1; }
fi
rm -f conftest*
-
+
CC=$_SAVE_CC
CFLAGS=$_SAVE_CFLAGS
LDFLAGS=$_SAVE_LDFLAGS
- if test -z "$CC"; then
- for ac_prog in "${target_alias}-gcc" "${target}-gcc"
+ 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:1176: checking for $ac_word" >&5
+echo "configure:1173: 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
@@ -1202,12 +1199,11 @@ test -n "$CC" && break
done
test -n "$CC" || CC="echo"
- fi
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:1211: checking for $ac_word" >&5
+echo "configure:1207: 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
@@ -1237,7 +1233,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:1241: checking for $ac_word" >&5
+echo "configure:1237: 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
@@ -1288,7 +1284,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:1292: checking for $ac_word" >&5
+echo "configure:1288: 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
@@ -1320,7 +1316,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1324: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1320: 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.
@@ -1331,12 +1327,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 1335 "configure"
+#line 1331 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1336: \"$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
@@ -1362,12 +1358,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:1366: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1362: 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:1371: checking whether we are using GNU C" >&5
+echo "configure:1367: 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
@@ -1376,7 +1372,7 @@ else
yes;
#endif
EOF
-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
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1376: \"$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
@@ -1395,7 +1391,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:1399: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1395: 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
@@ -1426,13 +1422,12 @@ else
fi
fi
- if test -z "$CXX"; then
- for ac_prog in "${target_alias}-g++" "${target}-g++"
+ 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:1436: checking for $ac_word" >&5
+echo "configure:1431: 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
@@ -1462,14 +1457,13 @@ test -n "$CXX" && break
done
test -n "$CXX" || CXX="echo"
- fi
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:1473: checking for $ac_word" >&5
+echo "configure:1467: 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
@@ -1501,7 +1495,7 @@ test -n "$CXX" || CXX="gcc"
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1505: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:1499: 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.
@@ -1512,12 +1506,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext << EOF
-#line 1516 "configure"
+#line 1510 "configure"
#include "confdefs.h"
int main(){return(0);}
EOF
-if { (eval echo configure:1521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1515: \"$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
@@ -1543,12 +1537,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:1547: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1541: 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:1552: checking whether we are using GNU C++" >&5
+echo "configure:1546: 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
@@ -1557,7 +1551,7 @@ else
yes;
#endif
EOF
-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
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1555: \"$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
@@ -1576,7 +1570,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:1580: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1574: 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
@@ -1617,7 +1611,7 @@ for ac_declaration in \
'void exit (int);'
do
cat > conftest.$ac_ext <<EOF
-#line 1621 "configure"
+#line 1615 "configure"
#include "confdefs.h"
#include <stdlib.h>
$ac_declaration
@@ -1625,7 +1619,7 @@ int main() {
exit (42);
; return 0; }
EOF
-if { (eval echo configure:1629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
:
else
echo "configure: failed program was:" >&5
@@ -1635,14 +1629,14 @@ else
fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 1639 "configure"
+#line 1633 "configure"
#include "confdefs.h"
$ac_declaration
int main() {
exit (42);
; return 0; }
EOF
-if { (eval echo configure:1646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
break
else
@@ -1658,13 +1652,12 @@ if test -n "$ac_declaration"; then
fi
- if test -z "$RANLIB"; then
- for ac_prog in "${target_alias}-ranlib" "${target}-ranlib"
+ 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:1668: checking for $ac_word" >&5
+echo "configure:1661: 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
@@ -1694,14 +1687,12 @@ test -n "$RANLIB" && break
done
test -n "$RANLIB" || RANLIB="echo"
- fi
- if test -z "$AR"; then
- for ac_prog in "${target_alias}-ar" "${target}-ar"
+ 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:1705: checking for $ac_word" >&5
+echo "configure:1696: 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
@@ -1731,14 +1722,12 @@ test -n "$AR" && break
done
test -n "$AR" || AR="echo"
- fi
- if test -z "$AS"; then
- for ac_prog in "${target_alias}-as" "${target}-as"
+ 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:1742: checking for $ac_word" >&5
+echo "configure:1731: 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
@@ -1768,14 +1757,12 @@ test -n "$AS" && break
done
test -n "$AS" || AS="echo"
- fi
- if test -z "$LD"; then
- for ac_prog in "${target_alias}-ld" "${target}-ld"
+ 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:1779: checking for $ac_word" >&5
+echo "configure:1766: 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
@@ -1805,14 +1792,12 @@ test -n "$LD" && break
done
test -n "$LD" || LD="echo"
- fi
- if test -z "$STRIP"; then
- for ac_prog in "${target_alias}-strip" "${target}-strip"
+ 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:1816: checking for $ac_word" >&5
+echo "configure:1801: 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
@@ -1842,14 +1827,12 @@ test -n "$STRIP" && break
done
test -n "$STRIP" || STRIP="echo"
- fi
- if test -z "$WINDRES"; then
- for ac_prog in "${target_alias}-windres" "${target}-windres"
+ 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:1853: checking for $ac_word" >&5
+echo "configure:1836: 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
@@ -1879,7 +1862,6 @@ test -n "$WINDRES" && break
done
test -n "$WINDRES" || WINDRES="echo"
- fi
else
for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
@@ -1887,7 +1869,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:1891: checking for $ac_word" >&5
+echo "configure:1873: 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
@@ -1919,7 +1901,7 @@ test -n "$CXX" || CXX="gcc"
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1923: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:1905: 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.
@@ -1930,12 +1912,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext << EOF
-#line 1934 "configure"
+#line 1916 "configure"
#include "confdefs.h"
int main(){return(0);}
EOF
-if { (eval echo configure:1939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1921: \"$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
@@ -1961,12 +1943,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:1965: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1947: 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:1970: checking whether we are using GNU C++" >&5
+echo "configure:1952: 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
@@ -1975,7 +1957,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1979: \"$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:1961: \"$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
@@ -1994,7 +1976,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:1998: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1980: 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
@@ -2035,7 +2017,7 @@ for ac_declaration in \
'void exit (int);'
do
cat > conftest.$ac_ext <<EOF
-#line 2039 "configure"
+#line 2021 "configure"
#include "confdefs.h"
#include <stdlib.h>
$ac_declaration
@@ -2043,7 +2025,7 @@ int main() {
exit (42);
; return 0; }
EOF
-if { (eval echo configure:2047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
:
else
echo "configure: failed program was:" >&5
@@ -2053,14 +2035,14 @@ else
fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 2057 "configure"
+#line 2039 "configure"
#include "confdefs.h"
$ac_declaration
int main() {
exit (42);
; return 0; }
EOF
-if { (eval echo configure:2064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
break
else
@@ -2082,7 +2064,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:2086: checking for $ac_word" >&5
+echo "configure:2068: 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
@@ -2112,7 +2094,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:2116: checking for $ac_word" >&5
+echo "configure:2098: 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
@@ -2163,7 +2145,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:2167: checking for $ac_word" >&5
+echo "configure:2149: 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
@@ -2195,7 +2177,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2199: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2181: 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.
@@ -2206,12 +2188,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 2210 "configure"
+#line 2192 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2197: \"$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
@@ -2237,12 +2219,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:2241: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2223: 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:2246: checking whether we are using GNU C" >&5
+echo "configure:2228: 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
@@ -2251,7 +2233,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2255: \"$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:2237: \"$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
@@ -2270,7 +2252,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:2274: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2256: 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
@@ -2303,7 +2285,7 @@ fi
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2307: checking how to run the C preprocessor" >&5
+echo "configure:2289: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2318,13 +2300,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 2322 "configure"
+#line 2304 "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:2328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2310: \"$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
:
@@ -2335,13 +2317,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2339 "configure"
+#line 2321 "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:2345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2327: \"$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
:
@@ -2352,13 +2334,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2356 "configure"
+#line 2338 "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:2362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2344: \"$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
:
@@ -2385,7 +2367,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:2389: checking for $ac_word" >&5
+echo "configure:2371: 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
@@ -2417,7 +2399,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:2421: checking for $ac_word" >&5
+echo "configure:2403: 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
@@ -2458,7 +2440,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:2462: checking for $ac_word" >&5
+echo "configure:2444: 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
@@ -2499,7 +2481,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:2503: checking for $ac_word" >&5
+echo "configure:2485: 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
@@ -2540,7 +2522,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:2544: checking for $ac_word" >&5
+echo "configure:2526: 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
@@ -2581,7 +2563,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:2585: checking for $ac_word" >&5
+echo "configure:2567: 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
@@ -2618,10 +2600,10 @@ done
test -n "$WINDRES" || WINDRES="echo not_windres"
if test -z "$HOST_CC"; then
- HOST_CC="$CC"
+ HOST_CC="$CC"
fi
if test -z "$HOST_CFLAGS"; then
- HOST_CFLAGS="$CFLAGS"
+ HOST_CFLAGS="$CFLAGS"
fi
fi
@@ -2643,7 +2625,7 @@ else
fi
echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
-echo "configure:2647: checking for gcc -pipe support" >&5
+echo "configure:2629: 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
@@ -2658,14 +2640,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 2662 "configure"
+#line 2644 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
printf("Hello World\n");
; return 0; }
EOF
-if { (eval echo configure:2669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
_res_gcc_pipe="yes"
else
@@ -2698,7 +2680,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:2702: checking for $ac_word" >&5
+echo "configure:2684: 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
@@ -2750,9 +2732,20 @@ AR_FLAGS='cr $@'
AS='$(CC)'
ASFLAGS='$(CFLAGS)'
-OS_ARCH=`uname -s | sed -e 's|/|_|g'`
-OS_RELEASE=`uname -r`
-OS_TEST=`uname -m`
+if test -n "$CROSS_COMPILE"; then
+ OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
+ OS_RELEASE=
+ OS_TEST="${target_cpu}"
+ case "${target_os}" in
+ linux*) OS_ARCH=Linux ;;
+ solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
+ mingw*) OS_ARCH=WINNT ;;
+ esac
+else
+ OS_ARCH=`uname -s | sed -e 's|/|_|g'`
+ OS_RELEASE=`uname -r`
+ OS_TEST=`uname -m`
+fi
if test "$OS_ARCH" = "IRIX64"; then
OS_ARCH=IRIX
@@ -2899,6 +2892,10 @@ OS_CONFIG="${OS_TARGET}${OS_RELEASE}"
case "$host" in
*-mingw*|*-cygwin*|*-msvc*|*-mks*)
+ NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
+ if test `echo "${PATH}" | grep -c \;` = 0; then
+ CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
+ fi
;;
*-beos*)
HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE"
@@ -2928,17 +2925,17 @@ 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:2932: checking for sys/atomic_op.h" >&5
+echo "configure:2929: 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 2937 "configure"
+#line 2934 "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:2942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2939: \"$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*
@@ -3095,7 +3092,7 @@ EOF
_DEBUG_FLAGS='-gdwarf-2 -O0'
MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
-echo "configure:3099: checking for gethostbyaddr in -lbind" >&5
+echo "configure:3096: 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
@@ -3103,7 +3100,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lbind $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3107 "configure"
+#line 3104 "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
@@ -3114,7 +3111,7 @@ int main() {
gethostbyaddr()
; return 0; }
EOF
-if { (eval echo configure:3118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3115: \"$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
@@ -3859,10 +3856,6 @@ 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
CC="$CC -mno-cygwin"
@@ -4311,17 +4304,17 @@ EOF
_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:4315: checking for machine/builtins.h" >&5
+echo "configure:4308: 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 4320 "configure"
+#line 4313 "configure"
#include "confdefs.h"
#include <machine/builtins.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4318: \"$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*
@@ -4766,7 +4759,8 @@ EOF
CXXFLAGS="$CFLAGS -Wall -Zomf"
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
DSO_CFLAGS=
- DSO_LDOPTS='-Zomf -Zdll'
+ DSO_LDOPTS='-Zomf -Zdll -Zmap'
+ LDFLAGS='-Zmap'
_OPTIMIZE_FLAGS="-O2 -s"
_DEBUG_FLAGS="-g -fno-inline"
if test -n "$MOZ_OPTIMIZE"; then
@@ -4847,7 +4841,7 @@ case $target in
;;
*)
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4851: checking for dlopen in -ldl" >&5
+echo "configure:4845: 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
@@ -4855,7 +4849,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4859 "configure"
+#line 4853 "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
@@ -4866,7 +4860,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:4870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4864: \"$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
@@ -4883,17 +4877,17 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:4887: checking for dlfcn.h" >&5
+echo "configure:4881: 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 4892 "configure"
+#line 4886 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4891: \"$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*
@@ -4926,13 +4920,13 @@ esac
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:4930: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:4924: 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 4936 "configure"
+#line 4930 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@@ -4950,7 +4944,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
-#line 4954 "configure"
+#line 4948 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@@ -4974,12 +4968,12 @@ fi
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4978: checking for $ac_func" >&5
+echo "configure:4972: 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 4983 "configure"
+#line 4977 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5002,7 +4996,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5000: \"$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
@@ -5043,7 +5037,7 @@ hpux*)
if test -z "$GNU_CC"; then
echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
-echo "configure:5047: checking for +Olit support" >&5
+echo "configure:5041: 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
@@ -5077,7 +5071,7 @@ esac
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
-echo "configure:5081: checking for pthread_create in -lpthreads" >&5
+echo "configure:5075: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5099,7 +5093,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:5103: checking for pthread_create in -lpthread" >&5
+echo "configure:5097: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5121,7 +5115,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
-echo "configure:5125: checking for pthread_create in -lc_r" >&5
+echo "configure:5119: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5143,7 +5137,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
-echo "configure:5147: checking for pthread_create in -lc" >&5
+echo "configure:5141: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5295,7 +5289,7 @@ 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:5299: checking whether ${CC-cc} accepts -pthread" >&5
+echo "configure:5293: 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
@@ -5318,7 +5312,7 @@ echo "configure:5299: 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:5322: checking whether ${CC-cc} accepts -pthreads" >&5
+echo "configure:5316: 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
diff --git a/configure.in b/configure.in
index 6278c383..ac95bc01 100644
--- a/configure.in
+++ b/configure.in
@@ -367,18 +367,16 @@ if test "$target" != "$host"; then
_SAVE_LDFLAGS="$LDFLAGS"
AC_MSG_CHECKING([for $host compiler])
+ AC_CHECK_PROGS(HOST_CC, $HOST_CC gcc cc /usr/ucb/cc, "")
if test -z "$HOST_CC"; then
- AC_CHECK_PROGS(HOST_CC, gcc cc /usr/ucb/cc, "")
- if test -z "$HOST_CC"; then
- AC_MSG_ERROR([no acceptable cc found in \$PATH])
- fi
+ AC_MSG_ERROR([no acceptable cc found in \$PATH])
fi
AC_MSG_RESULT([$HOST_CC])
if test -z "$HOST_CFLAGS"; then
- HOST_CFLAGS="$CFLAGS"
+ HOST_CFLAGS="$CFLAGS"
fi
if test -z "$HOST_LDFLAGS"; then
- HOST_LDFLAGS="$LDFLAGS"
+ HOST_LDFLAGS="$LDFLAGS"
fi
CC="$HOST_CC"
@@ -387,41 +385,25 @@ if test "$target" != "$host"; then
AC_MSG_CHECKING([whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works])
AC_TRY_COMPILE([], [return(0);],
- [ac_cv_prog_host_cc_works=1 AC_MSG_RESULT([yes])],
- AC_MSG_ERROR([installation or configuration problem: $host compiler $HOST_CC cannot create executables.]) )
-
+ [ac_cv_prog_host_cc_works=1 AC_MSG_RESULT([yes])],
+ AC_MSG_ERROR([installation or configuration problem: $host compiler $HOST_CC cannot create executables.]) )
+
CC=$_SAVE_CC
CFLAGS=$_SAVE_CFLAGS
LDFLAGS=$_SAVE_LDFLAGS
- if test -z "$CC"; then
- AC_CHECK_PROGS(CC, "${target_alias}-gcc" "${target}-gcc", echo)
- fi
+ AC_CHECK_PROGS(CC, $CC "${target_alias}-gcc" "${target}-gcc", echo)
unset ac_cv_prog_CC
AC_PROG_CC
- if test -z "$CXX"; then
- AC_CHECK_PROGS(CXX, "${target_alias}-g++" "${target}-g++", echo)
- fi
+ AC_CHECK_PROGS(CXX, $CXX "${target_alias}-g++" "${target}-g++", echo)
unset ac_cv_prog_CXX
AC_PROG_CXX
- if test -z "$RANLIB"; then
- AC_CHECK_PROGS(RANLIB, "${target_alias}-ranlib" "${target}-ranlib", echo)
- fi
- if test -z "$AR"; then
- AC_CHECK_PROGS(AR, "${target_alias}-ar" "${target}-ar", echo)
- fi
- if test -z "$AS"; then
- AC_CHECK_PROGS(AS, "${target_alias}-as" "${target}-as", echo)
- fi
- if test -z "$LD"; then
- AC_CHECK_PROGS(LD, "${target_alias}-ld" "${target}-ld", echo)
- fi
- if test -z "$STRIP"; then
- AC_CHECK_PROGS(STRIP, "${target_alias}-strip" "${target}-strip", echo)
- fi
- if test -z "$WINDRES"; then
- AC_CHECK_PROGS(WINDRES, "${target_alias}-windres" "${target}-windres", echo)
- fi
+ AC_CHECK_PROGS(RANLIB, $RANLIB "${target_alias}-ranlib" "${target}-ranlib", echo)
+ AC_CHECK_PROGS(AR, $AR "${target_alias}-ar" "${target}-ar", echo)
+ AC_CHECK_PROGS(AS, $AS "${target_alias}-as" "${target}-as", echo)
+ AC_CHECK_PROGS(LD, $LD "${target_alias}-ld" "${target}-ld", echo)
+ AC_CHECK_PROGS(STRIP, $STRIP "${target_alias}-strip" "${target}-strip", echo)
+ AC_CHECK_PROGS(WINDRES, $WINDRES "${target_alias}-windres" "${target}-windres", echo)
else
AC_PROG_CXX
@@ -438,10 +420,10 @@ else
AC_PATH_PROGS(STRIP, strip, echo not_strip)
AC_PATH_PROGS(WINDRES, windres, echo not_windres)
if test -z "$HOST_CC"; then
- HOST_CC="$CC"
+ HOST_CC="$CC"
fi
if test -z "$HOST_CFLAGS"; then
- HOST_CFLAGS="$CFLAGS"
+ HOST_CFLAGS="$CFLAGS"
fi
fi
@@ -524,9 +506,20 @@ AR_FLAGS='cr $@'
AS='$(CC)'
ASFLAGS='$(CFLAGS)'
-OS_ARCH=`uname -s | sed -e 's|/|_|g'`
-OS_RELEASE=`uname -r`
-OS_TEST=`uname -m`
+if test -n "$CROSS_COMPILE"; then
+ OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
+ OS_RELEASE=
+ OS_TEST="${target_cpu}"
+ case "${target_os}" in
+ linux*) OS_ARCH=Linux ;;
+ solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
+ mingw*) OS_ARCH=WINNT ;;
+ esac
+else
+ OS_ARCH=`uname -s | sed -e 's|/|_|g'`
+ OS_RELEASE=`uname -r`
+ OS_TEST=`uname -m`
+fi
if test "$OS_ARCH" = "IRIX64"; then
OS_ARCH=IRIX
@@ -677,6 +670,10 @@ dnl Override of system specific host options
dnl ========================================================
case "$host" in
*-mingw*|*-cygwin*|*-msvc*|*-mks*)
+ NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
+ if test `echo "${PATH}" | grep -c \;` = 0; then
+ CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
+ fi
;;
*-beos*)
HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE"
@@ -1237,10 +1234,6 @@ case "$target" in
AC_DEFINE(WIN32)
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
CC="$CC -mno-cygwin"