~ubuntu-branches/ubuntu/saucy/nspr/saucy-updates

« back to all changes in this revision

Viewing changes to mozilla/nsprpub/configure

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen
  • Date: 2012-11-27 17:39:22 UTC
  • mfrom: (1.1.15) (27.1.1 raring-proposed)
  • Revision ID: package-import@ubuntu.com-20121127173922-1zfbtwmy1vczqwxq
Tags: 2:4.9.3-1ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - rules: Enable Thumb2 build on armel, armhf.
  - control: Change Vcs-* to XS-Debian-Vcs-*.
  - control: Add conflicts to evolution-documentation-*,
    language-support-translation-*.
  - control: Add Breaks: evolution-plugins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
# Any additions from configure.in:
14
14
ac_help="$ac_help
15
15
  --with-android-ndk=DIR
16
 
                      location where the Android NDK can be found"
 
16
                          location where the Android NDK can be found"
17
17
ac_help="$ac_help
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"
 
20
ac_help="$ac_help
 
21
  --with-android-version=VER
 
22
                          Android platform version, default 5"
20
23
ac_help="$ac_help
21
24
  --with-android-platform=DIR
22
 
                           location of platform dir, default NDK/build/platforms/android-5/arch-arm"
 
25
                          location of platform dir"
 
26
ac_help="$ac_help
 
27
  --with-gonk=DIR         location of gonk dir"
23
28
ac_help="$ac_help
24
29
  --with-dist-prefix=DIST_PREFIX
25
30
                          place build files in DIST_PREFIX [dist]"
667
672
fi
668
673
 
669
674
echo $ac_n "checking host system type""... $ac_c" 1>&6
670
 
echo "configure:671: checking host system type" >&5
 
675
echo "configure:676: checking host system type" >&5
671
676
 
672
677
host_alias=$host
673
678
case "$host_alias" in
688
693
echo "$ac_t""$host" 1>&6
689
694
 
690
695
echo $ac_n "checking target system type""... $ac_c" 1>&6
691
 
echo "configure:692: checking target system type" >&5
 
696
echo "configure:697: checking target system type" >&5
692
697
 
693
698
target_alias=$target
694
699
case "$target_alias" in
706
711
echo "$ac_t""$target" 1>&6
707
712
 
708
713
echo $ac_n "checking build system type""... $ac_c" 1>&6
709
 
echo "configure:710: checking build system type" >&5
 
714
echo "configure:715: checking build system type" >&5
710
715
 
711
716
build_alias=$build
712
717
case "$build_alias" in
730
735
 
731
736
 
732
737
MOD_MAJOR_VERSION=4
733
 
MOD_MINOR_VERSION=8
734
 
MOD_PATCH_VERSION=9
 
738
MOD_MINOR_VERSION=9
 
739
MOD_PATCH_VERSION=3
735
740
NSPR_MODNAME=nspr20
736
741
_HAVE_PTHREADS=
737
742
USE_PTHREADS=
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
788
793
else
852
857
fi
853
858
 
854
859
 
 
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
 
864
else
 
865
  android_version=5
 
866
fi
 
867
 
 
868
 
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"
865
879
    ;;
866
 
arm-android-eabi)
867
 
    android_tool_prefix="arm-eabi"
 
880
i?86-*android*)
 
881
    android_tool_prefix="i686-android-linux"
 
882
    ;;
 
883
mipsel-*android*)
 
884
    android_tool_prefix="mipsel-linux-android"
868
885
    ;;
869
886
*)
870
887
    android_tool_prefix="$target_os"
871
888
    ;;
872
889
esac
873
890
 
 
891
 
 
892
# Check whether --with-gonk or --without-gonk was given.
 
893
if test "${with_gonk+set}" = set; then
 
894
  withval="$with_gonk"
 
895
  gonkdir=$withval
 
896
fi
 
897
 
 
898
 
 
899
if test -n "$gonkdir" ; then
 
900
    
 
901
        if test -z "$HOST_CPPFLAGS" ; then
 
902
        HOST_CPPFLAGS=" "
 
903
    fi
 
904
    if test -z "$HOST_CFLAGS" ; then
 
905
        HOST_CFLAGS=" "
 
906
    fi
 
907
    if test -z "$HOST_CXXFLAGS" ; then
 
908
        HOST_CXXFLAGS=" "
 
