13
13
# Any additions from configure.in:
15
15
--with-android-ndk=DIR
16
location where the Android NDK can be found"
16
location where the Android NDK can be found"
18
18
--with-android-toolchain=DIR
19
location of the android toolchain, default NDK/build/prebuilt/HOST/arm-eabi-4.4.0"
19
location of the Android toolchain"
21
--with-android-version=VER
22
Android platform version, default 5"
21
24
--with-android-platform=DIR
22
location of platform dir, default NDK/build/platforms/android-5/arch-arm"
25
location of platform dir"
27
--with-gonk=DIR location of gonk dir"
24
29
--with-dist-prefix=DIST_PREFIX
25
30
place build files in DIST_PREFIX [dist]"
782
787
# Extract the first word of "$ac_prog", so it can be a program name with args.
783
788
set dummy $ac_prog; ac_word=$2
784
789
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
785
echo "configure:786: checking for $ac_word" >&5
790
echo "configure:791: checking for $ac_word" >&5
786
791
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
787
792
echo $ac_n "(cached) $ac_c" 1>&6
860
# Check whether --with-android-version or --without-android-version was given.
861
if test "${with_android_version+set}" = set; then
862
withval="$with_android_version"
863
android_version=$withval
855
869
# Check whether --with-android-platform or --without-android-platform was given.
856
870
if test "${with_android_platform+set}" = set; then
857
871
withval="$with_android_platform"
863
877
arm-linux*-android*|*-linuxandroid*)
864
878
android_tool_prefix="arm-linux-androideabi"
867
android_tool_prefix="arm-eabi"
881
android_tool_prefix="i686-android-linux"
884
android_tool_prefix="mipsel-linux-android"
870
887
android_tool_prefix="$target_os"
892
# Check whether --with-gonk or --without-gonk was given.
893
if test "${with_gonk+set}" = set; then
899
if test -n "$gonkdir" ; then
901
if test -z "$HOST_CPPFLAGS" ; then
904
if test -z "$HOST_CFLAGS" ; then
907
if test -z "$HOST_CXXFLAGS" ; then
910
if test -z "$HOST_LDFLAGS" ; then
914
cat >> confdefs.h <<\EOF
874
919
case "$target" in
875
920
*-android*|*-linuxandroid*)
876
921
if test -z "$android_ndk" ; then
880
925
if test -z "$android_toolchain" ; then
881
android_toolchain="$android_ndk"/build/prebuilt/`uname -s | tr "[:upper:]" "[:lower:]"`-x86/arm-eabi-4.4.0
926
echo $ac_n "checking for android toolchain directory""... $ac_c" 1>&6
927
echo "configure:928: checking for android toolchain directory" >&5
929
kernel_name=`uname -s | tr "[:upper:]" "[:lower:]"`
931
case "$target_cpu" in
933
target_name=arm-linux-androideabi-4.4.3
936
target_name=x86-4.4.3
939
target_name=mipsel-linux-android-4.4.3
942
android_toolchain="$android_ndk"/toolchains/$target_name/prebuilt/$kernel_name-x86
944
if test -d "$android_toolchain" ; then
945
echo "$ac_t""$android_toolchain" 1>&6
947
{ echo "configure: error: not found. You have to specify --with-android-toolchain=/path/to/ndk/toolchain." 1>&2; exit 1; }
884
951
if test -z "$android_platform" ; then
885
android_platform="$android_ndk"/build/platforms/android-5/arch-arm
952
echo $ac_n "checking for android platform directory""... $ac_c" 1>&6
953
echo "configure:954: checking for android platform directory" >&5
955
case "$target_cpu" in
967
android_platform="$android_ndk"/platforms/android-"$android_version"/arch-"$target_name"
969
if test -d "$android_platform" ; then
970
echo "$ac_t""$android_platform" 1>&6
972
{ echo "configure: error: not found. You have to specify --with-android-platform=/path/to/ndk/platform." 1>&2; exit 1; }
888
976
AS="$android_toolchain"/bin/"$android_tool_prefix"-as
895
983
STRIP="$android_toolchain"/bin/"$android_tool_prefix"-strip
897
985
CPPFLAGS="-I$android_platform/usr/include $CPPFLAGS"
898
CFLAGS="-mandroid -I$android_platform/usr/include -msoft-float -fno-short-enums -fno-exceptions $CFLAGS"
899
CXXFLAGS="-mandroid -I$android_platform/usr/include -msoft-float -fpic -fno-short-enums -fno-exceptions $CXXFLAGS"
986
CFLAGS="-mandroid -I$android_platform/usr/include -fno-short-enums -fno-exceptions $CFLAGS"
987
CXXFLAGS="-mandroid -I$android_platform/usr/include -fpic -fno-short-enums -fno-exceptions $CXXFLAGS"
900
988
LDFLAGS="-mandroid -L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform $LDFLAGS"
902
990
if test -z "$HOST_CPPFLAGS" ; then
912
1000
HOST_LDFLAGS=" "
915
WRAP_MALLOC_CFLAGS="-Wl,--wrap=dlopen -Wl,--wrap=dlclose -Wl,--wrap=dlerror -Wl,--wrap=dlsym -Wl,--wrap=dladdr"
917
1003
cat >> confdefs.h <<\EOF
918
1004
#define ANDROID 1
1007
cat >> confdefs.h <<EOF
1008
#define ANDROID_VERSION $android_version
924
1015
dist_prefix='${MOD_DEPTH}/dist'
925
1016
dist_bindir='${dist_prefix}/bin'
1213
1304
# Extract the first word of "$WHOAMI whoami", so it can be a program name with args.
1214
1305
set dummy $WHOAMI whoami; ac_word=$2
1215
1306
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1216
echo "configure:1217: checking for $ac_word" >&5
1307
echo "configure:1308: checking for $ac_word" >&5
1217
1308
if eval "test \"`echo '$''{'ac_cv_path_WHOAMI'+set}'`\" = set"; then
1218
1309
echo $ac_n "(cached) $ac_c" 1>&6
1284
1376
_SAVE_LDFLAGS="$LDFLAGS"
1286
1378
echo $ac_n "checking for $host compiler""... $ac_c" 1>&6
1287
echo "configure:1288: checking for $host compiler" >&5
1379
echo "configure:1380: checking for $host compiler" >&5
1288
1380
for ac_prog in $HOST_CC gcc cc /usr/ucb/cc
1290
1382
# Extract the first word of "$ac_prog", so it can be a program name with args.
1291
1383
set dummy $ac_prog; ac_word=$2
1292
1384
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1293
echo "configure:1294: checking for $ac_word" >&5
1385
echo "configure:1386: checking for $ac_word" >&5
1294
1386
if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then
1295
1387
echo $ac_n "(cached) $ac_c" 1>&6
1336
1428
LDFLAGS="$HOST_LDFLAGS"
1338
1430
echo $ac_n "checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
1339
echo "configure:1340: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
1431
echo "configure:1432: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
1340
1432
cat > conftest.$ac_ext <<EOF
1341
#line 1342 "configure"
1433
#line 1434 "configure"
1342
1434
#include "confdefs.h"
1348
if { (eval echo configure:1349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1440
if { (eval echo configure:1441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1349
1441
rm -rf conftest*
1350
1442
ac_cv_prog_host_cc_works=1 echo "$ac_t""yes" 1>&6
1363
1455
case "$build:$target" in
1364
1456
powerpc-apple-darwin8*:i?86-apple-darwin*)
1365
1457
_SAVE_CFLAGS=$CFLAGS
1366
_SAVE_CXXFLAGS=$CXXLAGS
1458
_SAVE_CXXFLAGS=$CXXFLAGS
1367
1459
CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CFLAGS"
1368
1460
CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CXXFLAGS"
1462
*:arm*-apple-darwin*)
1463
_SAVE_CFLAGS=$CFLAGS
1464
_SAVE_CXXFLAGS=$CXXFLAGS
1465
CFLAGS="-isysroot $MACOS_SDK_DIR $CFLAGS"
1466
CXXFLAGS="-isysroot $MACOS_SDK_DIR $CXXFLAGS"
1372
1470
for ac_prog in $CC "${target_alias}-gcc" "${target}-gcc"
1374
1472
# Extract the first word of "$ac_prog", so it can be a program name with args.
1375
1473
set dummy $ac_prog; ac_word=$2
1376
1474
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1377
echo "configure:1378: checking for $ac_word" >&5
1475
echo "configure:1476: checking for $ac_word" >&5
1378
1476
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1379
1477
echo $ac_n "(cached) $ac_c" 1>&6
1408
1506
# Extract the first word of "gcc", so it can be a program name with args.
1409
1507
set dummy gcc; ac_word=$2
1410
1508
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1411
echo "configure:1412: checking for $ac_word" >&5
1509
echo "configure:1510: checking for $ac_word" >&5
1412
1510
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1413
1511
echo $ac_n "(cached) $ac_c" 1>&6
1438
1536
# Extract the first word of "cc", so it can be a program name with args.
1439
1537
set dummy cc; ac_word=$2
1440
1538
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1441
echo "configure:1442: checking for $ac_word" >&5
1539
echo "configure:1540: checking for $ac_word" >&5
1442
1540
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1443
1541
echo $ac_n "(cached) $ac_c" 1>&6
1489
1587
# Extract the first word of "cl", so it can be a program name with args.
1490
1588
set dummy cl; ac_word=$2
1491
1589
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1492
echo "configure:1493: checking for $ac_word" >&5
1590
echo "configure:1591: checking for $ac_word" >&5
1493
1591
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1494
1592
echo $ac_n "(cached) $ac_c" 1>&6
1523
1621
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1524
echo "configure:1525: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1622
echo "configure:1623: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1527
1625
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1533
1631
cat > conftest.$ac_ext << EOF
1535
#line 1536 "configure"
1633
#line 1634 "configure"
1536
1634
#include "confdefs.h"
1538
1636
main(){return(0);}
1540
if { (eval echo configure:1541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1638
if { (eval echo configure:1639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1541
1639
ac_cv_prog_cc_works=yes
1542
1640
# If we can't run a trivial program, we are probably using a cross compiler.
1543
1641
if (./conftest; exit) 2>/dev/null; then
1563
1661
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1565
1663
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1566
echo "configure:1567: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1664
echo "configure:1665: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1567
1665
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1568
1666
cross_compiling=$ac_cv_prog_cc_cross
1570
1668
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1571
echo "configure:1572: checking whether we are using GNU C" >&5
1669
echo "configure:1670: checking whether we are using GNU C" >&5
1572
1670
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1573
1671
echo $ac_n "(cached) $ac_c" 1>&6
1596
1694
ac_save_CFLAGS="$CFLAGS"
1598
1696
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1599
echo "configure:1600: checking whether ${CC-cc} accepts -g" >&5
1697
echo "configure:1698: checking whether ${CC-cc} accepts -g" >&5
1600
1698
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1601
1699
echo $ac_n "(cached) $ac_c" 1>&6
1633
1731
# Extract the first word of "$ac_prog", so it can be a program name with args.
1634
1732
set dummy $ac_prog; ac_word=$2
1635
1733
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1636
echo "configure:1637: checking for $ac_word" >&5
1734
echo "configure:1735: checking for $ac_word" >&5
1637
1735
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1638
1736
echo $ac_n "(cached) $ac_c" 1>&6
1669
1767
# Extract the first word of "$ac_prog", so it can be a program name with args.
1670
1768
set dummy $ac_prog; ac_word=$2
1671
1769
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1672
echo "configure:1673: checking for $ac_word" >&5
1770
echo "configure:1771: checking for $ac_word" >&5
1673
1771
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1674
1772
echo $ac_n "(cached) $ac_c" 1>&6
1703
1801
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1704
echo "configure:1705: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1802
echo "configure:1803: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1707
1805
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1713
1811
cat > conftest.$ac_ext << EOF
1715
#line 1716 "configure"
1813
#line 1814 "configure"
1716
1814
#include "confdefs.h"
1718
1816
int main(){return(0);}
1720
if { (eval echo configure:1721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1818
if { (eval echo configure:1819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1721
1819
ac_cv_prog_cxx_works=yes
1722
1820
# If we can't run a trivial program, we are probably using a cross compiler.
1723
1821
if (./conftest; exit) 2>/dev/null; then
1743
1841
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1745
1843
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1746
echo "configure:1747: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1844
echo "configure:1845: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1747
1845
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1748
1846
cross_compiling=$ac_cv_prog_cxx_cross
1750
1848
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1751
echo "configure:1752: checking whether we are using GNU C++" >&5
1849
echo "configure:1850: checking whether we are using GNU C++" >&5
1752
1850
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1753
1851
echo $ac_n "(cached) $ac_c" 1>&6
1776
1874
ac_save_CXXFLAGS="$CXXFLAGS"
1778
1876
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1779
echo "configure:1780: checking whether ${CXX-g++} accepts -g" >&5
1877
echo "configure:1878: checking whether ${CXX-g++} accepts -g" >&5
1780
1878
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1781
1879
echo $ac_n "(cached) $ac_c" 1>&6
1810
for ac_declaration in \
1812
'#include <stdlib.h>' \
1813
'extern "C" void std::exit (int) throw (); using std::exit;' \
1814
'extern "C" void std::exit (int); using std::exit;' \
1815
'extern "C" void exit (int) throw ();' \
1816
'extern "C" void exit (int);' \
1819
cat > conftest.$ac_ext <<EOF
1820
#line 1821 "configure"
1821
#include "confdefs.h"
1828
if { (eval echo configure:1829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1831
echo "configure: failed program was:" >&5
1832
cat conftest.$ac_ext >&5
1837
cat > conftest.$ac_ext <<EOF
1838
#line 1839 "configure"
1839
#include "confdefs.h"
1845
if { (eval echo configure:1846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1849
echo "configure: failed program was:" >&5
1850
cat conftest.$ac_ext >&5
1854
if test -n "$ac_declaration"; then
1855
echo '#ifdef __cplusplus' >>confdefs.h
1856
echo $ac_declaration >>confdefs.h
1857
echo '#endif' >>confdefs.h
1863
1910
case "$build:$target" in
1864
powerpc-apple-darwin8*:i?86-apple-darwin*)
1911
powerpc-apple-darwin8*:i?86-apple-darwin*|*:arm*-apple-darwin*)
1865
1912
CFLAGS=$_SAVE_CFLAGS
1866
1913
CXXFLAGS=$_SAVE_CXXFLAGS
1872
1919
# Extract the first word of "$ac_prog", so it can be a program name with args.
1873
1920
set dummy $ac_prog; ac_word=$2
1874
1921
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1875
echo "configure:1876: checking for $ac_word" >&5
1922
echo "configure:1923: checking for $ac_word" >&5
1876
1923
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1877
1924
echo $ac_n "(cached) $ac_c" 1>&6
1907
1954
# Extract the first word of "$ac_prog", so it can be a program name with args.
1908
1955
set dummy $ac_prog; ac_word=$2
1909
1956
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1910
echo "configure:1911: checking for $ac_word" >&5
1957
echo "configure:1958: checking for $ac_word" >&5
1911
1958
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1912
1959
echo $ac_n "(cached) $ac_c" 1>&6
1942
1989
# Extract the first word of "$ac_prog", so it can be a program name with args.
1943
1990
set dummy $ac_prog; ac_word=$2
1944
1991
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1945
echo "configure:1946: checking for $ac_word" >&5
1992
echo "configure:1993: checking for $ac_word" >&5
1946
1993
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1947
1994
echo $ac_n "(cached) $ac_c" 1>&6
1977
2024
# Extract the first word of "$ac_prog", so it can be a program name with args.
1978
2025
set dummy $ac_prog; ac_word=$2
1979
2026
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1980
echo "configure:1981: checking for $ac_word" >&5
2027
echo "configure:2028: checking for $ac_word" >&5
1981
2028
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
1982
2029
echo $ac_n "(cached) $ac_c" 1>&6
2012
2059
# Extract the first word of "$ac_prog", so it can be a program name with args.
2013
2060
set dummy $ac_prog; ac_word=$2
2014
2061
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2015
echo "configure:2016: checking for $ac_word" >&5
2062
echo "configure:2063: checking for $ac_word" >&5
2016
2063
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2017
2064
echo $ac_n "(cached) $ac_c" 1>&6
2047
2094
# Extract the first word of "$ac_prog", so it can be a program name with args.
2048
2095
set dummy $ac_prog; ac_word=$2
2049
2096
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2050
echo "configure:2051: checking for $ac_word" >&5
2097
echo "configure:2098: checking for $ac_word" >&5
2051
2098
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
2052
2099
echo $ac_n "(cached) $ac_c" 1>&6
2082
2129
# Extract the first word of "gcc", so it can be a program name with args.
2083
2130
set dummy gcc; ac_word=$2
2084
2131
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2085
echo "configure:2086: checking for $ac_word" >&5
2132
echo "configure:2133: checking for $ac_word" >&5
2086
2133
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2087
2134
echo $ac_n "(cached) $ac_c" 1>&6
2112
2159
# Extract the first word of "cc", so it can be a program name with args.
2113
2160
set dummy cc; ac_word=$2
2114
2161
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2115
echo "configure:2116: checking for $ac_word" >&5
2162
echo "configure:2163: checking for $ac_word" >&5
2116
2163
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2117
2164
echo $ac_n "(cached) $ac_c" 1>&6
2163
2210
# Extract the first word of "cl", so it can be a program name with args.
2164
2211
set dummy cl; ac_word=$2
2165
2212
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2166
echo "configure:2167: checking for $ac_word" >&5
2213
echo "configure:2214: checking for $ac_word" >&5
2167
2214
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2168
2215
echo $ac_n "(cached) $ac_c" 1>&6
2197
2244
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2198
echo "configure:2199: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2245
echo "configure:2246: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2201
2248
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2207
2254
cat > conftest.$ac_ext << EOF
2209
#line 2210 "configure"
2256
#line 2257 "configure"
2210
2257
#include "confdefs.h"
2212
2259
main(){return(0);}
2214
if { (eval echo configure:2215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2261
if { (eval echo configure:2262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2215
2262
ac_cv_prog_cc_works=yes
2216
2263
# If we can't run a trivial program, we are probably using a cross compiler.
2217
2264
if (./conftest; exit) 2>/dev/null; then
2237
2284
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2239
2286
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2240
echo "configure:2241: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2287
echo "configure:2288: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2241
2288
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2242
2289
cross_compiling=$ac_cv_prog_cc_cross
2244
2291
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2245
echo "configure:2246: checking whether we are using GNU C" >&5
2292
echo "configure:2293: checking whether we are using GNU C" >&5
2246
2293
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2247
2294
echo $ac_n "(cached) $ac_c" 1>&6
2270
2317
ac_save_CFLAGS="$CFLAGS"
2272
2319
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2273
echo "configure:2274: checking whether ${CC-cc} accepts -g" >&5
2320
echo "configure:2321: checking whether ${CC-cc} accepts -g" >&5
2274
2321
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2275
2322
echo $ac_n "(cached) $ac_c" 1>&6
2310
2357
# Extract the first word of "$ac_prog", so it can be a program name with args.
2311
2358
set dummy $ac_prog; ac_word=$2
2312
2359
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2313
echo "configure:2314: checking for $ac_word" >&5
2360
echo "configure:2361: checking for $ac_word" >&5
2314
2361
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
2315
2362
echo $ac_n "(cached) $ac_c" 1>&6
2344
2391
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2345
echo "configure:2346: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
2392
echo "configure:2393: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
2348
2395
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2354
2401
cat > conftest.$ac_ext << EOF
2356
#line 2357 "configure"
2403
#line 2404 "configure"
2357
2404
#include "confdefs.h"
2359
2406
int main(){return(0);}
2361
if { (eval echo configure:2362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2408
if { (eval echo configure:2409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2362
2409
ac_cv_prog_cxx_works=yes
2363
2410
# If we can't run a trivial program, we are probably using a cross compiler.
2364
2411
if (./conftest; exit) 2>/dev/null; then
2384
2431
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
2386
2433
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2387
echo "configure:2388: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
2434
echo "configure:2435: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
2388
2435
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
2389
2436
cross_compiling=$ac_cv_prog_cxx_cross
2391
2438
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
2392
echo "configure:2393: checking whether we are using GNU C++" >&5
2439
echo "configure:2440: checking whether we are using GNU C++" >&5
2393
2440
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
2394
2441
echo $ac_n "(cached) $ac_c" 1>&6
2417
2464
ac_save_CXXFLAGS="$CXXFLAGS"
2419
2466
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
2420
echo "configure:2421: checking whether ${CXX-g++} accepts -g" >&5
2467
echo "configure:2468: checking whether ${CXX-g++} accepts -g" >&5
2421
2468
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
2422
2469
echo $ac_n "(cached) $ac_c" 1>&6
2451
for ac_declaration in \
2453
'#include <stdlib.h>' \
2454
'extern "C" void std::exit (int) throw (); using std::exit;' \
2455
'extern "C" void std::exit (int); using std::exit;' \
2456
'extern "C" void exit (int) throw ();' \
2457
'extern "C" void exit (int);' \
2460
cat > conftest.$ac_ext <<EOF
2461
#line 2462 "configure"
2462
#include "confdefs.h"
2469
if { (eval echo configure:2470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2472
echo "configure: failed program was:" >&5
2473
cat conftest.$ac_ext >&5
2478
cat > conftest.$ac_ext <<EOF
2479
#line 2480 "configure"
2480
#include "confdefs.h"
2486
if { (eval echo configure:2487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2490
echo "configure: failed program was:" >&5
2491
cat conftest.$ac_ext >&5
2495
if test -n "$ac_declaration"; then
2496
echo '#ifdef __cplusplus' >>confdefs.h
2497
echo $ac_declaration >>confdefs.h
2498
echo '#endif' >>confdefs.h
2504
2500
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2505
echo "configure:2506: checking how to run the C preprocessor" >&5
2501
echo "configure:2502: checking how to run the C preprocessor" >&5
2506
2502
# On Suns, sometimes $CPP names a directory.
2507
2503
if test -n "$CPP" && test -d "$CPP"; then
2517
2513
# On the NeXT, cc -E runs the code through the compiler's parser,
2518
2514
# not just through cpp.
2519
2515
cat > conftest.$ac_ext <<EOF
2520
#line 2521 "configure"
2516
#line 2517 "configure"
2521
2517
#include "confdefs.h"
2522
2518
#include <assert.h>
2525
2521
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2526
{ (eval echo configure:2527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2522
{ (eval echo configure:2523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2527
2523
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2528
2524
if test -z "$ac_err"; then
2534
2530
rm -rf conftest*
2535
2531
CPP="${CC-cc} -E -traditional-cpp"
2536
2532
cat > conftest.$ac_ext <<EOF
2537
#line 2538 "configure"
2533
#line 2534 "configure"
2538
2534
#include "confdefs.h"
2539
2535
#include <assert.h>
2542
2538
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2543
{ (eval echo configure:2544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2539
{ (eval echo configure:2540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2544
2540
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2545
2541
if test -z "$ac_err"; then
2551
2547
rm -rf conftest*
2552
2548
CPP="${CC-cc} -nologo -E"
2553
2549
cat > conftest.$ac_ext <<EOF
2554
#line 2555 "configure"
2550
#line 2551 "configure"
2555
2551
#include "confdefs.h"
2556
2552
#include <assert.h>
2559
2555
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2560
{ (eval echo configure:2561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2556
{ (eval echo configure:2557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2561
2557
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2562
2558
if test -z "$ac_err"; then
2584
2580
# Extract the first word of "ranlib", so it can be a program name with args.
2585
2581
set dummy ranlib; ac_word=$2
2586
2582
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2587
echo "configure:2588: checking for $ac_word" >&5
2583
echo "configure:2584: checking for $ac_word" >&5
2588
2584
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2589
2585
echo $ac_n "(cached) $ac_c" 1>&6
2616
2612
# Extract the first word of "$ac_prog", so it can be a program name with args.
2617
2613
set dummy $ac_prog; ac_word=$2
2618
2614
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2619
echo "configure:2620: checking for $ac_word" >&5
2615
echo "configure:2616: checking for $ac_word" >&5
2620
2616
if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
2621
2617
echo $ac_n "(cached) $ac_c" 1>&6
2657
2653
# Extract the first word of "$ac_prog", so it can be a program name with args.
2658
2654
set dummy $ac_prog; ac_word=$2
2659
2655
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2660
echo "configure:2661: checking for $ac_word" >&5
2656
echo "configure:2657: checking for $ac_word" >&5
2661
2657
if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
2662
2658
echo $ac_n "(cached) $ac_c" 1>&6
2698
2694
# Extract the first word of "$ac_prog", so it can be a program name with args.
2699
2695
set dummy $ac_prog; ac_word=$2
2700
2696
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2701
echo "configure:2702: checking for $ac_word" >&5
2697
echo "configure:2698: checking for $ac_word" >&5
2702
2698
if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2703
2699
echo $ac_n "(cached) $ac_c" 1>&6
2739
2735
# Extract the first word of "$ac_prog", so it can be a program name with args.
2740
2736
set dummy $ac_prog; ac_word=$2
2741
2737
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2742
echo "configure:2743: checking for $ac_word" >&5
2738
echo "configure:2739: checking for $ac_word" >&5
2743
2739
if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then
2744
2740
echo $ac_n "(cached) $ac_c" 1>&6
2780
2776
# Extract the first word of "$ac_prog", so it can be a program name with args.
2781
2777
set dummy $ac_prog; ac_word=$2
2782
2778
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2783
echo "configure:2784: checking for $ac_word" >&5
2779
echo "configure:2780: checking for $ac_word" >&5
2784
2780
if eval "test \"`echo '$''{'ac_cv_path_WINDRES'+set}'`\" = set"; then
2785
2781
echo $ac_n "(cached) $ac_c" 1>&6
2850
2846
echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
2851
echo "configure:2852: checking for gcc -pipe support" >&5
2847
echo "configure:2848: checking for gcc -pipe support" >&5
2852
2848
if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
2853
2849
echo '#include <stdio.h>' > dummy-hello.c
2854
2850
echo 'int main() { printf("Hello World\n"); return 0; }' >> dummy-hello.c
2900
2896
CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction"
2902
2898
echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6
2903
echo "configure:2904: checking whether C compiler supports -fprofile-generate" >&5
2899
echo "configure:2900: checking whether C compiler supports -fprofile-generate" >&5
2904
2900
cat > conftest.$ac_ext <<EOF
2905
#line 2906 "configure"
2901
#line 2902 "configure"
2906
2902
#include "confdefs.h"
2912
if { (eval echo configure:2913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2908
if { (eval echo configure:2909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2913
2909
rm -rf conftest*
2914
2910
PROFILE_GEN_CFLAGS="-fprofile-generate"
2933
2929
if test "$GNU_CC"; then
2934
2930
echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6
2935
echo "configure:2936: checking for visibility(hidden) attribute" >&5
2931
echo "configure:2932: checking for visibility(hidden) attribute" >&5
2936
2932
if eval "test \"`echo '$''{'ac_cv_visibility_hidden'+set}'`\" = set"; then
2937
2933
echo $ac_n "(cached) $ac_c" 1>&6
2958
2954
echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6
2959
echo "configure:2960: checking for visibility pragma support" >&5
2955
echo "configure:2956: checking for visibility pragma support" >&5
2960
2956
if eval "test \"`echo '$''{'ac_cv_visibility_pragma'+set}'`\" = set"; then
2961
2957
echo $ac_n "(cached) $ac_c" 1>&6
3009
3005
# Extract the first word of "$ac_prog", so it can be a program name with args.
3010
3006
set dummy $ac_prog; ac_word=$2
3011
3007
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3012
echo "configure:3013: checking for $ac_word" >&5
3008
echo "configure:3009: checking for $ac_word" >&5
3013
3009
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
3014
3010
echo $ac_n "(cached) $ac_c" 1>&6
3330
3327
_SAVE_CFLAGS="$CFLAGS"
3331
3328
CFLAGS="$arch_flag"
3332
3329
cat > conftest.$ac_ext <<EOF
3333
#line 3334 "configure"
3330
#line 3331 "configure"
3334
3331
#include "confdefs.h"
3337
3334
return sizeof(__thumb2__);
3340
if { (eval echo configure:3341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3337
if { (eval echo configure:3338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3341
3338
rm -rf conftest*
3399
3396
_SAVE_CFLAGS="$CFLAGS"
3400
3397
CFLAGS="$all_flags"
3401
3398
echo $ac_n "checking whether the chosen combination of compiler flags ($all_flags) works""... $ac_c" 1>&6
3402
echo "configure:3403: checking whether the chosen combination of compiler flags ($all_flags) works" >&5
3399
echo "configure:3400: checking whether the chosen combination of compiler flags ($all_flags) works" >&5
3403
3400
cat > conftest.$ac_ext <<EOF
3404
#line 3405 "configure"
3401
#line 3402 "configure"
3405
3402
#include "confdefs.h"
3411
if { (eval echo configure:3412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3408
if { (eval echo configure:3409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3412
3409
rm -rf conftest*
3413
3410
echo "$ac_t""yes" 1>&6
3465
3462
DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
3466
3463
ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
3467
3464
echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
3468
echo "configure:3469: checking for sys/atomic_op.h" >&5
3465
echo "configure:3466: checking for sys/atomic_op.h" >&5
3469
3466
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3470
3467
echo $ac_n "(cached) $ac_c" 1>&6
3472
3469
cat > conftest.$ac_ext <<EOF
3473
#line 3474 "configure"
3470
#line 3471 "configure"
3474
3471
#include "confdefs.h"
3475
3472
#include <sys/atomic_op.h>
3477
3474
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3478
{ (eval echo configure:3479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3475
{ (eval echo configure:3476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3479
3476
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3480
3477
if test -z "$ac_err"; then
3481
3478
rm -rf conftest*
3604
3601
RESOLVE_LINK_SYMBOLS=1
3607
*-android*|*-linuxandroid*)
3608
if test -z "$USE_NSPR_THREADS"; then
3612
cat >> confdefs.h <<\EOF
3616
cat >> confdefs.h <<\EOF
3617
#define _GNU_SOURCE 1
3620
cat >> confdefs.h <<\EOF
3621
#define HAVE_FCNTL_FILE_LOCKING 1
3624
cat >> confdefs.h <<\EOF
3628
CFLAGS="$CFLAGS -Wall"
3629
CXXFLAGS="$CXXFLAGS -Wall"
3630
MDCPUCFG_H=_linux.cfg
3632
MKSHLIB='$(CC) $(DSO_LDOPTS) $(WRAP_MALLOC_LIB) -o $@'
3634
DSO_LDOPTS='-shared -Wl,-soname -Wl,$(SONAME)'
3636
_DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
3637
# combo is not yet good at debugging inlined
3638
# functions (even when using DWARF2 as the
3647
3605
cat >> confdefs.h <<\EOF
3648
3606
#define XP_BEOS 1
3671
3629
_DEBUG_FLAGS='-gdwarf-2 -O0'
3672
3630
MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
3673
3631
echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
3674
echo "configure:3675: checking for gethostbyaddr in -lbind" >&5
3632
echo "configure:3633: checking for gethostbyaddr in -lbind" >&5
3675
3633
ac_lib_var=`echo bind'_'gethostbyaddr | sed 'y%./+-%__p_%'`
3676
3634
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3677
3635
echo $ac_n "(cached) $ac_c" 1>&6
3817
3775
MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
3818
3776
DSO_CFLAGS=-fPIC
3819
DSO_LDOPTS='-shared -Wl,-soname,$(SONAME)'
3777
DSO_LDOPTS='-shared -Wl,-soname,$(@:$(OBJDIR)/%.so=%.so)'
3820
3778
STRIP="$STRIP -d"
3821
3779
case "$target_os" in
3822
3780
bsdi4.2* | bsdi4.3* | bsdi5.*)
3891
3855
if test "`echo $CC | grep -c '\-arch '`" = "0"; then
3892
3856
CC="$CC -arch $CPU_ARCH"
3858
ac_safe=`echo "crt_externs.h" | sed 'y%./+-%__p_%'`
3859
echo $ac_n "checking for crt_externs.h""... $ac_c" 1>&6
3860
echo "configure:3861: checking for crt_externs.h" >&5
3861
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3862
echo $ac_n "(cached) $ac_c" 1>&6
3864
cat > conftest.$ac_ext <<EOF
3865
#line 3866 "configure"
3866
#include "confdefs.h"
3867
#include <crt_externs.h>
3869
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3870
{ (eval echo configure:3871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3871
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3872
if test -z "$ac_err"; then
3874
eval "ac_cv_header_$ac_safe=yes"
3877
echo "configure: failed program was:" >&5
3878
cat conftest.$ac_ext >&5
3880
eval "ac_cv_header_$ac_safe=no"
3884
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3885
echo "$ac_t""yes" 1>&6
3888
echo "$ac_t""no" 1>&6
3894
3891
DSO_CFLAGS=-fPIC
3895
3892
DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
3896
3893
_OPTIMIZE_FLAGS=-O2
4047
4044
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4048
4045
DSO_CFLAGS=-fPIC
4049
DSO_LDOPTS='-shared -Wl,-soname -Wl,$(SONAME)'
4046
DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
4050
4047
MDCPUCFG_H=_freebsd.cfg
4051
4048
PR_MD_CSRCS=freebsd.c
4429
4433
CXXFLAGS="$CXXFLAGS -Wall"
4430
4434
MDCPUCFG_H=_linux.cfg
4431
4435
PR_MD_CSRCS=linux.c
4432
MKSHLIB='$(CC) $(DSO_LDOPTS) $(WRAP_MALLOC_LIB) -o $@'
4436
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4433
4437
DSO_CFLAGS=-fPIC
4434
DSO_LDOPTS='-shared -Wl,-soname -Wl,$(SONAME)'
4438
DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
4435
4439
_OPTIMIZE_FLAGS=-O2
4436
4440
_DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
4437
4441
# combo is not yet good at debugging inlined
4971
4975
MDCPUCFG_H=_nto.cfg
4972
4976
PR_MD_CSRCS=nto.c
4973
MKSHLIB='$(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(SONAME) -o $@'
4977
MKSHLIB='$(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(notdir $@) -o $@'
4974
4978
DSO_CFLAGS=-fPIC
4975
4979
DSO_LDOPTS=-shared
4976
4980
OS_LIBS="$OS_LIBS -lsocket"
5044
5048
_OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
5045
5049
ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
5046
5050
echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
5047
echo "configure:5048: checking for machine/builtins.h" >&5
5051
echo "configure:5052: checking for machine/builtins.h" >&5
5048
5052
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5049
5053
echo $ac_n "(cached) $ac_c" 1>&6
5051
5055
cat > conftest.$ac_ext <<EOF
5052
#line 5053 "configure"
5056
#line 5057 "configure"
5053
5057
#include "confdefs.h"
5054
5058
#include <machine/builtins.h>
5056
5060
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5057
{ (eval echo configure:5058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5061
{ (eval echo configure:5062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5058
5062
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5059
5063
if test -z "$ac_err"; then
5060
5064
rm -rf conftest*
5228
5232
_OPTIMIZE_FLAGS='-O -F Olimit,4000'
5231
DSO_LDOPTS='-G -z defs -h $(SONAME)'
5235
DSO_LDOPTS='-G -z defs -h $(@:$(OBJDIR)/%.so=%.so)'
5233
5237
if test "$OS_RELEASE" = "5.43"; then
5234
5238
cat >> confdefs.h <<\EOF
5323
5327
if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
5324
5328
GCC_USE_GNU_LD=1
5326
DSO_LDOPTS='-shared -Wl,-h,$(SONAME),-z,combreloc,-z,defs,-z,ignore'
5330
DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore'
5327
5331
if test -n "$USE_B_DIRECT"; then
5328
5332
DSO_LDOPTS="$DSO_LDOPTS,-Bdirect"
5331
5335
DSO_CFLAGS=-KPIC
5332
DSO_LDOPTS='-G -h $(SONAME) -z combreloc -z defs -z ignore'
5336
DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore'
5333
5337
if test -n "$USE_B_DIRECT"; then
5334
5338
DSO_LDOPTS="$DSO_LDOPTS -Bdirect"
5705
5709
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5706
echo "configure:5707: checking for dlopen in -ldl" >&5
5710
echo "configure:5711: checking for dlopen in -ldl" >&5
5707
5711
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5708
5712
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5709
5713
echo $ac_n "(cached) $ac_c" 1>&6
5739
5743
echo "$ac_t""yes" 1>&6
5740
5744
ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
5741
5745
echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
5742
echo "configure:5743: checking for dlfcn.h" >&5
5746
echo "configure:5747: checking for dlfcn.h" >&5
5743
5747
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5744
5748
echo $ac_n "(cached) $ac_c" 1>&6
5746
5750
cat > conftest.$ac_ext <<EOF
5747
#line 5748 "configure"
5751
#line 5752 "configure"
5748
5752
#include "confdefs.h"
5749
5753
#include <dlfcn.h>
5751
5755
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5752
{ (eval echo configure:5753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5756
{ (eval echo configure:5757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5753
5757
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5754
5758
if test -z "$ac_err"; then
5755
5759
rm -rf conftest*
5783
5787
if test $ac_cv_prog_gcc = yes; then
5784
5788
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
5785
echo "configure:5786: checking whether ${CC-cc} needs -traditional" >&5
5789
echo "configure:5790: checking whether ${CC-cc} needs -traditional" >&5
5786
5790
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
5787
5791
echo $ac_n "(cached) $ac_c" 1>&6
5789
5793
ac_pattern="Autoconf.*'x'"
5790
5794
cat > conftest.$ac_ext <<EOF
5791
#line 5792 "configure"
5795
#line 5796 "configure"
5792
5796
#include "confdefs.h"
5793
5797
#include <sgtty.h>
5794
5798
Autoconf TIOCGETP
5830
for ac_func in lchown strerror
5835
LIBS="$LIBS $OS_LIBS"
5836
for ac_func in lchown strerror dladdr
5832
5838
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5833
echo "configure:5834: checking for $ac_func" >&5
5839
echo "configure:5840: checking for $ac_func" >&5
5834
5840
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5835
5841
echo $ac_n "(cached) $ac_c" 1>&6
5837
5843
cat > conftest.$ac_ext <<EOF
5838
#line 5839 "configure"
5844
#line 5845 "configure"
5839
5845
#include "confdefs.h"
5840
5846
/* System header to define __stub macros and hopefully few prototypes,
5841
5847
which can conflict with char $ac_func(); below. */
5909
5916
# Extract the first word of "$ac_prog", so it can be a program name with args.
5910
5917
set dummy $ac_prog; ac_word=$2
5911
5918
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5912
echo "configure:5913: checking for $ac_word" >&5
5919
echo "configure:5920: checking for $ac_word" >&5
5913
5920
if eval "test \"`echo '$''{'ac_cv_path_CCACHE'+set}'`\" = set"; then
5914
5921
echo $ac_n "(cached) $ac_c" 1>&6
5968
5975
if test -z "$GNU_CC"; then
5970
5977
echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
5971
echo "configure:5972: checking for +Olit support" >&5
5978
echo "configure:5979: checking for +Olit support" >&5
5972
5979
if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
5973
5980
echo $ac_n "(cached) $ac_c" 1>&6
6012
6019
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
6013
echo "configure:6014: checking for pthread_create in -lpthreads" >&5
6020
echo "configure:6021: checking for pthread_create in -lpthreads" >&5
6015
6022
#include <pthread.h>
6016
6023
void *foo(void *v) { return v; }
6032
6039
echo "$ac_t""no" 1>&6
6034
6041
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
6035
echo "configure:6036: checking for pthread_create in -lpthread" >&5
6042
echo "configure:6043: checking for pthread_create in -lpthread" >&5
6037
6044
#include <pthread.h>
6038
6045
void *foo(void *v) { return v; }
6054
6061
echo "$ac_t""no" 1>&6
6056
6063
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
6057
echo "configure:6058: checking for pthread_create in -lc_r" >&5
6064
echo "configure:6065: checking for pthread_create in -lc_r" >&5
6059
6066
#include <pthread.h>
6060
6067
void *foo(void *v) { return v; }
6076
6083
echo "$ac_t""no" 1>&6
6078
6085
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
6079
echo "configure:6080: checking for pthread_create in -lc" >&5
6086
echo "configure:6087: checking for pthread_create in -lc" >&5
6081
6088
#include <pthread.h>
6082
6089
void *foo(void *v) { return v; }
6194
6201
rm -f conftest*
6195
6202
ac_cv_have_dash_pthread=no
6196
6203
echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
6197
echo "configure:6198: checking whether ${CC-cc} accepts -pthread" >&5
6204
echo "configure:6205: checking whether ${CC-cc} accepts -pthread" >&5
6198
6205
echo 'int main() { return 0; }' | cat > conftest.c
6199
6206
${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
6200
6207
if test $? -eq 0; then
6217
6224
ac_cv_have_dash_pthreads=no
6218
6225
if test "$ac_cv_have_dash_pthread" = "no"; then
6219
6226
echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
6220
echo "configure:6221: checking whether ${CC-cc} accepts -pthreads" >&5
6227
echo "configure:6228: checking whether ${CC-cc} accepts -pthreads" >&5
6221
6228
echo 'int main() { return 0; }' | cat > conftest.c
6222
6229
${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
6223
6230
if test $? -eq 0; then
6542
6549
if test -n "$_WRAP_MALLOC"; then
6543
if test "$GNU_CC"; then
6544
WRAP_MALLOC_CFLAGS="${LDFLAGS} ${WRAP_MALLOC_CFLAGS} -Wl,--wrap -Wl,malloc -Wl,--wrap -Wl,calloc -Wl,--wrap -Wl,valloc -Wl,--wrap -Wl,free -Wl,--wrap -Wl,realloc -Wl,--wrap -Wl,memalign -Wl,--wrap -Wl,__builtin_new -Wl,--wrap -Wl,__builtin_vec_new -Wl,--wrap -Wl,__builtin_delete -Wl,--wrap -Wl,__builtin_vec_delete -Wl,--wrap -Wl,PR_Free -Wl,--wrap -Wl,PR_Malloc -Wl,--wrap -Wl,PR_Calloc -Wl,--wrap -Wl,PR_Realloc -Wl,--wrap -Wl,strdup -Wl,--wrap -Wl,strndup -Wl,--wrap -Wl,posix_memalign"
6545
DSO_LDOPTS="$DSO_LDOPTS $WRAP_MALLOC_CFLAGS"
6550
if test -n "$GNU_CC"; then
6551
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=malloc,--wrap=calloc,--wrap=valloc,--wrap=free,--wrap=realloc,--wrap=memalign"
6552
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=__builtin_new,--wrap=__builtin_vec_new,--wrap=__builtin_delete,--wrap=__builtin_vec_delete"
6553
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=strdup,--wrap=strndup"
6554
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=posix_memalign,--wrap=malloc_usable_size"
6547
{ echo "configure: error: --enable-wrap-malloc is not supported for non-GNU toolchains" 1>&2; exit 1; }
6556
{ echo "configure: error: --enable-wrap-malloc is not supported for non-GNU toolchains" 1>&2; exit 1; }
6551
6560
# Check whether --with-wrap-malloc or --without-wrap-malloc was given.
6552
6561
if test "${with_wrap_malloc+set}" = set; then
6553
6562
withval="$with_wrap_malloc"
6554
WRAP_MALLOC_LIB=$withval
6563
WRAP_LDFLAGS="${WRAP_LDFLAGS} $withval"
6674
lib/libc/include/Makefile
6675
lib/libc/src/Makefile
6679
pkg/solaris/Makefile
6680
pkg/solaris/SUNWpr/Makefile
6681
pkg/solaris/SUNWprd/Makefile
6684
pr/include/md/Makefile
6685
pr/include/obsolete/Makefile
6686
pr/include/private/Makefile
6689
pr/src/linking/Makefile
6690
pr/src/malloc/Makefile
6692
pr/src/md/${PR_MD_ARCH_DIR}/Makefile
6693
pr/src/memory/Makefile
6694
pr/src/misc/Makefile
6695
pr/src/threads/Makefile
6697
pr/tests/dll/Makefile
6682
lib/libc/include/Makefile
6683
lib/libc/src/Makefile
6688
pr/include/md/Makefile
6689
pr/include/obsolete/Makefile
6690
pr/include/private/Makefile
6693
pr/src/linking/Makefile
6694
pr/src/malloc/Makefile
6696
pr/src/md/${PR_MD_ARCH_DIR}/Makefile
6697
pr/src/memory/Makefile
6698
pr/src/misc/Makefile
6699
pr/src/threads/Makefile
6701
pr/tests/dll/Makefile
6704
if test "$OS_TARGET" = "Linux"; then
6705
MAKEFILES="$MAKEFILES
6708
elif test "$OS_TARGET" = "SunOS"; then
6709
MAKEFILES="$MAKEFILES
6710
pkg/solaris/Makefile
6711
pkg/solaris/SUNWpr/Makefile
6712
pkg/solaris/SUNWprd/Makefile
6701
6716
if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then
6702
MAKEFILES="$MAKEFILES pr/src/threads/combined/Makefile"
6717
MAKEFILES="$MAKEFILES
6718
pr/src/threads/combined/Makefile
6703
6720
elif test -n "$USE_PTHREADS"; then
6704
MAKEFILES="$MAKEFILES pr/src/pthreads/Makefile"
6721
MAKEFILES="$MAKEFILES
6722
pr/src/pthreads/Makefile
6705
6724
elif test -n "$USE_BTHREADS"; then
6706
MAKEFILES="$MAKEFILES pr/src/bthreads/Makefile"
6725
MAKEFILES="$MAKEFILES
6726
pr/src/bthreads/Makefile
6709
6730
if test -n "$USE_CPLUS"; then
6710
MAKEFILES="$MAKEFILES pr/src/cplus/Makefile pr/src/cplus/tests/Makefile"
6731
MAKEFILES="$MAKEFILES
6732
pr/src/cplus/Makefile
6733
pr/src/cplus/tests/Makefile
6713
6737
echo $MAKEFILES > unallmakefiles
6778
6802
# Transform confdefs.h into DEFS.
6779
6803
# Protect against shell expansion while executing Makefile rules.
6780
6804
# Protect against Makefile macro expansion.
6782
# If the first sed substitution is executed (which looks for macros that
6783
# take arguments), then we branch to the quote section. Otherwise,
6784
# look for a macro that doesn't take arguments.
6785
cat >confdef2opt.sed <<\_ACEOF
6788
s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
6790
s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
6794
s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
6800
# We use echo to avoid assuming a particular line-breaking character.
6801
# The extra dot is to prevent the shell from consuming trailing
6802
# line-breaks from the sub-command output. A line-break within
6803
# single-quotes doesn't work because, if this script is created in a
6804
# platform that uses two characters for line-breaks (e.g., DOS), tr
6806
ac_LF_and_DOT=`echo; echo .`
6807
DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
6808
rm -f confdef2opt.sed
6805
cat > conftest.defs <<\EOF
6806
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
6807
s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
6812
DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' ' | tr '\015' ' '` # Manually modified for MKS support.
6811
6816
# Without the "./", some shells look in PATH for config.status.
6945
6950
s%@LIB_SUFFIX@%$LIB_SUFFIX%g
6946
6951
s%@DLL_SUFFIX@%$DLL_SUFFIX%g
6947
6952
s%@ASM_SUFFIX@%$ASM_SUFFIX%g
6948
s%@WRAP_MALLOC_CFLAGS@%$WRAP_MALLOC_CFLAGS%g
6949
s%@WRAP_MALLOC_LIB@%$WRAP_MALLOC_LIB%g
6953
s%@WRAP_LDFLAGS@%$WRAP_LDFLAGS%g
6950
6954
s%@MKSHLIB@%$MKSHLIB%g
6951
6955
s%@DSO_CFLAGS@%$DSO_CFLAGS%g
6952
6956
s%@DSO_LDOPTS@%$DSO_LDOPTS%g