зеркало из https://github.com/mozilla/pjs.git
Bugzilla Bug 302212: allow Mac OS X x86 builds to target SDKs. The patch
was contributed by Mark Mentovai <mark@moxienet.com>. r=wtc,joshmoz. Modified Files: configure configure.in config/autoconf.mk.in pr/src/linking/Makefile.in
This commit is contained in:
Родитель
654ab3edf1
Коммит
8ca76f2337
|
@ -119,3 +119,10 @@ MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@
|
|||
ifdef MACOSX_DEPLOYMENT_TARGET
|
||||
export MACOSX_DEPLOYMENT_TARGET
|
||||
endif
|
||||
|
||||
MACOS_SDK_DIR = @MACOS_SDK_DIR@
|
||||
|
||||
NEXT_ROOT = @NEXT_ROOT@
|
||||
ifdef NEXT_ROOT
|
||||
export NEXT_ROOT
|
||||
endif
|
||||
|
|
|
@ -39,6 +39,8 @@ ac_help="$ac_help
|
|||
--enable-64bit Enable 64-bit support (on certain platforms)"
|
||||
ac_help="$ac_help
|
||||
--enable-mdupdate Enable use of certain compilers' mdupdate feature"
|
||||
ac_help="$ac_help
|
||||
--with-macos-sdk=dir Location of platform SDK to use (Mac OS X only)"
|
||||
ac_help="$ac_help
|
||||
--enable-macos-target=VER
|
||||
Set the minimum MacOS version needed at runtime
|
||||
|
@ -621,7 +623,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:625: checking host system type" >&5
|
||||
echo "configure:627: checking host system type" >&5
|
||||
|
||||
host_alias=$host
|
||||
case "$host_alias" in
|
||||
|
@ -642,7 +644,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:646: checking target system type" >&5
|
||||
echo "configure:648: checking target system type" >&5
|
||||
|
||||
target_alias=$target
|
||||
case "$target_alias" in
|
||||
|
@ -660,7 +662,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:664: checking build system type" >&5
|
||||
echo "configure:666: checking build system type" >&5
|
||||
|
||||
build_alias=$build
|
||||
case "$build_alias" in
|
||||
|
@ -709,6 +711,8 @@ NOSUCHFILE=/no-such-file
|
|||
LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
|
||||
LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'
|
||||
CYGWIN_WRAPPER=
|
||||
MACOS_SDK_DIR=
|
||||
NEXT_ROOT=
|
||||
|
||||
RESOLVE_LINK_SYMBOLS=
|
||||
|
||||
|
@ -727,7 +731,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:731: checking for $ac_word" >&5
|
||||
echo "configure:735: 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
|
||||
|
@ -923,6 +927,13 @@ if test "${enable_mdupdate+set}" = set; then
|
|||
fi
|
||||
|
||||
|
||||
# Check whether --with-macos-sdk or --without-macos-sdk was given.
|
||||
if test "${with_macos_sdk+set}" = set; then
|
||||
withval="$with_macos_sdk"
|
||||
MACOS_SDK_DIR=$withval
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-macos-target or --disable-macos-target was given.
|
||||
if test "${enable_macos_target+set}" = set; then
|
||||
enableval="$enable_macos_target"
|
||||
|
@ -1027,7 +1038,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:1031: checking for $ac_word" >&5
|
||||
echo "configure:1042: 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
|
||||
|
@ -1098,13 +1109,13 @@ if test "$target" != "$host"; then
|
|||
_SAVE_LDFLAGS="$LDFLAGS"
|
||||
|
||||
echo $ac_n "checking for $host compiler""... $ac_c" 1>&6
|
||||
echo "configure:1102: checking for $host compiler" >&5
|
||||
echo "configure:1113: checking for $host compiler" >&5
|
||||
for ac_prog in $HOST_CC gcc cc /usr/ucb/cc
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1108: checking for $ac_word" >&5
|
||||
echo "configure:1119: 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
|
||||
|
@ -1150,16 +1161,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:1154: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
|
||||
echo "configure:1165: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1156 "configure"
|
||||
#line 1167 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
return(0);
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1174: \"$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
|
||||
|
@ -1179,7 +1190,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:1183: checking for $ac_word" >&5
|
||||
echo "configure:1194: 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
|
||||
|
@ -1213,7 +1224,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:1217: checking for $ac_word" >&5
|
||||
echo "configure:1228: 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
|
||||
|
@ -1243,7 +1254,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:1247: checking for $ac_word" >&5
|
||||
echo "configure:1258: 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
|
||||
|
@ -1294,7 +1305,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:1298: checking for $ac_word" >&5
|
||||
echo "configure:1309: 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
|
||||
|
@ -1326,7 +1337,7 @@ fi
|
|||
fi
|
||||
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
||||
echo "configure:1330: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
echo "configure:1341: 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.
|
||||
|
@ -1337,12 +1348,12 @@ cross_compiling=$ac_cv_prog_cc_cross
|
|||
|
||||
cat > conftest.$ac_ext << EOF
|
||||
|
||||
#line 1341 "configure"
|
||||
#line 1352 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
main(){return(0);}
|
||||
EOF
|
||||
if { (eval echo configure:1346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:1357: \"$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
|
||||
|
@ -1368,12 +1379,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:1372: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "configure:1383: 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:1377: checking whether we are using GNU C" >&5
|
||||
echo "configure:1388: 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
|
||||
|
@ -1382,7 +1393,7 @@ else
|
|||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1386: \"$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:1397: \"$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
|
||||
|
@ -1401,7 +1412,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:1405: checking whether ${CC-cc} accepts -g" >&5
|
||||
echo "configure:1416: 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
|
||||
|
@ -1437,7 +1448,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:1441: checking for $ac_word" >&5
|
||||
echo "configure:1452: 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
|
||||
|
@ -1473,7 +1484,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:1477: checking for $ac_word" >&5
|
||||
echo "configure:1488: 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
|
||||
|
@ -1505,7 +1516,7 @@ test -n "$CXX" || CXX="gcc"
|
|||
|
||||
|
||||
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
||||
echo "configure:1509: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
|
||||
echo "configure:1520: 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.
|
||||
|
@ -1516,12 +1527,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
|
|||
|
||||
cat > conftest.$ac_ext << EOF
|
||||
|
||||
#line 1520 "configure"
|
||||
#line 1531 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main(){return(0);}
|
||||
EOF
|
||||
if { (eval echo configure:1525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:1536: \"$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
|
||||
|
@ -1547,12 +1558,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:1551: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "configure:1562: 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:1556: checking whether we are using GNU C++" >&5
|
||||
echo "configure:1567: 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
|
||||
|
@ -1561,7 +1572,7 @@ else
|
|||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1565: \"$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:1576: \"$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
|
||||
|
@ -1580,7 +1591,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:1584: checking whether ${CXX-g++} accepts -g" >&5
|
||||
echo "configure:1595: 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
|
||||
|
@ -1616,7 +1627,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:1620: checking for $ac_word" >&5
|
||||
echo "configure:1631: 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
|
||||
|
@ -1651,7 +1662,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:1655: checking for $ac_word" >&5
|
||||
echo "configure:1666: 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
|
||||
|
@ -1686,7 +1697,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:1690: checking for $ac_word" >&5
|
||||
echo "configure:1701: 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
|
||||
|
@ -1721,7 +1732,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:1725: checking for $ac_word" >&5
|
||||
echo "configure:1736: 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
|
||||
|
@ -1756,7 +1767,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:1760: checking for $ac_word" >&5
|
||||
echo "configure:1771: 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
|
||||
|
@ -1791,7 +1802,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:1795: checking for $ac_word" >&5
|
||||
echo "configure:1806: 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
|
||||
|
@ -1828,7 +1839,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:1832: checking for $ac_word" >&5
|
||||
echo "configure:1843: 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
|
||||
|
@ -1860,7 +1871,7 @@ test -n "$CXX" || CXX="gcc"
|
|||
|
||||
|
||||
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
||||
echo "configure:1864: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
|
||||
echo "configure:1875: 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.
|
||||
|
@ -1871,12 +1882,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
|
|||
|
||||
cat > conftest.$ac_ext << EOF
|
||||
|
||||
#line 1875 "configure"
|
||||
#line 1886 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main(){return(0);}
|
||||
EOF
|
||||
if { (eval echo configure:1880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:1891: \"$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
|
||||
|
@ -1902,12 +1913,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:1906: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "configure:1917: 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:1911: checking whether we are using GNU C++" >&5
|
||||
echo "configure:1922: 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
|
||||
|
@ -1916,7 +1927,7 @@ else
|
|||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1920: \"$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:1931: \"$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
|
||||
|
@ -1935,7 +1946,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:1939: checking whether ${CXX-g++} accepts -g" >&5
|
||||
echo "configure:1950: 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
|
||||
|
@ -1972,7 +1983,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:1976: checking for $ac_word" >&5
|
||||
echo "configure:1987: 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
|
||||
|
@ -2002,7 +2013,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:2006: checking for $ac_word" >&5
|
||||
echo "configure:2017: 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
|
||||
|
@ -2053,7 +2064,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:2057: 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
|
||||
|
@ -2085,7 +2096,7 @@ fi
|
|||
fi
|
||||
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
||||
echo "configure:2089: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
echo "configure:2100: 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.
|
||||
|
@ -2096,12 +2107,12 @@ cross_compiling=$ac_cv_prog_cc_cross
|
|||
|
||||
cat > conftest.$ac_ext << EOF
|
||||
|
||||
#line 2100 "configure"
|
||||
#line 2111 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
main(){return(0);}
|
||||
EOF
|
||||
if { (eval echo configure:2105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:2116: \"$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
|
||||
|
@ -2127,12 +2138,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:2131: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "configure:2142: 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:2136: checking whether we are using GNU C" >&5
|
||||
echo "configure:2147: 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
|
||||
|
@ -2141,7 +2152,7 @@ else
|
|||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2145: \"$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:2156: \"$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
|
||||
|
@ -2160,7 +2171,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:2164: checking whether ${CC-cc} accepts -g" >&5
|
||||
echo "configure:2175: 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
|
||||
|
@ -2193,7 +2204,7 @@ fi
|
|||
|
||||
fi
|
||||
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
||||
echo "configure:2197: checking how to run the C preprocessor" >&5
|
||||
echo "configure:2208: checking how to run the C preprocessor" >&5
|
||||
# On Suns, sometimes $CPP names a directory.
|
||||
if test -n "$CPP" && test -d "$CPP"; then
|
||||
CPP=
|
||||
|
@ -2208,13 +2219,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 2212 "configure"
|
||||
#line 2223 "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:2218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:2229: \"$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
|
||||
:
|
||||
|
@ -2225,13 +2236,13 @@ else
|
|||
rm -rf conftest*
|
||||
CPP="${CC-cc} -E -traditional-cpp"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2229 "configure"
|
||||
#line 2240 "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:2235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:2246: \"$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
|
||||
:
|
||||
|
@ -2242,13 +2253,13 @@ else
|
|||
rm -rf conftest*
|
||||
CPP="${CC-cc} -nologo -E"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2246 "configure"
|
||||
#line 2257 "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:2252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:2263: \"$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
|
||||
:
|
||||
|
@ -2275,7 +2286,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:2279: checking for $ac_word" >&5
|
||||
echo "configure:2290: 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
|
||||
|
@ -2307,7 +2318,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:2311: checking for $ac_word" >&5
|
||||
echo "configure:2322: 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
|
||||
|
@ -2348,7 +2359,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:2352: checking for $ac_word" >&5
|
||||
echo "configure:2363: 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
|
||||
|
@ -2389,7 +2400,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:2393: checking for $ac_word" >&5
|
||||
echo "configure:2404: 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
|
||||
|
@ -2430,7 +2441,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:2434: checking for $ac_word" >&5
|
||||
echo "configure:2445: 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
|
||||
|
@ -2471,7 +2482,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:2475: checking for $ac_word" >&5
|
||||
echo "configure:2486: 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
|
||||
|
@ -2533,7 +2544,7 @@ else
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
|
||||
echo "configure:2537: checking for gcc -pipe support" >&5
|
||||
echo "configure:2548: 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
|
||||
|
@ -2548,14 +2559,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 2552 "configure"
|
||||
#line 2563 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdio.h>
|
||||
int main() {
|
||||
printf("Hello World\n");
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
_res_gcc_pipe="yes"
|
||||
else
|
||||
|
@ -2582,7 +2593,7 @@ fi
|
|||
|
||||
if test "$GNU_CC"; then
|
||||
echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6
|
||||
echo "configure:2586: checking for visibility(hidden) attribute" >&5
|
||||
echo "configure:2597: checking for visibility(hidden) attribute" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_visibility_hidden'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -2606,7 +2617,7 @@ echo "$ac_t""$ac_cv_visibility_hidden" 1>&6
|
|||
EOF
|
||||
|
||||
echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6
|
||||
echo "configure:2610: checking for visibility pragma support" >&5
|
||||
echo "configure:2621: checking for visibility pragma support" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_visibility_pragma'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -2659,7 +2670,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:2663: checking for $ac_word" >&5
|
||||
echo "configure:2674: 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
|
||||
|
@ -2905,17 +2916,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:2909: checking for sys/atomic_op.h" >&5
|
||||
echo "configure:2920: 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 2914 "configure"
|
||||
#line 2925 "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:2919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:2930: \"$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*
|
||||
|
@ -3072,7 +3083,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:3076: checking for gethostbyaddr in -lbind" >&5
|
||||
echo "configure:3087: 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
|
||||
|
@ -3080,7 +3091,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lbind $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3084 "configure"
|
||||
#line 3095 "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
|
||||
|
@ -3091,7 +3102,7 @@ int main() {
|
|||
gethostbyaddr()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3106: \"$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
|
||||
|
@ -3272,19 +3283,22 @@ EOF
|
|||
EOF
|
||||
|
||||
CFLAGS="$CFLAGS -Wmost -fno-common"
|
||||
if echo $OS_TEST | grep -c 86 2>/dev/null; then
|
||||
case "${target_cpu}" in
|
||||
i*86*)
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define i386 1
|
||||
EOF
|
||||
|
||||
CPU_ARCH=i386
|
||||
else
|
||||
;;
|
||||
*)
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define ppc 1
|
||||
EOF
|
||||
|
||||
CPU_ARCH=ppc
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
DSO_CFLAGS=-fPIC
|
||||
DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
|
||||
# Use the standard preprocessor (cpp)
|
||||
|
@ -3319,38 +3333,52 @@ EOF
|
|||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
if test "$MACOS_SDK_DIR"; then
|
||||
|
||||
if test ! -d "$MACOS_SDK_DIR"; then
|
||||
{ echo "configure: error: SDK not found. When using --with-macos-sdk, you must
|
||||
specify a valid SDK. SDKs are installed when the optional cross-development
|
||||
tools are selected during the Xcode/Developer Tools installation." 1>&2; exit 1; }
|
||||
fi
|
||||
|
||||
# do the right thing for SDK support
|
||||
if test "$NEXT_ROOT"; then
|
||||
|
||||
|
||||
|
||||
CC_VERSION=`$CC -v 2>&1 | grep 'gcc version'`
|
||||
GCC_VERSION_FULL=`echo $CC_VERSION | $PERL -pe 's/^.*gcc version ([^ ]*).*/$1/'`
|
||||
GCC_VERSION=`echo $GCC_VERSION_FULL | $PERL -pe '(split(/\./))[0]>=4&&s/(^\d*\.\d*).*/$1/;'`
|
||||
|
||||
GCC_VERSION_MAJOR=`echo $GCC_VERSION_FULL | $PERL -pe 's/(^\d*).*/$1/;'`
|
||||
|
||||
if test "$GCC_VERSION_MAJOR" -lt "4" ; then
|
||||
TARGET_ARCH_LIB="darwin"
|
||||
TARGET_ARCH_INCLUDE="ppc-darwin"
|
||||
SDK_C_INCLUDE="-isystem ${NEXT_ROOT}/usr/include/gcc/darwin/${GCC_VERSION} -isystem ${NEXT_ROOT}/usr/include -F${NEXT_ROOT}/System/Library/Frameworks"
|
||||
else
|
||||
TARGET_ARCH_LIB=${target_cpu}-${target_vendor}-darwin`echo $NEXT_ROOT | $PERL -pe 's/MacOSX10\.(\d*)//;if ($1) {$_=$1+4;} else {$_="'${target_os}'";s/(\d+)//;$_=$1;}'`
|
||||
TARGET_ARCH_INCLUDE=$TARGET_ARCH_LIB
|
||||
SDK_C_INCLUDE="-isystem ${NEXT_ROOT}/usr/lib/gcc/${TARGET_ARCH_LIB}/${GCC_VERSION_FULL}/include -isystem ${NEXT_ROOT}/usr/include -F${NEXT_ROOT}/System/Library/Frameworks"
|
||||
SDK_C_FRAMEWORK="-F${MACOS_SDK_DIR}/System/Library/Frameworks"
|
||||
if test -d "${MACOS_SDK_DIR}/Library/Frameworks" ; then
|
||||
SDK_C_FRAMEWORK="$SDK_C_FRAMEWORK -F${MACOS_SDK_DIR}/Library/Frameworks"
|
||||
fi
|
||||
|
||||
if test -d "${NEXT_ROOT}/Library/Frameworks" ; then
|
||||
SDK_C_INCLUDE="$SDK_C_INCLUDE -F${NEXT_ROOT}/Library/Frameworks"
|
||||
fi
|
||||
SDK_C_INCLUDE="-isystem ${MACOS_SDK_DIR}/usr/include/gcc/darwin/${GCC_VERSION} -isystem ${MACOS_SDK_DIR}/usr/include ${SDK_C_FRAMEWORK}"
|
||||
|
||||
CFLAGS="$CFLAGS -nostdinc ${SDK_C_INCLUDE}"
|
||||
|
||||
CPP="$CPP -nostdinc ${SDK_C_INCLUDE}"
|
||||
|
||||
OS_LIBS="-L${NEXT_ROOT}/usr/lib/gcc/${TARGET_ARCH_LIB} -L${NEXT_ROOT}/usr/lib/gcc/${TARGET_ARCH_LIB}/${GCC_VERSION_FULL} -L${NEXT_ROOT}/usr/lib $OS_LIBS"
|
||||
MACOS_SDK_LIBS="-L${MACOS_SDK_DIR}/usr/lib/gcc/darwin -L${MACOS_SDK_DIR}/usr/lib/gcc/darwin/${GCC_VERSION_FULL} -L${MACOS_SDK_DIR}/usr/lib ${SDK_C_FRAMEWORK}"
|
||||
LDFLAGS="${MACOS_SDK_LIBS} $LDFLAGS"
|
||||
DSO_LDOPTS="${MACOS_SDK_LIBS} $DSO_LDOPTS"
|
||||
export NEXT_ROOT=$MACOS_SDK_DIR
|
||||
else
|
||||
CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}"
|
||||
|
||||
CPP="$CPP -isysroot ${MACOS_SDK_DIR}"
|
||||
|
||||
if test "$GCC_VERSION_FULL" != "4.0.0" ; then
|
||||
LDFLAGS="$LDFLAGS -isysroot ${MACOS_SDK_DIR}"
|
||||
DSO_LDOPTS="$DSO_LDOPTS -isysroot ${MACOS_SDK_DIR}"
|
||||
else
|
||||
LDFLAGS="$LDFLAGS -Wl,-syslibroot,${MACOS_SDK_DIR}"
|
||||
DSO_LDOPTS="$DSO_LDOPTS -Wl,-syslibroot,${MACOS_SDK_DIR}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
|
@ -4365,17 +4393,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:4369: checking for machine/builtins.h" >&5
|
||||
echo "configure:4397: 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 4374 "configure"
|
||||
#line 4402 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <machine/builtins.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:4379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:4407: \"$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*
|
||||
|
@ -4937,7 +4965,7 @@ case $target in
|
|||
;;
|
||||
*)
|
||||
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
|
||||
echo "configure:4941: checking for dlopen in -ldl" >&5
|
||||
echo "configure:4969: 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
|
||||
|
@ -4945,7 +4973,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-ldl $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4949 "configure"
|
||||
#line 4977 "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
|
||||
|
@ -4956,7 +4984,7 @@ int main() {
|
|||
dlopen()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:4988: \"$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
|
||||
|
@ -4973,17 +5001,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:4977: checking for dlfcn.h" >&5
|
||||
echo "configure:5005: 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 4982 "configure"
|
||||
#line 5010 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <dlfcn.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:4987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:5015: \"$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*
|
||||
|
@ -5016,13 +5044,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:5020: checking whether ${CC-cc} needs -traditional" >&5
|
||||
echo "configure:5048: 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 5026 "configure"
|
||||
#line 5054 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sgtty.h>
|
||||
Autoconf TIOCGETP
|
||||
|
@ -5040,7 +5068,7 @@ rm -f conftest*
|
|||
|
||||
if test $ac_cv_prog_gcc_traditional = no; then
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 5044 "configure"
|
||||
#line 5072 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <termio.h>
|
||||
Autoconf TCGETA
|
||||
|
@ -5064,12 +5092,12 @@ fi
|
|||
for ac_func in lchown strerror
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:5068: checking for $ac_func" >&5
|
||||
echo "configure:5096: 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 5073 "configure"
|
||||
#line 5101 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
|
@ -5092,7 +5120,7 @@ $ac_func();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:5096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:5124: \"$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
|
||||
|
@ -5133,7 +5161,7 @@ hpux*)
|
|||
if test -z "$GNU_CC"; then
|
||||
|
||||
echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
|
||||
echo "configure:5137: checking for +Olit support" >&5
|
||||
echo "configure:5165: 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
|
||||
|
@ -5172,7 +5200,7 @@ darwin*)
|
|||
*)
|
||||
|
||||
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
|
||||
echo "configure:5176: checking for pthread_create in -lpthreads" >&5
|
||||
echo "configure:5204: checking for pthread_create in -lpthreads" >&5
|
||||
echo "
|
||||
#include <pthread.h>
|
||||
void *foo(void *v) { return v; }
|
||||
|
@ -5194,7 +5222,7 @@ echo "
|
|||
echo "$ac_t""no" 1>&6
|
||||
|
||||
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
|
||||
echo "configure:5198: checking for pthread_create in -lpthread" >&5
|
||||
echo "configure:5226: checking for pthread_create in -lpthread" >&5
|
||||
echo "
|
||||
#include <pthread.h>
|
||||
void *foo(void *v) { return v; }
|
||||
|
@ -5216,7 +5244,7 @@ echo "
|
|||
echo "$ac_t""no" 1>&6
|
||||
|
||||
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
|
||||
echo "configure:5220: checking for pthread_create in -lc_r" >&5
|
||||
echo "configure:5248: checking for pthread_create in -lc_r" >&5
|
||||
echo "
|
||||
#include <pthread.h>
|
||||
void *foo(void *v) { return v; }
|
||||
|
@ -5238,7 +5266,7 @@ echo "
|
|||
echo "$ac_t""no" 1>&6
|
||||
|
||||
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
|
||||
echo "configure:5242: checking for pthread_create in -lc" >&5
|
||||
echo "configure:5270: checking for pthread_create in -lc" >&5
|
||||
echo "
|
||||
#include <pthread.h>
|
||||
void *foo(void *v) { return v; }
|
||||
|
@ -5392,7 +5420,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:5396: checking whether ${CC-cc} accepts -pthread" >&5
|
||||
echo "configure:5424: 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
|
||||
|
@ -5415,7 +5443,7 @@ echo "configure:5396: 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:5419: checking whether ${CC-cc} accepts -pthreads" >&5
|
||||
echo "configure:5447: 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
|
||||
|
@ -5828,6 +5856,8 @@ esac
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -6122,6 +6152,8 @@ s%@OS_DLLFLAGS@%$OS_DLLFLAGS%g
|
|||
s%@CYGWIN_WRAPPER@%$CYGWIN_WRAPPER%g
|
||||
s%@VISIBILITY_FLAGS@%$VISIBILITY_FLAGS%g
|
||||
s%@WRAP_SYSTEM_INCLUDES@%$WRAP_SYSTEM_INCLUDES%g
|
||||
s%@MACOS_SDK_DIR@%$MACOS_SDK_DIR%g
|
||||
s%@NEXT_ROOT@%$NEXT_ROOT%g
|
||||
|
||||
CEOF
|
||||
EOF
|
||||
|
|
|
@ -20,6 +20,7 @@ dnl
|
|||
dnl Contributor(s):
|
||||
dnl Christopher Seawood <cls@seawood.org>
|
||||
dnl Howard Chu <hyc@symas.com>
|
||||
dnl Mark Mentovai <mark@moxienet.com>
|
||||
dnl
|
||||
dnl Alternatively, the contents of this file may be used under the
|
||||
dnl terms of the GNU General Public License Version 2 or later (the
|
||||
|
@ -69,6 +70,8 @@ NOSUCHFILE=/no-such-file
|
|||
LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
|
||||
LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'
|
||||
CYGWIN_WRAPPER=
|
||||
MACOS_SDK_DIR=
|
||||
NEXT_ROOT=
|
||||
|
||||
dnl Link in libraries necessary to resolve all symbols for shared libs
|
||||
RESOLVE_LINK_SYMBOLS=
|
||||
|
@ -226,6 +229,13 @@ AC_ARG_ENABLE(mdupdate,
|
|||
USE_MDUPDATE=1
|
||||
fi ])
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Mac OS X SDK support
|
||||
dnl ========================================================
|
||||
AC_ARG_WITH(macos-sdk,
|
||||
[ --with-macos-sdk=dir Location of platform SDK to use (Mac OS X only)],
|
||||
MACOS_SDK_DIR=$withval)
|
||||
|
||||
AC_ARG_ENABLE(macos-target,
|
||||
[ --enable-macos-target=VER
|
||||
Set the minimum MacOS version needed at runtime
|
||||
|
@ -917,13 +927,16 @@ case "$target" in
|
|||
AC_DEFINE(DARWIN)
|
||||
AC_DEFINE(HAVE_BSD_FLOCK)
|
||||
CFLAGS="$CFLAGS -Wmost -fno-common"
|
||||
if echo $OS_TEST | grep -c 86 2>/dev/null; then
|
||||
case "${target_cpu}" in
|
||||
i*86*)
|
||||
AC_DEFINE(i386)
|
||||
CPU_ARCH=i386
|
||||
else
|
||||
;;
|
||||
*)
|
||||
AC_DEFINE(ppc)
|
||||
CPU_ARCH=ppc
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
DSO_CFLAGS=-fPIC
|
||||
DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
|
||||
# Use the standard preprocessor (cpp)
|
||||
|
@ -961,52 +974,81 @@ case "$target" in
|
|||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
dnl MACOS_SDK_DIR will be set to the SDK location whenever one is
|
||||
dnl in use. NEXT_ROOT will be set and exported if it's needed for
|
||||
dnl ld.
|
||||
|
||||
if test "$MACOS_SDK_DIR"; then
|
||||
dnl Sync this section with the one in Mozilla's top level.
|
||||
|
||||
if test ! -d "$MACOS_SDK_DIR"; then
|
||||
AC_MSG_ERROR([SDK not found. When using --with-macos-sdk, you must
|
||||
specify a valid SDK. SDKs are installed when the optional cross-development
|
||||
tools are selected during the Xcode/Developer Tools installation.])
|
||||
fi
|
||||
|
||||
# do the right thing for SDK support
|
||||
if test "$NEXT_ROOT"; then
|
||||
dnl Synced to the MACOS_SDK_DIR block in Mozilla's top-level
|
||||
dnl configure.in
|
||||
|
||||
dnl Current known valid versions for GCC_VERSION are 2.95.2 3.1 3.3 4.0.
|
||||
dnl 4.0 identifies itself as 4.0.x, so strip the decidecimal for
|
||||
dnl the environment and includedir purposes (when using an SDK, below),
|
||||
dnl but remember the full version number for the libdir (SDK).
|
||||
|
||||
changequote(,)
|
||||
CC_VERSION=`$CC -v 2>&1 | grep 'gcc version'`
|
||||
GCC_VERSION_FULL=`echo $CC_VERSION | $PERL -pe 's/^.*gcc version ([^ ]*).*/$1/'`
|
||||
GCC_VERSION=`echo $GCC_VERSION_FULL | $PERL -pe '(split(/\./))[0]>=4&&s/(^\d*\.\d*).*/$1/;'`
|
||||
changequote([,])
|
||||
GCC_VERSION_MAJOR=`echo $GCC_VERSION_FULL | $PERL -pe 's/(^\d*).*/$1/;'`
|
||||
|
||||
if test "$GCC_VERSION_MAJOR" -lt "4" ; then
|
||||
dnl gcc < 4.0 only supports PowerPC, OK to hard-code
|
||||
TARGET_ARCH_LIB="darwin"
|
||||
TARGET_ARCH_INCLUDE="ppc-darwin"
|
||||
SDK_C_INCLUDE="-isystem ${NEXT_ROOT}/usr/include/gcc/darwin/${GCC_VERSION} -isystem ${NEXT_ROOT}/usr/include -F${NEXT_ROOT}/System/Library/Frameworks"
|
||||
else
|
||||
dnl If gcc >= 4, use cpu-apple-darwin#, where # is the version
|
||||
dnl of the Darwin release corresponding to the target Mac OS X
|
||||
dnl release. For OS X >= 10.1.1, take the minor version number and
|
||||
dnl add 4 to get the Darwin major version number. If it can't be
|
||||
dnl determined, use current Darwin major version number and hope
|
||||
dnl that there's a symlink.
|
||||
TARGET_ARCH_LIB=${target_cpu}-${target_vendor}-darwin`echo $NEXT_ROOT | $PERL -pe 's/MacOSX10\.([\d]*)//;if ($1) {$_=$1+4;} else {$_="'${target_os}'";s/(\d+)//;$_=$1;}'`
|
||||
TARGET_ARCH_INCLUDE=$TARGET_ARCH_LIB
|
||||
SDK_C_INCLUDE="-isystem ${NEXT_ROOT}/usr/lib/gcc/${TARGET_ARCH_LIB}/${GCC_VERSION_FULL}/include -isystem ${NEXT_ROOT}/usr/include -F${NEXT_ROOT}/System/Library/Frameworks"
|
||||
SDK_C_FRAMEWORK="-F${MACOS_SDK_DIR}/System/Library/Frameworks"
|
||||
if test -d "${MACOS_SDK_DIR}/Library/Frameworks" ; then
|
||||
SDK_C_FRAMEWORK="$SDK_C_FRAMEWORK -F${MACOS_SDK_DIR}/Library/Frameworks"
|
||||
fi
|
||||
|
||||
if test -d "${NEXT_ROOT}/Library/Frameworks" ; then
|
||||
SDK_C_INCLUDE="$SDK_C_INCLUDE -F${NEXT_ROOT}/Library/Frameworks"
|
||||
fi
|
||||
SDK_C_INCLUDE="-isystem ${MACOS_SDK_DIR}/usr/include/gcc/darwin/${GCC_VERSION} -isystem ${MACOS_SDK_DIR}/usr/include ${SDK_C_FRAMEWORK}"
|
||||
|
||||
CFLAGS="$CFLAGS -nostdinc ${SDK_C_INCLUDE}"
|
||||
|
||||
dnl CPP needs to be set for AC_CHECK_HEADER.
|
||||
CPP="$CPP -nostdinc ${SDK_C_INCLUDE}"
|
||||
|
||||
OS_LIBS="-L${NEXT_ROOT}/usr/lib/gcc/${TARGET_ARCH_LIB} -L${NEXT_ROOT}/usr/lib/gcc/${TARGET_ARCH_LIB}/${GCC_VERSION_FULL} -L${NEXT_ROOT}/usr/lib $OS_LIBS"
|
||||
dnl ld support for -syslibroot is compiler-agnostic, but only
|
||||
dnl available on Tiger. Although it's possible to switch on
|
||||
dnl the build host's OS release to use ld -syslibroot when
|
||||
dnl available, ld -syslibroot cause warnings as long as
|
||||
dnl NEXT_ROOT is set. NEXT_ROOT should be set because both
|
||||
dnl both the compiler and linker use it.
|
||||
dnl
|
||||
dnl LDFLAGS is for the utilities built in config (now and
|
||||
dnl nsinstall). DSO_LDOPTS is used when linking shared
|
||||
dnl libraries.
|
||||
MACOS_SDK_LIBS="-L${MACOS_SDK_DIR}/usr/lib/gcc/darwin -L${MACOS_SDK_DIR}/usr/lib/gcc/darwin/${GCC_VERSION_FULL} -L${MACOS_SDK_DIR}/usr/lib ${SDK_C_FRAMEWORK}"
|
||||
LDFLAGS="${MACOS_SDK_LIBS} $LDFLAGS"
|
||||
DSO_LDOPTS="${MACOS_SDK_LIBS} $DSO_LDOPTS"
|
||||
export NEXT_ROOT=$MACOS_SDK_DIR
|
||||
else
|
||||
dnl gcc >= 4.0 uses different paths than above, but knows
|
||||
dnl how to find them itself.
|
||||
CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}"
|
||||
|
||||
dnl CPP needs to be set for AC_CHECK_HEADER.
|
||||
CPP="$CPP -isysroot ${MACOS_SDK_DIR}"
|
||||
|
||||
dnl If gcc >= 4.0.0, we're guaranteed to be on Tiger, which
|
||||
dnl has an ld that supports -syslibroot. Don't set
|
||||
dnl NEXT_ROOT because it will be ignored and cause
|
||||
dnl warnings when -syslibroot is specified.
|
||||
dnl
|
||||
dnl Both LDFLAGS and DSO_LDOPTS are set here, see the
|
||||
dnl gcc < 4.0 case for the explanation.
|
||||
if test "$GCC_VERSION_FULL" != "4.0.0" ; then
|
||||
dnl gcc > 4.0.0 will pass -syslibroot to ld automatically
|
||||
dnl based on the -isysroot it receives.
|
||||
LDFLAGS="$LDFLAGS -isysroot ${MACOS_SDK_DIR}"
|
||||
DSO_LDOPTS="$DSO_LDOPTS -isysroot ${MACOS_SDK_DIR}"
|
||||
else
|
||||
dnl gcc 4.0.0 doesn't pass -syslibroot to ld, it needs
|
||||
dnl to be explicit.
|
||||
LDFLAGS="$LDFLAGS -Wl,-syslibroot,${MACOS_SDK_DIR}"
|
||||
DSO_LDOPTS="$DSO_LDOPTS -Wl,-syslibroot,${MACOS_SDK_DIR}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
|
@ -2673,6 +2715,8 @@ AC_SUBST(OS_DLLFLAGS)
|
|||
AC_SUBST(CYGWIN_WRAPPER)
|
||||
AC_SUBST(VISIBILITY_FLAGS)
|
||||
AC_SUBST(WRAP_SYSTEM_INCLUDES)
|
||||
AC_SUBST(MACOS_SDK_DIR)
|
||||
AC_SUBST(NEXT_ROOT)
|
||||
|
||||
dnl ========================================================
|
||||
dnl Generate output files.
|
||||
|
|
|
@ -69,7 +69,7 @@ endif
|
|||
|
||||
# On Mac OS X use flat #includes.
|
||||
ifeq ($(OS_TARGET),MacOSX)
|
||||
INCLUDES += -I$(NEXT_ROOT)/Developer/Headers/FlatCarbon
|
||||
INCLUDES += -I$(MACOS_SDK_DIR)/Developer/Headers/FlatCarbon
|
||||
endif
|
||||
|
||||
DEFINES += -D_NSPR_BUILD_
|
||||
|
|
Загрузка…
Ссылка в новой задаче