909
    fi
 
910
    if test -z "$HOST_LDFLAGS" ; then
 
911
        HOST_LDFLAGS=" "
 
912
    fi
 
913
 
 
914
    cat >> confdefs.h <<\EOF
 
915
#define ANDROID 1
 
916
EOF
 
917
 
 
918
else
874
919
case "$target" in
875
920
*-android*|*-linuxandroid*)
876
921
    if test -z "$android_ndk" ; then
878
923
    fi
879
924
 
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
 
928
 
 
929
        kernel_name=`uname -s | tr "[:upper:]" "[:lower:]"`
 
930
 
 
931
        case "$target_cpu" in
 
932
        arm)
 
933
            target_name=arm-linux-androideabi-4.4.3
 
934
            ;;
 
935
        i?86)
 
936
            target_name=x86-4.4.3
 
937
            ;;
 
938
        mipsel)
 
939
            target_name=mipsel-linux-android-4.4.3
 
940
            ;;
 
941
        esac
 
942
        android_toolchain="$android_ndk"/toolchains/$target_name/prebuilt/$kernel_name-x86
 
943
 
 
944
        if test -d "$android_toolchain" ; then
 
945
            echo "$ac_t""$android_toolchain" 1>&6
 
946
        else
 
947
            { echo "configure: error: not found. You have to specify --with-android-toolchain=/path/to/ndk/toolchain." 1>&2; exit 1; }
 
948
        fi
882
949
    fi
883
950
 
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
 
954
 
 
955
        case "$target_cpu" in
 
956
        arm)
 
957
            target_name=arm
 
958
            ;;
 
959
        i?86)
 
960
            target_name=x86
 
961
            ;;
 
962
        mipsel)
 
963
            target_name=mips
 
964
            ;;
 
965
        esac
 
966
 
 
967
        android_platform="$android_ndk"/platforms/android-"$android_version"/arch-"$target_name"
 
968
 
 
969
        if test -d "$android_platform" ; then
 
970
            echo "$ac_t""$android_platform" 1>&6
 
971
        else
 
972
            { echo "configure: error: not found. You have to specify --with-android-platform=/path/to/ndk/platform." 1>&2; exit 1; }
 
973
        fi
886
974
    fi
887
975
 
888
976
        AS="$android_toolchain"/bin/"$android_tool_prefix"-as
895
983
    STRIP="$android_toolchain"/bin/"$android_tool_prefix"-strip
896
984
 
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"
901
989
 
902
990
        if test -z "$HOST_CPPFLAGS" ; then
912
1000
        HOST_LDFLAGS=" "
913
1001
    fi
914
1002
 
915
 
    WRAP_MALLOC_CFLAGS="-Wl,--wrap=dlopen -Wl,--wrap=dlclose -Wl,--wrap=dlerror -Wl,--wrap=dlsym -Wl,--wrap=dladdr"
916
 
 
917
1003
    cat >> confdefs.h <<\EOF
918
1004
#define ANDROID 1
919
1005
EOF
920
1006
 
 
1007
    cat >> confdefs.h <<EOF
 
1008
#define ANDROID_VERSION $android_version
 
1009
EOF
 
1010
 
921
1011
    ;;
922
1012
esac
 
1013
fi
923
1014
 
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
1219
1310
else
1275
1366
fi
1276
1367
 
1277
1368
if test -z "$SKIP_COMPILER_CHECKS"; then
1278
 
if test "$target" != "$host"; then
 
1369
 
 
1370
if test "$target" != "$host" -o -n "$CROSS_COMPILE"; then
1279
1371
    echo "cross compiling from $host to $target"
1280
1372
    cross_compiling=yes
1281
1373
 
1284
1376
    _SAVE_LDFLAGS="$LDFLAGS"
1285
1377
 
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
1289
1381
do
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
1296
1388
else
1336
1428
    LDFLAGS="$HOST_LDFLAGS"
1337
1429
 
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"
1343
1435
 
1344
1436
int main() {
1345
1437
return(0);
1346
1438
; return 0; }
1347
1439
EOF
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
1351
1443
else
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"
1369
 
        ;;        
1370
 
    esac            
 
1461
        ;;
 
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"
 
1467
        ;;
 
1468
    esac
1371
1469
 
