diff options
author | cls%seawood.org <devnull@localhost> | 1999-11-22 15:24:12 +0000 |
---|---|---|
committer | cls%seawood.org <devnull@localhost> | 1999-11-22 15:24:12 +0000 |
commit | 07b4464048a06e4d92245b7c7b503d53a2c45275 (patch) | |
tree | 6408e6df9530905fae0b4130bcb8e321aaf77e5e /configure.in | |
parent | 6d543a4bfb05773fe2e9ec49ac184d656749e40a (diff) | |
download | nspr-hg-07b4464048a06e4d92245b7c7b503d53a2c45275.tar.gz |
Made the handling of the debug/optimize flags to match the Mozilla configure.in setup.
Updated the irix target section to contain the exact logic contained in IRIX.mk in an effort to fix bug 18966.
Added the following options:
--enable-optimize
--enable-mdupdate
--enable-n32 (IRIX only)
--enable-64bit
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 129 |
1 files changed, 120 insertions, 9 deletions
diff --git a/configure.in b/configure.in index 0d6e395a..82ee4e08 100644 --- a/configure.in +++ b/configure.in @@ -17,7 +17,7 @@ dnl Set this define to make fixes w/o breaking anything else. AC_DEFINE(USE_AUTOCONF) dnl ======================================================== -dnl = Version defaults +dnl = Defaults dnl ======================================================== NSPR_VERSION=3 NSPR_MODNAME=nspr20 @@ -25,6 +25,13 @@ _HAVE_PTHREADS= USE_PTHREADS= USE_USER_PTHREADS= USE_NSPR_THREADS= +USE_N32= +USE_64= +USE_MDUPDATE= +_OPTIMIZE_FLAGS=-O +_DEBUG_FLAGS=-g +MOZ_DEBUG=1 +MOZ_OPTIMIZE= dnl ======================================================== dnl = @@ -44,7 +51,10 @@ dnl = dnl = Check options that may affect the compiler dnl = dnl ======================================================== -MOZ_DEBUG=1 +AC_ARG_ENABLE(optimize, + [ --enable-optimize Enable code optimizations], + MOZ_OPTIMIZE=1) + AC_ARG_ENABLE(debug, [ --disable-debug Do not compile in debugging symbols], [ if test "$enableval" = "no"; then @@ -59,13 +69,27 @@ AC_ARG_ENABLE(target, MOZ_TARGET=`echo $enableval | tr a-z A-Z`, MOZ_TARGET=) +AC_ARG_ENABLE(n32, + [ --enable-n32 Enable n32 support (IRIX only)], + [ if test "$enableval" = "yes"; then + USE_N32=1 + fi ]) + +AC_ARG_ENABLE(64bit, + [ --enable-64bit Enable 64-bit support (on certain platforms)], + [ if test "$enableval" = "yes"; then + USE_64=1 + fi ]) + +AC_ARG_ENABLE(mdupdate, + [ --enable-mdupdate Enable use of certain compilers' mdupdate feature], + [ if test "$enableval" = "yes"; then + USE_MDUPDATE=1 + fi ]) + if test -n "$MOZ_DEBUG"; then - CFLAGS="-g $CFLAGS" - CXXFLAGS="-g $CXXFLAGS" DEFINES="$DEFINES -DDEBUG -UNDEBUG -DDEBUG_$(shell whoami)" else - CFLAGS="-O $CFLAGS" - CXXFLAGS="-O $CFLAGS" DEFINES="$DEFINES -UDEBUG -DNDEBUG" fi @@ -200,11 +224,85 @@ case "$target" in *-irix*) AC_DEFINE(XP_UNIX) + AC_DEFINE(IRIX) + AC_DEFINE(SVR4) + AC_DEFINE(_SGI_MP_SOURCE) MDCPUCFG_H=_irix32.cfg PR_MD_CSRCS=irix.c - AS="as -D_ASM $(INCLUDES) -n32" PR_MD_ASFILES=os_Irix.s PR_MD_ARCH_DIR=unix + MKSHLIB='$(LD) $(SHLIB_LD_OPTS) -rdata_shared -shared -soname $(notdir $@)' + DSO_LDOPTS='-elf -shared -all' + case "${target_os}") + irix5*) + USE_NSPR_THREADS=1 + ;; + *) + USE_N32=1 + USE_PTHREADS=1 + ;; + esac + if test "$GNU_CC"; then + AS='$(CC) -x assembler-with-cpp -D_ASM -mips2' + CFLAGS="$CFLAGS -Wall -Wno-format" + _OPTIMIZE_FLAGS="-O6" + else + AS="as -D_ASM $(INCLUDES) -n32" + CFLAGS="$CFLAGS -fullwarn -xansi" + if test "$USE_N32"; then + _OPTIMIZE_FLAGS="-O -OPT:Olimit=4000" + else + _OPTIMIZE_FLAGS="-O -Olimit 4000" + fi + if test "$USE_MDUPDATE"; then + $CFLAGS="$CFLAGS -MDupdate" + fi + case "$target}" in + *-irix6.*) + CFLAGS="$CFLAGS -multigot" + SHLIB_LD_OPTS="-no_unresolved" + if test "USE_N32"; then + CFLAGS="$CFLAGS -n32 -woff 1209" + LDFLAGS="$LDFLAGS -n32" + SHLIB_LD_OPTS="$SHLIB_LD_OPTS -n32" + if test "${target_os}" = "irix6.2"; then + LDFLAGS="$LDFLAGS -Wl,-woff,85" + SHLIB_LD_OPTS="$SHLIB_LD_OPTS -woff 85" + fi + else + if test "$USE_64"; then + CFLAGS="$CFLAGS -64" + else + CFLAGS="$CFLAGS -32" + fi + fi + ;; + *) + CFLAGS="$CFLAGS -xgot" + ;; + esac + fi + if test "${target_os}" = "irix5.3"; then + AC_DEFINE(IRIX5_3) + fi + case "${target_os}" in + irix5*) + ;; + *) + AC_DEFINE(_PR_HAVE_SGI_PRDA_PROCMASK) + ;; + esac + case "${target_os}" in + irix6.5*) + ;; + *) + if test -z "$GNU_CC"; then + CFLAGS="$CFLAGS -mips3" + fi + AC_DEFINE(_PR_HAVE_GETPROTO_R) + AC_DEFINE(_PR_HAVE_GETPROTO_R_POINTER) + ;; + esac case "${target_cpu}" in alpha*) AC_DEFINE(_POSIX_SOURCE) @@ -517,6 +615,16 @@ if test "$enable_shared" = no; then EXTRA_LIBS="$OS_LIBS" fi +if test -n "$MOZ_OPTIMZE"; then + CFLAGS="$CFLAGS $_OPTIMIZE_FLAGS" + CXXFLAGS="$CXXFLAGS $_OPTIMIZE_FLAGS" +fi + +if test -n "$MOZ_DEBUG"; then + CFLAGS="$CFLAGS $_DEBUG_FLAGS" + CXXFLAGS="$CXXFLAGS $_DEBUG_FLAGS" +fi + dnl ======================================================== dnl Substitution of found variables. dnl ======================================================== @@ -529,10 +637,13 @@ AC_SUBST(HOST_CC) AC_SUBST(HOST_CFLAGS) AC_SUBST(GNU_CC) -AC_SUBST(USE_PTHREADS) -AC_SUBST(USE_BTHREADS) AC_SUBST(USE_CPLUS) AC_SUBST(USE_IPV6) +AC_SUBST(USE_N32) +AC_SUBST(USE_64) + +AC_SUBST(USE_PTHREADS) +AC_SUBST(USE_BTHREADS) AC_SUBST(USE_USER_PTHREADS) AC_SUBST(USE_NATIVE_THREADS) AC_SUBST(USE_NSPR_THREADS) |