1999-11-22 18:40:10 +03:00
|
|
|
dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; -*-
|
2000-06-14 00:59:02 +04:00
|
|
|
dnl
|
1999-11-22 18:40:10 +03:00
|
|
|
dnl The contents of this file are subject to the Mozilla Public
|
|
|
|
dnl License Version 1.1 (the "License"); you may not use this file
|
|
|
|
dnl except in compliance with the License. You may obtain a copy of
|
|
|
|
dnl the License at http://www.mozilla.org/MPL/
|
2000-06-14 00:59:02 +04:00
|
|
|
dnl
|
1999-11-22 18:40:10 +03:00
|
|
|
dnl Software distributed under the License is distributed on an "AS
|
|
|
|
dnl IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
|
|
dnl implied. See the License for the specific language governing
|
|
|
|
dnl rights and limitations under the License.
|
2000-06-14 00:59:02 +04:00
|
|
|
dnl
|
2000-06-21 01:48:45 +04:00
|
|
|
dnl The Original Code is the Netscape Portable Runtime (NSPR).
|
2000-06-14 00:59:02 +04:00
|
|
|
dnl
|
|
|
|
dnl The Initial Developer of the Original Code is Netscape
|
|
|
|
dnl Communications Corporation. Portions created by Netscape are
|
2000-06-21 01:48:45 +04:00
|
|
|
dnl Copyright (C) 1998o-2000 Netscape Communications Corporation. All
|
1999-11-22 18:40:10 +03:00
|
|
|
dnl Rights Reserved.
|
2000-06-14 00:59:02 +04:00
|
|
|
dnl
|
1999-11-22 18:40:10 +03:00
|
|
|
dnl Contributor(s):
|
2001-01-19 12:44:03 +03:00
|
|
|
dnl Christopher Seawood <cls@seawood.org>
|
2000-06-14 00:59:02 +04:00
|
|
|
dnl
|
|
|
|
dnl Alternatively, the contents of this file may be used under the
|
|
|
|
dnl terms of the GNU General Public License Version 2 or later (the
|
|
|
|
dnl "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 to
|
|
|
|
dnl allow others to use your version of this file under the MPL,
|
|
|
|
dnl indicate your decision by deleting the provisions above and
|
|
|
|
dnl replace them with the notice and other provisions required by
|
|
|
|
dnl the GPL. If you do not delete the provisions above, a recipient
|
|
|
|
dnl may use your version of this file under either the MPL or the
|
|
|
|
dnl GPL.
|
|
|
|
dnl
|
|
|
|
|
1999-10-14 19:09:11 +04:00
|
|
|
AC_PREREQ(2.12)
|
|
|
|
AC_INIT(config/libc_r.h)
|
|
|
|
|
|
|
|
AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)
|
|
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
|
|
|
|
dnl ========================================================
|
1999-11-22 18:24:12 +03:00
|
|
|
dnl = Defaults
|
1999-10-14 19:09:11 +04:00
|
|
|
dnl ========================================================
|
2001-05-12 09:31:44 +04:00
|
|
|
MOD_MAJOR_VERSION=4
|
2003-07-10 21:34:08 +04:00
|
|
|
MOD_MINOR_VERSION=4
|
2003-02-28 04:48:15 +03:00
|
|
|
MOD_PATCH_VERSION=0
|
1999-10-14 19:09:11 +04:00
|
|
|
NSPR_MODNAME=nspr20
|
|
|
|
_HAVE_PTHREADS=
|
|
|
|
USE_PTHREADS=
|
|
|
|
USE_USER_PTHREADS=
|
|
|
|
USE_NSPR_THREADS=
|
1999-11-22 18:24:12 +03:00
|
|
|
USE_N32=
|
|
|
|
USE_64=
|
1999-11-29 05:15:22 +03:00
|
|
|
USE_CPLUS=
|
|
|
|
USE_IPV6=
|
1999-11-22 18:24:12 +03:00
|
|
|
USE_MDUPDATE=
|
2002-09-26 16:51:34 +04:00
|
|
|
MACOS_DEPLOYMENT_TARGET=
|
1999-11-22 18:24:12 +03:00
|
|
|
_OPTIMIZE_FLAGS=-O
|
|
|
|
_DEBUG_FLAGS=-g
|
|
|
|
MOZ_DEBUG=1
|
|
|
|
MOZ_OPTIMIZE=
|
2000-12-30 08:44:01 +03:00
|
|
|
OBJDIR=.
|
|
|
|
OBJDIR_NAME=.
|
2001-06-14 09:49:20 +04:00
|
|
|
OBJDIR_SUFFIX=OBJ
|
2000-12-30 08:44:01 +03:00
|
|
|
NSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'
|
2001-01-29 08:36:31 +03:00
|
|
|
NOSUCHFILE=/no-such-file
|
2001-05-12 09:31:44 +04:00
|
|
|
LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
|
|
|
|
LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'
|
2002-08-23 05:11:26 +04:00
|
|
|
CYGWIN_WRAPPER=
|
2000-12-30 08:44:01 +03:00
|
|
|
|
1999-12-22 03:07:07 +03:00
|
|
|
dnl Link in libraries necessary to resolve all symbols for shared libs
|
|
|
|
RESOLVE_LINK_SYMBOLS=
|
1999-10-14 19:09:11 +04:00
|
|
|
|
|
|
|
dnl ========================================================
|
|
|
|
dnl =
|
|
|
|
dnl = Dont change the following lines. Doing so breaks:
|
|
|
|
dnl =
|
|
|
|
dnl = CFLAGS="-foo" ./configure
|
|
|
|
dnl =
|
|
|
|
dnl ========================================================
|
|
|
|
CFLAGS="${CFLAGS=}"
|
|
|
|
CXXFLAGS="${CXXFLAGS=}"
|
|
|
|
LDFLAGS="${LDFLAGS=}"
|
|
|
|
HOST_CFLAGS="${HOST_CFLAGS=}"
|
|
|
|
HOST_LDFLAGS="${HOST_LDFLAGS=}"
|
|
|
|
|
2000-10-26 01:24:11 +04:00
|
|
|
case "$target" in
|
2002-08-23 05:11:26 +04:00
|
|
|
*-cygwin*|*-mingw*)
|
2001-01-19 12:44:03 +03:00
|
|
|
# Check to see if we are really running in a msvc environemnt
|
|
|
|
_WIN32_MSVC=
|
2002-08-09 01:39:26 +04:00
|
|
|
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
|
2001-01-19 12:44:03 +03:00
|
|
|
if test $? = 0; then
|
|
|
|
_WIN32_MSVC=1
|
2002-08-09 01:39:26 +04:00
|
|
|
CXX=$CC
|
|
|
|
else
|
|
|
|
AC_MSG_WARN([$(CC) test failed. Using normal feature tests])
|
2001-01-19 12:44:03 +03:00
|
|
|
fi
|
|
|
|
rm -f dummy dummy.o dummy.obj dummy.exe dummy.c
|
|
|
|
fi
|
|
|
|
;;
|
2002-08-23 05:11:26 +04:00
|
|
|
*-msvc*)
|
|
|
|
_WIN32_MSVC=1
|
|
|
|
;;
|
2003-04-19 05:47:57 +04:00
|
|
|
*-mks*)
|
2002-08-23 05:11:26 +04:00
|
|
|
_WIN32_MSVC=1
|
|
|
|
;;
|
2000-10-26 01:24:11 +04:00
|
|
|
esac
|
|
|
|
|
2001-01-19 12:44:03 +03:00
|
|
|
if test -n "$_WIN32_MSVC"; then
|
2001-01-24 07:08:09 +03:00
|
|
|
SKIP_PATH_CHECKS=1
|
2001-01-19 12:44:03 +03:00
|
|
|
SKIP_COMPILER_CHECKS=1
|
|
|
|
SKIP_LIBRARY_CHECKS=1
|
|
|
|
fi
|
|
|
|
|
1999-10-14 19:09:11 +04:00
|
|
|
dnl ========================================================
|
|
|
|
dnl =
|
|
|
|
dnl = Check options that may affect the compiler
|
|
|
|
dnl =
|
|
|
|
dnl ========================================================
|
2001-05-12 09:31:44 +04:00
|
|
|
dist_prefix='${MOD_DEPTH}/dist'
|
|
|
|
dist_bindir='${dist_prefix}/bin'
|
2001-10-17 03:31:02 +04:00
|
|
|
dist_includedir='${dist_prefix}/include/nspr'
|
2001-05-12 09:31:44 +04:00
|
|
|
dist_libdir='${dist_prefix}/lib'
|
2001-10-17 03:31:02 +04:00
|
|
|
if test "${includedir}" = '${prefix}/include'; then
|
|
|
|
includedir='${prefix}/include/nspr'
|
|
|
|
fi
|
2001-05-12 09:31:44 +04:00
|
|
|
|
|
|
|
AC_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
|
2001-10-17 03:31:02 +04:00
|
|
|
build include files in DIR [DIST_PREFIX/include/nspr]],
|
2001-05-12 09:31:44 +04:00
|
|
|
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)
|
|
|
|
|
1999-11-29 05:15:22 +03:00
|
|
|
dnl Check if NSPR is being compiled for Mozilla
|
|
|
|
dnl Let --with-arg override environment setting
|
|
|
|
dnl
|
|
|
|
AC_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])
|
|
|
|
|
1999-11-22 18:24:12 +03:00
|
|
|
AC_ARG_ENABLE(optimize,
|
2001-05-12 09:31:44 +04:00
|
|
|
[ --enable-optimize(=val) Enable code optimizations (val, ie. -O2) ],
|
2000-12-01 16:21:43 +03:00
|
|
|
[ if test "$enableval" != "no"; then
|
|
|
|
MOZ_OPTIMIZE=1
|
|
|
|
if test -n "$enableval" && test "$enableval" != "yes"; then
|
2001-02-10 00:30:09 +03:00
|
|
|
_OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
|
|
|
|
_SAVE_OPTIMIZE_FLAGS=$_OPTIMIZE_FLAGS
|
2000-12-01 16:21:43 +03:00
|
|
|
fi
|
|
|
|
fi ])
|
1999-11-22 18:24:12 +03:00
|
|
|
|
1999-10-14 19:09:11 +04:00
|
|
|
AC_ARG_ENABLE(debug,
|
|
|
|
[ --disable-debug Do not compile in debugging symbols],
|
|
|
|
[ if test "$enableval" = "no"; then
|
|
|
|
MOZ_DEBUG=
|
1999-11-29 05:15:22 +03:00
|
|
|
fi])
|
1999-10-14 19:09:11 +04:00
|
|
|
|
2001-01-19 12:44:03 +03:00
|
|
|
AC_ARG_ENABLE(win32-target,
|
|
|
|
[ --enable-win32-target=\$t
|
2001-05-12 09:31:44 +04:00
|
|
|
Specify win32 flavor. (WIN95 or WINNT)],
|
2001-05-17 06:27:02 +04:00
|
|
|
OS_TARGET=`echo $enableval | tr a-z A-Z`,
|
|
|
|
OS_TARGET=)
|
1999-10-14 19:09:11 +04:00
|
|
|
|
2001-05-17 06:02:06 +04:00
|
|
|
AC_ARG_ENABLE(debug-rtl,
|
|
|
|
[ --enable-debug-rtl Use the MSVC debug runtime library],
|
|
|
|
[ if test "$enableval" = "yes"; then
|
|
|
|
USE_DEBUG_RTL=1
|
|
|
|
fi ])
|
|
|
|
|
1999-11-22 18:24:12 +03:00
|
|
|
AC_ARG_ENABLE(n32,
|
2000-10-26 01:24:11 +04:00
|
|
|
[ --enable-n32 Enable n32 ABI support (IRIX only)],
|
1999-11-22 18:24:12 +03:00
|
|
|
[ if test "$enableval" = "yes"; then
|
|
|
|
USE_N32=1
|
2000-10-26 01:24:11 +04:00
|
|
|
else if test "$enableval" = "no"; then
|
|
|
|
USE_N32=
|
|
|
|
fi
|
1999-11-22 18:24:12 +03:00
|
|
|
fi ])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(64bit,
|
|
|
|
[ --enable-64bit Enable 64-bit support (on certain platforms)],
|
|
|
|
[ if test "$enableval" = "yes"; then
|
1999-11-29 05:15:22 +03:00
|
|
|
USE_64=1
|
|
|
|
fi ])
|
1999-11-22 18:24:12 +03:00
|
|
|
|
|
|
|
AC_ARG_ENABLE(mdupdate,
|
|
|
|
[ --enable-mdupdate Enable use of certain compilers' mdupdate feature],
|
|
|
|
[ if test "$enableval" = "yes"; then
|
1999-11-29 05:15:22 +03:00
|
|
|
USE_MDUPDATE=1
|
|
|
|
fi ])
|
1999-11-22 18:24:12 +03:00
|
|
|
|
2002-09-26 16:51:34 +04:00
|
|
|
AC_ARG_ENABLE(macos-target,
|
|
|
|
[ --enable-macos-target=VER (default=10.1)
|
|
|
|
Set the minimum MacOS version needed at runtime],
|
|
|
|
[MACOS_DEPLOYMENT_TARGET_STR=$enableval],
|
|
|
|
[MACOS_DEPLOYMENT_TARGET_STR=10.1])
|
|
|
|
|
2001-05-16 02:57:39 +04:00
|
|
|
dnl ========================================================
|
|
|
|
dnl =
|
|
|
|
dnl = Set the threading model
|
|
|
|
dnl =
|
|
|
|
dnl ========================================================
|
|
|
|
case "$target" in
|
|
|
|
|
|
|
|
*-aix*)
|
|
|
|
case "${target_os}" in
|
|
|
|
aix3.2*)
|
|
|
|
USE_NSPR_THREADS=1
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
USE_PTHREADS=1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
dnl ========================================================
|
|
|
|
dnl =
|
|
|
|
dnl = Set the default C compiler
|
|
|
|
dnl =
|
|
|
|
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
|
|
|
|
;;
|
|
|
|
|
2001-05-17 04:56:25 +04:00
|
|
|
*-irix*)
|
|
|
|
CC=cc
|
|
|
|
;;
|
|
|
|
|
2002-12-12 04:41:31 +03:00
|
|
|
*-openvms*)
|
|
|
|
CC=cc
|
|
|
|
;;
|
|
|
|
|
2001-05-17 04:56:25 +04:00
|
|
|
*-osf*)
|
|
|
|
CC=cc
|
|
|
|
;;
|
|
|
|
|
2001-05-16 02:57:39 +04:00
|
|
|
*-solaris*)
|
|
|
|
CC=cc
|
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl ========================================================
|
|
|
|
dnl =
|
|
|
|
dnl = Set the default C++ compiler
|
|
|
|
dnl =
|
|
|
|
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
|
|
|
|
;;
|
|
|
|
|
2001-05-17 04:56:25 +04:00
|
|
|
*-irix*)
|
|
|
|
CXX=CC
|
|
|
|
;;
|
|
|
|
|
2002-12-12 04:41:31 +03:00
|
|
|
*-openvms*)
|
|
|
|
CXX=cxx
|
|
|
|
;;
|
|
|
|
|
2001-05-17 04:56:25 +04:00
|
|
|
*-osf*)
|
|
|
|
CXX=cxx
|
|
|
|
;;
|
|
|
|
|
2001-05-16 02:57:39 +04:00
|
|
|
*-solaris*)
|
|
|
|
CXX=CC
|
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2001-01-24 07:08:09 +03:00
|
|
|
if test -z "$SKIP_PATH_CHECKS"; then
|
|
|
|
AC_PATH_PROG(WHOAMI, $WHOAMI whoami, echo not_whoami)
|
|
|
|
fi
|
|
|
|
|
1999-10-14 19:09:11 +04:00
|
|
|
if test -n "$MOZ_DEBUG"; then
|
1999-11-22 18:40:10 +03:00
|
|
|
AC_DEFINE(DEBUG)
|
|
|
|
DEFINES="$DEFINES -UNDEBUG"
|
2002-08-10 14:37:25 +04:00
|
|
|
|
|
|
|
case "${target_os}" in
|
|
|
|
beos*)
|
|
|
|
DEFINES="$DEFINES -DDEBUG_${USER}"
|
|
|
|
;;
|
2003-05-14 05:24:08 +04:00
|
|
|
msvc*|mks*|cygwin*|mingw*|os2*)
|
2002-08-10 14:37:25 +04:00
|
|
|
DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`"
|
|
|
|
;;
|
|
|
|
*)
|
2002-08-23 05:11:26 +04:00
|
|
|
DEFINES="$DEFINES -DDEBUG_`$WHOAMI`"
|
2002-08-10 14:37:25 +04:00
|
|
|
;;
|
|
|
|
esac
|
1999-11-16 07:21:08 +03:00
|
|
|
else
|
1999-11-22 18:40:10 +03:00
|
|
|
AC_DEFINE(NDEBUG)
|
2001-05-16 02:57:39 +04:00
|
|
|
DEFINES="$DEFINES -UDEBUG"
|
1999-10-14 19:09:11 +04:00
|
|
|
fi
|
|
|
|
|
2001-01-19 12:44:03 +03:00
|
|
|
if test -z "$SKIP_COMPILER_CHECKS"; then
|
1999-10-14 19:09:11 +04:00
|
|
|
dnl ========================================================
|
|
|
|
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
|
1999-11-29 05:15:22 +03:00
|
|
|
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
|
1999-10-14 19:09:11 +04:00
|
|
|
fi
|
|
|
|
AC_MSG_RESULT([$HOST_CC])
|
|
|
|
if test -z "$HOST_CFLAGS"; then
|
1999-11-29 05:15:22 +03:00
|
|
|
HOST_CFLAGS="$CFLAGS"
|
1999-10-14 19:09:11 +04:00
|
|
|
fi
|
|
|
|
if test -z "$HOST_LDFLAGS"; then
|
1999-11-29 05:15:22 +03:00
|
|
|
HOST_LDFLAGS="$LDFLAGS"
|
1999-10-14 19:09:11 +04:00
|
|
|
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
|
2001-01-19 12:44:03 +03:00
|
|
|
AC_CHECK_PROGS(CC, "${target_alias}-gcc" "${target}-gcc", echo)
|
1999-10-14 19:09:11 +04:00
|
|
|
fi
|
|
|
|
unset ac_cv_prog_CC
|
|
|
|
AC_PROG_CC
|
|
|
|
if test -z "$CXX"; then
|
2001-01-19 12:44:03 +03:00
|
|
|
AC_CHECK_PROGS(CXX, "${target_alias}-g++" "${target}-g++", echo)
|
1999-10-14 19:09:11 +04:00
|
|
|
fi
|
|
|
|
unset ac_cv_prog_CXX
|
|
|
|
AC_PROG_CXX
|
|
|
|
if test -z "$RANLIB"; then
|
2001-01-19 12:44:03 +03:00
|
|
|
AC_CHECK_PROGS(RANLIB, "${target_alias}-ranlib" "${target}-ranlib", echo)
|
1999-10-14 19:09:11 +04:00
|
|
|
fi
|
|
|
|
if test -z "$AR"; then
|
2001-01-19 12:44:03 +03:00
|
|
|
AC_CHECK_PROGS(AR, "${target_alias}-ar" "${target}-ar", echo)
|
1999-10-14 19:09:11 +04:00
|
|
|
fi
|
|
|
|
if test -z "$AS"; then
|
2001-01-19 12:44:03 +03:00
|
|
|
AC_CHECK_PROGS(AS, "${target_alias}-as" "${target}-as", echo)
|
1999-10-14 19:09:11 +04:00
|
|
|
fi
|
2000-02-24 02:38:19 +03:00
|
|
|
if test -z "$LD"; then
|
2001-01-19 12:44:03 +03:00
|
|
|
AC_CHECK_PROGS(LD, "${target_alias}-ld" "${target}-ld", echo)
|
2000-02-24 02:38:19 +03:00
|
|
|
fi
|
2000-10-25 07:30:47 +04:00
|
|
|
if test -z "$STRIP"; then
|
2001-01-19 12:44:03 +03:00
|
|
|
AC_CHECK_PROGS(STRIP, "${target_alias}-strip" "${target}-strip", echo)
|
2000-10-25 07:30:47 +04:00
|
|
|
fi
|
1999-10-14 19:09:11 +04:00
|
|
|
if test -z "$WINDRES"; then
|
2001-01-19 12:44:03 +03:00
|
|
|
AC_CHECK_PROGS(WINDRES, "${target_alias}-windres" "${target}-windres", echo)
|
1999-10-14 19:09:11 +04:00
|
|
|
fi
|
2000-10-25 07:30:47 +04:00
|
|
|
|
1999-10-14 19:09:11 +04:00
|
|
|
else
|
|
|
|
AC_PROG_CXX
|
2001-01-19 12:44:03 +03:00
|
|
|
if test "$CXX" = "cl" -a -z "$CC"; then
|
|
|
|
CC=$CXX
|
|
|
|
else
|
|
|
|
AC_PROG_CC
|
|
|
|
fi
|
2001-05-17 04:56:25 +04:00
|
|
|
AC_PROG_CPP
|
1999-10-14 19:09:11 +04:00
|
|
|
AC_PROG_RANLIB
|
|
|
|
AC_PATH_PROGS(AS, as, $CC)
|
2001-01-19 12:44:03 +03:00
|
|
|
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(WINDRES, windres, echo not_windres)
|
1999-10-14 19:09:11 +04:00
|
|
|
if test -z "$HOST_CC"; then
|
1999-11-29 05:15:22 +03:00
|
|
|
HOST_CC="$CC"
|
1999-10-14 19:09:11 +04:00
|
|
|
fi
|
|
|
|
if test -z "$HOST_CFLAGS"; then
|
1999-11-29 05:15:22 +03:00
|
|
|
HOST_CFLAGS="$CFLAGS"
|
1999-10-14 19:09:11 +04:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$GCC" = "yes"; then
|
|
|
|
GNU_CC=1
|
|
|
|
fi
|
2001-12-03 01:08:42 +03:00
|
|
|
if test "$GXX" = "yes"; then
|
|
|
|
GNU_CXX=1
|
|
|
|
fi
|
2003-05-14 05:24:08 +04:00
|
|
|
if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then
|
2000-01-11 08:31:08 +03:00
|
|
|
GNU_AS=1
|
|
|
|
fi
|
|
|
|
rm -f a.out
|
1999-10-14 19:09:11 +04:00
|
|
|
|
2000-10-19 00:03:41 +04:00
|
|
|
if test "$cross_compiling" = "yes"; then
|
|
|
|
CROSS_COMPILE=1
|
|
|
|
else
|
|
|
|
CROSS_COMPILE=
|
|
|
|
fi
|
|
|
|
|
2001-12-03 01:08:42 +03:00
|
|
|
dnl ========================================================
|
|
|
|
dnl Check for gcc -pipe support
|
|
|
|
dnl ========================================================
|
|
|
|
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
|
2002-05-03 21:39:01 +04:00
|
|
|
echo 'int main() { printf("Hello World\n"); return 0; }' >> dummy-hello.c
|
2001-12-03 01:08:42 +03:00
|
|
|
${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])
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
fi
|
|
|
|
|
2001-01-19 12:44:03 +03:00
|
|
|
fi # SKIP_COMPILER_CHECKS
|
|
|
|
|
1999-10-14 19:09:11 +04:00
|
|
|
dnl ========================================================
|
|
|
|
dnl Checks for programs.
|
|
|
|
dnl ========================================================
|
2001-01-24 07:08:09 +03:00
|
|
|
if test -z "$SKIP_PATH_CHECKS"; then
|
|
|
|
AC_PATH_PROGS(PERL, perl5 perl, echo not_perl)
|
|
|
|
elif test -z "$PERL"; then
|
|
|
|
PERL=perl
|
|
|
|
fi
|
1999-10-14 19:09:11 +04:00
|
|
|
|
|
|
|
dnl ========================================================
|
|
|
|
dnl Default platform specific options
|
|
|
|
dnl ========================================================
|
|
|
|
OBJ_SUFFIX=o
|
|
|
|
LIB_SUFFIX=a
|
|
|
|
DLL_SUFFIX=so
|
2001-06-23 08:09:19 +04:00
|
|
|
ASM_SUFFIX=s
|
1999-11-29 08:27:26 +03:00
|
|
|
MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
|
1999-10-14 19:09:11 +04:00
|
|
|
PR_MD_ASFILES=
|
|
|
|
PR_MD_CSRCS=
|
1999-11-29 05:15:22 +03:00
|
|
|
PR_MD_ARCH_DIR=unix
|
1999-11-23 09:23:52 +03:00
|
|
|
AR_FLAGS='cr $@'
|
2000-05-02 10:53:54 +04:00
|
|
|
AS='$(CC)'
|
2001-05-16 02:57:39 +04:00
|
|
|
ASFLAGS='$(CFLAGS)'
|
1999-10-14 19:09:11 +04:00
|
|
|
|
1999-12-03 13:32:18 +03:00
|
|
|
OS_ARCH=`uname -s | sed -e 's|/|_|g'`
|
|
|
|
OS_RELEASE=`uname -r`
|
|
|
|
OS_TEST=`uname -m`
|
|
|
|
|
2001-01-19 12:44:03 +03:00
|
|
|
if test "$OS_ARCH" = "IRIX64"; then
|
2000-10-26 01:36:02 +04:00
|
|
|
OS_ARCH=IRIX
|
|
|
|
fi
|
|
|
|
|
2002-03-30 07:54:06 +03:00
|
|
|
if test "$OS_ARCH" = "AIX"; then
|
|
|
|
OS_RELEASE=`uname -v`.`uname -r`
|
|
|
|
fi
|
|
|
|
|
2002-03-30 18:35:06 +03:00
|
|
|
if test "$OS_ARCH" = "FreeBSD"; then
|
|
|
|
OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
|
|
|
|
fi
|
|
|
|
|
2001-06-14 09:49:20 +04:00
|
|
|
if test "$OS_ARCH" = "Linux"; then
|
|
|
|
OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
|
2002-03-30 18:35:06 +03:00
|
|
|
OS_RELEASE=`echo $OS_RELEASE | awk -F\. '{ print $1 "." $2 }'`
|
2001-06-14 09:49:20 +04:00
|
|
|
fi
|
|
|
|
|
2002-12-12 04:41:31 +03:00
|
|
|
if test "$OS_ARCH" = "OpenVMS"; then
|
|
|
|
OS_RELEASE=`uname -v`
|
2001-02-26 00:50:47 +03:00
|
|
|
fi
|
|
|
|
|
2001-01-19 12:44:03 +03:00
|
|
|
#######################################################################
|
|
|
|
# Master "Core Components" macros for getting the OS target #
|
|
|
|
#######################################################################
|
|
|
|
|
|
|
|
#
|
|
|
|
# Note: OS_TARGET should be specified on the command line for gmake.
|
|
|
|
# When OS_TARGET=WIN95 is specified, then a Windows 95 target is built.
|
|
|
|
# The difference between the Win95 target and the WinNT target is that
|
|
|
|
# the WinNT target uses Windows NT specific features not available
|
|
|
|
# in Windows 95. The Win95 target will run on Windows NT, but (supposedly)
|
|
|
|
# at lesser performance (the Win95 target uses threads; the WinNT target
|
|
|
|
# uses fibers).
|
|
|
|
#
|
|
|
|
# When OS_TARGET=WIN16 is specified, then a Windows 3.11 (16bit) target
|
|
|
|
# is built. See: win16_3.11.mk for lots more about the Win16 target.
|
|
|
|
#
|
|
|
|
# If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
|
|
|
|
# cross-compilation.
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# The following hack allows one to build on a WIN95 machine (as if
|
|
|
|
# s/he were cross-compiling on a WINNT host for a WIN95 target).
|
|
|
|
# It also accomodates for MKS's uname.exe. If you never intend
|
|
|
|
# to do development on a WIN95 machine, you don't need this hack.
|
|
|
|
#
|
|
|
|
if test "$OS_ARCH" = "WIN95"; then
|
|
|
|
OS_ARCH=WINNT
|
|
|
|
OS_TARGET=WIN95
|
|
|
|
elif test "$OS_ARCH" = 'Windows_95'; then
|
|
|
|
OS_ARCH=Windows_NT
|
|
|
|
OS_TARGET=WIN95
|
2001-02-25 10:36:26 +03:00
|
|
|
elif test "$OS_ARCH" = 'Windows_98'; then
|
|
|
|
OS_ARCH=Windows_NT
|
|
|
|
OS_TARGET=WIN95
|
2002-11-23 12:59:07 +03:00
|
|
|
elif test "`echo $OS_ARCH | egrep -c '^(CYGWIN_9|CYGWIN_ME)' 2>/dev/null`" != 0; then
|
2001-02-25 10:36:26 +03:00
|
|
|
OS_ARCH='CYGWIN_NT-4.0'
|
|
|
|
OS_TARGET=WIN95
|
2001-02-24 08:39:43 +03:00
|
|
|
elif test "$OS_ARCH" = "OS_2"; then
|
2001-01-19 12:44:03 +03:00
|
|
|
OS_ARCH=OS2
|
|
|
|
OS_TARGET=OS2
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# On WIN32, we also define the variable CPU_ARCH.
|
|
|
|
#
|
|
|
|
|
|
|
|
if test "$OS_ARCH" = "WINNT"; then
|
|
|
|
CPU_ARCH=`uname -p`
|
|
|
|
if test "$CPU_ARCH" = "I386"; then
|
|
|
|
CPU_ARCH=x86
|
|
|
|
fi
|
|
|
|
elif test "$OS_ARCH" = "Windows_NT"; then
|
|
|
|
#
|
|
|
|
# If uname -s returns "Windows_NT", we assume that we are using
|
|
|
|
# the uname.exe in MKS toolkit.
|
|
|
|
#
|
|
|
|
# The -r option of MKS uname only returns the major version number.
|
|
|
|
# So we need to use its -v option to get the minor version number.
|
|
|
|
# Moreover, it doesn't have the -p option, so we need to use uname -m.
|
|
|
|
#
|
|
|
|
OS_ARCH=WINNT
|
2001-10-13 00:44:02 +04:00
|
|
|
OS_MINOR_RELEASE=`uname -v`
|
2001-01-19 12:44:03 +03:00
|
|
|
if test "$OS_MINOR_RELEASE" = "00"; then
|
|
|
|
OS_MINOR_RELEASE=0
|
|
|
|
fi
|
|
|
|
OS_RELEASE="${OS_RELEASE}.${OS_MINOR_RELEASE}"
|
|
|
|
CPU_ARCH=`uname -m`
|
|
|
|
#
|
|
|
|
# MKS's uname -m returns "586" on a Pentium machine.
|
|
|
|
#
|
|
|
|
if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
|
|
|
|
CPU_ARCH=x86
|
|
|
|
fi
|
|
|
|
elif echo "$OS_ARCH" | grep -c CYGWIN_NT >/dev/null; then
|
|
|
|
#
|
|
|
|
# If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
|
|
|
|
# the uname.exe in the Cygwin tools.
|
|
|
|
#
|
|
|
|
OS_RELEASE=`echo $OS_ARCH | sed 's|^CYGWIN_NT-||'`
|
|
|
|
OS_ARCH=WINNT
|
|
|
|
CPU_ARCH=`uname -m`
|
|
|
|
#
|
|
|
|
# Cygwin's uname -m returns "i686" on a Pentium Pro machine.
|
|
|
|
#
|
|
|
|
if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
|
|
|
|
CPU_ARCH=x86
|
|
|
|
fi
|
|
|
|
elif test "$OS_ARCH" = "CYGWIN32_NT"; then
|
|
|
|
#
|
|
|
|
# Prior to the Beta 20 release, Cygwin was called GNU-Win32.
|
|
|
|
# If uname -s returns "CYGWIN32/NT", we assume that we are using
|
|
|
|
# the uname.exe in the GNU-Win32 tools.
|
|
|
|
#
|
|
|
|
OS_ARCH=WINNT
|
|
|
|
CPU_ARCH=`uname -m`
|
|
|
|
#
|
|
|
|
# GNU-Win32's uname -m returns "i686" on a Pentium Pro machine.
|
|
|
|
#
|
|
|
|
if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
|
|
|
|
CPU_ARCH=x86
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2001-01-21 09:42:27 +03:00
|
|
|
if test -n "$MOZILLA_CLIENT" && test "$OS_ARCH" = "WINNT"; then
|
|
|
|
OS_TARGET=WIN95
|
|
|
|
if test -n "$MOZ_DEBUG"; then
|
|
|
|
USE_DEBUG_RTL=1
|
|
|
|
fi
|
|
|
|
fi
|
2001-01-19 12:44:03 +03:00
|
|
|
if test -z "$OS_TARGET"; then
|
|
|
|
OS_TARGET=$OS_ARCH
|
2000-10-26 01:36:02 +04:00
|
|
|
fi
|
2001-01-19 12:44:03 +03:00
|
|
|
if test "$OS_TARGET" = "WIN95"; then
|
|
|
|
OS_RELEASE="4.0"
|
|
|
|
fi
|
|
|
|
if test "$OS_TARGET" = "WIN16"; then
|
|
|
|
OS_RELEASE=
|
|
|
|
fi
|
|
|
|
OS_CONFIG="${OS_TARGET}${OS_RELEASE}"
|
2000-10-26 01:36:02 +04:00
|
|
|
|
|
|
|
dnl ========================================================
|
|
|
|
|
1999-10-14 19:09:11 +04:00
|
|
|
dnl ========================================================
|
|
|
|
dnl Override of system specific host options
|
|
|
|
dnl ========================================================
|
|
|
|
case "$host" in
|
2003-04-19 05:47:57 +04:00
|
|
|
*-mingw*|*-cygwin*|*-msvc*|*-mks*)
|
1999-10-14 19:09:11 +04:00
|
|
|
;;
|
2000-02-24 02:38:19 +03:00
|
|
|
*-beos*)
|
|
|
|
HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE"
|
|
|
|
;;
|
2001-02-24 08:39:43 +03:00
|
|
|
*os2*)
|
|
|
|
;;
|
1999-10-14 19:09:11 +04:00
|
|
|
*)
|
|
|
|
HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
dnl ========================================================
|
|
|
|
dnl Override of system specific target options
|
|
|
|
dnl ========================================================
|
|
|
|
case "$target" in
|
1999-11-23 09:23:52 +03:00
|
|
|
|
1999-11-29 05:15:22 +03:00
|
|
|
*-aix*)
|
1999-11-23 09:23:52 +03:00
|
|
|
AC_DEFINE(XP_UNIX)
|
1999-11-29 05:15:22 +03:00
|
|
|
AC_DEFINE(AIX)
|
|
|
|
AC_DEFINE(SYSV)
|
|
|
|
DSO_LDOPTS='-brtl -bM:SRE -bnoentry -bexpall'
|
2001-05-16 02:57:39 +04:00
|
|
|
AC_CHECK_HEADER(sys/atomic_op.h, AC_DEFINE(AIX_HAVE_ATOMIC_OP_H))
|
1999-11-29 05:15:22 +03:00
|
|
|
case "${target_os}" in
|
|
|
|
aix3.2*)
|
|
|
|
AC_DEFINE(AIX_RENAME_SELECT)
|
|
|
|
AC_DEFINE(_PR_NO_LARGE_FILES)
|
|
|
|
AIX_LINK_OPTS='-bnso -berok'
|
1999-11-29 07:46:11 +03:00
|
|
|
PR_MD_ASFILES=os_AIX.s
|
1999-11-29 05:15:22 +03:00
|
|
|
;;
|
|
|
|
aix4.1*)
|
|
|
|
AC_DEFINE(AIX_TIMERS)
|
|
|
|
AC_DEFINE(_PR_NO_LARGE_FILES)
|
|
|
|
AC_DEFINE(AIX4_1)
|
|
|
|
MKSHLIB=
|
|
|
|
DSO_LDOPTS=
|
|
|
|
AIX_LINK_OPTS='-bnso -berok'
|
2001-05-12 09:31:44 +04:00
|
|
|
LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)_shr'
|
2001-05-18 01:42:09 +04:00
|
|
|
LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)_shr'
|
1999-11-29 05:15:22 +03:00
|
|
|
;;
|
2001-05-16 02:57:39 +04:00
|
|
|
aix4.2*)
|
|
|
|
AC_DEFINE(AIX_TIMERS)
|
|
|
|
AC_DEFINE(_PR_HAVE_OFF64_T)
|
|
|
|
AIX_LINK_OPTS='-brtl -bnso -berok'
|
|
|
|
;;
|
1999-11-29 05:15:22 +03:00
|
|
|
aix4.3*)
|
|
|
|
AC_DEFINE(AIX_TIMERS)
|
|
|
|
AC_DEFINE(_PR_HAVE_OFF64_T)
|
2002-12-12 02:10:41 +03:00
|
|
|
AC_DEFINE(AIX4_3_PLUS)
|
1999-11-29 05:15:22 +03:00
|
|
|
AC_DEFINE(HAVE_SOCKLEN_T)
|
2001-05-16 02:57:39 +04:00
|
|
|
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
|
1999-11-29 05:15:22 +03:00
|
|
|
USE_IPV6=1
|
|
|
|
AIX_LINK_OPTS='-brtl -bnso -berok'
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_DEFINE(AIX_TIMERS)
|
|
|
|
AC_DEFINE(_PR_HAVE_OFF64_T)
|
2002-12-12 02:10:41 +03:00
|
|
|
AC_DEFINE(AIX4_3_PLUS)
|
2001-05-16 02:57:39 +04:00
|
|
|
AC_DEFINE(HAVE_SOCKLEN_T)
|
|
|
|
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
|
|
|
|
USE_IPV6=1
|
1999-11-29 05:15:22 +03:00
|
|
|
AIX_LINK_OPTS='-brtl -bnso -berok'
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
CFLAGS="$CFLAGS -qro -qroconst"
|
2001-01-29 08:36:31 +03:00
|
|
|
if echo "$CC" | grep -c xlC_r; then
|
1999-11-29 05:15:22 +03:00
|
|
|
CFLAGS="$CFLAGS -qarch=com"
|
|
|
|
fi
|
|
|
|
AIX_WRAP='$(DIST)/lib/aixwrap.o'
|
|
|
|
AIX_TMP='./_aix_tmp.o'
|
1999-11-29 07:46:11 +03:00
|
|
|
if test -n "$USE_64"; then
|
|
|
|
MDCPUCFG_H=_aix64.cfg
|
2001-05-16 02:57:39 +04:00
|
|
|
OBJECT_MODE=64
|
1999-11-29 07:46:11 +03:00
|
|
|
else
|
2002-05-07 05:43:40 +04:00
|
|
|
MDCPUCFG_H=_aix32.cfg
|
1999-11-29 07:46:11 +03:00
|
|
|
fi
|
|
|
|
PR_MD_CSRCS=aix.c
|
2001-01-17 22:13:44 +03:00
|
|
|
RESOLVE_LINK_SYMBOLS=1
|
1999-11-29 05:15:22 +03:00
|
|
|
;;
|
|
|
|
|
1999-10-14 19:09:11 +04:00
|
|
|
*-beos*)
|
|
|
|
AC_DEFINE(XP_BEOS)
|
|
|
|
AC_DEFINE(BeOS)
|
|
|
|
AC_DEFINE(BEOS)
|
1999-12-22 03:07:07 +03:00
|
|
|
AC_DEFINE(_POSIX_SOURCE)
|
|
|
|
DSO_LDOPTS=-nostart
|
|
|
|
MDCPUCFG_H=_beos.cfg
|
|
|
|
USE_BTHREADS=1
|
|
|
|
PR_MD_ARCH_DIR=beos
|
|
|
|
RESOLVE_LINK_SYMBOLS=1
|
2001-01-29 08:36:31 +03:00
|
|
|
case "${target_cpu}" in
|
2003-03-27 05:21:20 +03:00
|
|
|
i*86)
|
2001-01-29 08:36:31 +03:00
|
|
|
_OPTIMIZE_FLAGS=-O2
|
|
|
|
_DEBUG_FLAGS='-gdwarf-2 -O0'
|
|
|
|
MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
|
2002-01-10 12:50:36 +03:00
|
|
|
AC_CHECK_LIB(bind, gethostbyaddr, [OS_LIBS="$OS_LIBS -lbind -lsocket"])
|
2001-01-29 08:36:31 +03:00
|
|
|
;;
|
|
|
|
powerpc)
|
|
|
|
CC=mwcc
|
|
|
|
CCC=mwcc
|
|
|
|
LD=mwld
|
|
|
|
DSO_LDOPTS='-xms -export pragma -init _init_routine_ -term _term_routine_ -lroot -lnet /boot/develop/lib/ppc/glue-noinit.a /boot/develop/lib/ppc/init_term_dyn.o /boot/develop/lib/ppc/start_dyn.o'
|
|
|
|
_OPTIMIZE_FLAGS=-O2
|
|
|
|
_DEBUG_FLAGS='-g -O0'
|
|
|
|
;;
|
|
|
|
esac
|
1999-10-14 19:09:11 +04:00
|
|
|
;;
|
|
|
|
|
2001-01-05 02:37:29 +03:00
|
|
|
*-bsdi*)
|
|
|
|
AC_DEFINE(XP_UNIX)
|
|
|
|
AC_DEFINE(BSDI)
|
|
|
|
AC_DEFINE(NEED_BSDREGEX)
|
|
|
|
|
|
|
|
CFLAGS="$CFLAGS -Wall -Wno-format"
|
|
|
|
CXXFLAGS="$CXXFLAGS -Wall -Wno-format"
|
|
|
|
|
|
|
|
if echo "$OS_TEST" | grep -c 86 >/dev/null; then
|
|
|
|
CPU_ARCH=x86
|
|
|
|
elif echo "$OS_TEST" | grep -c sparc >/dev/null; then
|
|
|
|
CPU_ARCH=sparc
|
|
|
|
fi
|
|
|
|
|
|
|
|
MDCPUCFG_H=_bsdi.cfg
|
|
|
|
PR_MD_CSRCS=bsdi.c
|
|
|
|
|
|
|
|
DSO_LDOPTS=-r
|
|
|
|
|
|
|
|
case "$target_os" in
|
|
|
|
bsdi1.1*)
|
|
|
|
AC_DEFINE(_PR_BSDI_JMPBUF_IS_ARRAY)
|
|
|
|
AC_DEFINE(_PR_STAT_HAS_ONLY_ST_ATIME)
|
|
|
|
AC_DEFINE(_PR_NEED_H_ERRNO)
|
|
|
|
MKSHLIB=
|
|
|
|
DSO_CFLAGS=
|
|
|
|
DSO_LDOPTS=
|
|
|
|
;;
|
|
|
|
|
|
|
|
bsdi2.1*)
|
|
|
|
AC_DEFINE(_PR_TIMESPEC_HAS_TS_SEC)
|
|
|
|
AC_DEFINE(_PR_BSDI_JMPBUF_IS_ARRAY)
|
|
|
|
AC_DEFINE(HAVE_DLL)
|
|
|
|
AC_DEFINE(USE_DLFCN)
|
|
|
|
AC_DEFINE(_PR_STAT_HAS_ST_ATIMESPEC)
|
|
|
|
PR_MD_ASFILES=os_BSD_OS_386_2.s
|
|
|
|
;;
|
|
|
|
|
2002-09-12 19:04:22 +04:00
|
|
|
bsdi4.* | bsdi5.*)
|
2001-01-05 02:37:29 +03:00
|
|
|
AC_DEFINE(_PR_SELECT_CONST_TIMEVAL)
|
|
|
|
AC_DEFINE(_PR_BSDI_JMPBUF_IS_STRUCT)
|
|
|
|
AC_DEFINE(HAVE_DLL)
|
|
|
|
AC_DEFINE(USE_DLFCN)
|
|
|
|
AC_DEFINE(_PR_STAT_HAS_ST_ATIMESPEC)
|
|
|
|
MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
|
|
|
|
DSO_CFLAGS=-fPIC
|
|
|
|
DSO_LDOPTS='-shared -Wl,-soname,$(@:$(OBJDIR)/%.so=%.so)'
|
2001-02-04 07:59:26 +03:00
|
|
|
STRIP="$STRIP -d"
|
2001-02-02 03:58:11 +03:00
|
|
|
case "$target_os" in
|
2002-09-12 19:04:22 +04:00
|
|
|
bsdi4.2* | bsdi4.3* | bsdi5.*)
|
2001-02-02 03:58:11 +03:00
|
|
|
AC_DEFINE(_PR_HAVE_GETPROTO_R)
|
|
|
|
AC_DEFINE(_PR_HAVE_GETPROTO_R_POINTER)
|
|
|
|
;;
|
|
|
|
esac
|
2001-01-05 02:37:29 +03:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_DEFINE(_PR_SELECT_CONST_TIMEVAL)
|
|
|
|
AC_DEFINE(_PR_BSDI_JMPBUF_IS_STRUCT)
|
|
|
|
AC_DEFINE(HAVE_DLL)
|
|
|
|
AC_DEFINE(USE_DLFCN)
|
|
|
|
AC_DEFINE(_PR_STAT_HAS_ST_ATIMESPEC)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
;;
|
|
|
|
|
2001-11-03 06:57:36 +03:00
|
|
|
*-darwin*)
|
|
|
|
AC_DEFINE(XP_UNIX)
|
|
|
|
AC_DEFINE(DARWIN)
|
|
|
|
AC_DEFINE(HAVE_BSD_FLOCK)
|
2001-12-03 01:08:42 +03:00
|
|
|
CFLAGS="$CFLAGS -Wmost -fno-common"
|
2001-11-03 06:57:36 +03:00
|
|
|
if echo $OS_TEST | grep -c 86 2>/dev/null; then
|
|
|
|
AC_DEFINE(i386)
|
|
|
|
CPU_ARCH=i386
|
|
|
|
else
|
|
|
|
AC_DEFINE(ppc)
|
|
|
|
CPU_ARCH=ppc
|
|
|
|
fi
|
|
|
|
DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@'
|
|
|
|
# Use the standard preprocessor (cpp)
|
2001-11-14 07:01:43 +03:00
|
|
|
CFLAGS="$CFLAGS -no-cpp-precomp"
|
2001-11-03 06:57:36 +03:00
|
|
|
MKSHLIB='$(CC) -arch $(CPU_ARCH) $(DSO_LDOPTS) -o $@'
|
2001-11-03 09:01:31 +03:00
|
|
|
STRIP="$STRIP -x -S"
|
2001-11-03 06:57:36 +03:00
|
|
|
DLL_SUFFIX=dylib
|
|
|
|
USE_PTHREADS=1
|
|
|
|
MDCPUCFG_H=_darwin.cfg
|
|
|
|
PR_MD_CSRCS=darwin.c
|
2003-02-22 18:00:13 +03:00
|
|
|
if test "$CPU_ARCH" = "ppc"; then
|
|
|
|
PR_MD_ASFILES=os_Darwin_ppc.s
|
|
|
|
fi
|
2002-09-26 16:51:34 +04:00
|
|
|
|
2002-11-06 08:10:22 +03:00
|
|
|
# Add Mac OS X support for loading CFM & CFBundle plugins
|
|
|
|
if test -f /System/Library/Frameworks/Carbon.framework/Carbon; then
|
2003-01-15 03:07:02 +03:00
|
|
|
AC_DEFINE(XP_MACOSX)
|
|
|
|
OS_TARGET=MacOSX
|
|
|
|
|
|
|
|
dnl The C preprocessor can only handle integers in comparisons, so
|
|
|
|
dnl convert the version to the form AABBCC where AA=major release,
|
|
|
|
dnl BB=minor release, and CC=point/micro release.
|
|
|
|
|
|
|
|
MACOS_VERSION_MAJOR=`echo $MACOS_DEPLOYMENT_TARGET_STR | cut -d . -f 1`
|
|
|
|
MACOS_VERSION_MINOR=`echo $MACOS_DEPLOYMENT_TARGET_STR | cut -d . -f 2`
|
|
|
|
MACOS_VERSION_MICRO=`echo $MACOS_DEPLOYMENT_TARGET_STR | cut -d . -f 3`
|
|
|
|
if test -z "$MACOS_VERSION_MINOR"; then
|
|
|
|
MACOS_VERSION_MINOR=0
|
|
|
|
fi
|
|
|
|
if test -z "$MACOS_VERSION_MICRO"; then
|
|
|
|
MACOS_VERSION_MICRO=0
|
|
|
|
fi
|
|
|
|
MACOS_DEPLOYMENT_TARGET=`printf "%02d%02d%02d" "$MACOS_VERSION_MAJOR" "$MACOS_VERSION_MINOR" "$MACOS_VERSION_MICRO"`
|
|
|
|
AC_DEFINE_UNQUOTED(MACOS_DEPLOYMENT_TARGET, $MACOS_DEPLOYMENT_TARGET)
|
2002-09-26 16:51:34 +04:00
|
|
|
fi
|
2001-11-03 06:57:36 +03:00
|
|
|
;;
|
|
|
|
|
1999-11-29 05:15:22 +03:00
|
|
|
*-dgux*)
|
1999-10-14 19:09:11 +04:00
|
|
|
AC_DEFINE(XP_UNIX)
|
1999-11-29 05:15:22 +03:00
|
|
|
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
|
|
|
|
AC_DEFINE(SVR4)
|
|
|
|
AC_DEFINE(SYSV)
|
|
|
|
AC_DEFINE(DGUX)
|
|
|
|
AC_DEFINE(_DGUX_SOURCE)
|
|
|
|
AC_DEFINE(_POSIX4A_DRAFT6_SOURCE)
|
|
|
|
DSO_LDOPTS=-G
|
|
|
|
_OPTIMIZE_FLAGS=-O2
|
|
|
|
_DEBUG_FLAGS=
|
1999-11-29 07:46:11 +03:00
|
|
|
MDCPUCFG_H=_dgux.cfg
|
|
|
|
PR_MD_CSRCS=dgux.c
|
1999-11-29 05:15:22 +03:00
|
|
|
;;
|
|
|
|
|
|
|
|
*-freebsd*)
|
2001-06-14 09:49:20 +04:00
|
|
|
if test -z "$USE_NSPR_THREADS"; then
|
2001-05-17 04:56:25 +04:00
|
|
|
USE_PTHREADS=1
|
|
|
|
fi
|
2001-02-25 01:00:46 +03:00
|
|
|
AC_DEFINE(XP_UNIX)
|
1999-11-29 05:15:22 +03:00
|
|
|
AC_DEFINE(FREEBSD)
|
|
|
|
AC_DEFINE(HAVE_BSD_FLOCK)
|
2001-12-03 01:08:42 +03:00
|
|
|
CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
|
1999-11-29 05:15:22 +03:00
|
|
|
MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
|
|
|
|
if test "$MOZ_OBJFORMAT" = "elf"; then
|
|
|
|
DLL_SUFFIX=so
|
|
|
|
else
|
|
|
|
DLL_SUFFIX=so.1.0
|
|
|
|
fi
|
2002-02-26 12:44:34 +03:00
|
|
|
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
|
1999-11-29 05:15:22 +03:00
|
|
|
DSO_CFLAGS=-fPIC
|
2002-02-26 12:44:34 +03:00
|
|
|
DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
|
1999-11-29 07:46:11 +03:00
|
|
|
MDCPUCFG_H=_freebsd.cfg
|
|
|
|
PR_MD_CSRCS=freebsd.c
|
1999-11-29 05:15:22 +03:00
|
|
|
;;
|
|
|
|
|
|
|
|
*-hpux*)
|
2001-01-28 01:55:12 +03:00
|
|
|
AC_DEFINE(XP_UNIX)
|
1999-11-29 05:15:22 +03:00
|
|
|
AC_DEFINE(HPUX)
|
|
|
|
AC_DEFINE(_HPUX_SOURCE)
|
2001-01-28 01:55:12 +03:00
|
|
|
AC_DEFINE(hppa)
|
2003-01-20 23:52:48 +03:00
|
|
|
# OSF1 and HPUX report the POLLHUP event for a socket when the
|
|
|
|
# shutdown(SHUT_WR) operation is called for the remote end, even though
|
|
|
|
# the socket is still writeable. Use select(), instead of poll(), to
|
|
|
|
# workaround this problem.
|
|
|
|
AC_DEFINE(_PR_POLL_WITH_SELECT)
|
|
|
|
AC_DEFINE(_USE_BIG_FDS)
|
1999-11-29 05:15:22 +03:00
|
|
|
DLL_SUFFIX=sl
|
|
|
|
DSO_LDOPTS='-b +h $(notdir $@)'
|
1999-11-29 07:46:11 +03:00
|
|
|
PR_MD_CSRCS=hpux.c
|
2002-01-23 05:56:36 +03:00
|
|
|
if test "$OS_TEST" != "ia64"; then
|
|
|
|
PR_MD_ASFILES=os_HPUX.s
|
|
|
|
fi
|
1999-11-29 07:46:11 +03:00
|
|
|
if test -n "$USE_64"; then
|
|
|
|
MDCPUCFG_H=_hpux64.cfg
|
|
|
|
else
|
|
|
|
MDCPUCFG_H=_hpux32.cfg
|
|
|
|
fi
|
1999-11-29 05:15:22 +03:00
|
|
|
if test -z "$GNU_CC"; then
|
|
|
|
CC="$CC -Ae"
|
|
|
|
CXX="$CXX -ext"
|
|
|
|
DSO_CFLAGS=+Z
|
|
|
|
else
|
|
|
|
DSO_CFLAGS=-fPIC
|
|
|
|
fi
|
2001-01-28 01:55:12 +03:00
|
|
|
|
1999-11-29 05:15:22 +03:00
|
|
|
if test -n "$MOZILLA_CLIENT"; then
|
2001-01-28 01:55:12 +03:00
|
|
|
DEFAULT_IMPL_STRATEGY=_EMU
|
1999-11-29 05:15:22 +03:00
|
|
|
fi
|
2001-01-28 01:55:12 +03:00
|
|
|
|
|
|
|
if echo "$OS_RELEASE" | grep ^A.09 >/dev/null; then
|
|
|
|
AC_DEFINE(_PR_NEED_H_ERRNO)
|
1999-11-29 05:15:22 +03:00
|
|
|
AC_DEFINE(HPUX9)
|
2001-01-28 01:55:12 +03:00
|
|
|
DEFAULT_IMPL_STRATEGY=_EMU
|
|
|
|
USE_NSPR_THREADS=1
|
|
|
|
fi
|
|
|
|
|
2001-01-29 08:36:31 +03:00
|
|
|
if echo "$OS_RELEASE" | egrep '^(A.09|B.10)' >/dev/null; then
|
|
|
|
AC_DEFINE(_PR_NO_LARGE_FILES)
|
|
|
|
fi
|
|
|
|
|
2001-01-28 01:55:12 +03:00
|
|
|
if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
|
1999-11-29 05:15:22 +03:00
|
|
|
AC_DEFINE(_PR_NEED_H_ERRNO)
|
2001-01-28 01:55:12 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
|
|
|
|
AC_DEFINE(HAVE_INT_LOCALTIME_R)
|
|
|
|
fi
|
|
|
|
|
2003-02-26 05:00:33 +03:00
|
|
|
if echo "$OS_RELEASE" | egrep '^(B.10.30|B.11)' >/dev/null; then
|
2001-01-28 01:55:12 +03:00
|
|
|
AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
|
|
|
|
fi
|
|
|
|
|
2003-02-26 05:00:33 +03:00
|
|
|
# HP-UX 11i (B.11.11) or higher
|
|
|
|
changequote(<<,>>)
|
|
|
|
case "$OS_RELEASE" in
|
|
|
|
[C-Z]*|B.[2-9]*|B.1[2-9]*|B.11.[2-9]*|B.11.1[1-9]*)
|
|
|
|
USE_IPV6=1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
changequote([,])
|
|
|
|
|
2001-01-28 01:55:12 +03:00
|
|
|
if test "$OS_RELEASE" = "B.10.01"; then
|
1999-11-29 05:15:22 +03:00
|
|
|
AC_DEFINE(HPUX10)
|
2001-01-28 01:55:12 +03:00
|
|
|
DEFAULT_IMPL_STRATEGY=_EMU
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$OS_RELEASE" = "B.10.10"; then
|
1999-11-29 05:15:22 +03:00
|
|
|
AC_DEFINE(HPUX10)
|
|
|
|
AC_DEFINE(HPUX10_10)
|
2001-01-28 01:55:12 +03:00
|
|
|
DEFAULT_IMPL_STRATEGY=_PTH
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$OS_RELEASE" = "B.10.20"; then
|
1999-11-29 05:15:22 +03:00
|
|
|
AC_DEFINE(HPUX10)
|
|
|
|
AC_DEFINE(HPUX10_20)
|
2001-05-16 02:57:39 +04:00
|
|
|
if test -z "$GNU_CC"; then
|
1999-11-29 05:15:22 +03:00
|
|
|
CFLAGS="$CFLAGS +DAportable +DS1.1"
|
|
|
|
CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
|
|
|
|
fi
|
2001-05-16 02:57:39 +04:00
|
|
|
DEFAULT_IMPL_STRATEGY=_PTH
|
2001-01-28 01:55:12 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$OS_RELEASE" = "B.10.30"; then
|
|
|
|
AC_DEFINE(HPUX10)
|
|
|
|
AC_DEFINE(HPUX10_30)
|
2001-05-16 02:57:39 +04:00
|
|
|
if test -z "$GNU_CC"; then
|
1999-11-29 05:15:22 +03:00
|
|
|
CFLAGS="$CFLAGS +DAportable +DS1.1"
|
|
|
|
CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
|
|
|
|
fi
|
2001-01-28 01:55:12 +03:00
|
|
|
DEFAULT_IMPL_STRATEGY=_PTH
|
|
|
|
fi
|
|
|
|
|
2003-02-26 05:00:33 +03:00
|
|
|
if echo "$OS_RELEASE" | grep ^B.11 >/dev/null; then
|
1999-11-29 05:15:22 +03:00
|
|
|
AC_DEFINE(HPUX10)
|
|
|
|
AC_DEFINE(HPUX11)
|
|
|
|
AC_DEFINE(_LARGEFILE64_SOURCE)
|
|
|
|
AC_DEFINE(_PR_HAVE_OFF64_T)
|
2001-05-16 02:57:39 +04:00
|
|
|
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
|
1999-11-29 05:15:22 +03:00
|
|
|
if test -z "$GNU_CC"; then
|
|
|
|
if test -z "$USE_64"; then
|
2002-01-23 05:56:36 +03:00
|
|
|
if test "$OS_TEST" = "ia64"; then
|
|
|
|
CFLAGS="$CFLAGS +DD32"
|
|
|
|
CXXFLAGS="$CXXFLAGS +DD32"
|
|
|
|
else
|
|
|
|
CFLAGS="$CFLAGS +DAportable +DS2.0"
|
|
|
|
CXXFLAGS="$CXXFLAGS +DAportable +DS2.0"
|
|
|
|
fi
|
1999-11-29 05:15:22 +03:00
|
|
|
else
|
2002-01-23 05:56:36 +03:00
|
|
|
if test "$OS_TEST" = "ia64"; then
|
|
|
|
CFLAGS="$CFLAGS +DD64"
|
|
|
|
CXXFLAGS="$CXXFLAGS +DD64"
|
|
|
|
else
|
|
|
|
CFLAGS="$CFLAGS +DA2.0W +DS2.0"
|
|
|
|
CXXFLAGS="$CXXFLAGS +DA2.0W +DS2.0"
|
|
|
|
fi
|
1999-11-29 05:15:22 +03:00
|
|
|
fi
|
|
|
|
fi
|
2001-01-28 01:55:12 +03:00
|
|
|
DEFAULT_IMPL_STRATEGY=_PTH
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$DEFAULT_IMPL_STRATEGY" = "_EMU"; then
|
|
|
|
USE_NSPR_THREADS=1
|
|
|
|
USE_PTHREADS=
|
|
|
|
USE_USER_THREADS=
|
|
|
|
elif test "$DEFAULT_IMPL_STRATEGY" = "_PTH"; then
|
1999-11-29 05:15:22 +03:00
|
|
|
USE_PTHREADS=1
|
2001-05-16 02:57:39 +04:00
|
|
|
if test "$USE_NSPR_THREADS"; then
|
2001-01-28 01:55:12 +03:00
|
|
|
USE_PTHREADS=
|
|
|
|
fi
|
|
|
|
if test "$USE_USER_PTHREADS"; then
|
|
|
|
USE_PTHREADS=
|
|
|
|
fi
|
1999-11-29 05:15:22 +03:00
|
|
|
fi
|
1999-10-14 19:09:11 +04:00
|
|
|
;;
|
|
|
|
|
|
|
|
*-irix*)
|
|
|
|
AC_DEFINE(XP_UNIX)
|
1999-11-22 18:24:12 +03:00
|
|
|
AC_DEFINE(IRIX)
|
|
|
|
AC_DEFINE(SVR4)
|
|
|
|
AC_DEFINE(_SGI_MP_SOURCE)
|
2001-05-17 04:56:25 +04:00
|
|
|
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
|
1999-10-14 19:09:11 +04:00
|
|
|
PR_MD_CSRCS=irix.c
|
|
|
|
PR_MD_ASFILES=os_Irix.s
|
2000-10-26 01:24:11 +04:00
|
|
|
MKSHLIB='$(LD) $(DSO_LDOPTS) -rdata_shared -shared -soname $(notdir $@) -o $@'
|
2001-03-11 14:27:29 +03:00
|
|
|
STRIP="$STRIP -f"
|
2001-05-17 04:56:25 +04:00
|
|
|
RESOLVE_LINK_SYMBOLS=1
|
1999-11-29 07:46:11 +03:00
|
|
|
if test -n "$USE_64"; then
|
|
|
|
MDCPUCFG_H=_irix64.cfg
|
|
|
|
else
|
|
|
|
MDCPUCFG_H=_irix32.cfg
|
|
|
|
fi
|
1999-11-22 18:40:10 +03:00
|
|
|
case "${target_os}" in
|
2001-05-12 09:31:44 +04:00
|
|
|
irix6*)
|
2001-05-17 04:56:25 +04:00
|
|
|
AC_DEFINE(IRIX6)
|
|
|
|
USE_PTHREADS=1
|
|
|
|
USE_N32=1
|
2001-06-14 09:49:20 +04:00
|
|
|
COMPILER_TAG=_n32
|
|
|
|
IMPL_STRATEGY=_PTH
|
2001-05-17 04:56:25 +04:00
|
|
|
;;
|
1999-11-29 05:15:22 +03:00
|
|
|
irix5*)
|
2001-05-17 04:56:25 +04:00
|
|
|
AC_DEFINE(IRIX5)
|
|
|
|
USE_NSPR_THREADS=1
|
|
|
|
;;
|
1999-11-29 05:15:22 +03:00
|
|
|
*)
|
2001-05-17 04:56:25 +04:00
|
|
|
USE_PTHREADS=1
|
|
|
|
USE_N32=1
|
|
|
|
;;
|
|
|
|
esac
|
1999-11-22 18:24:12 +03:00
|
|
|
if test "$GNU_CC"; then
|
2001-06-07 05:15:32 +04:00
|
|
|
dnl
|
|
|
|
dnl If we are using gcc with native binutils, we need to
|
|
|
|
dnl suppress the
|
|
|
|
dnl #lineno "filename" num num
|
|
|
|
dnl lines, which confuse IRIX native as. Add -Wp,-P to the
|
|
|
|
dnl gcc command line, which passes -P to the preprocessor.
|
|
|
|
dnl
|
2001-05-22 17:28:34 +04:00
|
|
|
AS='$(CC) -Wp,-P -x assembler-with-cpp -D_ASM -mips2 $(INCLUDES)'
|
1999-11-29 05:15:22 +03:00
|
|
|
CFLAGS="$CFLAGS -Wall -Wno-format"
|
|
|
|
_OPTIMIZE_FLAGS="-O6"
|
1999-11-22 18:24:12 +03:00
|
|
|
else
|
2000-10-26 01:24:11 +04:00
|
|
|
if test -n "$USE_N32"; then
|
|
|
|
AS='as -D_ASM $(INCLUDES) -n32'
|
|
|
|
else
|
|
|
|
AS='as -D_ASM $(INCLUDES)'
|
|
|
|
fi
|
1999-11-29 05:15:22 +03:00
|
|
|
CFLAGS="$CFLAGS -fullwarn -xansi"
|
|
|
|
if test "$USE_N32"; then
|
|
|
|
_OPTIMIZE_FLAGS="-O -OPT:Olimit=4000"
|
1999-11-22 18:24:12 +03:00
|
|
|
else
|
1999-11-29 05:15:22 +03:00
|
|
|
_OPTIMIZE_FLAGS="-O -Olimit 4000"
|
1999-11-22 18:24:12 +03:00
|
|
|
fi
|
1999-11-29 05:15:22 +03:00
|
|
|
if test "$USE_MDUPDATE"; then
|
2001-05-17 04:56:25 +04:00
|
|
|
CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
|
1999-11-29 05:15:22 +03:00
|
|
|
fi
|
2003-02-26 05:00:33 +03:00
|
|
|
case "${target}" in
|
1999-11-29 05:15:22 +03:00
|
|
|
*-irix6.*)
|
|
|
|
CFLAGS="$CFLAGS -multigot"
|
2000-10-26 01:24:11 +04:00
|
|
|
DSO_LDOPTS="-no_unresolved"
|
|
|
|
if test "$USE_N32"; then
|
1999-11-29 05:15:22 +03:00
|
|
|
CFLAGS="$CFLAGS -n32 -woff 1209"
|
2000-10-26 01:24:11 +04:00
|
|
|
DSO_LDOPTS="$DSO_LDOPTS -n32"
|
1999-11-29 05:15:22 +03:00
|
|
|
else
|
|
|
|
if test "$USE_64"; then
|
|
|
|
CFLAGS="$CFLAGS -64"
|
|
|
|
else
|
|
|
|
CFLAGS="$CFLAGS -32"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
CFLAGS="$CFLAGS -xgot"
|
|
|
|
;;
|
|
|
|
esac
|
1999-11-22 18:24:12 +03:00
|
|
|
fi
|
|
|
|
if test "${target_os}" = "irix5.3"; then
|
1999-11-29 05:15:22 +03:00
|
|
|
AC_DEFINE(IRIX5_3)
|
1999-11-22 18:24:12 +03:00
|
|
|
fi
|
|
|
|
case "${target_os}" in
|
2001-05-17 04:56:25 +04:00
|
|
|
irix6.5)
|
1999-11-22 18:24:12 +03:00
|
|
|
if test -z "$GNU_CC"; then
|
1999-11-29 05:15:22 +03:00
|
|
|
CFLAGS="$CFLAGS -mips3"
|
1999-11-22 18:24:12 +03:00
|
|
|
fi
|
|
|
|
AC_DEFINE(_PR_HAVE_GETPROTO_R)
|
|
|
|
AC_DEFINE(_PR_HAVE_GETPROTO_R_POINTER)
|
1999-12-06 06:28:31 +03:00
|
|
|
AC_DEFINE(_PR_HAVE_SGI_PRDA_PROCMASK)
|
|
|
|
;;
|
|
|
|
irix5*)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_DEFINE(_PR_HAVE_SGI_PRDA_PROCMASK)
|
1999-11-22 18:24:12 +03:00
|
|
|
;;
|
|
|
|
esac
|
1999-10-14 19:09:11 +04:00
|
|
|
;;
|
|
|
|
|
1999-11-29 05:15:22 +03:00
|
|
|
*-linux*)
|
2001-06-14 09:49:20 +04:00
|
|
|
if test -z "$USE_NSPR_THREADS"; then
|
2001-05-16 02:57:39 +04:00
|
|
|
USE_PTHREADS=1
|
2001-06-14 09:49:20 +04:00
|
|
|
IMPL_STRATEGY=_PTH
|
2001-05-16 02:57:39 +04:00
|
|
|
fi
|
1999-11-29 05:15:22 +03:00
|
|
|
AC_DEFINE(XP_UNIX)
|
1999-12-05 02:49:35 +03:00
|
|
|
AC_DEFINE(_POSIX_SOURCE)
|
|
|
|
AC_DEFINE(_BSD_SOURCE)
|
|
|
|
AC_DEFINE(_SVID_SOURCE)
|
2001-06-27 07:00:34 +04:00
|
|
|
AC_DEFINE(_LARGEFILE64_SOURCE)
|
2001-05-16 02:57:39 +04:00
|
|
|
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
|
2000-02-24 02:38:19 +03:00
|
|
|
AC_DEFINE(LINUX)
|
2001-12-03 01:08:42 +03:00
|
|
|
CFLAGS="$CFLAGS -ansi -Wall"
|
|
|
|
CXXFLAGS="$CXXFLAGS -ansi -Wall"
|
1999-11-29 05:15:22 +03:00
|
|
|
MDCPUCFG_H=_linux.cfg
|
|
|
|
PR_MD_CSRCS=linux.c
|
2001-05-22 02:55:09 +04:00
|
|
|
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
|
1999-11-29 07:46:11 +03:00
|
|
|
DSO_CFLAGS=-fPIC
|
2001-05-22 02:55:09 +04:00
|
|
|
DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
|
2001-05-16 02:57:39 +04:00
|
|
|
_OPTIMIZE_FLAGS=-O2
|
2002-08-23 05:11:26 +04:00
|
|
|
_DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
|
|
|
|
# combo is not yet good at debugging inlined
|
|
|
|
# functions (even when using DWARF2 as the
|
|
|
|
# debugging format)
|
2001-06-14 09:49:20 +04:00
|
|
|
COMPILER_TAG=_glibc
|
2001-06-14 10:20:55 +04:00
|
|
|
if echo "$OS_TEST" | grep -c 86 >/dev/null; then
|
|
|
|
CPU_ARCH=x86
|
|
|
|
else
|
|
|
|
CPU_ARCH=$OS_TEST
|
|
|
|
fi
|
|
|
|
CPU_ARCH_TAG=_${CPU_ARCH}
|
1999-11-29 07:46:11 +03:00
|
|
|
case "${target_cpu}" in
|
|
|
|
alpha)
|
|
|
|
AC_DEFINE(_ALPHA_)
|
|
|
|
AC_DEFINE(__alpha)
|
|
|
|
CFLAGS="$CFLAGS -mieee"
|
|
|
|
CXXFLAGS="$CXXFLAGS -mieee"
|
|
|
|
;;
|
2003-03-27 05:21:20 +03:00
|
|
|
i*86)
|
2001-05-16 02:57:39 +04:00
|
|
|
AC_DEFINE(i386)
|
2000-05-02 10:53:54 +04:00
|
|
|
PR_MD_ASFILES=os_Linux_x86.s
|
|
|
|
;;
|
2000-06-21 02:22:23 +04:00
|
|
|
ia64)
|
|
|
|
PR_MD_ASFILES=os_Linux_ia64.s
|
|
|
|
;;
|
1999-11-29 07:46:11 +03:00
|
|
|
m68k)
|
2002-06-14 02:00:29 +04:00
|
|
|
CFLAGS="$CFLAGS -m68020-60"
|
|
|
|
CXXFLAGS="$CXXFLAGS -m68020-60"
|
1999-11-29 07:46:11 +03:00
|
|
|
;;
|
|
|
|
esac
|
1999-11-29 05:15:22 +03:00
|
|
|
;;
|
|
|
|
|
2003-04-19 05:47:57 +04:00
|
|
|
*-mingw*|*-cygwin*|*-msvc*|*-mks*)
|
1999-10-14 19:09:11 +04:00
|
|
|
AC_DEFINE(XP_PC)
|
2001-01-19 12:44:03 +03:00
|
|
|
AC_DEFINE(WIN32)
|
1999-10-14 19:09:11 +04:00
|
|
|
PR_MD_ARCH_DIR=windows
|
2001-05-12 09:31:44 +04:00
|
|
|
RESOLVE_LINK_SYMBOLS=1
|
2002-08-23 05:11:26 +04:00
|
|
|
NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
|
2003-03-22 04:10:47 +03:00
|
|
|
if test `echo "${PATH}" | grep -c \;` = 0; then
|
|
|
|
CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
|
|
|
|
fi
|
2001-01-19 12:44:03 +03:00
|
|
|
|
|
|
|
if test -n "$GNU_CC"; then
|
2003-01-20 19:26:24 +03:00
|
|
|
CC="$CC -mno-cygwin"
|
|
|
|
CXX="$CXX -mno-cygwin"
|
|
|
|
DLL_SUFFIX=dll
|
|
|
|
MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))'
|
|
|
|
RC=$WINDRES
|
|
|
|
RCFLAGS='-O coff'
|
2001-01-19 12:44:03 +03:00
|
|
|
else
|
2003-01-20 19:26:24 +03:00
|
|
|
CC=cl
|
|
|
|
CXX=cl
|
2001-01-19 12:44:03 +03:00
|
|
|
LD=link
|
|
|
|
AR='lib -NOLOGO -OUT:"$@"'
|
|
|
|
AR_FLAGS=
|
|
|
|
RANLIB='echo not_ranlib'
|
2001-01-21 09:42:27 +03:00
|
|
|
STRIP='echo not_strip'
|
2003-01-20 19:26:24 +03:00
|
|
|
RC=rc.exe
|
2001-01-19 12:44:03 +03:00
|
|
|
GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
|
2003-01-20 19:26:24 +03:00
|
|
|
OBJ_SUFFIX=obj
|
|
|
|
LIB_SUFFIX=lib
|
|
|
|
DLL_SUFFIX=dll
|
2001-01-19 12:44:03 +03:00
|
|
|
|
|
|
|
CFLAGS="$CFLAGS -W3 -nologo -GF -Gy"
|
|
|
|
|
2001-05-16 02:57:39 +04:00
|
|
|
if test -n "$MOZ_DEBUG"; then
|
|
|
|
AC_DEFINE(_DEBUG)
|
|
|
|
else
|
|
|
|
DEFINES="$DEFINES -U_DEBUG"
|
|
|
|
fi
|
|
|
|
|
2001-01-19 12:44:03 +03:00
|
|
|
if test -n "$MOZ_OPTIMIZE"; then
|
|
|
|
CFLAGS="$CFLAGS -MD"
|
2001-06-30 19:06:26 +04:00
|
|
|
_OPTIMIZE_FLAGS=-O2
|
2001-01-19 12:44:03 +03:00
|
|
|
DLLFLAGS='-OUT:"$@"'
|
|
|
|
|
|
|
|
if test -n "$MOZ_PROFILE"; then
|
2001-06-30 19:06:26 +04:00
|
|
|
_OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Z7"
|
2001-01-19 12:44:03 +03:00
|
|
|
DLLFLAGS="$DLLFLAGS -DEBUG -DEBUGTYPE:CV"
|
|
|
|
LDFLAGS="$LDFLAGS -DEBUG -DEBUGTYPE:CV"
|
2001-05-12 09:31:44 +04:00
|
|
|
fi
|
2001-01-19 12:44:03 +03:00
|
|
|
else
|
|
|
|
if test -n "$USE_DEBUG_RTL"; then
|
|
|
|
CFLAGS="$CFLAGS -MDd"
|
|
|
|
else
|
|
|
|
CFLAGS="$CFLAGS -MD"
|
|
|
|
fi
|
2001-06-30 19:06:26 +04:00
|
|
|
_DEBUG_FLAGS="-Od -Z7"
|
2001-01-19 12:44:03 +03:00
|
|
|
DLLFLAGS='-DEBUG -DEBUGTYPE:CV -OUT:"$@"'
|
|
|
|
if test -n "$GLOWCODE"; then
|
|
|
|
DLLFLAGS='-DEBUG -DEBUGTYPE:both -INCLUDE:_GlowCode -OUT:"$@"'
|
2001-05-12 09:31:44 +04:00
|
|
|
DLL_LIBS='$(GLOWDIR)/glowcode.lib'
|
2001-01-19 12:44:03 +03:00
|
|
|
fi
|
2001-05-17 05:46:09 +04:00
|
|
|
LDFLAGS="-DEBUG -DEBUGTYPE:CV"
|
2001-01-19 12:44:03 +03:00
|
|
|
if test -n "$PROFILE"; then
|
|
|
|
LDFLAGS="$LDFLAGS -PROFILE -MAP"
|
|
|
|
DLLFLAGS="$DLLFLAGS -PROFILE -MAP"
|
|
|
|
fi
|
|
|
|
fi
|
2001-05-12 09:31:44 +04:00
|
|
|
|
|
|
|
if test "$OS_TARGET" = "WINNT"; then
|
|
|
|
CFLAGS="$CFLAGS -GT"
|
2001-05-17 05:46:09 +04:00
|
|
|
if test "$CPU_ARCH" = "x86"; then
|
|
|
|
CFLAGS="$CFLAGS -G5"
|
|
|
|
fi
|
2001-05-12 09:31:44 +04:00
|
|
|
LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
|
|
|
|
LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
|
|
|
|
else
|
|
|
|
LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
|
|
|
|
LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
|
|
|
|
fi
|
|
|
|
fi # GNU_CC
|
2001-01-19 12:44:03 +03:00
|
|
|
|
2002-04-27 07:12:25 +04:00
|
|
|
if test -n "$USE_STATIC_TLS"; then
|
|
|
|
AC_DEFINE(_PR_USE_STATIC_TLS)
|
|
|
|
fi
|
|
|
|
|
2001-01-19 12:44:03 +03:00
|
|
|
if test "$OS_TARGET" = "WINNT"; then
|
|
|
|
AC_DEFINE(WINNT)
|
|
|
|
else
|
|
|
|
AC_DEFINE(WIN95)
|
2003-01-20 19:26:24 +03:00
|
|
|
# undefine WINNT as some versions of mingw gcc define it by default
|
|
|
|
DEFINES="$DEFINES -UWINNT"
|
2001-01-19 12:44:03 +03:00
|
|
|
AC_DEFINE(_PR_GLOBAL_THREADS_ONLY)
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$CPU_ARCH" = "x86"; then
|
|
|
|
CPU_ARCH_TAG=
|
|
|
|
else
|
|
|
|
CPU_ARCH_TAG=$CPU_ARCH
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -n "$USE_DEBUG_RTL"; then
|
|
|
|
OBJDIR_SUFFIX=OBJD
|
|
|
|
fi
|
|
|
|
|
|
|
|
OS_DLLFLAGS='-nologo -DLL -SUBSYSTEM:WINDOWS -PDB:NONE'
|
|
|
|
|
2001-05-17 06:27:02 +04:00
|
|
|
case "$OS_TARGET" in
|
1999-10-14 19:09:11 +04:00
|
|
|
WINNT)
|
1999-11-29 05:15:22 +03:00
|
|
|
MDCPUCFG_H=_winnt.cfg
|
|
|
|
;;
|
1999-10-14 19:09:11 +04:00
|
|
|
WIN95)
|
1999-11-29 05:15:22 +03:00
|
|
|
MDCPUCFG_H=_win95.cfg
|
|
|
|
;;
|
1999-10-14 19:09:11 +04:00
|
|
|
WIN16)
|
1999-11-29 05:15:22 +03:00
|
|
|
MDCPUCFG_H=_win16.cfg
|
|
|
|
;;
|
1999-10-14 19:09:11 +04:00
|
|
|
*)
|
2001-05-17 06:27:02 +04:00
|
|
|
AC_MSG_ERROR([Missing OS_TARGET for ${target}. Use --enable-win32-target to set.])
|
1999-10-14 19:09:11 +04:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2001-01-29 08:36:31 +03:00
|
|
|
case "$target_cpu" in
|
2003-03-27 05:21:20 +03:00
|
|
|
i*86)
|
1999-11-29 05:15:22 +03:00
|
|
|
AC_DEFINE(_X86_)
|
1999-10-14 19:09:11 +04:00
|
|
|
;;
|
2001-01-29 08:36:31 +03:00
|
|
|
alpha)
|
1999-11-29 05:15:22 +03:00
|
|
|
AC_DEFINE(_ALPHA_)
|
|
|
|
;;
|
2001-01-29 08:36:31 +03:00
|
|
|
mips)
|
1999-11-29 05:15:22 +03:00
|
|
|
AC_DEFINE(_MIPS_)
|
|
|
|
;;
|
1999-10-14 19:09:11 +04:00
|
|
|
*)
|
1999-11-29 05:15:22 +03:00
|
|
|
AC_DEFINE(_CPU_ARCH_NOT_DEFINED)
|
|
|
|
;;
|
1999-10-14 19:09:11 +04:00
|
|
|
esac
|
2001-01-19 12:44:03 +03:00
|
|
|
|
1999-10-14 19:09:11 +04:00
|
|
|
;;
|
1999-11-23 09:23:52 +03:00
|
|
|
|
2001-01-29 08:36:31 +03:00
|
|
|
*-ncr-sysv*)
|
|
|
|
AC_DEFINE(XP_UNIX)
|
|
|
|
AC_DEFINE(SVR4)
|
|
|
|
AC_DEFINE(SYSV)
|
|
|
|
AC_DEFINE(NCR)
|
|
|
|
USE_NSPR_THREADS=1
|
|
|
|
if test "$OS_RELEASE" = "2.03"; then
|
|
|
|
AC_DEFINE(_PR_STAT_HAS_ST_ATIM)
|
|
|
|
else
|
|
|
|
AC_DEFINE(_PR_STAT_HAS_ST_ATIM_UNION)
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -z "$GNU_CC"; then
|
|
|
|
CFLAGS="$CFLAGS -Hnocopyr"
|
|
|
|
CXXFLAGS="$CXXFLAGS -Hnocopyr"
|
|
|
|
else
|
2001-12-03 01:08:42 +03:00
|
|
|
CFLAGS="$CFLAGS -fPIC -Wall"
|
|
|
|
CXXFLAGS="$CXXFLAGS -fPIC -Wall"
|
2001-01-29 08:36:31 +03:00
|
|
|
DSO_LDOPTS=-G
|
|
|
|
fi
|
2001-05-12 09:31:44 +04:00
|
|
|
MDCPUCFG_H=_ncr.cfg
|
|
|
|
PR_MD_CSRCS=ncr.c
|
2001-01-29 08:36:31 +03:00
|
|
|
;;
|
|
|
|
|
|
|
|
mips-nec-sysv*)
|
|
|
|
AC_DEFINE(XP_UNIX)
|
|
|
|
AC_DEFINE(SVR4)
|
|
|
|
AC_DEFINE(__SVR4)
|
|
|
|
AC_DEFINE(NEC)
|
|
|
|
AC_DEFINE(nec_ews)
|
|
|
|
USE_NSPR_THREADS=1
|
|
|
|
if test -z "$GNU_CC"; then
|
|
|
|
CC='$(NSDEPTH)/build/hcc cc -Xa -KGnum=0 -KOlimit=4000'
|
|
|
|
CXX=g++
|
|
|
|
fi
|
|
|
|
OS_LIBS="$OS_LIBS -lsocket -lnsl -ldl"
|
|
|
|
DSO_LDOPTS=-G
|
2001-05-12 09:31:44 +04:00
|
|
|
MDCPUCFG_H=_nec.cfg
|
|
|
|
PR_MD_CSRCS=nec.c
|
2001-01-29 08:36:31 +03:00
|
|
|
;;
|
|
|
|
|
|
|
|
*-netbsd*)
|
|
|
|
AC_DEFINE(XP_UNIX)
|
|
|
|
AC_DEFINE(NETBSD)
|
|
|
|
AC_DEFINE(HAVE_BSD_FLOCK)
|
2001-06-06 20:05:57 +04:00
|
|
|
USE_NSPR_THREADS=1
|
|
|
|
MDCPUCFG_H=_netbsd.cfg
|
|
|
|
PR_MD_CSRCS=netbsd.c
|
|
|
|
|
|
|
|
DSO_CFLAGS='-fPIC -DPIC'
|
2001-12-03 01:08:42 +03:00
|
|
|
CFLAGS="$CFLAGS -ansi -Wall"
|
|
|
|
CXXFLAGS="$CXXFLAGS -ansi -Wall"
|
2001-06-06 20:05:57 +04:00
|
|
|
MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
|
|
|
|
|
2001-01-29 08:36:31 +03:00
|
|
|
if test -z "$OBJECT_FMT"; then
|
|
|
|
if echo __ELF__ | ${CC-cc} -E - | grep -q __ELF__ 2>/dev/null; then
|
2001-06-06 20:05:57 +04:00
|
|
|
OBJECT_FMT=a.out
|
|
|
|
DLL_SUFFIX=so.1.0
|
|
|
|
DSO_LDOPTS='-shared'
|
2001-01-29 08:36:31 +03:00
|
|
|
else
|
|
|
|
OBJECT_FMT=ELF
|
2001-06-06 20:05:57 +04:00
|
|
|
DLL_SUFFIX=so
|
|
|
|
DSO_LDOPTS='-shared -Wl,-soname,$(notdir $@)'
|
2001-01-29 08:36:31 +03:00
|
|
|
fi
|
|
|
|
fi
|
2001-06-06 20:05:57 +04:00
|
|
|
|
2001-01-29 08:36:31 +03:00
|
|
|
if test "$LIBRUNPATH"; then
|
2001-06-06 20:05:57 +04:00
|
|
|
DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
|
2001-01-29 08:36:31 +03:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
|
|
|
mips-sony-newsos*)
|
|
|
|
AC_DEFINE(XP_UNIX)
|
|
|
|
AC_DEFINE(SONY)
|
|
|
|
AC_DEFINE(SYSV)
|
|
|
|
AC_DEFINE(SVR4)
|
|
|
|
AC_DEFINE(__svr4)
|
|
|
|
AC_DEFINE(__svr4__)
|
|
|
|
AC_DEFINE(HAVE_SVID_GETTOD)
|
|
|
|
USE_NSPR_THREADS=1
|
|
|
|
CFLAGS="$CFLAGS -Xa -fullwarn"
|
|
|
|
CXXFLAGS="$CXXFLAGS -Xa -fullwarn"
|
|
|
|
DSO_LDOPTS=-G
|
2001-05-12 09:31:44 +04:00
|
|
|
MDCPUCFG_H=_sony.cfg
|
|
|
|
PR_MD_CSRCS=sony.c
|
2001-01-29 08:36:31 +03:00
|
|
|
;;
|
|
|
|
|
|
|
|
*-nextstep*|*-openstep*)
|
|
|
|
AC_DEFINE(XP_UNIX)
|
|
|
|
AC_DEFINE(NEXTSTEP)
|
|
|
|
AC_DEFINE(HAVE_BSD_FLOCK)
|
|
|
|
AC_DEFINE(_POSIX_SOURCE)
|
2001-12-03 01:08:42 +03:00
|
|
|
CFLAGS="$CFLAGS -Wall -fno-common -traditional-cpp -posix"
|
|
|
|
CXXFLAGS="$CXXFLAGS -Wall -fno-common -traditional-cpp -posix"
|
2001-01-29 08:36:31 +03:00
|
|
|
USE_NSPR_THREADS=1
|
|
|
|
DLL_SUFFIX=dylib
|
2001-05-12 09:31:44 +04:00
|
|
|
MDCPUCFG_H=_nextstep.cfg
|
|
|
|
PR_MD_CSRCS=nextstep.c
|
2001-01-29 08:36:31 +03:00
|
|
|
;;
|
|
|
|
|
|
|
|
|
1999-11-29 05:15:22 +03:00
|
|
|
*-nto*)
|
|
|
|
AC_DEFINE(XP_UNIX)
|
2001-01-29 08:36:31 +03:00
|
|
|
AC_DEFINE(NTO)
|
|
|
|
AC_DEFINE(_QNX_SOURCE)
|
|
|
|
AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
|
1999-11-29 05:15:22 +03:00
|
|
|
MDCPUCFG_H=_nto.cfg
|
|
|
|
PR_MD_CSRCS=nto.c
|
2001-10-18 00:50:51 +04:00
|
|
|
MKSHLIB='$(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(notdir $@) -o $@'
|
|
|
|
DSO_CFLAGS=-fPIC
|
|
|
|
DSO_LDOPTS=-shared
|
2001-01-29 08:36:31 +03:00
|
|
|
OS_LIBS="$OS_LIBS -lsocket"
|
2000-07-08 15:25:25 +04:00
|
|
|
_OPTIMIZE_FLAGS="-O1"
|
2001-10-18 00:50:51 +04:00
|
|
|
_DEBUG_FLAGS="-gstabs"
|
1999-11-29 05:15:22 +03:00
|
|
|
;;
|
|
|
|
|
2001-01-29 08:36:31 +03:00
|
|
|
*-openbsd*)
|
|
|
|
AC_DEFINE(XP_UNIX)
|
|
|
|
AC_DEFINE(OPENBSD)
|
|
|
|
AC_DEFINE(HAVE_BSD_FLOCK)
|
2001-12-03 01:08:42 +03:00
|
|
|
CFLAGS="$CFLAGS -ansi -Wall"
|
|
|
|
CXXFLAGS="$CXXFLAGS -ansi -Wall"
|
2001-01-29 08:36:31 +03:00
|
|
|
DLL_SUFFIX=so.1.0
|
|
|
|
DSO_CFLAGS=-fPIC
|
2001-03-07 07:20:28 +03:00
|
|
|
MDCPUCFG_H=_openbsd.cfg
|
|
|
|
PR_MD_CSRCS=openbsd.c
|
2001-05-12 09:31:44 +04:00
|
|
|
USE_NSPR_THREADS=1
|
2001-01-29 08:36:31 +03:00
|
|
|
case "$OS_TEST" in
|
|
|
|
alpha|mips|pmax)
|
|
|
|
DSO_LDOPTS=-shared ;;
|
|
|
|
*)
|
|
|
|
DSO_LDOPTS=-Bshareable ;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
|
|
|
|
*-openvms*)
|
|
|
|
AC_DEFINE(XP_UNIX)
|
|
|
|
AC_DEFINE(VMS)
|
2003-04-30 04:44:16 +04:00
|
|
|
AC_DEFINE(PR_GETIPNODE_NOT_THREADSAFE)
|
2001-02-26 00:50:47 +03:00
|
|
|
RESOLVE_LINK_SYMBOLS=1
|
2002-12-12 04:41:31 +03:00
|
|
|
AR_FLAGS='c $@'
|
2001-02-26 00:50:47 +03:00
|
|
|
MDCPUCFG_H=_openvms.cfg
|
|
|
|
PR_MD_CSRCS=openvms.c
|
2002-12-12 04:41:31 +03:00
|
|
|
DSO_LDOPTS='-shared -auto_symvec $(LDFLAGS)'
|
|
|
|
if test -n "$MOZ_DEBUG"; then
|
|
|
|
DSO_LDOPTS="$DSO_LDOPTS $_DEBUG_FLAGS"
|
|
|
|
else
|
|
|
|
DSO_LDOPTS="$DSO_LDOPTS $_OPTIMIZE_FLAGS"
|
|
|
|
fi
|
2001-01-29 08:36:31 +03:00
|
|
|
;;
|
|
|
|
|
2001-04-17 03:21:31 +04:00
|
|
|
*-osf*)
|
2001-05-17 04:56:25 +04:00
|
|
|
SHELL_OVERRIDE="SHELL = /usr/bin/ksh"
|
2001-01-29 08:36:31 +03:00
|
|
|
AC_DEFINE(XP_UNIX)
|
|
|
|
AC_DEFINE(OSF1)
|
2001-05-17 04:56:25 +04:00
|
|
|
AC_DEFINE(_REENTRANT)
|
2003-01-20 23:52:48 +03:00
|
|
|
# OSF1 and HPUX report the POLLHUP event for a socket when the
|
|
|
|
# shutdown(SHUT_WR) operation is called for the remote end, even though
|
|
|
|
# the socket is still writeable. Use select(), instead of poll(), to
|
|
|
|
# workaround this problem.
|
|
|
|
AC_DEFINE(_PR_POLL_WITH_SELECT)
|
2001-01-29 08:36:31 +03:00
|
|
|
|
|
|
|
if echo "$OS_RELEASE" | egrep -c '(V2.0|V3.2)' 2>/dev/null ; then
|
|
|
|
USE_NSPR_THREADS=1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -z "$GNU_CC"; then
|
|
|
|
CC="$CC -std1 -ieee_with_inexact"
|
2001-05-17 04:56:25 +04:00
|
|
|
if test "$OS_RELEASE" != "V2.0"; then
|
2001-01-29 08:36:31 +03:00
|
|
|
CC="$CC -readonly_strings"
|
|
|
|
fi
|
2001-05-17 04:56:25 +04:00
|
|
|
_OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
|
2002-06-14 07:24:33 +04:00
|
|
|
AC_CHECK_HEADER(machine/builtins.h, AC_DEFINE(OSF1_HAVE_MACHINE_BUILTINS_H))
|
2002-06-14 09:05:59 +04:00
|
|
|
else
|
|
|
|
CFLAGS="$CFLAGS -mieee"
|
|
|
|
CXXFLAGS="$CXXFLAGS -mieee"
|
2001-01-29 08:36:31 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
|
|
|
|
AC_DEFINE(HAVE_INT_LOCALTIME_R)
|
|
|
|
else
|
2001-05-17 04:56:25 +04:00
|
|
|
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
|
2001-01-29 08:36:31 +03:00
|
|
|
AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
|
2001-05-17 04:56:25 +04:00
|
|
|
fi
|
|
|
|
if echo $OS_RELEASE | grep -c V4.0 >/dev/null; then
|
|
|
|
AC_DEFINE(OSF1V4_MAP_PRIVATE_BUG)
|
2001-01-29 08:36:31 +03:00
|
|
|
fi
|
|
|
|
DSO_LDOPTS='-shared -all -expect_unresolved "*" -soname $(notdir $@)'
|
2001-05-12 09:31:44 +04:00
|
|
|
MDCPUCFG_H=_osf1.cfg
|
|
|
|
PR_MD_CSRCS=osf1.c
|
2001-01-29 08:36:31 +03:00
|
|
|
;;
|
|
|
|
|
|
|
|
*-qnx*)
|
|
|
|
AC_DEFINE(XP_UNIX)
|
|
|
|
AC_DEFINE(QNX)
|
|
|
|
AC_DEFINE(_PR_NEED_H_ERRNO)
|
|
|
|
USE_NSPR_THREADS=1
|
2001-05-12 09:31:44 +04:00
|
|
|
MDCPUCFG_H=_qnx.cfg
|
|
|
|
PR_MD_CSRCS=qnx.c
|
2001-01-29 08:36:31 +03:00
|
|
|
;;
|
|
|
|
|
|
|
|
*-*-sco*)
|
|
|
|
AC_DEFINE(XP_UNIX)
|
|
|
|
AC_DEFINE(SCO)
|
|
|
|
AC_DEFINE(sco)
|
|
|
|
AC_DEFINE(SYSV)
|
|
|
|
AC_DEFINE(_SVID3)
|
|
|
|
AC_DEFINE(_PR_NEED_H_ERRNO)
|
|
|
|
CC='cc -b elf -KPIC'
|
|
|
|
CXX='$(NSDEPTH)/build/hcpp CC +.cpp +w'
|
|
|
|
USE_NSPR_THREADS=1
|
|
|
|
CPU_ARCH=x86
|
|
|
|
DSO_LDOPTS='-b elf -G'
|
2001-05-12 09:31:44 +04:00
|
|
|
MDCPUCFG_H=_scoos.cfg
|
|
|
|
PR_MD_SRCS=scoos.c
|
2001-01-29 08:36:31 +03:00
|
|
|
;;
|
|
|
|
|
|
|
|
*-sinix*)
|
|
|
|
AC_DEFINE(XP_UNIX)
|
|
|
|
AC_DEFINE(SVR4)
|
|
|
|
AC_DEFINE(SNI)
|
|
|
|
AC_DEFINE(RELIANTUNIX)
|
|
|
|
AC_DEFINE(sinix)
|
|
|
|
AC_DEFINE(HAVE_SVID_GETTOD)
|
|
|
|
if echo "$OS_TEST" | grep -c 86 2>/dev/null; then
|
|
|
|
AC_DEFINE(i386)
|
|
|
|
CPU_ARCH=x86
|
|
|
|
else
|
|
|
|
CPU_ARCH=mips
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$GNU_CC"; then
|
|
|
|
AS='$(CC) -x assembler-with-cpp'
|
|
|
|
if test "$CPU_ARCH" = "mips"; then
|
|
|
|
LD=gld
|
|
|
|
fi
|
|
|
|
CFLAGS="$CFLAGS -Wall -Wno-format"
|
|
|
|
else
|
|
|
|
AS='/usr/bin/cc'
|
|
|
|
_OPTIMIZE_FLAGS='-O -F Olimit,4000'
|
|
|
|
fi
|
|
|
|
|
|
|
|
DSO_LDOPTS='-G -z defs -h $(@:$(OBJDIR)/%.so=%.so)'
|
|
|
|
|
|
|
|
if test "$OS_RELEASE" = "5.43"; then
|
|
|
|
AC_DEFINE(IP_MULTICAST)
|
|
|
|
fi
|
|
|
|
|
|
|
|
OS_LIBS="$OS_LIBS -lsocket -lnsl -lresolv -ldl -lc"
|
|
|
|
USE_NSPR_THREADS=1
|
2001-05-12 09:31:44 +04:00
|
|
|
MDCPUCFG_H=_reliantunix.cfg
|
|
|
|
PR_MD_CSRCS=reliantunix.c
|
|
|
|
if test "${OS_ARCH}" = "mips"; then
|
|
|
|
PR_MD_ASFILES=os_ReliantUNIX.s
|
|
|
|
fi
|
2001-01-29 08:36:31 +03:00
|
|
|
;;
|
|
|
|
|
|
|
|
*-sunos*)
|
|
|
|
AC_DEFINE(XP_UNIX)
|
|
|
|
AC_DEFINE(SUNOS4)
|
|
|
|
CFLAGS="$CFLAGS -Wall -Wno-format"
|
|
|
|
if test "$USE_MDUPDATE"; then
|
|
|
|
CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
|
|
|
|
fi
|
|
|
|
CPU_ARCH=sparc
|
|
|
|
DLL_SUFFIX=so.1.0
|
|
|
|
DSO_LDOPTS=
|
|
|
|
DSO_CFLAGS=-fPIC
|
|
|
|
USE_NSPR_THREADS=1
|
2001-05-12 09:31:44 +04:00
|
|
|
if test "$OS_RELEASE" = "4.1.3_U1"; then
|
|
|
|
_OPTIMIZE_FLAGS=
|
|
|
|
OS_LIBS="$OS_LIBS -lm"
|
|
|
|
fi
|
|
|
|
MDCPUCFG_H=_sunos4.cfg
|
|
|
|
PR_MD_CSRCS=sunos4.c
|
2001-01-29 08:36:31 +03:00
|
|
|
;;
|
|
|
|
|
1999-11-29 07:46:11 +03:00
|
|
|
*-solaris*)
|
2001-05-16 02:57:39 +04:00
|
|
|
if test -z "$USE_USER_THREADS" && test -z "$USE_NATIVE_THREADS"; then
|
|
|
|
USE_PTHREADS=1
|
|
|
|
fi
|
1999-11-29 07:46:11 +03:00
|
|
|
AC_DEFINE(XP_UNIX)
|
|
|
|
AC_DEFINE(SVR4)
|
|
|
|
AC_DEFINE(SYSV)
|
|
|
|
AC_DEFINE(__svr4)
|
|
|
|
AC_DEFINE(__svr4__)
|
|
|
|
AC_DEFINE(SOLARIS)
|
2001-05-16 02:57:39 +04:00
|
|
|
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
|
1999-11-29 07:46:11 +03:00
|
|
|
if test -n "$USE_64"; then
|
1999-12-01 14:25:52 +03:00
|
|
|
MDCPUCFG_H=_solaris64.cfg
|
1999-11-29 07:46:11 +03:00
|
|
|
else
|
1999-12-01 14:25:52 +03:00
|
|
|
MDCPUCFG_H=_solaris32.cfg
|
1999-11-29 07:46:11 +03:00
|
|
|
fi
|
|
|
|
PR_MD_CSRCS=solaris.c
|
2002-09-19 04:11:54 +04:00
|
|
|
LD=/usr/ccs/bin/ld
|
2003-01-08 22:19:01 +03:00
|
|
|
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
|
2003-01-04 05:14:13 +03:00
|
|
|
RESOLVE_LINK_SYMBOLS=1
|
1999-11-29 07:46:11 +03:00
|
|
|
if test -n "$GNU_CC"; then
|
|
|
|
DSO_CFLAGS=-fPIC
|
2003-03-22 18:36:13 +03:00
|
|
|
if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
|
|
|
|
GCC_USE_GNU_LD=1
|
|
|
|
fi
|
|
|
|
DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs'
|
1999-11-29 07:46:11 +03:00
|
|
|
else
|
|
|
|
DSO_CFLAGS=-KPIC
|
2003-01-08 22:19:01 +03:00
|
|
|
DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs'
|
1999-11-29 07:46:11 +03:00
|
|
|
fi
|
2000-01-11 08:31:08 +03:00
|
|
|
if test -z "$GNU_AS"; then
|
|
|
|
ASFLAGS="$ASFLAGS -Wa,-P"
|
|
|
|
fi
|
1999-11-29 07:46:11 +03:00
|
|
|
if test -n "$GNU_CC"; then
|
2001-05-16 02:57:39 +04:00
|
|
|
CFLAGS="$CFLAGS -Wall"
|
|
|
|
CXXFLAGS="$CXXFLAGS -Wall"
|
1999-11-29 07:46:11 +03:00
|
|
|
if test -n "$USE_MDUPDATE"; then
|
2001-01-29 08:36:31 +03:00
|
|
|
CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
|
|
|
|
CXXFLAGS="$CXXFLAGS -MDupdate \$(DEPENDENCIES)"
|
1999-11-29 07:46:11 +03:00
|
|
|
fi
|
|
|
|
else
|
2003-01-08 22:19:01 +03:00
|
|
|
CFLAGS="$CFLAGS -xstrconst"
|
|
|
|
CXXFLAGS="$CXXFLAGS -Qoption cg -xstrconst"
|
2001-06-15 01:45:39 +04:00
|
|
|
if test -z "$MOZ_OPTIMIZE"; then
|
2001-05-16 02:57:39 +04:00
|
|
|
CFLAGS="$CFLAGS -xs"
|
|
|
|
CXXFLAGS="$CXXFLAGS -xs"
|
|
|
|
fi
|
2003-05-17 00:33:14 +04:00
|
|
|
_OPTIMIZE_FLAGS=-xO4
|
1999-11-29 07:46:11 +03:00
|
|
|
fi
|
|
|
|
if test -n "$USE_64" && test -z "$GNU_CC"; then
|
|
|
|
CC="$CC -xarch=v9"
|
|
|
|
CXX="$CXX -xarch=v9"
|
|
|
|
fi
|
2001-01-29 08:36:31 +03:00
|
|
|
if test "$OS_TEST" = "i86pc"; then
|
1999-11-29 07:46:11 +03:00
|
|
|
AC_DEFINE(i386)
|
2001-06-14 09:49:20 +04:00
|
|
|
CPU_ARCH_TAG=_$OS_TEST
|
2001-05-16 02:57:39 +04:00
|
|
|
# The default debug format, DWARF (-g), is not supported by gcc
|
|
|
|
# on i386-ANY-sysv4/solaris, but the stabs format is. It is
|
|
|
|
# assumed that the Solaris assembler /usr/ccs/bin/as is used.
|
|
|
|
# If your gcc uses GNU as, you do not need the -Wa,-s option.
|
1999-11-29 07:46:11 +03:00
|
|
|
if test -n "$MOZ_DEBUG" && test -n "$GNU_CC"; then
|
2001-05-16 02:57:39 +04:00
|
|
|
_DEBUG_FLAGS=-gstabs
|
2000-01-11 08:31:08 +03:00
|
|
|
if test -z "$GNU_AS"; then
|
|
|
|
_DEBUG_FLAGS="$_DEBUG_FLAGS -Wa,-s"
|
|
|
|
fi
|
1999-11-29 07:46:11 +03:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
case "${target_os}" in
|
|
|
|
solaris2.3*)
|
|
|
|
AC_DEFINE(_PR_NO_LARGE_FILES)
|
|
|
|
;;
|
|
|
|
solaris2.4*)
|
|
|
|
AC_DEFINE(_PR_NO_LARGE_FILES)
|
|
|
|
;;
|
|
|
|
solaris2.5*)
|
|
|
|
AC_DEFINE(SOLARIS2_5)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_DEFINE(_PR_HAVE_OFF64_T)
|
2001-05-16 02:57:39 +04:00
|
|
|
# The lfcompile64(5) man page on Solaris 2.6 says:
|
|
|
|
# For applications that do not wish to conform to the POSIX or
|
|
|
|
# X/Open specifications, the 64-bit transitional interfaces
|
|
|
|
# are available by default. No compile-time flags need to be
|
|
|
|
# set.
|
|
|
|
# But gcc 2.7.2.x fails to define _LARGEFILE64_SOURCE by default.
|
|
|
|
# The native compiler, gcc 2.8.x, and egcs don't have this problem.
|
1999-11-29 07:46:11 +03:00
|
|
|
if test -n "$GNU_CC"; then
|
|
|
|
AC_DEFINE(_LARGEFILE64_SOURCE)
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
2001-01-29 08:36:31 +03:00
|
|
|
if test "$OS_TEST" = "sun4u"; then
|
2001-06-24 05:39:51 +04:00
|
|
|
# 64-bit Solaris requires SPARC V9 architecture, so the following
|
|
|
|
# is not needed.
|
|
|
|
if test -z "$USE_64"; then
|
2003-01-04 05:14:13 +03:00
|
|
|
ULTRASPARC_LIBRARY=nspr_flt
|
2001-06-24 05:39:51 +04:00
|
|
|
fi
|
1999-11-29 07:46:11 +03:00
|
|
|
fi
|
2002-02-26 13:17:10 +03:00
|
|
|
# Purify requires that binaries linked against nspr also
|
|
|
|
# be linked against -lrt (or -lposix4) so add it to OS_LIBS
|
|
|
|
_rev=`uname -r`
|
|
|
|
_librt=`echo $_rev 5.6 | awk '{ if ($1 > $2) print "-lrt"; else print "-lposix4" }'`
|
|
|
|
OS_LIBS="$OS_LIBS $_librt"
|
1999-11-29 07:46:11 +03:00
|
|
|
;;
|
|
|
|
|
2001-01-29 08:36:31 +03:00
|
|
|
*-sco-sysv5*)
|
|
|
|
AC_DEFINE(XP_UNIX)
|
|
|
|
AC_DEFINE(UNIXWARE)
|
|
|
|
AC_DEFINE(SVR4)
|
|
|
|
AC_DEFINE(SYSV)
|
|
|
|
USE_NSPR_THREADS=1
|
|
|
|
if echo $OS_RELEASE | grep -c 2.1 2>/dev/null; then
|
|
|
|
AC_DEFINE(_PR_NO_LARGE_FILES)
|
|
|
|
CC='$(NSDEPTH)/build/hcc cc'
|
|
|
|
CXX='$(NSDEPTH)/build/hcpp CC'
|
2001-05-12 09:31:44 +04:00
|
|
|
MDCPUCFG_H=_unixware.cfg
|
2001-01-29 08:36:31 +03:00
|
|
|
else
|
|
|
|
AC_DEFINE(_LARGEFILE64_SOURCE)
|
|
|
|
AC_DEFINE(_PR_HAVE_OFF64_T)
|
|
|
|
AC_DEFINE(_PR_HAVE_SOCKADDR_LEN)
|
2001-05-12 09:31:44 +04:00
|
|
|
MDCPUCFG_H=_unixware7.cfg
|
2001-01-29 08:36:31 +03:00
|
|
|
fi
|
2001-05-12 09:31:44 +04:00
|
|
|
PR_MD_CSRCS=unixware.c
|
2001-01-29 08:36:31 +03:00
|
|
|
DSO_LDOPTS=-G
|
|
|
|
CPU_ARCH=x86
|
|
|
|
;;
|
|
|
|
|
2001-02-24 08:39:43 +03:00
|
|
|
*-os2*)
|
|
|
|
AC_DEFINE(XP_OS2)
|
|
|
|
AC_DEFINE(XP_PC)
|
2002-03-10 18:22:51 +03:00
|
|
|
AC_DEFINE(BSD_SELECT)
|
2001-02-24 08:39:43 +03:00
|
|
|
AC_DEFINE(_PR_GLOBAL_THREADS_ONLY)
|
|
|
|
LIB_SUFFIX=lib
|
|
|
|
DLL_SUFFIX=dll
|
|
|
|
RC=rc.exe
|
|
|
|
PR_MD_ARCH_DIR=os2
|
|
|
|
PROG_SUFFIX=.exe
|
|
|
|
NSINSTALL=nsinstall
|
2001-02-24 08:43:14 +03:00
|
|
|
MDCPUCFG_H=_os2.cfg
|
|
|
|
RESOLVE_LINK_SYMBOLS=1
|
2001-02-24 08:39:43 +03:00
|
|
|
|
2001-12-03 01:16:28 +03:00
|
|
|
# EMX/GCC build
|
2003-05-14 05:24:08 +04:00
|
|
|
if test -n "$GNU_CC"; then
|
2001-02-24 08:39:43 +03:00
|
|
|
AC_DEFINE(XP_OS2_EMX)
|
|
|
|
AC_DEFINE(OS2)
|
|
|
|
AR=emxomfar
|
|
|
|
AR_FLAGS='-p256 r $@'
|
2003-05-14 05:24:08 +04:00
|
|
|
CFLAGS="$CFLAGS -Wall -Zmtd -Zomf"
|
|
|
|
CXXFLAGS="$CFLAGS -Wall -Zmtd -Zomf"
|
|
|
|
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
|
|
|
|
DSO_CFLAGS=
|
|
|
|
DSO_LDOPTS='-Zomf -Zdll -Zmtd'
|
|
|
|
_OPTIMIZE_FLAGS="-O2 -s"
|
|
|
|
_DEBUG_FLAGS="-g -fno-inline"
|
|
|
|
if test -n "$MOZ_OPTIMIZE"; then
|
|
|
|
DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
|
|
|
|
fi
|
2001-02-24 08:39:43 +03:00
|
|
|
OS_LIBS="-lsocket -lemxio"
|
|
|
|
IMPLIB='emximp -o'
|
2003-05-14 05:24:08 +04:00
|
|
|
FILTER='emxexp -o'
|
|
|
|
|
|
|
|
if test -z "$EMXOMFLD_LINKER"; then
|
|
|
|
# using LINK386.EXE
|
|
|
|
DSO_LDOPTS="$DSO_LDOPTS -Zlinker /NOO"
|
2001-02-24 08:39:43 +03:00
|
|
|
fi
|
2003-05-14 05:24:08 +04:00
|
|
|
|
|
|
|
# GCC for OS/2 currently predefines these, but we don't want them
|
|
|
|
DEFINES="$DEFINES -Uunix -U__unix -U__unix__"
|
|
|
|
|
2001-12-03 01:16:28 +03:00
|
|
|
# Visual Age C++ build
|
2003-05-14 05:24:08 +04:00
|
|
|
elif test "$VACPP" = "yes"; then
|
2001-02-24 08:39:43 +03:00
|
|
|
AC_DEFINE(XP_OS2_VACPP)
|
|
|
|
AC_DEFINE(OS2,4)
|
|
|
|
AC_DEFINE(TCPV40HDRS)
|
|
|
|
AC_DEFINE(_X86_)
|
2003-05-14 05:24:08 +04:00
|
|
|
OBJ_SUFFIX=obj
|
2001-06-23 08:09:19 +04:00
|
|
|
AS=alp
|
|
|
|
ASFLAGS='-Mb'
|
2003-05-14 05:24:08 +04:00
|
|
|
ASM_SUFFIX=asm
|
2001-02-24 08:39:43 +03:00
|
|
|
AR=-ilib
|
|
|
|
AR_FLAGS='/NOL /NOI /O:$(subst /,\\,$@)'
|
2001-06-27 07:02:24 +04:00
|
|
|
CFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9'
|
2001-02-24 08:39:43 +03:00
|
|
|
HOST_CFLAGS="$CFLAGS"
|
2001-06-27 07:02:24 +04:00
|
|
|
OS_CFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9'
|
|
|
|
OS_EXE_CFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9'
|
|
|
|
CXXFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9'
|
2001-02-24 08:39:43 +03:00
|
|
|
OS_LIBS='so32dll.lib tcp32dll.lib'
|
|
|
|
LD='-ilink'
|
|
|
|
MKSHLIB='$(LD) $(DSO_LDOPTS)'
|
|
|
|
IMPLIB='implib -nologo -noignorecase'
|
|
|
|
FILTER='cppfilt -q -B -P'
|
2003-05-14 05:24:08 +04:00
|
|
|
_OPTIMIZE_FLAGS='/O+ /Gl+ /qtune=pentium /qarch=pentium'
|
2001-06-27 07:02:24 +04:00
|
|
|
_DEBUG_FLAGS='/Ti+ '
|
|
|
|
LDFLAGS='/NOL /M /L'
|
|
|
|
DLLFLAGS='/O:$@ /DLL /INC:_dllentry /MAP:$(@:.dll=.map) /L /NOL'
|
|
|
|
EXEFLAGS='/OUT:$@ /PMTYPE:VIO /MAP:$(@:.exe=.map) /L /NOL'
|
2001-02-24 08:39:43 +03:00
|
|
|
if test -n "$MOZ_DEBUG"; then
|
2001-06-27 07:02:24 +04:00
|
|
|
LDFLAGS="$LDFLAGS /DE"
|
|
|
|
DLLFLAGS="$DLLFLAGS /DE"
|
|
|
|
EXEFLAGS="$EXEFLAGS /DE"
|
|
|
|
fi
|
|
|
|
if test -n "$MOZ_OPTIMIZE"; then
|
|
|
|
LDFLAGS="$LDFLAGS /OPTFUNC /EXEPACK:2 /PACKCODE /PACKDATA"
|
|
|
|
DLLFLAGS="$DLLFLAGS /OPTFUNC /EXEPACK:2 /PACKCODE /PACKDATA"
|
|
|
|
EXEFLAGS="$EXEFLAGS /OPTFUNC /EXEPACK:2 /PACKCODE /PACKDATA"
|
2001-02-24 08:39:43 +03:00
|
|
|
fi
|
2001-05-12 09:31:44 +04:00
|
|
|
LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
|
|
|
|
LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
|
2001-12-03 01:16:28 +03:00
|
|
|
fi
|
2001-02-24 08:39:43 +03:00
|
|
|
;;
|
|
|
|
|
1999-11-29 05:15:22 +03:00
|
|
|
*)
|
|
|
|
AC_DEFINE(XP_UNIX)
|
|
|
|
;;
|
|
|
|
|
1999-10-14 19:09:11 +04:00
|
|
|
esac
|
|
|
|
|
2001-01-19 12:44:03 +03:00
|
|
|
if test -z "$SKIP_LIBRARY_CHECKS"; then
|
1999-10-14 19:09:11 +04:00
|
|
|
dnl ========================================================
|
|
|
|
dnl Check for system libraries
|
|
|
|
dnl ========================================================
|
|
|
|
dnl AC_CHECK_LIB(C, main)
|
|
|
|
dnl AC_CHECK_LIB(C_r, main)
|
|
|
|
dnl AC_CHECK_LIB(c, main)
|
|
|
|
dnl AC_CHECK_LIB(c_r, main)
|
|
|
|
dnl AC_CHECK_LIB(dce, main)
|
|
|
|
dnl AC_CHECK_LIB(dl, main)
|
|
|
|
dnl AC_CHECK_LIB(dld, main)
|
|
|
|
dnl AC_CHECK_LIB(gen, main)
|
|
|
|
dnl AC_CHECK_LIB(ip6, main)
|
|
|
|
dnl AC_CHECK_LIB(l, main)
|
|
|
|
dnl AC_CHECK_LIB(m, main)
|
|
|
|
dnl AC_CHECK_LIB(nsl, main)
|
|
|
|
dnl AC_CHECK_LIB(posix4, main)
|
|
|
|
dnl AC_CHECK_LIB(prstrms, main)
|
|
|
|
dnl AC_CHECK_LIB(prstrms_shr, main)
|
|
|
|
dnl AC_CHECK_LIB(pthread, main)
|
|
|
|
dnl AC_CHECK_LIB(pthreads, main)
|
|
|
|
dnl AC_CHECK_LIB(resolv, main)
|
|
|
|
dnl AC_CHECK_LIB(rt, main)
|
|
|
|
dnl AC_CHECK_LIB(socket, main)
|
|
|
|
dnl AC_CHECK_LIB(svld, main)
|
|
|
|
dnl AC_CHECK_LIB(thread, main)
|
|
|
|
dnl AC_CHECK_LIB(vms_jackets, main)
|
|
|
|
|
2001-01-29 08:36:31 +03:00
|
|
|
AC_CHECK_FUNC(dlopen,,[
|
|
|
|
AC_CHECK_LIB(dl, dlopen, [OS_LIBS="-ldl $OS_LIBS"])
|
|
|
|
])
|
|
|
|
|
1999-10-14 19:09:11 +04:00
|
|
|
dnl ========================================================
|
|
|
|
dnl Check for system header files.
|
|
|
|
dnl ========================================================
|
|
|
|
dnl AC_HEADER_DIRENT
|
|
|
|
dnl AC_HEADER_STDC
|
|
|
|
dnl AC_HEADER_SYS_WAIT
|
|
|
|
dnl AC_CHECK_HEADERS(fcntl.h limits.h sys/file.h sys/ioctl.h sys/time.h unistd.h)
|
|
|
|
|
|
|
|
dnl ========================================================
|
|
|
|
dnl Check for typedefs and structs
|
|
|
|
dnl ========================================================
|
|
|
|
dnl AC_C_CONST
|
|
|
|
dnl AC_TYPE_UID_T
|
|
|
|
dnl AC_TYPE_MODE_T
|
|
|
|
dnl AC_TYPE_OFF_T
|
|
|
|
dnl AC_TYPE_PID_T
|
|
|
|
dnl AC_TYPE_SIZE_T
|
|
|
|
dnl AC_STRUCT_ST_BLKSIZE
|
|
|
|
dnl AC_STRUCT_ST_BLOCKS
|
|
|
|
dnl AC_STRUCT_ST_RDEV
|
|
|
|
dnl AC_HEADER_TIME
|
|
|
|
dnl AC_STRUCT_TM
|
|
|
|
|
|
|
|
dnl ========================================================
|
|
|
|
dnl Checks for library functions.
|
|
|
|
dnl ========================================================
|
|
|
|
AC_PROG_GCC_TRADITIONAL
|
|
|
|
AC_CHECK_FUNCS(lchown strerror)
|
|
|
|
|
|
|
|
dnl AC_FUNC_MEMCMP
|
|
|
|
dnl AC_FUNC_MMAP
|
|
|
|
dnl AC_FUNC_SETVBUF_REVERSED
|
|
|
|
dnl AC_FUNC_STRCOLL
|
|
|
|
dnl AC_FUNC_STRFTIME
|
|
|
|
dnl AC_FUNC_UTIME_NULL
|
|
|
|
dnl AC_FUNC_VPRINTF
|
|
|
|
dnl AC_CHECK_FUNCS(ftime getcwd gethostname gettimeofday getwd mkdir mktime putenv rmdir select socket strdup strerror strstr strtol strtoul uname)
|
|
|
|
|
|
|
|
dnl ========================================================
|
|
|
|
dnl Check options
|
|
|
|
dnl ========================================================
|
|
|
|
|
2001-08-12 07:40:04 +04:00
|
|
|
dnl ========================================================
|
|
|
|
dnl =
|
|
|
|
dnl = --enable-strip
|
|
|
|
dnl =
|
|
|
|
dnl = Enable stripping of libs and executables
|
|
|
|
dnl =
|
|
|
|
dnl ========================================================
|
|
|
|
AC_ARG_ENABLE(strip,
|
|
|
|
[ --enable-strip Enable stripping of shared libs and programs],
|
|
|
|
[ ENABLE_STRIP=1 ])
|
|
|
|
|
2002-08-10 08:32:49 +04:00
|
|
|
dnl Check for hpux options
|
|
|
|
case "${target_os}" in
|
|
|
|
hpux*)
|
|
|
|
if test -z "$GNU_CC"; then
|
|
|
|
|
|
|
|
AC_CACHE_CHECK(for +Olit support,
|
|
|
|
ac_cv_hpux_usable_olit_option,
|
|
|
|
dnl since aCC doesn't throw an error on invalid options,
|
|
|
|
dnl we have to test this the hard way
|
|
|
|
[ac_cv_hpux_usable_olit_option=no
|
|
|
|
rm -f conftest*
|
|
|
|
echo 'int main() { return 0; }' | cat > conftest.c
|
|
|
|
${CC-cc} ${CFLAGS} +Olit=all -o conftest conftest.c > conftest.out 2>&1
|
|
|
|
if test $? -eq 0; then
|
|
|
|
if test -z "`egrep -i '(unrecognize|unknown)' conftest.out`"; then
|
|
|
|
ac_cv_hpux_usable_olit_option=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
rm -f conftest*
|
|
|
|
])
|
|
|
|
|
|
|
|
if test "$ac_cv_hpux_usable_olit_option" = "yes"; then
|
|
|
|
CFLAGS="$CFLAGS +Olit=all"
|
|
|
|
CXXFLAGS="$CXXFLAGS +Olit=all"
|
|
|
|
else
|
|
|
|
CFLAGS="$CFLAGS +ESlit"
|
|
|
|
CXXFLAGS="$CXXFLAGS +ESlit"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2001-01-28 01:57:59 +03:00
|
|
|
dnl
|
|
|
|
dnl Apparently, some systems cannot properly check for the pthread
|
|
|
|
dnl library unless <pthread.h> is included so we need to test
|
|
|
|
dnl using it
|
|
|
|
dnl
|
|
|
|
dnl MOZ_CHECK_PTHREADS(lib, success, failure)
|
|
|
|
AC_DEFUN(MOZ_CHECK_PTHREADS,
|
|
|
|
[
|
|
|
|
AC_MSG_CHECKING([for pthread_create in -l$1])
|
|
|
|
echo "
|
|
|
|
#include <pthread.h>
|
2002-05-03 21:39:01 +04:00
|
|
|
void *foo(void *v) { return v; }
|
2001-01-28 01:57:59 +03:00
|
|
|
int main() {
|
|
|
|
pthread_t t;
|
|
|
|
if (!pthread_create(&t, 0, &foo, 0)) {
|
|
|
|
pthread_join(t, 0);
|
|
|
|
}
|
2002-05-03 21:39:01 +04:00
|
|
|
return 0;
|
2001-01-28 01:57:59 +03:00
|
|
|
}" > dummy.c ;
|
|
|
|
echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -l[$1] $LDFLAGS $LIBS" 1>&5;
|
|
|
|
${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -l[$1] $LDFLAGS $LIBS 2>&5;
|
|
|
|
_res=$? ;
|
|
|
|
rm -f dummy.c dummy${ac_exeext} ;
|
|
|
|
if test "$_res" = "0"; then
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
[$2]
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
[$3]
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
|
|
|
MOZ_CHECK_PTHREADS(pthreads,
|
2001-01-17 22:13:44 +03:00
|
|
|
_HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads",
|
2001-01-28 01:57:59 +03:00
|
|
|
MOZ_CHECK_PTHREADS(pthread,
|
2001-01-17 22:13:44 +03:00
|
|
|
_HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread",
|
2001-01-28 01:57:59 +03:00
|
|
|
MOZ_CHECK_PTHREADS(c_r,
|
2001-01-17 22:13:44 +03:00
|
|
|
_HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r",
|
2001-01-28 01:57:59 +03:00
|
|
|
MOZ_CHECK_PTHREADS(c,
|
2001-01-17 22:13:44 +03:00
|
|
|
_HAVE_PTHREADS=1
|
|
|
|
)
|
1999-11-23 00:59:08 +03:00
|
|
|
)
|
|
|
|
)
|
2001-01-17 22:13:44 +03:00
|
|
|
)
|
2001-01-28 01:57:59 +03:00
|
|
|
|
1999-10-14 19:09:11 +04:00
|
|
|
AC_ARG_WITH(pthreads,
|
|
|
|
[ --with-pthreads Use system pthreads library as thread subsystem],
|
1999-11-29 05:15:22 +03:00
|
|
|
[ if test "$withval" = "yes"; then
|
1999-10-14 19:09:11 +04:00
|
|
|
if test -n "$_HAVE_PTHREADS"; then
|
1999-11-29 05:15:22 +03:00
|
|
|
USE_PTHREADS=1
|
|
|
|
USE_USER_PTHREADS=
|
|
|
|
USE_NSPR_THREADS=
|
1999-10-14 19:09:11 +04:00
|
|
|
else
|
1999-11-29 05:15:22 +03:00
|
|
|
AC_MSG_ERROR([ --with-pthreads specified for a system without pthread support ]);
|
1999-10-14 19:09:11 +04:00
|
|
|
fi
|
1999-11-29 05:15:22 +03:00
|
|
|
else
|
1999-10-14 19:09:11 +04:00
|
|
|
USE_PTHREADS=
|
|
|
|
_PTHREAD_LDFLAGS=
|
1999-11-29 05:15:22 +03:00
|
|
|
fi],
|
2002-05-29 12:01:42 +04:00
|
|
|
[ if test -n "$_HAVE_PTHREADS" && test -z "$USE_USER_PTHREADS" && test -z "$USE_NSPR_THREADS"; then
|
1999-10-14 19:09:11 +04:00
|
|
|
USE_PTHREADS=1
|
|
|
|
USE_USER_PTHREADS=
|
|
|
|
USE_NSPR_THREADS=
|
|
|
|
fi])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(user-pthreads,
|
|
|
|
[ --enable-user-pthreads Build using userland pthreads],
|
1999-11-29 05:15:22 +03:00
|
|
|
[ if test "$enableval" = "yes"; then
|
|
|
|
if test -n "$_HAVE_PTHREADS"; then
|
|
|
|
USE_PTHREADS=
|
|
|
|
USE_USER_PTHREADS=1
|
|
|
|
USE_NSPR_THREADS=
|
1999-10-14 19:09:11 +04:00
|
|
|
else
|
1999-11-29 05:15:22 +03:00
|
|
|
AC_MSG_ERROR([ --enable-user-pthreads specified for a system without pthread support ]);
|
1999-10-14 19:09:11 +04:00
|
|
|
fi
|
1999-11-29 05:15:22 +03:00
|
|
|
fi])
|
1999-10-14 19:09:11 +04:00
|
|
|
|
|
|
|
AC_ARG_ENABLE(nspr-threads,
|
|
|
|
[ --enable-nspr-threads Build using classic nspr threads],
|
1999-11-29 05:15:22 +03:00
|
|
|
[ if test "$enableval" = "yes"; then
|
1999-10-14 19:09:11 +04:00
|
|
|
USE_PTHREADS=
|
|
|
|
USE_USER_PTHREADS=
|
|
|
|
USE_NSPR_THREADS=1
|
1999-11-29 05:15:22 +03:00
|
|
|
fi])
|
1999-10-14 19:09:11 +04:00
|
|
|
|
|
|
|
case "$target" in
|
|
|
|
*-beos*)
|
|
|
|
AC_ARG_WITH(bthreads,
|
|
|
|
[ --with-bthreads Use system bthreads library as thread subsystem (BeOS only)],
|
|
|
|
[ if test "$withval" = "yes"; then
|
|
|
|
USE_BTHREADS=1
|
1999-11-29 05:15:22 +03:00
|
|
|
USE_USER_PTHREADS=
|
|
|
|
USE_PTHREADS=
|
|
|
|
fi])
|
1999-10-14 19:09:11 +04:00
|
|
|
;;
|
|
|
|
|
|
|
|
*-solaris*)
|
|
|
|
AC_ARG_WITH(native-threads,
|
|
|
|
[ --with-native-threads Use native system threads as thread subsystem (Solaris only)],
|
1999-11-29 05:15:22 +03:00
|
|
|
[ if test "$withval" = "yes"; then
|
1999-10-14 19:09:11 +04:00
|
|
|
USE_NATIVE_THREADS=1
|
|
|
|
USE_USER_PTHREADS=
|
|
|
|
USE_PTHREADS=
|
1999-11-29 05:15:22 +03:00
|
|
|
fi])
|
1999-10-14 19:09:11 +04:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2001-01-19 12:44:03 +03:00
|
|
|
fi # SKIP_LIBRARY_CHECKS
|
|
|
|
|
1999-10-14 19:09:11 +04:00
|
|
|
AC_ARG_ENABLE(cplus,
|
2001-05-12 09:31:44 +04:00
|
|
|
[ --enable-cplus Enable some c++ api routines],
|
1999-10-14 19:09:11 +04:00
|
|
|
[ if test "$enableval" = "yes"; then
|
1999-11-29 05:15:22 +03:00
|
|
|
USE_CPLUS=1
|
1999-10-14 19:09:11 +04:00
|
|
|
fi])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(ipv6,
|
|
|
|
[ --enable-ipv6 Compile ipv6 support],
|
|
|
|
[ if test "$enableval" = "yes"; then
|
1999-11-29 05:15:22 +03:00
|
|
|
USE_IPV6=1
|
2002-05-07 05:43:40 +04:00
|
|
|
else
|
|
|
|
USE_IPV6=
|
1999-10-14 19:09:11 +04:00
|
|
|
fi])
|
|
|
|
|
2001-01-23 18:55:29 +03:00
|
|
|
|
|
|
|
AC_ARG_ENABLE(boehm,
|
|
|
|
[ --enable-boehm Enable the Boehm Garbage Collector],
|
|
|
|
[ if test "$enableval" = "yes"; then
|
|
|
|
AC_DEFINE(GC_LEAK_DETECTOR)
|
|
|
|
GC_LEAK_DETECTOR=1
|
|
|
|
fi])
|
|
|
|
|
1999-10-14 19:09:11 +04:00
|
|
|
if test -n "$USE_PTHREADS"; then
|
|
|
|
dnl See if -pthread is supported.
|
|
|
|
rm -f conftest*
|
|
|
|
ac_cv_have_dash_pthread=no
|
|
|
|
AC_MSG_CHECKING(whether ${CC-cc} accepts -pthread)
|
|
|
|
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`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
|
|
|
|
ac_cv_have_dash_pthread=yes
|
2002-02-26 12:44:34 +03:00
|
|
|
case "$target_os" in
|
|
|
|
freebsd*)
|
|
|
|
# Freebsd doesn't use -pthread for compiles, it uses them for linking
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
CFLAGS="$CFLAGS -pthread"
|
|
|
|
CXXFLAGS="$CXXFLAGS -pthread"
|
|
|
|
;;
|
|
|
|
esac
|
1999-10-14 19:09:11 +04:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
rm -f conftest*
|
|
|
|
AC_MSG_RESULT($ac_cv_have_dash_pthread)
|
|
|
|
|
2000-10-26 11:53:51 +04:00
|
|
|
dnl
|
|
|
|
dnl See if -pthreads is supported.
|
|
|
|
dnl
|
|
|
|
ac_cv_have_dash_pthreads=no
|
|
|
|
if test "$ac_cv_have_dash_pthread" = "no"; then
|
|
|
|
AC_MSG_CHECKING(whether ${CC-cc} accepts -pthreads)
|
|
|
|
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`" && test -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*
|
|
|
|
AC_MSG_RESULT($ac_cv_have_dash_pthreads)
|
|
|
|
fi
|
|
|
|
|
1999-10-14 19:09:11 +04:00
|
|
|
case "$target" in
|
|
|
|
*-solaris*)
|
2000-10-26 11:53:51 +04:00
|
|
|
if test "$ac_cv_have_dash_pthreads" = "yes"; then
|
2001-01-17 22:13:44 +03:00
|
|
|
_PTHREAD_LDFLAGS=
|
2000-10-26 11:53:51 +04:00
|
|
|
fi
|
1999-11-29 05:15:22 +03:00
|
|
|
;;
|
2002-02-26 12:44:34 +03:00
|
|
|
*-freebsd*)
|
|
|
|
AC_DEFINE(_REENTRANT)
|
|
|
|
AC_DEFINE(_THREAD_SAFE)
|
|
|
|
dnl -pthread links in -lc_r, so don't specify it explicitly.
|
|
|
|
if test "$ac_cv_have_dash_pthread" = "yes"; then
|
|
|
|
_PTHREAD_LDFLAGS="-pthread"
|
|
|
|
else
|
|
|
|
_PTHREAD_LDFLAGS="-lc_r"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*-openbsd*|*-bsdi*|*-netbsd*)
|
1999-11-29 05:15:22 +03:00
|
|
|
AC_DEFINE(_THREAD_SAFE)
|
|
|
|
dnl -pthread links in -lc_r, so don't specify it explicitly.
|
|
|
|
if test "$ac_cv_have_dash_pthread" = "yes"; then
|
2001-01-17 22:13:44 +03:00
|
|
|
_PTHREAD_LDFLAGS=
|
1999-11-29 05:15:22 +03:00
|
|
|
fi
|
|
|
|
;;
|
2001-05-16 02:57:39 +04:00
|
|
|
*-linux*)
|
|
|
|
AC_DEFINE(_REENTRANT)
|
|
|
|
;;
|
1999-10-14 19:09:11 +04:00
|
|
|
esac
|
|
|
|
|
|
|
|
else
|
|
|
|
if test -n "$USE_USER_PTHREADS"; then
|
1999-11-29 05:15:22 +03:00
|
|
|
USE_PTHREADS=
|
|
|
|
USE_NSPR_THREADS=
|
1999-10-14 19:09:11 +04:00
|
|
|
else
|
2001-01-29 08:36:31 +03:00
|
|
|
_PTHREAD_LDFLAGS=
|
1999-10-14 19:09:11 +04:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
dnl Special thread exceptions
|
|
|
|
|
|
|
|
case "$target" in
|
2001-05-12 09:31:44 +04:00
|
|
|
*-aix*)
|
|
|
|
if test -n "$USE_NSPR_THREADS"; then
|
2001-06-06 20:05:57 +04:00
|
|
|
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
|
1999-11-29 05:15:22 +03:00
|
|
|
fi
|
2001-05-12 09:31:44 +04:00
|
|
|
case "$target_os" in
|
|
|
|
aix4.1*)
|
|
|
|
if test -z "$USE_PTHREADS"; then
|
|
|
|
AC_DEFINE(AIX_RENAME_SELECT)
|
|
|
|
fi
|
|
|
|
;;
|
2001-05-16 02:57:39 +04:00
|
|
|
aix4.2*)
|
|
|
|
if test -z "$USE_NSPR_THREADS"; then
|
|
|
|
AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
aix4.3*)
|
2001-05-12 09:31:44 +04:00
|
|
|
if test -z "$USE_NSPR_THREADS"; then
|
|
|
|
AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
|
|
|
|
fi
|
2001-05-16 02:57:39 +04:00
|
|
|
if test -n "$USE_PTHREADS"; then
|
|
|
|
AC_DEFINE(_PR_HAVE_THREADSAFE_GETHOST)
|
|
|
|
fi
|
2001-05-12 09:31:44 +04:00
|
|
|
;;
|
2002-12-12 02:10:41 +03:00
|
|
|
*)
|
|
|
|
if test -z "$USE_NSPR_THREADS"; then
|
|
|
|
AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
|
|
|
|
fi
|
|
|
|
if test -n "$USE_PTHREADS"; then
|
|
|
|
AC_DEFINE(_PR_HAVE_THREADSAFE_GETHOST)
|
|
|
|
fi
|
|
|
|
;;
|
2001-05-12 09:31:44 +04:00
|
|
|
esac
|
1999-11-29 05:15:22 +03:00
|
|
|
;;
|
2001-01-05 02:37:29 +03:00
|
|
|
*-bsdi*)
|
|
|
|
if test -n "$USE_PTHREADS"; then
|
|
|
|
AC_DEFINE(_PR_NEED_PTHREAD_INIT)
|
|
|
|
fi
|
|
|
|
;;
|
2001-05-17 04:56:25 +04:00
|
|
|
*-freebsd*)
|
|
|
|
if test -n "$USE_NSPR_THREADS"; then
|
2001-06-06 20:05:57 +04:00
|
|
|
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
|
2001-05-17 04:56:25 +04:00
|
|
|
fi
|
|
|
|
;;
|
1999-11-29 07:46:11 +03:00
|
|
|
*-hpux*)
|
2001-05-16 02:57:39 +04:00
|
|
|
if test -n "$USE_NSPR_THREADS"; then
|
|
|
|
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
|
|
|
|
fi
|
2001-01-28 01:55:12 +03:00
|
|
|
if test "$USE_PTHREADS"; then
|
|
|
|
if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
|
2001-05-16 02:57:39 +04:00
|
|
|
AC_DEFINE(_REENTRANT)
|
2001-01-28 01:55:12 +03:00
|
|
|
AC_DEFINE(_PR_DCETHREADS)
|
|
|
|
else
|
|
|
|
AC_DEFINE_UNQUOTED(_POSIX_C_SOURCE,199506L)
|
2001-05-16 02:57:39 +04:00
|
|
|
AC_DEFINE(_PR_HAVE_THREADSAFE_GETHOST)
|
2001-01-28 01:55:12 +03:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test "$USE_USER_PTHREADS"; then
|
|
|
|
AC_DEFINE_UNQUOTED(_POSIX_C_SOURCE,199506L)
|
1999-11-29 07:46:11 +03:00
|
|
|
fi
|
|
|
|
;;
|
2001-05-17 04:56:25 +04:00
|
|
|
*-irix*)
|
|
|
|
if test "${target_os}" = "irix6.5"; then
|
|
|
|
if test -n "$USE_PTHREADS"; then
|
|
|
|
AC_DEFINE(_PR_HAVE_GETHOST_R)
|
|
|
|
AC_DEFINE(_PR_HAVE_GETHOST_R_POINTER)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
2001-05-16 02:57:39 +04:00
|
|
|
*-linux*)
|
|
|
|
if test -n "$USE_NSPR_THREADS"; then
|
|
|
|
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
|
|
|
|
fi
|
|
|
|
;;
|
2003-04-19 05:47:57 +04:00
|
|
|
*-mingw*|*-cygwin*|*-msvc*|*-mks*)
|
1999-11-29 05:15:22 +03:00
|
|
|
dnl win32 does not use pthreads
|
|
|
|
USE_PTHREADS=
|
2001-01-17 22:13:44 +03:00
|
|
|
_PTHREAD_LDFLAGS=
|
1999-11-29 05:15:22 +03:00
|
|
|
USE_USER_PTHREADS=
|
|
|
|
;;
|
2002-05-29 12:01:42 +04:00
|
|
|
*-netbsd*|*-openbsd*)
|
2001-06-06 20:05:57 +04:00
|
|
|
if test -n "$USE_NSPR_THREADS"; then
|
|
|
|
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
|
2001-01-29 08:36:31 +03:00
|
|
|
fi
|
2001-06-06 20:05:57 +04:00
|
|
|
;;
|
2001-05-17 04:56:25 +04:00
|
|
|
*-osf*)
|
|
|
|
if test -n "$USE_NSPR_THREADS"; then
|
2001-06-06 20:05:57 +04:00
|
|
|
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
|
2001-05-17 04:56:25 +04:00
|
|
|
fi
|
|
|
|
if test -n "$USE_PTHREADS"; then
|
|
|
|
if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
|
2001-05-22 02:55:09 +04:00
|
|
|
:
|
2001-05-17 04:56:25 +04:00
|
|
|
else
|
|
|
|
AC_DEFINE(_PR_HAVE_THREADSAFE_GETHOST)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
1999-11-29 05:15:22 +03:00
|
|
|
*-solaris*)
|
|
|
|
if test -n "$USE_NATIVE_THREADS"; then
|
|
|
|
AC_DEFINE(_PR_GLOBAL_THREADS_ONLY)
|
|
|
|
else
|
2001-06-06 20:05:57 +04:00
|
|
|
if test -n "$USE_NSPR_THREADS"; then
|
1999-11-29 07:46:11 +03:00
|
|
|
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
|
|
|
|
fi
|
|
|
|
fi
|
2001-06-06 20:05:57 +04:00
|
|
|
if test -z "$USE_NSPR_THREADS"; then
|
1999-11-29 07:46:11 +03:00
|
|
|
AC_DEFINE(_REENTRANT)
|
|
|
|
AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
|
2001-01-29 08:36:31 +03:00
|
|
|
if test "$OS_TEST" = "i86pc"; then
|
1999-11-29 07:46:11 +03:00
|
|
|
PR_MD_ASFILES=os_SunOS_x86.s
|
|
|
|
else
|
|
|
|
PR_MD_ASFILES=os_SunOS.s
|
2001-06-24 05:39:51 +04:00
|
|
|
if test -n "$USE_64"; then
|
|
|
|
PR_MD_ASFILES="$PR_MD_ASFILES os_SunOS_sparcv9.s"
|
1999-11-29 07:46:11 +03:00
|
|
|
fi
|
|
|
|
fi
|
1999-11-29 05:15:22 +03:00
|
|
|
fi
|
|
|
|
;;
|
2001-10-18 00:50:51 +04:00
|
|
|
*-nto*)
|
|
|
|
if test -n "$USE_PTHREADS"; then
|
|
|
|
AC_DEFINE(_PR_HAVE_GETHOST_R)
|
|
|
|
AC_DEFINE(_PR_HAVE_GETHOST_R_POINTER)
|
|
|
|
fi
|
|
|
|
;;
|
1999-10-14 19:09:11 +04:00
|
|
|
esac
|
|
|
|
|
2001-01-17 22:13:44 +03:00
|
|
|
OS_LIBS="$_PTHREAD_LDFLAGS $OS_LIBS"
|
|
|
|
|
2000-12-01 16:21:43 +03:00
|
|
|
dnl If the user passed in arg to --enable-optimize,
|
|
|
|
dnl make sure that we use it.
|
|
|
|
if test -n "$_SAVE_OPTIMIZE_FLAGS"; then
|
|
|
|
_OPTIMIZE_FLAGS="$_SAVE_OPTIMIZE_FLAGS"
|
|
|
|
fi
|
|
|
|
|
1999-11-23 00:59:08 +03:00
|
|
|
if test -n "$MOZ_OPTIMIZE"; then
|
2001-07-01 22:02:46 +04:00
|
|
|
CFLAGS="$CFLAGS $_OPTIMIZE_FLAGS"
|
|
|
|
CXXFLAGS="$CXXFLAGS $_OPTIMIZE_FLAGS"
|
1999-11-22 18:24:12 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test -n "$MOZ_DEBUG"; then
|
2001-07-01 22:02:46 +04:00
|
|
|
CFLAGS="$CFLAGS $_DEBUG_FLAGS"
|
|
|
|
CXXFLAGS="$CXXFLAGS $_DEBUG_FLAGS"
|
1999-11-22 18:24:12 +03:00
|
|
|
fi
|
|
|
|
|
2001-06-14 09:49:20 +04:00
|
|
|
if test -n "$MOZ_OPTIMIZE"; then
|
|
|
|
OBJDIR_TAG=_OPT
|
|
|
|
else
|
|
|
|
OBJDIR_TAG=_DBG
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -n "$USE_64"; then
|
|
|
|
COMPILER_TAG=_64
|
|
|
|
fi
|
|
|
|
|
|
|
|
RELEASE_OBJDIR_NAME="${OS_CONFIG}${CPU_ARCH_TAG}${COMPILER_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}.${OBJDIR_SUFFIX}"
|
|
|
|
|
2003-01-20 19:26:24 +03:00
|
|
|
dnl ========================================================
|
|
|
|
dnl Use cygwin wrapper for win32 builds
|
|
|
|
dnl ========================================================
|
|
|
|
case "$target_os" in
|
2003-04-19 05:47:57 +04:00
|
|
|
mingw*|cygwin*|msvc*|mks*)
|
2003-01-20 19:26:24 +03:00
|
|
|
CC="\$(CYGWIN_WRAPPER) $CC"
|
|
|
|
CXX="\$(CYGWIN_WRAPPER) $CXX"
|
|
|
|
RC="\$(CYGWIN_WRAPPER) $RC"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
1999-10-14 19:09:11 +04:00
|
|
|
dnl ========================================================
|
|
|
|
dnl Substitution of found variables.
|
|
|
|
dnl ========================================================
|
2001-05-17 04:56:25 +04:00
|
|
|
AC_SUBST(SHELL_OVERRIDE)
|
|
|
|
|
1999-10-14 19:09:11 +04:00
|
|
|
AC_SUBST(MOZILLA_CLIENT)
|
|
|
|
AC_SUBST(CC)
|
|
|
|
AC_SUBST(CXX)
|
|
|
|
AC_SUBST(CFLAGS)
|
|
|
|
AC_SUBST(CXXFLAGS)
|
2001-03-09 07:51:09 +03:00
|
|
|
AC_SUBST(CPPFLAGS)
|
1999-10-14 19:09:11 +04:00
|
|
|
AC_SUBST(HOST_CC)
|
|
|
|
AC_SUBST(HOST_CFLAGS)
|
1999-12-03 13:32:18 +03:00
|
|
|
AC_SUBST(LDFLAGS)
|
1999-10-14 19:09:11 +04:00
|
|
|
AC_SUBST(GNU_CC)
|
2003-03-22 18:36:13 +03:00
|
|
|
AC_SUBST(GCC_USE_GNU_LD)
|
2000-10-19 00:03:41 +04:00
|
|
|
AC_SUBST(CROSS_COMPILE)
|
1999-10-14 19:09:11 +04:00
|
|
|
|
2000-09-28 21:47:22 +04:00
|
|
|
AC_SUBST(MOZ_OPTIMIZE)
|
|
|
|
|
1999-10-14 19:09:11 +04:00
|
|
|
AC_SUBST(USE_CPLUS)
|
|
|
|
AC_SUBST(USE_IPV6)
|
1999-11-22 18:24:12 +03:00
|
|
|
AC_SUBST(USE_N32)
|
|
|
|
AC_SUBST(USE_64)
|
2001-05-16 02:57:39 +04:00
|
|
|
AC_SUBST(OBJECT_MODE)
|
2001-01-23 18:55:29 +03:00
|
|
|
AC_SUBST(GC_LEAK_DETECTOR)
|
2001-08-12 07:40:04 +04:00
|
|
|
AC_SUBST(ENABLE_STRIP)
|
1999-11-22 18:24:12 +03:00
|
|
|
|
|
|
|
AC_SUBST(USE_PTHREADS)
|
|
|
|
AC_SUBST(USE_BTHREADS)
|
1999-10-14 19:09:11 +04:00
|
|
|
AC_SUBST(USE_USER_PTHREADS)
|
|
|
|
AC_SUBST(USE_NATIVE_THREADS)
|
|
|
|
AC_SUBST(USE_NSPR_THREADS)
|
|
|
|
|
2001-05-12 09:31:44 +04:00
|
|
|
AC_SUBST(LIBNSPR)
|
|
|
|
AC_SUBST(LIBPLC)
|
|
|
|
|
|
|
|
AC_SUBST(MOD_MAJOR_VERSION)
|
|
|
|
AC_SUBST(MOD_MINOR_VERSION)
|
2003-02-28 04:48:15 +03:00
|
|
|
AC_SUBST(MOD_PATCH_VERSION)
|
1999-10-14 19:09:11 +04:00
|
|
|
AC_SUBST(NSPR_MODNAME)
|
|
|
|
AC_SUBST(MDCPUCFG_H)
|
|
|
|
AC_SUBST(PR_MD_CSRCS)
|
|
|
|
AC_SUBST(PR_MD_ASFILES)
|
|
|
|
AC_SUBST(PR_MD_ARCH_DIR)
|
2001-01-29 08:36:31 +03:00
|
|
|
AC_SUBST(CPU_ARCH)
|
1999-10-14 19:09:11 +04:00
|
|
|
|
|
|
|
AC_SUBST(OBJ_SUFFIX)
|
|
|
|
AC_SUBST(LIB_SUFFIX)
|
|
|
|
AC_SUBST(DLL_SUFFIX)
|
2001-06-23 08:09:19 +04:00
|
|
|
AC_SUBST(ASM_SUFFIX)
|
1999-10-14 19:09:11 +04:00
|
|
|
AC_SUBST(MKSHLIB)
|
1999-11-29 05:15:22 +03:00
|
|
|
AC_SUBST(DSO_CFLAGS)
|
|
|
|
AC_SUBST(DSO_LDOPTS)
|
1999-10-14 19:09:11 +04:00
|
|
|
|
1999-12-03 13:32:18 +03:00
|
|
|
AC_SUBST(OS_TARGET)
|
|
|
|
AC_SUBST(OS_ARCH)
|
|
|
|
AC_SUBST(OS_RELEASE)
|
|
|
|
AC_SUBST(OS_TEST)
|
2002-09-26 16:51:34 +04:00
|
|
|
AC_SUBST(MACOS_DEPLOYMENT_TARGET)
|
1999-12-03 13:32:18 +03:00
|
|
|
|
1999-10-14 19:09:11 +04:00
|
|
|
AC_SUBST(DEFINES)
|
|
|
|
AC_SUBST(DEFS)
|
|
|
|
AC_SUBST(AR)
|
1999-11-23 09:23:52 +03:00
|
|
|
AC_SUBST(AR_FLAGS)
|
1999-11-29 07:46:11 +03:00
|
|
|
AC_SUBST(AS)
|
|
|
|
AC_SUBST(ASFLAGS)
|
2000-02-24 02:38:19 +03:00
|
|
|
AC_SUBST(LD)
|
1999-10-14 19:09:11 +04:00
|
|
|
AC_SUBST(RANLIB)
|
|
|
|
AC_SUBST(PERL)
|
2000-09-30 07:24:19 +04:00
|
|
|
AC_SUBST(STRIP)
|
2001-02-24 08:39:43 +03:00
|
|
|
AC_SUBST(FILTER)
|
|
|
|
AC_SUBST(IMPLIB)
|
1999-10-14 19:09:11 +04:00
|
|
|
|
|
|
|
AC_SUBST(OS_LIBS)
|
1999-12-22 03:07:07 +03:00
|
|
|
AC_SUBST(RESOLVE_LINK_SYMBOLS)
|
1999-11-29 05:15:22 +03:00
|
|
|
AC_SUBST(AIX_LINK_OPTS)
|
|
|
|
AC_SUBST(NOSUCHFILE)
|
|
|
|
AC_SUBST(MOZ_OBJFORMAT)
|
1999-11-29 07:46:11 +03:00
|
|
|
AC_SUBST(ULTRASPARC_LIBRARY)
|
1999-10-14 19:09:11 +04:00
|
|
|
|
2000-12-30 08:44:01 +03:00
|
|
|
AC_SUBST(OBJDIR)
|
|
|
|
AC_SUBST(OBJDIR_NAME)
|
2001-06-14 09:49:20 +04:00
|
|
|
AC_SUBST(RELEASE_OBJDIR_NAME)
|
2000-12-30 08:44:01 +03:00
|
|
|
AC_SUBST(NSINSTALL)
|
|
|
|
AC_SUBST(OPTIMIZER)
|
2001-01-19 12:44:03 +03:00
|
|
|
AC_SUBST(RC)
|
2003-01-20 19:26:24 +03:00
|
|
|
AC_SUBST(RCFLAGS)
|
2001-01-19 12:44:03 +03:00
|
|
|
AC_SUBST(DLLFLAGS)
|
2001-02-24 08:39:43 +03:00
|
|
|
AC_SUBST(EXEFLAGS)
|
2001-01-19 12:44:03 +03:00
|
|
|
AC_SUBST(OS_DLLFLAGS)
|
2002-08-23 05:11:26 +04:00
|
|
|
AC_SUBST(CYGWIN_WRAPPER)
|
2000-12-30 08:44:01 +03:00
|
|
|
|
1999-10-14 19:09:11 +04:00
|
|
|
dnl ========================================================
|
|
|
|
dnl Generate output files.
|
|
|
|
dnl ========================================================
|
2000-03-17 01:46:02 +03:00
|
|
|
MAKEFILES="
|
1999-10-14 19:09:11 +04:00
|
|
|
Makefile
|
|
|
|
config/Makefile
|
|
|
|
config/autoconf.mk
|
|
|
|
config/nsprincl.mk
|
|
|
|
config/nsprincl.sh
|
2001-05-12 09:31:44 +04:00
|
|
|
config/nspr-config
|
1999-10-14 19:09:11 +04:00
|
|
|
lib/Makefile
|
|
|
|
lib/ds/Makefile
|
|
|
|
lib/libc/Makefile
|
|
|
|
lib/libc/include/Makefile
|
|
|
|
lib/libc/src/Makefile
|
2001-11-01 02:49:52 +03:00
|
|
|
lib/tests/Makefile
|
2003-02-04 04:45:28 +03:00
|
|
|
pkg/Makefile
|
|
|
|
pkg/linux/Makefile
|
2003-01-04 05:14:13 +03:00
|
|
|
pkg/solaris/Makefile
|
|
|
|
pkg/solaris/SUNWpr/Makefile
|
|
|
|
pkg/solaris/SUNWprx/Makefile
|
1999-10-14 19:09:11 +04:00
|
|
|
pr/Makefile
|
|
|
|
pr/include/Makefile
|
|
|
|
pr/include/md/Makefile
|
|
|
|
pr/include/obsolete/Makefile
|
|
|
|
pr/include/private/Makefile
|
|
|
|
pr/src/Makefile
|
|
|
|
pr/src/io/Makefile
|
|
|
|
pr/src/linking/Makefile
|
|
|
|
pr/src/malloc/Makefile
|
|
|
|
pr/src/md/Makefile
|
2000-05-10 00:15:18 +04:00
|
|
|
pr/src/md/${PR_MD_ARCH_DIR}/Makefile
|
1999-10-14 19:09:11 +04:00
|
|
|
pr/src/memory/Makefile
|
|
|
|
pr/src/misc/Makefile
|
|
|
|
pr/src/threads/Makefile
|
|
|
|
pr/tests/Makefile
|
|
|
|
pr/tests/dll/Makefile
|
2000-03-17 01:46:02 +03:00
|
|
|
"
|
|
|
|
|
2000-05-09 23:07:28 +04:00
|
|
|
dnl lib/tests/Makefile
|
|
|
|
dnl pr/tests/w16gui/Makefile
|
|
|
|
dnl tools/Makefile
|
|
|
|
|
|
|
|
if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then
|
2000-03-17 01:46:02 +03:00
|
|
|
MAKEFILES="$MAKEFILES pr/src/threads/combined/Makefile"
|
|
|
|
elif test -n "$USE_PTHREADS"; then
|
|
|
|
MAKEFILES="$MAKEFILES pr/src/pthreads/Makefile"
|
|
|
|
elif test -n "$USE_BTHREADS"; then
|
|
|
|
MAKEFILES="$MAKEFILES pr/src/bthreads/Makefile"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -n "$USE_CPLUS"; then
|
|
|
|
MAKEFILES="$MAKEFILES pr/src/cplus/Makefile pr/src/cplus/tests/Makefile"
|
|
|
|
fi
|
1999-10-14 19:09:11 +04:00
|
|
|
|
2001-05-12 09:31:44 +04:00
|
|
|
AC_OUTPUT([$MAKEFILES], [chmod +x config/nspr-config])
|