1372
1470
    for ac_prog in $CC "${target_alias}-gcc" "${target}-gcc"
1373
1471
do
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
1380
1478
else
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
1414
1512
else
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
1444
1542
else
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
1495
1593
else
1521
1619
fi
1522
1620
 
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
1525
1623
 
1526
1624
ac_ext=c
1527
1625
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1532
1630
 
1533
1631
cat > conftest.$ac_ext << EOF
1534
1632
 
1535
 
#line 1536 "configure"
 
1633
#line 1634 "configure"
1536
1634
#include "confdefs.h"
1537
1635
 
1538
1636
main(){return(0);}
1539
1637
EOF
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; }
1564
1662
fi
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
1569
1667
 
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
1574
1672
else
1577
1675
  yes;
1578
1676
#endif
1579
1677
EOF
1580
 
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1581: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
 
1678
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1581
1679
  ac_cv_prog_gcc=yes
1582
1680
else
1583
1681
  ac_cv_prog_gcc=no
1596
1694
ac_save_CFLAGS="$CFLAGS"
1597
1695
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
1602
1700
else
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
1639
1737
else
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
1675
1773
else
1701
1799
 
1702
1800
 
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
1705
1803
 
1706
1804
ac_ext=C
1707
1805
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1712
1810
 
1713
1811
cat > conftest.$ac_ext << EOF
1714
1812
 
1715
 
#line 1716 "configure"
 
1813
#line 1814 "configure"
1716
1814
#include "confdefs.h"
1717
1815
 
1718
1816
int main(){return(0);}
1719
1817
EOF
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; }
1744
1842
fi
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
1749
1847
 
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
1754
1852
else
1757
1855
  yes;
1758
1856
#endif
1759
1857
EOF
1760
 
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
 
1858
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1761
1859
  ac_cv_prog_gxx=yes
1762
1860
else
1763
1861
  ac_cv_prog_gxx=no
1776
1874
ac_save_CXXFLAGS="$CXXFLAGS"
1777
1875
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
1782
1880
else
1807
1905
  fi
1808
1906
fi
1809
1907
 
1810
 
for ac_declaration in \
1811
 
   ''\
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);' \
1817
 
   'void exit (int);'
1818
 
do
1819
 
  cat > conftest.$ac_ext <<EOF
1820
 
#line 1821 "configure"
1821
 
#include "confdefs.h"
1822
 
#include <stdlib.h>
1823
 
$ac_declaration
1824
 
int main() {
1825
 
exit (42);
1826
 
; return 0; }
1827
 
EOF
1828
 
