⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.in

📁 Netscape NSPR库源码
💻 IN
📖 第 1 页 / 共 5 页
字号:
dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; -*-dnl dnl The contents of this file are subject to the Mozilla Publicdnl License Version 1.1 (the "License"); you may not use this filednl except in compliance with the License. You may obtain a copy ofdnl the License at http://www.mozilla.org/MPL/dnl dnl Software distributed under the License is distributed on an "ASdnl IS" basis, WITHOUT WARRANTY OF ANY KIND, either express ordnl implied. See the License for the specific language governingdnl rights and limitations under the License.dnl dnl The Original Code is the Netscape Portable Runtime (NSPR).dnl dnl The Initial Developer of the Original Code is Netscapednl Communications Corporation.  Portions created by Netscape are dnl Copyright (C) 1998o-2000 Netscape Communications Corporation.  Alldnl Rights Reserved.dnl dnl Contributor(s):dnl     Christopher Seawood <cls@seawood.org>dnl dnl Alternatively, the contents of this file may be used under thednl terms of the GNU General Public License Version 2 or later (thednl "GPL"), in which case the provisions of the GPL are applicable dnl instead of those above.  If you wish to allow use of your dnl version of this file only under the terms of the GPL and not todnl allow others to use your version of this file under the MPL,dnl indicate your decision by deleting the provisions above anddnl replace them with the notice and other provisions required bydnl the GPL.  If you do not delete the provisions above, a recipientdnl may use your version of this file under either the MPL or thednl GPL.dnl AC_PREREQ(2.12)AC_INIT(config/libc_r.h)AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)AC_CANONICAL_SYSTEMdnl ========================================================dnl = Defaultsdnl ========================================================MOD_MAJOR_VERSION=4MOD_MINOR_VERSION=2MOD_REVISION_VERSION=0NSPR_MODNAME=nspr20_HAVE_PTHREADS=USE_PTHREADS=USE_USER_PTHREADS=USE_NSPR_THREADS=USE_N32=USE_64=USE_CPLUS=USE_IPV6=USE_MDUPDATE=_OPTIMIZE_FLAGS=-O_DEBUG_FLAGS=-gMOZ_DEBUG=1MOZ_OPTIMIZE=OBJDIR=.OBJDIR_NAME=.OBJDIR_SUFFIX=OBJNSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'NOSUCHFILE=/no-such-fileLIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'CYGWIN_WRAPPER=dnl Link in libraries necessary to resolve all symbols for shared libsRESOLVE_LINK_SYMBOLS=dnl ========================================================dnl =dnl = Dont change the following lines.  Doing so breaks:dnl =dnl = CFLAGS="-foo" ./configurednl =dnl ========================================================CFLAGS="${CFLAGS=}"CXXFLAGS="${CXXFLAGS=}"LDFLAGS="${LDFLAGS=}"HOST_CFLAGS="${HOST_CFLAGS=}"HOST_LDFLAGS="${HOST_LDFLAGS=}"case "$target" in*-cygwin*|*-mingw*)    # Check to see if we are really running in a msvc environemnt    _WIN32_MSVC=    AC_CHECK_PROGS(CC, cl)    if test "$CC" = "cl"; then        echo 'main() { return 0; }' > dummy.c        ${CC} -o dummy dummy.c >/dev/null 2>&1        if test $? = 0; then            _WIN32_MSVC=1            CXX=$CC        else            AC_MSG_WARN([$(CC) test failed.  Using normal feature tests])        fi        rm -f dummy dummy.o dummy.obj dummy.exe dummy.c    fi    ;;*-msvc*)    _WIN32_MSVC=1    ;;*-mksnt*)    _WIN32_MSVC=1    ;;esacif test -n "$_WIN32_MSVC"; then    SKIP_PATH_CHECKS=1    SKIP_COMPILER_CHECKS=1    SKIP_LIBRARY_CHECKS=1fidnl ========================================================dnl =dnl = Check options that may affect the compilerdnl =dnl ========================================================dist_prefix='${MOD_DEPTH}/dist'dist_bindir='${dist_prefix}/bin'dist_includedir='${dist_prefix}/include/nspr'dist_libdir='${dist_prefix}/lib'if test "${includedir}" = '${prefix}/include'; then    includedir='${prefix}/include/nspr'fiAC_ARG_WITH(dist-prefix,    [  --with-dist-prefix=DIST_PREFIX                          place build files in DIST_PREFIX [dist]],    dist_prefix=$withval)AC_ARG_WITH(dist-bindir,    [  --with-dist-bindir=DIR  build execuatables in DIR [DIST_PREFIX/bin]],    dist_bindir=$withval)AC_ARG_WITH(dist-includedir,    [  --with-dist-includedir=DIR                          build include files in DIR [DIST_PREFIX/include/nspr]],    dist_includedir=$withval)AC_ARG_WITH(dist-libdir,    [  --with-dist-libdir=DIR  build library files in DIR [DIST_PREFIX/lib]],    dist_libdir=$withval)AC_SUBST(dist_prefix)AC_SUBST(dist_bindir)AC_SUBST(dist_includedir)AC_SUBST(dist_libdir)dnl Check if NSPR is being compiled for Mozilladnl Let --with-arg override environment settingdnlAC_ARG_WITH(mozilla,    [  --with-mozilla          Compile NSPR with Mozilla support],    [   if test "$withval" = "yes"; then            AC_DEFINE(MOZILLA_CLIENT)            MOZILLA_CLIENT=1	    else	        MOZILLA_CLIENT=	    fi],    [	if test -n "$MOZILLA_CLIENT"; then	        AC_DEFINE(MOZILLA_CLIENT)	    fi])AC_ARG_ENABLE(optimize,    [  --enable-optimize(=val) Enable code optimizations (val, ie. -O2) ],    [ if test "$enableval" != "no"; then        MOZ_OPTIMIZE=1        if test -n "$enableval" && test "$enableval" != "yes"; then    	    _OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`            _SAVE_OPTIMIZE_FLAGS=$_OPTIMIZE_FLAGS        fi    fi ])AC_ARG_ENABLE(debug,    [  --disable-debug         Do not compile in debugging symbols],    [	if test "$enableval" = "no"; then    	    MOZ_DEBUG=	    fi])AC_ARG_ENABLE(win32-target,    [  --enable-win32-target=\$t                          Specify win32 flavor. (WIN95 or WINNT)],    OS_TARGET=`echo $enableval | tr a-z A-Z`,    OS_TARGET=)AC_ARG_ENABLE(debug-rtl,    [  --enable-debug-rtl      Use the MSVC debug runtime library],    [ if test "$enableval" = "yes"; then	    USE_DEBUG_RTL=1      fi ])AC_ARG_ENABLE(n32,    [  --enable-n32            Enable n32 ABI support (IRIX only)],    [ if test "$enableval" = "yes"; then	USE_N32=1      else if test "$enableval" = "no"; then	USE_N32=      fi    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 ])dnl ========================================================dnl =dnl = Set the threading modeldnl =dnl ========================================================case "$target" in*-aix*)    case "${target_os}" in    aix3.2*)        USE_NSPR_THREADS=1        ;;    *)        USE_PTHREADS=1        ;;    esac    ;;esacdnl ========================================================dnl =dnl = Set the default C compilerdnl =dnl ========================================================if test -z "$CC"; then    case "$target" in    *-aix*)        if test -z "$USE_NSPR_THREADS"; then            CC=xlC_r        else            CC=xlC        fi    ;;    *-hpux*)        CC=cc    ;;    *-irix*)        CC=cc    ;;    *-osf*)        CC=cc    ;;    *-solaris*)        CC=cc    ;;    esacfidnl ========================================================dnl =dnl = Set the default C++ compilerdnl =dnl ========================================================if test -z "$CXX"; then    case "$target" in    *-aix*)        if test -z "$USE_NSPR_THREADS"; then            CXX=xlC_r        else            CXX=xlC        fi    ;;    *-hpux*)        case "${target_os}" in        hpux10.30)            CXX=aCC            ;;        hpux11.*)            CXX=aCC            ;;        *)            CXX=CC            ;;        esac    ;;    *-irix*)        CXX=CC    ;;    *-osf*)        CXX=cxx    ;;    *-solaris*)        CXX=CC    ;;    esacfiif test -z "$SKIP_PATH_CHECKS"; then    AC_PATH_PROG(WHOAMI, $WHOAMI whoami, echo not_whoami)fiif test -n "$MOZ_DEBUG"; then    AC_DEFINE(DEBUG)    DEFINES="$DEFINES -UNDEBUG"    case "${target_os}" in    beos*)        DEFINES="$DEFINES -DDEBUG_${USER}"        ;;    msvc*|mksnt*|cygwin*|mingw*)        DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`"        ;;    *)         DEFINES="$DEFINES -DDEBUG_`$WHOAMI`"        ;;    esacelse    AC_DEFINE(NDEBUG)    DEFINES="$DEFINES -UDEBUG"fiif test -z "$SKIP_COMPILER_CHECKS"; thendnl ========================================================dnl Checks for compilers.dnl ========================================================if test "$target" != "$host"; then    echo "cross compiling from $host to $target"    cross_compiling=yes    _SAVE_CC="$CC"    _SAVE_CFLAGS="$CFLAGS"    _SAVE_LDFLAGS="$LDFLAGS"    AC_MSG_CHECKING([for $host compiler])    if test -z "$HOST_CC"; then	    AC_CHECK_PROGS(HOST_CC, gcc cc /usr/ucb/cc, "")	    if test -z "$HOST_CC"; then	        AC_MSG_ERROR([no acceptable cc found in \$PATH])	    fi    fi    AC_MSG_RESULT([$HOST_CC])    if test -z "$HOST_CFLAGS"; then	    HOST_CFLAGS="$CFLAGS"    fi    if test -z "$HOST_LDFLAGS"; then	    HOST_LDFLAGS="$LDFLAGS"    fi    CC="$HOST_CC"    CFLAGS="$HOST_CFLAGS"    LDFLAGS="$HOST_LDFLAGS"    AC_MSG_CHECKING([whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works])    AC_TRY_COMPILE([], [return(0);], 	[ac_cv_prog_host_cc_works=1 AC_MSG_RESULT([yes])],	AC_MSG_ERROR([installation or configuration problem: $host compiler $HOST_CC cannot create executables.]) )        CC=$_SAVE_CC    CFLAGS=$_SAVE_CFLAGS    LDFLAGS=$_SAVE_LDFLAGS    if test -z "$CC"; then	    AC_CHECK_PROGS(CC, "${target_alias}-gcc" "${target}-gcc", echo)    fi    unset ac_cv_prog_CC    AC_PROG_CC    if test -z "$CXX"; then	    AC_CHECK_PROGS(CXX, "${target_alias}-g++" "${target}-g++", echo)    fi    unset ac_cv_prog_CXX    AC_PROG_CXX    if test -z "$RANLIB"; then	    AC_CHECK_PROGS(RANLIB, "${target_alias}-ranlib" "${target}-ranlib", echo)    fi    if test -z "$AR"; then	    AC_CHECK_PROGS(AR, "${target_alias}-ar" "${target}-ar", echo)    fi    if test -z "$AS"; then	    AC_CHECK_PROGS(AS, "${target_alias}-as" "${target}-as", echo)    fi    if test -z "$LD"; then	    AC_CHECK_PROGS(LD, "${target_alias}-ld" "${target}-ld", echo)    fi    if test -z "$STRIP"; then	    AC_CHECK_PROGS(STRIP, "${target_alias}-strip" "${target}-strip", echo)    fi    if test -z "$DLLTOOL"; then	    AC_CHECK_PROGS(DLLTOOL, "${target_alias}-dlltool" "${target}-dlltool", echo)    fi    if test -z "$WINDRES"; then	    AC_CHECK_PROGS(WINDRES, "${target_alias}-windres" "${target}-windres", echo)    fielse    AC_PROG_CXX    if test "$CXX" = "cl" -a -z "$CC"; then        CC=$CXX    else                AC_PROG_CC    fi    AC_PROG_CPP    AC_PROG_RANLIB    AC_PATH_PROGS(AS, as, $CC)    AC_PATH_PROGS(AR, ar, echo not_ar)    AC_PATH_PROGS(LD, ld link, echo not_ld)    AC_PATH_PROGS(STRIP, strip, echo not_strip)    AC_PATH_PROGS(DLLTOOL, dlltool, echo not_dlltool)    AC_PATH_PROGS(WINDRES, windres, echo not_windres)    if test -z "$HOST_CC"; then	    HOST_CC="$CC"    fi    if test -z "$HOST_CFLAGS"; then	    HOST_CFLAGS="$CFLAGS"    fifiif test "$GCC" = "yes"; then    GNU_CC=1fiif test "$GXX" = "yes"; then    GNU_CXX=1fiif test "`echo | $AS -V 2>&1 | grep -c GNU`" != "0"; then    GNU_AS=1firm -f a.outif test "$cross_compiling"  = "yes"; then    CROSS_COMPILE=1else    CROSS_COMPILE=fidnl ========================================================dnl Check for gcc -pipe supportdnl ========================================================AC_MSG_CHECKING([for gcc -pipe support])if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then    echo '#include <stdio.h>' > dummy-hello.c    echo 'int main() { printf("Hello World\n"); return 0; }' >> dummy-hello.c    ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5    cat dummy-hello.s | ${AS} -o dummy-hello.S - 2>&5    if test $? = 0; then        _res_as_stdin="yes"    else        _res_as_stdin="no"    fi    if test "$_res_as_stdin" = "yes"; then        _SAVE_CFLAGS=$CFLAGS        CFLAGS="$CFLAGS -pipe"        AC_TRY_COMPILE( [ #include <stdio.h> ],            [printf("Hello World\n");],            [_res_gcc_pipe="yes"],            [_res_gcc_pipe="no"] )        CFLAGS=$_SAVE_CFLAGS    fi    if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then        _res="yes";        CFLAGS="$CFLAGS -pipe"        CXXFLAGS="$CXXFLAGS -pipe"    else        _res="no"    fi    rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out    AC_MSG_RESULT([$_res])

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -