| #! /bin/sh |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| if test `uname -s | grep -c MINGW 2>/dev/null` != "0"; then |
| msyshost=1 |
| fi |
| |
| . ./old-configure.vars |
| |
| # Guess values for system-dependent variables and create Makefiles. |
| # Generated automatically using autoconf version 2.13 |
| # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
| # |
| # This configure script is free software; the Free Software Foundation |
| # gives unlimited permission to copy, distribute and modify it. |
| |
| # Defaults: |
| ac_help= |
| ac_default_prefix=/usr/local |
| # Any additions from configure.in: |
| ac_help="$ac_help |
| --enable-release Build with more conservative, release engineering-oriented options. |
| This may slow down builds." |
| ac_help="$ac_help |
| --with-android-cxx-stl=VALUE |
| use the specified C++ STL (stlport, libstdc++, libc++)" |
| ac_help="$ac_help |
| --with-android-version=VER |
| android platform version, default 9" |
| ac_help="$ac_help |
| --with-ios-sdk=TYPE |
| Type of iOS SDK to use (iphonesimulator, iphoneos) |
| and optionally version (like iphoneos8.2)" |
| ac_help="$ac_help |
| --enable-ios-target=VER (default=8.0) |
| Set the minimum iOS version needed at runtime" |
| ac_help="$ac_help |
| --enable-rust Include Rust language sources" |
| ac_help="$ac_help |
| --with-windows-version=WINSDK_TARGETVER |
| Windows SDK version to target. Win8.1 (603) is |
| currently the minimum supported version." |
| ac_help="$ac_help |
| --enable-macos-target=VER (default=10.6) |
| Set the minimum MacOS version needed at runtime" |
| ac_help="$ac_help |
| --with-macos-sdk=dir Location of platform SDK to use (Mac OS X only)" |
| ac_help="$ac_help |
| --with-x use the X Window System" |
| ac_help="$ac_help |
| --with-arch=[[type|toolchain-default]] |
| Use specific CPU features (-march=type). Resets |
| thumb, fpu, float-abi, etc. defaults when set" |
| ac_help="$ac_help |
| --with-thumb[[=yes|no|toolchain-default]] |
| Use Thumb instruction set (-mthumb)" |
| ac_help="$ac_help |
| --with-thumb-interwork[[=yes|no|toolchain-default]] |
| Use Thumb/ARM instuctions interwork (-mthumb-interwork)" |
| ac_help="$ac_help |
| --with-fpu=[[type|toolchain-default]] |
| Use specific FPU type (-mfpu=type)" |
| ac_help="$ac_help |
| --with-float-abi=[[type|toolchain-default]] |
| Use specific arm float ABI (-mfloat-abi=type)" |
| ac_help="$ac_help |
| --with-soft-float[[=yes|no|toolchain-default]] |
| Use soft float library (-msoft-float)" |
| ac_help="$ac_help |
| --enable-address-sanitizer Enable Address Sanitizer (default=no)" |
| ac_help="$ac_help |
| --enable-memory-sanitizer Enable Memory Sanitizer (default=no)" |
| ac_help="$ac_help |
| --enable-thread-sanitizer Enable Thread Sanitizer (default=no)" |
| ac_help="$ac_help |
| --enable-llvm-hacks Enable workarounds required for several LLVM instrumentations (default=no)" |
| ac_help="$ac_help |
| --enable-warnings-as-errors |
| Enable treating warnings as errors" |
| ac_help="$ac_help |
| --disable-ion Disable use of the IonMonkey JIT" |
| ac_help="$ac_help |
| --enable-debug[=DBG] Enable building with developer debug info |
| (using compiler flags DBG)" |
| ac_help="$ac_help |
| --with-debug-label=LABELS |
| Define DEBUG_<value> for each comma-separated |
| value given." |
| ac_help="$ac_help |
| --enable-debug-symbols[=DBG] |
| Enable debugging symbols (using compiler flags DBG)" |
| ac_help="$ac_help |
| --enable-cpp-rtti Enable C++ RTTI " |
| ac_help="$ac_help |
| --enable-gold Enable GNU Gold Linker when it is not already the default" |
| ac_help="$ac_help |
| --disable-icf Disable Identical Code Folding" |
| ac_help="$ac_help |
| --enable-pie Enable Position Independent Executables" |
| ac_help="$ac_help |
| --enable-dtrace build with dtrace support if available (default=no)" |
| ac_help="$ac_help |
| --with-linux-headers=DIR |
| location where the Linux kernel headers can be found" |
| ac_help="$ac_help |
| --with-pthreads Force use of system pthread library with NSPR " |
| ac_help="$ac_help |
| --enable-update-channel=CHANNEL |
| Select application update channel (default=default)" |
| ac_help="$ac_help |
| --with-nspr-cflags=FLAGS |
| Pass FLAGS to CC when building code that uses NSPR. |
| Use this when there's no accurate nspr-config |
| script available. This is the case when building |
| SpiderMonkey as part of the Mozilla tree: the |
| top-level configure script computes NSPR flags |
| that accomodate the quirks of that environment." |
| ac_help="$ac_help |
| --with-nspr-libs=LIBS Pass LIBS to LD when linking code that uses NSPR. |
| See --with-nspr-cflags for more details." |
| ac_help="$ac_help |
| --enable-nspr-build Build NSPR from source tree" |
| ac_help="$ac_help |
| --with-system-nspr Use an NSPR that is already built and installed. |
| Use the 'nspr-config' script in the current path, |
| or look for the script in the directories given with |
| --with-nspr-exec-prefix or --with-nspr-prefix. |
| (Those flags are only checked if you specify |
| --with-system-nspr.)" |
| ac_help="$ac_help |
| --enable-posix-nspr-emulation |
| Enable emulation of NSPR for POSIX systems" |
| ac_help="$ac_help |
| --with-nspr-prefix=PFX Prefix where NSPR is installed" |
| ac_help="$ac_help |
| --with-nspr-exec-prefix=PFX |
| Exec prefix where NSPR is installed" |
| ac_help="$ac_help |
| --with-system-zlib[=PFX] |
| Use system libz [installed at prefix PFX]" |
| ac_help="$ac_help |
| --enable-system-ffi Use system libffi (located with pkgconfig)" |
| ac_help="$ac_help |
| --enable-ui-locale=ab-CD |
| Select the user interface locale (default: en-US)" |
| ac_help="$ac_help |
| --disable-tests Do not build test libraries & programs" |
| ac_help="$ac_help |
| --disable-optimize Disable compiler optimization |
| --enable-optimize=[OPT] Specify compiler optimization flags [OPT=-O]" |
| ac_help="$ac_help |
| --disable-trace-logging Disable trace logging" |
| ac_help="$ac_help |
| --disable-jemalloc Don't replace memory allocator with jemalloc" |
| ac_help="$ac_help |
| --enable-small-chunk-size Allocate memory for JS GC things in smaller chunks" |
| ac_help="$ac_help |
| --enable-gc-trace Enable tracing of allocation and finalization" |
| ac_help="$ac_help |
| --enable-valgrind Enable Valgrind integration hooks (default=no)" |
| ac_help="$ac_help |
| --enable-simulator=ARCH |
| Enable a JIT code simulator for the specified arch. |
| (arm, arm64, mips32, mips64)." |
| ac_help="$ac_help |
| --enable-jitspew Enable the Jit spew and IONFLAGS." |
| ac_help="$ac_help |
| --enable-gczeal Enable zealous GCing" |
| ac_help="$ac_help |
| --enable-perf Enable Linux perf integration" |
| ac_help="$ac_help |
| --enable-more-deterministic |
| Enable changes that make the shell more deterministic" |
| ac_help="$ac_help |
| --enable-oom-breakpoint |
| Enable a breakpoint function for artificial OOMs" |
| ac_help="$ac_help |
| --enable-clang-plugin Enable building with the mozilla clang plugin " |
| ac_help="$ac_help |
| --with-sixgill=path/to/sixgill |
| Enable static checking of code using sixgill" |
| ac_help="$ac_help |
| --enable-strip Enable stripping of libs & executables " |
| ac_help="$ac_help |
| --enable-install-strip Enable stripping of libs & executables when packaging " |
| ac_help="$ac_help |
| --jitreport-granularity=N |
| Default granularity at which to report JIT code |
| to external tools |
| 0 - no info |
| 1 - code ranges for whole functions only |
| 2 - per-line information |
| 3 - per-op information" |
| ac_help="$ac_help |
| --enable-readline Link js shell to system readline library" |
| ac_help="$ac_help |
| --enable-ctypes Enable js-ctypes (default=no)" |
| ac_help="$ac_help |
| --with-qemu-exe=path Use path as an arm emulator on host platforms" |
| ac_help="$ac_help |
| --with-cross-lib=dir Use dir as the location for arm libraries" |
| ac_help="$ac_help |
| --with-system-icu |
| Use system ICU (located with pkgconfig)" |
| ac_help="$ac_help |
| --with-intl-api, --with-intl-api=build, --without-intl-api |
| Determine the status of the ECMAScript Internationalization API. The first |
| (or lack of any of these) builds and exposes the API. The second builds it |
| but doesn't use ICU or expose the API to script. The third doesn't build |
| ICU at all." |
| |
| # Initialize some variables set by options. |
| # The variables have the same names as the options, with |
| # dashes changed to underlines. |
| build=NONE |
| cache_file=./config.cache |
| exec_prefix=NONE |
| host=NONE |
| no_create= |
| nonopt=NONE |
| no_recursion= |
| prefix=NONE |
| program_prefix=NONE |
| program_suffix=NONE |
| program_transform_name=s,x,x, |
| silent= |
| site= |
| srcdir= |
| target=NONE |
| verbose= |
| x_includes=NONE |
| x_libraries=NONE |
| bindir='${exec_prefix}/bin' |
| sbindir='${exec_prefix}/sbin' |
| libexecdir='${exec_prefix}/libexec' |
| datadir='${prefix}/share' |
| sysconfdir='${prefix}/etc' |
| sharedstatedir='${prefix}/com' |
| localstatedir='${prefix}/var' |
| libdir='${exec_prefix}/lib' |
| includedir='${prefix}/include' |
| oldincludedir='/usr/include' |
| infodir='${prefix}/info' |
| mandir='${prefix}/man' |
| |
| # Initialize some other variables. |
| subdirs= |
| MFLAGS= MAKEFLAGS= |
| SHELL=${CONFIG_SHELL-/bin/sh} |
| # Maximum number of lines to put in a shell here document. |
| ac_max_here_lines=12 |
| |
| ac_prev= |
| for ac_option |
| do |
| |
| # If the previous option needs an argument, assign it. |
| if test -n "$ac_prev"; then |
| eval "$ac_prev=\$ac_option" |
| ac_prev= |
| continue |
| fi |
| |
| case "$ac_option" in |
| -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
| *) ac_optarg= ;; |
| esac |
| |
| # Accept the important Cygnus configure options, so we can diagnose typos. |
| |
| case "$ac_option" in |
| |
| -bindir | --bindir | --bindi | --bind | --bin | --bi) |
| ac_prev=bindir ;; |
| -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) |
| bindir="$ac_optarg" ;; |
| |
| -build | --build | --buil | --bui | --bu) |
| ac_prev=build ;; |
| -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
| build="$ac_optarg" ;; |
| |
| -cache-file | --cache-file | --cache-fil | --cache-fi \ |
| | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) |
| ac_prev=cache_file ;; |
| -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ |
| | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) |
| cache_file="$ac_optarg" ;; |
| |
| -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
| ac_prev=datadir ;; |
| -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ |
| | --da=*) |
| datadir="$ac_optarg" ;; |
| |
| -disable-* | --disable-*) |
| ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` |
| # Reject names that are not valid shell variable names. |
| if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then |
| { echo "configure: error: $ac_feature: invalid feature name" 1>&2; echo "configure: error: $ac_feature: invalid feature name" 1>&5; exit 1; } |
| fi |
| ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| eval "enable_${ac_feature}=no" ;; |
| |
| -enable-* | --enable-*) |
| ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` |
| # Reject names that are not valid shell variable names. |
| if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then |
| { echo "configure: error: $ac_feature: invalid feature name" 1>&2; echo "configure: error: $ac_feature: invalid feature name" 1>&5; exit 1; } |
| fi |
| ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| case "$ac_option" in |
| *=*) ;; |
| *) ac_optarg=yes ;; |
| esac |
| eval "enable_${ac_feature}='$ac_optarg'" ;; |
| |
| -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ |
| | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ |
| | --exec | --exe | --ex) |
| ac_prev=exec_prefix ;; |
| -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ |
| | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ |
| | --exec=* | --exe=* | --ex=*) |
| exec_prefix="$ac_optarg" ;; |
| |
| -gas | --gas | --ga | --g) |
| # Obsolete; use --with-gas. |
| with_gas=yes ;; |
| |
| -help | --help | --hel | --he) |
| # Omit some internal or obsolete options to make the list less imposing. |
| # This message is too long to be a string in the A/UX 3.1 sh. |
| cat << EOF |
| Usage: configure [options] [host] |
| Options: [defaults in brackets after descriptions] |
| Configuration: |
| --cache-file=FILE cache test results in FILE |
| --help print this message |
| --no-create do not create output files |
| --quiet, --silent do not print \`checking...' messages |
| --version print the version of autoconf that created configure |
| Directory and file names: |
| --prefix=PREFIX install architecture-independent files in PREFIX |
| [$ac_default_prefix] |
| --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
| [same as prefix] |
| --bindir=DIR user executables in DIR [EPREFIX/bin] |
| --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] |
| --libexecdir=DIR program executables in DIR [EPREFIX/libexec] |
| --datadir=DIR read-only architecture-independent data in DIR |
| [PREFIX/share] |
| --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] |
| --sharedstatedir=DIR modifiable architecture-independent data in DIR |
| [PREFIX/com] |
| --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] |
| --libdir=DIR object code libraries in DIR [EPREFIX/lib] |
| --includedir=DIR C header files in DIR [PREFIX/include] |
| --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] |
| --infodir=DIR info documentation in DIR [PREFIX/info] |
| --mandir=DIR man documentation in DIR [PREFIX/man] |
| --srcdir=DIR find the sources in DIR [configure dir or ..] |
| --program-prefix=PREFIX prepend PREFIX to installed program names |
| --program-suffix=SUFFIX append SUFFIX to installed program names |
| --program-transform-name=PROGRAM |
| run sed PROGRAM on installed program names |
| EOF |
| cat << EOF |
| Host type: |
| --build=BUILD configure for building on BUILD [BUILD=HOST] |
| --host=HOST configure for HOST [guessed] |
| --target=TARGET configure for TARGET [TARGET=HOST] |
| Features and packages: |
| --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
| --enable-FEATURE[=ARG] include FEATURE [ARG=yes] |
| --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
| --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
| --x-includes=DIR X include files are in DIR |
| --x-libraries=DIR X library files are in DIR |
| EOF |
| if test -n "$ac_help"; then |
| echo "--enable and --with options recognized:$ac_help" |
| fi |
| exit 0 ;; |
| |
| -host | --host | --hos | --ho) |
| ac_prev=host ;; |
| -host=* | --host=* | --hos=* | --ho=*) |
| host="$ac_optarg" ;; |
| |
| -includedir | --includedir | --includedi | --included | --include \ |
| | --includ | --inclu | --incl | --inc) |
| ac_prev=includedir ;; |
| -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ |
| | --includ=* | --inclu=* | --incl=* | --inc=*) |
| includedir="$ac_optarg" ;; |
| |
| -infodir | --infodir | --infodi | --infod | --info | --inf) |
| ac_prev=infodir ;; |
| -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) |
| infodir="$ac_optarg" ;; |
| |
| -libdir | --libdir | --libdi | --libd) |
| ac_prev=libdir ;; |
| -libdir=* | --libdir=* | --libdi=* | --libd=*) |
| libdir="$ac_optarg" ;; |
| |
| -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ |
| | --libexe | --libex | --libe) |
| ac_prev=libexecdir ;; |
| -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ |
| | --libexe=* | --libex=* | --libe=*) |
| libexecdir="$ac_optarg" ;; |
| |
| -localstatedir | --localstatedir | --localstatedi | --localstated \ |
| | --localstate | --localstat | --localsta | --localst \ |
| | --locals | --local | --loca | --loc | --lo) |
| ac_prev=localstatedir ;; |
| -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ |
| | --localstate=* | --localstat=* | --localsta=* | --localst=* \ |
| | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) |
| localstatedir="$ac_optarg" ;; |
| |
| -mandir | --mandir | --mandi | --mand | --man | --ma | --m) |
| ac_prev=mandir ;; |
| -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) |
| mandir="$ac_optarg" ;; |
| |
| -nfp | --nfp | --nf) |
| # Obsolete; use --without-fp. |
| with_fp=no ;; |
| |
| -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| | --no-cr | --no-c) |
| no_create=yes ;; |
| |
| -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) |
| no_recursion=yes ;; |
| |
| -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
| | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ |
| | --oldin | --oldi | --old | --ol | --o) |
| ac_prev=oldincludedir ;; |
| -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ |
| | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ |
| | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) |
| oldincludedir="$ac_optarg" ;; |
| |
| -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
| ac_prev=prefix ;; |
| -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) |
| prefix="$ac_optarg" ;; |
| |
| -program-prefix | --program-prefix | --program-prefi | --program-pref \ |
| | --program-pre | --program-pr | --program-p) |
| ac_prev=program_prefix ;; |
| -program-prefix=* | --program-prefix=* | --program-prefi=* \ |
| | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) |
| program_prefix="$ac_optarg" ;; |
| |
| -program-suffix | --program-suffix | --program-suffi | --program-suff \ |
| | --program-suf | --program-su | --program-s) |
| ac_prev=program_suffix ;; |
| -program-suffix=* | --program-suffix=* | --program-suffi=* \ |
| | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) |
| program_suffix="$ac_optarg" ;; |
| |
| -program-transform-name | --program-transform-name \ |
| | --program-transform-nam | --program-transform-na \ |
| | --program-transform-n | --program-transform- \ |
| | --program-transform | --program-transfor \ |
| | --program-transfo | --program-transf \ |
| | --program-trans | --program-tran \ |
| | --progr-tra | --program-tr | --program-t) |
| ac_prev=program_transform_name ;; |
| -program-transform-name=* | --program-transform-name=* \ |
| | --program-transform-nam=* | --program-transform-na=* \ |
| | --program-transform-n=* | --program-transform-=* \ |
| | --program-transform=* | --program-transfor=* \ |
| | --program-transfo=* | --program-transf=* \ |
| | --program-trans=* | --program-tran=* \ |
| | --progr-tra=* | --program-tr=* | --program-t=*) |
| program_transform_name="$ac_optarg" ;; |
| |
| -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| | -silent | --silent | --silen | --sile | --sil) |
| silent=yes ;; |
| |
| -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
| ac_prev=sbindir ;; |
| -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ |
| | --sbi=* | --sb=*) |
| sbindir="$ac_optarg" ;; |
| |
| -sharedstatedir | --sharedstatedir | --sharedstatedi \ |
| | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ |
| | --sharedst | --shareds | --shared | --share | --shar \ |
| | --sha | --sh) |
| ac_prev=sharedstatedir ;; |
| -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ |
| | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ |
| | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ |
| | --sha=* | --sh=*) |
| sharedstatedir="$ac_optarg" ;; |
| |
| -site | --site | --sit) |
| ac_prev=site ;; |
| -site=* | --site=* | --sit=*) |
| site="$ac_optarg" ;; |
| |
| -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
| ac_prev=srcdir ;; |
| -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) |
| srcdir="$ac_optarg" ;; |
| |
| -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
| | --syscon | --sysco | --sysc | --sys | --sy) |
| ac_prev=sysconfdir ;; |
| -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ |
| | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) |
| sysconfdir="$ac_optarg" ;; |
| |
| -target | --target | --targe | --targ | --tar | --ta | --t) |
| ac_prev=target ;; |
| -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
| target="$ac_optarg" ;; |
| |
| -v | -verbose | --verbose | --verbos | --verbo | --verb) |
| verbose=yes ;; |
| |
| -version | --version | --versio | --versi | --vers) |
| echo "configure generated by autoconf version 2.13" |
| exit 0 ;; |
| |
| -with-* | --with-*) |
| ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` |
| # Reject names that are not valid shell variable names. |
| if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then |
| { echo "configure: error: $ac_package: invalid package name" 1>&2; echo "configure: error: $ac_package: invalid package name" 1>&5; exit 1; } |
| fi |
| ac_package=`echo $ac_package| sed 's/-/_/g'` |
| case "$ac_option" in |
| *=*) ;; |
| *) ac_optarg=yes ;; |
| esac |
| eval "with_${ac_package}='$ac_optarg'" ;; |
| |
| -without-* | --without-*) |
| ac_package=`echo $ac_option|sed -e 's/-*without-//'` |
| # Reject names that are not valid shell variable names. |
| if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then |
| { echo "configure: error: $ac_package: invalid package name" 1>&2; echo "configure: error: $ac_package: invalid package name" 1>&5; exit 1; } |
| fi |
| ac_package=`echo $ac_package| sed 's/-/_/g'` |
| eval "with_${ac_package}=no" ;; |
| |
| --x) |
| # Obsolete; use --with-x. |
| with_x=yes ;; |
| |
| -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ |
| | --x-incl | --x-inc | --x-in | --x-i) |
| ac_prev=x_includes ;; |
| -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ |
| | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) |
| x_includes="$ac_optarg" ;; |
| |
| -x-libraries | --x-libraries | --x-librarie | --x-librari \ |
| | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) |
| ac_prev=x_libraries ;; |
| -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ |
| | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) |
| x_libraries="$ac_optarg" ;; |
| |
| -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&5; exit 1; } |
| ;; |
| |
| *) |
| if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
| echo "configure: warning: $ac_option: invalid host type" 1>&2 |
| fi |
| if test "x$nonopt" != xNONE; then |
| { echo "configure: error: can only configure for one host and one target at a time" 1>&2; echo "configure: error: can only configure for one host and one target at a time" 1>&5; exit 1; } |
| fi |
| nonopt="$ac_option" |
| ;; |
| |
| esac |
| done |
| |
| if test -n "$ac_prev"; then |
| { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&5; exit 1; } |
| fi |
| |
| if test -z "$srcdir"; then |
| srcdir=`dirname "$0"` |
| fi |
| srcdir="$srcdir/../.." |
| trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
| |
| # File descriptor usage: |
| # 0 standard input |
| # 1 file creation |
| # 2 errors and warnings |
| # 3 some systems may open it to /dev/tty |
| # 4 used on the Kubota Titan |
| # 6 checking for... messages and results |
| # 5 compiler messages saved in config.log |
| if test "$silent" = yes; then |
| exec 6>/dev/null |
| else |
| exec 6>&1 |
| fi |
| exec 5>>./config.log |
| |
| echo "\ |
| This file contains any messages produced by compilers while |
| running configure, to aid debugging if configure makes a mistake. |
| " 1>&5 |
| |
| # Strip out --no-create and --no-recursion so they do not pile up. |
| # Also quote any args containing shell metacharacters. |
| ac_configure_args= |
| for ac_arg |
| do |
| case "$ac_arg" in |
| -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| | --no-cr | --no-c) ;; |
| -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; |
| *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) |
| ac_configure_args="$ac_configure_args '$ac_arg'" ;; |
| *) ac_configure_args="$ac_configure_args $ac_arg" ;; |
| esac |
| done |
| |
| # NLS nuisances. |
| # Only set these to C if already set. These must not be set unconditionally |
| # because not all systems understand e.g. LANG=C (notably SCO). |
| # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! |
| # Non-C LC_CTYPE values break the ctype check. |
| if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
| if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
| if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi |
| if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi |
| |
| # confdefs.h avoids OS command line length limits that DEFS can exceed. |
| rm -rf conftest* confdefs.h |
| # AIX cpp loses on an empty file, so make sure it contains at least a newline. |
| echo > confdefs.h |
| |
| # A filename unique to this package, relative to the directory that |
| # configure is in, which we can look for to find out if srcdir is correct. |
| ac_unique_file=js/src/jsapi.h |
| |
| # Find the source files, if location was not specified. |
| if test -z "$srcdir"; then |
| ac_srcdir_defaulted=yes |
| # Try the directory containing this script, then its parent. |
| ac_prog=$0 |
| ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` |
| test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. |
| srcdir=$ac_confdir |
| if test ! -r $srcdir/$ac_unique_file; then |
| srcdir=.. |
| fi |
| else |
| ac_srcdir_defaulted=no |
| fi |
| if test ! -r $srcdir/$ac_unique_file; then |
| if test "$ac_srcdir_defaulted" = yes; then |
| { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; echo "configure: error: can not find sources in $ac_confdir or .." 1>&5; exit 1; } |
| else |
| { echo "configure: error: can not find sources in $srcdir" 1>&2; echo "configure: error: can not find sources in $srcdir" 1>&5; exit 1; } |
| fi |
| fi |
| srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` |
| |
| # Prefer explicitly selected file to automatically selected ones. |
| if test -z "$CONFIG_SITE"; then |
| if test "x$prefix" != xNONE; then |
| CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" |
| else |
| CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" |
| fi |
| fi |
| for ac_site_file in $CONFIG_SITE; do |
| if test -r "$ac_site_file"; then |
| echo "loading site script $ac_site_file" |
| . "$ac_site_file" |
| fi |
| done |
| |
| if test -r "$cache_file"; then |
| echo "loading cache $cache_file" |
| . $cache_file |
| else |
| echo "creating cache $cache_file" |
| > $cache_file |
| fi |
| |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| ac_exeext= |
| ac_objext=o |
| if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
| # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. |
| if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then |
| ac_n= ac_c=' |
| ' ac_t=' ' |
| else |
| ac_n=-n ac_c= ac_t= |
| fi |
| else |
| ac_n= ac_c='\c' ac_t= |
| fi |
| |
| |
| |
| test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| # Let make expand exec_prefix. |
| test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
| |
| > subconfigures |
| > skip_subconfigures |
| |
| |
| ac_aux_dir= |
| for ac_dir in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf; do |
| if test -f $ac_dir/install-sh; then |
| ac_aux_dir=$ac_dir |
| ac_install_sh="$ac_aux_dir/install-sh -c" |
| break |
| elif test -f $ac_dir/install.sh; then |
| ac_aux_dir=$ac_dir |
| ac_install_sh="$ac_aux_dir/install.sh -c" |
| break |
| fi |
| done |
| if test -z "$ac_aux_dir"; then |
| { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf" 1>&2; echo "configure: error: can not find install-sh or install.sh in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf" 1>&5; exit 1; } |
| fi |
| ac_config_guess=$ac_aux_dir/config.guess |
| ac_config_sub=$ac_aux_dir/config.sub |
| ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. |
| |
| |
| # Do some error checking and defaulting for the host and target type. |
| # The inputs are: |
| # configure --host=HOST --target=TARGET --build=BUILD NONOPT |
| # |
| # The rules are: |
| # 1. You are not allowed to specify --host, --target, and nonopt at the |
| # same time. |
| # 2. Host defaults to nonopt. |
| # 3. If nonopt is not specified, then host defaults to the current host, |
| # as determined by config.guess. |
| # 4. Target and build default to nonopt. |
| # 5. If nonopt is not specified, then target and build default to host. |
| |
| # The aliases save the names the user supplied, while $host etc. |
| # will get canonicalized. |
| case $host---$target---$nonopt in |
| NONE---*---* | *---NONE---* | *---*---NONE) ;; |
| *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; echo "configure: error: can only configure for one host and one target at a time" 1>&5; exit 1; } ;; |
| esac |
| |
| |
| # Make sure we can run config.sub. |
| if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : |
| else { echo "configure: error: can not run $ac_config_sub" 1>&2; echo "configure: error: can not run $ac_config_sub" 1>&5; exit 1; } |
| fi |
| |
| echo $ac_n "checking host system type""... $ac_c" 1>&6 |
| echo "configure:861: checking host system type" >&5 |
| |
| host_alias=$host |
| case "$host_alias" in |
| NONE) |
| case $nonopt in |
| NONE) |
| if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : |
| else { echo "configure: error: can not guess host type; you must specify one" 1>&2; echo "configure: error: can not guess host type; you must specify one" 1>&5; exit 1; } |
| fi ;; |
| *) host_alias=$nonopt ;; |
| esac ;; |
| esac |
| |
| host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` |
| host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
| host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` |
| host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` |
| echo "$ac_t""$host" 1>&6 |
| |
| echo $ac_n "checking target system type""... $ac_c" 1>&6 |
| echo "configure:882: checking target system type" >&5 |
| |
| target_alias=$target |
| case "$target_alias" in |
| NONE) |
| case $nonopt in |
| NONE) target_alias=$host_alias ;; |
| *) target_alias=$nonopt ;; |
| esac ;; |
| esac |
| |
| target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` |
| target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
| target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` |
| target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` |
| echo "$ac_t""$target" 1>&6 |
| |
| echo $ac_n "checking build system type""... $ac_c" 1>&6 |
| echo "configure:900: checking build system type" >&5 |
| |
| build_alias=$build |
| case "$build_alias" in |
| NONE) |
| case $nonopt in |
| NONE) build_alias=$host_alias ;; |
| *) build_alias=$nonopt ;; |
| esac ;; |
| esac |
| |
| build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` |
| build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
| build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` |
| build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` |
| echo "$ac_t""$build" 1>&6 |
| |
| test "$host_alias" != "$target_alias" && |
| test "$program_prefix$program_suffix$program_transform_name" = \ |
| NONENONEs,x,x, && |
| program_prefix=${target_alias}- |
| |
| |
| CFLAGS="${CFLAGS=}" |
| CPPFLAGS="${CPPFLAGS=}" |
| CXXFLAGS="${CXXFLAGS=}" |
| LDFLAGS="${LDFLAGS=}" |
| HOST_CFLAGS="${HOST_CFLAGS=}" |
| HOST_CXXFLAGS="${HOST_CXXFLAGS=}" |
| HOST_LDFLAGS="${HOST_LDFLAGS=}" |
| |
| _SUBDIR_CC="$CC" |
| _SUBDIR_CXX="$CXX" |
| _SUBDIR_CFLAGS="$CFLAGS" |
| _SUBDIR_CPPFLAGS="$CPPFLAGS" |
| _SUBDIR_CXXFLAGS="$CXXFLAGS" |
| _SUBDIR_LDFLAGS="$LDFLAGS" |
| _SUBDIR_HOST_CC="$HOST_CC" |
| _SUBDIR_HOST_CFLAGS="$HOST_CFLAGS" |
| _SUBDIR_HOST_CXXFLAGS="$HOST_CXXFLAGS" |
| _SUBDIR_HOST_LDFLAGS="$HOST_LDFLAGS" |
| _SUBDIR_CONFIG_ARGS="$ac_configure_args" |
| |
| NSPR_VERSION=4 |
| NSPR_MINVER=4.9.2 |
| |
| WINDRES_VERSION=2.14.90 |
| W32API_VERSION=3.14 |
| |
| MSMANIFEST_TOOL= |
| |
| MISSING_X= |
| |
| USE_PTHREADS= |
| _PTHREAD_LDFLAGS="" |
| |
| _topsrcdir=`cd $srcdir; pwd -W 2>/dev/null || pwd -P` |
| _objdir=`pwd -P` |
| |
| MOZ_BUILD_ROOT=`pwd -W 2>/dev/null || pwd -P` |
| |
| |
| if test -z "$MOZILLA_OFFICIAL"; then |
| DEVELOPER_OPTIONS=1 |
| fi |
| # Check whether --enable-release or --disable-release was given. |
| if test "${enable_release+set}" = set; then |
| enableval="$enable_release" |
| if test "$enableval" = "yes"; then |
| DEVELOPER_OPTIONS= |
| elif test "$enableval" = "no"; then |
| DEVELOPER_OPTIONS=1 |
| else |
| { echo "configure: error: Option, release, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, release, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| |
| if test -z "$CROSS_COMPILE"; then |
| case "$target" in |
| *-mingw*) |
| if test -z "$CC"; then CC=cl; fi |
| if test -z "$CXX"; then CXX=cl; fi |
| if test -z "$CPP"; then CPP="$CC -E -nologo"; fi |
| if test -z "$CXXCPP"; then CXXCPP="$CXX -TP -E -nologo"; ac_cv_prog_CXXCPP="$CXXCPP"; fi |
| if test -z "$LD"; then LD=link; fi |
| if test -z "$AS"; then |
| case "${target_cpu}" in |
| i*86) |
| AS=ml; |
| ;; |
| x86_64) |
| AS=ml64; |
| ;; |
| esac |
| fi |
| if test -z "$MIDL"; then MIDL=midl; fi |
| |
| # need override this flag since we don't use $(LDFLAGS) for this. |
| if test -z "$HOST_LDFLAGS" ; then |
| HOST_LDFLAGS=" " |
| fi |
| ;; |
| *-darwin*) |
| # GCC on darwin is based on gcc 4.2 and we don't support it anymore. |
| if test -z "$CC"; then |
| for ac_prog in clang |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:1011: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_path_CC'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| case "$CC" in |
| /*) |
| ac_cv_path_CC="$CC" # Let the user override the test with a path. |
| ;; |
| ?:/*) |
| ac_cv_path_CC="$CC" # Let the user override the test with a dos path. |
| ;; |
| *) |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_path_CC="$ac_dir/$ac_word" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| ;; |
| esac |
| fi |
| CC="$ac_cv_path_CC" |
| if test -n "$CC"; then |
| echo "$ac_t""$CC" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$CC" && break |
| done |
| |
| if test "$msyshost"; then |
| case "$CC" in |
| /*) |
| tmp_DIRNAME=`dirname "$CC"` |
| tmp_BASENAME=`basename "$CC"` |
| tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` |
| CC="$tmp_PWD/$tmp_BASENAME" |
| if test -e "$CC.exe"; then |
| CC="$CC.exe" |
| fi |
| esac |
| fi |
| |
| fi |
| if test -z "$CXX"; then |
| for ac_prog in clang++ |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:1066: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_path_CXX'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| case "$CXX" in |
| /*) |
| ac_cv_path_CXX="$CXX" # Let the user override the test with a path. |
| ;; |
| ?:/*) |
| ac_cv_path_CXX="$CXX" # Let the user override the test with a dos path. |
| ;; |
| *) |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_path_CXX="$ac_dir/$ac_word" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| ;; |
| esac |
| fi |
| CXX="$ac_cv_path_CXX" |
| if test -n "$CXX"; then |
| echo "$ac_t""$CXX" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$CXX" && break |
| done |
| |
| if test "$msyshost"; then |
| case "$CXX" in |
| /*) |
| tmp_DIRNAME=`dirname "$CXX"` |
| tmp_BASENAME=`basename "$CXX"` |
| tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` |
| CXX="$tmp_PWD/$tmp_BASENAME" |
| if test -e "$CXX.exe"; then |
| CXX="$CXX.exe" |
| fi |
| esac |
| fi |
| |
| fi |
| IS_GCC=$($CC -v 2>&1 | grep gcc) |
| if test -n "$IS_GCC" |
| then |
| echo gcc is known to be broken on OS X, please use clang. |
| echo see http://developer.mozilla.org/en-US/docs/Developer_Guide/Build_Instructions/Mac_OS_X_Prerequisites |
| echo for more information. |
| exit 1 |
| fi |
| ;; |
| esac |
| fi |
| |
| |
| if test -z "$JS_STANDALONE"; then |
| autoconfmk=autoconf-js.mk |
| #DIST is exported from top-level configure |
| else |
| DIST="$MOZ_BUILD_ROOT/dist" |
| fi |
| |
| |
| if test -n "$gonkdir" ; then |
| kernel_name=`uname -s | tr "[:upper:]" "[:lower:]"` |
| ANDROID_VERSION=15 |
| if test -n "${PLATFORM_SDK_VERSION}"; then |
| ANDROID_VERSION="${PLATFORM_SDK_VERSION}" |
| fi |
| |
| STLPORT_CPPFLAGS="-I$_topsrcdir/build/stlport/stlport -I$gonkdir/ndk/sources/cxx-stl/system/include" |
| STLPORT_LIBS="-lstlport" |
| |
| CPPFLAGS="-DANDROID $TARGET_C_INCLUDES -I$gonkdir/frameworks/base/native/include -I$gonkdir/system/core/include -isystem $gonkdir/bionic $CPPFLAGS -I$gonkdir/external/valgrind/fxos-include" |
| CFLAGS="-mandroid -fno-short-enums -fno-exceptions $CFLAGS" |
| CXXFLAGS="-mandroid -fno-short-enums -fno-exceptions $CXXFLAGS $STLPORT_CPPFLAGS" |
| LIBS="$LIBS $STLPORT_LIBS" |
| |
| LDFLAGS="-mandroid -L$gonkdir/out/target/product/$GONK_PRODUCT/obj/lib -Wl,-rpath-link=$gonkdir/out/target/product/$GONK_PRODUCT/obj/lib --sysroot=$gonkdir/out/target/product/$GONK_PRODUCT/obj/ -llog $LDFLAGS" |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' ANDROID ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define ANDROID 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' GONK ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define GONK 1 |
| EOF |
| |
| else |
| |
| |
| # Check whether --with-android-cxx-stl or --without-android-cxx-stl was given. |
| if test "${with_android_cxx_stl+set}" = set; then |
| withval="$with_android_cxx_stl" |
| android_cxx_stl=$withval |
| else |
| android_cxx_stl=mozstlport |
| fi |
| |
| |
| |
| android_version=9 |
| |
| # Check whether --with-android-version or --without-android-version was given. |
| if test "${with_android_version+set}" = set; then |
| withval="$with_android_version" |
| android_version=$withval |
| fi |
| |
| |
| if test $android_version -lt 9 ; then |
| { echo "configure: error: --with-android-version must be at least 9." 1>&2; echo "configure: error: --with-android-version must be at least 9." 1>&5; exit 1; } |
| fi |
| |
| case "$target" in |
| *-android*|*-linuxandroid*) |
| NSPR_CONFIGURE_ARGS="$NSPR_CONFIGURE_ARGS --with-android-version=$android_version" |
| |
| echo $ac_n "checking for android platform directory""... $ac_c" 1>&6 |
| echo "configure:1198: checking for android platform directory" >&5 |
| |
| case "$target_cpu" in |
| arm) |
| target_name=arm |
| ;; |
| i?86) |
| target_name=x86 |
| ;; |
| mipsel) |
| target_name=mips |
| ;; |
| esac |
| |
| android_platform="$android_ndk"/platforms/android-"$android_version"/arch-"$target_name" |
| |
| if test -d "$android_platform" ; then |
| echo "$ac_t""$android_platform" 1>&6 |
| else |
| { echo "configure: error: not found. Please check your NDK. With the current configuration, it should be in $android_platform" 1>&2; echo "configure: error: not found. Please check your NDK. With the current configuration, it should be in $android_platform" 1>&5; exit 1; } |
| fi |
| |
| CPPFLAGS="-idirafter $android_platform/usr/include $CPPFLAGS" |
| CFLAGS="-mandroid -fno-short-enums -fno-exceptions $CFLAGS" |
| CXXFLAGS="-mandroid -fno-short-enums -fno-exceptions $CXXFLAGS" |
| ASFLAGS="-idirafter $android_platform/usr/include -DANDROID $ASFLAGS" |
| |
| LDFLAGS="-mandroid -L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform -llog -Wl,--allow-shlib-undefined $LDFLAGS" |
| ANDROID_PLATFORM="${android_platform}" |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' ANDROID ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define ANDROID 1 |
| EOF |
| |
| |
| |
| ;; |
| esac |
| |
| |
| fi |
| |
| case "$target" in |
| *-apple-darwin*) |
| |
| |
| # Check whether --with-ios-sdk or --without-ios-sdk was given. |
| if test "${with_ios_sdk+set}" = set; then |
| withval="$with_ios_sdk" |
| ios_sdk=$withval |
| fi |
| |
| |
| # Check whether --enable-ios-target or --disable-ios-target was given. |
| if test "${enable_ios_target+set}" = set; then |
| enableval="$enable_ios_target" |
| _IOS_TARGET=$enableval |
| fi |
| |
| _IOS_TARGET_DEFAULT=8.0 |
| |
| case "$target" in |
| arm*-apple-darwin*) |
| if test -z "$ios_sdk" -o "$ios_sdk" = "yes"; then |
| ios_sdk=iphoneos |
| fi |
| case "$ios_sdk" in |
| iphoneos*) |
| ios_target_arg="-miphoneos-version-min" |
| ;; |
| *) |
| { echo "configure: error: Only 'iphoneos' SDKs are valid when targeting iOS device, don't know what to do with '$ios_sdk'." 1>&2; echo "configure: error: Only 'iphoneos' SDKs are valid when targeting iOS device, don't know what to do with '$ios_sdk'." 1>&5; exit 1; } |
| ;; |
| esac |
| ;; |
| *-apple-darwin*) |
| ios_target_arg="-mios-simulator-version-min" |
| case "$ios_sdk" in |
| # Empty SDK is okay, this might be an OS X desktop build. |
| ""|iphonesimulator*) |
| ;; |
| # Default to iphonesimulator |
| yes) |
| ios_sdk=iphonesimulator |
| ;; |
| *) |
| { echo "configure: error: Only 'iphonesimulator' SDKs are valid when targeting iOS simulator." 1>&2; echo "configure: error: Only 'iphonesimulator' SDKs are valid when targeting iOS simulator." 1>&5; exit 1; } |
| ;; |
| esac |
| ;; |
| esac |
| |
| |
| if test -n "$ios_sdk"; then |
| if test -z "$_IOS_TARGET"; then |
| _IOS_TARGET=$_IOS_TARGET_DEFAULT |
| ios_target_arg="${ios_target_arg}=${_IOS_TARGET}" |
| fi |
| # Ensure that xcrun knows where this SDK is. |
| ios_sdk_path=`xcrun --sdk $ios_sdk --show-sdk-path 2>/dev/null` |
| _ret=$? |
| if test $_ret -ne 0; then |
| { echo "configure: error: iOS SDK '$ios_sdk' could not be found." 1>&2; echo "configure: error: iOS SDK '$ios_sdk' could not be found." 1>&5; exit 1; } |
| fi |
| MOZ_IOS=1 |
| export HOST_CC=clang |
| export HOST_CXX=clang++ |
| # Add isysroot, arch, and ios target arguments |
| case "$target_cpu" in |
| arm*) |
| ARGS="-arch armv7" |
| ;; |
| *) |
| # Unfortunately simulator builds need this. |
| export CROSS_COMPILE=1 |
| ;; |
| esac |
| ARGS=" $ARGS -isysroot $ios_sdk_path $ios_target_arg" |
| # Now find our tools |
| |
| |
| _prog_name=clang |
| |
| echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 |
| echo "configure:1325: checking for $_prog_name in iOS SDK" >&5 |
| if eval "test \"`echo '$''{'ac_cv_ios_path_CC'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| _path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` |
| _res=$? |
| if test $_res -ne 0; then |
| { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } |
| fi |
| ac_cv_ios_path_CC=$_path |
| |
| fi |
| |
| echo "$ac_t""$ac_cv_ios_path_CC" 1>&6 |
| CC="${ac_cv_ios_path_CC}$ARGS" |
| |
| |
| |
| _prog_name=clang++ |
| |
| echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 |
| echo "configure:1347: checking for $_prog_name in iOS SDK" >&5 |
| if eval "test \"`echo '$''{'ac_cv_ios_path_CXX'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| _path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` |
| _res=$? |
| if test $_res -ne 0; then |
| { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } |
| fi |
| ac_cv_ios_path_CXX=$_path |
| |
| fi |
| |
| echo "$ac_t""$ac_cv_ios_path_CXX" 1>&6 |
| CXX="${ac_cv_ios_path_CXX}$ARGS" |
| |
| export CPP="$CC -E" |
| export LD="$CXX" |
| |
| |
| _prog_name=`echo AR | tr "[:upper:]" "[:lower:]"` |
| |
| echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 |
| echo "configure:1371: checking for $_prog_name in iOS SDK" >&5 |
| if eval "test \"`echo '$''{'ac_cv_ios_path_AR'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| _path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` |
| _res=$? |
| if test $_res -ne 0; then |
| { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } |
| fi |
| ac_cv_ios_path_AR=$_path |
| |
| fi |
| |
| echo "$ac_t""$ac_cv_ios_path_AR" 1>&6 |
| AR="${ac_cv_ios_path_AR}" |
| |
| |
| |
| _prog_name=as |
| |
| echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 |
| echo "configure:1393: checking for $_prog_name in iOS SDK" >&5 |
| if eval "test \"`echo '$''{'ac_cv_ios_path_AS'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| _path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` |
| _res=$? |
| if test $_res -ne 0; then |
| { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } |
| fi |
| ac_cv_ios_path_AS=$_path |
| |
| fi |
| |
| echo "$ac_t""$ac_cv_ios_path_AS" 1>&6 |
| AS="${ac_cv_ios_path_AS}$ARGS" |
| |
| |
| |
| _prog_name=`echo OTOOL | tr "[:upper:]" "[:lower:]"` |
| |
| echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 |
| echo "configure:1415: checking for $_prog_name in iOS SDK" >&5 |
| if eval "test \"`echo '$''{'ac_cv_ios_path_OTOOL'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| _path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` |
| _res=$? |
| if test $_res -ne 0; then |
| { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } |
| fi |
| ac_cv_ios_path_OTOOL=$_path |
| |
| fi |
| |
| echo "$ac_t""$ac_cv_ios_path_OTOOL" 1>&6 |
| OTOOL="${ac_cv_ios_path_OTOOL}" |
| |
| |
| |
| _prog_name=`echo STRIP | tr "[:upper:]" "[:lower:]"` |
| |
| echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 |
| echo "configure:1437: checking for $_prog_name in iOS SDK" >&5 |
| if eval "test \"`echo '$''{'ac_cv_ios_path_STRIP'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| _path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` |
| _res=$? |
| if test $_res -ne 0; then |
| { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } |
| fi |
| ac_cv_ios_path_STRIP=$_path |
| |
| fi |
| |
| echo "$ac_t""$ac_cv_ios_path_STRIP" 1>&6 |
| STRIP="${ac_cv_ios_path_STRIP}" |
| |
| export PKG_CONFIG_PATH=${ios_sdk_path}/usr/lib/pkgconfig/ |
| fi |
| |
| |
| |
| ;; |
| esac |
| |
| |
| AR_FLAGS='crs $@' |
| |
| if test "$COMPILE_ENVIRONMENT"; then |
| |
| # Note: |
| # In Mozilla, we use the names $target, $host and $build incorrectly, but are |
| # too far gone to back out now. See Bug 475488: |
| # - When we say $target, we mean $host, that is, the system on which |
| # Mozilla will be run. |
| # - When we say $host, we mean $build, that is, the system on which Mozilla |
| # is built. |
| # - $target (in its correct usage) is for compilers who generate code for a |
| # different platform than $host, so it would not be used by Mozilla. |
| if test "$target" != "$host"; then |
| |
| echo "cross compiling from $host to $target" |
| |
| _SAVE_CC="$CC" |
| _SAVE_CFLAGS="$CFLAGS" |
| _SAVE_LDFLAGS="$LDFLAGS" |
| |
| echo $ac_n "checking for host c compiler""... $ac_c" 1>&6 |
| echo "configure:1485: checking for host c compiler" >&5 |
| for ac_prog in cc gcc clang cl |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:1491: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$HOST_CC"; then |
| ac_cv_prog_HOST_CC="$HOST_CC" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_HOST_CC="$ac_prog" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| HOST_CC="$ac_cv_prog_HOST_CC" |
| if test -n "$HOST_CC"; then |
| echo "$ac_t""$HOST_CC" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$HOST_CC" && break |
| done |
| test -n "$HOST_CC" || HOST_CC="""" |
| |
| if test -z "$HOST_CC"; then |
| { echo "configure: error: no acceptable c compiler found in \$PATH" 1>&2; echo "configure: error: no acceptable c compiler found in \$PATH" 1>&5; exit 1; } |
| fi |
| echo "$ac_t""$HOST_CC" 1>&6 |
| echo $ac_n "checking for host c++ compiler""... $ac_c" 1>&6 |
| echo "configure:1526: checking for host c++ compiler" >&5 |
| for ac_prog in c++ g++ clang++ cl |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:1532: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_HOST_CXX'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$HOST_CXX"; then |
| ac_cv_prog_HOST_CXX="$HOST_CXX" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_HOST_CXX="$ac_prog" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| HOST_CXX="$ac_cv_prog_HOST_CXX" |
| if test -n "$HOST_CXX"; then |
| echo "$ac_t""$HOST_CXX" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$HOST_CXX" && break |
| done |
| test -n "$HOST_CXX" || HOST_CXX="""" |
| |
| if test -z "$HOST_CXX"; then |
| { echo "configure: error: no acceptable c++ compiler found in \$PATH" 1>&2; echo "configure: error: no acceptable c++ compiler found in \$PATH" 1>&5; exit 1; } |
| fi |
| echo "$ac_t""$HOST_CXX" 1>&6 |
| |
| if test -z "$HOST_AR_FLAGS"; then |
| HOST_AR_FLAGS="$AR_FLAGS" |
| fi |
| for ac_prog in $HOST_RANLIB ranlib |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:1575: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_HOST_RANLIB'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$HOST_RANLIB"; then |
| ac_cv_prog_HOST_RANLIB="$HOST_RANLIB" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy=":" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_HOST_RANLIB="$ac_prog" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| HOST_RANLIB="$ac_cv_prog_HOST_RANLIB" |
| if test -n "$HOST_RANLIB"; then |
| echo "$ac_t""$HOST_RANLIB" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$HOST_RANLIB" && break |
| done |
| test -n "$HOST_RANLIB" || HOST_RANLIB="ranlib" |
| |
| for ac_prog in $HOST_AR ar |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:1610: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_HOST_AR'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$HOST_AR"; then |
| ac_cv_prog_HOST_AR="$HOST_AR" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy=":" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_HOST_AR="$ac_prog" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| HOST_AR="$ac_cv_prog_HOST_AR" |
| if test -n "$HOST_AR"; then |
| echo "$ac_t""$HOST_AR" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$HOST_AR" && break |
| done |
| test -n "$HOST_AR" || HOST_AR="ar" |
| |
| CC="$HOST_CC" |
| CFLAGS="$HOST_CFLAGS" |
| LDFLAGS="$HOST_LDFLAGS" |
| |
| echo $ac_n "checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6 |
| echo "configure:1645: checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5 |
| cat > conftest.$ac_ext <<EOF |
| #line 1647 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:1654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cv_prog_hostcc_works=1 echo "$ac_t""yes" 1>&6 |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| { echo "configure: error: installation or configuration problem: host compiler $HOST_CC cannot create executables." 1>&2; echo "configure: error: installation or configuration problem: host compiler $HOST_CC cannot create executables." 1>&5; exit 1; } |
| fi |
| rm -f conftest* |
| |
| CC="$HOST_CXX" |
| CFLAGS="$HOST_CXXFLAGS" |
| echo $ac_n "checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6 |
| echo "configure:1668: checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works" >&5 |
| cat > conftest.$ac_ext <<EOF |
| #line 1670 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:1677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cv_prog_hostcxx_works=1 echo "$ac_t""yes" 1>&6 |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| { echo "configure: error: installation or configuration problem: host compiler $HOST_CXX cannot create executables." 1>&2; echo "configure: error: installation or configuration problem: host compiler $HOST_CXX cannot create executables." 1>&5; exit 1; } |
| fi |
| rm -f conftest* |
| |
| CC=$_SAVE_CC |
| CFLAGS=$_SAVE_CFLAGS |
| LDFLAGS=$_SAVE_LDFLAGS |
| |
| _SAVE_PATH=$PATH |
| case "${TOOLCHAIN_PREFIX}" in |
| /*) |
| PATH="/:$PATH" |
| ;; |
| esac |
| for ac_prog in "${TOOLCHAIN_PREFIX}gcc" |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:1703: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$CC"; then |
| ac_cv_prog_CC="$CC" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_CC="$ac_prog" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| CC="$ac_cv_prog_CC" |
| if test -n "$CC"; then |
| echo "$ac_t""$CC" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$CC" && break |
| done |
| test -n "$CC" || CC=":" |
| |
| unset ac_cv_prog_CC |
| # Extract the first word of "gcc", so it can be a program name with args. |
| set dummy gcc; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:1737: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$CC"; then |
| ac_cv_prog_CC="$CC" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_CC="gcc" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| CC="$ac_cv_prog_CC" |
| if test -n "$CC"; then |
| echo "$ac_t""$CC" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| if test -z "$CC"; then |
| # Extract the first word of "cc", so it can be a program name with args. |
| set dummy cc; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:1767: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$CC"; then |
| ac_cv_prog_CC="$CC" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_prog_rejected=no |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then |
| ac_prog_rejected=yes |
| continue |
| fi |
| ac_cv_prog_CC="cc" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| if test $ac_prog_rejected = yes; then |
| # We found a bogon in the path, so make sure we never use it. |
| set dummy $ac_cv_prog_CC |
| shift |
| if test $# -gt 0; then |
| # We chose a different compiler from the bogus one. |
| # However, it has the same basename, so the bogon will be chosen |
| # first if we set CC to just the basename; use the full file name. |
| shift |
| set dummy "$ac_dir/$ac_word" "$@" |
| shift |
| ac_cv_prog_CC="$@" |
| fi |
| fi |
| fi |
| fi |
| CC="$ac_cv_prog_CC" |
| if test -n "$CC"; then |
| echo "$ac_t""$CC" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| if test -z "$CC"; then |
| case "`uname -s`" in |
| *win32* | *WIN32*) |
| # Extract the first word of "cl", so it can be a program name with args. |
| set dummy cl; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:1818: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$CC"; then |
| ac_cv_prog_CC="$CC" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_CC="cl" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| CC="$ac_cv_prog_CC" |
| if test -n "$CC"; then |
| echo "$ac_t""$CC" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| ;; |
| esac |
| fi |
| test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; echo "configure: error: no acceptable cc found in \$PATH" 1>&5; exit 1; } |
| fi |
| |
| echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
| echo "configure:1850: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
| |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| cat > conftest.$ac_ext << EOF |
| |
| #line 1861 "configure" |
| #include "confdefs.h" |
| |
| main(){return(0);} |
| EOF |
| if { (eval echo configure:1866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| ac_cv_prog_cc_works=yes |
| # If we can't run a trivial program, we are probably using a cross compiler. |
| if (./conftest; exit) 2>/dev/null; then |
| ac_cv_prog_cc_cross=no |
| else |
| ac_cv_prog_cc_cross=yes |
| fi |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| ac_cv_prog_cc_works=no |
| fi |
| rm -fr conftest* |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
| if test $ac_cv_prog_cc_works = no; then |
| { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&5; exit 1; } |
| fi |
| echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
| echo "configure:1892: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
| echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
| echo "configure:1897: checking whether we are using GNU C" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.c <<EOF |
| #ifdef __GNUC__ |
| yes; |
| #endif |
| EOF |
| if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
| ac_cv_prog_gcc=yes |
| else |
| ac_cv_prog_gcc=no |
| fi |
| fi |
| |
| echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
| |
| if test $ac_cv_prog_gcc = yes; then |
| GCC=yes |
| else |
| GCC= |
| fi |
| |
| ac_test_CFLAGS="${CFLAGS+set}" |
| ac_save_CFLAGS="$CFLAGS" |
| CFLAGS= |
| echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 |
| echo "configure:1925: checking whether ${CC-cc} accepts -g" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| echo 'void f(){}' > conftest.c |
| if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then |
| ac_cv_prog_cc_g=yes |
| else |
| ac_cv_prog_cc_g=no |
| fi |
| rm -f conftest* |
| |
| fi |
| |
| echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
| if test "$ac_test_CFLAGS" = set; then |
| CFLAGS="$ac_save_CFLAGS" |
| elif test $ac_cv_prog_cc_g = yes; then |
| if test "$GCC" = yes; then |
| CFLAGS="-g -O2" |
| else |
| CFLAGS="-g" |
| fi |
| else |
| if test "$GCC" = yes; then |
| CFLAGS="-O2" |
| else |
| CFLAGS= |
| fi |
| fi |
| |
| for ac_prog in "${TOOLCHAIN_PREFIX}g++" |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:1961: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$CXX"; then |
| ac_cv_prog_CXX="$CXX" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_CXX="$ac_prog" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| CXX="$ac_cv_prog_CXX" |
| if test -n "$CXX"; then |
| echo "$ac_t""$CXX" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$CXX" && break |
| done |
| test -n "$CXX" || CXX=":" |
| |
| unset ac_cv_prog_CXX |
| for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:1997: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$CXX"; then |
| ac_cv_prog_CXX="$CXX" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_CXX="$ac_prog" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| CXX="$ac_cv_prog_CXX" |
| if test -n "$CXX"; then |
| echo "$ac_t""$CXX" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$CXX" && break |
| done |
| test -n "$CXX" || CXX="gcc" |
| |
| |
| echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
| echo "configure:2029: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| cat > conftest.$ac_ext << EOF |
| |
| #line 2040 "configure" |
| #include "confdefs.h" |
| |
| int main(){return(0);} |
| EOF |
| if { (eval echo configure:2045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| ac_cv_prog_cxx_works=yes |
| # If we can't run a trivial program, we are probably using a cross compiler. |
| if (./conftest; exit) 2>/dev/null; then |
| ac_cv_prog_cxx_cross=no |
| else |
| ac_cv_prog_cxx_cross=yes |
| fi |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| ac_cv_prog_cxx_works=no |
| fi |
| rm -fr conftest* |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 |
| if test $ac_cv_prog_cxx_works = no; then |
| { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&5; exit 1; } |
| fi |
| echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
| echo "configure:2071: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 |
| echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 |
| echo "configure:2076: checking whether we are using GNU C++" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.C <<EOF |
| #ifdef __GNUC__ |
| yes; |
| #endif |
| EOF |
| if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
| ac_cv_prog_gxx=yes |
| else |
| ac_cv_prog_gxx=no |
| fi |
| fi |
| |
| echo "$ac_t""$ac_cv_prog_gxx" 1>&6 |
| |
| if test $ac_cv_prog_gxx = yes; then |
| GXX=yes |
| else |
| GXX= |
| fi |
| |
| ac_test_CXXFLAGS="${CXXFLAGS+set}" |
| ac_save_CXXFLAGS="$CXXFLAGS" |
| CXXFLAGS= |
| echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 |
| echo "configure:2104: checking whether ${CXX-g++} accepts -g" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| echo 'void f(){}' > conftest.cc |
| if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then |
| ac_cv_prog_cxx_g=yes |
| else |
| ac_cv_prog_cxx_g=no |
| fi |
| rm -f conftest* |
| |
| fi |
| |
| echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 |
| if test "$ac_test_CXXFLAGS" = set; then |
| CXXFLAGS="$ac_save_CXXFLAGS" |
| elif test $ac_cv_prog_cxx_g = yes; then |
| if test "$GXX" = yes; then |
| CXXFLAGS="-g -O2" |
| else |
| CXXFLAGS="-g" |
| fi |
| else |
| if test "$GXX" = yes; then |
| CXXFLAGS="-O2" |
| else |
| CXXFLAGS= |
| fi |
| fi |
| |
| for ac_declaration in \ |
| ''\ |
| '#include <stdlib.h>' \ |
| 'extern "C" void std::exit (int) throw (); using std::exit;' \ |
| 'extern "C" void std::exit (int); using std::exit;' \ |
| 'extern "C" void exit (int) throw ();' \ |
| 'extern "C" void exit (int);' \ |
| 'void exit (int);' |
| do |
| cat > conftest.$ac_ext <<EOF |
| #line 2145 "configure" |
| #include "confdefs.h" |
| #include <stdlib.h> |
| $ac_declaration |
| int main() { |
| exit (42); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:2153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| : |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| continue |
| fi |
| rm -f conftest* |
| cat > conftest.$ac_ext <<EOF |
| #line 2163 "configure" |
| #include "confdefs.h" |
| $ac_declaration |
| int main() { |
| exit (42); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:2170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| break |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| fi |
| rm -f conftest* |
| done |
| if test -n "$ac_declaration"; then |
| echo '#ifdef __cplusplus' >>confdefs.h |
| echo $ac_declaration >>confdefs.h |
| echo '#endif' >>confdefs.h |
| fi |
| |
| |
| |
| for ac_prog in "${TOOLCHAIN_PREFIX}ranlib" |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:2192: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$RANLIB"; then |
| ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_RANLIB="$ac_prog" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| RANLIB="$ac_cv_prog_RANLIB" |
| if test -n "$RANLIB"; then |
| echo "$ac_t""$RANLIB" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$RANLIB" && break |
| done |
| test -n "$RANLIB" || RANLIB=":" |
| |
| for ac_prog in "${TOOLCHAIN_PREFIX}ar" |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:2227: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$AR"; then |
| ac_cv_prog_AR="$AR" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_AR="$ac_prog" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| AR="$ac_cv_prog_AR" |
| if test -n "$AR"; then |
| echo "$ac_t""$AR" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$AR" && break |
| done |
| test -n "$AR" || AR=":" |
| |
| for ac_prog in "${TOOLCHAIN_PREFIX}as" |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:2262: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$AS"; then |
| ac_cv_prog_AS="$AS" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_AS="$ac_prog" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| AS="$ac_cv_prog_AS" |
| if test -n "$AS"; then |
| echo "$ac_t""$AS" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$AS" && break |
| done |
| test -n "$AS" || AS=":" |
| |
| for ac_prog in "${TOOLCHAIN_PREFIX}ld" |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:2297: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$LD"; then |
| ac_cv_prog_LD="$LD" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_LD="$ac_prog" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| LD="$ac_cv_prog_LD" |
| if test -n "$LD"; then |
| echo "$ac_t""$LD" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$LD" && break |
| done |
| test -n "$LD" || LD=":" |
| |
| for ac_prog in "${TOOLCHAIN_PREFIX}strip" |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:2332: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$STRIP"; then |
| ac_cv_prog_STRIP="$STRIP" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_STRIP="$ac_prog" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| STRIP="$ac_cv_prog_STRIP" |
| if test -n "$STRIP"; then |
| echo "$ac_t""$STRIP" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$STRIP" && break |
| done |
| test -n "$STRIP" || STRIP=":" |
| |
| for ac_prog in "${TOOLCHAIN_PREFIX}windres" |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:2367: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$WINDRES"; then |
| ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_WINDRES="$ac_prog" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| WINDRES="$ac_cv_prog_WINDRES" |
| if test -n "$WINDRES"; then |
| echo "$ac_t""$WINDRES" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$WINDRES" && break |
| done |
| test -n "$WINDRES" || WINDRES=":" |
| |
| for ac_prog in "${TOOLCHAIN_PREFIX}otool" |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:2402: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_OTOOL'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$OTOOL"; then |
| ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_OTOOL="$ac_prog" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| OTOOL="$ac_cv_prog_OTOOL" |
| if test -n "$OTOOL"; then |
| echo "$ac_t""$OTOOL" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$OTOOL" && break |
| done |
| test -n "$OTOOL" || OTOOL=":" |
| |
| for ac_prog in "${TOOLCHAIN_PREFIX}objcopy" |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:2437: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$OBJCOPY"; then |
| ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_OBJCOPY="$ac_prog" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| OBJCOPY="$ac_cv_prog_OBJCOPY" |
| if test -n "$OBJCOPY"; then |
| echo "$ac_t""$OBJCOPY" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$OBJCOPY" && break |
| done |
| test -n "$OBJCOPY" || OBJCOPY=":" |
| |
| PATH=$_SAVE_PATH |
| |
| else |
| # Extract the first word of "gcc", so it can be a program name with args. |
| set dummy gcc; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:2473: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$CC"; then |
| ac_cv_prog_CC="$CC" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_CC="gcc" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| CC="$ac_cv_prog_CC" |
| if test -n "$CC"; then |
| echo "$ac_t""$CC" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| if test -z "$CC"; then |
| # Extract the first word of "cc", so it can be a program name with args. |
| set dummy cc; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:2503: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$CC"; then |
| ac_cv_prog_CC="$CC" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_prog_rejected=no |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then |
| ac_prog_rejected=yes |
| continue |
| fi |
| ac_cv_prog_CC="cc" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| if test $ac_prog_rejected = yes; then |
| # We found a bogon in the path, so make sure we never use it. |
| set dummy $ac_cv_prog_CC |
| shift |
| if test $# -gt 0; then |
| # We chose a different compiler from the bogus one. |
| # However, it has the same basename, so the bogon will be chosen |
| # first if we set CC to just the basename; use the full file name. |
| shift |
| set dummy "$ac_dir/$ac_word" "$@" |
| shift |
| ac_cv_prog_CC="$@" |
| fi |
| fi |
| fi |
| fi |
| CC="$ac_cv_prog_CC" |
| if test -n "$CC"; then |
| echo "$ac_t""$CC" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| if test -z "$CC"; then |
| case "`uname -s`" in |
| *win32* | *WIN32*) |
| # Extract the first word of "cl", so it can be a program name with args. |
| set dummy cl; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:2554: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$CC"; then |
| ac_cv_prog_CC="$CC" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_CC="cl" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| CC="$ac_cv_prog_CC" |
| if test -n "$CC"; then |
| echo "$ac_t""$CC" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| ;; |
| esac |
| fi |
| test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; echo "configure: error: no acceptable cc found in \$PATH" 1>&5; exit 1; } |
| fi |
| |
| echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
| echo "configure:2586: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
| |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| cat > conftest.$ac_ext << EOF |
| |
| #line 2597 "configure" |
| #include "confdefs.h" |
| |
| main(){return(0);} |
| EOF |
| if { (eval echo configure:2602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| ac_cv_prog_cc_works=yes |
| # If we can't run a trivial program, we are probably using a cross compiler. |
| if (./conftest; exit) 2>/dev/null; then |
| ac_cv_prog_cc_cross=no |
| else |
| ac_cv_prog_cc_cross=yes |
| fi |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| ac_cv_prog_cc_works=no |
| fi |
| rm -fr conftest* |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
| if test $ac_cv_prog_cc_works = no; then |
| { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&5; exit 1; } |
| fi |
| echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
| echo "configure:2628: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
| echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
| echo "configure:2633: checking whether we are using GNU C" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.c <<EOF |
| #ifdef __GNUC__ |
| yes; |
| #endif |
| EOF |
| if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
| ac_cv_prog_gcc=yes |
| else |
| ac_cv_prog_gcc=no |
| fi |
| fi |
| |
| echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
| |
| if test $ac_cv_prog_gcc = yes; then |
| GCC=yes |
| else |
| GCC= |
| fi |
| |
| ac_test_CFLAGS="${CFLAGS+set}" |
| ac_save_CFLAGS="$CFLAGS" |
| CFLAGS= |
| echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 |
| echo "configure:2661: checking whether ${CC-cc} accepts -g" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| echo 'void f(){}' > conftest.c |
| if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then |
| ac_cv_prog_cc_g=yes |
| else |
| ac_cv_prog_cc_g=no |
| fi |
| rm -f conftest* |
| |
| fi |
| |
| echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
| if test "$ac_test_CFLAGS" = set; then |
| CFLAGS="$ac_save_CFLAGS" |
| elif test $ac_cv_prog_cc_g = yes; then |
| if test "$GCC" = yes; then |
| CFLAGS="-g -O2" |
| else |
| CFLAGS="-g" |
| fi |
| else |
| if test "$GCC" = yes; then |
| CFLAGS="-O2" |
| else |
| CFLAGS= |
| fi |
| fi |
| |
| for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:2697: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$CXX"; then |
| ac_cv_prog_CXX="$CXX" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_CXX="$ac_prog" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| CXX="$ac_cv_prog_CXX" |
| if test -n "$CXX"; then |
| echo "$ac_t""$CXX" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$CXX" && break |
| done |
| test -n "$CXX" || CXX="gcc" |
| |
| |
| echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
| echo "configure:2729: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| cat > conftest.$ac_ext << EOF |
| |
| #line 2740 "configure" |
| #include "confdefs.h" |
| |
| int main(){return(0);} |
| EOF |
| if { (eval echo configure:2745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| ac_cv_prog_cxx_works=yes |
| # If we can't run a trivial program, we are probably using a cross compiler. |
| if (./conftest; exit) 2>/dev/null; then |
| ac_cv_prog_cxx_cross=no |
| else |
| ac_cv_prog_cxx_cross=yes |
| fi |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| ac_cv_prog_cxx_works=no |
| fi |
| rm -fr conftest* |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 |
| if test $ac_cv_prog_cxx_works = no; then |
| { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&5; exit 1; } |
| fi |
| echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
| echo "configure:2771: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 |
| echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 |
| echo "configure:2776: checking whether we are using GNU C++" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.C <<EOF |
| #ifdef __GNUC__ |
| yes; |
| #endif |
| EOF |
| if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
| ac_cv_prog_gxx=yes |
| else |
| ac_cv_prog_gxx=no |
| fi |
| fi |
| |
| echo "$ac_t""$ac_cv_prog_gxx" 1>&6 |
| |
| if test $ac_cv_prog_gxx = yes; then |
| GXX=yes |
| else |
| GXX= |
| fi |
| |
| ac_test_CXXFLAGS="${CXXFLAGS+set}" |
| ac_save_CXXFLAGS="$CXXFLAGS" |
| CXXFLAGS= |
| echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 |
| echo "configure:2804: checking whether ${CXX-g++} accepts -g" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| echo 'void f(){}' > conftest.cc |
| if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then |
| ac_cv_prog_cxx_g=yes |
| else |
| ac_cv_prog_cxx_g=no |
| fi |
| rm -f conftest* |
| |
| fi |
| |
| echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 |
| if test "$ac_test_CXXFLAGS" = set; then |
| CXXFLAGS="$ac_save_CXXFLAGS" |
| elif test $ac_cv_prog_cxx_g = yes; then |
| if test "$GXX" = yes; then |
| CXXFLAGS="-g -O2" |
| else |
| CXXFLAGS="-g" |
| fi |
| else |
| if test "$GXX" = yes; then |
| CXXFLAGS="-O2" |
| else |
| CXXFLAGS= |
| fi |
| fi |
| |
| for ac_declaration in \ |
| ''\ |
| '#include <stdlib.h>' \ |
| 'extern "C" void std::exit (int) throw (); using std::exit;' \ |
| 'extern "C" void std::exit (int); using std::exit;' \ |
| 'extern "C" void exit (int) throw ();' \ |
| 'extern "C" void exit (int);' \ |
| 'void exit (int);' |
| do |
| cat > conftest.$ac_ext <<EOF |
| #line 2845 "configure" |
| #include "confdefs.h" |
| #include <stdlib.h> |
| $ac_declaration |
| int main() { |
| exit (42); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:2853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| : |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| continue |
| fi |
| rm -f conftest* |
| cat > conftest.$ac_ext <<EOF |
| #line 2863 "configure" |
| #include "confdefs.h" |
| $ac_declaration |
| int main() { |
| exit (42); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:2870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| break |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| fi |
| rm -f conftest* |
| done |
| if test -n "$ac_declaration"; then |
| echo '#ifdef __cplusplus' >>confdefs.h |
| echo $ac_declaration >>confdefs.h |
| echo '#endif' >>confdefs.h |
| fi |
| |
| |
| # Extract the first word of "ranlib", so it can be a program name with args. |
| set dummy ranlib; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:2889: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$RANLIB"; then |
| ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_RANLIB="ranlib" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
| fi |
| fi |
| RANLIB="$ac_cv_prog_RANLIB" |
| if test -n "$RANLIB"; then |
| echo "$ac_t""$RANLIB" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| for ac_prog in $AS as |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:2921: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| case "$AS" in |
| /*) |
| ac_cv_path_AS="$AS" # Let the user override the test with a path. |
| ;; |
| ?:/*) |
| ac_cv_path_AS="$AS" # Let the user override the test with a dos path. |
| ;; |
| *) |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_path_AS="$ac_dir/$ac_word" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| ;; |
| esac |
| fi |
| AS="$ac_cv_path_AS" |
| if test -n "$AS"; then |
| echo "$ac_t""$AS" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$AS" && break |
| done |
| test -n "$AS" || AS="$CC" |
| |
| if test "$msyshost"; then |
| case "$AS" in |
| /*) |
| tmp_DIRNAME=`dirname "$AS"` |
| tmp_BASENAME=`basename "$AS"` |
| tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` |
| AS="$tmp_PWD/$tmp_BASENAME" |
| if test -e "$AS.exe"; then |
| AS="$AS.exe" |
| fi |
| esac |
| fi |
| |
| for ac_prog in ar |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:2975: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$AR"; then |
| ac_cv_prog_AR="$AR" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_AR="$ac_prog" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| AR="$ac_cv_prog_AR" |
| if test -n "$AR"; then |
| echo "$ac_t""$AR" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$AR" && break |
| done |
| test -n "$AR" || AR=":" |
| |
| for ac_prog in ld |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:3010: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$LD"; then |
| ac_cv_prog_LD="$LD" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_LD="$ac_prog" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| LD="$ac_cv_prog_LD" |
| if test -n "$LD"; then |
| echo "$ac_t""$LD" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$LD" && break |
| done |
| test -n "$LD" || LD=":" |
| |
| for ac_prog in strip |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:3045: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$STRIP"; then |
| ac_cv_prog_STRIP="$STRIP" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_STRIP="$ac_prog" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| STRIP="$ac_cv_prog_STRIP" |
| if test -n "$STRIP"; then |
| echo "$ac_t""$STRIP" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$STRIP" && break |
| done |
| test -n "$STRIP" || STRIP=":" |
| |
| for ac_prog in windres |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:3080: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$WINDRES"; then |
| ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_WINDRES="$ac_prog" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| WINDRES="$ac_cv_prog_WINDRES" |
| if test -n "$WINDRES"; then |
| echo "$ac_t""$WINDRES" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$WINDRES" && break |
| done |
| test -n "$WINDRES" || WINDRES=":" |
| |
| if test -z "$HOST_CC"; then |
| HOST_CC='$(CC)' |
| fi |
| if test -z "$HOST_CXX"; then |
| HOST_CXX='$(CXX)' |
| fi |
| if test -z "$HOST_RANLIB"; then |
| HOST_RANLIB='$(RANLIB)' |
| fi |
| if test -z "$HOST_AR"; then |
| HOST_AR='$(AR)' |
| fi |
| if test -z "$HOST_AR_FLAGS"; then |
| HOST_AR_FLAGS='$(AR_FLAGS)' |
| fi |
| fi |
| |
| |
| GNU_AS= |
| GNU_LD= |
| GNU_CC= |
| GNU_CXX= |
| CC_VERSION='N/A' |
| CXX_VERSION='N/A' |
| cat <<EOF > conftest.c |
| #if defined(_MSC_VER) |
| #if defined(__clang__) |
| COMPILER clang-cl _MSC_VER |
| #else |
| COMPILER msvc _MSC_FULL_VER |
| #endif |
| #elif defined(__clang__) |
| COMPILER clang __clang_major__.__clang_minor__.__clang_patchlevel__ |
| #elif defined(__GNUC__) |
| COMPILER gcc __GNUC__.__GNUC_MINOR__.__GNUC_PATCHLEVEL__ |
| #elif defined(__INTEL_COMPILER) |
| COMPILER icc __INTEL_COMPILER |
| #endif |
| EOF |
| read dummy compiler CC_VERSION <<EOF |
| $($CC -E $CPPFLAGS $CFLAGS conftest.c 2>/dev/null | grep COMPILER) |
| EOF |
| read dummy cxxcompiler CXX_VERSION <<EOF |
| $($CXX -E $CPPFLAGS $CXXFLAGS conftest.c 2>/dev/null | grep COMPILER) |
| EOF |
| if test "$compiler" != "$cxxcompiler"; then |
| { echo "configure: error: Your C and C++ compilers are different. You need to use the same compiler." 1>&2; echo "configure: error: Your C and C++ compilers are different. You need to use the same compiler." 1>&5; exit 1; } |
| fi |
| if test "$CC_VERSION" != "$CXX_VERSION"; then |
| # This may not be strictly necessary, but if we want to drop it, we |
| # should make sure any version checks below apply to both the C and |
| # C++ compiler versions. |
| { echo "configure: error: Your C and C++ compiler versions are different. You need to use the same compiler version." 1>&2; echo "configure: error: Your C and C++ compiler versions are different. You need to use the same compiler version." 1>&5; exit 1; } |
| fi |
| CC_VERSION=`echo "$CC_VERSION" | sed 's/ //g'` |
| CXX_VERSION=`echo "$CXX_VERSION" | sed 's/ //g'` |
| if test "$compiler" = "gcc"; then |
| GNU_CC=1 |
| GNU_CXX=1 |
| |
| GCC_VERSION_FULL="$CXX_VERSION" |
| GCC_VERSION=`echo "$GCC_VERSION_FULL" | $PERL -pe '(split(/\./))[0]>=4&&s/(^\d*\.\d*).*/$1/;'` |
| |
| GCC_MAJOR_VERSION=`echo ${GCC_VERSION} | $AWK -F\. '{ print $1 }'` |
| GCC_MINOR_VERSION=`echo ${GCC_VERSION} | $AWK -F\. '{ print $2 }'` |
| |
| fi |
| |
| if test "`echo | $AS -o conftest.out -v 2>&1 | grep -c GNU`" != "0"; then |
| GNU_AS=1 |
| fi |
| rm -f conftest.out |
| if test "`echo | $LD -v 2>&1 | grep -c GNU`" != "0"; then |
| GNU_LD=1 |
| fi |
| |
| if test "$compiler" = "msvc"; then |
| MSVC_VERSION_FULL="$CXX_VERSION" |
| CC_VERSION=`echo ${CC_VERSION} | cut -c 1-4` |
| CXX_VERSION=`echo ${CXX_VERSION} | cut -c 1-4` |
| fi |
| |
| INTEL_CC= |
| INTEL_CXX= |
| if test "$compiler" = "icc"; then |
| INTEL_CC=1 |
| INTEL_CXX=1 |
| fi |
| |
| CLANG_CC= |
| CLANG_CXX= |
| CLANG_CL= |
| if test "$compiler" = "clang"; then |
| GNU_CC=1 |
| GNU_CXX=1 |
| CLANG_CC=1 |
| CLANG_CXX=1 |
| fi |
| if test "$compiler" = "clang-cl"; then |
| CLANG_CL=1 |
| # We force clang-cl to emulate Visual C++ 2013 in configure.in, but that |
| # is based on the CLANG_CL variable defined here, so make sure that we're |
| # getting the right version here manually. |
| CC_VERSION=1800 |
| CXX_VERSION=1800 |
| MSVC_VERSION_FULL=180030723 |
| # Build on clang-cl with MSVC 2013 Update 3 with fallback emulation. |
| CFLAGS="$CFLAGS -fms-compatibility-version=18.00.30723 -fallback" |
| CXXFLAGS="$CXXFLAGS -fms-compatibility-version=18.00.30723 -fallback" |
| fi |
| |
| if test "$GNU_CC"; then |
| if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then |
| GCC_USE_GNU_LD=1 |
| fi |
| fi |
| |
| |
| |
| |
| if test -n "$GNU_CC" -a -z "$CLANG_CC" ; then |
| if test "$GCC_MAJOR_VERSION" -eq 4 -a "$GCC_MINOR_VERSION" -lt 8 || |
| test "$GCC_MAJOR_VERSION" -lt 4; then |
| { echo "configure: error: Only GCC 4.8 or newer supported" 1>&2; echo "configure: error: Only GCC 4.8 or newer supported" 1>&5; exit 1; } |
| fi |
| fi |
| |
| |
| |
| if test -n "$COMPILER_WRAPPER"; then |
| case "$CC" in |
| $COMPILER_WRAPPER\ *) |
| : |
| ;; |
| *) |
| CC="$COMPILER_WRAPPER $CC" |
| CXX="$COMPILER_WRAPPER $CXX" |
| _SUBDIR_CC="$CC" |
| _SUBDIR_CXX="$CXX" |
| ac_cv_prog_CC="$CC" |
| ac_cv_prog_CXX="$CXX" |
| ;; |
| esac |
| fi |
| |
| |
| echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
| echo "configure:3257: checking how to run the C preprocessor" >&5 |
| # On Suns, sometimes $CPP names a directory. |
| if test -n "$CPP" && test -d "$CPP"; then |
| CPP= |
| fi |
| if test -z "$CPP"; then |
| if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| # This must be in double quotes, not single quotes, because CPP may get |
| # substituted into the Makefile and "${CC-cc}" will confuse make. |
| CPP="${CC-cc} -E" |
| # On the NeXT, cc -E runs the code through the compiler's parser, |
| # not just through cpp. |
| cat > conftest.$ac_ext <<EOF |
| #line 3272 "configure" |
| #include "confdefs.h" |
| #include <assert.h> |
| Syntax Error |
| EOF |
| ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
| { (eval echo configure:3278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| if test -z "$ac_err"; then |
| : |
| else |
| echo "$ac_err" >&5 |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| CPP="${CC-cc} -E -traditional-cpp" |
| cat > conftest.$ac_ext <<EOF |
| #line 3289 "configure" |
| #include "confdefs.h" |
| #include <assert.h> |
| Syntax Error |
| EOF |
| ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
| { (eval echo configure:3295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| if test -z "$ac_err"; then |
| : |
| else |
| echo "$ac_err" >&5 |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| CPP="${CC-cc} -nologo -E" |
| cat > conftest.$ac_ext <<EOF |
| #line 3306 "configure" |
| #include "confdefs.h" |
| #include <assert.h> |
| Syntax Error |
| EOF |
| ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
| { (eval echo configure:3312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| if test -z "$ac_err"; then |
| : |
| else |
| echo "$ac_err" >&5 |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| CPP=/lib/cpp |
| fi |
| rm -f conftest* |
| fi |
| rm -f conftest* |
| fi |
| rm -f conftest* |
| ac_cv_prog_CPP="$CPP" |
| fi |
| CPP="$ac_cv_prog_CPP" |
| else |
| ac_cv_prog_CPP="$CPP" |
| fi |
| echo "$ac_t""$CPP" 1>&6 |
| |
| echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 |
| echo "configure:3337: checking how to run the C++ preprocessor" >&5 |
| if test -z "$CXXCPP"; then |
| if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| CXXCPP="${CXX-g++} -E" |
| cat > conftest.$ac_ext <<EOF |
| #line 3350 "configure" |
| #include "confdefs.h" |
| #include <stdlib.h> |
| EOF |
| ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
| { (eval echo configure:3355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| if test -z "$ac_err"; then |
| : |
| else |
| echo "$ac_err" >&5 |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| CXXCPP=/lib/cpp |
| fi |
| rm -f conftest* |
| ac_cv_prog_CXXCPP="$CXXCPP" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| fi |
| fi |
| CXXCPP="$ac_cv_prog_CXXCPP" |
| echo "$ac_t""$CXXCPP" 1>&6 |
| |
| |
| # Extract the first word of "rustc", so it can be a program name with args. |
| set dummy rustc; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:3383: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_path_RUSTC'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| case "$RUSTC" in |
| /*) |
| ac_cv_path_RUSTC="$RUSTC" # Let the user override the test with a path. |
| ;; |
| ?:/*) |
| ac_cv_path_RUSTC="$RUSTC" # Let the user override the test with a dos path. |
| ;; |
| *) |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_path_RUSTC="$ac_dir/$ac_word" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| ;; |
| esac |
| fi |
| RUSTC="$ac_cv_path_RUSTC" |
| if test -n "$RUSTC"; then |
| echo "$ac_t""$RUSTC" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| if test "$msyshost"; then |
| case "$RUSTC" in |
| /*) |
| tmp_DIRNAME=`dirname "$RUSTC"` |
| tmp_BASENAME=`basename "$RUSTC"` |
| tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` |
| RUSTC="$tmp_PWD/$tmp_BASENAME" |
| if test -e "$RUSTC.exe"; then |
| RUSTC="$RUSTC.exe" |
| fi |
| esac |
| fi |
| |
| if test -n "$RUSTC"; then |
| echo $ac_n "checking rustc version""... $ac_c" 1>&6 |
| echo "configure:3430: checking rustc version" >&5 |
| RUSTC_VERSION=`$RUSTC --version | cut -d ' ' -f 2` |
| # Parse out semversion elements. |
| _RUSTC_MAJOR_VERSION=`echo ${RUSTC_VERSION} | cut -d . -f 1` |
| _RUSTC_MINOR_VERSION=`echo ${RUSTC_VERSION} | cut -d . -f 2` |
| _RUSTC_EXTRA_VERSION=`echo ${RUSTC_VERSION} | cut -d . -f 3 | cut -d + -f 1` |
| _RUSTC_PATCH_VERSION=`echo ${_RUSTC_EXTRA_VERSION} | cut -d '-' -f 1` |
| echo "$ac_t""${_RUSTC_MAJOR_VERSION}.${_RUSTC_MINOR_VERSION}.${_RUSTC_PATCH_VERSION} ($RUSTC_VERSION)" 1>&6 |
| fi |
| # Check whether --enable-rust or --disable-rust was given. |
| if test "${enable_rust+set}" = set; then |
| enableval="$enable_rust" |
| if test "$enableval" = "yes"; then |
| MOZ_RUST=1 |
| elif test "$enableval" = "no"; then |
| MOZ_RUST= |
| else |
| { echo "configure: error: Option, rust, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, rust, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| if test -z "$RUSTC" -a -n "$MOZ_RUST"; then |
| { echo "configure: error: Rust compiler not found. |
| To compile rust language sources, you must have 'rustc' in your path. |
| See http://www.rust-lang.org/ for more information." 1>&2; echo "configure: error: Rust compiler not found. |
| To compile rust language sources, you must have 'rustc' in your path. |
| See http://www.rust-lang.org/ for more information." 1>&5; exit 1; } |
| fi |
| if test -n "$MOZ_RUST" && test -z "$_RUSTC_MAJOR_VERSION" -o \ |
| "$_RUSTC_MAJOR_VERSION" -lt 1 -o \ |
| \( "$_RUSTC_MAJOR_VERSION" -eq 1 -a "$_RUSTC_MINOR_VERSION" -lt 5 \); then |
| { echo "configure: error: Rust compiler ${RUSTC_VERSION} is too old. |
| To compile Rust language sources please install at least |
| version 1.5 of the 'rustc' toolchain and make sure it is |
| first in your path. |
| You can verify this by typing 'rustc --version'." 1>&2; echo "configure: error: Rust compiler ${RUSTC_VERSION} is too old. |
| To compile Rust language sources please install at least |
| version 1.5 of the 'rustc' toolchain and make sure it is |
| first in your path. |
| You can verify this by typing 'rustc --version'." 1>&5; exit 1; } |
| fi |
| |
| if test -n "$RUSTC" -a -n "$MOZ_RUST"; then |
| # Rust's --target options are similar to, but not exactly the same |
| # as, the autoconf-derived targets we use. An example would be that |
| # Rust uses distinct target triples for targetting the GNU C++ ABI |
| # and the MSVC C++ ABI on Win32, whereas autoconf has a single |
| # triple and relies on the user to ensure that everything is |
| # compiled for the appropriate ABI. We need to perform appropriate |
| # munging to get the correct option to rustc. |
| # |
| # The canonical list of targets supported can be derived from: |
| # |
| # https://github.com/rust-lang/rust/tree/master/mk/cfg |
| rust_target= |
| case "$target" in |
| # Bitrig |
| x86_64-*-bitrig*) |
| rust_target=x86_64-unknown-bitrig |
| ;; |
| |
| # DragonFly |
| x86_64-*-dragonfly*) |
| rust_target=x86_64-unknown-dragonfly |
| ;; |
| |
| # FreeBSD, GNU/kFreeBSD |
| i*86-*-*freebsd*) |
| rust_target=i686-unknown-freebsd |
| ;; |
| x86_64-*-*freebsd*) |
| rust_target=x86_64-unknown-freebsd |
| ;; |
| |
| # NetBSD |
| x86_64-*-netbsd*) |
| rust_target=x86_64-unknown-netbsd |
| ;; |
| |
| # OpenBSD |
| x86_64-*-openbsd*) |
| rust_target=x86_64-unknown-openbsd |
| ;; |
| |
| # Linux |
| i*86*linux-gnu) |
| rust_target=i686-unknown-linux-gnu |
| ;; |
| x86_64*linux-gnu) |
| rust_target=x86_64-unknown-linux-gnu |
| ;; |
| |
| # OS X and iOS |
| i*86-apple-darwin*) |
| rust_target=i686-apple-darwin |
| ;; |
| i*86-apple-ios*) |
| rust_target=i386-apple-ios |
| ;; |
| x86_64-apple-darwin*) |
| rust_target=x86_64-apple-darwin |
| ;; |
| |
| # Android |
| i*86*linux-android) |
| rust_target=i686-linux-android |
| ;; |
| arm*linux-android*) |
| rust_target=arm-linux-androideabi |
| ;; |
| |
| # Windows |
| i*86-pc-mingw32) |
| # XXX better detection of CXX needed here, to figure out whether |
| # we need i686-pc-windows-gnu instead, since mingw32 builds work. |
| rust_target=i586-pc-windows-msvc |
| ;; |
| x86_64-pc-mingw32) |
| # XXX and here as well |
| rust_target=x86_64-pc-windows-msvc |
| ;; |
| *) |
| # Fall back to implicit (native) target when not cross-compiling |
| if test -n "$CROSS_COMPILE"; then |
| { echo "configure: error: don't know how to translate $target for rustc" 1>&2; echo "configure: error: don't know how to translate $target for rustc" 1>&5; exit 1; } |
| fi |
| ;; |
| esac |
| |
| if test -n "$rust_target"; then |
| # Check to see whether we need to pass --target to RUSTC. This can |
| # happen when building Firefox on Windows: js's configure will receive |
| # a RUSTC from the toplevel configure that already has --target added to |
| # it. |
| rustc_target_arg= |
| case "$RUSTC" in |
| *--target=${rust_target}*) |
| ;; |
| *) |
| rustc_target_arg=--target=${rust_target} |
| ;; |
| esac |
| fi |
| |
| # Check to see whether our rustc has a reasonably functional stdlib |
| # for our chosen target. |
| echo 'pub extern fn hello() { println!("Hello world"); }' > conftest.rs |
| if { ac_try='${RUSTC} --crate-type staticlib ${rustc_target_arg} -o conftest.rlib conftest.rs > /dev/null'; { (eval echo configure:3577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.rlib; then |
| RUSTC="${RUSTC} ${rustc_target_arg}" |
| else |
| { echo "configure: error: cannot compile for ${rust_target} with ${RUSTC}" 1>&2; echo "configure: error: cannot compile for ${rust_target} with ${RUSTC}" 1>&5; exit 1; } |
| fi |
| rm -f conftest.rs conftest.rlib |
| fi |
| |
| # TODO: separate HOST_RUSTC and RUSTC variables |
| |
| |
| |
| |
| |
| # Target the Windows 8.1 SDK by default |
| WINSDK_TARGETVER=603 |
| WINVER=502 |
| |
| # Check whether --with-windows-version or --without-windows-version was given. |
| if test "${with_windows_version+set}" = set; then |
| withval="$with_windows_version" |
| WINSDK_TARGETVER=$withval |
| fi |
| |
| |
| # Currently only version 603 is allowed |
| case "$WINSDK_TARGETVER" in |
| 603) |
| MOZ_WINSDK_TARGETVER=0${WINSDK_TARGETVER}0000 |
| ;; |
| |
| *) |
| { echo "configure: error: Invalid value for --with-windows-version ($WINSDK_TARGETVER)" 1>&2; echo "configure: error: Invalid value for --with-windows-version ($WINSDK_TARGETVER)" 1>&5; exit 1; }; |
| ;; |
| esac |
| |
| case "$target" in |
| *-mingw*) |
| if test "$GCC" != "yes"; then |
| # Check to see if we are really running in a msvc environemnt |
| _WIN32_MSVC=1 |
| |
| # Make sure compilers are valid |
| CFLAGS="$CFLAGS -TC -nologo" |
| CXXFLAGS="$CXXFLAGS -TP -nologo" |
| # MSVC warning C4345 warns of newly conformant behavior as of VS2003. |
| # MSVC warning C4351 warns of newly conformant behavior as of VS2005. |
| # MSVC warning C4800 warns when a value is implicitly cast to bool, |
| # because this also forces narrowing to a single byte, which can be a |
| # perf hit. But this matters so little in practice (and often we want |
| # that behavior) that it's better to turn it off. |
| # _CRT_SECURE_NO_WARNINGS disables warnings about using MSVC-specific |
| # secure CRT functions. |
| # MSVC warning C4819 warns some UTF-8 characters (e.g. copyright sign) |
| # on non-Western system locales even if it is in a comment. |
| CFLAGS="$CFLAGS -wd4819" |
| CXXFLAGS="$CXXFLAGS -wd4345 -wd4351 -wd4800 -wd4819 -D_CRT_SECURE_NO_WARNINGS" |
| |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| cat > conftest.$ac_ext <<EOF |
| #line 3643 "configure" |
| #include "confdefs.h" |
| #include <stdio.h> |
| int main() { |
| printf("Hello World\n"); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:3650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| : |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| { echo "configure: error: \$(CC) test failed. You must have MS VC++ in your path to build." 1>&2; echo "configure: error: \$(CC) test failed. You must have MS VC++ in your path to build." 1>&5; exit 1; } |
| fi |
| rm -f conftest* |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| cat > conftest.$ac_ext <<EOF |
| #line 3668 "configure" |
| #include "confdefs.h" |
| #include <new.h> |
| int main() { |
| unsigned *test = new unsigned(42); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:3675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| : |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| { echo "configure: error: \$(CXX) test failed. You must have MS VC++ in your path to build." 1>&2; echo "configure: error: \$(CXX) test failed. You must have MS VC++ in your path to build." 1>&5; exit 1; } |
| fi |
| rm -f conftest* |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| |
| _MSVC_VER_FILTER='s|.*[^!-~]([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?).*|\1|p' |
| |
| |
| # Determine compiler version |
| _CC_MAJOR_VERSION=`echo ${CC_VERSION} | cut -c 1-2` |
| _CC_MINOR_VERSION=`echo ${CC_VERSION} | cut -c 3-4` |
| _MSC_VER=${CC_VERSION} |
| |
| _CXX_MAJOR_VERSION=`echo ${CXX_VERSION} | cut -c 1-2` |
| |
| if test "$_CC_MAJOR_VERSION" != "$_CXX_MAJOR_VERSION"; then |
| { echo "configure: error: The major versions of \$CC and \$CXX do not match." 1>&2; echo "configure: error: The major versions of \$CC and \$CXX do not match." 1>&5; exit 1; } |
| fi |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' _CRT_SECURE_NO_WARNINGS ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define _CRT_SECURE_NO_WARNINGS 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' _CRT_NONSTDC_NO_WARNINGS ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define _CRT_NONSTDC_NO_WARNINGS 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' _USE_MATH_DEFINES ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define _USE_MATH_DEFINES 1 |
| EOF |
| # Otherwise MSVC's math.h doesn't #define M_PI. |
| |
| if test "$_CC_MAJOR_VERSION" = "18"; then |
| _CC_SUITE=12 |
| MSVC_C_RUNTIME_DLL=msvcr120.dll |
| MSVC_CXX_RUNTIME_DLL=msvcp120.dll |
| elif test "$_CC_MAJOR_VERSION" = "19"; then |
| _CC_SUITE=14 |
| MSVC_C_RUNTIME_DLL=vcruntime140.dll |
| MSVC_CXX_RUNTIME_DLL=msvcp140.dll |
| |
| # C5026: move constructor was implicitly defined as deleted |
| CXXFLAGS="$CXXFLAGS -wd5026" |
| |
| # C5027: move assignment operator was implicitly defined as deleted |
| CXXFLAGS="$CXXFLAGS -wd5027" |
| |
| # -Zc:sizedDealloc- disables C++14 global sized deallocation (see bug 1160146) |
| CXXFLAGS="$CXXFLAGS -Zc:sizedDealloc-" |
| |
| # Disable C++11 thread-safe statics due to crashes on XP (bug 1204752) |
| # See https://connect.microsoft.com/VisualStudio/feedback/details/1789709/visual-c-2015-runtime-broken-on-windows-server-2003-c-11-magic-statics |
| CXXFLAGS="$CXXFLAGS -Zc:threadSafeInit-" |
| else |
| { echo "configure: error: This version ($CC_VERSION) of the MSVC compiler is unsupported. See https://developer.mozilla.org/en/Windows_Build_Prerequisites." 1>&2; echo "configure: error: This version ($CC_VERSION) of the MSVC compiler is unsupported. See https://developer.mozilla.org/en/Windows_Build_Prerequisites." 1>&5; exit 1; } |
| fi |
| |
| |
| |
| MSMT_TOOL=`${MT-mt} 2>&1|grep 'Microsoft (R) Manifest Tool'` |
| if test -z "$MSMT_TOOL"; then |
| { echo "configure: error: Microsoft (R) Manifest Tool must be in your \$PATH." 1>&2; echo "configure: error: Microsoft (R) Manifest Tool must be in your \$PATH." 1>&5; exit 1; } |
| fi |
| |
| |
| _MSMT_VER_FILTER='s|.*[^!-~]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*|\1|p' |
| |
| MSMANIFEST_TOOL_VERSION=`echo ${MSMT_TOOL}|sed -ne "$_MSMT_VER_FILTER"` |
| if test -z "$MSMANIFEST_TOOL_VERSION"; then |
| echo "configure: warning: Unknown version of the Microsoft (R) Manifest Tool." 1>&2 |
| fi |
| |
| MSMANIFEST_TOOL=1 |
| unset MSMT_TOOL |
| |
| # Check linker version |
| _LD_FULL_VERSION=`"${LD}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"` |
| _LD_MAJOR_VERSION=`echo ${_LD_FULL_VERSION} | $AWK -F\. '{ print $1 }'` |
| if test "$_LD_MAJOR_VERSION" != "$_CC_SUITE"; then |
| { echo "configure: error: The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE." 1>&2; echo "configure: error: The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE." 1>&5; exit 1; } |
| fi |
| |
| INCREMENTAL_LINKER=1 |
| |
| unset _MSVC_VER_FILTER |
| |
| CFLAGS="$CFLAGS -D_HAS_EXCEPTIONS=0" |
| CXXFLAGS="$CXXFLAGS -D_HAS_EXCEPTIONS=0" |
| else |
| # Check w32api version |
| _W32API_MAJOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $1 }'` |
| _W32API_MINOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $2 }'` |
| echo $ac_n "checking for w32api version >= $W32API_VERSION""... $ac_c" 1>&6 |
| echo "configure:3790: checking for w32api version >= $W32API_VERSION" >&5 |
| cat > conftest.$ac_ext <<EOF |
| #line 3792 "configure" |
| #include "confdefs.h" |
| #include <w32api.h> |
| int main() { |
| #if (__W32API_MAJOR_VERSION < $_W32API_MAJOR_VERSION) || \ |
| (__W32API_MAJOR_VERSION == $_W32API_MAJOR_VERSION && \ |
| __W32API_MINOR_VERSION < $_W32API_MINOR_VERSION) |
| #error "test failed." |
| #endif |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:3804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| res=yes |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| res=no |
| fi |
| rm -f conftest* |
| echo "$ac_t""$res" 1>&6 |
| if test "$res" != "yes"; then |
| { echo "configure: error: w32api version $W32API_VERSION or higher required." 1>&2; echo "configure: error: w32api version $W32API_VERSION or higher required." 1>&5; exit 1; } |
| fi |
| # Check windres version |
| echo $ac_n "checking for windres version >= $WINDRES_VERSION""... $ac_c" 1>&6 |
| echo "configure:3820: checking for windres version >= $WINDRES_VERSION" >&5 |
| _WINDRES_VERSION=`${WINDRES} --version 2>&1 | grep -i windres 2>/dev/null | $AWK '{ print $3 }'` |
| echo "$ac_t""$_WINDRES_VERSION" 1>&6 |
| _WINDRES_MAJOR_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $1 }'` |
| _WINDRES_MINOR_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $2 }'` |
| _WINDRES_RELEASE_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $3 }'` |
| WINDRES_MAJOR_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $1 }'` |
| WINDRES_MINOR_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $2 }'` |
| WINDRES_RELEASE_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $3 }'` |
| if test "$_WINDRES_MAJOR_VERSION" -lt "$WINDRES_MAJOR_VERSION" -o \ |
| "$_WINDRES_MAJOR_VERSION" -eq "$WINDRES_MAJOR_VERSION" -a \ |
| "$_WINDRES_MINOR_VERSION" -lt "$WINDRES_MINOR_VERSION" -o \ |
| "$_WINDRES_MAJOR_VERSION" -eq "$WINDRES_MAJOR_VERSION" -a \ |
| "$_WINDRES_MINOR_VERSION" -eq "$WINDRES_MINOR_VERSION" -a \ |
| "$_WINDRES_RELEASE_VERSION" -lt "$WINDRES_RELEASE_VERSION" |
| then |
| { echo "configure: error: windres version $WINDRES_VERSION or higher is required to build." 1>&2; echo "configure: error: windres version $WINDRES_VERSION or higher is required to build." 1>&5; exit 1; } |
| fi |
| fi # !GNU_CC |
| |
| |
| echo $ac_n "checking for highest Windows version supported by this SDK""... $ac_c" 1>&6 |
| echo "configure:3842: checking for highest Windows version supported by this SDK" >&5 |
| if eval "test \"`echo '$''{'ac_cv_winsdk_maxver'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.h <<EOF |
| #include <winsdkver.h> |
| |
| WINVER_MAXVER |
| EOF |
| ac_cv_winsdk_maxver=`$CPP conftest.h 2>/dev/null | tail -n1` |
| rm -f conftest.h |
| |
| fi |
| |
| echo "$ac_t""$ac_cv_winsdk_maxver" 1>&6 |
| MOZ_WINSDK_MAXVER=${ac_cv_winsdk_maxver}0000 |
| |
| cat >> confdefs.pytmp <<EOF |
| (''' WINVER ''', r''' 0x$WINVER ''') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define WINVER 0x$WINVER |
| EOF |
| |
| cat >> confdefs.pytmp <<EOF |
| (''' _WIN32_WINNT ''', r''' 0x$WINVER ''') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define _WIN32_WINNT 0x$WINVER |
| EOF |
| |
| # Require OS features provided by IE 6.0 SP2 (XP SP2) |
| cat >> confdefs.pytmp <<EOF |
| (''' _WIN32_IE ''', r''' 0x0603 ''') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define _WIN32_IE 0x0603 |
| EOF |
| |
| |
| # If the maximum version supported by this SDK is lower than the target |
| # version, error out |
| echo $ac_n "checking for Windows SDK being recent enough""... $ac_c" 1>&6 |
| echo "configure:3885: checking for Windows SDK being recent enough" >&5 |
| if $PERL -e "exit(0x$MOZ_WINSDK_TARGETVER > $MOZ_WINSDK_MAXVER)"; then |
| echo "$ac_t"""yes"" 1>&6 |
| else |
| echo "$ac_t"""no"" 1>&6 |
| { echo "configure: error: You are targeting Windows version 0x$MOZ_WINSDK_TARGETVER, but your SDK only supports up to version $MOZ_WINSDK_MAXVER. Install and use an updated SDK, or target a lower version using --with-windows-version. Alternatively, try running the Windows SDK Configuration Tool and selecting a newer SDK. See https://developer.mozilla.org/En/Windows_SDK_versions for more details on fixing this." 1>&2; echo "configure: error: You are targeting Windows version 0x$MOZ_WINSDK_TARGETVER, but your SDK only supports up to version $MOZ_WINSDK_MAXVER. Install and use an updated SDK, or target a lower version using --with-windows-version. Alternatively, try running the Windows SDK Configuration Tool and selecting a newer SDK. See https://developer.mozilla.org/En/Windows_SDK_versions for more details on fixing this." 1>&5; exit 1; } |
| fi |
| |
| cat >> confdefs.pytmp <<EOF |
| (''' MOZ_WINSDK_TARGETVER ''', r''' 0x$MOZ_WINSDK_TARGETVER ''') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define MOZ_WINSDK_TARGETVER 0x$MOZ_WINSDK_TARGETVER |
| EOF |
| |
| ;; |
| esac |
| |
| if test -n "$_WIN32_MSVC"; then |
| SKIP_PATH_CHECKS=1 |
| SKIP_COMPILER_CHECKS=1 |
| SKIP_LIBRARY_CHECKS=1 |
| |
| # Since we're skipping compiler and library checks, hard-code |
| # some facts here. |
| |
| # Common to all MSVC environments: |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_LOCALECONV ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_LOCALECONV 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_HYPOT ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_HYPOT 1 |
| EOF |
| |
| for ac_func in _getc_nolock |
| do |
| echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
| echo "configure:3930: checking for $ac_func" >&5 |
| if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 3935 "configure" |
| #define $ac_func innocuous_$ac_func |
| #include "confdefs.h" |
| #undef $ac_func |
| /* System header to define __stub macros and hopefully few prototypes, |
| which can conflict with char $ac_func(); below. */ |
| #define $ac_func innocuous_$ac_func |
| #include <assert.h> |
| #undef $ac_func |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char $ac_func(); |
| |
| int main() { |
| |
| /* The GNU C library defines this for functions which it implements |
| to always fail with ENOSYS. Some functions are actually named |
| something starting with __ and the normal name is an alias. */ |
| #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| choke me |
| #else |
| $ac_func(); |
| #endif |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:3962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_func_$ac_func=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_func_$ac_func=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_func ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_func 1 |
| EOF |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| done |
| |
| fi |
| |
| fi # COMPILE_ENVIRONMENT |
| |
| # Check to see if we are running in a broken QEMU scratchbox. |
| # We know that anything below 1.0.16 is broken. |
| for ac_prog in sb-conf ve |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:4000: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_SBCONF'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test -n "$SBCONF"; then |
| ac_cv_prog_SBCONF="$SBCONF" # Let the user override the test. |
| else |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_prog_SBCONF="$ac_prog" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| fi |
| fi |
| SBCONF="$ac_cv_prog_SBCONF" |
| if test -n "$SBCONF"; then |
| echo "$ac_t""$SBCONF" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$SBCONF" && break |
| done |
| test -n "$SBCONF" || SBCONF="""" |
| |
| if test -n "$SBCONF"; then |
| _sb_version=`$SBCONF ve` |
| _sb_version_major=`echo $_sb_version | cut -f1 -d.` |
| _sb_version_minor=`echo $_sb_version | cut -f2 -d.` |
| _sb_version_point=`echo $_sb_version | cut -f3 -d.` |
| if test $_sb_version_major -eq 1 -a $_sb_version_minor -eq 0 -a $_sb_version_point -le 16; then |
| QEMU_CANT_RUN_JS_SHELL=1 |
| fi |
| fi |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| if test -z "$COMPILE_ENVIRONMENT"; then |
| NSINSTALL_BIN='$(PYTHON) $(topsrcdir)/config/nsinstall.py' |
| fi |
| |
| |
| if test "$COMPILE_ENVIRONMENT"; then |
| |
| |
| |
| |
| |
| # Check whether --enable-macos-target or --disable-macos-target was given. |
| if test "${enable_macos_target+set}" = set; then |
| enableval="$enable_macos_target" |
| _MACOSX_DEPLOYMENT_TARGET=$enableval |
| fi |
| |
| |
| if test "$target_cpu" != "arm"; then |
| case "$target" in |
| *-darwin*) |
| if test -n "$_MACOSX_DEPLOYMENT_TARGET" ; then |
| export MACOSX_DEPLOYMENT_TARGET=$_MACOSX_DEPLOYMENT_TARGET |
| else |
| export MACOSX_DEPLOYMENT_TARGET=10.6 |
| fi |
| ;; |
| esac |
| fi |
| |
| |
| |
| MACOS_SDK_DIR= |
| # Check whether --with-macos-sdk or --without-macos-sdk was given. |
| if test "${with_macos_sdk+set}" = set; then |
| withval="$with_macos_sdk" |
| MACOS_SDK_DIR=$withval |
| fi |
| |
| |
| |
| |
| if test "$MACOS_SDK_DIR"; then |
| |
| if test ! -d "$MACOS_SDK_DIR"; then |
| { echo "configure: error: SDK not found. When using --with-macos-sdk, you must |
| specify a valid SDK. SDKs are installed when the optional cross-development |
| tools are selected during the Xcode/Developer Tools installation." 1>&2; echo "configure: error: SDK not found. When using --with-macos-sdk, you must |
| specify a valid SDK. SDKs are installed when the optional cross-development |
| tools are selected during the Xcode/Developer Tools installation." 1>&5; exit 1; } |
| fi |
| |
| CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}" |
| CXXFLAGS="$CXXFLAGS -isysroot ${MACOS_SDK_DIR}" |
| |
| CPP="$CPP -isysroot ${MACOS_SDK_DIR}" |
| CXXCPP="$CXXCPP -isysroot ${MACOS_SDK_DIR}" |
| |
| |
| echo $ac_n "checking for valid compiler/Mac OS X SDK combination""... $ac_c" 1>&6 |
| echo "configure:4108: checking for valid compiler/Mac OS X SDK combination" >&5 |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| cat > conftest.$ac_ext <<EOF |
| #line 4117 "configure" |
| #include "confdefs.h" |
| #include <new> |
| int main() { return 0; } |
| int main() { |
| result=yes |
| ; return 0; } |
| EOF |
| if { (eval echo configure:4125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| result=no |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| fi |
| rm -f conftest* |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| echo "$ac_t""$result" 1>&6 |
| |
| if test "$result" = "no" ; then |
| { echo "configure: error: The selected compiler and Mac OS X SDK are incompatible." 1>&2; echo "configure: error: The selected compiler and Mac OS X SDK are incompatible." 1>&5; exit 1; } |
| fi |
| fi |
| |
| fi # COMPILE_ENVIRONMENT |
| |
| if test -n "$MAKE"; then |
| if test `echo $MAKE | grep -c make.py` != 1; then |
| NOT_PYMAKE=$MAKE |
| fi |
| fi |
| |
| case "$host_os" in |
| mingw*) |
| for ac_prog in $GMAKE $NOT_PYMAKE make gmake |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:4162: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_path_GMAKE'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| case "$GMAKE" in |
| /*) |
| ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a path. |
| ;; |
| ?:/*) |
| ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a dos path. |
| ;; |
| *) |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_path_GMAKE="$ac_dir/$ac_word" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| ;; |
| esac |
| fi |
| GMAKE="$ac_cv_path_GMAKE" |
| if test -n "$GMAKE"; then |
| echo "$ac_t""$GMAKE" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$GMAKE" && break |
| done |
| test -n "$GMAKE" || GMAKE=":" |
| |
| if test "$msyshost"; then |
| case "$GMAKE" in |
| /*) |
| tmp_DIRNAME=`dirname "$GMAKE"` |
| tmp_BASENAME=`basename "$GMAKE"` |
| tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` |
| GMAKE="$tmp_PWD/$tmp_BASENAME" |
| if test -e "$GMAKE.exe"; then |
| GMAKE="$GMAKE.exe" |
| fi |
| esac |
| fi |
| |
| ;; |
| *) |
| for ac_prog in $GMAKE $NOT_PYMAKE gmake make |
| do |
| # Extract the first word of "$ac_prog", so it can be a program name with args. |
| set dummy $ac_prog; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:4218: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_path_GMAKE'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| case "$GMAKE" in |
| /*) |
| ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a path. |
| ;; |
| ?:/*) |
| ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a dos path. |
| ;; |
| *) |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_path_GMAKE="$ac_dir/$ac_word" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| ;; |
| esac |
| fi |
| GMAKE="$ac_cv_path_GMAKE" |
| if test -n "$GMAKE"; then |
| echo "$ac_t""$GMAKE" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| test -n "$GMAKE" && break |
| done |
| test -n "$GMAKE" || GMAKE=":" |
| |
| if test "$msyshost"; then |
| case "$GMAKE" in |
| /*) |
| tmp_DIRNAME=`dirname "$GMAKE"` |
| tmp_BASENAME=`basename "$GMAKE"` |
| tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` |
| GMAKE="$tmp_PWD/$tmp_BASENAME" |
| if test -e "$GMAKE.exe"; then |
| GMAKE="$GMAKE.exe" |
| fi |
| esac |
| fi |
| |
| ;; |
| esac |
| if test "$GMAKE" = ":"; then |
| { echo "configure: error: GNU make not found" 1>&2; echo "configure: error: GNU make not found" 1>&5; exit 1; } |
| fi |
| |
| # MAKE will be set by client.mk, but still need this for standalone js builds |
| if test -z "$MAKE"; then |
| MAKE=$GMAKE |
| fi |
| |
| if test "$COMPILE_ENVIRONMENT"; then |
| |
| # If we find X, set shell vars x_includes and x_libraries to the |
| # paths, otherwise set no_x=yes. |
| # Uses ac_ vars as temps to allow command line to override cache and checks. |
| # --without-x overrides everything else, but does not touch the cache. |
| echo $ac_n "checking for X""... $ac_c" 1>&6 |
| echo "configure:4285: checking for X" >&5 |
| |
| # Check whether --with-x or --without-x was given. |
| if test "${with_x+set}" = set; then |
| withval="$with_x" |
| : |
| fi |
| |
| # $have_x is `yes', `no', `disabled', or empty when we do not yet know. |
| if test "x$with_x" = xno; then |
| # The user explicitly disabled X. |
| have_x=disabled |
| else |
| if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then |
| # Both variables are already set. |
| have_x=yes |
| else |
| if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| # One or both of the vars are not set, and there is no cached value. |
| ac_x_includes=NO ac_x_libraries=NO |
| rm -fr conftestdir |
| if mkdir conftestdir; then |
| cd conftestdir |
| # Make sure to not put "make" in the Imakefile rules, since we grep it out. |
| cat > Imakefile <<'EOF' |
| acfindx: |
| @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' |
| EOF |
| if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then |
| # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
| eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` |
| # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
| for ac_extension in a so sl; do |
| if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && |
| test -f $ac_im_libdir/libX11.$ac_extension; then |
| ac_im_usrlibdir=$ac_im_libdir; break |
| fi |
| done |
| # Screen out bogus values from the imake configuration. They are |
| # bogus both because they are the default anyway, and because |
| # using them would break gcc on systems where it needs fixed includes. |
| case "$ac_im_incroot" in |
| /usr/include) ;; |
| *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; |
| esac |
| case "$ac_im_usrlibdir" in |
| /usr/lib | /lib) ;; |
| *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; |
| esac |
| fi |
| cd .. |
| rm -fr conftestdir |
| fi |
| |
| if test "$ac_x_includes" = NO; then |
| # Guess where to find include files, by looking for this one X11 .h file. |
| test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h |
| |
| # First, try using that file with no special directory specified. |
| cat > conftest.$ac_ext <<EOF |
| #line 4347 "configure" |
| #include "confdefs.h" |
| #include <$x_direct_test_include> |
| EOF |
| ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
| { (eval echo configure:4352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| if test -z "$ac_err"; then |
| rm -rf conftest* |
| # We can compile using X headers with no special include directory. |
| ac_x_includes= |
| else |
| echo "$ac_err" >&5 |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| # Look for the header file in a standard set of common directories. |
| # Check X11 before X11Rn because it is often a symlink to the current release. |
| for ac_dir in \ |
| /usr/X11/include \ |
| /usr/X11R6/include \ |
| /usr/X11R5/include \ |
| /usr/X11R4/include \ |
| \ |
| /usr/include/X11 \ |
| /usr/include/X11R6 \ |
| /usr/include/X11R5 \ |
| /usr/include/X11R4 \ |
| \ |
| /usr/local/X11/include \ |
| /usr/local/X11R6/include \ |
| /usr/local/X11R5/include \ |
| /usr/local/X11R4/include \ |
| \ |
| /usr/local/include/X11 \ |
| /usr/local/include/X11R6 \ |
| /usr/local/include/X11R5 \ |
| /usr/local/include/X11R4 \ |
| \ |
| /usr/X386/include \ |
| /usr/x386/include \ |
| /usr/XFree86/include/X11 \ |
| \ |
| /usr/include \ |
| /usr/local/include \ |
| /usr/unsupported/include \ |
| /usr/athena/include \ |
| /usr/local/x11r5/include \ |
| /usr/lpp/Xamples/include \ |
| \ |
| /usr/openwin/include \ |
| /usr/openwin/share/include \ |
| ; \ |
| do |
| if test -r "$ac_dir/$x_direct_test_include"; then |
| ac_x_includes=$ac_dir |
| break |
| fi |
| done |
| fi |
| rm -f conftest* |
| fi # $ac_x_includes = NO |
| |
| if test "$ac_x_libraries" = NO; then |
| # Check for the libraries. |
| |
| test -z "$x_direct_test_library" && x_direct_test_library=Xt |
| test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc |
| |
| # See if we find them without any special options. |
| # Don't add to $LIBS permanently. |
| ac_save_LIBS="$LIBS" |
| LIBS="-l$x_direct_test_library $LIBS" |
| cat > conftest.$ac_ext <<EOF |
| #line 4421 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| ${x_direct_test_function}() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:4428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| LIBS="$ac_save_LIBS" |
| # We can link X programs with no special library path. |
| ac_x_libraries= |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| LIBS="$ac_save_LIBS" |
| # First see if replacing the include by lib works. |
| # Check X11 before X11Rn because it is often a symlink to the current release. |
| for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ |
| /usr/X11/lib \ |
| /usr/X11R6/lib \ |
| /usr/X11R5/lib \ |
| /usr/X11R4/lib \ |
| \ |
| /usr/lib/X11 \ |
| /usr/lib/X11R6 \ |
| /usr/lib/X11R5 \ |
| /usr/lib/X11R4 \ |
| \ |
| /usr/local/X11/lib \ |
| /usr/local/X11R6/lib \ |
| /usr/local/X11R5/lib \ |
| /usr/local/X11R4/lib \ |
| \ |
| /usr/local/lib/X11 \ |
| /usr/local/lib/X11R6 \ |
| /usr/local/lib/X11R5 \ |
| /usr/local/lib/X11R4 \ |
| \ |
| /usr/X386/lib \ |
| /usr/x386/lib \ |
| /usr/XFree86/lib/X11 \ |
| \ |
| /usr/lib \ |
| /usr/local/lib \ |
| /usr/unsupported/lib \ |
| /usr/athena/lib \ |
| /usr/local/x11r5/lib \ |
| /usr/lpp/Xamples/lib \ |
| /lib/usr/lib/X11 \ |
| \ |
| /usr/openwin/lib \ |
| /usr/openwin/share/lib \ |
| ; \ |
| do |
| for ac_extension in a so sl; do |
| if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then |
| ac_x_libraries=$ac_dir |
| break 2 |
| fi |
| done |
| done |
| fi |
| rm -f conftest* |
| fi # $ac_x_libraries = NO |
| |
| if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then |
| # Didn't find X anywhere. Cache the known absence of X. |
| ac_cv_have_x="have_x=no" |
| else |
| # Record where we found X for the cache. |
| ac_cv_have_x="have_x=yes \ |
| ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" |
| fi |
| fi |
| fi |
| eval "$ac_cv_have_x" |
| fi # $with_x != no |
| |
| if test "$have_x" != yes; then |
| echo "$ac_t""$have_x" 1>&6 |
| no_x=yes |
| else |
| # If each of the values was on the command line, it overrides each guess. |
| test "x$x_includes" = xNONE && x_includes=$ac_x_includes |
| test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries |
| # Update the cache value to reflect the command line values. |
| ac_cv_have_x="have_x=yes \ |
| ac_x_includes=$x_includes ac_x_libraries=$x_libraries" |
| echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 |
| fi |
| |
| if test "$no_x" = yes; then |
| # Not all programs may use this symbol, but it does not hurt to define it. |
| cat >> confdefs.pytmp <<\EOF |
| (''' X_DISPLAY_MISSING ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define X_DISPLAY_MISSING 1 |
| EOF |
| |
| X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= |
| else |
| if test -n "$x_includes"; then |
| X_CFLAGS="$X_CFLAGS -I$x_includes" |
| fi |
| |
| # It would also be nice to do this for all -L options, not just this one. |
| if test -n "$x_libraries"; then |
| X_LIBS="$X_LIBS -L$x_libraries" |
| # For Solaris; some versions of Sun CC require a space after -R and |
| # others require no space. Words are not sufficient . . . . |
| case "`(uname -sr) 2>/dev/null`" in |
| "SunOS 5"*) |
| echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 |
| echo "configure:4537: checking whether -R must be followed by a space" >&5 |
| ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" |
| cat > conftest.$ac_ext <<EOF |
| #line 4540 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:4547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| ac_R_nospace=yes |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_R_nospace=no |
| fi |
| rm -f conftest* |
| if test $ac_R_nospace = yes; then |
| echo "$ac_t""no" 1>&6 |
| X_LIBS="$X_LIBS -R$x_libraries" |
| else |
| LIBS="$ac_xsave_LIBS -R $x_libraries" |
| cat > conftest.$ac_ext <<EOF |
| #line 4563 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:4570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| ac_R_space=yes |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_R_space=no |
| fi |
| rm -f conftest* |
| if test $ac_R_space = yes; then |
| echo "$ac_t""yes" 1>&6 |
| X_LIBS="$X_LIBS -R $x_libraries" |
| else |
| echo "$ac_t""neither works" 1>&6 |
| fi |
| fi |
| LIBS="$ac_xsave_LIBS" |
| esac |
| fi |
| |
| # Check for system-dependent libraries X programs must link with. |
| # Do this before checking for the system-independent R6 libraries |
| # (-lICE), since we may need -lsocket or whatever for X linking. |
| |
| if test "$ISC" = yes; then |
| X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" |
| else |
| # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X |
| # libraries were built with DECnet support. And karl@cs.umb.edu says |
| # the Alpha needs dnet_stub (dnet does not exist). |
| echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 |
| echo "configure:4602: checking for dnet_ntoa in -ldnet" >&5 |
| ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` |
| if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_save_LIBS="$LIBS" |
| LIBS="-ldnet $LIBS" |
| cat > conftest.$ac_ext <<EOF |
| #line 4610 "configure" |
| #include "confdefs.h" |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char dnet_ntoa(); |
| |
| int main() { |
| dnet_ntoa() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:4621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=no" |
| fi |
| rm -f conftest* |
| LIBS="$ac_save_LIBS" |
| |
| fi |
| if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| if test $ac_cv_lib_dnet_dnet_ntoa = no; then |
| echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 |
| echo "configure:4643: checking for dnet_ntoa in -ldnet_stub" >&5 |
| ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` |
| if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_save_LIBS="$LIBS" |
| LIBS="-ldnet_stub $LIBS" |
| cat > conftest.$ac_ext <<EOF |
| #line 4651 "configure" |
| #include "confdefs.h" |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char dnet_ntoa(); |
| |
| int main() { |
| dnet_ntoa() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:4662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=no" |
| fi |
| rm -f conftest* |
| LIBS="$ac_save_LIBS" |
| |
| fi |
| if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| fi |
| |
| # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, |
| # to get the SysV transport functions. |
| # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) |
| # needs -lnsl. |
| # The nsl library prevents programs from opening the X display |
| # on Irix 5.2, according to dickey@clark.net. |
| echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 |
| echo "configure:4691: checking for gethostbyname" >&5 |
| if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 4696 "configure" |
| #define gethostbyname innocuous_gethostbyname |
| #include "confdefs.h" |
| #undef gethostbyname |
| /* System header to define __stub macros and hopefully few prototypes, |
| which can conflict with char gethostbyname(); below. */ |
| #define gethostbyname innocuous_gethostbyname |
| #include <assert.h> |
| #undef gethostbyname |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char gethostbyname(); |
| |
| int main() { |
| |
| /* The GNU C library defines this for functions which it implements |
| to always fail with ENOSYS. Some functions are actually named |
| something starting with __ and the normal name is an alias. */ |
| #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) |
| choke me |
| #else |
| gethostbyname(); |
| #endif |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:4723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_func_gethostbyname=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_func_gethostbyname=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| : |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| if test $ac_cv_func_gethostbyname = no; then |
| echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 |
| echo "configure:4744: checking for gethostbyname in -lnsl" >&5 |
| ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` |
| if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_save_LIBS="$LIBS" |
| LIBS="-lnsl $LIBS" |
| cat > conftest.$ac_ext <<EOF |
| #line 4752 "configure" |
| #include "confdefs.h" |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char gethostbyname(); |
| |
| int main() { |
| gethostbyname() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:4763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=no" |
| fi |
| rm -f conftest* |
| LIBS="$ac_save_LIBS" |
| |
| fi |
| if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| fi |
| |
| # lieder@skyler.mavd.honeywell.com says without -lsocket, |
| # socket/setsockopt and other routines are undefined under SCO ODT |
| # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary |
| # on later versions), says simon@lia.di.epfl.ch: it contains |
| # gethostby* variants that don't use the nameserver (or something). |
| # -lsocket must be given before -lnsl if both are needed. |
| # We assume that if connect needs -lnsl, so does gethostbyname. |
| echo $ac_n "checking for connect""... $ac_c" 1>&6 |
| echo "configure:4793: checking for connect" >&5 |
| if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 4798 "configure" |
| #define connect innocuous_connect |
| #include "confdefs.h" |
| #undef connect |
| /* System header to define __stub macros and hopefully few prototypes, |
| which can conflict with char connect(); below. */ |
| #define connect innocuous_connect |
| #include <assert.h> |
| #undef connect |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char connect(); |
| |
| int main() { |
| |
| /* The GNU C library defines this for functions which it implements |
| to always fail with ENOSYS. Some functions are actually named |
| something starting with __ and the normal name is an alias. */ |
| #if defined (__stub_connect) || defined (__stub___connect) |
| choke me |
| #else |
| connect(); |
| #endif |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:4825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_func_connect=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_func_connect=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| : |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| if test $ac_cv_func_connect = no; then |
| echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 |
| echo "configure:4846: checking for connect in -lsocket" >&5 |
| ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` |
| if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_save_LIBS="$LIBS" |
| LIBS="-lsocket $X_EXTRA_LIBS $LIBS" |
| cat > conftest.$ac_ext <<EOF |
| #line 4854 "configure" |
| #include "confdefs.h" |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char connect(); |
| |
| int main() { |
| connect() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:4865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=no" |
| fi |
| rm -f conftest* |
| LIBS="$ac_save_LIBS" |
| |
| fi |
| if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| fi |
| |
| # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. |
| echo $ac_n "checking for remove""... $ac_c" 1>&6 |
| echo "configure:4889: checking for remove" >&5 |
| if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 4894 "configure" |
| #define remove innocuous_remove |
| #include "confdefs.h" |
| #undef remove |
| /* System header to define __stub macros and hopefully few prototypes, |
| which can conflict with char remove(); below. */ |
| #define remove innocuous_remove |
| #include <assert.h> |
| #undef remove |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char remove(); |
| |
| int main() { |
| |
| /* The GNU C library defines this for functions which it implements |
| to always fail with ENOSYS. Some functions are actually named |
| something starting with __ and the normal name is an alias. */ |
| #if defined (__stub_remove) || defined (__stub___remove) |
| choke me |
| #else |
| remove(); |
| #endif |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:4921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_func_remove=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_func_remove=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| : |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| if test $ac_cv_func_remove = no; then |
| echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 |
| echo "configure:4942: checking for remove in -lposix" >&5 |
| ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` |
| if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_save_LIBS="$LIBS" |
| LIBS="-lposix $LIBS" |
| cat > conftest.$ac_ext <<EOF |
| #line 4950 "configure" |
| #include "confdefs.h" |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char remove(); |
| |
| int main() { |
| remove() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:4961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=no" |
| fi |
| rm -f conftest* |
| LIBS="$ac_save_LIBS" |
| |
| fi |
| if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| fi |
| |
| # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. |
| echo $ac_n "checking for shmat""... $ac_c" 1>&6 |
| echo "configure:4985: checking for shmat" >&5 |
| if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 4990 "configure" |
| #define shmat innocuous_shmat |
| #include "confdefs.h" |
| #undef shmat |
| /* System header to define __stub macros and hopefully few prototypes, |
| which can conflict with char shmat(); below. */ |
| #define shmat innocuous_shmat |
| #include <assert.h> |
| #undef shmat |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char shmat(); |
| |
| int main() { |
| |
| /* The GNU C library defines this for functions which it implements |
| to always fail with ENOSYS. Some functions are actually named |
| something starting with __ and the normal name is an alias. */ |
| #if defined (__stub_shmat) || defined (__stub___shmat) |
| choke me |
| #else |
| shmat(); |
| #endif |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:5017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_func_shmat=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_func_shmat=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| : |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| if test $ac_cv_func_shmat = no; then |
| echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 |
| echo "configure:5038: checking for shmat in -lipc" >&5 |
| ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` |
| if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_save_LIBS="$LIBS" |
| LIBS="-lipc $LIBS" |
| cat > conftest.$ac_ext <<EOF |
| #line 5046 "configure" |
| #include "confdefs.h" |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char shmat(); |
| |
| int main() { |
| shmat() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:5057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=no" |
| fi |
| rm -f conftest* |
| LIBS="$ac_save_LIBS" |
| |
| fi |
| if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| fi |
| fi |
| |
| # Check for libraries that X11R6 Xt/Xaw programs need. |
| ac_save_LDFLAGS="$LDFLAGS" |
| test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" |
| # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to |
| # check for ICE first), but we must link in the order -lSM -lICE or |
| # we get undefined symbols. So assume we have SM if we have ICE. |
| # These have to be linked with before -lX11, unlike the other |
| # libraries we check for below, so use a different variable. |
| # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. |
| echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 |
| echo "configure:5090: checking for IceConnectionNumber in -lICE" >&5 |
| ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` |
| if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_save_LIBS="$LIBS" |
| LIBS="-lICE $X_EXTRA_LIBS $LIBS" |
| cat > conftest.$ac_ext <<EOF |
| #line 5098 "configure" |
| #include "confdefs.h" |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char IceConnectionNumber(); |
| |
| int main() { |
| IceConnectionNumber() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:5109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=no" |
| fi |
| rm -f conftest* |
| LIBS="$ac_save_LIBS" |
| |
| fi |
| if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| LDFLAGS="$ac_save_LDFLAGS" |
| |
| fi |
| |
| |
| XCFLAGS="$X_CFLAGS" |
| |
| fi # COMPILE_ENVIRONMENT |
| |
| MOZILLA_VERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir` |
| MOZILLA_UAVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --uaversion` |
| MOZILLA_SYMBOLVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --symbolversion` |
| if test -z "$MOZILLA_VERSION"; then |
| { echo "configure: error: failed to read version info from milestone file" 1>&2; echo "configure: error: failed to read version info from milestone file" 1>&5; exit 1; } |
| fi |
| |
| cat >> confdefs.pytmp <<EOF |
| (''' MOZILLA_VERSION ''', r''' "$MOZILLA_VERSION" ''') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define MOZILLA_VERSION "$MOZILLA_VERSION" |
| EOF |
| |
| cat >> confdefs.pytmp <<EOF |
| (''' MOZILLA_VERSION_U ''', r''' $MOZILLA_VERSION ''') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define MOZILLA_VERSION_U $MOZILLA_VERSION |
| EOF |
| |
| cat >> confdefs.pytmp <<EOF |
| (''' MOZILLA_UAVERSION ''', r''' "$MOZILLA_UAVERSION" ''') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define MOZILLA_UAVERSION "$MOZILLA_UAVERSION" |
| EOF |
| |
| |
| |
| # Separate version into components for use in shared object naming etc |
| |
| MOZJS_MAJOR_VERSION=`echo $MOZILLA_VERSION | sed "s|\(^[0-9]*\)\.[0-9]*.*|\1|"` |
| MOZJS_MINOR_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.\([0-9]*\).*|\1|"` |
| MOZJS_PATCH_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9]*[^0-9]*||"` |
| IS_ALPHA=`echo $MOZILLA_VERSION | grep '[ab]'` |
| |
| JS_SHELL_NAME=js |
| JS_CONFIG_NAME=js-config |
| |
| |
| if test -n "$IS_ALPHA"; then |
| |
| MOZJS_ALPHA=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9\.]*\([^0-9]\).*|\1|"` |
| |
| fi |
| cat >> confdefs.pytmp <<EOF |
| (''' MOZJS_MAJOR_VERSION ''', r''' $MOZJS_MAJOR_VERSION ''') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define MOZJS_MAJOR_VERSION $MOZJS_MAJOR_VERSION |
| EOF |
| |
| cat >> confdefs.pytmp <<EOF |
| (''' MOZJS_MINOR_VERSION ''', r''' $MOZJS_MINOR_VERSION ''') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define MOZJS_MINOR_VERSION $MOZJS_MINOR_VERSION |
| EOF |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| AS_BIN=$AS |
| AR_EXTRACT='$(AR) x' |
| AS='$(CC)' |
| AS_DASH_C_FLAG='-c' |
| DLL_PREFIX=lib |
| LIB_PREFIX=lib |
| DLL_SUFFIX=.so |
| OBJ_SUFFIX=o |
| LIB_SUFFIX=a |
| IMPORT_LIB_SUFFIX= |
| DIRENT_INO=d_ino |
| MOZ_USER_DIR=".mozilla" |
| |
| MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin -Wl,-rpath-link,${prefix}/lib" |
| |
| |
| |
| |
| MOZ_THUMB=toolchain-default |
| MOZ_THUMB_INTERWORK=toolchain-default |
| MOZ_FPU=toolchain-default |
| MOZ_FLOAT_ABI=toolchain-default |
| MOZ_SOFT_FLOAT=toolchain-default |
| MOZ_ALIGN=toolchain-default |
| |
| # Check whether --with-arch or --without-arch was given. |
| if test "${with_arch+set}" = set; then |
| withval="$with_arch" |
| if test -z "$GNU_CC"; then |
| { echo "configure: error: --with-arch is not supported on non-GNU toolchains" 1>&2; echo "configure: error: --with-arch is not supported on non-GNU toolchains" 1>&5; exit 1; } |
| fi |
| MOZ_ARCH=$withval |
| fi |
| |
| |
| if test -z "$MOZ_ARCH"; then |
| case "${CPU_ARCH}-${OS_TARGET}" in |
| arm-Android) |
| MOZ_THUMB=yes |
| MOZ_ARCH=armv7-a |
| MOZ_FPU=vfp |
| MOZ_FLOAT_ABI=softfp |
| MOZ_ALIGN=no |
| ;; |
| arm-Darwin) |
| MOZ_ARCH=toolchain-default |
| ;; |
| esac |
| fi |
| |
| if test "$MOZ_ARCH" = "armv6" -a "$OS_TARGET" = "Android"; then |
| MOZ_FPU=vfp |
| MOZ_FLOAT_ABI=softfp |
| fi |
| |
| # Check whether --with-thumb or --without-thumb was given. |
| if test "${with_thumb+set}" = set; then |
| withval="$with_thumb" |
| if test -z "$GNU_CC"; then |
| { echo "configure: error: --with-thumb is not supported on non-GNU toolchains" 1>&2; echo "configure: error: --with-thumb is not supported on non-GNU toolchains" 1>&5; exit 1; } |
| fi |
| MOZ_THUMB=$withval |
| fi |
| |
| |
| # Check whether --with-thumb-interwork or --without-thumb-interwork was given. |
| if test "${with_thumb_interwork+set}" = set; then |
| withval="$with_thumb_interwork" |
| if test -z "$GNU_CC"; then |
| { echo "configure: error: --with-thumb-interwork is not supported on non-GNU toolchains" 1>&2; echo "configure: error: --with-thumb-interwork is not supported on non-GNU toolchains" 1>&5; exit 1; } |
| fi |
| MOZ_THUMB_INTERWORK=$withval |
| fi |
| |
| |
| # Check whether --with-fpu or --without-fpu was given. |
| if test "${with_fpu+set}" = set; then |
| withval="$with_fpu" |
| if test -z "$GNU_CC"; then |
| { echo "configure: error: --with-fpu is not supported on non-GNU toolchains" 1>&2; echo "configure: error: --with-fpu is not supported on non-GNU toolchains" 1>&5; exit 1; } |
| fi |
| MOZ_FPU=$withval |
| fi |
| |
| |
| # Check whether --with-float-abi or --without-float-abi was given. |
| if test "${with_float_abi+set}" = set; then |
| withval="$with_float_abi" |
| if test -z "$GNU_CC"; then |
| { echo "configure: error: --with-float-abi is not supported on non-GNU toolchains" 1>&2; echo "configure: error: --with-float-abi is not supported on non-GNU toolchains" 1>&5; exit 1; } |
| fi |
| MOZ_FLOAT_ABI=$withval |
| fi |
| |
| |
| # Check whether --with-soft-float or --without-soft-float was given. |
| if test "${with_soft_float+set}" = set; then |
| withval="$with_soft_float" |
| if test -z "$GNU_CC"; then |
| { echo "configure: error: --with-soft-float is not supported on non-GNU toolchains" 1>&2; echo "configure: error: --with-soft-float is not supported on non-GNU toolchains" 1>&5; exit 1; } |
| fi |
| MOZ_SOFT_FLOAT=$withval |
| fi |
| |
| |
| case "$MOZ_ARCH" in |
| toolchain-default|"") |
| arch_flag="" |
| ;; |
| *) |
| arch_flag="-march=$MOZ_ARCH" |
| ;; |
| esac |
| |
| case "$MOZ_THUMB" in |
| yes) |
| MOZ_THUMB2=1 |
| thumb_flag="-mthumb" |
| ;; |
| no) |
| MOZ_THUMB2= |
| thumb_flag="-marm" |
| ;; |
| *) |
| _SAVE_CFLAGS="$CFLAGS" |
| CFLAGS="$arch_flag" |
| cat > conftest.$ac_ext <<EOF |
| #line 5333 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return sizeof(__thumb2__); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:5340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| MOZ_THUMB2=1 |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| MOZ_THUMB2= |
| fi |
| rm -f conftest* |
| CFLAGS="$_SAVE_CFLAGS" |
| thumb_flag="" |
| ;; |
| esac |
| |
| if test "$MOZ_THUMB2" = 1; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' MOZ_THUMB2 ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define MOZ_THUMB2 1 |
| EOF |
| |
| fi |
| |
| case "$MOZ_THUMB_INTERWORK" in |
| yes) |
| thumb_interwork_flag="-mthumb-interwork" |
| ;; |
| no) |
| thumb_interwork_flag="-mno-thumb-interwork" |
| ;; |
| *) # toolchain-default |
| thumb_interwork_flag="" |
| ;; |
| esac |
| |
| case "$MOZ_FPU" in |
| toolchain-default|"") |
| fpu_flag="" |
| ;; |
| *) |
| fpu_flag="-mfpu=$MOZ_FPU" |
| ;; |
| esac |
| |
| case "$MOZ_FLOAT_ABI" in |
| toolchain-default|"") |
| float_abi_flag="" |
| ;; |
| *) |
| float_abi_flag="-mfloat-abi=$MOZ_FLOAT_ABI" |
| ;; |
| esac |
| |
| case "$MOZ_SOFT_FLOAT" in |
| yes) |
| soft_float_flag="-msoft-float" |
| ;; |
| no) |
| soft_float_flag="-mno-soft-float" |
| ;; |
| *) # toolchain-default |
| soft_float_flag="" |
| ;; |
| esac |
| |
| case "$MOZ_ALIGN" in |
| no) |
| align_flag="-mno-unaligned-access" |
| ;; |
| yes) |
| align_flag="-munaligned-access" |
| ;; |
| *) |
| align_flag="" |
| ;; |
| esac |
| |
| if test -n "$align_flag"; then |
| _SAVE_CFLAGS="$CFLAGS" |
| CFLAGS="$CFLAGS $align_flag" |
| echo $ac_n "checking whether alignment flag ($align_flag) is supported""... $ac_c" 1>&6 |
| echo "configure:5423: checking whether alignment flag ($align_flag) is supported" >&5 |
| cat > conftest.$ac_ext <<EOF |
| #line 5425 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:5432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| : |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| align_flag="" |
| fi |
| rm -f conftest* |
| CFLAGS="$_SAVE_CFLAGS" |
| fi |
| |
| all_flags=`echo $arch_flag $thumb_flag $thumb_interwork_flag $fpu_flag $float_abi_flag $soft_float_flag $align_flag` |
| if test -n "$all_flags"; then |
| _SAVE_CFLAGS="$CFLAGS" |
| CFLAGS="$all_flags" |
| echo $ac_n "checking whether the chosen combination of compiler flags ($all_flags) works""... $ac_c" 1>&6 |
| echo "configure:5449: checking whether the chosen combination of compiler flags ($all_flags) works" >&5 |
| cat > conftest.$ac_ext <<EOF |
| #line 5451 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return 0; |
| ; return 0; } |
| EOF |
| if { (eval echo configure:5458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| echo "$ac_t""yes" 1>&6 |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| { echo "configure: error: no" 1>&2; echo "configure: error: no" 1>&5; exit 1; } |
| fi |
| rm -f conftest* |
| |
| CFLAGS="$_SAVE_CFLAGS $all_flags" |
| CXXFLAGS="$CXXFLAGS $all_flags" |
| ASFLAGS="$ASFLAGS $all_flags" |
| if test -n "$thumb_flag"; then |
| LDFLAGS="$LDFLAGS $thumb_flag" |
| fi |
| fi |
| |
| |
| |
| if test "$CPU_ARCH" = "arm"; then |
| echo $ac_n "checking for ARM SIMD support in compiler""... $ac_c" 1>&6 |
| echo "configure:5481: checking for ARM SIMD support in compiler" >&5 |
| # We try to link so that this also fails when |
| # building with LTO. |
| cat > conftest.$ac_ext <<EOF |
| #line 5485 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| asm("uqadd8 r1, r1, r2"); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:5492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| result="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| result="no" |
| fi |
| rm -f conftest* |
| echo "$ac_t"""$result"" 1>&6 |
| if test "$result" = "yes"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_ARM_SIMD ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_ARM_SIMD 1 |
| EOF |
| |
| HAVE_ARM_SIMD=1 |
| fi |
| |
| echo $ac_n "checking ARM version support in compiler""... $ac_c" 1>&6 |
| echo "configure:5515: checking ARM version support in compiler" >&5 |
| ARM_ARCH=`${CC-cc} ${CFLAGS} -dM -E - < /dev/null | sed -n 's/.*__ARM_ARCH_\([0-9][0-9]*\).*/\1/p'` |
| echo "$ac_t"""$ARM_ARCH"" 1>&6 |
| |
| echo $ac_n "checking for ARM NEON support in compiler""... $ac_c" 1>&6 |
| echo "configure:5520: checking for ARM NEON support in compiler" >&5 |
| # We try to link so that this also fails when |
| # building with LTO. |
| cat > conftest.$ac_ext <<EOF |
| #line 5524 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| asm(".fpu neon\n vadd.i8 d0, d0, d0"); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:5531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| result="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| result="no" |
| fi |
| rm -f conftest* |
| echo "$ac_t"""$result"" 1>&6 |
| if test "$result" = "yes"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_ARM_NEON ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_ARM_NEON 1 |
| EOF |
| |
| HAVE_ARM_NEON=1 |
| |
| if test -n "$ARM_ARCH"; then |
| if test "$ARM_ARCH" -lt 7; then |
| BUILD_ARM_NEON= |
| else |
| cat >> confdefs.pytmp <<\EOF |
| (''' BUILD_ARM_NEON ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define BUILD_ARM_NEON 1 |
| EOF |
| |
| BUILD_ARM_NEON=1 |
| fi |
| fi |
| fi |
| |
| fi # CPU_ARCH = arm |
| |
| |
| |
| |
| |
| |
| if test -n "$MOZ_ARCH"; then |
| NSPR_CONFIGURE_ARGS="$NSPR_CONFIGURE_ARGS --with-arch=$MOZ_ARCH" |
| NSPR_CONFIGURE_ARGS="$NSPR_CONFIGURE_ARGS --with-thumb=$MOZ_THUMB" |
| NSPR_CONFIGURE_ARGS="$NSPR_CONFIGURE_ARGS --with-thumb-interwork=$MOZ_THUMB_INTERWORK" |
| NSPR_CONFIGURE_ARGS="$NSPR_CONFIGURE_ARGS --with-fpu=$MOZ_FPU" |
| NSPR_CONFIGURE_ARGS="$NSPR_CONFIGURE_ARGS --with-float-abi=$MOZ_FLOAT_ABI" |
| NSPR_CONFIGURE_ARGS="$NSPR_CONFIGURE_ARGS --with-soft-float=$MOZ_SOFT_FLOAT" |
| fi |
| |
| |
| |
| if test "$COMPILE_ENVIRONMENT"; then |
| configure_static_assert_macros=' |
| #define CONFIGURE_STATIC_ASSERT(condition) CONFIGURE_STATIC_ASSERT_IMPL(condition, __LINE__) |
| #define CONFIGURE_STATIC_ASSERT_IMPL(condition, line) CONFIGURE_STATIC_ASSERT_IMPL2(condition, line) |
| #define CONFIGURE_STATIC_ASSERT_IMPL2(condition, line) typedef int static_assert_line_##line[(condition) ? 1 : -1] |
| ' |
| |
| echo $ac_n "checking that static assertion macros used in autoconf tests work""... $ac_c" 1>&6 |
| echo "configure:5594: checking that static assertion macros used in autoconf tests work" >&5 |
| if eval "test \"`echo '$''{'ac_cv_static_assertion_macros_work'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| ac_cv_static_assertion_macros_work="yes" |
| cat > conftest.$ac_ext <<EOF |
| #line 5608 "configure" |
| #include "confdefs.h" |
| $configure_static_assert_macros |
| int main() { |
| CONFIGURE_STATIC_ASSERT(1) |
| ; return 0; } |
| EOF |
| if { (eval echo configure:5615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| : |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cv_static_assertion_macros_work="no" |
| fi |
| rm -f conftest* |
| cat > conftest.$ac_ext <<EOF |
| #line 5625 "configure" |
| #include "confdefs.h" |
| $configure_static_assert_macros |
| int main() { |
| CONFIGURE_STATIC_ASSERT(0) |
| ; return 0; } |
| EOF |
| if { (eval echo configure:5632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cv_static_assertion_macros_work="no" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| fi |
| rm -f conftest* |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| cat > conftest.$ac_ext <<EOF |
| #line 5648 "configure" |
| #include "confdefs.h" |
| $configure_static_assert_macros |
| int main() { |
| CONFIGURE_STATIC_ASSERT(1) |
| ; return 0; } |
| EOF |
| if { (eval echo configure:5655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| : |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cv_static_assertion_macros_work="no" |
| fi |
| rm -f conftest* |
| cat > conftest.$ac_ext <<EOF |
| #line 5665 "configure" |
| #include "confdefs.h" |
| $configure_static_assert_macros |
| int main() { |
| CONFIGURE_STATIC_ASSERT(0) |
| ; return 0; } |
| EOF |
| if { (eval echo configure:5672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cv_static_assertion_macros_work="no" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| fi |
| rm -f conftest* |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t"""$ac_cv_static_assertion_macros_work"" 1>&6 |
| if test "$ac_cv_static_assertion_macros_work" = "no"; then |
| { echo "configure: error: Compiler cannot compile macros used in autoconf tests." 1>&2; echo "configure: error: Compiler cannot compile macros used in autoconf tests." 1>&5; exit 1; } |
| fi |
| fi # COMPILE_ENVIRONMENT |
| |
| |
| |
| |
| if test "$OS_TARGET" = "Android" -a -z "$gonkdir"; then |
| cpu_arch_dir="$ANDROID_CPU_ARCH" |
| if test "$MOZ_THUMB2" = 1; then |
| cpu_arch_dir="$cpu_arch_dir/thumb" |
| fi |
| |
| if test -z "$STLPORT_CPPFLAGS$STLPORT_LIBS"; then |
| case "$android_cxx_stl" in |
| libstdc++) |
| # android-ndk-r8b and later |
| ndk_base="$android_ndk/sources/cxx-stl/gnu-libstdc++/$android_gnu_compiler_version" |
| ndk_libs_include="$ndk_base/libs/$ANDROID_CPU_ARCH" |
| ndk_libs="$ndk_base/libs/$cpu_arch_dir" |
| ndk_include="$ndk_base/include" |
| |
| if ! test -e "$ndk_libs/libgnustl_static.a"; then |
| { echo "configure: error: Couldn't find path to gnu-libstdc++ in the android ndk" 1>&2; echo "configure: error: Couldn't find path to gnu-libstdc++ in the android ndk" 1>&5; exit 1; } |
| fi |
| |
| STLPORT_LIBS="-L$ndk_libs -lgnustl_static" |
| STLPORT_CPPFLAGS="-I$ndk_include -I$ndk_include/backward -I$ndk_libs_include/include" |
| ;; |
| libc++) |
| # android-ndk-r8b and later |
| ndk_base="$android_ndk/sources/cxx-stl" |
| cxx_base="$ndk_base/llvm-libc++" |
| cxx_libs="$cxx_base/libs/$cpu_arch_dir" |
| cxx_include="$cxx_base/libcxx/include" |
| cxxabi_base="$ndk_base/llvm-libc++abi" |
| cxxabi_include="$cxxabi_base/libcxxabi/include" |
| |
| if ! test -e "$cxx_libs/libc++_static.a"; then |
| { echo "configure: error: Couldn't find path to llvm-libc++ in the android ndk" 1>&2; echo "configure: error: Couldn't find path to llvm-libc++ in the android ndk" 1>&5; exit 1; } |
| fi |
| |
| STLPORT_LIBS="-L$cxx_libs -lc++_static" |
| # Add android/support/include/ for prototyping long double math |
| # functions, locale-specific C library functions, multibyte support, |
| # etc. |
| STLPORT_CPPFLAGS="-I$android_ndk/sources/android/support/include -I$cxx_include -I$cxxabi_include" |
| ;; |
| mozstlport) |
| # We don't need to set STLPORT_LIBS, because the build system will |
| # take care of linking in our home-built stlport where it is needed. |
| STLPORT_CPPFLAGS="-isystem $_topsrcdir/build/stlport/stlport -isystem $_topsrcdir/build/stlport/overrides -isystem $android_ndk/sources/cxx-stl/system/include" |
| ;; |
| *) |
| { echo "configure: error: Bad value for --enable-android-cxx-stl" 1>&2; echo "configure: error: Bad value for --enable-android-cxx-stl" 1>&5; exit 1; } |
| ;; |
| esac |
| fi |
| CXXFLAGS="$CXXFLAGS $STLPORT_CPPFLAGS" |
| fi |
| MOZ_ANDROID_CXX_STL=$android_cxx_stl |
| |
| |
| |
| |
| |
| if test -n "${CLANG_CC}${CLANG_CL}"; then |
| _WARNINGS_CFLAGS="-Qunused-arguments ${_WARNINGS_CFLAGS}" |
| CPPFLAGS="-Qunused-arguments ${CPPFLAGS}" |
| fi |
| if test -n "${CLANG_CXX}${CLANG_CL}"; then |
| _WARNINGS_CXXFLAGS="-Qunused-arguments ${_WARNINGS_CXXFLAGS}" |
| fi |
| |
| # Check whether --enable-address-sanitizer or --disable-address-sanitizer was given. |
| if test "${enable_address_sanitizer+set}" = set; then |
| enableval="$enable_address_sanitizer" |
| if test "$enableval" = "yes"; then |
| MOZ_ASAN=1 |
| elif test "$enableval" = "no"; then |
| MOZ_ASAN= |
| else |
| { echo "configure: error: Option, address-sanitizer, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, address-sanitizer, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| if test -n "$MOZ_ASAN"; then |
| MOZ_LLVM_HACKS=1 |
| cat >> confdefs.pytmp <<\EOF |
| (''' MOZ_ASAN ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define MOZ_ASAN 1 |
| EOF |
| |
| # Extract the first word of "llvm-symbolizer", so it can be a program name with args. |
| set dummy llvm-symbolizer; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:5790: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| case "$LLVM_SYMBOLIZER" in |
| /*) |
| ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a path. |
| ;; |
| ?:/*) |
| ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a dos path. |
| ;; |
| *) |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_path_LLVM_SYMBOLIZER="$ac_dir/$ac_word" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| ;; |
| esac |
| fi |
| LLVM_SYMBOLIZER="$ac_cv_path_LLVM_SYMBOLIZER" |
| if test -n "$LLVM_SYMBOLIZER"; then |
| echo "$ac_t""$LLVM_SYMBOLIZER" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| if test "$msyshost"; then |
| case "$LLVM_SYMBOLIZER" in |
| /*) |
| tmp_DIRNAME=`dirname "$LLVM_SYMBOLIZER"` |
| tmp_BASENAME=`basename "$LLVM_SYMBOLIZER"` |
| tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` |
| LLVM_SYMBOLIZER="$tmp_PWD/$tmp_BASENAME" |
| if test -e "$LLVM_SYMBOLIZER.exe"; then |
| LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER.exe" |
| fi |
| esac |
| fi |
| |
| fi |
| |
| |
| # Check whether --enable-memory-sanitizer or --disable-memory-sanitizer was given. |
| if test "${enable_memory_sanitizer+set}" = set; then |
| enableval="$enable_memory_sanitizer" |
| if test "$enableval" = "yes"; then |
| MOZ_MSAN=1 |
| elif test "$enableval" = "no"; then |
| MOZ_MSAN= |
| else |
| { echo "configure: error: Option, memory-sanitizer, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, memory-sanitizer, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| if test -n "$MOZ_MSAN"; then |
| MOZ_LLVM_HACKS=1 |
| cat >> confdefs.pytmp <<\EOF |
| (''' MOZ_MSAN ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define MOZ_MSAN 1 |
| EOF |
| |
| # Extract the first word of "llvm-symbolizer", so it can be a program name with args. |
| set dummy llvm-symbolizer; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:5862: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| case "$LLVM_SYMBOLIZER" in |
| /*) |
| ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a path. |
| ;; |
| ?:/*) |
| ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a dos path. |
| ;; |
| *) |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_path_LLVM_SYMBOLIZER="$ac_dir/$ac_word" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| ;; |
| esac |
| fi |
| LLVM_SYMBOLIZER="$ac_cv_path_LLVM_SYMBOLIZER" |
| if test -n "$LLVM_SYMBOLIZER"; then |
| echo "$ac_t""$LLVM_SYMBOLIZER" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| if test "$msyshost"; then |
| case "$LLVM_SYMBOLIZER" in |
| /*) |
| tmp_DIRNAME=`dirname "$LLVM_SYMBOLIZER"` |
| tmp_BASENAME=`basename "$LLVM_SYMBOLIZER"` |
| tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` |
| LLVM_SYMBOLIZER="$tmp_PWD/$tmp_BASENAME" |
| if test -e "$LLVM_SYMBOLIZER.exe"; then |
| LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER.exe" |
| fi |
| esac |
| fi |
| |
| fi |
| |
| |
| # Check whether --enable-thread-sanitizer or --disable-thread-sanitizer was given. |
| if test "${enable_thread_sanitizer+set}" = set; then |
| enableval="$enable_thread_sanitizer" |
| if test "$enableval" = "yes"; then |
| MOZ_TSAN=1 |
| elif test "$enableval" = "no"; then |
| MOZ_TSAN= |
| else |
| { echo "configure: error: Option, thread-sanitizer, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, thread-sanitizer, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| if test -n "$MOZ_TSAN"; then |
| MOZ_LLVM_HACKS=1 |
| cat >> confdefs.pytmp <<\EOF |
| (''' MOZ_TSAN ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define MOZ_TSAN 1 |
| EOF |
| |
| # Extract the first word of "llvm-symbolizer", so it can be a program name with args. |
| set dummy llvm-symbolizer; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:5934: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| case "$LLVM_SYMBOLIZER" in |
| /*) |
| ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a path. |
| ;; |
| ?:/*) |
| ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a dos path. |
| ;; |
| *) |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_path_LLVM_SYMBOLIZER="$ac_dir/$ac_word" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| ;; |
| esac |
| fi |
| LLVM_SYMBOLIZER="$ac_cv_path_LLVM_SYMBOLIZER" |
| if test -n "$LLVM_SYMBOLIZER"; then |
| echo "$ac_t""$LLVM_SYMBOLIZER" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| if test "$msyshost"; then |
| case "$LLVM_SYMBOLIZER" in |
| /*) |
| tmp_DIRNAME=`dirname "$LLVM_SYMBOLIZER"` |
| tmp_BASENAME=`basename "$LLVM_SYMBOLIZER"` |
| tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` |
| LLVM_SYMBOLIZER="$tmp_PWD/$tmp_BASENAME" |
| if test -e "$LLVM_SYMBOLIZER.exe"; then |
| LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER.exe" |
| fi |
| esac |
| fi |
| |
| fi |
| |
| |
| # The LLVM symbolizer is used by all sanitizers |
| |
| |
| # Check whether --enable-llvm-hacks or --disable-llvm-hacks was given. |
| if test "${enable_llvm_hacks+set}" = set; then |
| enableval="$enable_llvm_hacks" |
| if test "$enableval" = "yes"; then |
| MOZ_LLVM_HACKS=1 |
| elif test "$enableval" = "no"; then |
| MOZ_LLVM_HACKS= |
| else |
| { echo "configure: error: Option, llvm-hacks, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, llvm-hacks, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| if test -n "$MOZ_LLVM_HACKS"; then |
| MOZ_NO_WLZDEFS=1 |
| fi |
| |
| # Check whether --enable-warnings-as-errors or --disable-warnings-as-errors was given. |
| if test "${enable_warnings_as_errors+set}" = set; then |
| enableval="$enable_warnings_as_errors" |
| if test "$enableval" = "yes"; then |
| MOZ_ENABLE_WARNINGS_AS_ERRORS=1 |
| elif test "$enableval" = "no"; then |
| MOZ_ENABLE_WARNINGS_AS_ERRORS= |
| else |
| { echo "configure: error: Option, warnings-as-errors, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, warnings-as-errors, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| |
| if test "$GNU_CC"; then |
| # We use C99. |
| CFLAGS="$CFLAGS -std=gnu99" |
| MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$(DSO_SONAME) -o $@' |
| MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$(DSO_SONAME) -o $@' |
| DSO_LDOPTS='-shared' |
| if test "$GCC_USE_GNU_LD"; then |
| # Some tools like ASan use a runtime library that is only |
| # linked against executables, so we must allow undefined |
| # symbols for shared objects in some cases. |
| if test -z "$MOZ_NO_WLZDEFS"; then |
| # Don't allow undefined symbols in libraries |
| DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,defs" |
| fi |
| fi |
| WARNINGS_AS_ERRORS='-Werror' |
| DSO_CFLAGS='' |
| DSO_PIC_CFLAGS='-fPIC' |
| ASFLAGS="$ASFLAGS -fPIC" |
| echo $ac_n "checking for --noexecstack option to as""... $ac_c" 1>&6 |
| echo "configure:6034: checking for --noexecstack option to as" >&5 |
| _SAVE_CFLAGS=$CFLAGS |
| CFLAGS="$CFLAGS -Wa,--noexecstack" |
| cat > conftest.$ac_ext <<EOF |
| #line 6038 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:6045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| echo "$ac_t""yes" 1>&6 |
| ASFLAGS="$ASFLAGS -Wa,--noexecstack" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| echo "$ac_t""no" 1>&6 |
| fi |
| rm -f conftest* |
| CFLAGS=$_SAVE_CFLAGS |
| echo $ac_n "checking for -z noexecstack option to ld""... $ac_c" 1>&6 |
| echo "configure:6058: checking for -z noexecstack option to ld" >&5 |
| _SAVE_LDFLAGS=$LDFLAGS |
| LDFLAGS="$LDFLAGS -Wl,-z,noexecstack" |
| cat > conftest.$ac_ext <<EOF |
| #line 6062 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:6069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| echo "$ac_t""yes" 1>&6 |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| echo "$ac_t""no" 1>&6 |
| LDFLAGS=$_SAVE_LDFLAGS |
| fi |
| rm -f conftest* |
| |
| echo $ac_n "checking for -z text option to ld""... $ac_c" 1>&6 |
| echo "configure:6082: checking for -z text option to ld" >&5 |
| _SAVE_LDFLAGS=$LDFLAGS |
| LDFLAGS="$LDFLAGS -Wl,-z,text" |
| cat > conftest.$ac_ext <<EOF |
| #line 6086 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:6093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| echo "$ac_t""yes" 1>&6 |
| NSPR_LDFLAGS="$NSPR_LDFLAGS -Wl,-z,text" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| echo "$ac_t""no" 1>&6 |
| LDFLAGS=$_SAVE_LDFLAGS |
| fi |
| rm -f conftest* |
| |
| echo $ac_n "checking for --build-id option to ld""... $ac_c" 1>&6 |
| echo "configure:6107: checking for --build-id option to ld" >&5 |
| _SAVE_LDFLAGS=$LDFLAGS |
| LDFLAGS="$LDFLAGS -Wl,--build-id" |
| cat > conftest.$ac_ext <<EOF |
| #line 6111 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:6118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| echo "$ac_t""yes" 1>&6 |
| NSPR_LDFLAGS="$NSPR_LDFLAGS -Wl,--build-id" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| echo "$ac_t""no" 1>&6 |
| LDFLAGS=$_SAVE_LDFLAGS |
| fi |
| rm -f conftest* |
| |
| |
| # Turn on gcc/clang warnings: |
| # https://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/Warning-Options.html |
| |
| # -Wall - lots of useful warnings |
| # -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives |
| # -Wignored-qualifiers - catches return types with qualifiers like const |
| # -Wpointer-arith - catches pointer arithmetic using NULL or sizeof(void) |
| # -Wsign-compare - catches comparing signed/unsigned ints |
| # -Wtype-limits - catches overflow bugs, few false positives |
| # -Wunreachable-code - catches some dead code |
| _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wall" |
| _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wempty-body" |
| _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wignored-qualifiers" |
| _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wpointer-arith" |
| _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wsign-compare" |
| _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wtype-limits" |
| _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wunreachable-code" |
| |
| # -Wclass-varargs - catches objects passed by value to variadic functions. |
| # -Wloop-analysis - catches issues around loops |
| # -Wnon-literal-null-conversion - catches expressions used as a null pointer constant |
| # -Wthread-safety - catches inconsistent use of mutexes |
| # |
| # XXX: at the time of writing, the version of clang used on the OS X test |
| # machines has a bug that causes it to reject some valid files if both |
| # -Wnon-literal-null-conversion and -Wsometimes-uninitialized are |
| # specified. We work around this by instead using |
| # -Werror=non-literal-null-conversion, but we only do that when |
| # --enable-warnings-as-errors is specified so that no unexpected fatal |
| # warnings are produced. |
| |
| echo $ac_n "checking whether the C compiler supports -Wclass-varargs""... $ac_c" 1>&6 |
| echo "configure:6164: checking whether the C compiler supports -Wclass-varargs" >&5 |
| if eval "test \"`echo '$''{'ac_c_has_wclass_varargs'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| _SAVE_CFLAGS="$CFLAGS" |
| CFLAGS="$CFLAGS -Werror -Wclass-varargs" |
| cat > conftest.$ac_ext <<EOF |
| #line 6180 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:6187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_c_has_wclass_varargs="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_c_has_wclass_varargs="no" |
| fi |
| rm -f conftest* |
| CFLAGS="$_SAVE_CFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_c_has_wclass_varargs" 1>&6 |
| if test "${ac_c_has_wclass_varargs}" = "yes"; then |
| _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wclass-varargs" |
| fi |
| |
| |
| echo $ac_n "checking whether the C compiler supports -Wloop-analysis""... $ac_c" 1>&6 |
| echo "configure:6215: checking whether the C compiler supports -Wloop-analysis" >&5 |
| if eval "test \"`echo '$''{'ac_c_has_wloop_analysis'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| _SAVE_CFLAGS="$CFLAGS" |
| CFLAGS="$CFLAGS -Werror -Wloop-analysis" |
| cat > conftest.$ac_ext <<EOF |
| #line 6231 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:6238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_c_has_wloop_analysis="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_c_has_wloop_analysis="no" |
| fi |
| rm -f conftest* |
| CFLAGS="$_SAVE_CFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_c_has_wloop_analysis" 1>&6 |
| if test "${ac_c_has_wloop_analysis}" = "yes"; then |
| _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wloop-analysis" |
| fi |
| |
| |
| if test "$MOZ_ENABLE_WARNINGS_AS_ERRORS"; then |
| |
| echo $ac_n "checking whether the C compiler supports -Werror=non-literal-null-conversion""... $ac_c" 1>&6 |
| echo "configure:6268: checking whether the C compiler supports -Werror=non-literal-null-conversion" >&5 |
| if eval "test \"`echo '$''{'ac_c_has_non_literal_null_conversion'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| _SAVE_CFLAGS="$CFLAGS" |
| CFLAGS="$CFLAGS -Werror -Wnon-literal-null-conversion" |
| cat > conftest.$ac_ext <<EOF |
| #line 6284 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:6291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_c_has_non_literal_null_conversion="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_c_has_non_literal_null_conversion="no" |
| fi |
| rm -f conftest* |
| CFLAGS="$_SAVE_CFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_c_has_non_literal_null_conversion" 1>&6 |
| if test "${ac_c_has_non_literal_null_conversion}" = "yes"; then |
| _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Werror=non-literal-null-conversion" |
| fi |
| |
| fi |
| |
| |
| echo $ac_n "checking whether the C compiler supports -Wthread-safety""... $ac_c" 1>&6 |
| echo "configure:6321: checking whether the C compiler supports -Wthread-safety" >&5 |
| if eval "test \"`echo '$''{'ac_c_has_wthread_safety'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| _SAVE_CFLAGS="$CFLAGS" |
| CFLAGS="$CFLAGS -Werror -Wthread-safety" |
| cat > conftest.$ac_ext <<EOF |
| #line 6337 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:6344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_c_has_wthread_safety="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_c_has_wthread_safety="no" |
| fi |
| rm -f conftest* |
| CFLAGS="$_SAVE_CFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_c_has_wthread_safety" 1>&6 |
| if test "${ac_c_has_wthread_safety}" = "yes"; then |
| _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wthread-safety" |
| fi |
| |
| |
| # Turn off some non-useful warnings that -Wall turns on. |
| |
| # Prevent the following GCC warnings from being treated as errors: |
| # -Wmaybe-uninitialized - too many false positives |
| # -Wdeprecated-declarations - we don't want our builds held hostage when a |
| # platform-specific API becomes deprecated. |
| # -Wfree-nonheap-object - false positives during PGO |
| # -Warray-bounds - false positives depending on optimization |
| |
| echo $ac_n "checking whether the C compiler supports -Wno-error=maybe-uninitialized""... $ac_c" 1>&6 |
| echo "configure:6381: checking whether the C compiler supports -Wno-error=maybe-uninitialized" >&5 |
| if eval "test \"`echo '$''{'ac_c_has_noerror_maybe_uninitialized'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| _SAVE_CFLAGS="$CFLAGS" |
| CFLAGS="$CFLAGS -Werror -Wno-error=maybe-uninitialized" |
| cat > conftest.$ac_ext <<EOF |
| #line 6397 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:6404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_c_has_noerror_maybe_uninitialized="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_c_has_noerror_maybe_uninitialized="no" |
| fi |
| rm -f conftest* |
| CFLAGS="$_SAVE_CFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_c_has_noerror_maybe_uninitialized" 1>&6 |
| if test "${ac_c_has_noerror_maybe_uninitialized}" = "yes"; then |
| _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-error=maybe-uninitialized" |
| fi |
| |
| |
| echo $ac_n "checking whether the C compiler supports -Wno-error=deprecated-declarations""... $ac_c" 1>&6 |
| echo "configure:6432: checking whether the C compiler supports -Wno-error=deprecated-declarations" >&5 |
| if eval "test \"`echo '$''{'ac_c_has_noerror_deprecated_declarations'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| _SAVE_CFLAGS="$CFLAGS" |
| CFLAGS="$CFLAGS -Werror -Wno-error=deprecated-declarations" |
| cat > conftest.$ac_ext <<EOF |
| #line 6448 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:6455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_c_has_noerror_deprecated_declarations="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_c_has_noerror_deprecated_declarations="no" |
| fi |
| rm -f conftest* |
| CFLAGS="$_SAVE_CFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_c_has_noerror_deprecated_declarations" 1>&6 |
| if test "${ac_c_has_noerror_deprecated_declarations}" = "yes"; then |
| _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-error=deprecated-declarations" |
| fi |
| |
| |
| echo $ac_n "checking whether the C compiler supports -Wno-error=array-bounds""... $ac_c" 1>&6 |
| echo "configure:6483: checking whether the C compiler supports -Wno-error=array-bounds" >&5 |
| if eval "test \"`echo '$''{'ac_c_has_noerror_array_bounds'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| _SAVE_CFLAGS="$CFLAGS" |
| CFLAGS="$CFLAGS -Werror -Wno-error=array-bounds" |
| cat > conftest.$ac_ext <<EOF |
| #line 6499 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:6506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_c_has_noerror_array_bounds="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_c_has_noerror_array_bounds="no" |
| fi |
| rm -f conftest* |
| CFLAGS="$_SAVE_CFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_c_has_noerror_array_bounds" 1>&6 |
| if test "${ac_c_has_noerror_array_bounds}" = "yes"; then |
| _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-error=array-bounds" |
| fi |
| |
| |
| if test -n "$MOZ_PGO"; then |
| |
| echo $ac_n "checking whether the C compiler supports -Wno-error=coverage-mismatch""... $ac_c" 1>&6 |
| echo "configure:6536: checking whether the C compiler supports -Wno-error=coverage-mismatch" >&5 |
| if eval "test \"`echo '$''{'ac_c_has_noerror_coverage_mismatch'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| _SAVE_CFLAGS="$CFLAGS" |
| CFLAGS="$CFLAGS -Werror -Wno-error=coverage-mismatch" |
| cat > conftest.$ac_ext <<EOF |
| #line 6552 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:6559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_c_has_noerror_coverage_mismatch="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_c_has_noerror_coverage_mismatch="no" |
| fi |
| rm -f conftest* |
| CFLAGS="$_SAVE_CFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_c_has_noerror_coverage_mismatch" 1>&6 |
| if test "${ac_c_has_noerror_coverage_mismatch}" = "yes"; then |
| _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-error=coverage-mismatch" |
| fi |
| |
| |
| echo $ac_n "checking whether the C compiler supports -Wno-error=free-nonheap-object""... $ac_c" 1>&6 |
| echo "configure:6587: checking whether the C compiler supports -Wno-error=free-nonheap-object" >&5 |
| if eval "test \"`echo '$''{'ac_c_has_noerror_free_nonheap_object'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| _SAVE_CFLAGS="$CFLAGS" |
| CFLAGS="$CFLAGS -Werror -Wno-error=free-nonheap-object" |
| cat > conftest.$ac_ext <<EOF |
| #line 6603 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:6610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_c_has_noerror_free_nonheap_object="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_c_has_noerror_free_nonheap_object="no" |
| fi |
| rm -f conftest* |
| CFLAGS="$_SAVE_CFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_c_has_noerror_free_nonheap_object" 1>&6 |
| if test "${ac_c_has_noerror_free_nonheap_object}" = "yes"; then |
| _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-error=free-nonheap-object" |
| fi |
| |
| fi |
| |
| |
| _DEFINES_CFLAGS='-include $(topobjdir)/js/src/js-confdefs.h -DMOZILLA_CLIENT' |
| _USE_CPP_INCLUDE_FLAG=1 |
| |
| else |
| MKSHLIB='$(LD) $(DSO_LDOPTS) -h $(DSO_SONAME) -o $@' |
| MKCSHLIB='$(LD) $(DSO_LDOPTS) -h $(DSO_SONAME) -o $@' |
| |
| DSO_LDOPTS='-shared' |
| if test "$GNU_LD"; then |
| # Don't allow undefined symbols in libraries |
| DSO_LDOPTS="$DSO_LDOPTS -z defs" |
| fi |
| |
| DSO_CFLAGS='' |
| DSO_PIC_CFLAGS='-KPIC' |
| _DEFINES_CFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT' |
| fi |
| |
| if test "$GNU_CXX"; then |
| |
| # Turn on gcc/clang warnings: |
| # https://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/Warning-Options.html |
| |
| # -Wall - lots of useful warnings |
| # -Wc++1[14z]-compat[-pedantic] - catches C++ version forward-compat issues |
| # -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives |
| # -Wignored-qualifiers - catches return types with qualifiers like const |
| # -Woverloaded-virtual - function declaration hides virtual function from base class |
| # -Wpointer-arith - catches pointer arithmetic using NULL or sizeof(void) |
| # -Wsign-compare - catches comparing signed/unsigned ints |
| # -Wtype-limits - catches overflow bugs, few false positives |
| # -Wunreachable-code - catches some dead code |
| # -Wwrite-strings - catches treating string literals as non-const |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wall" |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wc++11-compat" |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wempty-body" |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wignored-qualifiers" |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Woverloaded-virtual" |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wpointer-arith" |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wsign-compare" |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wtype-limits" |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wunreachable-code" |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wwrite-strings" |
| |
| # -Wclass-varargs - catches objects passed by value to variadic functions. |
| # -Wimplicit-fallthrough - catches unintentional switch case fallthroughs |
| # -Wloop-analysis - catches issues around loops |
| # -Wnon-literal-null-conversion - catches expressions used as a null pointer constant |
| # -Wthread-safety - catches inconsistent use of mutexes |
| # |
| # XXX: at the time of writing, the version of clang used on the OS X test |
| # machines has a bug that causes it to reject some valid files if both |
| # -Wnon-literal-null-conversion and -Wsometimes-uninitialized are |
| # specified. We work around this by instead using |
| # -Werror=non-literal-null-conversion, but we only do that when |
| # --enable-warnings-as-errors is specified so that no unexpected fatal |
| # warnings are produced. |
| |
| echo $ac_n "checking whether the C++ compiler supports -Wc++11-compat-pedantic""... $ac_c" 1>&6 |
| echo "configure:6698: checking whether the C++ compiler supports -Wc++11-compat-pedantic" >&5 |
| if eval "test \"`echo '$''{'ac_cxx_has_wcxx11_compat_pedantic'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| _SAVE_CXXFLAGS="$CXXFLAGS" |
| CXXFLAGS="$CXXFLAGS -Werror -Wc++11-compat-pedantic" |
| cat > conftest.$ac_ext <<EOF |
| #line 6714 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:6721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cxx_has_wcxx11_compat_pedantic="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cxx_has_wcxx11_compat_pedantic="no" |
| fi |
| rm -f conftest* |
| CXXFLAGS="$_SAVE_CXXFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_cxx_has_wcxx11_compat_pedantic" 1>&6 |
| if test "${ac_cxx_has_wcxx11_compat_pedantic}" = "yes"; then |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wc++11-compat-pedantic" |
| fi |
| |
| |
| echo $ac_n "checking whether the C++ compiler supports -Wc++14-compat""... $ac_c" 1>&6 |
| echo "configure:6749: checking whether the C++ compiler supports -Wc++14-compat" >&5 |
| if eval "test \"`echo '$''{'ac_cxx_has_wcxx14_compat'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| _SAVE_CXXFLAGS="$CXXFLAGS" |
| CXXFLAGS="$CXXFLAGS -Werror -Wc++14-compat" |
| cat > conftest.$ac_ext <<EOF |
| #line 6765 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:6772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cxx_has_wcxx14_compat="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cxx_has_wcxx14_compat="no" |
| fi |
| rm -f conftest* |
| CXXFLAGS="$_SAVE_CXXFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_cxx_has_wcxx14_compat" 1>&6 |
| if test "${ac_cxx_has_wcxx14_compat}" = "yes"; then |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wc++14-compat" |
| fi |
| |
| |
| echo $ac_n "checking whether the C++ compiler supports -Wc++14-compat-pedantic""... $ac_c" 1>&6 |
| echo "configure:6800: checking whether the C++ compiler supports -Wc++14-compat-pedantic" >&5 |
| if eval "test \"`echo '$''{'ac_cxx_has_wcxx14_compat_pedantic'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| _SAVE_CXXFLAGS="$CXXFLAGS" |
| CXXFLAGS="$CXXFLAGS -Werror -Wc++14-compat-pedantic" |
| cat > conftest.$ac_ext <<EOF |
| #line 6816 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:6823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cxx_has_wcxx14_compat_pedantic="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cxx_has_wcxx14_compat_pedantic="no" |
| fi |
| rm -f conftest* |
| CXXFLAGS="$_SAVE_CXXFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_cxx_has_wcxx14_compat_pedantic" 1>&6 |
| if test "${ac_cxx_has_wcxx14_compat_pedantic}" = "yes"; then |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wc++14-compat-pedantic" |
| fi |
| |
| |
| echo $ac_n "checking whether the C++ compiler supports -Wc++1z-compat""... $ac_c" 1>&6 |
| echo "configure:6851: checking whether the C++ compiler supports -Wc++1z-compat" >&5 |
| if eval "test \"`echo '$''{'ac_cxx_has_wcxx1z_compat'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| _SAVE_CXXFLAGS="$CXXFLAGS" |
| CXXFLAGS="$CXXFLAGS -Werror -Wc++1z-compat" |
| cat > conftest.$ac_ext <<EOF |
| #line 6867 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:6874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cxx_has_wcxx1z_compat="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cxx_has_wcxx1z_compat="no" |
| fi |
| rm -f conftest* |
| CXXFLAGS="$_SAVE_CXXFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_cxx_has_wcxx1z_compat" 1>&6 |
| if test "${ac_cxx_has_wcxx1z_compat}" = "yes"; then |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wc++1z-compat" |
| fi |
| |
| |
| echo $ac_n "checking whether the C++ compiler supports -Wclass-varargs""... $ac_c" 1>&6 |
| echo "configure:6902: checking whether the C++ compiler supports -Wclass-varargs" >&5 |
| if eval "test \"`echo '$''{'ac_cxx_has_wclass_varargs'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| _SAVE_CXXFLAGS="$CXXFLAGS" |
| CXXFLAGS="$CXXFLAGS -Werror -Wclass-varargs" |
| cat > conftest.$ac_ext <<EOF |
| #line 6918 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:6925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cxx_has_wclass_varargs="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cxx_has_wclass_varargs="no" |
| fi |
| rm -f conftest* |
| CXXFLAGS="$_SAVE_CXXFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_cxx_has_wclass_varargs" 1>&6 |
| if test "${ac_cxx_has_wclass_varargs}" = "yes"; then |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wclass-varargs" |
| fi |
| |
| |
| echo $ac_n "checking whether the C++ compiler supports -Wimplicit-fallthrough""... $ac_c" 1>&6 |
| echo "configure:6953: checking whether the C++ compiler supports -Wimplicit-fallthrough" >&5 |
| if eval "test \"`echo '$''{'ac_cxx_has_wimplicit_fallthrough'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| _SAVE_CXXFLAGS="$CXXFLAGS" |
| CXXFLAGS="$CXXFLAGS -Werror -Wimplicit-fallthrough" |
| cat > conftest.$ac_ext <<EOF |
| #line 6969 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:6976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cxx_has_wimplicit_fallthrough="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cxx_has_wimplicit_fallthrough="no" |
| fi |
| rm -f conftest* |
| CXXFLAGS="$_SAVE_CXXFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_cxx_has_wimplicit_fallthrough" 1>&6 |
| if test "${ac_cxx_has_wimplicit_fallthrough}" = "yes"; then |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wimplicit-fallthrough" |
| fi |
| |
| |
| echo $ac_n "checking whether the C++ compiler supports -Wloop-analysis""... $ac_c" 1>&6 |
| echo "configure:7004: checking whether the C++ compiler supports -Wloop-analysis" >&5 |
| if eval "test \"`echo '$''{'ac_cxx_has_wloop_analysis'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| _SAVE_CXXFLAGS="$CXXFLAGS" |
| CXXFLAGS="$CXXFLAGS -Werror -Wloop-analysis" |
| cat > conftest.$ac_ext <<EOF |
| #line 7020 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:7027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cxx_has_wloop_analysis="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cxx_has_wloop_analysis="no" |
| fi |
| rm -f conftest* |
| CXXFLAGS="$_SAVE_CXXFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_cxx_has_wloop_analysis" 1>&6 |
| if test "${ac_cxx_has_wloop_analysis}" = "yes"; then |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wloop-analysis" |
| fi |
| |
| |
| if test "$MOZ_ENABLE_WARNINGS_AS_ERRORS"; then |
| |
| echo $ac_n "checking whether the C++ compiler supports -Werror=non-literal-null-conversion""... $ac_c" 1>&6 |
| echo "configure:7057: checking whether the C++ compiler supports -Werror=non-literal-null-conversion" >&5 |
| if eval "test \"`echo '$''{'ac_cxx_has_non_literal_null_conversion'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| _SAVE_CXXFLAGS="$CXXFLAGS" |
| CXXFLAGS="$CXXFLAGS -Werror -Wnon-literal-null-conversion" |
| cat > conftest.$ac_ext <<EOF |
| #line 7073 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:7080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cxx_has_non_literal_null_conversion="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cxx_has_non_literal_null_conversion="no" |
| fi |
| rm -f conftest* |
| CXXFLAGS="$_SAVE_CXXFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_cxx_has_non_literal_null_conversion" 1>&6 |
| if test "${ac_cxx_has_non_literal_null_conversion}" = "yes"; then |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Werror=non-literal-null-conversion" |
| fi |
| |
| fi |
| |
| |
| echo $ac_n "checking whether the C++ compiler supports -Wthread-safety""... $ac_c" 1>&6 |
| echo "configure:7110: checking whether the C++ compiler supports -Wthread-safety" >&5 |
| if eval "test \"`echo '$''{'ac_cxx_has_wthread_safety'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| _SAVE_CXXFLAGS="$CXXFLAGS" |
| CXXFLAGS="$CXXFLAGS -Werror -Wthread-safety" |
| cat > conftest.$ac_ext <<EOF |
| #line 7126 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:7133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cxx_has_wthread_safety="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cxx_has_wthread_safety="no" |
| fi |
| rm -f conftest* |
| CXXFLAGS="$_SAVE_CXXFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_cxx_has_wthread_safety" 1>&6 |
| if test "${ac_cxx_has_wthread_safety}" = "yes"; then |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wthread-safety" |
| fi |
| |
| |
| # Turn off some non-useful warnings that -Wall turns on. |
| |
| # -Wno-invalid-offsetof - we use offsetof on non-POD types frequently |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-invalid-offsetof" |
| |
| # -Wno-inline-new-delete - we inline 'new' and 'delete' in mozalloc |
| |
| echo $ac_n "checking whether the C++ compiler supports -Wno-inline-new-delete""... $ac_c" 1>&6 |
| echo "configure:7168: checking whether the C++ compiler supports -Wno-inline-new-delete" >&5 |
| if eval "test \"`echo '$''{'ac_cxx_has_wno_inline_new_delete'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| _SAVE_CXXFLAGS="$CXXFLAGS" |
| CXXFLAGS="$CXXFLAGS -Werror -Winline-new-delete" |
| cat > conftest.$ac_ext <<EOF |
| #line 7184 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:7191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cxx_has_wno_inline_new_delete="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cxx_has_wno_inline_new_delete="no" |
| fi |
| rm -f conftest* |
| CXXFLAGS="$_SAVE_CXXFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_cxx_has_wno_inline_new_delete" 1>&6 |
| if test "${ac_cxx_has_wno_inline_new_delete}" = "yes"; then |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-inline-new-delete" |
| fi |
| |
| |
| # Prevent the following GCC warnings from being treated as errors: |
| # -Wmaybe-uninitialized - too many false positives |
| # -Wdeprecated-declarations - we don't want our builds held hostage when a |
| # platform-specific API becomes deprecated. |
| # -Wfree-nonheap-object - false positives during PGO |
| # -Warray-bounds - false positives depending on optimization |
| |
| echo $ac_n "checking whether the C++ compiler supports -Wno-error=maybe-uninitialized""... $ac_c" 1>&6 |
| echo "configure:7226: checking whether the C++ compiler supports -Wno-error=maybe-uninitialized" >&5 |
| if eval "test \"`echo '$''{'ac_cxx_has_noerror_maybe_uninitialized'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| _SAVE_CXXFLAGS="$CXXFLAGS" |
| CXXFLAGS="$CXXFLAGS -Werror -Wno-error=maybe-uninitialized" |
| cat > conftest.$ac_ext <<EOF |
| #line 7242 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:7249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cxx_has_noerror_maybe_uninitialized="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cxx_has_noerror_maybe_uninitialized="no" |
| fi |
| rm -f conftest* |
| CXXFLAGS="$_SAVE_CXXFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_cxx_has_noerror_maybe_uninitialized" 1>&6 |
| if test "${ac_cxx_has_noerror_maybe_uninitialized}" = "yes"; then |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-error=maybe-uninitialized" |
| fi |
| |
| |
| echo $ac_n "checking whether the C++ compiler supports -Wno-error=deprecated-declarations""... $ac_c" 1>&6 |
| echo "configure:7277: checking whether the C++ compiler supports -Wno-error=deprecated-declarations" >&5 |
| if eval "test \"`echo '$''{'ac_cxx_has_noerror_deprecated_declarations'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| _SAVE_CXXFLAGS="$CXXFLAGS" |
| CXXFLAGS="$CXXFLAGS -Werror -Wno-error=deprecated-declarations" |
| cat > conftest.$ac_ext <<EOF |
| #line 7293 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:7300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cxx_has_noerror_deprecated_declarations="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cxx_has_noerror_deprecated_declarations="no" |
| fi |
| rm -f conftest* |
| CXXFLAGS="$_SAVE_CXXFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_cxx_has_noerror_deprecated_declarations" 1>&6 |
| if test "${ac_cxx_has_noerror_deprecated_declarations}" = "yes"; then |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-error=deprecated-declarations" |
| fi |
| |
| |
| echo $ac_n "checking whether the C++ compiler supports -Wno-error=array-bounds""... $ac_c" 1>&6 |
| echo "configure:7328: checking whether the C++ compiler supports -Wno-error=array-bounds" >&5 |
| if eval "test \"`echo '$''{'ac_cxx_has_noerror_array_bounds'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| _SAVE_CXXFLAGS="$CXXFLAGS" |
| CXXFLAGS="$CXXFLAGS -Werror -Wno-error=array-bounds" |
| cat > conftest.$ac_ext <<EOF |
| #line 7344 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:7351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cxx_has_noerror_array_bounds="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cxx_has_noerror_array_bounds="no" |
| fi |
| rm -f conftest* |
| CXXFLAGS="$_SAVE_CXXFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_cxx_has_noerror_array_bounds" 1>&6 |
| if test "${ac_cxx_has_noerror_array_bounds}" = "yes"; then |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-error=array-bounds" |
| fi |
| |
| |
| if test -n "$MOZ_PGO"; then |
| |
| echo $ac_n "checking whether the C++ compiler supports -Wno-error=coverage-mismatch""... $ac_c" 1>&6 |
| echo "configure:7381: checking whether the C++ compiler supports -Wno-error=coverage-mismatch" >&5 |
| if eval "test \"`echo '$''{'ac_cxx_has_noerror_coverage_mismatch'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| _SAVE_CXXFLAGS="$CXXFLAGS" |
| CXXFLAGS="$CXXFLAGS -Werror -Wno-error=coverage-mismatch" |
| cat > conftest.$ac_ext <<EOF |
| #line 7397 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:7404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cxx_has_noerror_coverage_mismatch="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cxx_has_noerror_coverage_mismatch="no" |
| fi |
| rm -f conftest* |
| CXXFLAGS="$_SAVE_CXXFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_cxx_has_noerror_coverage_mismatch" 1>&6 |
| if test "${ac_cxx_has_noerror_coverage_mismatch}" = "yes"; then |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-error=coverage-mismatch" |
| fi |
| |
| |
| echo $ac_n "checking whether the C++ compiler supports -Wno-error=free-nonheap-object""... $ac_c" 1>&6 |
| echo "configure:7432: checking whether the C++ compiler supports -Wno-error=free-nonheap-object" >&5 |
| if eval "test \"`echo '$''{'ac_cxx_has_noerror_free_nonheap_object'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| _SAVE_CXXFLAGS="$CXXFLAGS" |
| CXXFLAGS="$CXXFLAGS -Werror -Wno-error=free-nonheap-object" |
| cat > conftest.$ac_ext <<EOF |
| #line 7448 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:7455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cxx_has_noerror_free_nonheap_object="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cxx_has_noerror_free_nonheap_object="no" |
| fi |
| rm -f conftest* |
| CXXFLAGS="$_SAVE_CXXFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_cxx_has_noerror_free_nonheap_object" 1>&6 |
| if test "${ac_cxx_has_noerror_free_nonheap_object}" = "yes"; then |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-error=free-nonheap-object" |
| fi |
| |
| fi |
| |
| |
| _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -include $(topobjdir)/js/src/js-confdefs.h' |
| _USE_CPP_INCLUDE_FLAG=1 |
| |
| else |
| _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -D_JS_CONFDEFS_H_ $(ACDEFINES)' |
| fi |
| |
| if test "$COMPILE_ENVIRONMENT"; then |
| |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| echo $ac_n "checking for 64-bit OS""... $ac_c" 1>&6 |
| echo "configure:7501: checking for 64-bit OS" >&5 |
| cat > conftest.$ac_ext <<EOF |
| #line 7503 "configure" |
| #include "confdefs.h" |
| $configure_static_assert_macros |
| int main() { |
| CONFIGURE_STATIC_ASSERT(sizeof(void*) == 8) |
| ; return 0; } |
| EOF |
| if { (eval echo configure:7510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| result="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| result="no" |
| fi |
| rm -f conftest* |
| echo "$ac_t"""$result"" 1>&6 |
| if test "$result" = "yes"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_64BIT_BUILD ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_64BIT_BUILD 1 |
| EOF |
| |
| HAVE_64BIT_BUILD=1 |
| fi |
| |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| fi # COMPILE_ENVIRONMENT |
| |
| case "$host" in |
| *mingw*) |
| if test -n "$_WIN32_MSVC"; then |
| HOST_AR=lib |
| HOST_AR_FLAGS='-NOLOGO -OUT:$@' |
| HOST_CFLAGS="$HOST_CFLAGS -TC -nologo" |
| HOST_RANLIB='echo ranlib' |
| else |
| HOST_CFLAGS="$HOST_CFLAGS -mwindows" |
| fi |
| HOST_CFLAGS="$HOST_CFLAGS -DXP_WIN32 -DXP_WIN -DWIN32 -D_WIN32 -D_CRT_SECURE_NO_WARNINGS" |
| HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}" |
| HOST_BIN_SUFFIX=.exe |
| |
| case "${host_cpu}" in |
| i*86) |
| if test -n "$_WIN32_MSVC"; then |
| HOST_LDFLAGS="$HOST_LDFLAGS -MACHINE:X86" |
| fi |
| ;; |
| x86_64) |
| if test -n "$_WIN32_MSVC"; then |
| HOST_LDFLAGS="$HOST_LDFLAGS -MACHINE:X64" |
| fi |
| HOST_CFLAGS="$HOST_CFLAGS -D_AMD64_" |
| ;; |
| esac |
| ;; |
| |
| *-darwin*) |
| HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX" |
| HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" |
| ;; |
| |
| *-linux*|*-kfreebsd*-gnu|*-gnu*) |
| HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" |
| HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" |
| ;; |
| |
| *) |
| HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" |
| HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}" |
| ;; |
| esac |
| |
| |
| cat > conftest.c <<EOF |
| int foo = 1; |
| EOF |
| lto_is_enabled=no |
| if ${CC-cc} ${CFLAGS} -S conftest.c -o conftest.s >/dev/null 2>&1; then |
| if grep '^target triple =' conftest.s; then |
| lto_is_enabled=yes |
| fi |
| fi |
| rm -f conftest.cs |
| |
| |
| |
| case "$target" in |
| *-darwin*) |
| MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' |
| MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' |
| MOZ_OPTIMIZE_FLAGS="-O3 -fno-stack-protector" |
| CFLAGS="$CFLAGS -fno-common" |
| CXXFLAGS="$CXXFLAGS -fno-common" |
| DLL_SUFFIX=".dylib" |
| DSO_LDOPTS='' |
| STRIP="$STRIP -x -S" |
| LDFLAGS="$LDFLAGS -lobjc" |
| # The ExceptionHandling framework is needed for Objective-C exception |
| # logging code in nsObjCExceptions.h. Currently we only use that in debug |
| # builds. |
| _SAVE_LDFLAGS=$LDFLAGS |
| echo $ac_n "checking for -framework ExceptionHandling""... $ac_c" 1>&6 |
| echo "configure:7616: checking for -framework ExceptionHandling" >&5 |
| LDFLAGS="$LDFLAGS -framework ExceptionHandling" |
| cat > conftest.$ac_ext <<EOF |
| #line 7619 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return 0; |
| ; return 0; } |
| EOF |
| if { (eval echo configure:7626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| ac_cv_have_framework_exceptionhandling="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cv_have_framework_exceptionhandling="no" |
| fi |
| rm -f conftest* |
| echo "$ac_t""$ac_cv_have_framework_exceptionhandling" 1>&6 |
| if test "$ac_cv_have_framework_exceptionhandling" = "yes"; then |
| MOZ_DEBUG_LDFLAGS="$MOZ_DEBUG_LDFLAGS -framework ExceptionHandling"; |
| fi |
| LDFLAGS=$_SAVE_LDFLAGS |
| |
| if test "x$lto_is_enabled" = "xyes"; then |
| echo "Skipping -dead_strip because lto is enabled." |
| elif test "x$enable_dtrace" = "xyes"; then |
| echo "Skipping -dead_strip because DTrace is enabled. See bug 403132." |
| else |
| echo $ac_n "checking for -dead_strip option to ld""... $ac_c" 1>&6 |
| echo "configure:7648: checking for -dead_strip option to ld" >&5 |
| _SAVE_LDFLAGS=$LDFLAGS |
| LDFLAGS="$LDFLAGS -Wl,-dead_strip" |
| cat > conftest.$ac_ext <<EOF |
| #line 7652 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return 0; |
| ; return 0; } |
| EOF |
| if { (eval echo configure:7659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| _HAVE_DEAD_STRIP=1 |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| _HAVE_DEAD_STRIP= |
| fi |
| rm -f conftest* |
| if test -n "$_HAVE_DEAD_STRIP" ; then |
| echo "$ac_t""yes" 1>&6 |
| MOZ_OPTIMIZE_LDFLAGS="-Wl,-dead_strip" |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| LDFLAGS=$_SAVE_LDFLAGS |
| fi |
| MOZ_FIX_LINK_PATHS="-Wl,-executable_path,${DIST}/bin" |
| ;; |
| |
| *-android*|*-linuxandroid*) |
| cat >> confdefs.pytmp <<\EOF |
| (''' NO_PW_GECOS ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define NO_PW_GECOS 1 |
| EOF |
| |
| MOZ_GFX_OPTIMIZE_MOBILE=1 |
| MOZ_OPTIMIZE_FLAGS="-O3" |
| if test -z "$CLANG_CC"; then |
| MOZ_OPTIMIZE_FLAGS="-freorder-blocks -fno-reorder-functions $MOZ_OPTIMIZE_FLAGS" |
| fi |
| # The Maemo builders don't know about this flag |
| MOZ_ARM_VFP_FLAGS="-mfpu=vfp" |
| ;; |
| |
| *-*linux*) |
| # Note: both GNU_CC and INTEL_CC are set when using Intel's C compiler. |
| # Similarly for GNU_CXX and INTEL_CXX. |
| if test "$INTEL_CC" -o "$INTEL_CXX"; then |
| # -Os has been broken on Intel's C/C++ compilers for quite a |
| # while; Intel recommends against using it. |
| MOZ_OPTIMIZE_FLAGS="-O2" |
| elif test "$GNU_CC" -o "$GNU_CXX"; then |
| MOZ_PGO_OPTIMIZE_FLAGS="-O3" |
| MOZ_OPTIMIZE_FLAGS="-O3" |
| if test -z "$CLANG_CC"; then |
| MOZ_OPTIMIZE_FLAGS="-freorder-blocks $MOZ_OPTIMIZE_FLAGS" |
| fi |
| fi |
| |
| case "${target_cpu}" in |
| alpha*) |
| CFLAGS="$CFLAGS -mieee" |
| CXXFLAGS="$CXXFLAGS -mieee" |
| ;; |
| esac |
| |
| if test -z "$MC"; then |
| MC=mc.exe |
| fi |
| ;; |
| |
| *-mingw*) |
| DSO_CFLAGS= |
| DSO_PIC_CFLAGS= |
| DLL_SUFFIX=.dll |
| RC=rc.exe |
| MC=mc.exe |
| if test -n "$GNU_CC" -o -n "$CLANG_CC"; then |
| CC="$CC -mwindows" |
| CXX="$CXX -mwindows" |
| CPP="$CPP -mwindows" |
| CFLAGS="$CFLAGS -mms-bitfields" |
| CXXFLAGS="$CXXFLAGS -mms-bitfields" |
| DSO_LDOPTS='-shared' |
| MKSHLIB='$(CXX) $(DSO_LDOPTS) -o $@' |
| MKCSHLIB='$(CC) $(DSO_LDOPTS) -o $@' |
| RC='$(WINDRES)' |
| # Use static libgcc and libstdc++ |
| LDFLAGS="$LDFLAGS -static" |
| # Use temp file for windres (bug 213281) |
| RCFLAGS='-O coff --use-temp-file' |
| # mingw doesn't require kernel32, user32, and advapi32 explicitly |
| LIBS="$LIBS -lgdi32 -lwinmm -lwsock32 -lpsapi" |
| MOZ_FIX_LINK_PATHS= |
| DLL_PREFIX= |
| IMPORT_LIB_SUFFIX=a |
| |
| WIN32_CONSOLE_EXE_LDFLAGS=-mconsole |
| WIN32_GUI_EXE_LDFLAGS=-mwindows |
| |
| # We use mix of both POSIX and Win32 printf format across the tree, so format |
| # warnings are useless on mingw. |
| |
| echo $ac_n "checking whether the C compiler supports -Wno-format""... $ac_c" 1>&6 |
| echo "configure:7758: checking whether the C compiler supports -Wno-format" >&5 |
| if eval "test \"`echo '$''{'ac_c_has_wno_format'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| _SAVE_CFLAGS="$CFLAGS" |
| CFLAGS="$CFLAGS -Werror -Wformat" |
| cat > conftest.$ac_ext <<EOF |
| #line 7774 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:7781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_c_has_wno_format="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_c_has_wno_format="no" |
| fi |
| rm -f conftest* |
| CFLAGS="$_SAVE_CFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_c_has_wno_format" 1>&6 |
| if test "${ac_c_has_wno_format}" = "yes"; then |
| _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-format" |
| fi |
| |
| |
| echo $ac_n "checking whether the C++ compiler supports -Wno-format""... $ac_c" 1>&6 |
| echo "configure:7809: checking whether the C++ compiler supports -Wno-format" >&5 |
| if eval "test \"`echo '$''{'ac_cxx_has_wno_format'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| _SAVE_CXXFLAGS="$CXXFLAGS" |
| CXXFLAGS="$CXXFLAGS -Werror -Wformat" |
| cat > conftest.$ac_ext <<EOF |
| #line 7825 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:7832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cxx_has_wno_format="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cxx_has_wno_format="no" |
| fi |
| rm -f conftest* |
| CXXFLAGS="$_SAVE_CXXFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_cxx_has_wno_format" 1>&6 |
| if test "${ac_cxx_has_wno_format}" = "yes"; then |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-format" |
| fi |
| |
| else |
| TARGET_COMPILER_ABI=msvc |
| HOST_CC='$(CC)' |
| HOST_CXX='$(CXX)' |
| HOST_LD='$(LD)' |
| if test "$AS_BIN"; then |
| AS="$(basename "$AS_BIN")" |
| fi |
| AR='lib' |
| AR_FLAGS='-NOLOGO -OUT:$@' |
| AR_EXTRACT= |
| RANLIB='echo not_ranlib' |
| STRIP='echo not_strip' |
| PKG_SKIP_STRIP=1 |
| OBJ_SUFFIX=obj |
| LIB_SUFFIX=lib |
| DLL_PREFIX= |
| LIB_PREFIX= |
| IMPORT_LIB_SUFFIX=lib |
| MKSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)' |
| MKCSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)' |
| if test "$CPU_ARCH" = "x86"; then |
| WIN32_SUBSYSTEM_VERSION=5.01 |
| else |
| WIN32_SUBSYSTEM_VERSION=6.01 |
| fi |
| WIN32_CONSOLE_EXE_LDFLAGS=-SUBSYSTEM:CONSOLE,$WIN32_SUBSYSTEM_VERSION |
| WIN32_GUI_EXE_LDFLAGS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION |
| DSO_LDOPTS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION |
| _USE_CPP_INCLUDE_FLAG=1 |
| _DEFINES_CFLAGS='-FI $(topobjdir)/js/src/js-confdefs.h -DMOZILLA_CLIENT' |
| _DEFINES_CXXFLAGS='-FI $(topobjdir)/js/src/js-confdefs.h -DMOZILLA_CLIENT' |
| CFLAGS="$CFLAGS -W3 -Gy" |
| CXXFLAGS="$CXXFLAGS -W3 -Gy" |
| if test "$CPU_ARCH" = "x86"; then |
| CFLAGS="$CFLAGS -arch:IA32" |
| CXXFLAGS="$CXXFLAGS -arch:IA32" |
| fi |
| CFLAGS="$CFLAGS -FS" |
| CXXFLAGS="$CXXFLAGS -FS" |
| # khuey says we can safely ignore MSVC warning C4251 |
| # MSVC warning C4244 (implicit type conversion may lose data) warns |
| # and requires workarounds for perfectly valid code. Also, GCC/clang |
| # don't warn about it by default. So for consistency/sanity, we turn |
| # it off on MSVC, too. |
| # MSVC warning C4267 warns for narrowing type conversions from size_t |
| # to 32-bit integer types on 64-bit platforms. Since this is virtually |
| # the same thing as C4244, we disable C4267, too. |
| CFLAGS="$CFLAGS -wd4244 -wd4267" |
| CXXFLAGS="$CXXFLAGS -wd4244 -wd4267 -wd4251" |
| if test -n "$CLANG_CL"; then |
| # XXX We should combine some of these with our generic GCC-style |
| # warning checks. |
| # |
| # Suppress the clang-cl warning for the inline 'new' and 'delete' in mozalloc |
| CXXFLAGS="$CXXFLAGS -Wno-inline-new-delete" |
| # We use offsetof on non-POD objects all the time. |
| # We also suppress this warning on other platforms. |
| CXXFLAGS="$CXXFLAGS -Wno-invalid-offsetof" |
| # MFBT thinks clang-cl supports constexpr, which it does, but |
| # not everything in Windows C++ headers supports constexpr |
| # as we might expect until MSVC 2015, so turn off this warning |
| # for now. |
| CXXFLAGS="$CXXFLAGS -Wno-invalid-constexpr" |
| # This warns for reasonable things like: |
| # enum { X = 0xffffffffU }; |
| # which is annoying for IDL headers. |
| CXXFLAGS="$CXXFLAGS -Wno-microsoft-enum-value" |
| # This warns for cases that would be reached by the Microsoft |
| # #include rules, but also currently warns on cases that would |
| # *also* be reached by standard C++ include rules. That |
| # behavior doesn't seem useful, so we turn it off. |
| CXXFLAGS="$CXXFLAGS -Wno-microsoft-include" |
| # We normally error out on unknown pragmas, but since clang-cl |
| # claims to be MSVC, it would be difficult to add |
| # #if defined(_MSC_VER) && !defined(__clang__) everywhere we |
| # use such pragmas, so just ignore them. |
| CFLAGS="$CFLAGS -Wno-unknown-pragmas" |
| CXXFLAGS="$CXXFLAGS -Wno-unknown-pragmas" |
| # clang-cl's Intrin.h marks things like _ReadWriteBarrier |
| # as __attribute((__deprecated__)). This is nice to know, |
| # but since we don't get the equivalent warning from MSVC, |
| # let's just ignore it. |
| CFLAGS="$CFLAGS -Wno-deprecated-declarations" |
| CXXFLAGS="$CXXFLAGS -Wno-deprecated-declarations" |
| # We use a function like: |
| # __declspec(noreturn) __inline void f() {} |
| # which -Winvalid-noreturn complains about. Again, MSVC seems |
| # OK with it, so let's silence the warning. |
| CFLAGS="$CFLAGS -Wno-invalid-noreturn" |
| CXXFLAGS="$CXXFLAGS -Wno-invalid-noreturn" |
| # Missing |override| on virtual function declarations isn't |
| # something that MSVC currently warns about. |
| CXXFLAGS="$CXXFLAGS -Wno-inconsistent-missing-override" |
| # We use -DHAS_EXCEPTIONS=0, which removes the |throw()| |
| # declaration on |operator delete(void*)|. However, clang-cl |
| # must internally declare |operator delete(void*)| differently, |
| # which causes this warning for virtually every file in the |
| # tree. clang-cl doesn't support -fno-exceptions or equivalent, |
| # so there doesn't seem to be any way to convince clang-cl to |
| # declare |delete| differently. Therefore, suppress this |
| # warning. |
| CXXFLAGS="$CXXFLAGS -Wno-implicit-exception-spec-mismatch" |
| # At least one MSVC header and several headers in-tree have |
| # unused typedefs, so turn this on. |
| CXXFLAGS="$CXXFLAGS -Wno-unused-local-typedef" |
| # Several JS engine header files use __declspec(dllimport) on |
| # classes, and clang-cl helpfully warns about its non-support |
| # for such cases. We're not particularly worried about that, |
| # so ignore that warning. |
| CXXFLAGS="$CXXFLAGS -Wno-ignored-attributes" |
| fi |
| # make 'foo == bar;' error out |
| CFLAGS="$CFLAGS -we4553" |
| CXXFLAGS="$CXXFLAGS -we4553" |
| LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib psapi.lib" |
| MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV' |
| WARNINGS_AS_ERRORS='-WX' |
| MOZ_OPTIMIZE_FLAGS="-O2" |
| MOZ_FIX_LINK_PATHS= |
| LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE -NXCOMPAT" |
| if test -z "$DEVELOPER_OPTIONS"; then |
| LDFLAGS="$LDFLAGS -RELEASE" |
| fi |
| PROFILE_GEN_CFLAGS="-GL" |
| PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT" |
| PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952" |
| PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE" |
| LDFLAGS="$LDFLAGS -DYNAMICBASE" |
| RCFLAGS="-nologo" |
| fi |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE__MSIZE ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE__MSIZE 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' STDC_HEADERS ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define STDC_HEADERS 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' WIN32_LEAN_AND_MEAN ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define WIN32_LEAN_AND_MEAN 1 |
| EOF |
| |
| BIN_SUFFIX='.exe' |
| MOZ_USER_DIR="Mozilla" |
| |
| case "$host_os" in |
| cygwin*|msvc*|mks*) |
| { echo "configure: error: Using a Cygwin build environment is unsupported. Configure cannot check for presence of necessary headers. Please upgrade to MozillaBuild; see https://developer.mozilla.org/en/Windows_Build_Prerequisites." 1>&2; echo "configure: error: Using a Cygwin build environment is unsupported. Configure cannot check for presence of necessary headers. Please upgrade to MozillaBuild; see https://developer.mozilla.org/en/Windows_Build_Prerequisites." 1>&5; exit 1; } |
| ;; |
| esac |
| |
| case "$target" in |
| i*86-*) |
| if test "$HAVE_64BIT_BUILD"; then |
| { echo "configure: error: You are targeting i386 but using the 64-bit compiler." 1>&2; echo "configure: error: You are targeting i386 but using the 64-bit compiler." 1>&5; exit 1; } |
| fi |
| |
| if test -n "$GNU_CC"; then |
| CFLAGS="$CFLAGS -mstackrealign -fno-keep-inline-dllexport" |
| CXXFLAGS="$CXXFLAGS -mstackrealign -fno-keep-inline-dllexport" |
| LDFLAGS="$LDFLAGS -Wl,--large-address-aware" |
| else |
| DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X86" |
| LDFLAGS="$LDFLAGS -SAFESEH" |
| fi |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' _X86_ ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define _X86_ 1 |
| EOF |
| |
| ;; |
| x86_64-*) |
| if test -n "$_WIN32_MSVC"; then |
| DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X64" |
| fi |
| cat >> confdefs.pytmp <<\EOF |
| (''' _AMD64_ ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define _AMD64_ 1 |
| EOF |
| |
| ;; |
| *) |
| cat >> confdefs.pytmp <<\EOF |
| (''' _CPU_ARCH_NOT_DEFINED ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define _CPU_ARCH_NOT_DEFINED 1 |
| EOF |
| |
| ;; |
| esac |
| ;; |
| |
| *-netbsd*) |
| DSO_CFLAGS='' |
| CFLAGS="$CFLAGS -Dunix" |
| CXXFLAGS="$CXXFLAGS -Dunix" |
| if $CC -E - -dM </dev/null | grep __ELF__ >/dev/null; then |
| DLL_SUFFIX=".so" |
| DSO_PIC_CFLAGS='-fPIC -DPIC' |
| DSO_LDOPTS='-shared' |
| BIN_FLAGS='-Wl,--export-dynamic' |
| else |
| DSO_PIC_CFLAGS='-fPIC -DPIC' |
| DLL_SUFFIX=".so.1.0" |
| DSO_LDOPTS='-shared' |
| fi |
| # This will fail on a.out systems prior to 1.5.1_ALPHA. |
| if test "$LIBRUNPATH"; then |
| DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS" |
| fi |
| MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$(DSO_SONAME) -o $@' |
| MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$(DSO_SONAME) -o $@' |
| ;; |
| |
| *-openbsd*) |
| DLL_SUFFIX=".so.1.0" |
| DSO_CFLAGS='' |
| DSO_PIC_CFLAGS='-fPIC' |
| DSO_LDOPTS='-shared -fPIC' |
| if test "$LIBRUNPATH"; then |
| DSO_LDOPTS="-R$LIBRUNPATH $DSO_LDOPTS" |
| fi |
| ;; |
| |
| esac |
| |
| cat >> confdefs.pytmp <<EOF |
| (''' D_INO ''', r''' $DIRENT_INO ''') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define D_INO $DIRENT_INO |
| EOF |
| |
| |
| if test -z "$COMPILE_ENVIRONMENT"; then |
| SKIP_COMPILER_CHECKS=1 |
| SKIP_LIBRARY_CHECKS=1 |
| fi |
| |
| |
| case "$target" in |
| i?86-*) |
| ENABLE_ION=1 |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_CPU_X86 ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_CPU_X86 1 |
| EOF |
| |
| ;; |
| x86_64*-*) |
| ENABLE_ION=1 |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_CPU_X64 ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_CPU_X64 1 |
| EOF |
| |
| ;; |
| arm*-*) |
| ENABLE_ION=1 |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_CPU_ARM ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_CPU_ARM 1 |
| EOF |
| |
| ;; |
| sparc-*) |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_CPU_SPARC ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_CPU_SPARC 1 |
| EOF |
| |
| ;; |
| mips*-*) |
| ENABLE_ION=1 |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_CPU_MIPS ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_CPU_MIPS 1 |
| EOF |
| |
| ;; |
| esac |
| |
| if test "$HAVE_64BIT_BUILD" ; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_PUNBOX64 ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_PUNBOX64 1 |
| EOF |
| |
| else |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_NUNBOX32 ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_NUNBOX32 1 |
| EOF |
| |
| fi |
| |
| # Check whether --enable-ion or --disable-ion was given. |
| if test "${enable_ion+set}" = set; then |
| enableval="$enable_ion" |
| if test "$enableval" = "no"; then |
| ENABLE_ION= |
| elif test "$enableval" = "yes"; then |
| : |
| else |
| { echo "configure: error: Option, ion, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, ion, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| |
| |
| |
| |
| |
| if test -n "$COMPILE_ENVIRONMENT"; then |
| |
| |
| if test -z "$MOZ_DEBUG_FLAGS"; then |
| if test -n "$_MSC_VER"; then |
| MOZ_DEBUG_FLAGS="-Zi" |
| else |
| MOZ_DEBUG_FLAGS="-g" |
| fi |
| fi |
| |
| |
| |
| # Check whether --enable-debug or --disable-debug was given. |
| if test "${enable_debug+set}" = set; then |
| enableval="$enable_debug" |
| if test "$enableval" != "no"; then |
| MOZ_DEBUG=1 |
| if test -n "$enableval" -a "$enableval" != "yes"; then |
| MOZ_DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'` |
| _MOZ_DEBUG_FLAGS_SET=1 |
| fi |
| else |
| MOZ_DEBUG= |
| fi |
| else |
| MOZ_DEBUG= |
| fi |
| |
| |
| if test -z "$MOZ_DEBUG" -o -n "$MOZ_ASAN"; then |
| MOZ_NO_DEBUG_RTL=1 |
| fi |
| |
| |
| |
| MOZ_DEBUG_ENABLE_DEFS="DEBUG TRACING" |
| # Check whether --with-debug-label or --without-debug-label was given. |
| if test "${with_debug_label+set}" = set; then |
| withval="$with_debug_label" |
| for option in `echo $withval | sed 's/,/ /g'`; do |
| MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS DEBUG_${option}" |
| done |
| fi |
| |
| |
| if test -n "$MOZ_DEBUG"; then |
| echo $ac_n "checking for valid debug flags""... $ac_c" 1>&6 |
| echo "configure:8249: checking for valid debug flags" >&5 |
| _SAVE_CFLAGS=$CFLAGS |
| CFLAGS="$CFLAGS $MOZ_DEBUG_FLAGS" |
| cat > conftest.$ac_ext <<EOF |
| #line 8253 "configure" |
| #include "confdefs.h" |
| #include <stdio.h> |
| int main() { |
| printf("Hello World\n"); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:8260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| _results=yes |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| _results=no |
| fi |
| rm -f conftest* |
| echo "$ac_t""$_results" 1>&6 |
| if test "$_results" = "no"; then |
| { echo "configure: error: These compiler flags are invalid: $MOZ_DEBUG_FLAGS" 1>&2; echo "configure: error: These compiler flags are invalid: $MOZ_DEBUG_FLAGS" 1>&5; exit 1; } |
| fi |
| CFLAGS=$_SAVE_CFLAGS |
| |
| MOZ_DEBUG_DEFINES="$MOZ_DEBUG_ENABLE_DEFS" |
| else |
| MOZ_DEBUG_DEFINES="NDEBUG TRIMMED" |
| fi |
| |
| |
| |
| # Check whether --enable-debug-symbols or --disable-debug-symbols was given. |
| if test "${enable_debug_symbols+set}" = set; then |
| enableval="$enable_debug_symbols" |
| if test "$enableval" != "no"; then |
| MOZ_DEBUG_SYMBOLS=1 |
| if test -n "$enableval" -a "$enableval" != "yes"; then |
| if test -z "$_MOZ_DEBUG_FLAGS_SET"; then |
| MOZ_DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'` |
| else |
| { echo "configure: error: --enable-debug-symbols flags cannot be used with --enable-debug flags" 1>&2; echo "configure: error: --enable-debug-symbols flags cannot be used with --enable-debug flags" 1>&5; exit 1; } |
| fi |
| fi |
| else |
| MOZ_DEBUG_SYMBOLS= |
| fi |
| else |
| MOZ_DEBUG_SYMBOLS=1 |
| fi |
| |
| |
| if test -n "$MOZ_DEBUG" -o -n "$MOZ_DEBUG_SYMBOLS"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' MOZ_DEBUG_SYMBOLS ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define MOZ_DEBUG_SYMBOLS 1 |
| EOF |
| |
| export MOZ_DEBUG_SYMBOLS |
| fi |
| |
| |
| |
| # Check whether --enable-cpp-rtti or --disable-cpp-rtti was given. |
| if test "${enable_cpp_rtti+set}" = set; then |
| enableval="$enable_cpp_rtti" |
| if test "$enableval" = "yes"; then |
| _MOZ_USE_RTTI=1 |
| elif test "$enableval" = "no"; then |
| _MOZ_USE_RTTI= |
| else |
| { echo "configure: error: Option, cpp-rtti, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, cpp-rtti, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| |
| if test -z "$_MOZ_USE_RTTI"; then |
| if test "$GNU_CC"; then |
| CXXFLAGS="$CXXFLAGS -fno-rtti" |
| else |
| case "$target" in |
| *-mingw*) |
| CXXFLAGS="$CXXFLAGS -GR-" |
| esac |
| fi |
| fi |
| |
| if test "$CLANG_CXX"; then |
| ## We disable return-type-c-linkage because jsval is defined as a C++ type but is |
| ## returned by C functions. This is possible because we use knowledge about the ABI |
| ## to typedef it to a C type with the same layout when the headers are included |
| ## from C. |
| _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-unknown-warning-option -Wno-return-type-c-linkage" |
| fi |
| |
| echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) actually is a C++ compiler""... $ac_c" 1>&6 |
| echo "configure:8349: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) actually is a C++ compiler" >&5 |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| _SAVE_LIBS=$LIBS |
| LIBS= |
| cat > conftest.$ac_ext <<EOF |
| #line 8361 "configure" |
| #include "confdefs.h" |
| #include <new> |
| int main() { |
| int *foo = new int; |
| ; return 0; } |
| EOF |
| if { (eval echo configure:8368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| : |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| echo "$ac_t""no" 1>&6 |
| { echo "configure: error: $CXX $CXXFLAGS $LDFLAGS failed to compile and link a simple C++ source." 1>&2; echo "configure: error: $CXX $CXXFLAGS $LDFLAGS failed to compile and link a simple C++ source." 1>&5; exit 1; } |
| fi |
| rm -f conftest* |
| LIBS=$_SAVE_LIBS |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| echo "$ac_t""yes" 1>&6 |
| |
| if test -n "$DEVELOPER_OPTIONS"; then |
| MOZ_FORCE_GOLD=1 |
| fi |
| |
| # Check whether --enable-gold or --disable-gold was given. |
| if test "${enable_gold+set}" = set; then |
| enableval="$enable_gold" |
| if test "$enableval" = "yes"; then |
| MOZ_FORCE_GOLD=1 |
| elif test "$enableval" = "no"; then |
| MOZ_FORCE_GOLD= |
| |
| else |
| { echo "configure: error: Option, gold, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, gold, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| |
| if test "$GNU_CC" -a -n "$MOZ_FORCE_GOLD"; then |
| if $CC -Wl,--version 2>&1 | grep -q "GNU ld"; then |
| GOLD=$($CC -print-prog-name=ld.gold) |
| case "$GOLD" in |
| /*) |
| ;; |
| *) |
| GOLD=$(which $GOLD) |
| ;; |
| esac |
| if test -n "$GOLD"; then |
| mkdir -p $_objdir/build/unix/gold |
| rm -f $_objdir/build/unix/gold/ld |
| ln -s "$GOLD" $_objdir/build/unix/gold/ld |
| if $CC -B $_objdir/build/unix/gold -Wl,--version 2>&1 | grep -q "GNU gold"; then |
| LDFLAGS="$LDFLAGS -B $_objdir/build/unix/gold" |
| else |
| rm -rf $_objdir/build/unix/gold |
| fi |
| fi |
| fi |
| fi |
| if test "$GNU_CC"; then |
| if $CC $LDFLAGS -Wl,--version 2>&1 | grep -q "GNU ld"; then |
| LD_IS_BFD=1 |
| fi |
| fi |
| |
| |
| |
| if test "$GNU_CC"; then |
| if test -z "$DEVELOPER_OPTIONS"; then |
| CFLAGS="$CFLAGS -ffunction-sections -fdata-sections" |
| CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections" |
| fi |
| CFLAGS="$CFLAGS -fno-math-errno" |
| CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-math-errno" |
| fi |
| |
| |
| # Check whether --enable-icf or --disable-icf was given. |
| if test "${enable_icf+set}" = set; then |
| enableval="$enable_icf" |
| if test "$enableval" = "no"; then |
| MOZ_DISABLE_ICF=1 |
| elif test "$enableval" = "yes"; then |
| MOZ_DISABLE_ICF= |
| else |
| { echo "configure: error: Option, icf, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, icf, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| |
| if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -a -z "$MOZ_DISABLE_ICF" -a -z "$DEVELOPER_OPTIONS"; then |
| echo $ac_n "checking whether the linker supports Identical Code Folding""... $ac_c" 1>&6 |
| echo "configure:8461: checking whether the linker supports Identical Code Folding" >&5 |
| if eval "test \"`echo '$''{'LD_SUPPORTS_ICF'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| echo 'int foo() {return 42;}' \ |
| 'int bar() {return 42;}' \ |
| 'int main() {return foo() - bar();}' > conftest.${ac_ext} |
| # If the linker supports ICF, foo and bar symbols will have |
| # the same address |
| if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS -Wl,--icf=safe -ffunction-sections conftest.${ac_ext} $LIBS 1>&2'; { (eval echo configure:8470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && |
| test -s conftest${ac_exeext} && |
| objdump -t conftest${ac_exeext} | awk '{a[$6] = $1} END {if (a["foo"] && (a["foo"] != a["bar"])) { exit 1 }}'; then |
| LD_SUPPORTS_ICF=yes |
| else |
| LD_SUPPORTS_ICF=no |
| fi |
| rm -rf conftest* |
| fi |
| |
| echo "$ac_t""$LD_SUPPORTS_ICF" 1>&6 |
| if test "$LD_SUPPORTS_ICF" = yes; then |
| _SAVE_LDFLAGS="$LDFLAGS -Wl,--icf=safe" |
| LDFLAGS="$LDFLAGS -Wl,--icf=safe -Wl,--print-icf-sections" |
| cat > conftest.$ac_ext <<EOF |
| #line 8485 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:8492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| LD_PRINT_ICF_SECTIONS=-Wl,--print-icf-sections |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| LD_PRINT_ICF_SECTIONS= |
| fi |
| rm -f conftest* |
| |
| LDFLAGS="$_SAVE_LDFLAGS" |
| fi |
| fi |
| |
| |
| if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -a -z "$DEVELOPER_OPTIONS"; then |
| if test -n "$MOZ_DEBUG_FLAGS"; then |
| echo $ac_n "checking whether removing dead symbols breaks debugging""... $ac_c" 1>&6 |
| echo "configure:8511: checking whether removing dead symbols breaks debugging" >&5 |
| if eval "test \"`echo '$''{'GC_SECTIONS_BREAKS_DEBUG_RANGES'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| echo 'int foo() {return 42;}' \ |
| 'int bar() {return 1;}' \ |
| 'int main() {return foo();}' > conftest.${ac_ext} |
| if { ac_try='${CC-cc} -o conftest.${ac_objext} $CFLAGS $MOZ_DEBUG_FLAGS -c conftest.${ac_ext} 1>&2'; { (eval echo configure:8518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && |
| { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS $MOZ_DEBUG_FLAGS -Wl,--gc-sections conftest.${ac_objext} $LIBS 1>&2'; { (eval echo configure:8519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && |
| test -s conftest${ac_exeext} -a -s conftest.${ac_objext}; then |
| if test "`$PYTHON -m mozbuild.configure.check_debug_ranges conftest.${ac_objext} conftest.${ac_ext}`" = \ |
| "`$PYTHON -m mozbuild.configure.check_debug_ranges conftest${ac_exeext} conftest.${ac_ext}`"; then |
| GC_SECTIONS_BREAKS_DEBUG_RANGES=no |
| else |
| GC_SECTIONS_BREAKS_DEBUG_RANGES=yes |
| fi |
| else |
| GC_SECTIONS_BREAKS_DEBUG_RANGES="no, but it's broken in some other way" |
| fi |
| rm -rf conftest* |
| fi |
| |
| echo "$ac_t""$GC_SECTIONS_BREAKS_DEBUG_RANGES" 1>&6 |
| if test "$GC_SECTIONS_BREAKS_DEBUG_RANGES" = no; then |
| DSO_LDOPTS="$DSO_LDOPTS -Wl,--gc-sections" |
| fi |
| else |
| DSO_LDOPTS="$DSO_LDOPTS -Wl,--gc-sections" |
| fi |
| fi |
| |
| # bionic in Android < 4.1 doesn't support PIE |
| # On OSX, the linker defaults to building PIE programs when targetting OSX 10.7+, |
| # but not when targetting OSX < 10.7. OSX < 10.7 doesn't support running PIE |
| # programs, so as long as support for OSX 10.6 is kept, we can't build PIE. |
| # Even after dropping 10.6 support, MOZ_PIE would not be useful since it's the |
| # default (and clang says the -pie option is not used). |
| # On other Unix systems, some file managers (Nautilus) can't start PIE programs |
| if test -n "$gonkdir" && test "$ANDROID_VERSION" -ge 16; then |
| MOZ_PIE=1 |
| else |
| MOZ_PIE= |
| fi |
| |
| # Check whether --enable-pie or --disable-pie was given. |
| if test "${enable_pie+set}" = set; then |
| enableval="$enable_pie" |
| if test "$enableval" = "yes"; then |
| MOZ_PIE=1 |
| elif test "$enableval" = "no"; then |
| MOZ_PIE= |
| else |
| { echo "configure: error: Option, pie, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, pie, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| |
| if test "$GNU_CC" -a -n "$MOZ_PIE"; then |
| echo $ac_n "checking for PIE support""... $ac_c" 1>&6 |
| echo "configure:8570: checking for PIE support" >&5 |
| _SAVE_LDFLAGS=$LDFLAGS |
| LDFLAGS="$LDFLAGS -pie" |
| cat > conftest.$ac_ext <<EOF |
| #line 8574 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:8581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| echo "$ac_t""yes" 1>&6 |
| MOZ_PROGRAM_LDFLAGS="$MOZ_PROGRAM_LDFLAGS -pie" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| echo "$ac_t""no" 1>&6 |
| { echo "configure: error: --enable-pie requires PIE support from the linker." 1>&2; echo "configure: error: --enable-pie requires PIE support from the linker." 1>&5; exit 1; } |
| fi |
| rm -f conftest* |
| LDFLAGS=$_SAVE_LDFLAGS |
| fi |
| |
| |
| |
| if test -n "$GCC_USE_GNU_LD"; then |
| case "$LDFLAGS" in |
| *-fsanitize=address*) |
| LDFLAGS="$LDFLAGS -Wl,-Bsymbolic" |
| ;; |
| esac |
| fi |
| |
| |
| fi |
| |
| if test -z "$SKIP_COMPILER_CHECKS"; then |
| echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
| echo "configure:8611: checking for ANSI C header files" >&5 |
| if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 8616 "configure" |
| #include "confdefs.h" |
| #include <stdlib.h> |
| #include <stdarg.h> |
| #include <string.h> |
| #include <float.h> |
| EOF |
| ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
| { (eval echo configure:8624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| if test -z "$ac_err"; then |
| rm -rf conftest* |
| ac_cv_header_stdc=yes |
| else |
| echo "$ac_err" >&5 |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cv_header_stdc=no |
| fi |
| rm -f conftest* |
| |
| if test $ac_cv_header_stdc = yes; then |
| # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
| cat > conftest.$ac_ext <<EOF |
| #line 8641 "configure" |
| #include "confdefs.h" |
| #include <string.h> |
| EOF |
| if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| egrep "memchr" >/dev/null 2>&1; then |
| : |
| else |
| rm -rf conftest* |
| ac_cv_header_stdc=no |
| fi |
| rm -f conftest* |
| |
| fi |
| |
| if test $ac_cv_header_stdc = yes; then |
| # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
| cat > conftest.$ac_ext <<EOF |
| #line 8659 "configure" |
| #include "confdefs.h" |
| #include <stdlib.h> |
| EOF |
| if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| egrep "free" >/dev/null 2>&1; then |
| : |
| else |
| rm -rf conftest* |
| ac_cv_header_stdc=no |
| fi |
| rm -f conftest* |
| |
| fi |
| |
| if test $ac_cv_header_stdc = yes; then |
| # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
| if test "$cross_compiling" = yes; then |
| : |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 8680 "configure" |
| #include "confdefs.h" |
| #include <ctype.h> |
| #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
| #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
| int main () { int i; for (i = 0; i < 256; i++) |
| if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); |
| exit (0); } |
| |
| EOF |
| if { (eval echo configure:8691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| then |
| : |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -fr conftest* |
| ac_cv_header_stdc=no |
| fi |
| rm -fr conftest* |
| fi |
| |
| fi |
| fi |
| |
| echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
| if test $ac_cv_header_stdc = yes; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' STDC_HEADERS ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define STDC_HEADERS 1 |
| EOF |
| |
| fi |
| |
| echo $ac_n "checking for working const""... $ac_c" 1>&6 |
| echo "configure:8718: checking for working const" >&5 |
| if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 8723 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| |
| /* Ultrix mips cc rejects this. */ |
| typedef int charset[2]; const charset x; |
| /* SunOS 4.1.1 cc rejects this. */ |
| char const *const *ccp; |
| char **p; |
| /* NEC SVR4.0.2 mips cc rejects this. */ |
| struct point {int x, y;}; |
| static struct point const zero = {0,0}; |
| /* AIX XL C 1.02.0.0 rejects this. |
| It does not let you subtract one const X* pointer from another in an arm |
| of an if-expression whose if-part is not a constant expression */ |
| const char *g = "string"; |
| ccp = &g + (g ? g-g : 0); |
| /* HPUX 7.0 cc rejects these. */ |
| ++ccp; |
| p = (char**) ccp; |
| ccp = (char const *const *) p; |
| { /* SCO 3.2v4 cc rejects this. */ |
| char *t; |
| char const *s = 0 ? (char *) 0 : (char const *) 0; |
| |
| *t++ = 0; |
| } |
| { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
| int x[] = {25, 17}; |
| const int *foo = &x[0]; |
| ++foo; |
| } |
| { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| typedef const int *iptr; |
| iptr p = 0; |
| ++p; |
| } |
| { /* AIX XL C 1.02.0.0 rejects this saying |
| "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| struct s { int j; const int *ap[3]; }; |
| struct s *b; b->j = 5; |
| } |
| { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| const int foo = 10; |
| } |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:8772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cv_c_const=yes |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cv_c_const=no |
| fi |
| rm -f conftest* |
| fi |
| |
| echo "$ac_t""$ac_cv_c_const" 1>&6 |
| if test $ac_cv_c_const = no; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' const ''', r''' ''') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define const |
| EOF |
| |
| fi |
| |
| echo $ac_n "checking for mode_t""... $ac_c" 1>&6 |
| echo "configure:8796: checking for mode_t" >&5 |
| if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 8801 "configure" |
| #include "confdefs.h" |
| #include <sys/types.h> |
| #if STDC_HEADERS |
| #include <stdlib.h> |
| #include <stddef.h> |
| #endif |
| EOF |
| if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| rm -rf conftest* |
| ac_cv_type_mode_t=yes |
| else |
| rm -rf conftest* |
| ac_cv_type_mode_t=no |
| fi |
| rm -f conftest* |
| |
| fi |
| echo "$ac_t""$ac_cv_type_mode_t" 1>&6 |
| if test $ac_cv_type_mode_t = no; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' mode_t ''', r''' int ''') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define mode_t int |
| EOF |
| |
| fi |
| |
| echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
| echo "configure:8832: checking for off_t" >&5 |
| if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 8837 "configure" |
| #include "confdefs.h" |
| #include <sys/types.h> |
| #if STDC_HEADERS |
| #include <stdlib.h> |
| #include <stddef.h> |
| #endif |
| EOF |
| if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| rm -rf conftest* |
| ac_cv_type_off_t=yes |
| else |
| rm -rf conftest* |
| ac_cv_type_off_t=no |
| fi |
| rm -f conftest* |
| |
| fi |
| echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
| if test $ac_cv_type_off_t = no; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' off_t ''', r''' long ''') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define off_t long |
| EOF |
| |
| fi |
| |
| echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
| echo "configure:8868: checking for pid_t" >&5 |
| if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 8873 "configure" |
| #include "confdefs.h" |
| #include <sys/types.h> |
| #if STDC_HEADERS |
| #include <stdlib.h> |
| #include <stddef.h> |
| #endif |
| EOF |
| if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| rm -rf conftest* |
| ac_cv_type_pid_t=yes |
| else |
| rm -rf conftest* |
| ac_cv_type_pid_t=no |
| fi |
| rm -f conftest* |
| |
| fi |
| echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
| if test $ac_cv_type_pid_t = no; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' pid_t ''', r''' int ''') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define pid_t int |
| EOF |
| |
| fi |
| |
| echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
| echo "configure:8904: checking for size_t" >&5 |
| if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 8909 "configure" |
| #include "confdefs.h" |
| #include <sys/types.h> |
| #if STDC_HEADERS |
| #include <stdlib.h> |
| #include <stddef.h> |
| #endif |
| EOF |
| if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| rm -rf conftest* |
| ac_cv_type_size_t=yes |
| else |
| rm -rf conftest* |
| ac_cv_type_size_t=no |
| fi |
| rm -f conftest* |
| |
| fi |
| echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
| if test $ac_cv_type_size_t = no; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' size_t ''', r''' unsigned ''') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define size_t unsigned |
| EOF |
| |
| fi |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 |
| echo "configure:8954: checking for ssize_t" >&5 |
| if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 8959 "configure" |
| #include "confdefs.h" |
| #include <stdio.h> |
| #include <sys/types.h> |
| int main() { |
| ssize_t foo = 0; |
| ; return 0; } |
| EOF |
| if { (eval echo configure:8967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cv_type_ssize_t=true |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cv_type_ssize_t=false |
| fi |
| rm -f conftest* |
| fi |
| |
| if test "$ac_cv_type_ssize_t" = true ; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_SSIZE_T ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_SSIZE_T 1 |
| EOF |
| |
| echo "$ac_t""yes" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| for ac_hdr in endian.h |
| do |
| ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
| echo "configure:8996: checking for $ac_hdr" >&5 |
| if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 9001 "configure" |
| #include "confdefs.h" |
| |
| #include <$ac_hdr> |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:9009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_hdr ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_hdr 1 |
| EOF |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| |
| fi |
| |
| done |
| |
| if test "$ac_cv_header_endian_h" = yes; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_HAVE_ENDIAN_H ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_HAVE_ENDIAN_H 1 |
| EOF |
| |
| fi |
| |
| for ac_hdr in machine/endian.h |
| do |
| ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
| echo "configure:9052: checking for $ac_hdr" >&5 |
| if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 9057 "configure" |
| #include "confdefs.h" |
| #include <sys/types.h> |
| #include <$ac_hdr> |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:9065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_hdr ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_hdr 1 |
| EOF |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| |
| fi |
| |
| done |
| |
| if test "$ac_cv_header_machine_endian_h" = yes; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_HAVE_MACHINE_ENDIAN_H ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_HAVE_MACHINE_ENDIAN_H 1 |
| EOF |
| |
| fi |
| |
| for ac_hdr in sys/isa_defs.h |
| do |
| ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
| echo "configure:9108: checking for $ac_hdr" >&5 |
| if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 9113 "configure" |
| #include "confdefs.h" |
| |
| #include <$ac_hdr> |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:9121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_hdr ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_hdr 1 |
| EOF |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| |
| fi |
| |
| done |
| |
| if test "$ac_cv_header_sys_isa_defs_h" = yes; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_HAVE_SYS_ISA_DEFS_H ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_HAVE_SYS_ISA_DEFS_H 1 |
| EOF |
| |
| fi |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| if test "$GNU_CXX"; then |
| CXXFLAGS="$CXXFLAGS -std=gnu++11" |
| _ADDED_CXXFLAGS="-std=gnu++11" |
| |
| if test -n "$CLANG_CC"; then |
| cat > conftest.$ac_ext <<EOF |
| #line 9182 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| #if !__cpp_static_assert |
| #error ISO WG21 SG10 feature test macros unsupported |
| #endif |
| ; return 0; } |
| EOF |
| if { (eval echo configure:9191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| : |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| { echo "configure: error: Only clang/llvm 3.4 or newer supported" 1>&2; echo "configure: error: Only clang/llvm 3.4 or newer supported" 1>&5; exit 1; } |
| fi |
| rm -f conftest* |
| fi |
| |
| echo $ac_n "checking whether 64-bits std::atomic requires -latomic""... $ac_c" 1>&6 |
| echo "configure:9203: checking whether 64-bits std::atomic requires -latomic" >&5 |
| if eval "test \"`echo '$''{'ac_cv_needs_atomic'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 9208 "configure" |
| #include "confdefs.h" |
| #include <cstdint> |
| #include <atomic> |
| int main() { |
| std::atomic<uint64_t> foo; foo = 1; |
| ; return 0; } |
| EOF |
| if { (eval echo configure:9216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| ac_cv_needs_atomic=no |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| _SAVE_LIBS="$LIBS" |
| LIBS="$LIBS -latomic" |
| cat > conftest.$ac_ext <<EOF |
| #line 9226 "configure" |
| #include "confdefs.h" |
| #include <cstdint> |
| #include <atomic> |
| int main() { |
| std::atomic<uint64_t> foo; foo = 1; |
| ; return 0; } |
| EOF |
| if { (eval echo configure:9234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| ac_cv_needs_atomic=yes |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cv_needs_atomic="do not know; assuming no" |
| fi |
| rm -f conftest* |
| LIBS="$_SAVE_LIBS" |
| |
| fi |
| rm -f conftest* |
| |
| fi |
| |
| echo "$ac_t""$ac_cv_needs_atomic" 1>&6 |
| if test "$ac_cv_needs_atomic" = yes; then |
| MOZ_NEEDS_LIBATOMIC=1 |
| else |
| MOZ_NEEDS_LIBATOMIC= |
| fi |
| |
| fi |
| |
| if test -n "$CROSS_COMPILE"; then |
| cat > conftest.C <<EOF |
| #if defined(__clang__) |
| COMPILER CLANG __clang_major__.__clang_minor__.__clang_patchlevel__ |
| #elif defined(__GNUC__) |
| COMPILER GCC __GNUC__.__GNUC_MINOR__.__GNUC_PATCHLEVEL__ |
| #endif |
| EOF |
| read dummy host_compiler HOST_CC_VERSION <<EOF |
| $($HOST_CC -E conftest.C 2>/dev/null | grep COMPILER) |
| EOF |
| read dummy host_cxxcompiler HOST_CXX_VERSION <<EOF |
| $($HOST_CXX -E conftest.C 2>/dev/null | grep COMPILER) |
| EOF |
| rm conftest.C |
| if test "$host_compiler" != "$host_cxxcompiler"; then |
| { echo "configure: error: Your C and C++ host compilers are different. You need to use the same compiler." 1>&2; echo "configure: error: Your C and C++ host compilers are different. You need to use the same compiler." 1>&5; exit 1; } |
| fi |
| if test "$HOST_CC_VERSION" != "$HOST_CXX_VERSION"; then |
| # This may not be strictly necessary, but if we want to drop it, |
| # we should make sure any version checks below apply to both the |
| # C and C++ compiler versions. |
| { echo "configure: error: Your C and C++ host compiler versions are different. You need to use the same compiler version." 1>&2; echo "configure: error: Your C and C++ host compiler versions are different. You need to use the same compiler version." 1>&5; exit 1; } |
| fi |
| if test -n "$host_compiler"; then |
| if test "$host_compiler" = "GCC" ; then |
| |
| HOST_GCC_VERSION_FULL="$HOST_CXX_VERSION" |
| HOST_GCC_VERSION=`echo "$HOST_GCC_VERSION_FULL" | $PERL -pe '(split(/\./))[0]>=4&&s/(^\d*\.\d*).*/$1/;'` |
| |
| HOST_GCC_MAJOR_VERSION=`echo ${HOST_GCC_VERSION} | $AWK -F\. '{ print $1 }'` |
| HOST_GCC_MINOR_VERSION=`echo ${HOST_GCC_VERSION} | $AWK -F\. '{ print $2 }'` |
| |
| |
| if test "$HOST_GCC_MAJOR_VERSION" -eq 4 -a "$HOST_GCC_MINOR_VERSION" -lt 8 || |
| test "$HOST_GCC_MAJOR_VERSION" -lt 4; then |
| { echo "configure: error: Only GCC 4.8 or newer supported for host compiler" 1>&2; echo "configure: error: Only GCC 4.8 or newer supported for host compiler" 1>&5; exit 1; } |
| fi |
| fi |
| |
| HOST_CXXFLAGS="$HOST_CXXFLAGS -std=gnu++11" |
| |
| _SAVE_CXXFLAGS="$CXXFLAGS" |
| _SAVE_CPPFLAGS="$CPPFLAGS" |
| _SAVE_CXX="$CXX" |
| CXXFLAGS="$HOST_CXXFLAGS" |
| CPPFLAGS="$HOST_CPPFLAGS" |
| CXX="$HOST_CXX" |
| if test "$host_compiler" = CLANG; then |
| cat > conftest.$ac_ext <<EOF |
| #line 9310 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| #if !__cpp_static_assert |
| #error ISO WG21 SG10 feature test macros unsupported |
| #endif |
| ; return 0; } |
| EOF |
| if { (eval echo configure:9319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| : |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| { echo "configure: error: Only clang/llvm 3.4 or newer supported" 1>&2; echo "configure: error: Only clang/llvm 3.4 or newer supported" 1>&5; exit 1; } |
| fi |
| rm -f conftest* |
| fi |
| |
| CXXFLAGS="$_SAVE_CXXFLAGS" |
| CPPFLAGS="$_SAVE_CPPFLAGS" |
| CXX="$_SAVE_CXX" |
| fi |
| elif test "$GNU_CXX"; then |
| HOST_CXXFLAGS="$HOST_CXXFLAGS $_ADDED_CXXFLAGS" |
| fi |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| |
| if test "$GNU_CC" -a "$OS_TARGET" != WINNT; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_VISIBILITY_HIDDEN_ATTRIBUTE ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_VISIBILITY_ATTRIBUTE ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_VISIBILITY_ATTRIBUTE 1 |
| EOF |
| |
| case "$OS_TARGET" in |
| Darwin) |
| VISIBILITY_FLAGS='-fvisibility=hidden -fvisibility-inlines-hidden' |
| ;; |
| *) |
| case $GCC_VERSION in |
| 4.6*) |
| VISIBILITY_FLAGS="-I${DIST}/system_wrappers -include ${_topsrcdir}/config/gcc_hidden_dso_handle.h" |
| ;; |
| *) |
| VISIBILITY_FLAGS="-I${DIST}/system_wrappers -include ${_topsrcdir}/config/gcc_hidden.h" |
| ;; |
| esac |
| WRAP_SYSTEM_INCLUDES=1 |
| ;; |
| esac |
| fi # GNU_CC |
| |
| case "${OS_TARGET}" in |
| WINNT|Darwin|Android) |
| ;; |
| *) |
| STL_FLAGS="-I${DIST}/stl_wrappers" |
| WRAP_STL_INCLUDES=1 |
| ;; |
| esac |
| |
| |
| |
| |
| ac_header_dirent=no |
| for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h |
| do |
| ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 |
| echo "configure:9396: checking for $ac_hdr that defines DIR" >&5 |
| if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 9401 "configure" |
| #include "confdefs.h" |
| #include <sys/types.h> |
| #include <$ac_hdr> |
| int main() { |
| DIR *dirp = 0; |
| ; return 0; } |
| EOF |
| if { (eval echo configure:9409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| eval "ac_cv_header_dirent_$ac_safe=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_header_dirent_$ac_safe=no" |
| fi |
| rm -f conftest* |
| fi |
| if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_hdr ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_hdr 1 |
| EOF |
| ac_header_dirent=$ac_hdr; break |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| done |
| # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. |
| if test $ac_header_dirent = dirent.h; then |
| echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 |
| echo "configure:9437: checking for opendir in -ldir" >&5 |
| ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
| if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_save_LIBS="$LIBS" |
| LIBS="-ldir $LIBS" |
| cat > conftest.$ac_ext <<EOF |
| #line 9445 "configure" |
| #include "confdefs.h" |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char opendir(); |
| |
| int main() { |
| opendir() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:9456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=no" |
| fi |
| rm -f conftest* |
| LIBS="$ac_save_LIBS" |
| |
| fi |
| if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| LIBS="$LIBS -ldir" |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| else |
| echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 |
| echo "configure:9478: checking for opendir in -lx" >&5 |
| ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
| if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_save_LIBS="$LIBS" |
| LIBS="-lx $LIBS" |
| cat > conftest.$ac_ext <<EOF |
| #line 9486 "configure" |
| #include "confdefs.h" |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char opendir(); |
| |
| int main() { |
| opendir() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:9497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=no" |
| fi |
| rm -f conftest* |
| LIBS="$ac_save_LIBS" |
| |
| fi |
| if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| LIBS="$LIBS -lx" |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| fi |
| |
| case "$target_os" in |
| freebsd*) |
| # for stuff like -lXshm |
| CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}" |
| ;; |
| esac |
| for ac_hdr in sys/byteorder.h compat.h getopt.h sys/bitypes.h \ |
| memory.h unistd.h gnu/libc-version.h nl_types.h malloc.h \ |
| X11/XKBlib.h io.h cpuid.h |
| do |
| ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
| echo "configure:9531: checking for $ac_hdr" >&5 |
| if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 9536 "configure" |
| #include "confdefs.h" |
| |
| #include <$ac_hdr> |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:9544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_hdr ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_hdr 1 |
| EOF |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| |
| fi |
| |
| done |
| |
| |
| |
| for ac_hdr in sys/statvfs.h sys/statfs.h sys/vfs.h sys/mount.h |
| do |
| ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
| echo "configure:9579: checking for $ac_hdr" >&5 |
| if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 9584 "configure" |
| #include "confdefs.h" |
| |
| #include <$ac_hdr> |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:9592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_hdr ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_hdr 1 |
| EOF |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| |
| fi |
| |
| done |
| |
| |
| for ac_hdr in sys/quota.h |
| do |
| ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
| echo "configure:9626: checking for $ac_hdr" >&5 |
| if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 9631 "configure" |
| #include "confdefs.h" |
| |
| #include <$ac_hdr> |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:9639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_hdr ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_hdr 1 |
| EOF |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| |
| fi |
| |
| done |
| |
| for ac_hdr in linux/quota.h |
| do |
| ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
| echo "configure:9672: checking for $ac_hdr" >&5 |
| if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 9677 "configure" |
| #include "confdefs.h" |
| |
| #include <$ac_hdr> |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:9685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_hdr ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_hdr 1 |
| EOF |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| |
| fi |
| |
| done |
| |
| |
| # Check whether --enable-dtrace or --disable-dtrace was given. |
| if test "${enable_dtrace+set}" = set; then |
| enableval="$enable_dtrace" |
| if test "$enableval" = "yes"; then |
| enable_dtrace="yes" |
| elif test "$enableval" = "no"; then |
| : |
| else |
| { echo "configure: error: Option, dtrace, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, dtrace, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| if test "x$enable_dtrace" = "xyes"; then |
| ac_safe=`echo "sys/sdt.h" | sed 'y%./+-%__p_%'` |
| echo $ac_n "checking for sys/sdt.h""... $ac_c" 1>&6 |
| echo "configure:9730: checking for sys/sdt.h" >&5 |
| if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 9735 "configure" |
| #include "confdefs.h" |
| |
| #include <sys/sdt.h> |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:9743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| HAVE_DTRACE=1 |
| else |
| echo "$ac_t""no" 1>&6 |
| |
| fi |
| |
| if test -n "$HAVE_DTRACE"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' INCLUDE_MOZILLA_DTRACE ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define INCLUDE_MOZILLA_DTRACE 1 |
| EOF |
| |
| else |
| { echo "configure: error: dtrace enabled but sys/sdt.h not found" 1>&2; echo "configure: error: dtrace enabled but sys/sdt.h not found" 1>&5; exit 1; }; |
| fi |
| fi |
| |
| |
| for ac_hdr in sys/cdefs.h |
| do |
| ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
| echo "configure:9781: checking for $ac_hdr" >&5 |
| if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 9786 "configure" |
| #include "confdefs.h" |
| |
| #include <$ac_hdr> |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:9794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_hdr ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_hdr 1 |
| EOF |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| |
| fi |
| |
| done |
| |
| |
| |
| |
| # Check whether --with-linux-headers or --without-linux-headers was given. |
| if test "${with_linux_headers+set}" = set; then |
| withval="$with_linux_headers" |
| linux_headers=$withval |
| fi |
| |
| |
| LINUX_HEADERS_INCLUDES= |
| |
| if test "$linux_headers"; then |
| LINUX_HEADERS_INCLUDES="-I$linux_headers" |
| fi |
| |
| _SAVE_CFLAGS="$CFLAGS" |
| CFLAGS="$CFLAGS $LINUX_HEADERS_INCLUDES" |
| |
| ac_safe=`echo "linux/perf_event.h" | sed 'y%./+-%__p_%'` |
| echo $ac_n "checking for linux/perf_event.h""... $ac_c" 1>&6 |
| echo "configure:9844: checking for linux/perf_event.h" >&5 |
| if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 9849 "configure" |
| #include "confdefs.h" |
| |
| #include <linux/perf_event.h> |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:9857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| echo $ac_n "checking for perf_event_open system call""... $ac_c" 1>&6 |
| echo "configure:9872: checking for perf_event_open system call" >&5 |
| if eval "test \"`echo '$''{'ac_cv_perf_event_open'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 9877 "configure" |
| #include "confdefs.h" |
| #include <asm/unistd.h> |
| int main() { |
| return sizeof(__NR_perf_event_open); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:9884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cv_perf_event_open=yes |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cv_perf_event_open=no |
| fi |
| rm -f conftest* |
| fi |
| |
| echo "$ac_t""$ac_cv_perf_event_open" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| |
| fi |
| |
| if test "$ac_cv_perf_event_open" = "yes"; then |
| HAVE_LINUX_PERF_EVENT_H=1 |
| else |
| HAVE_LINUX_PERF_EVENT_H= |
| LINUX_HEADERS_INCLUDES= |
| fi |
| |
| |
| |
| CFLAGS="$_SAVE_CFLAGS" |
| |
| |
| |
| echo $ac_n "checking for gethostbyname_r in -lc_r""... $ac_c" 1>&6 |
| echo "configure:9916: checking for gethostbyname_r in -lc_r" >&5 |
| ac_lib_var=`echo c_r'_'gethostbyname_r | sed 'y%./+-%__p_%'` |
| if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_save_LIBS="$LIBS" |
| LIBS="-lc_r $LIBS" |
| cat > conftest.$ac_ext <<EOF |
| #line 9924 "configure" |
| #include "confdefs.h" |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char gethostbyname_r(); |
| |
| int main() { |
| gethostbyname_r() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:9935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=no" |
| fi |
| rm -f conftest* |
| LIBS="$ac_save_LIBS" |
| |
| fi |
| if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_lib=HAVE_LIB`echo c_r | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_lib ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_lib 1 |
| EOF |
| |
| LIBS="-lc_r $LIBS" |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| |
| case $target in |
| *-darwin*) |
| ;; |
| *) |
| |
| echo $ac_n "checking for library containing dlopen""... $ac_c" 1>&6 |
| echo "configure:9972: checking for library containing dlopen" >&5 |
| if eval "test \"`echo '$''{'ac_cv_search_dlopen'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_func_search_save_LIBS="$LIBS" |
| ac_cv_search_dlopen="no" |
| cat > conftest.$ac_ext <<EOF |
| #line 9979 "configure" |
| #include "confdefs.h" |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char dlopen(); |
| |
| int main() { |
| dlopen() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:9990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| ac_cv_search_dlopen="none required" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| fi |
| rm -f conftest* |
| test "$ac_cv_search_dlopen" = "no" && for i in dl; do |
| LIBS="-l$i $ac_func_search_save_LIBS" |
| cat > conftest.$ac_ext <<EOF |
| #line 10001 "configure" |
| #include "confdefs.h" |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char dlopen(); |
| |
| int main() { |
| dlopen() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:10012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| ac_cv_search_dlopen="-l$i" |
| break |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| fi |
| rm -f conftest* |
| done |
| LIBS="$ac_func_search_save_LIBS" |
| fi |
| |
| echo "$ac_t""$ac_cv_search_dlopen" 1>&6 |
| if test "$ac_cv_search_dlopen" != "no"; then |
| test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS" |
| ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` |
| echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 |
| echo "configure:10030: checking for dlfcn.h" >&5 |
| if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 10035 "configure" |
| #include "confdefs.h" |
| |
| #include <dlfcn.h> |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:10043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_DLOPEN ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_DLOPEN 1 |
| EOF |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| |
| fi |
| |
| else : |
| |
| fi |
| ;; |
| esac |
| |
| if test ! "$GNU_CXX"; then |
| echo $ac_n "checking for demangle in -lC""... $ac_c" 1>&6 |
| echo "configure:10077: checking for demangle in -lC" >&5 |
| ac_lib_var=`echo C'_'demangle | sed 'y%./+-%__p_%'` |
| if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_save_LIBS="$LIBS" |
| LIBS="-lC $LIBS" |
| cat > conftest.$ac_ext <<EOF |
| #line 10085 "configure" |
| #include "confdefs.h" |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char demangle(); |
| |
| int main() { |
| demangle() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:10096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=no" |
| fi |
| rm -f conftest* |
| LIBS="$ac_save_LIBS" |
| |
| fi |
| if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_lib=HAVE_LIB`echo C | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_lib ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_lib 1 |
| EOF |
| |
| LIBS="-lC $LIBS" |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| fi |
| |
| echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 |
| echo "configure:10129: checking for socket in -lsocket" >&5 |
| ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` |
| if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_save_LIBS="$LIBS" |
| LIBS="-lsocket $LIBS" |
| cat > conftest.$ac_ext <<EOF |
| #line 10137 "configure" |
| #include "confdefs.h" |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char socket(); |
| |
| int main() { |
| socket() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:10148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=no" |
| fi |
| rm -f conftest* |
| LIBS="$ac_save_LIBS" |
| |
| fi |
| if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_lib ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_lib 1 |
| EOF |
| |
| LIBS="-lsocket $LIBS" |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| |
| case "$target_os" in |
| darwin*) |
| USE_PTHREADS=1 |
| ;; |
| *) |
| echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 |
| echo "configure:10185: checking for pthread_create in -lpthreads" >&5 |
| ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` |
| if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_save_LIBS="$LIBS" |
| LIBS="-lpthreads $LIBS" |
| cat > conftest.$ac_ext <<EOF |
| #line 10193 "configure" |
| #include "confdefs.h" |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char pthread_create(); |
| |
| int main() { |
| pthread_create() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:10204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=no" |
| fi |
| rm -f conftest* |
| LIBS="$ac_save_LIBS" |
| |
| fi |
| if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads" |
| else |
| echo "$ac_t""no" 1>&6 |
| echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 |
| echo "configure:10223: checking for pthread_create in -lpthread" >&5 |
| ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` |
| if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_save_LIBS="$LIBS" |
| LIBS="-lpthread $LIBS" |
| cat > conftest.$ac_ext <<EOF |
| #line 10231 "configure" |
| #include "confdefs.h" |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char pthread_create(); |
| |
| int main() { |
| pthread_create() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:10242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=no" |
| fi |
| rm -f conftest* |
| LIBS="$ac_save_LIBS" |
| |
| fi |
| if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread" |
| else |
| echo "$ac_t""no" 1>&6 |
| echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 |
| echo "configure:10261: checking for pthread_create in -lc_r" >&5 |
| ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` |
| if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_save_LIBS="$LIBS" |
| LIBS="-lc_r $LIBS" |
| cat > conftest.$ac_ext <<EOF |
| #line 10269 "configure" |
| #include "confdefs.h" |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char pthread_create(); |
| |
| int main() { |
| pthread_create() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:10280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=no" |
| fi |
| rm -f conftest* |
| LIBS="$ac_save_LIBS" |
| |
| fi |
| if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r" |
| else |
| echo "$ac_t""no" 1>&6 |
| echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 |
| echo "configure:10299: checking for pthread_create in -lc" >&5 |
| ac_lib_var=`echo c'_'pthread_create | sed 'y%./+-%__p_%'` |
| if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_save_LIBS="$LIBS" |
| LIBS="-lc $LIBS" |
| cat > conftest.$ac_ext <<EOF |
| #line 10307 "configure" |
| #include "confdefs.h" |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char pthread_create(); |
| |
| int main() { |
| pthread_create() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:10318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=no" |
| fi |
| rm -f conftest* |
| LIBS="$ac_save_LIBS" |
| |
| fi |
| if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| USE_PTHREADS=1 |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| |
| fi |
| |
| |
| fi |
| |
| |
| fi |
| |
| ;; |
| esac |
| |
| # Check whether --with-pthreads or --without-pthreads was given. |
| if test "${with_pthreads+set}" = set; then |
| withval="$with_pthreads" |
| if test "$withval" = "yes"; then |
| if test "$USE_PTHREADS"x = x; then |
| { echo "configure: error: --with-pthreads specified for a system without pthread support " 1>&2; echo "configure: error: --with-pthreads specified for a system without pthread support " 1>&5; exit 1; }; |
| fi |
| elif test "$withval" = "no"; then |
| USE_PTHREADS= |
| _PTHREAD_LDFLAGS= |
| |
| else |
| { echo "configure: error: Option, pthreads, does not take an argument ($withval)." 1>&2; echo "configure: error: Option, pthreads, does not take an argument ($withval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| |
| if test "$USE_PTHREADS"x != x |
| then |
| rm -f conftest* |
| ac_cv_have_dash_pthread=no |
| echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6 |
| echo "configure:10373: checking whether ${CC-cc} accepts -pthread" >&5 |
| echo 'int main() { return 0; }' | cat > conftest.c |
| ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1 |
| if test $? -eq 0; then |
| if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" -a -z "`egrep -i '(error|incorrect)' conftest.out`" ; then |
| ac_cv_have_dash_pthread=yes |
| case "$target_os" in |
| freebsd*) |
| # Freebsd doesn't use -pthread for compiles, it uses them for linking |
| ;; |
| *) |
| CFLAGS="$CFLAGS -pthread" |
| CXXFLAGS="$CXXFLAGS -pthread" |
| ;; |
| esac |
| fi |
| fi |
| rm -f conftest* |
| echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6 |
| |
| ac_cv_have_dash_pthreads=no |
| if test "$ac_cv_have_dash_pthread" = "no"; then |
| echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6 |
| echo "configure:10396: checking whether ${CC-cc} accepts -pthreads" >&5 |
| echo 'int main() { return 0; }' | cat > conftest.c |
| ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1 |
| if test $? -eq 0; then |
| if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" -a -z "`egrep -i '(error|incorrect)' conftest.out`" ; then |
| ac_cv_have_dash_pthreads=yes |
| CFLAGS="$CFLAGS -pthreads" |
| CXXFLAGS="$CXXFLAGS -pthreads" |
| fi |
| fi |
| rm -f conftest* |
| echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6 |
| fi |
| |
| case "$target" in |
| *-*-freebsd*) |
| cat >> confdefs.pytmp <<\EOF |
| (''' _REENTRANT ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define _REENTRANT 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' _THREAD_SAFE ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define _THREAD_SAFE 1 |
| EOF |
| |
| if test "$ac_cv_have_dash_pthread" = "yes"; then |
| _PTHREAD_LDFLAGS="-pthread" |
| fi |
| ;; |
| |
| *-*-openbsd*|*-*-bsdi*) |
| cat >> confdefs.pytmp <<\EOF |
| (''' _REENTRANT ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define _REENTRANT 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' _THREAD_SAFE ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define _THREAD_SAFE 1 |
| EOF |
| |
| if test "$ac_cv_have_dash_pthread" = "yes"; then |
| _PTHREAD_LDFLAGS="-pthread" |
| fi |
| ;; |
| |
| *-*-linux*|*-*-kfreebsd*-gnu|*-*-gnu*) |
| cat >> confdefs.pytmp <<\EOF |
| (''' _REENTRANT ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define _REENTRANT 1 |
| EOF |
| |
| ;; |
| |
| esac |
| LDFLAGS="${_PTHREAD_LDFLAGS} ${LDFLAGS}" |
| fi |
| |
| |
| if test $ac_cv_prog_gcc = yes; then |
| echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 |
| echo "configure:10468: checking whether ${CC-cc} needs -traditional" >&5 |
| if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_pattern="Autoconf.*'x'" |
| cat > conftest.$ac_ext <<EOF |
| #line 10474 "configure" |
| #include "confdefs.h" |
| #include <sgtty.h> |
| Autoconf TIOCGETP |
| EOF |
| if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| egrep "$ac_pattern" >/dev/null 2>&1; then |
| rm -rf conftest* |
| ac_cv_prog_gcc_traditional=yes |
| else |
| rm -rf conftest* |
| ac_cv_prog_gcc_traditional=no |
| fi |
| rm -f conftest* |
| |
| |
| if test $ac_cv_prog_gcc_traditional = no; then |
| cat > conftest.$ac_ext <<EOF |
| #line 10492 "configure" |
| #include "confdefs.h" |
| #include <termio.h> |
| Autoconf TCGETA |
| EOF |
| if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| egrep "$ac_pattern" >/dev/null 2>&1; then |
| rm -rf conftest* |
| ac_cv_prog_gcc_traditional=yes |
| fi |
| rm -f conftest* |
| |
| fi |
| fi |
| |
| echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 |
| if test $ac_cv_prog_gcc_traditional = yes; then |
| CC="$CC -traditional" |
| fi |
| fi |
| |
| echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 |
| echo "configure:10514: checking for 8-bit clean memcmp" >&5 |
| if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test "$cross_compiling" = yes; then |
| ac_cv_func_memcmp_clean=no |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 10522 "configure" |
| #include "confdefs.h" |
| |
| main() |
| { |
| char c0 = 0x40, c1 = 0x80, c2 = 0x81; |
| exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1); |
| } |
| |
| EOF |
| if { (eval echo configure:10532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| then |
| ac_cv_func_memcmp_clean=yes |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -fr conftest* |
| ac_cv_func_memcmp_clean=no |
| fi |
| rm -fr conftest* |
| fi |
| |
| fi |
| |
| echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 |
| test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" |
| |
| for ac_func in getc_unlocked _getc_nolock gmtime_r localtime_r |
| do |
| echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
| echo "configure:10552: checking for $ac_func" >&5 |
| if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 10557 "configure" |
| #define $ac_func innocuous_$ac_func |
| #include "confdefs.h" |
| #undef $ac_func |
| /* System header to define __stub macros and hopefully few prototypes, |
| which can conflict with char $ac_func(); below. */ |
| #define $ac_func innocuous_$ac_func |
| #include <assert.h> |
| #undef $ac_func |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char $ac_func(); |
| |
| int main() { |
| |
| /* The GNU C library defines this for functions which it implements |
| to always fail with ENOSYS. Some functions are actually named |
| something starting with __ and the normal name is an alias. */ |
| #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| choke me |
| #else |
| $ac_func(); |
| #endif |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:10584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_func_$ac_func=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_func_$ac_func=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_func ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_func 1 |
| EOF |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| done |
| |
| |
| echo $ac_n "checking for clock_gettime(CLOCK_MONOTONIC)""... $ac_c" 1>&6 |
| echo "configure:10613: checking for clock_gettime(CLOCK_MONOTONIC)" >&5 |
| if eval "test \"`echo '$''{'ac_cv_clock_monotonic'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| for libs in "" -lrt; do |
| _SAVE_LIBS="$LIBS" |
| LIBS="$LIBS $libs" |
| cat > conftest.$ac_ext <<EOF |
| #line 10621 "configure" |
| #include "confdefs.h" |
| #include <time.h> |
| int main() { |
| struct timespec ts; |
| clock_gettime(CLOCK_MONOTONIC, &ts); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:10629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| ac_cv_clock_monotonic=$libs |
| LIBS="$_SAVE_LIBS" |
| break |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cv_clock_monotonic=no |
| fi |
| rm -f conftest* |
| LIBS="$_SAVE_LIBS" |
| done |
| fi |
| |
| echo "$ac_t""$ac_cv_clock_monotonic" 1>&6 |
| if test "$ac_cv_clock_monotonic" != "no"; then |
| HAVE_CLOCK_MONOTONIC=1 |
| REALTIME_LIBS=$ac_cv_clock_monotonic |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_CLOCK_MONOTONIC ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_CLOCK_MONOTONIC 1 |
| EOF |
| |
| |
| |
| fi |
| |
| echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 |
| echo "configure:10661: checking for sin in -lm" >&5 |
| ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` |
| if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_save_LIBS="$LIBS" |
| LIBS="-lm $LIBS" |
| cat > conftest.$ac_ext <<EOF |
| #line 10669 "configure" |
| #include "confdefs.h" |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char sin(); |
| |
| int main() { |
| sin() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:10680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=no" |
| fi |
| rm -f conftest* |
| LIBS="$ac_save_LIBS" |
| |
| fi |
| if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_lib ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_lib 1 |
| EOF |
| |
| LIBS="-lm $LIBS" |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| echo $ac_n "checking for __sincos in -lm""... $ac_c" 1>&6 |
| echo "configure:10711: checking for __sincos in -lm" >&5 |
| ac_lib_var=`echo m'_'__sincos | sed 'y%./+-%__p_%'` |
| if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_save_LIBS="$LIBS" |
| LIBS="-lm $LIBS" |
| cat > conftest.$ac_ext <<EOF |
| #line 10719 "configure" |
| #include "confdefs.h" |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char __sincos(); |
| |
| int main() { |
| __sincos() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:10730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=no" |
| fi |
| rm -f conftest* |
| LIBS="$ac_save_LIBS" |
| |
| fi |
| if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_SINCOS ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_SINCOS 1 |
| EOF |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| |
| |
| if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET" -ge "100300"; then |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| echo $ac_n "checking for wcrtomb""... $ac_c" 1>&6 |
| echo "configure:10768: checking for wcrtomb" >&5 |
| if eval "test \"`echo '$''{'ac_cv_have_wcrtomb'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 10773 "configure" |
| #include "confdefs.h" |
| #include <wchar.h> |
| int main() { |
| mbstate_t ps={0};wcrtomb(0,'f',&ps); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:10780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| ac_cv_have_wcrtomb="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cv_have_wcrtomb="no" |
| fi |
| rm -f conftest* |
| fi |
| |
| echo "$ac_t""$ac_cv_have_wcrtomb" 1>&6 |
| if test "$ac_cv_have_wcrtomb" = "yes"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_WCRTOMB ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_WCRTOMB 1 |
| EOF |
| |
| fi |
| echo $ac_n "checking for mbrtowc""... $ac_c" 1>&6 |
| echo "configure:10803: checking for mbrtowc" >&5 |
| if eval "test \"`echo '$''{'ac_cv_have_mbrtowc'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 10808 "configure" |
| #include "confdefs.h" |
| #include <wchar.h> |
| int main() { |
| mbstate_t ps={0};mbrtowc(0,0,0,&ps); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:10815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| ac_cv_have_mbrtowc="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cv_have_mbrtowc="no" |
| fi |
| rm -f conftest* |
| fi |
| |
| echo "$ac_t""$ac_cv_have_mbrtowc" 1>&6 |
| if test "$ac_cv_have_mbrtowc" = "yes"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_MBRTOWC ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_MBRTOWC 1 |
| EOF |
| |
| fi |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| fi |
| |
| echo $ac_n "checking for res_ninit()""... $ac_c" 1>&6 |
| echo "configure:10847: checking for res_ninit()" >&5 |
| if eval "test \"`echo '$''{'ac_cv_func_res_ninit'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test "$OS_TARGET" = NetBSD -o "$OS_TARGET" = OpenBSD; then |
| ac_cv_func_res_ninit=no |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 10855 "configure" |
| #include "confdefs.h" |
| |
| #ifdef linux |
| #define _BSD_SOURCE 1 |
| #endif |
| #include <sys/types.h> |
| #include <netinet/in.h> |
| #include <arpa/nameser.h> |
| #include <resolv.h> |
| |
| int main() { |
| int foo = res_ninit(&_res); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:10870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| ac_cv_func_res_ninit=yes |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cv_func_res_ninit=no |
| fi |
| rm -f conftest* |
| fi |
| |
| fi |
| |
| echo "$ac_t""$ac_cv_func_res_ninit" 1>&6 |
| |
| if test "$ac_cv_func_res_ninit" = "yes"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_RES_NINIT ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_RES_NINIT 1 |
| EOF |
| |
| fi |
| |
| |
| echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6 |
| echo "configure:10898: checking for nl_langinfo and CODESET" >&5 |
| if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 10903 "configure" |
| #include "confdefs.h" |
| #include <langinfo.h> |
| int main() { |
| char* cs = nl_langinfo(CODESET); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:10910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| am_cv_langinfo_codeset=yes |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| am_cv_langinfo_codeset=no |
| fi |
| rm -f conftest* |
| |
| fi |
| |
| echo "$ac_t""$am_cv_langinfo_codeset" 1>&6 |
| if test $am_cv_langinfo_codeset = yes; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_LANGINFO_CODESET ''', r''' 1 ''') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_LANGINFO_CODESET 1 |
| EOF |
| |
| HAVE_LANGINFO_CODESET=1 |
| fi |
| |
| |
| |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| echo $ac_n "checking for an implementation of va_copy()""... $ac_c" 1>&6 |
| echo "configure:10946: checking for an implementation of va_copy()" >&5 |
| if eval "test \"`echo '$''{'ac_cv_va_copy'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 10951 "configure" |
| #include "confdefs.h" |
| #include <stdarg.h> |
| #include <stdlib.h> |
| void f (int i, ...) { |
| va_list args1, args2; |
| va_start (args1, i); |
| va_copy (args2, args1); |
| if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) |
| exit (1); |
| va_end (args1); va_end (args2); |
| } |
| int main() { |
| f(0, 42); return 0 |
| ; return 0; } |
| EOF |
| if { (eval echo configure:10967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cv_va_copy=yes |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cv_va_copy=no |
| |
| fi |
| rm -f conftest* |
| |
| fi |
| |
| echo "$ac_t""$ac_cv_va_copy" 1>&6 |
| echo $ac_n "checking whether va_list can be copied by value""... $ac_c" 1>&6 |
| echo "configure:10983: checking whether va_list can be copied by value" >&5 |
| if eval "test \"`echo '$''{'ac_cv_va_val_copy'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 10988 "configure" |
| #include "confdefs.h" |
| #include <stdarg.h> |
| #include <stdlib.h> |
| void f (int i, ...) { |
| va_list args1, args2; |
| va_start (args1, i); |
| args2 = args1; |
| if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) |
| exit (1); |
| va_end (args1); va_end (args2); |
| } |
| int main() { |
| f(0, 42); return 0 |
| ; return 0; } |
| EOF |
| if { (eval echo configure:11004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cv_va_val_copy=yes |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cv_va_val_copy=no |
| fi |
| rm -f conftest* |
| |
| fi |
| |
| echo "$ac_t""$ac_cv_va_val_copy" 1>&6 |
| if test "x$ac_cv_va_copy" = "xyes"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' VA_COPY ''', r''' va_copy ''') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define VA_COPY va_copy |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_VA_COPY ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_VA_COPY 1 |
| EOF |
| |
| fi |
| |
| if test "x$ac_cv_va_val_copy" = "xno"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_VA_LIST_AS_ARRAY ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_VA_LIST_AS_ARRAY 1 |
| EOF |
| |
| fi |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| |
| ARM_ABI_PREFIX= |
| if test "$GNU_CC"; then |
| if test "$CPU_ARCH" = "arm" ; then |
| echo $ac_n "checking for ARM EABI""... $ac_c" 1>&6 |
| echo "configure:11057: checking for ARM EABI" >&5 |
| if eval "test \"`echo '$''{'ac_cv_gcc_arm_eabi'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 11062 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| |
| #if defined(__ARM_EABI__) |
| return 0; |
| #else |
| #error Not ARM EABI. |
| #endif |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:11075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cv_gcc_arm_eabi="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cv_gcc_arm_eabi="no" |
| fi |
| rm -f conftest* |
| fi |
| |
| echo "$ac_t""$ac_cv_gcc_arm_eabi" 1>&6 |
| if test "$ac_cv_gcc_arm_eabi" = "yes"; then |
| HAVE_ARM_EABI=1 |
| ARM_ABI_PREFIX=eabi- |
| else |
| ARM_ABI_PREFIX=oabi- |
| fi |
| fi |
| |
| TARGET_COMPILER_ABI="${TARGET_COMPILER_ABI-${ARM_ABI_PREFIX}gcc3}" |
| fi |
| |
| echo $ac_n "checking whether the C++ \"using\" keyword resolves ambiguity""... $ac_c" 1>&6 |
| echo "configure:11100: checking whether the C++ \"using\" keyword resolves ambiguity" >&5 |
| if eval "test \"`echo '$''{'ac_cv_cpp_ambiguity_resolving_using'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 11105 "configure" |
| #include "confdefs.h" |
| class X { |
| public: int go(const X&) {return 3;} |
| int jo(const X&) {return 3;} |
| }; |
| class Y : public X { |
| public: int go(int) {return 2;} |
| int jo(int) {return 2;} |
| using X::jo; |
| private: using X::go; |
| }; |
| int main() { |
| X x; Y y; y.jo(x); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:11121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cv_cpp_ambiguity_resolving_using=yes |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cv_cpp_ambiguity_resolving_using=no |
| fi |
| rm -f conftest* |
| fi |
| |
| echo "$ac_t""$ac_cv_cpp_ambiguity_resolving_using" 1>&6 |
| if test "$ac_cv_cpp_ambiguity_resolving_using" = yes ; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_CPP_AMBIGUITY_RESOLVING_USING ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_CPP_AMBIGUITY_RESOLVING_USING 1 |
| EOF |
| |
| fi |
| |
| echo $ac_n "checking for C++ dynamic_cast to void*""... $ac_c" 1>&6 |
| echo "configure:11145: checking for C++ dynamic_cast to void*" >&5 |
| if eval "test \"`echo '$''{'ac_cv_cpp_dynamic_cast_void_ptr'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| if test "$cross_compiling" = yes; then |
| ac_cv_cpp_dynamic_cast_void_ptr=no |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 11153 "configure" |
| #include "confdefs.h" |
| class X { int i; public: virtual ~X() { } }; |
| class Y { int j; public: virtual ~Y() { } }; |
| class Z : public X, public Y { int k; }; |
| |
| int main() { |
| Z mdo; |
| X *subx = (X*)&mdo; |
| Y *suby = (Y*)&mdo; |
| return !((((void*)&mdo != (void*)subx) && |
| ((void*)&mdo == dynamic_cast<void*>(subx))) || |
| (((void*)&mdo != (void*)suby) && |
| ((void*)&mdo == dynamic_cast<void*>(suby)))); |
| } |
| EOF |
| if { (eval echo configure:11169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| then |
| ac_cv_cpp_dynamic_cast_void_ptr=yes |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -fr conftest* |
| ac_cv_cpp_dynamic_cast_void_ptr=no |
| fi |
| rm -fr conftest* |
| fi |
| |
| fi |
| |
| echo "$ac_t""$ac_cv_cpp_dynamic_cast_void_ptr" 1>&6 |
| if test "$ac_cv_cpp_dynamic_cast_void_ptr" = yes ; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR 1 |
| EOF |
| |
| fi |
| |
| |
| # try harder, when checking for __thread support, see bug 521750 comment #33 and below |
| # We pass MOZ_OPTIMIZE_LDFLAGS to the linker because if dead_strip is |
| # enabled, the linker in xcode 4.1 will crash. Without this it would crash when |
| # linking XUL. |
| _SAVE_LDFLAGS=$LDFLAGS |
| LDFLAGS="$LDFLAGS $DSO_PIC_CFLAGS $DSO_LDOPTS $MOZ_OPTIMIZE_LDFLAGS" |
| echo $ac_n "checking for __thread keyword for TLS variables""... $ac_c" 1>&6 |
| echo "configure:11202: checking for __thread keyword for TLS variables" >&5 |
| if eval "test \"`echo '$''{'ac_cv_thread_keyword'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 11207 "configure" |
| #include "confdefs.h" |
| __thread bool tlsIsMainThread = false; |
| int main() { |
| return tlsIsMainThread; |
| ; return 0; } |
| EOF |
| if { (eval echo configure:11214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| ac_cv_thread_keyword=yes |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cv_thread_keyword=no |
| fi |
| rm -f conftest* |
| fi |
| |
| echo "$ac_t""$ac_cv_thread_keyword" 1>&6 |
| LDFLAGS=$_SAVE_LDFLAGS |
| if test "$ac_cv_thread_keyword" = yes; then |
| # mips builds fail with TLS variables because of a binutils bug. |
| # See bug 528687 |
| case "${target}" in |
| mips*-*) |
| : |
| ;; |
| *-android*|*-linuxandroid*) |
| : |
| ;; |
| *) |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_THREAD_TLS_KEYWORD ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_THREAD_TLS_KEYWORD 1 |
| EOF |
| |
| ;; |
| esac |
| fi |
| |
| |
| echo $ac_n "checking for __attribute__((always_inline))""... $ac_c" 1>&6 |
| echo "configure:11252: checking for __attribute__((always_inline))" >&5 |
| if eval "test \"`echo '$''{'ac_cv_attribute_always_inline'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 11257 "configure" |
| #include "confdefs.h" |
| inline void f(void) __attribute__((always_inline)); |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:11264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cv_attribute_always_inline=yes |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cv_attribute_always_inline=no |
| fi |
| rm -f conftest* |
| fi |
| |
| echo "$ac_t""$ac_cv_attribute_always_inline" 1>&6 |
| |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| |
| echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 |
| echo "configure:11288: checking for LC_MESSAGES" >&5 |
| if eval "test \"`echo '$''{'ac_cv_i18n_lc_messages'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 11293 "configure" |
| #include "confdefs.h" |
| #include <locale.h> |
| int main() { |
| int category = LC_MESSAGES; |
| ; return 0; } |
| EOF |
| if { (eval echo configure:11300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cv_i18n_lc_messages=yes |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cv_i18n_lc_messages=no |
| fi |
| rm -f conftest* |
| fi |
| |
| echo "$ac_t""$ac_cv_i18n_lc_messages" 1>&6 |
| if test "$ac_cv_i18n_lc_messages" = yes; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_I18N_LC_MESSAGES ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_I18N_LC_MESSAGES 1 |
| EOF |
| |
| fi |
| |
| for ac_func in localeconv |
| do |
| echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
| echo "configure:11326: checking for $ac_func" >&5 |
| if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 11331 "configure" |
| #define $ac_func innocuous_$ac_func |
| #include "confdefs.h" |
| #undef $ac_func |
| /* System header to define __stub macros and hopefully few prototypes, |
| which can conflict with char $ac_func(); below. */ |
| #define $ac_func innocuous_$ac_func |
| #include <assert.h> |
| #undef $ac_func |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char $ac_func(); |
| |
| int main() { |
| |
| /* The GNU C library defines this for functions which it implements |
| to always fail with ENOSYS. Some functions are actually named |
| something starting with __ and the normal name is an alias. */ |
| #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| choke me |
| #else |
| $ac_func(); |
| #endif |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:11358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_func_$ac_func=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_func_$ac_func=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_func ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_func 1 |
| EOF |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| done |
| |
| fi # ! SKIP_COMPILER_CHECKS |
| |
| TARGET_XPCOM_ABI= |
| if test -n "${CPU_ARCH}" -a -n "${TARGET_COMPILER_ABI}"; then |
| TARGET_XPCOM_ABI="${CPU_ARCH}-${TARGET_COMPILER_ABI}" |
| fi |
| |
| |
| if test -n "$SKIP_COMPILER_CHECKS"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' MALLOC_H ''', r''' <malloc.h> ''') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define MALLOC_H <malloc.h> |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_FORCEINLINE ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_FORCEINLINE 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_LOCALECONV ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_LOCALECONV 1 |
| EOF |
| |
| fi # SKIP_COMPILER_CHECKS |
| |
| |
| |
| # app update channel is 'default' when not supplied. |
| # Check whether --enable-update-channel or --disable-update-channel was given. |
| if test "${enable_update_channel+set}" = set; then |
| enableval="$enable_update_channel" |
| MOZ_UPDATE_CHANNEL=`echo $enableval | tr A-Z a-z` |
| fi |
| |
| |
| if test -z "$MOZ_UPDATE_CHANNEL"; then |
| MOZ_UPDATE_CHANNEL=default |
| fi |
| cat >> confdefs.pytmp <<EOF |
| (''' MOZ_UPDATE_CHANNEL ''', r''' $MOZ_UPDATE_CHANNEL ''') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define MOZ_UPDATE_CHANNEL $MOZ_UPDATE_CHANNEL |
| EOF |
| |
| |
| |
| # External Packages |
| |
| |
| |
| |
| |
| |
| # Check whether --with-nspr-cflags or --without-nspr-cflags was given. |
| if test "${with_nspr_cflags+set}" = set; then |
| withval="$with_nspr_cflags" |
| NSPR_CFLAGS=$withval |
| fi |
| |
| # Check whether --with-nspr-libs or --without-nspr-libs was given. |
| if test "${with_nspr_libs+set}" = set; then |
| withval="$with_nspr_libs" |
| NSPR_LIBS=$withval |
| fi |
| |
| |
| |
| # Check whether --enable-nspr-build or --disable-nspr-build was given. |
| if test "${enable_nspr_build+set}" = set; then |
| enableval="$enable_nspr_build" |
| if test "$enableval" = "yes"; then |
| MOZ_BUILD_NSPR=1 |
| elif test "$enableval" = "no"; then |
| MOZ_BUILD_NSPR= |
| else |
| { echo "configure: error: Option, nspr-build, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, nspr-build, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| |
| |
| if test "$MOZ_BUILD_APP" != js || test -n "$JS_STANDALONE"; then |
| _IS_OUTER_CONFIGURE=1 |
| fi |
| |
| # Check whether --with-system-nspr or --without-system-nspr was given. |
| if test "${with_system_nspr+set}" = set; then |
| withval="$with_system_nspr" |
| if test "$withval" = "yes"; then |
| _USE_SYSTEM_NSPR=1 |
| elif test "$withval" = "no"; then |
| : |
| else |
| { echo "configure: error: Option, system-nspr, does not take an argument ($withval)." 1>&2; echo "configure: error: Option, system-nspr, does not take an argument ($withval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| |
| JS_POSIX_NSPR=unset |
| |
| if test -n "$JS_STANDALONE"; then |
| case "$target" in |
| *linux*|*darwin*|*dragonfly*|*freebsd*|*netbsd*|*openbsd*) |
| if test -z "$_HAS_NSPR"; then |
| JS_POSIX_NSPR_DEFAULT=1 |
| fi |
| ;; |
| esac |
| fi |
| |
| # Check whether --enable-posix-nspr-emulation or --disable-posix-nspr-emulation was given. |
| if test "${enable_posix_nspr_emulation+set}" = set; then |
| enableval="$enable_posix_nspr_emulation" |
| if test "$enableval" = "yes"; then |
| JS_POSIX_NSPR=1 |
| elif test "$enableval" = "no"; then |
| JS_POSIX_NSPR= |
| else |
| { echo "configure: error: Option, posix-nspr-emulation, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, posix-nspr-emulation, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| |
| |
| |
| echo $ac_n "checking NSPR selection""... $ac_c" 1>&6 |
| echo "configure:11519: checking NSPR selection" >&5 |
| nspr_opts= |
| which_nspr=default |
| if test -n "$_USE_SYSTEM_NSPR"; then |
| nspr_opts="x$nspr_opts" |
| which_nspr="system" |
| fi |
| if test -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then |
| nspr_opts="x$nspr_opts" |
| which_nspr="command-line" |
| fi |
| if test -n "$MOZ_BUILD_NSPR"; then |
| nspr_opts="x$nspr_opts" |
| which_nspr="source-tree" |
| fi |
| if test "$JS_POSIX_NSPR" = unset; then |
| JS_POSIX_NSPR= |
| else |
| nspr_opts="x$nspr_opts" |
| which_nspr="posix-wrapper" |
| fi |
| |
| if test -z "$nspr_opts"; then |
| if test "$MOZ_BUILD_APP" != js; then |
| MOZ_BUILD_NSPR=1 |
| which_nspr="source-tree" |
| else |
| JS_POSIX_NSPR="$JS_POSIX_NSPR_DEFAULT" |
| if test -z "$JS_POSIX_NSPR"; then |
| MOZ_BUILD_NSPR=1 |
| which_nspr="source-tree" |
| else |
| which_nspr="posix-wrapper" |
| fi |
| fi |
| fi |
| |
| if test -z "$nspr_opts" || test "$nspr_opts" = x; then |
| echo "$ac_t""$which_nspr" 1>&6 |
| else |
| { echo "configure: error: only one way of using NSPR may be selected. See 'configure --help'." 1>&2; echo "configure: error: only one way of using NSPR may be selected. See 'configure --help'." 1>&5; exit 1; } |
| fi |
| |
| |
| |
| if test "$MOZ_BUILD_APP" = js; then |
| if test "$JS_POSIX_NSPR" = 1; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_POSIX_NSPR ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_POSIX_NSPR 1 |
| EOF |
| |
| fi |
| |
| fi |
| |
| # A (sub)configure invoked by the toplevel configure will always receive |
| # --with-nspr-libs on the command line. It will never need to figure out |
| # anything itself. |
| if test -n "$_IS_OUTER_CONFIGURE"; then |
| |
| if test -n "$_USE_SYSTEM_NSPR"; then |
| |
| # Check whether --with-nspr-prefix or --without-nspr-prefix was given. |
| if test "${with_nspr_prefix+set}" = set; then |
| withval="$with_nspr_prefix" |
| nspr_config_prefix="$withval" |
| else |
| nspr_config_prefix="" |
| fi |
| |
| |
| # Check whether --with-nspr-exec-prefix or --without-nspr-exec-prefix was given. |
| if test "${with_nspr_exec_prefix+set}" = set; then |
| withval="$with_nspr_exec_prefix" |
| nspr_config_exec_prefix="$withval" |
| else |
| nspr_config_exec_prefix="" |
| fi |
| |
| |
| if test -n "$nspr_config_exec_prefix"; then |
| nspr_config_args="$nspr_config_args --exec-prefix=$nspr_config_exec_prefix" |
| if test -z "$NSPR_CONFIG"; then |
| NSPR_CONFIG=$nspr_config_exec_prefix/bin/nspr-config |
| fi |
| fi |
| if test -n "$nspr_config_prefix"; then |
| nspr_config_args="$nspr_config_args --prefix=$nspr_config_prefix" |
| if test -z "$NSPR_CONFIG"; then |
| NSPR_CONFIG=$nspr_config_prefix/bin/nspr-config |
| fi |
| fi |
| |
| unset ac_cv_path_NSPR_CONFIG |
| # Extract the first word of "nspr-config", so it can be a program name with args. |
| set dummy nspr-config; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:11619: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_path_NSPR_CONFIG'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| case "$NSPR_CONFIG" in |
| /*) |
| ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a path. |
| ;; |
| ?:/*) |
| ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a dos path. |
| ;; |
| *) |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_path_NSPR_CONFIG="$ac_dir/$ac_word" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| test -z "$ac_cv_path_NSPR_CONFIG" && ac_cv_path_NSPR_CONFIG="no" |
| ;; |
| esac |
| fi |
| NSPR_CONFIG="$ac_cv_path_NSPR_CONFIG" |
| if test -n "$NSPR_CONFIG"; then |
| echo "$ac_t""$NSPR_CONFIG" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| min_nspr_version=$NSPR_MINVER |
| echo $ac_n "checking for NSPR - version >= $min_nspr_version""... $ac_c" 1>&6 |
| echo "configure:11654: checking for NSPR - version >= $min_nspr_version" >&5 |
| |
| no_nspr="" |
| if test "$NSPR_CONFIG" != "no"; then |
| NSPR_CFLAGS=`$NSPR_CONFIG $nspr_config_args --cflags` |
| NSPR_LIBS=`$NSPR_CONFIG $nspr_config_args --libs` |
| NSPR_VERSION_STRING=`$NSPR_CONFIG $nspr_config_args --version` |
| elif test -n "${NO_NSPR_CONFIG_SYSTEM_VERSION}"; then |
| NSPR_CFLAGS="${NO_NSPR_CONFIG_SYSTEM_CFLAGS}" |
| NSPR_LIBS="${NO_NSPR_CONFIG_SYSTEM_LDFLAGS}" |
| NSPR_VERSION_STRING="$NO_NSPR_CONFIG_SYSTEM_VERSION" |
| else |
| no_nspr="yes" |
| fi |
| |
| if test -z "$no_nspr"; then |
| nspr_config_major_version=`echo $NSPR_VERSION_STRING | \ |
| sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\1/'` |
| nspr_config_minor_version=`echo $NSPR_VERSION_STRING | \ |
| sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\2/'` |
| nspr_config_micro_version=`echo $NSPR_VERSION_STRING | \ |
| sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\4/'` |
| if test -z "$nspr_config_micro_version"; then |
| nspr_config_micro_version="0" |
| fi |
| |
| min_nspr_major_version=`echo $min_nspr_version | \ |
| sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\1/'` |
| min_nspr_minor_version=`echo $min_nspr_version | \ |
| sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\2/'` |
| min_nspr_micro_version=`echo $min_nspr_version | \ |
| sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\4/'` |
| if test -z "$min_nspr_micro_version"; then |
| min_nspr_micro_version="0" |
| fi |
| |
| if test "$nspr_config_major_version" -ne "$min_nspr_major_version"; then |
| no_nspr="yes" |
| elif test "$nspr_config_major_version" -eq "$min_nspr_major_version" && |
| test "$nspr_config_minor_version" -lt "$min_nspr_minor_version"; then |
| no_nspr="yes" |
| elif test "$nspr_config_major_version" -eq "$min_nspr_major_version" && |
| test "$nspr_config_minor_version" -eq "$min_nspr_minor_version" && |
| test "$nspr_config_micro_version" -lt "$min_nspr_micro_version"; then |
| no_nspr="yes" |
| fi |
| fi |
| |
| if test -z "$no_nspr"; then |
| echo "$ac_t""yes" 1>&6 |
| MOZ_SYSTEM_NSPR=1 |
| else |
| echo "$ac_t""no" 1>&6 |
| { echo "configure: error: you do not have NSPR installed or your version is older than $NSPR_MINVER." 1>&2; echo "configure: error: you do not have NSPR installed or your version is older than $NSPR_MINVER." 1>&5; exit 1; } |
| fi |
| |
| |
| |
| |
| |
| |
| fi |
| |
| if test -n "$MOZ_SYSTEM_NSPR" -o -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then |
| _SAVE_CFLAGS=$CFLAGS |
| CFLAGS="$CFLAGS $NSPR_CFLAGS" |
| cat > conftest.$ac_ext <<EOF |
| #line 11721 "configure" |
| #include "confdefs.h" |
| #include "prtypes.h" |
| int main() { |
| #ifndef PR_STATIC_ASSERT |
| #error PR_STATIC_ASSERT not defined or requires including prtypes.h |
| #endif |
| ; return 0; } |
| EOF |
| if { (eval echo configure:11730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| : |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| { echo "configure: error: system NSPR does not support PR_STATIC_ASSERT or including prtypes.h does not provide it" 1>&2; echo "configure: error: system NSPR does not support PR_STATIC_ASSERT or including prtypes.h does not provide it" 1>&5; exit 1; } |
| fi |
| rm -f conftest* |
| cat > conftest.$ac_ext <<EOF |
| #line 11740 "configure" |
| #include "confdefs.h" |
| #include "prtypes.h" |
| int main() { |
| #ifndef PR_UINT64 |
| #error PR_UINT64 not defined or requires including prtypes.h |
| #endif |
| ; return 0; } |
| EOF |
| if { (eval echo configure:11749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| : |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| { echo "configure: error: system NSPR does not support PR_UINT64 or including prtypes.h does not provide it" 1>&2; echo "configure: error: system NSPR does not support PR_UINT64 or including prtypes.h does not provide it" 1>&5; exit 1; } |
| fi |
| rm -f conftest* |
| CFLAGS=$_SAVE_CFLAGS |
| elif test -z "$JS_POSIX_NSPR"; then |
| NSPR_INCLUDE_DIR="${DIST}/include/nspr" |
| NSPR_CFLAGS="-I${NSPR_INCLUDE_DIR}" |
| if test -n "$GNU_CC"; then |
| if test -n "$MOZ_FOLD_LIBS"; then |
| NSPR_LIB_DIR=${DIST}/lib |
| else |
| NSPR_LIB_DIR=${DIST}/bin |
| fi |
| NSPR_LIBS="-L${NSPR_LIB_DIR} -lnspr${NSPR_VERSION} -lplc${NSPR_VERSION} -lplds${NSPR_VERSION}" |
| else |
| # NSS needs actual static libs to link to, and this is where they are. |
| NSPR_LIBS="${DIST}/lib/nspr${NSPR_VERSION}.lib ${DIST}/lib/plc${NSPR_VERSION}.lib ${DIST}/lib/plds${NSPR_VERSION}.lib " |
| NSPR_LIB_DIR="${DIST}/lib" |
| fi |
| fi |
| |
| |
| |
| |
| |
| NSPR_PKGCONF_CHECK="nspr" |
| if test -n "$MOZ_SYSTEM_NSPR"; then |
| # piggy back on $MOZ_SYSTEM_NSPR to set a variable for the nspr check for js.pc |
| NSPR_PKGCONF_CHECK="nspr >= $NSPR_MINVER" |
| |
| _SAVE_CFLAGS=$CFLAGS |
| CFLAGS="$CFLAGS $NSPR_CFLAGS" |
| cat > conftest.$ac_ext <<EOF |
| #line 11788 "configure" |
| #include "confdefs.h" |
| #include "prlog.h" |
| int main() { |
| #ifndef PR_STATIC_ASSERT |
| #error PR_STATIC_ASSERT not defined |
| #endif |
| ; return 0; } |
| EOF |
| if { (eval echo configure:11797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| : |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| { echo "configure: error: system NSPR does not support PR_STATIC_ASSERT" 1>&2; echo "configure: error: system NSPR does not support PR_STATIC_ASSERT" 1>&5; exit 1; } |
| fi |
| rm -f conftest* |
| CFLAGS=$_SAVE_CFLAGS |
| fi |
| |
| |
| fi # _IS_OUTER_CONFIGURE |
| |
| |
| |
| if test -n "$JS_STANDALONE"; then |
| ZLIB_DIR=yes |
| fi |
| |
| |
| |
| MOZZLIB=1.2.3 |
| |
| # Check whether --with-system-zlib or --without-system-zlib was given. |
| if test "${with_system_zlib+set}" = set; then |
| withval="$with_system_zlib" |
| ZLIB_DIR=$withval |
| fi |
| |
| |
| if test -z "$MOZ_ZLIB_LIBS$MOZ_ZLIB_CFLAGS$SKIP_LIBRARY_CHECKS"; then |
| _SAVE_CFLAGS=$CFLAGS |
| _SAVE_LDFLAGS=$LDFLAGS |
| _SAVE_LIBS=$LIBS |
| |
| if test -n "${ZLIB_DIR}" -a "${ZLIB_DIR}" != "yes"; then |
| MOZ_ZLIB_CFLAGS="-I${ZLIB_DIR}/include" |
| MOZ_ZLIB_LIBS="-L${ZLIB_DIR}/lib" |
| CFLAGS="$MOZ_ZLIB_CFLAGS $CFLAGS" |
| LDFLAGS="$MOZ_ZLIB_LIBS $LDFLAGS" |
| fi |
| if test -z "$ZLIB_DIR" -o "$ZLIB_DIR" = no; then |
| MOZ_SYSTEM_ZLIB= |
| else |
| echo $ac_n "checking for gzread in -lz""... $ac_c" 1>&6 |
| echo "configure:11844: checking for gzread in -lz" >&5 |
| ac_lib_var=`echo z'_'gzread | sed 'y%./+-%__p_%'` |
| if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_save_LIBS="$LIBS" |
| LIBS="-lz $LIBS" |
| cat > conftest.$ac_ext <<EOF |
| #line 11852 "configure" |
| #include "confdefs.h" |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char gzread(); |
| |
| int main() { |
| gzread() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:11863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=no" |
| fi |
| rm -f conftest* |
| LIBS="$ac_save_LIBS" |
| |
| fi |
| if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| MOZ_SYSTEM_ZLIB=1 MOZ_ZLIB_LIBS="$MOZ_ZLIB_LIBS -lz" |
| else |
| echo "$ac_t""no" 1>&6 |
| MOZ_SYSTEM_ZLIB= |
| fi |
| |
| if test "$MOZ_SYSTEM_ZLIB" = 1; then |
| MOZZLIBNUM=`echo $MOZZLIB | awk -F. '{printf "0x%x\n", ((($1 * 16 + $2) * 16) + $3) * 16 + $4}'` |
| cat > conftest.$ac_ext <<EOF |
| #line 11887 "configure" |
| #include "confdefs.h" |
| #include <stdio.h> |
| #include <string.h> |
| #include <zlib.h> |
| int main() { |
| #if ZLIB_VERNUM < $MOZZLIBNUM |
| #error "Insufficient zlib version ($MOZZLIBNUM required)." |
| #endif |
| ; return 0; } |
| EOF |
| if { (eval echo configure:11898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| MOZ_SYSTEM_ZLIB=1 |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| { echo "configure: error: Insufficient zlib version for --with-system-zlib ($MOZZLIB required)" 1>&2; echo "configure: error: Insufficient zlib version for --with-system-zlib ($MOZZLIB required)" 1>&5; exit 1; } |
| fi |
| rm -f conftest* |
| fi |
| fi |
| CFLAGS=$_SAVE_CFLAGS |
| LDFLAGS=$_SAVE_LDFLAGS |
| LIBS=$_SAVE_LIBS |
| fi |
| |
| |
| |
| |
| |
| |
| |
| if test -n "$ZLIB_IN_MOZGLUE"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' ZLIB_IN_MOZGLUE ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define ZLIB_IN_MOZGLUE 1 |
| EOF |
| |
| fi |
| |
| |
| |
| |
| # Check whether --enable-system-ffi or --disable-system-ffi was given. |
| if test "${enable_system_ffi+set}" = set; then |
| enableval="$enable_system_ffi" |
| if test "$enableval" = "yes"; then |
| MOZ_SYSTEM_FFI=1 |
| elif test "$enableval" = "no"; then |
| : |
| else |
| { echo "configure: error: Option, system-ffi, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, system-ffi, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| |
| if test -n "$MOZ_SYSTEM_FFI"; then |
| # Vanilla libffi 3.0.9 needs a few patches from upcoming version 3.0.10 |
| # for non-GCC compilers. |
| if test -z "$GNU_CC"; then |
| succeeded=no |
| |
| if test -z "$PKG_CONFIG"; then |
| # Extract the first word of "pkg-config", so it can be a program name with args. |
| set dummy pkg-config; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:11957: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| case "$PKG_CONFIG" in |
| /*) |
| ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. |
| ;; |
| ?:/*) |
| ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path. |
| ;; |
| *) |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" |
| ;; |
| esac |
| fi |
| PKG_CONFIG="$ac_cv_path_PKG_CONFIG" |
| if test -n "$PKG_CONFIG"; then |
| echo "$ac_t""$PKG_CONFIG" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| fi |
| |
| if test "$PKG_CONFIG" = "no" ; then |
| echo "*** The pkg-config script could not be found. Make sure it is" |
| echo "*** in your path, or set the PKG_CONFIG environment variable" |
| echo "*** to the full path to pkg-config." |
| echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." |
| else |
| PKG_CONFIG_MIN_VERSION=0.9.0 |
| if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
| echo $ac_n "checking for libffi > 3.0.9""... $ac_c" 1>&6 |
| echo "configure:12001: checking for libffi > 3.0.9" >&5 |
| |
| if $PKG_CONFIG --exists "libffi > 3.0.9" ; then |
| echo "$ac_t""yes" 1>&6 |
| succeeded=yes |
| |
| echo $ac_n "checking MOZ_FFI_CFLAGS""... $ac_c" 1>&6 |
| echo "configure:12008: checking MOZ_FFI_CFLAGS" >&5 |
| MOZ_FFI_CFLAGS=`$PKG_CONFIG --cflags "libffi > 3.0.9"` |
| echo "$ac_t""$MOZ_FFI_CFLAGS" 1>&6 |
| |
| echo $ac_n "checking MOZ_FFI_LIBS""... $ac_c" 1>&6 |
| echo "configure:12013: checking MOZ_FFI_LIBS" >&5 |
| ## Remove evil flags like -Wl,--export-dynamic |
| MOZ_FFI_LIBS="`$PKG_CONFIG --libs \"libffi > 3.0.9\" |sed s/-Wl,--export-dynamic//g`" |
| echo "$ac_t""$MOZ_FFI_LIBS" 1>&6 |
| else |
| MOZ_FFI_CFLAGS="" |
| MOZ_FFI_LIBS="" |
| ## If we have a custom action on failure, don't print errors, but |
| ## do set a variable so people can do so. |
| MOZ_FFI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libffi > 3.0.9"` |
| echo $MOZ_FFI_PKG_ERRORS |
| fi |
| |
| |
| |
| else |
| echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." |
| echo "*** See http://www.freedesktop.org/software/pkgconfig" |
| fi |
| fi |
| |
| if test $succeeded = yes; then |
| : |
| else |
| if test "$COMPILE_ENVIRONMENT"; then |
| { echo "configure: error: Library requirements (libffi > 3.0.9) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (libffi > 3.0.9) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; } |
| fi |
| fi |
| |
| else |
| succeeded=no |
| |
| if test -z "$PKG_CONFIG"; then |
| # Extract the first word of "pkg-config", so it can be a program name with args. |
| set dummy pkg-config; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:12049: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| case "$PKG_CONFIG" in |
| /*) |
| ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. |
| ;; |
| ?:/*) |
| ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path. |
| ;; |
| *) |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" |
| ;; |
| esac |
| fi |
| PKG_CONFIG="$ac_cv_path_PKG_CONFIG" |
| if test -n "$PKG_CONFIG"; then |
| echo "$ac_t""$PKG_CONFIG" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| fi |
| |
| if test "$PKG_CONFIG" = "no" ; then |
| echo "*** The pkg-config script could not be found. Make sure it is" |
| echo "*** in your path, or set the PKG_CONFIG environment variable" |
| echo "*** to the full path to pkg-config." |
| echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." |
| else |
| PKG_CONFIG_MIN_VERSION=0.9.0 |
| if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
| echo $ac_n "checking for libffi >= 3.0.9""... $ac_c" 1>&6 |
| echo "configure:12093: checking for libffi >= 3.0.9" >&5 |
| |
| if $PKG_CONFIG --exists "libffi >= 3.0.9" ; then |
| echo "$ac_t""yes" 1>&6 |
| succeeded=yes |
| |
| echo $ac_n "checking MOZ_FFI_CFLAGS""... $ac_c" 1>&6 |
| echo "configure:12100: checking MOZ_FFI_CFLAGS" >&5 |
| MOZ_FFI_CFLAGS=`$PKG_CONFIG --cflags "libffi >= 3.0.9"` |
| echo "$ac_t""$MOZ_FFI_CFLAGS" 1>&6 |
| |
| echo $ac_n "checking MOZ_FFI_LIBS""... $ac_c" 1>&6 |
| echo "configure:12105: checking MOZ_FFI_LIBS" >&5 |
| ## Remove evil flags like -Wl,--export-dynamic |
| MOZ_FFI_LIBS="`$PKG_CONFIG --libs \"libffi >= 3.0.9\" |sed s/-Wl,--export-dynamic//g`" |
| echo "$ac_t""$MOZ_FFI_LIBS" 1>&6 |
| else |
| MOZ_FFI_CFLAGS="" |
| MOZ_FFI_LIBS="" |
| ## If we have a custom action on failure, don't print errors, but |
| ## do set a variable so people can do so. |
| MOZ_FFI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libffi >= 3.0.9"` |
| echo $MOZ_FFI_PKG_ERRORS |
| fi |
| |
| |
| |
| else |
| echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." |
| echo "*** See http://www.freedesktop.org/software/pkgconfig" |
| fi |
| fi |
| |
| if test $succeeded = yes; then |
| : |
| else |
| if test "$COMPILE_ENVIRONMENT"; then |
| { echo "configure: error: Library requirements (libffi >= 3.0.9) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (libffi >= 3.0.9) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; } |
| fi |
| fi |
| |
| fi |
| fi |
| |
| |
| |
| |
| |
| |
| # Application |
| |
| ENABLE_TESTS=1 |
| |
| # Components and Features |
| |
| # Check whether --enable-ui-locale or --disable-ui-locale was given. |
| if test "${enable_ui_locale+set}" = set; then |
| enableval="$enable_ui_locale" |
| MOZ_UI_LOCALE=$enableval |
| fi |
| |
| |
| |
| # Check whether --enable-tests or --disable-tests was given. |
| if test "${enable_tests+set}" = set; then |
| enableval="$enable_tests" |
| if test "$enableval" = "no"; then |
| ENABLE_TESTS= |
| elif test "$enableval" = "yes"; then |
| ENABLE_TESTS=1 |
| else |
| { echo "configure: error: Option, tests, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, tests, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| |
| # Individual module options |
| |
| # Debugging and Optimizations |
| |
| if test "$ENABLE_METHODJIT_SPEW"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_METHODJIT_SPEW ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_METHODJIT_SPEW 1 |
| EOF |
| |
| fi |
| |
| if test -z "$MOZ_OPTIMIZE_FLAGS"; then |
| MOZ_OPTIMIZE_FLAGS="-O" |
| fi |
| |
| # Check whether --enable-optimize or --disable-optimize was given. |
| if test "${enable_optimize+set}" = set; then |
| enableval="$enable_optimize" |
| if test "$enableval" != "no"; then |
| MOZ_OPTIMIZE=1 |
| if test -n "$enableval" -a "$enableval" != "yes"; then |
| MOZ_OPTIMIZE_FLAGS=`echo "$enableval" | sed -e 's|\\\ | |g'` |
| MOZ_OPTIMIZE=2 |
| fi |
| else |
| MOZ_OPTIMIZE= |
| fi |
| else |
| MOZ_OPTIMIZE=1 |
| fi |
| |
| |
| |
| case "$target" in |
| *android*) |
| unwind_tables="-funwind-tables" |
| ;; |
| esac |
| if test "$GNU_CC"; then |
| MOZ_ENABLE_FRAME_PTR="-fno-omit-frame-pointer $unwind_tables" |
| MOZ_DISABLE_FRAME_PTR="-fomit-frame-pointer" |
| if test "$CPU_ARCH" = arm; then |
| # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54398 |
| MOZ_ENABLE_FRAME_PTR="$unwind_tables" |
| fi |
| else |
| case "$target" in |
| *-mingw32*) |
| MOZ_ENABLE_FRAME_PTR="-Oy-" |
| MOZ_DISABLE_FRAME_PTR="-Oy" |
| ;; |
| esac |
| fi |
| |
| # if we are debugging, profiling or using sanitizers, we want a frame pointer. |
| if test -z "$MOZ_OPTIMIZE" -o \ |
| -n "$MOZ_PROFILING" -o \ |
| -n "$MOZ_DEBUG" -o \ |
| -n "$MOZ_MSAN" -o \ |
| -n "$MOZ_ASAN"; then |
| MOZ_FRAMEPTR_FLAGS="$MOZ_ENABLE_FRAME_PTR" |
| else |
| MOZ_FRAMEPTR_FLAGS="$MOZ_DISABLE_FRAME_PTR" |
| fi |
| |
| |
| if test "$COMPILE_ENVIRONMENT"; then |
| if test -n "$MOZ_OPTIMIZE"; then |
| echo $ac_n "checking for valid optimization flags""... $ac_c" 1>&6 |
| echo "configure:12241: checking for valid optimization flags" >&5 |
| _SAVE_CFLAGS=$CFLAGS |
| CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS" |
| cat > conftest.$ac_ext <<EOF |
| #line 12245 "configure" |
| #include "confdefs.h" |
| #include <stdio.h> |
| int main() { |
| printf("Hello World\n"); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:12252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| _results=yes |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| _results=no |
| fi |
| rm -f conftest* |
| echo "$ac_t""$_results" 1>&6 |
| if test "$_results" = "no"; then |
| { echo "configure: error: These compiler flags are invalid: $MOZ_OPTIMIZE_FLAGS" 1>&2; echo "configure: error: These compiler flags are invalid: $MOZ_OPTIMIZE_FLAGS" 1>&5; exit 1; } |
| fi |
| CFLAGS=$_SAVE_CFLAGS |
| fi |
| fi # COMPILE_ENVIRONMENT |
| |
| |
| |
| |
| |
| |
| |
| ENABLE_TRACE_LOGGING=1 |
| # Check whether --enable-trace-logging or --disable-trace-logging was given. |
| if test "${enable_trace_logging+set}" = set; then |
| enableval="$enable_trace_logging" |
| if test "$enableval" = "no"; then |
| ENABLE_TRACE_LOGGING= |
| elif test "$enableval" = "yes"; then |
| : |
| else |
| { echo "configure: error: Option, trace-logging, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, trace-logging, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| |
| |
| |
| if test -n "$ENABLE_TRACE_LOGGING"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_TRACE_LOGGING ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_TRACE_LOGGING 1 |
| EOF |
| |
| fi |
| |
| if test -z "$MOZ_ENABLE_WARNINGS_AS_ERRORS"; then |
| WARNINGS_AS_ERRORS='' |
| fi |
| |
| |
| LOCAL_MOZ_MEMORY=1 |
| # Check whether --enable-jemalloc or --disable-jemalloc was given. |
| if test "${enable_jemalloc+set}" = set; then |
| enableval="$enable_jemalloc" |
| if test "$enableval" = "no"; then |
| LOCAL_MOZ_MEMORY= |
| elif test "$enableval" = "yes"; then |
| : |
| else |
| { echo "configure: error: Option, jemalloc, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, jemalloc, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| |
| if test "$JS_STANDALONE"; then |
| MOZ_MEMORY=$LOCAL_MOZ_MEMORY |
| fi |
| |
| case "${OS_TARGET}" in |
| Android|WINNT|Darwin) |
| MOZ_GLUE_IN_PROGRAM= |
| ;; |
| *) |
| MOZ_GLUE_IN_PROGRAM=1 |
| cat >> confdefs.pytmp <<\EOF |
| (''' MOZ_GLUE_IN_PROGRAM ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define MOZ_GLUE_IN_PROGRAM 1 |
| EOF |
| |
| ;; |
| esac |
| |
| if test "$MOZ_MEMORY"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' MOZ_MEMORY ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define MOZ_MEMORY 1 |
| EOF |
| |
| if test "x$MOZ_DEBUG" = "x1"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' MOZ_MEMORY_DEBUG ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define MOZ_MEMORY_DEBUG 1 |
| EOF |
| |
| fi |
| case "${target}" in |
| *-darwin*) |
| cat >> confdefs.pytmp <<\EOF |
| (''' MOZ_MEMORY_DARWIN ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define MOZ_MEMORY_DARWIN 1 |
| EOF |
| |
| ;; |
| *-*freebsd*) |
| cat >> confdefs.pytmp <<\EOF |
| (''' MOZ_MEMORY_BSD ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define MOZ_MEMORY_BSD 1 |
| EOF |
| |
| ;; |
| *-android*|*-linuxandroid*) |
| cat >> confdefs.pytmp <<\EOF |
| (''' MOZ_MEMORY_LINUX ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define MOZ_MEMORY_LINUX 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' MOZ_MEMORY_ANDROID ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define MOZ_MEMORY_ANDROID 1 |
| EOF |
| |
| ;; |
| *-*linux*) |
| cat >> confdefs.pytmp <<\EOF |
| (''' MOZ_MEMORY_LINUX ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define MOZ_MEMORY_LINUX 1 |
| EOF |
| |
| ;; |
| *-netbsd*) |
| cat >> confdefs.pytmp <<\EOF |
| (''' MOZ_MEMORY_BSD ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define MOZ_MEMORY_BSD 1 |
| EOF |
| |
| ;; |
| *-mingw*) |
| cat >> confdefs.pytmp <<\EOF |
| (''' MOZ_MEMORY_WINDOWS ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define MOZ_MEMORY_WINDOWS 1 |
| EOF |
| |
| export MOZ_NO_DEBUG_RTL=1 |
| ;; |
| *) |
| { echo "configure: error: --enable-jemalloc not supported on ${target}" 1>&2; echo "configure: error: --enable-jemalloc not supported on ${target}" 1>&5; exit 1; } |
| ;; |
| esac |
| fi |
| |
| |
| if test -n "$MOZ_JEMALLOC4"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' MOZ_JEMALLOC4 ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define MOZ_JEMALLOC4 1 |
| EOF |
| |
| fi |
| |
| |
| |
| |
| # Check whether --enable-small-chunk-size or --disable-small-chunk-size was given. |
| if test "${enable_small_chunk_size+set}" = set; then |
| enableval="$enable_small_chunk_size" |
| if test "$enableval" = "yes"; then |
| JS_GC_SMALL_CHUNK_SIZE=1 |
| elif test "$enableval" = "no"; then |
| JS_GC_SMALL_CHUNK_SIZE= |
| else |
| { echo "configure: error: Option, small-chunk-size, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, small-chunk-size, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| if test -n "$JS_GC_SMALL_CHUNK_SIZE"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_GC_SMALL_CHUNK_SIZE ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_GC_SMALL_CHUNK_SIZE 1 |
| EOF |
| |
| fi |
| |
| # Check whether --enable-gc-trace or --disable-gc-trace was given. |
| if test "${enable_gc_trace+set}" = set; then |
| enableval="$enable_gc_trace" |
| if test "$enableval" = "yes"; then |
| JS_GC_TRACE=1 |
| elif test "$enableval" = "no"; then |
| JS_GC_TRACE= |
| else |
| { echo "configure: error: Option, gc-trace, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, gc-trace, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| if test -n "$JS_GC_TRACE"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_GC_TRACE ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_GC_TRACE 1 |
| EOF |
| |
| fi |
| |
| # Check whether --enable-valgrind or --disable-valgrind was given. |
| if test "${enable_valgrind+set}" = set; then |
| enableval="$enable_valgrind" |
| if test "$enableval" = "yes"; then |
| MOZ_VALGRIND=1 |
| elif test "$enableval" = "no"; then |
| MOZ_VALGRIND= |
| else |
| { echo "configure: error: Option, valgrind, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, valgrind, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| if test -n "$MOZ_VALGRIND"; then |
| ac_safe=`echo "valgrind/valgrind.h" | sed 'y%./+-%__p_%'` |
| echo $ac_n "checking for valgrind/valgrind.h""... $ac_c" 1>&6 |
| echo "configure:12500: checking for valgrind/valgrind.h" >&5 |
| if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 12505 "configure" |
| #include "confdefs.h" |
| |
| #include <valgrind/valgrind.h> |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:12513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| : |
| else |
| echo "$ac_t""no" 1>&6 |
| { echo "configure: error: --enable-valgrind specified but Valgrind is not installed" 1>&2; echo "configure: error: --enable-valgrind specified but Valgrind is not installed" 1>&5; exit 1; } |
| fi |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' MOZ_VALGRIND ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define MOZ_VALGRIND 1 |
| EOF |
| |
| MOZ_VALGRIND=1 |
| fi |
| |
| |
| # Check whether --enable-simulator or --disable-simulator was given. |
| if test "${enable_simulator+set}" = set; then |
| enableval="$enable_simulator" |
| JS_SIMULATOR="$enableval" |
| fi |
| |
| |
| if test -n "$JS_SIMULATOR"; then |
| case "$JS_SIMULATOR" in |
| arm|arm64|mips32|mips64) ;; |
| no) |
| JS_SIMULATOR= |
| ;; |
| *) { echo "configure: error: Invalid simulator. Valid simulators are: arm, arm64, mips32, mips64." 1>&2; echo "configure: error: Invalid simulator. Valid simulators are: arm, arm64, mips32, mips64." 1>&5; exit 1; } ;; |
| esac |
| fi |
| |
| if test -z "$ENABLE_ION"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_CODEGEN_NONE ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_CODEGEN_NONE 1 |
| EOF |
| |
| JS_CODEGEN_NONE=1 |
| elif test "$JS_SIMULATOR" = arm; then |
| if test "$CPU_ARCH" != "x86"; then |
| { echo "configure: error: The ARM simulator only works on x86." 1>&2; echo "configure: error: The ARM simulator only works on x86." 1>&5; exit 1; } |
| fi |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_SIMULATOR ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_SIMULATOR 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_SIMULATOR_ARM ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_SIMULATOR_ARM 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_DISASM_ARM ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_DISASM_ARM 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_CODEGEN_ARM ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_CODEGEN_ARM 1 |
| EOF |
| |
| JS_SIMULATOR_ARM=1 |
| JS_DISASM_ARM=1 |
| JS_CODEGEN_ARM=1 |
| elif test "$JS_SIMULATOR" = arm64; then |
| if test "$CPU_ARCH" != "x86_64"; then |
| { echo "configure: error: The ARM64 simulator only works on x86_64." 1>&2; echo "configure: error: The ARM64 simulator only works on x86_64." 1>&5; exit 1; } |
| fi |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_SIMULATOR ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_SIMULATOR 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_SIMULATOR_ARM64 ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_SIMULATOR_ARM64 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_CODEGEN_ARM64 ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_CODEGEN_ARM64 1 |
| EOF |
| |
| JS_SIMULATOR_ARM64=1 |
| JS_CODEGEN_ARM64=1 |
| elif test "$JS_SIMULATOR" = mips32; then |
| if test "$CPU_ARCH" != "x86"; then |
| { echo "configure: error: The MIPS32 simulator only works on x86." 1>&2; echo "configure: error: The MIPS32 simulator only works on x86." 1>&5; exit 1; } |
| fi |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_SIMULATOR ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_SIMULATOR 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_SIMULATOR_MIPS32 ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_SIMULATOR_MIPS32 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_CODEGEN_MIPS32 ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_CODEGEN_MIPS32 1 |
| EOF |
| |
| JS_SIMULATOR_MIPS32=1 |
| JS_CODEGEN_MIPS32=1 |
| elif test "$JS_SIMULATOR" = mips64; then |
| if test "$CPU_ARCH" != "x86_64"; then |
| { echo "configure: error: The MIPS64 simulator only works on x86_64." 1>&2; echo "configure: error: The MIPS64 simulator only works on x86_64." 1>&5; exit 1; } |
| fi |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_SIMULATOR ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_SIMULATOR 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_SIMULATOR_MIPS64 ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_SIMULATOR_MIPS64 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_CODEGEN_MIPS64 ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_CODEGEN_MIPS64 1 |
| EOF |
| |
| JS_SIMULATOR_MIPS64=1 |
| JS_CODEGEN_MIPS64=1 |
| elif test "$CPU_ARCH" = "x86"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_CODEGEN_X86 ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_CODEGEN_X86 1 |
| EOF |
| |
| JS_CODEGEN_X86=1 |
| elif test "$CPU_ARCH" = "x86_64"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_CODEGEN_X64 ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_CODEGEN_X64 1 |
| EOF |
| |
| JS_CODEGEN_X64=1 |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' ASMJS_MAY_USE_SIGNAL_HANDLERS ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define ASMJS_MAY_USE_SIGNAL_HANDLERS 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' ASMJS_MAY_USE_SIGNAL_HANDLERS_FOR_OOB ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define ASMJS_MAY_USE_SIGNAL_HANDLERS_FOR_OOB 1 |
| EOF |
| |
| ASMJS_MAY_USE_SIGNAL_HANDLERS=1 |
| ASMJS_MAY_USE_SIGNAL_HANDLERS_FOR_OOB=1 |
| elif test "$CPU_ARCH" = "arm"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_CODEGEN_ARM ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_CODEGEN_ARM 1 |
| EOF |
| |
| JS_CODEGEN_ARM=1 |
| if test -n "$MOZ_DEBUG"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_DISASM_ARM ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_DISASM_ARM 1 |
| EOF |
| |
| JS_DISASM_ARM=1 |
| fi |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' ASMJS_MAY_USE_SIGNAL_HANDLERS ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define ASMJS_MAY_USE_SIGNAL_HANDLERS 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' ASMJS_MAY_USE_SIGNAL_HANDLERS_FOR_UNALIGNED ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define ASMJS_MAY_USE_SIGNAL_HANDLERS_FOR_UNALIGNED 1 |
| EOF |
| |
| ASMJS_MAY_USE_SIGNAL_HANDLERS=1 |
| ASMJS_MAY_USE_SIGNAL_HANDLERS_FOR_UNALIGNED=1 |
| elif test "$CPU_ARCH" = "mips32"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_CODEGEN_MIPS32 ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_CODEGEN_MIPS32 1 |
| EOF |
| |
| JS_CODEGEN_MIPS32=1 |
| elif test "$CPU_ARCH" = "mips64"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_CODEGEN_MIPS64 ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_CODEGEN_MIPS64 1 |
| EOF |
| |
| JS_CODEGEN_MIPS64=1 |
| fi |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| if test -n "$MOZ_INSTRUMENTS"; then |
| LIBS="$LIBS -framework CoreFoundation" |
| fi |
| |
| # Check whether --enable-jitspew or --disable-jitspew was given. |
| if test "${enable_jitspew+set}" = set; then |
| enableval="$enable_jitspew" |
| if test "$enableval" = "yes"; then |
| JS_JITSPEW=1 |
| elif test "$enableval" = "no"; then |
| JS_JITSPEW= |
| else |
| { echo "configure: error: Option, jitspew, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, jitspew, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| |
| if test -n "$JS_JITSPEW" -o -n "$MOZ_DEBUG"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_JITSPEW ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_JITSPEW 1 |
| EOF |
| |
| fi |
| |
| |
| |
| if test -n "$MOZ_DEBUG"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_DEBUG ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_DEBUG 1 |
| EOF |
| |
| fi |
| |
| # Check whether --enable-gczeal or --disable-gczeal was given. |
| if test "${enable_gczeal+set}" = set; then |
| enableval="$enable_gczeal" |
| if test "$enableval" = "yes"; then |
| JS_GC_ZEAL=1 |
| elif test "$enableval" = "no"; then |
| JS_GC_ZEAL= |
| else |
| { echo "configure: error: Option, gczeal, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, gczeal, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| if test -n "$JS_GC_ZEAL" -o -n "$MOZ_DEBUG"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_GC_ZEAL ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_GC_ZEAL 1 |
| EOF |
| |
| fi |
| |
| # Check whether --enable-perf or --disable-perf was given. |
| if test "${enable_perf+set}" = set; then |
| enableval="$enable_perf" |
| if test "$enableval" = "yes"; then |
| JS_ION_PERF=1 |
| elif test "$enableval" = "no"; then |
| JS_ION_PERF= |
| else |
| { echo "configure: error: Option, perf, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, perf, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| if test -n "$JS_ION_PERF"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_ION_PERF ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_ION_PERF 1 |
| EOF |
| |
| fi |
| |
| # Check whether --enable-more-deterministic or --disable-more-deterministic was given. |
| if test "${enable_more_deterministic+set}" = set; then |
| enableval="$enable_more_deterministic" |
| if test "$enableval" = "yes"; then |
| JS_MORE_DETERMINISTIC=1 |
| elif test "$enableval" = "no"; then |
| JS_MORE_DETERMINISTIC= |
| else |
| { echo "configure: error: Option, more-deterministic, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, more-deterministic, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| if test -n "$JS_MORE_DETERMINISTIC"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_MORE_DETERMINISTIC ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_MORE_DETERMINISTIC 1 |
| EOF |
| |
| fi |
| |
| # Check whether --enable-oom-breakpoint or --disable-oom-breakpoint was given. |
| if test "${enable_oom_breakpoint+set}" = set; then |
| enableval="$enable_oom_breakpoint" |
| if test "$enableval" = "yes"; then |
| JS_OOM_BREAKPOINT=1 |
| elif test "$enableval" = "no"; then |
| JS_OOM_BREAKPOINT= |
| else |
| { echo "configure: error: Option, oom-breakpoint, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, oom-breakpoint, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| if test -n "$JS_OOM_BREAKPOINT"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_OOM_BREAKPOINT ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_OOM_BREAKPOINT 1 |
| EOF |
| |
| fi |
| |
| |
| |
| |
| # Check whether --enable-clang-plugin or --disable-clang-plugin was given. |
| if test "${enable_clang_plugin+set}" = set; then |
| enableval="$enable_clang_plugin" |
| if test "$enableval" = "yes"; then |
| ENABLE_CLANG_PLUGIN=1 |
| elif test "$enableval" = "no"; then |
| ENABLE_CLANG_PLUGIN= |
| else |
| { echo "configure: error: Option, clang-plugin, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, clang-plugin, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| if test -n "$ENABLE_CLANG_PLUGIN"; then |
| if test -z "${CLANG_CC}${CLANG_CL}"; then |
| { echo "configure: error: Can't use clang plugin without clang." 1>&2; echo "configure: error: Can't use clang plugin without clang." 1>&5; exit 1; } |
| fi |
| |
| echo $ac_n "checking for llvm-config""... $ac_c" 1>&6 |
| echo "configure:12942: checking for llvm-config" >&5 |
| if test -z "$LLVMCONFIG"; then |
| if test -n "$CLANG_CL"; then |
| CXX_COMPILER="$(dirname "$CXX")/clang" |
| else |
| CXX_COMPILER="${CXX}" |
| fi |
| LLVMCONFIG=`$CXX_COMPILER -print-prog-name=llvm-config` |
| fi |
| |
| if test -z "$LLVMCONFIG"; then |
| LLVMCONFIG=`which llvm-config` |
| fi |
| |
| if test ! -x "$LLVMCONFIG"; then |
| echo "$ac_t""not found" 1>&6 |
| { echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&2; echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&5; exit 1; } |
| fi |
| |
| echo "$ac_t""$LLVMCONFIG" 1>&6 |
| |
| if test -z "$LLVMCONFIG"; then |
| { echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&2; echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&5; exit 1; } |
| fi |
| LLVM_CXXFLAGS=`$LLVMCONFIG --cxxflags` |
| LLVM_LDFLAGS=`$LLVMCONFIG --system-libs | tr '\n' ' '` |
| LLVM_LDFLAGS="$LLVM_LDFLAGS `$LLVMCONFIG --ldflags --libs core mc analysis asmparser mcparser bitreader option profiledata | tr '\n' ' '`" |
| |
| if test "${HOST_OS_ARCH}" = "Darwin"; then |
| CLANG_LDFLAGS="-lclangFrontend -lclangDriver -lclangSerialization" |
| CLANG_LDFLAGS="$CLANG_LDFLAGS -lclangParse -lclangSema -lclangAnalysis" |
| CLANG_LDFLAGS="$CLANG_LDFLAGS -lclangEdit -lclangAST -lclangLex" |
| CLANG_LDFLAGS="$CLANG_LDFLAGS -lclangBasic -lclangASTMatchers" |
| elif test "${HOST_OS_ARCH}" = "WINNT"; then |
| CLANG_LDFLAGS="clangFrontend.lib clangDriver.lib clangSerialization.lib" |
| CLANG_LDFLAGS="$CLANG_LDFLAGS clangParse.lib clangSema.lib clangAnalysis.lib" |
| CLANG_LDFLAGS="$CLANG_LDFLAGS clangEdit.lib clangAST.lib clangLex.lib" |
| CLANG_LDFLAGS="$CLANG_LDFLAGS clangBasic.lib clangASTMatchers.lib" |
| else |
| CLANG_LDFLAGS="-lclangASTMatchers" |
| fi |
| |
| if test -n "$CLANG_CL"; then |
| LLVM_REPLACE_CXXFLAGS='' |
| for arg in $LLVM_CXXFLAGS; do |
| arg=`echo "$arg"|sed -e 's/^\//-/' -e 's/\\\\/\//g'` |
| LLVM_REPLACE_CXXFLAGS="$LLVM_REPLACE_CXXFLAGS $arg" |
| done |
| LLVM_CXXFLAGS="$LLVM_REPLACE_CXXFLAGS" |
| |
| LLVM_REPLACE_LDFLAGS='' |
| for arg in $LLVM_LDFLAGS; do |
| arg=`echo "$arg"|sed -e 's/^\//-/' -e 's/\\\\/\//g'` |
| LLVM_REPLACE_LDFLAGS="$LLVM_REPLACE_LDFLAGS $arg" |
| done |
| LLVM_LDFLAGS="$LLVM_REPLACE_LDFLAGS" |
| |
| CLANG_REPLACE_LDFLAGS='' |
| for arg in $CLANG_LDFLAGS; do |
| arg=`echo "$arg"|sed -e 's/^\//-/' -e 's/\\\\/\//g'` |
| CLANG_REPLACE_LDFLAGS="$CLANG_REPLACE_LDFLAGS $arg" |
| done |
| CLANG_LDFLAGS="$CLANG_REPLACE_LDFLAGS" |
| fi |
| |
| echo $ac_n "checking for new ASTMatcher names""... $ac_c" 1>&6 |
| echo "configure:13008: checking for new ASTMatcher names" >&5 |
| if eval "test \"`echo '$''{'ac_cv_have_new_ASTMatcher_names'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| _SAVE_CXXFLAGS="$CXXFLAGS" |
| CXXFLAGS="${LLVM_CXXFLAGS}" |
| cat > conftest.$ac_ext <<EOF |
| #line 13024 "configure" |
| #include "confdefs.h" |
| #include "clang/ASTMatchers/ASTMatchers.h" |
| int main() { |
| clang::ast_matchers::cxxConstructExpr(); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:13031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cv_have_new_ASTMatcher_names="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cv_have_new_ASTMatcher_names="no" |
| fi |
| rm -f conftest* |
| CXXFLAGS="$_SAVE_CXXFLAGS" |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| fi |
| |
| echo "$ac_t""$ac_cv_have_new_ASTMatcher_names" 1>&6 |
| if test "$ac_cv_have_new_ASTMatcher_names" = "yes"; then |
| LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DHAVE_NEW_ASTMATCHER_NAMES" |
| fi |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' MOZ_CLANG_PLUGIN ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define MOZ_CLANG_PLUGIN 1 |
| EOF |
| |
| fi |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| # Check whether --with-sixgill or --without-sixgill was given. |
| if test "${with_sixgill+set}" = set; then |
| withval="$with_sixgill" |
| SIXGILL_PATH=$withval |
| else |
| SIXGILL_PATH= |
| fi |
| |
| |
| if test -n "$SIXGILL_PATH"; then |
| if test ! -x "$SIXGILL_PATH/bin/xdbfind" || test ! -f "$SIXGILL_PATH/gcc/xgill.so" || test ! -x "$SIXGILL_PATH/scripts/wrap_gcc/g++"; then |
| { echo "configure: error: The sixgill plugin and binaries are not at the specified path." 1>&2; echo "configure: error: The sixgill plugin and binaries are not at the specified path." 1>&5; exit 1; } |
| fi |
| fi |
| |
| |
| # Check whether --enable-strip or --disable-strip was given. |
| if test "${enable_strip+set}" = set; then |
| enableval="$enable_strip" |
| if test "$enableval" = "yes"; then |
| ENABLE_STRIP=1 |
| elif test "$enableval" = "no"; then |
| ENABLE_STRIP= |
| else |
| { echo "configure: error: Option, strip, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, strip, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| |
| # Check whether --enable-install-strip or --disable-install-strip was given. |
| if test "${enable_install_strip+set}" = set; then |
| enableval="$enable_install_strip" |
| if test "$enableval" = "yes"; then |
| PKG_SKIP_STRIP= |
| elif test "$enableval" = "no"; then |
| PKG_SKIP_STRIP=1 |
| else |
| { echo "configure: error: Option, install-strip, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, install-strip, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| |
| # Profiling and Instrumenting |
| |
| if test -z "$SKIP_LIBRARY_CHECKS"; then |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| for ac_func in __cxa_demangle |
| do |
| echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
| echo "configure:13131: checking for $ac_func" >&5 |
| if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 13136 "configure" |
| #define $ac_func innocuous_$ac_func |
| #include "confdefs.h" |
| #undef $ac_func |
| /* System header to define __stub macros and hopefully few prototypes, |
| which can conflict with char $ac_func(); below. */ |
| #define $ac_func innocuous_$ac_func |
| #include <assert.h> |
| #undef $ac_func |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| #ifdef __cplusplus |
| extern "C" |
| #endif |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char $ac_func(); |
| |
| int main() { |
| |
| /* The GNU C library defines this for functions which it implements |
| to always fail with ENOSYS. Some functions are actually named |
| something starting with __ and the normal name is an alias. */ |
| #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| choke me |
| #else |
| $ac_func(); |
| #endif |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:13166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_func_$ac_func=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_func_$ac_func=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_func ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_func 1 |
| EOF |
| HAVE_DEMANGLE=1 |
| else |
| echo "$ac_t""no" 1>&6 |
| HAVE_DEMANGLE= |
| fi |
| done |
| |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| fi |
| |
| |
| # Check whether --with-jitreport-granularity or --without-jitreport-granularity was given. |
| if test "${with_jitreport_granularity+set}" = set; then |
| withval="$with_jitreport_granularity" |
| JITREPORT_GRANULARITY=$withval |
| else |
| JITREPORT_GRANULARITY=3 |
| fi |
| |
| |
| cat >> confdefs.pytmp <<EOF |
| (''' JS_DEFAULT_JITREPORT_GRANULARITY ''', r''' $JITREPORT_GRANULARITY ''') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define JS_DEFAULT_JITREPORT_GRANULARITY $JITREPORT_GRANULARITY |
| EOF |
| |
| |
| # Misc. Options |
| |
| if test -z "$SKIP_COMPILER_CHECKS"; then |
| # Compiler Options |
| |
| echo $ac_n "checking for -pipe support""... $ac_c" 1>&6 |
| echo "configure:13227: checking for -pipe support" >&5 |
| if test -n "$GNU_CC" -a -n "$GNU_CXX"; then |
| CFLAGS="$CFLAGS -pipe" |
| CXXFLAGS="$CXXFLAGS -pipe" |
| echo "$ac_t""yes" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| |
| _SAVE_CFLAGS="$CFLAGS" |
| CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction" |
| |
| echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6 |
| echo "configure:13241: checking whether C compiler supports -fprofile-generate" >&5 |
| cat > conftest.$ac_ext <<EOF |
| #line 13243 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| return 0; |
| ; return 0; } |
| EOF |
| if { (eval echo configure:13250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| PROFILE_GEN_CFLAGS="-fprofile-generate" |
| result="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| result="no" |
| fi |
| rm -f conftest* |
| echo "$ac_t""$result" 1>&6 |
| |
| if test $result = "yes"; then |
| PROFILE_GEN_LDFLAGS="-fprofile-generate" |
| PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch" |
| PROFILE_USE_LDFLAGS="-fprofile-use" |
| fi |
| |
| CFLAGS="$_SAVE_CFLAGS" |
| |
| if test -n "$INTEL_CC"; then |
| PROFILE_GEN_CFLAGS="-prof-gen -prof-dir ." |
| PROFILE_GEN_LDFLAGS= |
| PROFILE_USE_CFLAGS="-prof-use -prof-dir ." |
| PROFILE_USE_LDFLAGS= |
| fi |
| |
| |
| |
| |
| |
| |
| ac_ext=C |
| # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CXXCPP $CPPFLAGS' |
| ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cxx_cross |
| |
| |
| echo $ac_n "checking for tm_zone tm_gmtoff in struct tm""... $ac_c" 1>&6 |
| echo "configure:13292: checking for tm_zone tm_gmtoff in struct tm" >&5 |
| if eval "test \"`echo '$''{'ac_cv_struct_tm_zone_tm_gmtoff'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 13297 "configure" |
| #include "confdefs.h" |
| #include <time.h> |
| int main() { |
| struct tm tm; tm.tm_zone = 0; tm.tm_gmtoff = 1; |
| ; return 0; } |
| EOF |
| if { (eval echo configure:13304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| ac_cv_struct_tm_zone_tm_gmtoff="yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| ac_cv_struct_tm_zone_tm_gmtoff="no" |
| fi |
| rm -f conftest* |
| fi |
| |
| echo "$ac_t""$ac_cv_struct_tm_zone_tm_gmtoff" 1>&6 |
| if test "$ac_cv_struct_tm_zone_tm_gmtoff" = "yes" ; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_TM_ZONE_TM_GMTOFF ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_TM_ZONE_TM_GMTOFF 1 |
| EOF |
| |
| fi |
| fi # ! SKIP_COMPILER_CHECKS |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' CPP_THROW_NEW ''', r''' throw() ''') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define CPP_THROW_NEW throw() |
| EOF |
| |
| ac_ext=c |
| # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| ac_cpp='$CPP $CPPFLAGS' |
| ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| cross_compiling=$ac_cv_prog_cc_cross |
| |
| |
| |
| |
| echo $ac_n "checking what kind of list files are supported by the linker""... $ac_c" 1>&6 |
| echo "configure:13346: checking what kind of list files are supported by the linker" >&5 |
| if eval "test \"`echo '$''{'EXPAND_LIBS_LIST_STYLE'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| echo "int main() {return 0;}" > conftest.${ac_ext} |
| if { ac_try='${CC-cc} -o conftest.${OBJ_SUFFIX} -c $CFLAGS $CPPFLAGS conftest.${ac_ext} 1>&5'; { (eval echo configure:13351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.${OBJ_SUFFIX}; then |
| echo "INPUT(conftest.${OBJ_SUFFIX})" > conftest.list |
| if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS conftest.list $LIBS 1>&5'; { (eval echo configure:13353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then |
| EXPAND_LIBS_LIST_STYLE=linkerscript |
| else |
| echo "conftest.${OBJ_SUFFIX}" > conftest.list |
| if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS -Wl,-filelist,conftest.list $LIBS 1>&5'; { (eval echo configure:13357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then |
| EXPAND_LIBS_LIST_STYLE=filelist |
| elif { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS @conftest.list $LIBS 1>&5'; { (eval echo configure:13359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then |
| EXPAND_LIBS_LIST_STYLE=list |
| else |
| EXPAND_LIBS_LIST_STYLE=none |
| fi |
| fi |
| else |
| { echo "configure: error: couldn't compile a simple C file" 1>&2; echo "configure: error: couldn't compile a simple C file" 1>&5; exit 1; } |
| fi |
| rm -rf conftest* |
| fi |
| |
| echo "$ac_t""$EXPAND_LIBS_LIST_STYLE" 1>&6 |
| |
| LIBS_DESC_SUFFIX=desc |
| |
| |
| |
| if test "$GCC_USE_GNU_LD"; then |
| echo $ac_n "checking what kind of ordering can be done with the linker""... $ac_c" 1>&6 |
| echo "configure:13379: checking what kind of ordering can be done with the linker" >&5 |
| if eval "test \"`echo '$''{'EXPAND_LIBS_ORDER_STYLE'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| > conftest.order |
| _SAVE_LDFLAGS="$LDFLAGS" |
| LDFLAGS="${LDFLAGS} -Wl,--section-ordering-file,conftest.order" |
| cat > conftest.$ac_ext <<EOF |
| #line 13387 "configure" |
| #include "confdefs.h" |
| |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:13394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| EXPAND_LIBS_ORDER_STYLE=section-ordering-file |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| EXPAND_LIBS_ORDER_STYLE= |
| fi |
| rm -f conftest* |
| LDFLAGS="$_SAVE_LDFLAGS" |
| if test -z "$EXPAND_LIBS_ORDER_STYLE"; then |
| if { ac_try='${CC-cc} ${DSO_LDOPTS} ${LDFLAGS} -o ${DLL_PREFIX}conftest${DLL_SUFFIX} -Wl'; { (eval echo configure:13406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then |
| EXPAND_LIBS_ORDER_STYLE=linkerscript |
| else |
| EXPAND_LIBS_ORDER_STYLE=none |
| fi |
| rm -f ${DLL_PREFIX}conftest${DLL_SUFFIX} |
| fi |
| fi |
| |
| echo "$ac_t""$EXPAND_LIBS_ORDER_STYLE" 1>&6 |
| fi |
| |
| |
| |
| |
| # Build dependencies |
| |
| if test "$GNU_CC" -a "$GNU_CXX"; then |
| _DEPEND_CFLAGS='-MD -MP -MF $(MDDEPDIR)/$(@F).pp' |
| else |
| if test -z "$_WIN32_MSVC"; then |
| _USE_CPP_INCLUDE_FLAG= |
| _DEFINES_CFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT' |
| _DEFINES_CXXFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT' |
| else |
| echo '#include <stdio.h>' > dummy-hello.c |
| |
| _CL_PREFIX_REGEX="^\([^:]*:.*[ :] \)\(.*\\\stdio.h\)$" |
| CL_INCLUDES_PREFIX=`${CC} -showIncludes -c -Fonul dummy-hello.c 2>&1 | sed -ne 's/'"$_CL_PREFIX_REGEX"'/\1/p'` |
| _CL_STDIO_PATH=`${CC} -showIncludes -c -Fonul dummy-hello.c 2>&1 | sed -ne 's/'"$_CL_PREFIX_REGEX"'/\2/p'` |
| |
| if ! test -e "$_CL_STDIO_PATH"; then |
| { echo "configure: error: Unable to parse cl -showIncludes prefix. This compiler's locale has an unsupported formatting." 1>&2; echo "configure: error: Unable to parse cl -showIncludes prefix. This compiler's locale has an unsupported formatting." 1>&5; exit 1; } |
| fi |
| if test -z "$CL_INCLUDES_PREFIX"; then |
| { echo "configure: error: Cannot find cl -showIncludes prefix." 1>&2; echo "configure: error: Cannot find cl -showIncludes prefix." 1>&5; exit 1; } |
| fi |
| |
| rm -f dummy-hello.c |
| |
| NONASCII=$'\241\241' |
| |
| fi |
| fi |
| |
| if test -n "$GNU_CC" -a -z "$CLANG_CC"; then |
| if test "$GCC_MAJOR_VERSION" -eq "4" -a "$GCC_MINOR_VERSION" -lt "5" ; then |
| CFLAGS="$CFLAGS -fno-strict-aliasing" |
| CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" |
| fi |
| fi |
| |
| # Check whether --enable-readline or --disable-readline was given. |
| if test "${enable_readline+set}" = set; then |
| enableval="$enable_readline" |
| if test "$enableval" = "yes"; then |
| JS_WANT_READLINE=1 |
| elif test "$enableval" = "no"; then |
| JS_WANT_READLINE= |
| else |
| { echo "configure: error: Option, readline, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, readline, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| |
| JS_BUNDLED_EDITLINE= |
| EDITLINE_LIBS= |
| |
| case "$target" in |
| *-mingw*) |
| NO_EDITLINE=1 |
| ;; |
| *) |
| ;; |
| esac |
| |
| if test -z "$SKIP_LIBRARY_CHECKS" -a -z "$NO_EDITLINE"; then |
| if test -n "$JS_WANT_READLINE"; then |
| echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 |
| echo "configure:13485: checking for readline in -lreadline" >&5 |
| ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` |
| if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| ac_save_LIBS="$LIBS" |
| LIBS="-lreadline $LIBS" |
| cat > conftest.$ac_ext <<EOF |
| #line 13493 "configure" |
| #include "confdefs.h" |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char readline(); |
| |
| int main() { |
| readline() |
| ; return 0; } |
| EOF |
| if { (eval echo configure:13504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_lib_$ac_lib_var=no" |
| fi |
| rm -f conftest* |
| LIBS="$ac_save_LIBS" |
| |
| fi |
| if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| EDITLINE_LIBS="-lreadline" |
| else |
| echo "$ac_t""no" 1>&6 |
| { echo "configure: error: No system readline library found." 1>&2; echo "configure: error: No system readline library found." 1>&5; exit 1; } |
| fi |
| |
| else |
| JS_BUNDLED_EDITLINE=1 |
| fi |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' EDITLINE ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define EDITLINE 1 |
| EOF |
| |
| fi |
| |
| |
| |
| # Standalone module options (Not for building Mozilla) |
| |
| # Check whether --enable-ctypes or --disable-ctypes was given. |
| if test "${enable_ctypes+set}" = set; then |
| enableval="$enable_ctypes" |
| if test "$enableval" = "yes"; then |
| BUILD_CTYPES=1 |
| elif test "$enableval" = "no"; then |
| BUILD_CTYPES= |
| else |
| { echo "configure: error: Option, ctypes, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, ctypes, does not take an argument ($enableval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| JS_HAS_CTYPES=$BUILD_CTYPES |
| |
| |
| if test "$JS_HAS_CTYPES"; then |
| if test -n "$_MSC_VER" -a \( "$AS" != "ml.exe" -a "$AS" != "ml64.exe" \); then |
| { echo "configure: error: \"$AS\" is not a suitable assembler to build js-ctypes. If you are building with MS Visual Studio 8 Express, you may download the MASM 8.0 package, upgrade to Visual Studio 9 Express, or install the Vista SDK. Or do not use --enable-ctypes." 1>&2; echo "configure: error: \"$AS\" is not a suitable assembler to build js-ctypes. If you are building with MS Visual Studio 8 Express, you may download the MASM 8.0 package, upgrade to Visual Studio 9 Express, or install the Vista SDK. Or do not use --enable-ctypes." 1>&5; exit 1; } |
| fi |
| cat >> confdefs.pytmp <<\EOF |
| (''' JS_HAS_CTYPES ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define JS_HAS_CTYPES 1 |
| EOF |
| |
| fi |
| |
| |
| # Check whether --with-qemu-exe or --without-qemu-exe was given. |
| if test "${with_qemu_exe+set}" = set; then |
| withval="$with_qemu_exe" |
| QEMU_EXE=$withval |
| fi |
| |
| |
| # Check whether --with-cross-lib or --without-cross-lib was given. |
| if test "${with_cross_lib+set}" = set; then |
| withval="$with_cross_lib" |
| CROSS_LIB=$withval |
| else |
| CROSS_LIB=/usr/$target |
| fi |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| CFLAGS=`echo \ |
| $_WARNINGS_CFLAGS \ |
| $CFLAGS` |
| |
| CXXFLAGS=`echo \ |
| $_WARNINGS_CXXFLAGS \ |
| $CXXFLAGS` |
| |
| COMPILE_CFLAGS=`echo \ |
| $_DEFINES_CFLAGS \ |
| $COMPILE_CFLAGS` |
| |
| COMPILE_CXXFLAGS=`echo \ |
| $_DEFINES_CXXFLAGS \ |
| $COMPILE_CXXFLAGS` |
| |
| HOST_CFLAGS=`echo \ |
| $HOST_CFLAGS` |
| |
| HOST_CXXFLAGS=`echo \ |
| $HOST_CXXFLAGS` |
| |
| |
| |
| |
| if test -n "$MOZ_NUWA_PROCESS"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' MOZ_NUWA_PROCESS ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define MOZ_NUWA_PROCESS 1 |
| EOF |
| |
| fi |
| |
| OS_CFLAGS="$CFLAGS" |
| OS_CXXFLAGS="$CXXFLAGS" |
| OS_CPPFLAGS="$CPPFLAGS" |
| OS_COMPILE_CFLAGS="$COMPILE_CFLAGS" |
| OS_COMPILE_CXXFLAGS="$COMPILE_CXXFLAGS" |
| OS_LDFLAGS="$LDFLAGS" |
| OS_LIBS="$LIBS" |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| cat >> confdefs.pytmp <<EOF |
| (''' MOZ_DLL_SUFFIX ''', r''' "$DLL_SUFFIX" ''') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define MOZ_DLL_SUFFIX "$DLL_SUFFIX" |
| EOF |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| for ac_func in posix_fadvise posix_fallocate |
| do |
| echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
| echo "configure:13722: checking for $ac_func" >&5 |
| if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 13727 "configure" |
| #define $ac_func innocuous_$ac_func |
| #include "confdefs.h" |
| #undef $ac_func |
| /* System header to define __stub macros and hopefully few prototypes, |
| which can conflict with char $ac_func(); below. */ |
| #define $ac_func innocuous_$ac_func |
| #include <assert.h> |
| #undef $ac_func |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char $ac_func(); |
| |
| int main() { |
| |
| /* The GNU C library defines this for functions which it implements |
| to always fail with ENOSYS. Some functions are actually named |
| something starting with __ and the normal name is an alias. */ |
| #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| choke me |
| #else |
| $ac_func(); |
| #endif |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:13754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_func_$ac_func=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_func_$ac_func=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_func ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_func 1 |
| EOF |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| done |
| |
| |
| |
| if test "$MOZ_DEBUG"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' MOZ_REFLOW_PERF ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define MOZ_REFLOW_PERF 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' MOZ_REFLOW_PERF_DSP ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define MOZ_REFLOW_PERF_DSP 1 |
| EOF |
| |
| fi |
| |
| |
| if test -z "$GNU_CC" -a "$OS_ARCH" = "WINNT"; then |
| PREPROCESS_OPTION="-P -Fi" |
| else |
| PREPROCESS_OPTION="-E -o " |
| fi |
| |
| |
| |
| |
| _INTL_API=yes |
| |
| |
| |
| ICU_LIB_NAMES= |
| MOZ_SYSTEM_ICU= |
| # Check whether --with-system-icu or --without-system-icu was given. |
| if test "${with_system_icu+set}" = set; then |
| withval="$with_system_icu" |
| if test "$withval" = "yes"; then |
| MOZ_SYSTEM_ICU=1 |
| elif test "$withval" = "no"; then |
| : |
| else |
| { echo "configure: error: Option, system-icu, does not take an argument ($withval)." 1>&2; echo "configure: error: Option, system-icu, does not take an argument ($withval)." 1>&5; exit 1; } |
| fi |
| fi |
| |
| |
| if test -n "$MOZ_SYSTEM_ICU"; then |
| succeeded=no |
| |
| if test -z "$PKG_CONFIG"; then |
| # Extract the first word of "pkg-config", so it can be a program name with args. |
| set dummy pkg-config; ac_word=$2 |
| echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| echo "configure:13836: checking for $ac_word" >&5 |
| if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| case "$PKG_CONFIG" in |
| /*) |
| ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. |
| ;; |
| ?:/*) |
| ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path. |
| ;; |
| *) |
| IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| ac_dummy="$PATH" |
| for ac_dir in $ac_dummy; do |
| test -z "$ac_dir" && ac_dir=. |
| if test -f $ac_dir/$ac_word; then |
| ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" |
| break |
| fi |
| done |
| IFS="$ac_save_ifs" |
| test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" |
| ;; |
| esac |
| fi |
| PKG_CONFIG="$ac_cv_path_PKG_CONFIG" |
| if test -n "$PKG_CONFIG"; then |
| echo "$ac_t""$PKG_CONFIG" 1>&6 |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| |
| fi |
| |
| if test "$PKG_CONFIG" = "no" ; then |
| echo "*** The pkg-config script could not be found. Make sure it is" |
| echo "*** in your path, or set the PKG_CONFIG environment variable" |
| echo "*** to the full path to pkg-config." |
| echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." |
| else |
| PKG_CONFIG_MIN_VERSION=0.9.0 |
| if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
| echo $ac_n "checking for icu-i18n >= 50.1""... $ac_c" 1>&6 |
| echo "configure:13880: checking for icu-i18n >= 50.1" >&5 |
| |
| if $PKG_CONFIG --exists "icu-i18n >= 50.1" ; then |
| echo "$ac_t""yes" 1>&6 |
| succeeded=yes |
| |
| echo $ac_n "checking MOZ_ICU_CFLAGS""... $ac_c" 1>&6 |
| echo "configure:13887: checking MOZ_ICU_CFLAGS" >&5 |
| MOZ_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-i18n >= 50.1"` |
| echo "$ac_t""$MOZ_ICU_CFLAGS" 1>&6 |
| |
| echo $ac_n "checking MOZ_ICU_LIBS""... $ac_c" 1>&6 |
| echo "configure:13892: checking MOZ_ICU_LIBS" >&5 |
| ## Remove evil flags like -Wl,--export-dynamic |
| MOZ_ICU_LIBS="`$PKG_CONFIG --libs \"icu-i18n >= 50.1\" |sed s/-Wl,--export-dynamic//g`" |
| echo "$ac_t""$MOZ_ICU_LIBS" 1>&6 |
| else |
| MOZ_ICU_CFLAGS="" |
| MOZ_ICU_LIBS="" |
| ## If we have a custom action on failure, don't print errors, but |
| ## do set a variable so people can do so. |
| MOZ_ICU_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "icu-i18n >= 50.1"` |
| echo $MOZ_ICU_PKG_ERRORS |
| fi |
| |
| |
| |
| else |
| echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." |
| echo "*** See http://www.freedesktop.org/software/pkgconfig" |
| fi |
| fi |
| |
| if test $succeeded = yes; then |
| : |
| else |
| if test "$COMPILE_ENVIRONMENT"; then |
| { echo "configure: error: Library requirements (icu-i18n >= 50.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (icu-i18n >= 50.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; } |
| fi |
| fi |
| |
| else |
| MOZ_ICU_INCLUDES="/intl/icu/source/common /intl/icu/source/i18n" |
| fi |
| |
| |
| |
| |
| # Check whether --with-intl-api or --without-intl-api was given. |
| if test "${with_intl_api+set}" = set; then |
| withval="$with_intl_api" |
| _INTL_API=$withval |
| fi |
| |
| |
| ENABLE_INTL_API= |
| EXPOSE_INTL_API= |
| case "$_INTL_API" in |
| no) |
| ;; |
| build) |
| ENABLE_INTL_API=1 |
| ;; |
| yes) |
| ENABLE_INTL_API=1 |
| EXPOSE_INTL_API=1 |
| ;; |
| *) |
| { echo "configure: error: Invalid value passed to --with-intl-api: $_INTL_API" 1>&2; echo "configure: error: Invalid value passed to --with-intl-api: $_INTL_API" 1>&5; exit 1; } |
| ;; |
| esac |
| |
| if test -n "$ENABLE_INTL_API"; then |
| USE_ICU=1 |
| fi |
| |
| if test -n "$EXPOSE_INTL_API"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' EXPOSE_INTL_API ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define EXPOSE_INTL_API 1 |
| EOF |
| |
| fi |
| |
| if test -n "$ENABLE_INTL_API"; then |
| cat >> confdefs.pytmp <<\EOF |
| (''' ENABLE_INTL_API ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define ENABLE_INTL_API 1 |
| EOF |
| |
| fi |
| |
| if test -n "$USE_ICU"; then |
| icudir="$_topsrcdir/intl/icu/source" |
| if test ! -d "$icudir"; then |
| icudir="$_topsrcdir/../../intl/icu/source" |
| if test ! -d "$icudir"; then |
| { echo "configure: error: Cannot find the ICU directory" 1>&2; echo "configure: error: Cannot find the ICU directory" 1>&5; exit 1; } |
| fi |
| fi |
| |
| version=`sed -n 's/^[:space:]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"` |
| if test x"$version" = x; then |
| { echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&2; echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&5; exit 1; } |
| fi |
| MOZ_ICU_VERSION="$version" |
| |
| # TODO: the l is actually endian-dependent |
| # We could make this set as 'l' or 'b' for little or big, respectively, |
| # but we'd need to check in a big-endian version of the file. |
| ICU_DATA_FILE="icudt${version}l.dat" |
| |
| if test -z "$JS_STANDALONE" -a -z "$MOZ_SYSTEM_ICU"; then |
| MOZ_ICU_DATA_ARCHIVE=1 |
| else |
| MOZ_ICU_DATA_ARCHIVE= |
| fi |
| fi |
| |
| |
| |
| |
| |
| |
| |
| if test -n "$USE_ICU" -a -z "$MOZ_SYSTEM_ICU"; then |
| if test -z "$YASM" -a -z "$GNU_AS" -a "$COMPILE_ENVIRONMENT"; then |
| { echo "configure: error: Building ICU requires either yasm or a GNU assembler. If you do not have either of those available for this platform you must use --without-intl-api" 1>&2; echo "configure: error: Building ICU requires either yasm or a GNU assembler. If you do not have either of those available for this platform you must use --without-intl-api" 1>&5; exit 1; } |
| fi |
| cat >> confdefs.pytmp <<\EOF |
| (''' U_STATIC_IMPLEMENTATION ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define U_STATIC_IMPLEMENTATION 1 |
| EOF |
| |
| cat >> confdefs.pytmp <<\EOF |
| (''' U_USING_ICU_NAMESPACE ''', r''' 0 ''') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define U_USING_ICU_NAMESPACE 0 |
| EOF |
| |
| fi |
| |
| |
| |
| |
| |
| MALLOC_HEADERS="malloc.h malloc_np.h malloc/malloc.h sys/malloc.h" |
| MALLOC_H= |
| |
| for file in $MALLOC_HEADERS; do |
| ac_safe=`echo "$file" | sed 'y%./+-%__p_%'` |
| echo $ac_n "checking for $file""... $ac_c" 1>&6 |
| echo "configure:14039: checking for $file" >&5 |
| if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 14044 "configure" |
| #include "confdefs.h" |
| |
| #include <$file> |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:14052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| MALLOC_H=$file |
| else |
| echo "$ac_t""no" 1>&6 |
| |
| fi |
| |
| if test "$MALLOC_H" != ""; then |
| cat >> confdefs.pytmp <<EOF |
| (''' MALLOC_H ''', r''' <$MALLOC_H> ''') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define MALLOC_H <$MALLOC_H> |
| EOF |
| |
| break |
| fi |
| done |
| |
| for ac_hdr in alloca.h |
| do |
| ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
| echo "configure:14088: checking for $ac_hdr" >&5 |
| if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 14093 "configure" |
| #include "confdefs.h" |
| |
| #include <$ac_hdr> |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:14101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_hdr ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_hdr 1 |
| EOF |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| |
| fi |
| |
| done |
| |
| |
| for ac_func in strndup posix_memalign memalign |
| do |
| echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
| echo "configure:14134: checking for $ac_func" >&5 |
| if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 14139 "configure" |
| #define $ac_func innocuous_$ac_func |
| #include "confdefs.h" |
| #undef $ac_func |
| /* System header to define __stub macros and hopefully few prototypes, |
| which can conflict with char $ac_func(); below. */ |
| #define $ac_func innocuous_$ac_func |
| #include <assert.h> |
| #undef $ac_func |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char $ac_func(); |
| |
| int main() { |
| |
| /* The GNU C library defines this for functions which it implements |
| to always fail with ENOSYS. Some functions are actually named |
| something starting with __ and the normal name is an alias. */ |
| #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| choke me |
| #else |
| $ac_func(); |
| #endif |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:14166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_func_$ac_func=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_func_$ac_func=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_func ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_func 1 |
| EOF |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| done |
| |
| |
| for ac_func in malloc_usable_size |
| do |
| echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
| echo "configure:14197: checking for $ac_func" >&5 |
| if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 14202 "configure" |
| #define $ac_func innocuous_$ac_func |
| #include "confdefs.h" |
| #undef $ac_func |
| /* System header to define __stub macros and hopefully few prototypes, |
| which can conflict with char $ac_func(); below. */ |
| #define $ac_func innocuous_$ac_func |
| #include <assert.h> |
| #undef $ac_func |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char $ac_func(); |
| |
| int main() { |
| |
| /* The GNU C library defines this for functions which it implements |
| to always fail with ENOSYS. Some functions are actually named |
| something starting with __ and the normal name is an alias. */ |
| #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| choke me |
| #else |
| $ac_func(); |
| #endif |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:14229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_func_$ac_func=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_func_$ac_func=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_func ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_func 1 |
| EOF |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| done |
| |
| MALLOC_USABLE_SIZE_CONST_PTR=const |
| for ac_hdr in malloc.h |
| do |
| ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
| echo "configure:14261: checking for $ac_hdr" >&5 |
| if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 14266 "configure" |
| #include "confdefs.h" |
| |
| #include <$ac_hdr> |
| int main() { |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:14274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_header_$ac_safe=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_hdr ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_hdr 1 |
| EOF |
| |
| echo $ac_n "checking whether malloc_usable_size definition can use const argument""... $ac_c" 1>&6 |
| echo "configure:14297: checking whether malloc_usable_size definition can use const argument" >&5 |
| cat > conftest.$ac_ext <<EOF |
| #line 14299 "configure" |
| #include "confdefs.h" |
| #include <malloc.h> |
| #include <stddef.h> |
| size_t malloc_usable_size(const void *ptr); |
| int main() { |
| return malloc_usable_size(0); |
| ; return 0; } |
| EOF |
| if { (eval echo configure:14308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| rm -rf conftest* |
| echo "$ac_t""yes" 1>&6 |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| echo "$ac_t""no" 1>&6 |
| MALLOC_USABLE_SIZE_CONST_PTR= |
| fi |
| rm -f conftest* |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| |
| fi |
| |
| done |
| |
| cat >> confdefs.pytmp <<EOF |
| (''' MALLOC_USABLE_SIZE_CONST_PTR ''', r''' $MALLOC_USABLE_SIZE_CONST_PTR ''') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define MALLOC_USABLE_SIZE_CONST_PTR $MALLOC_USABLE_SIZE_CONST_PTR |
| EOF |
| |
| |
| |
| echo $ac_n "checking for valloc in malloc.h""... $ac_c" 1>&6 |
| echo "configure:14337: checking for valloc in malloc.h" >&5 |
| cat > conftest.$ac_ext <<EOF |
| #line 14339 "configure" |
| #include "confdefs.h" |
| #include <malloc.h> |
| EOF |
| if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| egrep "valloc" >/dev/null 2>&1; then |
| rm -rf conftest* |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_VALLOC ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_VALLOC 1 |
| EOF |
| |
| echo "$ac_t""yes" 1>&6 |
| else |
| rm -rf conftest* |
| echo "$ac_t""no" 1>&6 |
| fi |
| rm -f conftest* |
| |
| |
| echo $ac_n "checking for valloc in unistd.h""... $ac_c" 1>&6 |
| echo "configure:14362: checking for valloc in unistd.h" >&5 |
| cat > conftest.$ac_ext <<EOF |
| #line 14364 "configure" |
| #include "confdefs.h" |
| #include <unistd.h> |
| EOF |
| if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| egrep "valloc" >/dev/null 2>&1; then |
| rm -rf conftest* |
| cat >> confdefs.pytmp <<\EOF |
| (''' HAVE_VALLOC ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define HAVE_VALLOC 1 |
| EOF |
| |
| echo "$ac_t""yes" 1>&6 |
| else |
| rm -rf conftest* |
| echo "$ac_t""no" 1>&6 |
| fi |
| rm -f conftest* |
| |
| |
| |
| |
| |
| for ac_func in setlocale localeconv |
| do |
| echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
| echo "configure:14392: checking for $ac_func" >&5 |
| if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| echo $ac_n "(cached) $ac_c" 1>&6 |
| else |
| cat > conftest.$ac_ext <<EOF |
| #line 14397 "configure" |
| #define $ac_func innocuous_$ac_func |
| #include "confdefs.h" |
| #undef $ac_func |
| /* System header to define __stub macros and hopefully few prototypes, |
| which can conflict with char $ac_func(); below. */ |
| #define $ac_func innocuous_$ac_func |
| #include <assert.h> |
| #undef $ac_func |
| /* Override any gcc2 internal prototype to avoid an error. */ |
| /* We use char because int might match the return type of a gcc2 |
| builtin and then its argument prototype would still apply. */ |
| char $ac_func(); |
| |
| int main() { |
| |
| /* The GNU C library defines this for functions which it implements |
| to always fail with ENOSYS. Some functions are actually named |
| something starting with __ and the normal name is an alias. */ |
| #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| choke me |
| #else |
| $ac_func(); |
| #endif |
| |
| ; return 0; } |
| EOF |
| if { (eval echo configure:14424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| rm -rf conftest* |
| eval "ac_cv_func_$ac_func=yes" |
| else |
| echo "configure: failed program was:" >&5 |
| cat conftest.$ac_ext >&5 |
| rm -rf conftest* |
| eval "ac_cv_func_$ac_func=no" |
| fi |
| rm -f conftest* |
| fi |
| |
| if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| echo "$ac_t""yes" 1>&6 |
| ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| cat >> confdefs.pytmp <<EOF |
| (''' $ac_tr_func ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<EOF |
| #define $ac_tr_func 1 |
| EOF |
| |
| else |
| echo "$ac_t""no" 1>&6 |
| fi |
| done |
| |
| |
| |
| |
| |
| |
| if test -n "$JS_STANDALONE"; then |
| MOZ_APP_NAME="mozjs" |
| MOZ_APP_VERSION="$MOZILLA_SYMBOLVERSION" |
| JS_LIBRARY_NAME="mozjs-$MOZILLA_SYMBOLVERSION" |
| else |
| JS_LIBRARY_NAME="mozjs" |
| fi |
| JS_CONFIG_LIBS="$NSPR_LIBS $LIBS" |
| if test -n "$GNU_CC"; then |
| JS_CONFIG_MOZ_JS_LIBS='-L${libdir} -l${JS_LIBRARY_NAME}' |
| else |
| JS_CONFIG_MOZ_JS_LIBS='${libdir}/${JS_LIBRARY_NAME}.lib' |
| fi |
| |
| |
| |
| |
| |
| if test "$MOZ_BUILD_APP" != js -o -n "$JS_STANDALONE"; then |
| |
| if test "$BUILD_CTYPES" -a -z "$MOZ_SYSTEM_FFI"; then |
| # Run the libffi 'configure' script. |
| ac_configure_args="--disable-shared --enable-static --disable-raw-api" |
| if test "$MOZ_DEBUG"; then |
| ac_configure_args="$ac_configure_args --enable-debug" |
| fi |
| if test "$DSO_PIC_CFLAGS"; then |
| ac_configure_args="$ac_configure_args --with-pic" |
| fi |
| for var in AS CC CXX CPP LD AR RANLIB STRIP; do |
| ac_configure_args="$ac_configure_args $var='`eval echo \\${${var}}`'" |
| done |
| if test "$CROSS_COMPILE"; then |
| export CPPFLAGS CFLAGS LDFLAGS |
| fi |
| ac_configure_args="$ac_configure_args --build=$build --host=$target" |
| if test "$_MSC_VER"; then |
| # Use a wrapper script for cl and ml that looks more like gcc. |
| # autotools can't quite handle an MSVC build environment yet. |
| LDFLAGS= |
| CFLAGS= |
| ac_configure_args="$ac_configure_args LD=link CPP=\"$CC -nologo -EP\" \ |
| CXXCPP=\"$CXX -nologo -EP\" SHELL=sh.exe" |
| flags= |
| if test -z "$MOZ_NO_DEBUG_RTL" -a -n "$MOZ_DEBUG"; then |
| flags=" -DUSE_DEBUG_RTL" |
| fi |
| if test -n "$CLANG_CL"; then |
| flags="$flags -clang-cl" |
| fi |
| case "${target_cpu}" in |
| x86_64) |
| # Need target since MSYS tools into mozilla-build may be 32bit |
| ac_configure_args="$ac_configure_args \ |
| CC=\"$_topsrcdir/js/src/ctypes/libffi/msvcc.sh -m64$flags\" \ |
| CXX=\"$_topsrcdir/js/src/ctypes/libffi/msvcc.sh -m64$flags\"" |
| ;; |
| *) |
| ac_configure_args="$ac_configure_args \ |
| CC=\"$_topsrcdir/js/src/ctypes/libffi/msvcc.sh$flags\" \ |
| CXX=\"$_topsrcdir/js/src/ctypes/libffi/msvcc.sh$flags\"" |
| ;; |
| esac |
| fi |
| |
| # Use a separate cache file for libffi, since it does things differently |
| # from our configure. |
| old_config_files=$CONFIG_FILES |
| unset CONFIG_FILES |
| for moz_config_dir in js/src/ctypes/libffi; do |
| _CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} |
| case "$moz_config_dir" in |
| *:*) |
| objdir=$(echo $moz_config_dir | awk -F: '{print $2}') |
| ;; |
| *) |
| objdir=$moz_config_dir |
| ;; |
| esac |
| echo $objdir >> subconfigures |
| |
| dumpenv="true | " |
| case "$host" in |
| *-mingw*) |
| _CONFIG_SHELL=$(cd $(dirname $_CONFIG_SHELL); pwd -W)/$(basename $_CONFIG_SHELL) |
| if test ! -e "$_CONFIG_SHELL" -a -e "${_CONFIG_SHELL}.exe"; then |
| _CONFIG_SHELL="${_CONFIG_SHELL}.exe" |
| fi |
| dumpenv="$PERL $_topsrcdir/build/win32/dumpenv4python.pl $ac_configure_args | " |
| ;; |
| esac |
| |
| eval $dumpenv $PYTHON $_topsrcdir/build/subconfigure.py --prepare "$srcdir" "$moz_config_dir" "$_CONFIG_SHELL" $ac_configure_args |
| |
| done |
| |
| ac_configure_args="$_SUBDIR_CONFIG_ARGS" |
| CONFIG_FILES=$old_config_files |
| fi |
| |
| fi |
| |
| |
| |
| if test "$MOZ_BUILD_APP" != js -o -n "$JS_STANDALONE"; then |
| |
| # Run jemalloc configure script |
| |
| if test -z "$MOZ_SYSTEM_JEMALLOC" -a "$MOZ_MEMORY" && test -n "$MOZ_JEMALLOC4" -o -n "$MOZ_REPLACE_MALLOC"; then |
| ac_configure_args="--build=$build --host=$target --enable-stats --with-jemalloc-prefix=je_ --disable-valgrind" |
| # We're using memalign for _aligned_malloc in memory/build/mozmemory_wrap.c |
| # on Windows, so just export memalign on all platforms. |
| ac_configure_args="$ac_configure_args ac_cv_func_memalign=yes" |
| if test -n "$MOZ_REPLACE_MALLOC"; then |
| # When using replace_malloc, we always want valloc exported from jemalloc. |
| ac_configure_args="$ac_configure_args ac_cv_func_valloc=yes" |
| if test "${OS_ARCH}" = Darwin; then |
| # We also need to enable pointer validation on Mac because jemalloc's |
| # zone allocator is not used. |
| ac_configure_args="$ac_configure_args --enable-ivsalloc" |
| fi |
| fi |
| if test -n "$MOZ_JEMALLOC4"; then |
| case "${OS_ARCH}" in |
| WINNT|Darwin) |
| # We want jemalloc functions to be kept hidden on both Mac and Windows |
| # See memory/build/mozmemory_wrap.h for details. |
| ac_configure_args="$ac_configure_args --without-export" |
| ;; |
| esac |
| if test "${OS_ARCH}" = WINNT; then |
| # Lazy lock initialization doesn't play well with lazy linking of |
| # mozglue.dll on Windows XP (leads to startup crash), so disable it. |
| ac_configure_args="$ac_configure_args --disable-lazy-lock" |
| |
| # 64-bit Windows builds require a minimum 16-byte alignment. |
| if test -n "$HAVE_64BIT_BUILD"; then |
| ac_configure_args="$ac_configure_args --with-lg-tiny-min=4" |
| fi |
| fi |
| elif test "${OS_ARCH}" = Darwin; then |
| # When building as a replace-malloc lib, disabling the zone allocator |
| # forces to use pthread_atfork. |
| ac_configure_args="$ac_configure_args --disable-zone-allocator" |
| fi |
| _MANGLE="malloc posix_memalign aligned_alloc calloc realloc free memalign valloc malloc_usable_size" |
| JEMALLOC_WRAPPER= |
| if test -z "$MOZ_REPLACE_MALLOC"; then |
| case "$OS_ARCH" in |
| Linux|DragonFly|FreeBSD|NetBSD|OpenBSD) |
| MANGLE=$_MANGLE |
| ;; |
| esac |
| elif test -z "$MOZ_JEMALLOC4"; then |
| MANGLE=$_MANGLE |
| JEMALLOC_WRAPPER=replace_ |
| fi |
| if test -n "$MANGLE"; then |
| MANGLED= |
| for mangle in ${MANGLE}; do |
| if test -n "$MANGLED"; then |
| MANGLED="$mangle:$JEMALLOC_WRAPPER$mangle,$MANGLED" |
| else |
| MANGLED="$mangle:$JEMALLOC_WRAPPER$mangle" |
| fi |
| done |
| ac_configure_args="$ac_configure_args --with-mangling=$MANGLED" |
| fi |
| unset CONFIG_FILES |
| if test -z "$MOZ_TLS"; then |
| ac_configure_args="$ac_configure_args --disable-tls" |
| fi |
| EXTRA_CFLAGS="$CFLAGS" |
| for var in AS CC CXX CPP LD AR RANLIB STRIP CPPFLAGS EXTRA_CFLAGS LDFLAGS; do |
| ac_configure_args="$ac_configure_args $var='`eval echo \\${${var}}`'" |
| done |
| # Force disable DSS support in jemalloc. |
| ac_configure_args="$ac_configure_args ac_cv_func_sbrk=false" |
| |
| # Make Linux builds munmap freed chunks instead of recycling them. |
| ac_configure_args="$ac_configure_args --enable-munmap" |
| |
| # Disable cache oblivious behavior that appears to have a performance |
| # impact on Firefox. |
| ac_configure_args="$ac_configure_args --disable-cache-oblivious" |
| |
| if ! test -e memory/jemalloc; then |
| mkdir -p memory/jemalloc |
| fi |
| |
| # jemalloc's configure runs git to determine the version. But when building |
| # from a gecko git clone, the git commands it uses is going to pick gecko's |
| # information, not jemalloc's, which is useless. So pretend we don't have git |
| # at all. That will make jemalloc's configure pick the in-tree VERSION file. |
| (PATH="$srcdir/memory/jemalloc/helper:$PATH"; |
| for moz_config_dir in memory/jemalloc/src; do |
| _CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} |
| case "$moz_config_dir" in |
| *:*) |
| objdir=$(echo $moz_config_dir | awk -F: '{print $2}') |
| ;; |
| *) |
| objdir=$moz_config_dir |
| ;; |
| esac |
| echo $objdir >> subconfigures |
| |
| dumpenv="true | " |
| case "$host" in |
| *-mingw*) |
| _CONFIG_SHELL=$(cd $(dirname $_CONFIG_SHELL); pwd -W)/$(basename $_CONFIG_SHELL) |
| if test ! -e "$_CONFIG_SHELL" -a -e "${_CONFIG_SHELL}.exe"; then |
| _CONFIG_SHELL="${_CONFIG_SHELL}.exe" |
| fi |
| dumpenv="$PERL $_topsrcdir/build/win32/dumpenv4python.pl $ac_configure_args | " |
| ;; |
| esac |
| |
| eval $dumpenv $PYTHON $_topsrcdir/build/subconfigure.py --prepare "$srcdir" "$moz_config_dir" "$_CONFIG_SHELL" $ac_configure_args |
| |
| done |
| |
| ) || exit 1 |
| ac_configure_args="$_SUBDIR_CONFIG_ARGS" |
| fi |
| |
| fi |
| |
| |
| |
| # Avoid using obsolete NSPR features |
| cat >> confdefs.pytmp <<\EOF |
| (''' NO_NSPR_10_SUPPORT ''', ' 1 ') |
| EOF |
| cat >> confdefs.h <<\EOF |
| #define NO_NSPR_10_SUPPORT 1 |
| EOF |
| |
| |
| WIN_TOP_SRC= |
| case "$host_os" in |
| mingw*) |
| WIN_TOP_SRC=`cd $srcdir; pwd -W` |
| ;; |
| esac |
| |
| |
| top_srcdir=$srcdir |
| |
| |
| trap '' 1 2 15 |
| cat > confcache <<\EOF |
| # This file is a shell script that caches the results of configure |
| # tests run on this system so they can be shared between configure |
| # scripts and configure runs. It is not useful on other systems. |
| # If it contains results you don't want to keep, you may remove or edit it. |
| # |
| # By default, configure uses ./config.cache as the cache file, |
| # creating it if it does not exist already. You can give configure |
| # the --cache-file=FILE option to use a different cache file; that is |
| # what configure does when it calls configure scripts in |
| # subdirectories, so they share the cache. |
| # Giving --cache-file=/dev/null disables caching, for debugging configure. |
| # config.status only pays attention to the cache file if you give it the |
| # --recheck option to rerun configure. |
| # |
| EOF |
| # The following way of writing the cache mishandles newlines in values, |
| # but we know of no workaround that is simple, portable, and efficient. |
| # So, don't put newlines in cache variables' values. |
| # Ultrix sh set writes to stderr and can't be redirected directly, |
| # and sets the high bit in the cache file unless we assign to the vars. |
| (set) 2>&1 | |
| case `(ac_space=' '; set | grep ac_space) 2>&1` in |
| *ac_space=\ *) |
| # `set' does not quote correctly, so add quotes (double-quote substitution |
| # turns \\\\ into \\, and sed turns \\ into \). |
| sed -n \ |
| -e "s/'/'\\\\''/g" \ |
| -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
| ;; |
| *) |
| # `set' quotes correctly as required by POSIX, so do not add quotes. |
| sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
| ;; |
| esac >> confcache |
| if cmp -s $cache_file confcache; then |
| : |
| else |
| if test -w $cache_file; then |
| echo "updating cache $cache_file" |
| cat confcache > $cache_file |
| else |
| echo "not updating unwritable cache $cache_file" |
| fi |
| fi |
| rm -f confcache |
| |
| |
| trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
| : ${CONFIG_STATUS=./config.data} |
| |
| echo creating $CONFIG_STATUS |
| |
| cat > $CONFIG_STATUS <<EOF |
| def unique_list(l): |
| result = [] |
| for i in l: |
| if l not in result: |
| result.append(i) |
| return result |
| |
| defines = [ |
| EOF |
| |
| sed 's/$/,/' confdefs.pytmp >> $CONFIG_STATUS |
| rm confdefs.pytmp confdefs.h |
| |
| cat >> $CONFIG_STATUS <<\EOF |
| ] |
| |
| substs = [ |
| EOF |
| |
| sed 's/$/,/' >> $CONFIG_STATUS <<EOF |
| (''' SHELL ''', r''' $SHELL ''') |
| (''' exec_prefix ''', r''' $exec_prefix ''') |
| (''' prefix ''', r''' $prefix ''') |
| (''' program_transform_name ''', r''' $program_transform_name ''') |
| (''' bindir ''', r''' $bindir ''') |
| (''' sbindir ''', r''' $sbindir ''') |
| (''' libexecdir ''', r''' $libexecdir ''') |
| (''' datadir ''', r''' $datadir ''') |
| (''' sysconfdir ''', r''' $sysconfdir ''') |
| (''' sharedstatedir ''', r''' $sharedstatedir ''') |
| (''' localstatedir ''', r''' $localstatedir ''') |
| (''' libdir ''', r''' $libdir ''') |
| (''' includedir ''', r''' $includedir ''') |
| (''' oldincludedir ''', r''' $oldincludedir ''') |
| (''' infodir ''', r''' $infodir ''') |
| (''' mandir ''', r''' $mandir ''') |
| (''' host ''', r''' $host ''') |
| (''' host_alias ''', r''' $host_alias ''') |
| (''' host_cpu ''', r''' $host_cpu ''') |
| (''' host_vendor ''', r''' $host_vendor ''') |
| (''' host_os ''', r''' $host_os ''') |
| (''' target ''', r''' $target ''') |
| (''' target_alias ''', r''' $target_alias ''') |
| (''' target_cpu ''', r''' $target_cpu ''') |
| (''' target_vendor ''', r''' $target_vendor ''') |
| (''' target_os ''', r''' $target_os ''') |
| (''' build ''', r''' $build ''') |
| (''' build_alias ''', r''' $build_alias ''') |
| (''' build_cpu ''', r''' $build_cpu ''') |
| (''' build_vendor ''', r''' $build_vendor ''') |
| (''' build_os ''', r''' $build_os ''') |
| (''' CC ''', r''' $CC ''') |
| (''' CXX ''', r''' $CXX ''') |
| (''' autoconfmk ''', r''' $autoconfmk ''') |
| (''' ANDROID_PLATFORM ''', r''' $ANDROID_PLATFORM ''') |
| (''' MOZ_IOS ''', r''' $MOZ_IOS ''') |
| (''' HOST_CC ''', r''' $HOST_CC ''') |
| (''' HOST_CXX ''', r''' $HOST_CXX ''') |
| (''' HOST_RANLIB ''', r''' $HOST_RANLIB ''') |
| (''' HOST_AR ''', r''' $HOST_AR ''') |
| (''' RANLIB ''', r''' $RANLIB ''') |
| (''' AR ''', r''' $AR ''') |
| (''' AS ''', r''' $AS ''') |
| (''' LD ''', r''' $LD ''') |
| (''' STRIP ''', r''' $STRIP ''') |
| (''' WINDRES ''', r''' $WINDRES ''') |
| (''' OTOOL ''', r''' $OTOOL ''') |
| (''' OBJCOPY ''', r''' $OBJCOPY ''') |
| (''' CLANG_CXX ''', r''' $CLANG_CXX ''') |
| (''' CLANG_CL ''', r''' $CLANG_CL ''') |
| (''' CPP ''', r''' $CPP ''') |
| (''' CXXCPP ''', r''' $CXXCPP ''') |
| (''' RUSTC ''', r''' $RUSTC ''') |
| (''' MOZ_RUST ''', r''' $MOZ_RUST ''') |
| (''' MSVC_C_RUNTIME_DLL ''', r''' $MSVC_C_RUNTIME_DLL ''') |
| (''' MSVC_CXX_RUNTIME_DLL ''', r''' $MSVC_CXX_RUNTIME_DLL ''') |
| (''' SBCONF ''', r''' $SBCONF ''') |
| (''' QEMU_CANT_RUN_JS_SHELL ''', r''' $QEMU_CANT_RUN_JS_SHELL ''') |
| (''' _MSC_VER ''', r''' $_MSC_VER ''') |
| (''' GNU_AS ''', r''' $GNU_AS ''') |
| (''' GNU_LD ''', r''' $GNU_LD ''') |
| (''' GNU_CC ''', r''' $GNU_CC ''') |
| (''' GNU_CXX ''', r''' $GNU_CXX ''') |
| (''' NSINSTALL_BIN ''', r''' $NSINSTALL_BIN ''') |
| (''' UNIVERSAL_BINARY ''', r''' $UNIVERSAL_BINARY ''') |
| (''' MACOSX_DEPLOYMENT_TARGET ''', r''' $MACOSX_DEPLOYMENT_TARGET ''') |
| (''' MACOS_SDK_DIR ''', r''' $MACOS_SDK_DIR ''') |
| (''' GMAKE ''', r''' $GMAKE ''') |
| (''' X_CFLAGS ''', r''' $X_CFLAGS ''') |
| (''' X_PRE_LIBS ''', r''' $X_PRE_LIBS ''') |
| (''' X_LIBS ''', r''' $X_LIBS ''') |
| (''' X_EXTRA_LIBS ''', r''' $X_EXTRA_LIBS ''') |
| (''' MOZILLA_SYMBOLVERSION ''', r''' $MOZILLA_SYMBOLVERSION ''') |
| (''' JS_SHELL_NAME ''', r''' $JS_SHELL_NAME ''') |
| (''' JS_CONFIG_NAME ''', r''' $JS_CONFIG_NAME ''') |
| (''' MOZJS_MAJOR_VERSION ''', r''' $MOZJS_MAJOR_VERSION ''') |
| (''' MOZJS_MINOR_VERSION ''', r''' $MOZJS_MINOR_VERSION ''') |
| (''' MOZJS_PATCH_VERSION ''', r''' $MOZJS_PATCH_VERSION ''') |
| (''' MOZJS_ALPHA ''', r''' $MOZJS_ALPHA ''') |
| (''' MOZ_THUMB2 ''', r''' $MOZ_THUMB2 ''') |
| (''' HAVE_ARM_SIMD ''', r''' $HAVE_ARM_SIMD ''') |
| (''' HAVE_ARM_NEON ''', r''' $HAVE_ARM_NEON ''') |
| (''' BUILD_ARM_NEON ''', r''' $BUILD_ARM_NEON ''') |
| (''' ARM_ARCH ''', r''' $ARM_ARCH ''') |
| (''' MOZ_ANDROID_CXX_STL ''', r''' $MOZ_ANDROID_CXX_STL ''') |
| (''' STLPORT_LIBS ''', r''' $STLPORT_LIBS ''') |
| (''' LLVM_SYMBOLIZER ''', r''' $LLVM_SYMBOLIZER ''') |
| (''' MOZ_ASAN ''', r''' $MOZ_ASAN ''') |
| (''' MOZ_MSAN ''', r''' $MOZ_MSAN ''') |
| (''' MOZ_TSAN ''', r''' $MOZ_TSAN ''') |
| (''' HAVE_64BIT_BUILD ''', r''' $HAVE_64BIT_BUILD ''') |
| (''' ENABLE_METHODJIT_SPEW ''', r''' $ENABLE_METHODJIT_SPEW ''') |
| (''' ENABLE_ION ''', r''' $ENABLE_ION ''') |
| (''' MOZ_DEBUG_FLAGS ''', r''' $MOZ_DEBUG_FLAGS ''') |
| (''' MOZ_NO_DEBUG_RTL ''', r''' $MOZ_NO_DEBUG_RTL ''') |
| (''' MOZ_DEBUG_DEFINES ''', list(r''' $MOZ_DEBUG_DEFINES '''.split())) |
| (''' LD_IS_BFD ''', r''' $LD_IS_BFD ''') |
| (''' LD_PRINT_ICF_SECTIONS ''', r''' $LD_PRINT_ICF_SECTIONS ''') |
| (''' MOZ_PROGRAM_LDFLAGS ''', r''' $MOZ_PROGRAM_LDFLAGS ''') |
| (''' MOZ_NEEDS_LIBATOMIC ''', r''' $MOZ_NEEDS_LIBATOMIC ''') |
| (''' WRAP_SYSTEM_INCLUDES ''', r''' $WRAP_SYSTEM_INCLUDES ''') |
| (''' VISIBILITY_FLAGS ''', list(r''' $VISIBILITY_FLAGS '''.split())) |
| (''' HAVE_DTRACE ''', r''' $HAVE_DTRACE ''') |
| (''' HAVE_LINUX_PERF_EVENT_H ''', r''' $HAVE_LINUX_PERF_EVENT_H ''') |
| (''' LINUX_HEADERS_INCLUDES ''', r''' $LINUX_HEADERS_INCLUDES ''') |
| (''' LIBOBJS ''', r''' $LIBOBJS ''') |
| (''' HAVE_CLOCK_MONOTONIC ''', r''' $HAVE_CLOCK_MONOTONIC ''') |
| (''' REALTIME_LIBS ''', list(r''' $REALTIME_LIBS '''.split())) |
| (''' HAVE_LANGINFO_CODESET ''', r''' $HAVE_LANGINFO_CODESET ''') |
| (''' MOZ_UPDATE_CHANNEL ''', r''' $MOZ_UPDATE_CHANNEL ''') |
| (''' MOZ_BUILD_NSPR ''', r''' $MOZ_BUILD_NSPR ''') |
| (''' JS_POSIX_NSPR ''', r''' $JS_POSIX_NSPR ''') |
| (''' NSPR_CONFIG ''', r''' $NSPR_CONFIG ''') |
| (''' NSPR_CFLAGS ''', list(r''' $NSPR_CFLAGS '''.split())) |
| (''' NSPR_LIBS ''', list(r''' $NSPR_LIBS '''.split())) |
| (''' NSPR_INCLUDE_DIR ''', r''' $NSPR_INCLUDE_DIR ''') |
| (''' NSPR_LIB_DIR ''', r''' $NSPR_LIB_DIR ''') |
| (''' NSPR_PKGCONF_CHECK ''', r''' $NSPR_PKGCONF_CHECK ''') |
| (''' MOZ_ZLIB_CFLAGS ''', list(r''' $MOZ_ZLIB_CFLAGS '''.split())) |
| (''' MOZ_ZLIB_LIBS ''', list(r''' $MOZ_ZLIB_LIBS '''.split())) |
| (''' MOZ_SYSTEM_ZLIB ''', r''' $MOZ_SYSTEM_ZLIB ''') |
| (''' ZLIB_IN_MOZGLUE ''', r''' $ZLIB_IN_MOZGLUE ''') |
| (''' PKG_CONFIG ''', r''' $PKG_CONFIG ''') |
| (''' MOZ_FFI_CFLAGS ''', list(r''' $MOZ_FFI_CFLAGS '''.split())) |
| (''' MOZ_FFI_LIBS ''', list(r''' $MOZ_FFI_LIBS '''.split())) |
| (''' MOZ_SYSTEM_FFI ''', r''' $MOZ_SYSTEM_FFI ''') |
| (''' MOZ_UI_LOCALE ''', r''' $MOZ_UI_LOCALE ''') |
| (''' MOZ_OPTIMIZE ''', r''' $MOZ_OPTIMIZE ''') |
| (''' MOZ_FRAMEPTR_FLAGS ''', r''' $MOZ_FRAMEPTR_FLAGS ''') |
| (''' MOZ_OPTIMIZE_FLAGS ''', r''' $MOZ_OPTIMIZE_FLAGS ''') |
| (''' MOZ_OPTIMIZE_LDFLAGS ''', r''' $MOZ_OPTIMIZE_LDFLAGS ''') |
| (''' MOZ_PGO_OPTIMIZE_FLAGS ''', r''' $MOZ_PGO_OPTIMIZE_FLAGS ''') |
| (''' ENABLE_TRACE_LOGGING ''', r''' $ENABLE_TRACE_LOGGING ''') |
| (''' MOZ_MEMORY ''', r''' $MOZ_MEMORY ''') |
| (''' MOZ_JEMALLOC4 ''', r''' $MOZ_JEMALLOC4 ''') |
| (''' MOZ_CRT ''', r''' $MOZ_CRT ''') |
| (''' MOZ_GLUE_IN_PROGRAM ''', r''' $MOZ_GLUE_IN_PROGRAM ''') |
| (''' MOZ_GLUE_WRAP_LDFLAGS ''', list(r''' $MOZ_GLUE_WRAP_LDFLAGS '''.split())) |
| (''' MOZ_VALGRIND ''', r''' $MOZ_VALGRIND ''') |
| (''' JS_SIMULATOR ''', r''' $JS_SIMULATOR ''') |
| (''' JS_SIMULATOR_ARM ''', r''' $JS_SIMULATOR_ARM ''') |
| (''' JS_SIMULATOR_ARM64 ''', r''' $JS_SIMULATOR_ARM64 ''') |
| (''' JS_SIMULATOR_MIPS32 ''', r''' $JS_SIMULATOR_MIPS32 ''') |
| (''' JS_SIMULATOR_MIPS64 ''', r''' $JS_SIMULATOR_MIPS64 ''') |
| (''' JS_CODEGEN_ARM ''', r''' $JS_CODEGEN_ARM ''') |
| (''' JS_CODEGEN_ARM64 ''', r''' $JS_CODEGEN_ARM64 ''') |
| (''' JS_CODEGEN_MIPS32 ''', r''' $JS_CODEGEN_MIPS32 ''') |
| (''' JS_CODEGEN_MIPS64 ''', r''' $JS_CODEGEN_MIPS64 ''') |
| (''' JS_CODEGEN_X86 ''', r''' $JS_CODEGEN_X86 ''') |
| (''' JS_CODEGEN_X64 ''', r''' $JS_CODEGEN_X64 ''') |
| (''' JS_CODEGEN_NONE ''', r''' $JS_CODEGEN_NONE ''') |
| (''' JS_DISASM_ARM ''', r''' $JS_DISASM_ARM ''') |
| (''' ASMJS_MAY_USE_SIGNAL_HANDLERS ''', r''' $ASMJS_MAY_USE_SIGNAL_HANDLERS ''') |
| (''' ASMJS_MAY_USE_SIGNAL_HANDLERS_FOR_OOB ''', r''' $ASMJS_MAY_USE_SIGNAL_HANDLERS_FOR_OOB ''') |
| (''' ASMJS_MAY_USE_SIGNAL_HANDLERS_FOR_UNALIGNED ''', r''' $ASMJS_MAY_USE_SIGNAL_HANDLERS_FOR_UNALIGNED ''') |
| (''' JS_JITSPEW ''', r''' $JS_JITSPEW ''') |
| (''' LLVM_CXXFLAGS ''', r''' $LLVM_CXXFLAGS ''') |
| (''' LLVM_LDFLAGS ''', r''' $LLVM_LDFLAGS ''') |
| (''' CLANG_LDFLAGS ''', r''' $CLANG_LDFLAGS ''') |
| (''' ENABLE_CLANG_PLUGIN ''', r''' $ENABLE_CLANG_PLUGIN ''') |
| (''' SIXGILL_PATH ''', r''' $SIXGILL_PATH ''') |
| (''' PROFILE_GEN_CFLAGS ''', r''' $PROFILE_GEN_CFLAGS ''') |
| (''' PROFILE_GEN_LDFLAGS ''', r''' $PROFILE_GEN_LDFLAGS ''') |
| (''' PROFILE_USE_CFLAGS ''', r''' $PROFILE_USE_CFLAGS ''') |
| (''' PROFILE_USE_LDFLAGS ''', r''' $PROFILE_USE_LDFLAGS ''') |
| (''' LIBS_DESC_SUFFIX ''', r''' $LIBS_DESC_SUFFIX ''') |
| (''' EXPAND_LIBS_LIST_STYLE ''', r''' $EXPAND_LIBS_LIST_STYLE ''') |
| (''' EXPAND_LIBS_ORDER_STYLE ''', r''' $EXPAND_LIBS_ORDER_STYLE ''') |
| (''' CL_INCLUDES_PREFIX ''', r''' $CL_INCLUDES_PREFIX ''') |
| (''' NONASCII ''', r''' $NONASCII ''') |
| (''' JS_BUNDLED_EDITLINE ''', r''' $JS_BUNDLED_EDITLINE ''') |
| (''' EDITLINE_LIBS ''', list(r''' $EDITLINE_LIBS '''.split())) |
| (''' JS_HAS_CTYPES ''', r''' $JS_HAS_CTYPES ''') |
| (''' BUILD_CTYPES ''', r''' $BUILD_CTYPES ''') |
| (''' QEMU_EXE ''', r''' $QEMU_EXE ''') |
| (''' CROSS_LIB ''', r''' $CROSS_LIB ''') |
| (''' AR_FLAGS ''', r''' $AR_FLAGS ''') |
| (''' AR_EXTRACT ''', r''' $AR_EXTRACT ''') |
| (''' ASFLAGS ''', r''' $ASFLAGS ''') |
| (''' AS_DASH_C_FLAG ''', r''' $AS_DASH_C_FLAG ''') |
| (''' RC ''', r''' $RC ''') |
| (''' RCFLAGS ''', r''' $RCFLAGS ''') |
| (''' MC ''', r''' $MC ''') |
| (''' IMPLIB ''', r''' $IMPLIB ''') |
| (''' FILTER ''', r''' $FILTER ''') |
| (''' BIN_FLAGS ''', r''' $BIN_FLAGS ''') |
| (''' MOZ_DEBUG ''', r''' $MOZ_DEBUG ''') |
| (''' MOZ_DEBUG_SYMBOLS ''', r''' $MOZ_DEBUG_SYMBOLS ''') |
| (''' MOZ_DEBUG_LDFLAGS ''', r''' $MOZ_DEBUG_LDFLAGS ''') |
| (''' WARNINGS_AS_ERRORS ''', r''' $WARNINGS_AS_ERRORS ''') |
| (''' LIBICONV ''', r''' $LIBICONV ''') |
| (''' ENABLE_TESTS ''', r''' $ENABLE_TESTS ''') |
| (''' ENABLE_STRIP ''', r''' $ENABLE_STRIP ''') |
| (''' PKG_SKIP_STRIP ''', r''' $PKG_SKIP_STRIP ''') |
| (''' INCREMENTAL_LINKER ''', r''' $INCREMENTAL_LINKER ''') |
| (''' MOZ_FIX_LINK_PATHS ''', r''' $MOZ_FIX_LINK_PATHS ''') |
| (''' MOZ_POST_PROGRAM_COMMAND ''', r''' $MOZ_POST_PROGRAM_COMMAND ''') |
| (''' MOZ_APP_NAME ''', r''' $MOZ_APP_NAME ''') |
| (''' MOZ_APP_DISPLAYNAME ''', r''' $MOZ_APP_DISPLAYNAME ''') |
| (''' MOZ_APP_VERSION ''', r''' $MOZ_APP_VERSION ''') |
| (''' MOZ_PKG_SPECIAL ''', r''' $MOZ_PKG_SPECIAL ''') |
| (''' MOZILLA_OFFICIAL ''', r''' $MOZILLA_OFFICIAL ''') |
| (''' _DEPEND_CFLAGS ''', r''' $_DEPEND_CFLAGS ''') |
| (''' MOZ_SYSTEM_NSPR ''', r''' $MOZ_SYSTEM_NSPR ''') |
| (''' OS_CFLAGS ''', r''' $OS_CFLAGS ''') |
| (''' OS_CXXFLAGS ''', r''' $OS_CXXFLAGS ''') |
| (''' OS_CPPFLAGS ''', r''' $OS_CPPFLAGS ''') |
| (''' OS_COMPILE_CFLAGS ''', r''' $OS_COMPILE_CFLAGS ''') |
| (''' OS_COMPILE_CXXFLAGS ''', r''' $OS_COMPILE_CXXFLAGS ''') |
| (''' OS_LDFLAGS ''', r''' $OS_LDFLAGS ''') |
| (''' OS_LIBS ''', r''' $OS_LIBS ''') |
| (''' HOST_CFLAGS ''', r''' $HOST_CFLAGS ''') |
| (''' HOST_CPPFLAGS ''', r''' $HOST_CPPFLAGS ''') |
| (''' HOST_CXXFLAGS ''', r''' $HOST_CXXFLAGS ''') |
| (''' HOST_LDFLAGS ''', r''' $HOST_LDFLAGS ''') |
| (''' HOST_OPTIMIZE_FLAGS ''', r''' $HOST_OPTIMIZE_FLAGS ''') |
| (''' HOST_AR_FLAGS ''', r''' $HOST_AR_FLAGS ''') |
| (''' HOST_LD ''', r''' $HOST_LD ''') |
| (''' HOST_BIN_SUFFIX ''', r''' $HOST_BIN_SUFFIX ''') |
| (''' TARGET_XPCOM_ABI ''', r''' $TARGET_XPCOM_ABI ''') |
| (''' WRAP_LDFLAGS ''', r''' $WRAP_LDFLAGS ''') |
| (''' MKSHLIB ''', r''' $MKSHLIB ''') |
| (''' MKCSHLIB ''', r''' $MKCSHLIB ''') |
| (''' DSO_CFLAGS ''', r''' $DSO_CFLAGS ''') |
| (''' DSO_PIC_CFLAGS ''', r''' $DSO_PIC_CFLAGS ''') |
| (''' DSO_LDOPTS ''', r''' $DSO_LDOPTS ''') |
| (''' LIB_PREFIX ''', r''' $LIB_PREFIX ''') |
| (''' DLL_PREFIX ''', r''' $DLL_PREFIX ''') |
| (''' DLL_SUFFIX ''', r''' $DLL_SUFFIX ''') |
| (''' LIB_SUFFIX ''', r''' $LIB_SUFFIX ''') |
| (''' OBJ_SUFFIX ''', r''' $OBJ_SUFFIX ''') |
| (''' BIN_SUFFIX ''', r''' $BIN_SUFFIX ''') |
| (''' IMPORT_LIB_SUFFIX ''', r''' $IMPORT_LIB_SUFFIX ''') |
| (''' USE_N32 ''', r''' $USE_N32 ''') |
| (''' CC_VERSION ''', r''' $CC_VERSION ''') |
| (''' CXX_VERSION ''', r''' $CXX_VERSION ''') |
| (''' MSMANIFEST_TOOL ''', r''' $MSMANIFEST_TOOL ''') |
| (''' MOZ_LINKER ''', r''' $MOZ_LINKER ''') |
| (''' WIN32_CONSOLE_EXE_LDFLAGS ''', r''' $WIN32_CONSOLE_EXE_LDFLAGS ''') |
| (''' WIN32_GUI_EXE_LDFLAGS ''', r''' $WIN32_GUI_EXE_LDFLAGS ''') |
| (''' PREPROCESS_OPTION ''', r''' $PREPROCESS_OPTION ''') |
| (''' MOZ_ICU_CFLAGS ''', list(r''' $MOZ_ICU_CFLAGS '''.split())) |
| (''' MOZ_ICU_LIBS ''', list(r''' $MOZ_ICU_LIBS '''.split())) |
| (''' MOZ_ICU_INCLUDES ''', list(r''' $MOZ_ICU_INCLUDES '''.split())) |
| (''' MOZ_SYSTEM_ICU ''', r''' $MOZ_SYSTEM_ICU ''') |
| (''' MOZ_ICU_VERSION ''', r''' $MOZ_ICU_VERSION ''') |
| (''' ENABLE_INTL_API ''', r''' $ENABLE_INTL_API ''') |
| (''' USE_ICU ''', r''' $USE_ICU ''') |
| (''' ICU_DATA_FILE ''', r''' $ICU_DATA_FILE ''') |
| (''' MOZ_ICU_DATA_ARCHIVE ''', r''' $MOZ_ICU_DATA_ARCHIVE ''') |
| (''' MOZILLA_VERSION ''', r''' $MOZILLA_VERSION ''') |
| (''' ac_configure_args ''', r''' $ac_configure_args ''') |
| (''' JS_LIBRARY_NAME ''', r''' $JS_LIBRARY_NAME ''') |
| (''' JS_CONFIG_MOZ_JS_LIBS ''', r''' $JS_CONFIG_MOZ_JS_LIBS ''') |
| (''' JS_CONFIG_LIBS ''', r''' $JS_CONFIG_LIBS ''') |
| (''' WIN_TOP_SRC ''', r''' $WIN_TOP_SRC ''') |
| (''' top_srcdir ''', r''' $top_srcdir ''') |
| EOF |
| |
| for ac_subst_arg in $_subconfigure_ac_subst_args; do |
| variable='$'$ac_subst_arg |
| echo " (''' $ac_subst_arg ''', r''' `eval echo $variable` ''')," >> $CONFIG_STATUS |
| done |
| |
| cat >> $CONFIG_STATUS <<\EOF |
| ] |
| |
| non_global_defines = [ |
| EOF |
| |
| if test -n "$_NON_GLOBAL_ACDEFINES"; then |
| for var in $_NON_GLOBAL_ACDEFINES; do |
| echo " '$var'," >> $CONFIG_STATUS |
| done |
| fi |
| |
| cat >> $CONFIG_STATUS <<EOF |
| ] |
| |
| flags = [ |
| '--enable-release', |
| '--with-android-cxx-stl', |
| '--with-android-version', |
| '--with-ios-sdk', |
| '--enable-ios-target', |
| '--enable-rust', |
| '--with-windows-version', |
| '--enable-macos-target', |
| '--with-macos-sdk', |
| '--with-arch', |
| '--with-thumb', |
| '--with-thumb-interwork', |
| '--with-fpu', |
| '--with-float-abi', |
| '--with-soft-float', |
| '--enable-address-sanitizer', |
| '--enable-memory-sanitizer', |
| '--enable-thread-sanitizer', |
| '--enable-llvm-hacks', |
| '--enable-warnings-as-errors', |
| '--enable-ion', |
| '--enable-debug', |
| '--with-debug-label', |
| '--enable-debug-symbols', |
| '--enable-cpp-rtti', |
| '--enable-gold', |
| '--enable-icf', |
| '--enable-pie', |
| '--enable-dtrace', |
| '--with-linux-headers', |
| '--with-pthreads', |
| '--enable-update-channel', |
| '--with-nspr-cflags', |
| '--with-nspr-libs', |
| '--enable-nspr-build', |
| '--with-system-nspr', |
| '--enable-posix-nspr-emulation', |
| '--with-system-zlib', |
| '--enable-system-ffi', |
| '--enable-ui-locale', |
| '--enable-tests', |
| '--enable-optimize', |
| '--enable-trace-logging', |
| '--enable-jemalloc', |
| '--enable-small-chunk-size', |
| '--enable-gc-trace', |
| '--enable-valgrind', |
| '--enable-simulator', |
| '--enable-jitspew', |
| '--enable-gczeal', |
| '--enable-perf', |
| '--enable-more-deterministic', |
| '--enable-oom-breakpoint', |
| '--enable-clang-plugin', |
| '--with-sixgill', |
| '--enable-strip', |
| '--enable-install-strip', |
| '--with-jitreport-granularity', |
| '--enable-readline', |
| '--enable-ctypes', |
| '--with-qemu-exe', |
| '--with-cross-lib', |
| '--with-system-icu', |
| '--with-intl-api', |
| ] |
| EOF |
| |
| |
| |
| |
| if test "$JS_STANDALONE"; then |
| |
| if test "$no_recursion" != yes; then |
| trap '' EXIT |
| if ! $PYTHON $_topsrcdir/build/subconfigure.py --list subconfigures --skip skip_subconfigures; then |
| exit 1 |
| fi |
| fi |
| |
| |
| fi |
| |
| rm -fr confdefs* $ac_clean_files |