if { (eval echo configure:1829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1829
 
  :
1830
 
else
1831
 
  echo "configure: failed program was:" >&5
1832
 
  cat conftest.$ac_ext >&5
1833
 
  rm -rf conftest*
1834
 
  continue
1835
 
fi
1836
 
rm -f conftest*
1837
 
  cat > conftest.$ac_ext <<EOF
1838
 
#line 1839 "configure"
1839
 
#include "confdefs.h"
1840
 
$ac_declaration
1841
 
int main() {
1842
 
exit (42);
1843
 
; return 0; }
1844
 
EOF
1845
 
if { (eval echo configure:1846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1846
 
  rm -rf conftest*
1847
 
  break
1848
 
else
1849
 
  echo "configure: failed program was:" >&5
1850
 
  cat conftest.$ac_ext >&5
1851
 
fi
1852
 
rm -f conftest*
1853
 
done
1854
 
if test -n "$ac_declaration"; then
1855
 
  echo '#ifdef __cplusplus' >>confdefs.h
1856
 
  echo $ac_declaration      >>confdefs.h
1857
 
  echo '#endif'             >>confdefs.h
1858
 
fi
1859
 
 
1860
 
 
1861
1908
    fi
1862
1909
 
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
1867
1914
        ;;
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
1878
1925
else
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
1913
1960
else
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
1948
1995
else
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
1983
2030
else
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
2018
2065
else
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
2053
2100
else
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
2088
2135
else
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
2118
2165
else
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
2169
2216
else
2195
2242
fi
2196
2243
 
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
2199
2246
 
2200
2247
ac_ext=c
2201
2248
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2206
2253
 
2207
2254
cat > conftest.$ac_ext << EOF
2208
2255
 
2209
 
#line 2210 "configure"
 
2256
#line 2257 "configure"
2210
2257
#include "confdefs.h"
2211
2258
 
2212
2259
main(){return(0);}
2213
2260
EOF
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; }
2238
2285
fi
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
2243
2290
 
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
2248
2295
else
2251
2298
  yes;
2252
2299
#endif
2253
2300
EOF
2254
 
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
 
2301
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2255
2302
  ac_cv_prog_gcc=yes
2256
2303
else
2257
2304
  ac_cv_prog_gcc=no
2270
2317
ac_save_CFLAGS="$CFLAGS"
2271
2318
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
2276
2323
else
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
2316
2363
else
2342
2389
 
2343
2390
 
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
2346
2393
 
2347
2394
ac_ext=C
2348
2395
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2353
2400
 
2354
2401
cat > conftest.$ac_ext << EOF
2355
2402
 
2356
 
#line 2357 "configure"
 
2403
#line 2404 "configure"
2357
2404
#include "confdefs.h"
2358
2405
 
2359
2406
int main(){return(0);}
2360
2407
EOF
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; }
2385
2432
fi
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
2390
2437
 
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
2395
2442
else
2398
2445
  yes;
2399
2446
#endif
2400
2447
EOF
2401
 
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
 
2448
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2402
2449
  ac_cv_prog_gxx=yes
2403
2450
else
2404
2451
  ac_cv_prog_gxx=no
2417
2464
ac_save_CXXFLAGS="$CXXFLAGS"
2418
2465
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
2423
2470
else
2448
2495
  fi
2449
2496
fi
2450
2497
 
2451
 
for ac_declaration in \
2452
 
   ''\
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);' \
2458
 
   'void exit (int);'
2459
 
do
2460
 
  cat > conftest.$ac_ext <<EOF
2461
 
#line 2462 "configure"
2462
 
#include "confdefs.h"
2463
 
#include <stdlib.h>
2464
 
$ac_declaration
2465
 
int main() {
2466
 
exit (42);
2467
 
; return 0; }
2468
 
EOF
2469
 
if { (eval echo configure:2470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2470
 
  :
2471
 
else
2472
 
  echo "configure: failed program was:" >&5
2473
 
  cat conftest.$ac_ext >&5
2474
 
  rm -rf conftest*
2475
 
  continue
2476
 
fi
2477
 
rm -f conftest*
2478
 
  cat > conftest.$ac_ext <<EOF
2479
 
#line 2480 "configure"
2480
 
#include "confdefs.h"
2481
 
$ac_declaration
2482
 
int main() {
2483
 
exit (42);
2484
 
; return 0; }
2485
 
EOF
2486
 
if { (eval echo configure:2487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2487
 
  rm -rf conftest*
2488
 
  break
2489
 
else
2490
 
  echo "configure: failed program was:" >&5
2491
 
  cat conftest.$ac_ext >&5
2492
 
fi
2493
 
rm -f conftest*
2494
 
done
2495
 
if test -n "$ac_declaration"; then
2496
 
  echo '#ifdef __cplusplus' >>confdefs.h
2497
 
  echo $ac_declaration      >>confdefs.h
2498
 
  echo '#endif'             >>confdefs.h
2499
 
fi
2500
 
 
2501
 
 
2502
2498
        fi
2503
2499
    fi
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
2508
2504
  CPP=
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>
2523
2519
Syntax Error
2524
2520
EOF
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
2529
2525
  :
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>
2540
2536
Syntax Error
2541
2537
EOF
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
2546
2542
  :
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>
2557
2553
Syntax Error
2558
2554
EOF
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
2563
2559
  :
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
2590
2586
else
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
2622
2618
else
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
2663
2659
else
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
2704
2700
else
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
2745
2741
else
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
2786
2782
else
2848
2844
fi
2849
2845
 
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
2863
2859
        _SAVE_CFLAGS=$CFLAGS
2864
2860
        CFLAGS="$CFLAGS -pipe"
2865
2861
        cat > conftest.$ac_ext <<EOF
2866
 
#line 2867 "configure"
 
2862
#line 2863 "configure"
2867
2863
#include "confdefs.h"
2868
2864
 #include <stdio.h> 
2869
2865
int main() {
2870
2866
printf("Hello World\n");
2871
2867
; return 0; }
2872
2868
EOF
2873
 
if { (eval echo configure:2874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
2869
if { (eval echo configure:2870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2874
2870
  rm -rf conftest*
2875
2871
  _res_gcc_pipe="yes"
2876
2872
else
2900
2896
CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction"
2901
2897
 
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"
2907
2903
 
2908
2904
int main() {
2909
2905
return 0;
2910
2906
; return 0; }
2911
2907
EOF
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"
2915
2911
                 result="yes" 
2932
2928
 
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
2938
2934
else
2956
2952
EOF
2957
2953
 
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
2962
2958
else
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
3015
3011
else
3222
3218
 
3223
3219
 
3224
3220
 
3225
 
case "${CPU_ARCH}-${OS_TARGET}" in
3226
 
arm-Android)
 
3221
case "$target" in
 
3222
arm*-android*|arm*-linuxandroid*)
3227
3223
    MOZ_THUMB=yes
3228
3224
    MOZ_ARCH=armv7-a
3229
3225
    MOZ_FPU=vfp
3230
3226
    MOZ_FLOAT_ABI=softfp
 
3227
    MOZ_SOFT_FLOAT=yes
3231
3228
    ;;
3232
 
arm-*)
 
3229
arm*-*)
3233
3230
    if test -n "$MOZ_PLATFORM_MAEMO"; then
3234
3231
        MOZ_THUMB=no
3235
3232
        MOZ_ARCH=armv7-a
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"
3335
3332
 
3336
3333
int main() {
3337
3334
return sizeof(__thumb2__);
3338
3335
; return 0; }
3339
3336
EOF
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*
3342
3339
  MOZ_THUMB2=1
3343
3340
else
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"
3406
3403
 
3407
3404
int main() {
3408
3405
return 0;
3409
3406
; return 0; }
3410
3407
EOF
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
3414
3411
else
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
3471
3468
else
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>
3476
3473
EOF
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
3605
3602
    ;;
3606
3603
        
3607
 
*-android*|*-linuxandroid*)
3608
 
    if test -z "$USE_NSPR_THREADS"; then
3609
 
        USE_PTHREADS=1
3610
 
        IMPL_STRATEGY=_PTH
3611
 
    fi
3612
 
    cat >> confdefs.h <<\EOF
3613
 
#define XP_UNIX 1
3614
 
EOF
3615
 
 
3616
 
    cat >> confdefs.h <<\EOF
3617
 
#define _GNU_SOURCE 1
3618
 
EOF
3619
 
 
3620
 
    cat >> confdefs.h <<\EOF
3621
 
#define HAVE_FCNTL_FILE_LOCKING 1
3622
 
EOF
3623
 
 
3624
 
    cat >> confdefs.h <<\EOF
3625
 
#define LINUX 1
3626
 
EOF
3627
 
 
3628
 
    CFLAGS="$CFLAGS -Wall"
3629
 
    CXXFLAGS="$CXXFLAGS -Wall"
3630
 
    MDCPUCFG_H=_linux.cfg
3631
 
    PR_MD_CSRCS=linux.c
3632
 
    MKSHLIB='$(CC) $(DSO_LDOPTS) $(WRAP_MALLOC_LIB) -o $@'
3633
 
    DSO_CFLAGS=-fPIC
3634
 
    DSO_LDOPTS='-shared -Wl,-soname -Wl,$(SONAME)'
3635
 
    _OPTIMIZE_FLAGS=-O2
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
3639
 
                                   # debugging format)
3640
 
    COMPILER_TAG=_glibc
3641
 
    CPU_ARCH=arm
3642
 
    CPU_ARCH_TAG=_arm
3643
 
    OS_TARGET=Android
3644
 
    ;;
3645
 
 
3646
3604
*-beos*)
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
3679
3637
  ac_save_LIBS="$LIBS"
3680
3638
LIBS="-lbind  $LIBS"
3681
3639
cat > conftest.$ac_ext <<EOF
3682
 
#line 3683 "configure"
 
3640
#line 3641 "configure"
3683
3641
#include "confdefs.h"
3684
3642
/* Override any gcc2 internal prototype to avoid an error.  */
3685
3643
/* We use char because int might match the return type of a gcc2
3690
3648
gethostbyaddr()
3691
3649
; return 0; }
3692
3650
EOF
3693
 
if { (eval echo configure:3694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
3651
if { (eval echo configure:3652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3694
3652
  rm -rf conftest*
3695
3653
  eval "ac_cv_lib_$ac_lib_var=yes"
3696
3654
else
3816
3774
 
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.*)
3877
3835
    AS='$(CC) -x assembler-with-cpp'
3878
3836
    CFLAGS="$CFLAGS -Wall -fno-common"
3879
3837
    case "${target_cpu}" in
 
3838
        arm*)
 
3839
            CPU_ARCH=arm
 
3840
            ;;
3880
3841
        i*86*)
3881
3842
            if test -n "$USE_64"; then
3882
3843
                CPU_ARCH=x86_64
3884
3845
                CPU_ARCH=i386
3885
3846
            fi
3886
3847
            ;;
 
3848
        x86_64)
 
3849
            CPU_ARCH=x86_64
 
3850
            ;;
3887
3851
        *)
3888
3852
            CPU_ARCH=ppc
3889
3853
            ;;
3891
3855
    if test "`echo $CC | grep -c '\-arch '`" = "0"; then
3892
3856
        CC="$CC -arch $CPU_ARCH"
3893
3857
    fi
 
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
 
3863
else
 
3864
  cat > conftest.$ac_ext <<EOF
 
3865
#line 3866 "configure"
 
3866
#include "confdefs.h"
 
3867
#include <crt_externs.h>
 
3868
EOF
 
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
 
3873
  rm -rf conftest*
 
3874
  eval "ac_cv_header_$ac_safe=yes"
 
3875
else
 
3876
  echo "$ac_err" >&5
 
3877
  echo "configure: failed program was:" >&5
 
3878
  cat conftest.$ac_ext >&5
 
3879
  rm -rf conftest*
 
3880
  eval "ac_cv_header_$ac_safe=no"
 
3881
fi
 
3882
rm -f conftest*
 
3883
fi
 
3884
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
3885
  echo "$ac_t""yes" 1>&6
 
3886
  :
 
3887
else
 
3888
  echo "$ac_t""no" 1>&6
 
3889
fi
 
3890
 
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
4046
4043
    fi
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
4052
4049
    ;;
4076
4073
#define _USE_BIG_FDS 1
4077
4074
EOF
4078
4075
 
4079
 
    DSO_LDOPTS='-b +h $(SONAME)'
 
4076
    DSO_LDOPTS='-b +h $(notdir $@)'
4080
4077
    PR_MD_CSRCS=hpux.c
4081
4078
    if test "$OS_TEST" = "ia64"; then
4082
4079
        DLL_SUFFIX=so
4400
4397
        esac
4401
4398
    ;;
4402
4399
 
4403
 
*-linux*|*-gnu*|*-k*bsd*-gnu)
 
4400
*-linux*|*-gnu*|*-k*bsd*-gnu|*-android*|*-linuxandroid*)
4404
4401
    if test -z "$USE_NSPR_THREADS"; then
4405
4402
        USE_PTHREADS=1
4406
4403
        IMPL_STRATEGY=_PTH
4417
4414
#define HAVE_FCNTL_FILE_LOCKING 1
4418
4415
EOF
4419
4416
 
4420
 
    case "${target_os}" in
4421
 
    linux*)
 
4417
    case "${target}" in
 
4418
    *-android*|*-linuxandroid*)
 
4419
        OS_TARGET=Android
 
4420
        cat >> confdefs.h <<\EOF
 
4421
#define LINUX 1
 
4422
EOF
 
4423
 
 
4424
        ;;
 
4425
    *-linux*)
4422
4426
        cat >> confdefs.h <<\EOF
4423
4427
#define LINUX 1
4424
4428
EOF
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
4879
4883
        else
4880
4884
            OBJECT_FMT=ELF
4881
4885
            DLL_SUFFIX=so
4882
 
            DSO_LDOPTS='-shared -Wl,-soname,$(SONAME)'
 
4886
            DSO_LDOPTS='-shared -Wl,-soname,$(notdir $@)'
4883
4887
        fi
4884
4888
    fi
4885
4889
 
4970
4974
 
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
5050
5054
else
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>
5055
5059
EOF
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*
5104
5108
EOF
5105
5109
 
5106
5110
    fi
5107
 
    DSO_LDOPTS='-shared -all -expect_unresolved "*" -soname $(SONAME)'
 
5111
    DSO_LDOPTS='-shared -all -expect_unresolved "*" -soname $(notdir $@)'
5108
5112
    MDCPUCFG_H=_osf1.cfg
5109
5113
    PR_MD_CSRCS=osf1.c
5110
5114
    ;;
5228
5232
        _OPTIMIZE_FLAGS='-O -F Olimit,4000'
5229
5233
    fi
5230
5234
 
5231
 
    DSO_LDOPTS='-G -z defs -h $(SONAME)'
 
5235
    DSO_LDOPTS='-G -z defs -h $(@:$(OBJDIR)/%.so=%.so)'
5232
5236
 
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
5325
5329
        fi
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"
5329
5333
        fi
5330
5334
    else
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"
5335
5339
        fi
5703
5707
    ;;
5704
5708
*)
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
5711
5715
  ac_save_LIBS="$LIBS"
5712
5716
LIBS="-ldl  $LIBS"
5713
5717
cat > conftest.$ac_ext <<EOF
5714
 
#line 5715 "configure"
 
5718
#line 5719 "configure"
5715
5719
#include "confdefs.h"
5716
5720
/* Override any gcc2 internal prototype to avoid an error.  */
5717
5721
/* We use char because int might match the return type of a gcc2
5722
5726
dlopen()
5723
5727
; return 0; }
5724
5728
EOF
5725
 
if { (eval echo configure:5726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5729
if { (eval echo configure:5730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5726
5730
  rm -rf conftest*
5727
5731
  eval "ac_cv_lib_$ac_lib_var=yes"
5728
5732
else
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
5745
5749
else
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>
5750
5754
EOF
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*
5782
5786
 
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
5788
5792
else
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
5806
5810
 
5807
5811
  if test $ac_cv_prog_gcc_traditional = no; then
5808
5812
    cat > conftest.$ac_ext <<EOF
5809
 
#line 5810 "configure"
 
5813
#line 5814 "configure"
5810
5814
#include "confdefs.h"
5811
5815
#include <termio.h>
5812
5816
Autoconf TCGETA
5827
5831
  fi
5828
5832
fi
5829
5833
 
5830
 
for ac_func in lchown strerror
 
5834
_SAVE_LIBS="$LIBS"
 
5835
LIBS="$LIBS $OS_LIBS"
 
5836
for ac_func in lchown strerror dladdr
5831
5837
do
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
5836
5842
else
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.  */
5858
5864
 
5859
5865
; return 0; }
5860
5866
EOF
5861
 
if { (eval echo configure:5862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5867
if { (eval echo configure:5868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5862
5868
  rm -rf conftest*
5863
5869
  eval "ac_cv_func_$ac_func=yes"
5864
5870
else
5882
5888
fi
5883
5889
done
5884
5890
 
 
5891
LIBS="$_SAVE_LIBS"
5885
5892
 
5886
5893
 
5887
5894
 
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
5915
5922
else
5968
5975
if test -z "$GNU_CC"; then
5969
5976
 
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
5974
5981
else
6010
6017
*)
6011
6018
    
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
6014
6021
echo "
6015
6022
    #include <pthread.h> 
6016
6023
    void *foo(void *v) { return v; } 
6032
6039
        echo "$ac_t""no" 1>&6
6033
6040
        
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
6036
6043
echo "
6037
6044
    #include <pthread.h> 
6038
6045
    void *foo(void *v) { return v; } 
6054
6061
        echo "$ac_t""no" 1>&6
6055
6062
        
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
6058
6065
echo "
6059
6066
    #include <pthread.h> 
6060
6067
    void *foo(void *v) { return v; } 
6076
6083
        echo "$ac_t""no" 1>&6
6077
6084
        
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
6080
6087
echo "
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
6540
6547
 
6541
6548
 
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"
6546
6555
    else
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; }
6548
6557
    fi
6549
6558
fi
6550
6559
 
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"
6555
6564
fi
6556
6565
 
6557
6566
 
6659
6668
 
6660
6669
 
6661
6670
 
6662
 
 
6663
6671
MAKEFILES="
6664
 
Makefile 
6665
 
config/Makefile
6666
 
config/autoconf.mk
6667
 
config/nsprincl.mk
6668
 
config/nsprincl.sh
6669
 
config/nspr-config
6670
 
config/nspr.pc
6671
 
lib/Makefile 
6672
 
lib/ds/Makefile 
6673
 
lib/libc/Makefile 
6674
 
lib/libc/include/Makefile 
6675
 
lib/libc/src/Makefile 
6676
 
lib/tests/Makefile
6677
 
pkg/Makefile
6678
 
pkg/linux/Makefile
6679
 
pkg/solaris/Makefile
6680
 
pkg/solaris/SUNWpr/Makefile
6681
 
pkg/solaris/SUNWprd/Makefile
6682
 
pr/Makefile 
6683
 
pr/include/Makefile 
6684
 
pr/include/md/Makefile 
6685
 
pr/include/obsolete/Makefile 
6686
 
pr/include/private/Makefile 
6687
 
pr/src/Makefile 
6688
 
pr/src/io/Makefile 
6689
 
pr/src/linking/Makefile 
6690
 
pr/src/malloc/Makefile 
6691
 
pr/src/md/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 
6696
 
pr/tests/Makefile 
6697
 
pr/tests/dll/Makefile 
 
6672
    Makefile
 
6673
    config/Makefile
 
6674
    config/autoconf.mk
 
6675
    config/nsprincl.mk
 
6676
    config/nsprincl.sh
 
6677
    config/nspr-config
 
6678
    config/nspr.pc
 
6679
    lib/Makefile
 
6680
    lib/ds/Makefile
 
6681
    lib/libc/Makefile
 
6682
    lib/libc/include/Makefile
 
6683
    lib/libc/src/Makefile
 
6684
    lib/tests/Makefile
 
6685
    pkg/Makefile
 
6686
    pr/Makefile
 
6687
    pr/include/Makefile
 
6688
    pr/include/md/Makefile
 
6689
    pr/include/obsolete/Makefile
 
6690
    pr/include/private/Makefile
 
6691
    pr/src/Makefile
 
6692
    pr/src/io/Makefile
 
6693
    pr/src/linking/Makefile
 
6694
    pr/src/malloc/Makefile
 
6695
    pr/src/md/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
 
6700
    pr/tests/Makefile
 
6701
    pr/tests/dll/Makefile
6698
6702
"
6699
6703
 
 
6704
if test "$OS_TARGET" = "Linux"; then
 
6705
    MAKEFILES="$MAKEFILES
 
6706
        pkg/linux/Makefile
 
6707
    "
 
6708
elif test "$OS_TARGET" = "SunOS"; then
 
6709
    MAKEFILES="$MAKEFILES
 
6710
        pkg/solaris/Makefile
 
6711
        pkg/solaris/SUNWpr/Makefile
 
6712
        pkg/solaris/SUNWprd/Makefile
 
6713
    "
 
6714
fi
6700
6715
 
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
 
6719
    "
6703
6720
elif test -n "$USE_PTHREADS"; then
6704
 
    MAKEFILES="$MAKEFILES pr/src/pthreads/Makefile"
 
6721
    MAKEFILES="$MAKEFILES
 
6722
        pr/src/pthreads/Makefile
 
6723
    "
6705
6724
elif test -n "$USE_BTHREADS"; then
6706
 
    MAKEFILES="$MAKEFILES pr/src/bthreads/Makefile"
 
6725
    MAKEFILES="$MAKEFILES
 
6726
        pr/src/bthreads/Makefile
 
6727
    "
6707
6728
fi
6708
6729
 
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
 
6734
    "
6711
6735
fi
6712
6736
 
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.
6781
 
#
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
6786
 
t clear
6787
 
: clear
6788
 
s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\),-D\1=\2,g
6789
 
t quote
6790
 
s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\),-D\1=\2,g
6791
 
t quote
6792
 
d
6793
 
: quote
6794
 
s,[     `~#$^&*(){}\\|;'"<>?],\\&,g
6795
 
s,\[,\\&,g
6796
 
s,\],\\&,g
6797
 
s,\$,$$,g
6798
 
p
6799
 
_ACEOF
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
6805
 
# would break.
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
 
6808
s%\[%\\&%g
 
6809
s%\]%\\&%g
 
6810
s%\$%$$%g
 
6811
EOF
 
6812
DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' ' | tr '\015' ' '` # Manually modified for MKS support.
 
6813
rm -f conftest.defs
6809
6814
 
6810
6815
 
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