summaryrefslogtreecommitdiffstats
path: root/src/libs/xpcom18a4/nsprpub/config
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/libs/xpcom18a4/nsprpub/config/.cvsignore11
-rwxr-xr-xsrc/libs/xpcom18a4/nsprpub/config/Makefile.in149
-rw-r--r--src/libs/xpcom18a4/nsprpub/config/autoconf.mk.in113
-rw-r--r--src/libs/xpcom18a4/nsprpub/config/config.mk164
-rw-r--r--src/libs/xpcom18a4/nsprpub/config/libc_r.h158
-rwxr-xr-xsrc/libs/xpcom18a4/nsprpub/config/nfspwd.pl50
-rw-r--r--src/libs/xpcom18a4/nsprpub/config/now.c142
-rw-r--r--src/libs/xpcom18a4/nsprpub/config/nsinstall.c602
-rwxr-xr-xsrc/libs/xpcom18a4/nsprpub/config/nspr-config.in116
-rw-r--r--src/libs/xpcom18a4/nsprpub/config/nspr.m467
-rw-r--r--src/libs/xpcom18a4/nsprpub/config/nsprincl.mk.in5
-rw-r--r--src/libs/xpcom18a4/nsprpub/config/nsprincl.sh.in5
-rw-r--r--src/libs/xpcom18a4/nsprpub/config/pathsub.h78
-rw-r--r--src/libs/xpcom18a4/nsprpub/config/prdepend.h44
-rw-r--r--src/libs/xpcom18a4/nsprpub/config/prmkdir.bat38
-rw-r--r--src/libs/xpcom18a4/nsprpub/config/rules.mk514
-rwxr-xr-xsrc/libs/xpcom18a4/nsprpub/configure6034
-rw-r--r--src/libs/xpcom18a4/nsprpub/configure.in2556
18 files changed, 10846 insertions, 0 deletions
diff --git a/src/libs/xpcom18a4/nsprpub/config/.cvsignore b/src/libs/xpcom18a4/nsprpub/config/.cvsignore
new file mode 100644
index 00000000..bb3ee4bc
--- /dev/null
+++ b/src/libs/xpcom18a4/nsprpub/config/.cvsignore
@@ -0,0 +1,11 @@
+nfspwd
+revdepth
+my_config.mk
+my_overrides.mk
+autoconf.mk
+nsprincl.mk
+nsprincl.sh
+now
+Makefile
+nsinstall
+nspr-config
diff --git a/src/libs/xpcom18a4/nsprpub/config/Makefile.in b/src/libs/xpcom18a4/nsprpub/config/Makefile.in
new file mode 100755
index 00000000..1b83ffa5
--- /dev/null
+++ b/src/libs/xpcom18a4/nsprpub/config/Makefile.in
@@ -0,0 +1,149 @@
+#! gmake
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is the Netscape Portable Runtime (NSPR).
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 1998-2000
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+MOD_DEPTH = ..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+# Indicate that this directory builds build tools.
+INTERNAL_TOOLS = 1
+
+# autoconf.mk must be deleted last (from the top-level directory)
+# because it is included by every makefile.
+DIST_GARBAGE = nsprincl.mk nsprincl.sh nspr-config
+
+RELEASE_BINS = nspr-config
+
+include $(topsrcdir)/config/config.mk
+
+CSRCS = now.c
+
+# This version hasn't been ported for us; the one in mozilla/config has
+ifneq ($(OS_ARCH),OS2)
+CSRCS += nsinstall.c
+
+PLSRCS = nfspwd.pl
+endif
+
+ifeq (,$(CROSS_COMPILE)$(filter-out WINNT OS2,$(OS_ARCH)))
+PROG_SUFFIX = .exe
+else
+PROG_SUFFIX =
+endif
+
+# Temporary workaround to disable the generation of
+# library build time because now.c uses the 'long long'
+# data type that's not available on some platforms.
+ifeq (,$(filter-out NEC NEXTSTEP QNX SCOOS UNIXWARE,$(OS_ARCH)))
+DEFINES += -DOMIT_LIB_BUILD_TIME
+endif
+
+ifeq ($(OS_ARCH), IRIX)
+ ifeq ($(basename $(OS_RELEASE)),6)
+ ifndef NS_USE_GCC
+ ifeq ($(USE_N32),1)
+ XLDOPTS += -n32 -Wl,-woff,85
+ else
+ ifeq ($(USE_64),1)
+ XLDOPTS += -64
+ else
+ XLDOPTS += -32
+ endif
+ endif
+ endif
+ endif
+endif
+
+ifeq ($(OS_ARCH), HP-UX)
+ ifeq ($(USE_64),1)
+ XLDOPTS += +DD64
+ endif
+endif
+
+ifeq ($(MOZ_OS2_TOOLS),EMX)
+XCFLAGS = $(OS_CFLAGS)
+ifeq ($(MOZ_OS2_EMX_OBJECTFORMAT),OMF)
+XLDOPTS = -Zlinker /PM:VIO
+endif
+endif
+
+ifeq ($(MOZ_OS2_TOOLS),PGCC)
+XCFLAGS = $(OS_CFLAGS)
+XLDOPTS = -Zlinker /PM:VIO
+endif
+
+include $(topsrcdir)/config/rules.mk
+
+PROGS = $(OBJDIR)/now$(PROG_SUFFIX)
+
+ifeq (,$(CROSS_COMPILE)$(filter-out OS2 WINNT,$(OS_ARCH)))
+TARGETS = $(PROGS)
+else
+PROGS += $(OBJDIR)/nsinstall$(PROG_SUFFIX)
+TARGETS = $(PROGS) $(PLSRCS:.pl=)
+endif
+
+OUTOPTION = -o # end of the line
+ifeq (,$(filter-out WINNT WIN95,$(OS_TARGET)))
+ifndef NS_USE_GCC
+OUTOPTION = /Fe
+endif
+endif
+
+# Redefine MAKE_OBJDIR for just this directory
+define MAKE_OBJDIR
+if test ! -d $(@D); then rm -rf $(@D); mkdir $(@D); else true; fi
+endef
+
+export:: $(TARGETS)
+ rm -f $(dist_bindir)/nspr-config
+
+$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
+ @$(MAKE_OBJDIR)
+ifeq ($(MOZ_OS2_TOOLS),VACPP)
+ $(LD) $(EXEFLAGS) $<
+else
+ $(CC) $(XCFLAGS) $< $(LDFLAGS) $(XLDOPTS) $(OUTOPTION)$@
+endif
+
+real_install:: nspr.m4
+ $(NSINSTALL) -D $(DESTDIR)$(datadir)/aclocal
+ $(NSINSTALL) -t -m 0644 $< $(DESTDIR)$(datadir)/aclocal
diff --git a/src/libs/xpcom18a4/nsprpub/config/autoconf.mk.in b/src/libs/xpcom18a4/nsprpub/config/autoconf.mk.in
new file mode 100644
index 00000000..92800154
--- /dev/null
+++ b/src/libs/xpcom18a4/nsprpub/config/autoconf.mk.in
@@ -0,0 +1,113 @@
+# -*- Mode: Makefile -*-
+
+INCLUDED_AUTOCONF_MK = 1
+USE_AUTOCONF = 1
+@SHELL_OVERRIDE@
+MOZILLA_CLIENT = @MOZILLA_CLIENT@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+includedir = @includedir@
+libdir = @libdir@
+datadir = @datadir@
+
+dist_prefix = @dist_prefix@
+dist_bindir = @dist_bindir@
+dist_includedir = @dist_includedir@
+dist_libdir = @dist_libdir@
+
+DIST = $(dist_prefix)
+
+RELEASE_OBJDIR_NAME = @RELEASE_OBJDIR_NAME@
+OBJDIR_NAME = @OBJDIR_NAME@
+OBJDIR = @OBJDIR@
+OBJ_SUFFIX = @OBJ_SUFFIX@
+LIB_SUFFIX = @LIB_SUFFIX@
+DLL_SUFFIX = @DLL_SUFFIX@
+ASM_SUFFIX = @ASM_SUFFIX@
+MOD_NAME = @NSPR_MODNAME@
+
+MOD_MAJOR_VERSION = @MOD_MAJOR_VERSION@
+MOD_MINOR_VERSION = @MOD_MINOR_VERSION@
+MOD_PATCH_VERSION = @MOD_PATCH_VERSION@
+
+LIBNSPR = @LIBNSPR@
+LIBPLC = @LIBPLC@
+
+CROSS_COMPILE = @CROSS_COMPILE@
+BUILD_OPT = @MOZ_OPTIMIZE@
+
+USE_CPLUS = @USE_CPLUS@
+USE_IPV6 = @USE_IPV6@
+USE_N32 = @USE_N32@
+USE_64 = @USE_64@
+GC_LEAK_DETECTOR = @GC_LEAK_DETECTOR@
+ENABLE_STRIP = @ENABLE_STRIP@
+
+USE_PTHREADS = @USE_PTHREADS@
+USE_BTHREADS = @USE_BTHREADS@
+PTHREADS_USER = @USE_USER_PTHREADS@
+CLASSIC_NSPR = @USE_NSPR_THREADS@
+
+AS = @AS@
+ASFLAGS = @ASFLAGS@
+CC = @CC@
+CCC = @CXX@
+NS_USE_GCC = @GNU_CC@
+GCC_USE_GNU_LD = @GCC_USE_GNU_LD@
+MSC_VER = @MSC_VER@
+AR = @AR@
+AR_FLAGS = @AR_FLAGS@
+LD = @LD@
+RANLIB = @RANLIB@
+PERL = @PERL@
+RC = @RC@
+RCFLAGS = @RCFLAGS@
+STRIP = @STRIP@
+NSINSTALL = @NSINSTALL@
+FILTER = @FILTER@
+IMPLIB = @IMPLIB@
+CYGWIN_WRAPPER = @CYGWIN_WRAPPER@
+
+OS_CPPFLAGS = @CPPFLAGS@
+OS_CFLAGS = $(OS_CPPFLAGS) @CFLAGS@ $(DSO_CFLAGS)
+OS_CXXFLAGS = $(OS_CPPFLAGS) @CXXFLAGS@ $(DSO_CFLAGS)
+OS_LIBS = @OS_LIBS@
+OS_LDFLAGS = @LDFLAGS@
+OS_DLLFLAGS = @OS_DLLFLAGS@
+DLLFLAGS = @DLLFLAGS@
+EXEFLAGS = @EXEFLAGS@
+OPTIMIZER = @OPTIMIZER@
+
+MKSHLIB = @MKSHLIB@
+DSO_CFLAGS = @DSO_CFLAGS@
+DSO_LDOPTS = @DSO_LDOPTS@
+
+RESOLVE_LINK_SYMBOLS = @RESOLVE_LINK_SYMBOLS@
+
+HOST_CC = @HOST_CC@
+HOST_CFLAGS = @HOST_CFLAGS@
+
+DEFINES = @DEFINES@ @DEFS@
+
+MDCPUCFG_H = @MDCPUCFG_H@
+PR_MD_CSRCS = @PR_MD_CSRCS@
+PR_MD_ASFILES = @PR_MD_ASFILES@
+PR_MD_ARCH_DIR = @PR_MD_ARCH_DIR@
+CPU_ARCH = @CPU_ARCH@
+
+OS_TARGET = @OS_TARGET@
+OS_ARCH = @OS_ARCH@
+OS_RELEASE = @OS_RELEASE@
+OS_TEST = @OS_TEST@
+
+NOSUCHFILE = @NOSUCHFILE@
+AIX_LINK_OPTS = @AIX_LINK_OPTS@
+MOZ_OBJFORMAT = @MOZ_OBJFORMAT@
+ULTRASPARC_LIBRARY = @ULTRASPARC_LIBRARY@
+
+OBJECT_MODE = @OBJECT_MODE@
+ifdef OBJECT_MODE
+export OBJECT_MODE
+endif
diff --git a/src/libs/xpcom18a4/nsprpub/config/config.mk b/src/libs/xpcom18a4/nsprpub/config/config.mk
new file mode 100644
index 00000000..697a6015
--- /dev/null
+++ b/src/libs/xpcom18a4/nsprpub/config/config.mk
@@ -0,0 +1,164 @@
+#! gmake
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is the Netscape Portable Runtime (NSPR).
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 1998-2000
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+# Configuration information for building in the NSPR source module
+
+# Define an include-at-most-once-flag
+NSPR_CONFIG_MK = 1
+
+#
+# The variable definitions in this file are inputs to NSPR's
+# build system. This file, if present, is included at the
+# beginning of config.mk.
+#
+# For example:
+#
+# BUILD_OPT=1
+# USE_PTHREADS=1
+# NS_USE_GCC=
+#
+ifndef topsrcdir
+topsrcdir=$(MOD_DEPTH)
+endif
+
+ifndef srcdir
+srcdir=.
+endif
+
+NFSPWD = $(MOD_DEPTH)/config/nfspwd
+
+CFLAGS = $(CC_ONLY_FLAGS) $(OPTIMIZER) $(OS_CFLAGS)\
+ $(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
+CCCFLAGS = $(CCC_ONLY_FLAGS) $(OPTIMIZER) $(OS_CFLAGS)\
+ $(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
+# For purify
+NOMD_CFLAGS = $(CC_ONLY_FLAGS) $(OPTIMIZER) $(NOMD_OS_CFLAGS)\
+ $(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
+NOMD_CCFLAGS = $(CCC_ONLY_FLAGS) $(OPTIMIZER) $(NOMD_OS_CFLAGS)\
+ $(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
+
+LDFLAGS = $(OS_LDFLAGS)
+
+define MAKE_OBJDIR
+if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi
+endef
+
+LINK_DLL = $(LD) $(OS_DLLFLAGS) $(DLLFLAGS)
+
+ifeq ($(OS_ARCH),Darwin)
+PWD := $(shell pwd)
+endif
+
+ifeq (,$(CROSS_COMPILE)$(filter-out WINNT OS2, $(OS_ARCH)))
+INSTALL = $(NSINSTALL)
+else
+ifeq ($(NSDISTMODE),copy)
+# copy files, but preserve source mtime
+INSTALL = $(NSINSTALL) -t
+else
+ifeq ($(NSDISTMODE),absolute_symlink)
+# install using absolute symbolic links
+ifeq ($(OS_ARCH),Darwin)
+INSTALL = $(NSINSTALL) -L $(PWD)
+else
+INSTALL = $(NSINSTALL) -L `$(NFSPWD)`
+endif
+else
+# install using relative symbolic links
+INSTALL = $(NSINSTALL) -R
+endif
+endif
+endif # (WINNT || OS2) && !CROSS_COMPILE
+
+DEPENDENCIES = $(OBJDIR)/.md
+
+ifdef BUILD_DEBUG_GC
+DEFINES += -DDEBUG_GC
+endif
+
+GARBAGE += $(DEPENDENCIES) core $(wildcard core.[0-9]*)
+
+DIST_GARBAGE += Makefile
+
+####################################################################
+#
+# The NSPR-specific configuration
+#
+####################################################################
+
+DEFINES += -DFORCE_PR_LOG
+
+ifeq ($(_PR_NO_CLOCK_TIMER),1)
+DEFINES += -D_PR_NO_CLOCK_TIMER
+endif
+
+ifeq ($(USE_PTHREADS), 1)
+DEFINES += -D_PR_PTHREADS -UHAVE_CVAR_BUILT_ON_SEM
+endif
+
+ifeq ($(PTHREADS_USER), 1)
+DEFINES += -DPTHREADS_USER -UHAVE_CVAR_BUILT_ON_SEM
+endif
+
+ifeq ($(USE_IPV6),1)
+DEFINES += -D_PR_INET6
+endif
+
+ifeq ($(MOZ_UNICODE),1)
+DEFINES += -DMOZ_UNICODE
+endif
+
+####################################################################
+#
+# Configuration for the release process
+#
+####################################################################
+
+MDIST = /m/dist
+ifeq ($(OS_ARCH),WINNT)
+MDIST = //helium/dist
+MDIST_DOS = $(subst /,\\,$(MDIST))
+endif
+
+# RELEASE_DIR is ns/dist/<module name>
+
+RELEASE_DIR = $(MOD_DEPTH)/dist/release/$(MOD_NAME)
+
+RELEASE_INCLUDE_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/include
+RELEASE_BIN_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/bin
+RELEASE_LIB_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/lib
diff --git a/src/libs/xpcom18a4/nsprpub/config/libc_r.h b/src/libs/xpcom18a4/nsprpub/config/libc_r.h
new file mode 100644
index 00000000..0f66d127
--- /dev/null
+++ b/src/libs/xpcom18a4/nsprpub/config/libc_r.h
@@ -0,0 +1,158 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Netscape Portable Runtime (NSPR).
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/* libc_r.h -- macros, defines, etc. to make using reentrant libc calls */
+/* a bit easier. This was initially done for AIX pthreads, */
+/* but should be usable for anyone... */
+
+/* Most of these use locally defined space instead of static library space. */
+/* Because of this, we use the _INIT_R to declare/allocate space (stack), */
+/* and the plain routines to actually do it..._WARNING_: avoid allocating */
+/* memory wherever possible. Memory allocation is fairly expensive, at */
+/* least on AIX...use arrays instead (which allocate from the stack.) */
+/* I know the names are a bit strange, but I wanted to be fairly certain */
+/* that we didn't have any namespace corruption...in general, the inits are */
+/* R_<name>_INIT_R(), and the actual calls are R_<name>_R(). */
+
+#ifndef _LIBC_R_H
+#define _LIBC_R_H
+
+/************/
+/* strtok */
+/************/
+#define R_STRTOK_INIT_R() \
+ char *r_strtok_r=NULL
+
+#define R_STRTOK_R(return,source,delim) \
+ return=strtok_r(source,delim,&r_strtok_r)
+
+#define R_STRTOK_NORET_R(source,delim) \
+ strtok_r(source,delim,&r_strtok_r)
+
+/**************/
+/* strerror */
+/**************/
+#define R_MAX_STRERROR_LEN_R 8192 /* Straight from limits.h */
+
+#define R_STRERROR_INIT_R() \
+ char r_strerror_r[R_MAX_STRERROR_LEN_R]
+
+#define R_STRERROR_R(val) \
+ strerror_r(val,r_strerror_r,R_MAX_STRERROR_LEN_R)
+
+/*****************/
+/* time things */
+/*****************/
+#define R_ASCTIME_INIT_R() \
+ char r_asctime_r[26]
+
+#define R_ASCTIME_R(val) \
+ asctime_r(val,r_asctime_r)
+
+#define R_CTIME_INIT_R() \
+ char r_ctime_r[26]
+
+#define R_CTIME_R(val) \
+ ctime_r(val,r_ctime_r)
+
+#define R_GMTIME_INIT_R() \
+ struct tm r_gmtime_r
+
+#define R_GMTIME_R(time) \
+ gmtime_r(time,&r_gmtime_r)
+
+#define R_LOCALTIME_INIT_R() \
+ struct tm r_localtime_r
+
+#define R_LOCALTIME_R(val) \
+ localtime_r(val,&r_localtime_r)
+
+/***********/
+/* crypt */
+/***********/
+#include <crypt.h>
+#define R_CRYPT_INIT_R() \
+ CRYPTD r_cryptd_r; \
+ bzero(&r_cryptd_r,sizeof(CRYPTD))
+
+#define R_CRYPT_R(pass,salt) \
+ crypt_r(pass,salt,&r_cryptd_r)
+
+/**************/
+/* pw stuff */
+/**************/
+#define R_MAX_PW_LEN_R 1024
+/* The following must be after the last declaration, but */
+/* before the first bit of code... */
+#define R_GETPWNAM_INIT_R(pw_ptr) \
+ struct passwd r_getpwnam_pw_r; \
+ char r_getpwnam_line_r[R_MAX_PW_LEN_R]; \
+ pw_ptr = &r_getpwnam_pw_r
+
+#define R_GETPWNAM_R(name) \
+ getpwnam_r(name,&r_getpwnam_pw_r,r_getpwnam_line_r,R_MAX_PW_LEN_R)
+
+/*******************/
+/* gethost stuff */
+/*******************/
+#define R_GETHOSTBYADDR_INIT_R() \
+ struct hostent r_gethostbyaddr_r; \
+ struct hostent_data r_gethostbyaddr_data_r
+
+#define R_GETHOSTBYADDR_R(addr,len,type,xptr_ent) \
+ bzero(&r_gethostbyaddr_r,sizeof(struct hostent)); \
+ bzero(&r_gethostbyaddr_data_r,sizeof(struct hostent_data)); \
+ xptr_ent = &r_gethostbyaddr_r; \
+ if (gethostbyaddr_r(addr,len,type, \
+ &r_gethostbyaddr_r,&r_gethostbyaddr_data_r) == -1) { \
+ xptr_ent = NULL; \
+ }
+
+#define R_GETHOSTBYNAME_INIT_R() \
+ struct hostent r_gethostbyname_r; \
+ struct hostent_data r_gethostbyname_data_r
+
+#define R_GETHOSTBYNAME_R(name,xptr_ent) \
+ bzero(&r_gethostbyname_r,sizeof(struct hostent)); \
+ bzero(&r_gethostbyname_data_r,sizeof(struct hostent_data)); \
+ xptr_ent = &r_gethostbyname_r; \
+ if (gethostbyname_r(name, \
+ &r_gethostbyname_r,&r_gethostbyname_data_r) == -1) { \
+ xptr_ent = NULL; \
+ }
+
+#endif /* _LIBC_R_H */
diff --git a/src/libs/xpcom18a4/nsprpub/config/nfspwd.pl b/src/libs/xpcom18a4/nsprpub/config/nfspwd.pl
new file mode 100755
index 00000000..947b822a
--- /dev/null
+++ b/src/libs/xpcom18a4/nsprpub/config/nfspwd.pl
@@ -0,0 +1,50 @@
+#! perl
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is the Netscape Portable Runtime (NSPR).
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 1998-2000
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+require "fastcwd.pl";
+
+$_ = &fastcwd;
+if (m@^/[uh]/@o || s@^/tmp_mnt/@/@o) {
+ print("$_\n");
+} elsif ((($user, $rest) = m@^/usr/people/(\w+)/(.*)@o)
+ && readlink("/u/$user") eq "/usr/people/$user") {
+ print("/u/$user/$rest\n");
+} else {
+ chop($host = `hostname`);
+ print("/h/$host$_\n");
+}
diff --git a/src/libs/xpcom18a4/nsprpub/config/now.c b/src/libs/xpcom18a4/nsprpub/config/now.c
new file mode 100644
index 00000000..f797ef84
--- /dev/null
+++ b/src/libs/xpcom18a4/nsprpub/config/now.c
@@ -0,0 +1,142 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Netscape Portable Runtime (NSPR).
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#if defined(VMS)
+#include <sys/timeb.h>
+#elif defined(XP_UNIX) || defined(XP_OS2_EMX) || defined(XP_BEOS)
+#include <sys/time.h>
+#elif defined(WIN32)
+#include <windows.h>
+#elif defined(XP_OS2_VACPP)
+#include <sys/timeb.h>
+#else
+#error "Architecture not supported"
+#endif
+
+
+int main(int argc, char **argv)
+{
+#if defined(OMIT_LIB_BUILD_TIME)
+ /*
+ * Some platforms don't have any 64-bit integer type
+ * such as 'long long'. Because we can't use NSPR's
+ * PR_snprintf in this program, it is difficult to
+ * print a static initializer for PRInt64 (a struct).
+ * So we print nothing. The makefiles that build the
+ * shared libraries will detect the empty output string
+ * of this program and omit the library build time
+ * in PRVersionDescription.
+ */
+#elif defined(VMS)
+ long long now;
+ struct timeb b;
+ ftime(&b);
+ now = b.time;
+ now *= 1000000;
+ now += (1000 * b.millitm);
+ fprintf(stdout, "%Ld", now);
+#elif defined(XP_UNIX) || defined(XP_OS2_EMX) || defined(XP_BEOS)
+ long long now;
+ struct timeval tv;
+#ifdef HAVE_SVID_GETTOD
+ gettimeofday(&tv);
+#else
+ gettimeofday(&tv, NULL);
+#endif
+ now = ((1000000LL) * tv.tv_sec) + (long long)tv.tv_usec;
+#if defined(OSF1)
+ fprintf(stdout, "%ld", now);
+#elif defined(BEOS) && defined(__POWERPC__)
+ fprintf(stdout, "%Ld", now); /* Metroworks on BeOS PPC */
+#else
+ fprintf(stdout, "%lld", now);
+#endif
+
+#elif defined(WIN32)
+ __int64 now;
+ FILETIME ft;
+ GetSystemTimeAsFileTime(&ft);
+ CopyMemory(&now, &ft, sizeof(now));
+ /*
+ * 116444736000000000 is the number of 100-nanosecond intervals
+ * between Jan. 1, 1601 and Jan. 1, 1970.
+ */
+#ifdef __GNUC__
+ now = (now - 116444736000000000LL) / 10LL;
+ fprintf(stdout, "%lld", now);
+#else
+ now = (now - 116444736000000000i64) / 10i64;
+ fprintf(stdout, "%I64d", now);
+#endif
+
+#elif defined(XP_OS2_VACPP)
+/* no long long or i64 so we use a string */
+#include <string.h>
+ char buf[24];
+ char tbuf[7];
+ time_t now;
+ long mtime;
+ int i;
+
+ struct timeb b;
+ ftime(&b);
+ now = b.time;
+ _ltoa(now, buf, 10);
+
+ mtime = b.millitm * 1000;
+ if (mtime == 0){
+ ++now;
+ strcat(buf, "000000");
+ } else {
+ _ltoa(mtime, tbuf, 10);
+ for (i = strlen(tbuf); i < 6; ++i)
+ strcat(buf, "0");
+ strcat(buf, tbuf);
+ }
+ fprintf(stdout, "%s", buf);
+
+#else
+#error "Architecture not supported"
+#endif
+
+ return 0;
+} /* main */
+
+/* now.c */
diff --git a/src/libs/xpcom18a4/nsprpub/config/nsinstall.c b/src/libs/xpcom18a4/nsprpub/config/nsinstall.c
new file mode 100644
index 00000000..319a9594
--- /dev/null
+++ b/src/libs/xpcom18a4/nsprpub/config/nsinstall.c
@@ -0,0 +1,602 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Netscape Portable Runtime (NSPR).
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+** Netscape portable install command.
+**
+** Brendan Eich, 7/20/95
+*/
+#include <stdio.h> /* OSF/1 requires this before grp.h, so put it first */
+#include <assert.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <utime.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <dirent.h>
+#include <errno.h>
+#include <stdarg.h>
+#ifdef USE_REENTRANT_LIBC
+#include "libc_r.h"
+#endif /* USE_REENTRANT_LIBC */
+
+#include "pathsub.h"
+
+#define HAVE_FCHMOD
+
+#if defined(BEOS)
+#undef HAVE_FCHMOD
+#endif
+
+/*
+ * Does getcwd() take NULL as the first argument and malloc
+ * the result buffer?
+ */
+#if !defined(DARWIN) && !defined(NEXTSTEP) && !defined(VMS)
+#define GETCWD_CAN_MALLOC
+#endif
+
+#ifdef NEXTSTEP
+#include <bsd/libc.h>
+
+/*
+** balazs.pataki@sztaki.hu: The getcwd is broken in NEXTSTEP (returns 0),
+** when called on a mounted fs. Did anyone notice this? Here's an ugly
+** workaround ...
+*/
+#define getcwd(b,s) my_getcwd(b,s)
+
+static char *
+my_getcwd (char *buf, size_t size)
+{
+ FILE *pwd = popen("pwd", "r");
+ char *result = fgets(buf, size, pwd);
+
+ if (result) {
+ buf[strlen(buf)-1] = '\0';
+ }
+ pclose (pwd);
+ return buf;
+}
+#endif /* NEXTSTEP */
+
+#ifdef LINUX
+#include <getopt.h>
+#endif
+
+#if defined(SCO) || defined(UNIXWARE) || defined(SNI) || defined(NCR) || defined(NEC) || defined(NEXTSTEP)
+#if !defined(S_ISLNK) && defined(S_IFLNK)
+#define S_ISLNK(a) (((a) & S_IFMT) == S_IFLNK)
+#endif
+#endif
+
+#if defined(SNI)
+extern int fchmod(int fildes, mode_t mode);
+#endif
+
+#ifdef QNX
+#define d_ino d_stat.st_ino
+#endif
+
+static void
+usage(void)
+{
+ fprintf(stderr,
+ "usage: %s [-C cwd] [-L linkprefix] [-m mode] [-o owner] [-g group]\n"
+ " %*s [-DdltR] file [file ...] directory\n",
+ program, (int)strlen(program), "");
+ exit(2);
+}
+
+static int
+mkdirs(char *path, mode_t mode)
+{
+ char *cp;
+ struct stat sb;
+ int res;
+
+ while (*path == '/' && path[1] == '/')
+ path++;
+ while ((cp = strrchr(path, '/')) && cp[1] == '\0')
+ *cp = '\0';
+ if (cp && cp != path) {
+ *cp = '\0';
+ if ((stat(path, &sb) < 0 || !S_ISDIR(sb.st_mode)) &&
+ mkdirs(path, mode) < 0) {
+ return -1;
+ }
+ *cp = '/';
+ }
+ res = mkdir(path, mode);
+ if ((res != 0) && (errno == EEXIST))
+ return 0;
+ else
+ return res;
+}
+
+static uid_t
+touid(char *owner)
+{
+ struct passwd *pw;
+ uid_t uid;
+ char *cp;
+
+ pw = getpwnam(owner);
+ if (pw)
+ return pw->pw_uid;
+ uid = strtol(owner, &cp, 0);
+ if (uid == 0 && cp == owner)
+ fail("cannot find uid for %s", owner);
+ return uid;
+}
+
+static gid_t
+togid(char *group)
+{
+ struct group *gr;
+ gid_t gid;
+ char *cp;
+
+ gr = getgrnam(group);
+ if (gr)
+ return gr->gr_gid;
+ gid = strtol(group, &cp, 0);
+ if (gid == 0 && cp == group)
+ fail("cannot find gid for %s", group);
+ return gid;
+}
+
+int
+main(int argc, char **argv)
+{
+ int onlydir, dodir, dolink, dorelsymlink, dotimes, opt, len, lplen, tdlen, bnlen, exists, fromfd, tofd, cc, wc;
+ mode_t mode = 0755;
+ char *linkprefix, *owner, *group, *cp, *cwd, *todir, *toname, *name, *base, *linkname, *bp, buf[BUFSIZ];
+ uid_t uid;
+ gid_t gid;
+ struct stat sb, tosb;
+ struct utimbuf utb;
+
+ program = argv[0];
+ cwd = linkname = linkprefix = owner = group = 0;
+ onlydir = dodir = dolink = dorelsymlink = dotimes = lplen = 0;
+
+ while ((opt = getopt(argc, argv, "C:DdlL:Rm:o:g:t")) != EOF) {
+ switch (opt) {
+ case 'C':
+ cwd = optarg;
+ break;
+ case 'D':
+ onlydir = 1;
+ break;
+ case 'd':
+ dodir = 1;
+ break;
+ case 'l':
+ dolink = 1;
+ break;
+ case 'L':
+ linkprefix = optarg;
+ lplen = strlen(linkprefix);
+ dolink = 1;
+ break;
+ case 'R':
+ dolink = dorelsymlink = 1;
+ break;
+ case 'm':
+ mode = strtoul(optarg, &cp, 8);
+ if (mode == 0 && cp == optarg)
+ usage();
+ break;
+ case 'o':
+ owner = optarg;
+ break;
+ case 'g':
+ group = optarg;
+ break;
+ case 't':
+ dotimes = 1;
+ break;
+ default:
+ usage();
+ }
+ }
+
+ argc -= optind;
+ argv += optind;
+ if (argc < 2 - onlydir)
+ usage();
+
+ todir = argv[argc-1];
+ if ((stat(todir, &sb) < 0 || !S_ISDIR(sb.st_mode)) &&
+ mkdirs(todir, 0777) < 0) {
+ fail("cannot make directory %s", todir);
+ }
+ if (onlydir)
+ return 0;
+
+ if (!cwd) {
+#ifdef GETCWD_CAN_MALLOC
+ cwd = getcwd(0, PATH_MAX);
+#else
+ cwd = malloc(PATH_MAX + 1);
+ cwd = getcwd(cwd, PATH_MAX);
+#endif
+ }
+ xchdir(todir);
+#ifdef GETCWD_CAN_MALLOC
+ todir = getcwd(0, PATH_MAX);
+#else
+ todir = malloc(PATH_MAX + 1);
+ todir = getcwd(todir, PATH_MAX);
+#endif
+ tdlen = strlen(todir);
+ xchdir(cwd);
+ tdlen = strlen(todir);
+
+ uid = owner ? touid(owner) : -1;
+ gid = group ? togid(group) : -1;
+
+ while (--argc > 0) {
+ name = *argv++;
+ len = strlen(name);
+ base = xbasename(name);
+ bnlen = strlen(base);
+ toname = (char*)xmalloc(tdlen + 1 + bnlen + 1);
+ sprintf(toname, "%s/%s", todir, base);
+ exists = (lstat(toname, &tosb) == 0);
+
+ if (dodir) {
+ /* -d means create a directory, always */
+ if (exists && !S_ISDIR(tosb.st_mode)) {
+ (void) unlink(toname);
+ exists = 0;
+ }
+ if (!exists && mkdir(toname, mode) < 0)
+ fail("cannot make directory %s", toname);
+ if ((owner || group) && chown(toname, uid, gid) < 0)
+ fail("cannot change owner of %s", toname);
+ } else if (dolink) {
+ if (*name == '/') {
+ /* source is absolute pathname, link to it directly */
+ linkname = 0;
+ } else {
+ if (linkprefix) {
+ /* -L implies -l and prefixes names with a $cwd arg. */
+ len += lplen + 1;
+ linkname = (char*)xmalloc(len + 1);
+ sprintf(linkname, "%s/%s", linkprefix, name);
+ } else if (dorelsymlink) {
+ /* Symlink the relative path from todir to source name. */
+ linkname = (char*)xmalloc(PATH_MAX);
+
+ if (*todir == '/') {
+ /* todir is absolute: skip over common prefix. */
+ lplen = relatepaths(todir, cwd, linkname);
+ strcpy(linkname + lplen, name);
+ } else {
+ /* todir is named by a relative path: reverse it. */
+ reversepath(todir, name, len, linkname);
+ xchdir(cwd);
+ }
+
+ len = strlen(linkname);
+ }
+ name = linkname;
+ }
+
+ /* Check for a pre-existing symlink with identical content. */
+ if (exists &&
+ (!S_ISLNK(tosb.st_mode) ||
+ readlink(toname, buf, sizeof buf) != len ||
+ strncmp(buf, name, len) != 0)) {
+ (void) (S_ISDIR(tosb.st_mode) ? rmdir : unlink)(toname);
+ exists = 0;
+ }
+ if (!exists && symlink(name, toname) < 0)
+ fail("cannot make symbolic link %s", toname);
+#ifdef HAVE_LCHOWN
+ if ((owner || group) && lchown(toname, uid, gid) < 0)
+ fail("cannot change owner of %s", toname);
+#endif
+
+ if (linkname) {
+ free(linkname);
+ linkname = 0;
+ }
+ } else {
+ /* Copy from name to toname, which might be the same file. */
+ fromfd = open(name, O_RDONLY);
+ if (fromfd < 0 || fstat(fromfd, &sb) < 0)
+ fail("cannot access %s", name);
+ if (exists && (!S_ISREG(tosb.st_mode) || access(toname, W_OK) < 0))
+ (void) (S_ISDIR(tosb.st_mode) ? rmdir : unlink)(toname);
+ tofd = open(toname, O_CREAT | O_WRONLY, 0666);
+ if (tofd < 0)
+ fail("cannot create %s", toname);
+
+ bp = buf;
+ while ((cc = read(fromfd, bp, sizeof buf)) > 0) {
+ while ((wc = write(tofd, bp, cc)) > 0) {
+ if ((cc -= wc) == 0)
+ break;
+ bp += wc;
+ }
+ if (wc < 0)
+ fail("cannot write to %s", toname);
+ }
+ if (cc < 0)
+ fail("cannot read from %s", name);
+
+ if (ftruncate(tofd, sb.st_size) < 0)
+ fail("cannot truncate %s", toname);
+ /*
+ ** On OpenVMS we can't chmod() until the file is closed, and we
+ ** have to utime() last since fchown/chmod alter the timestamps.
+ */
+#ifndef VMS
+ if (dotimes) {
+ utb.actime = sb.st_atime;
+ utb.modtime = sb.st_mtime;
+ if (utime(toname, &utb) < 0)
+ fail("cannot set times of %s", toname);
+ }
+#ifdef HAVE_FCHMOD
+ if (fchmod(tofd, mode) < 0)
+#else
+ if (chmod(toname, mode) < 0)
+#endif
+ fail("cannot change mode of %s", toname);
+#endif
+ if ((owner || group) && fchown(tofd, uid, gid) < 0)
+ fail("cannot change owner of %s", toname);
+
+ /* Must check for delayed (NFS) write errors on close. */
+ if (close(tofd) < 0)
+ fail("cannot write to %s", toname);
+ close(fromfd);
+#ifdef VMS
+ if (chmod(toname, mode) < 0)
+ fail("cannot change mode of %s", toname);
+ if (dotimes) {
+ utb.actime = sb.st_atime;
+ utb.modtime = sb.st_mtime;
+ if (utime(toname, &utb) < 0)
+ fail("cannot set times of %s", toname);
+ }
+#endif
+ }
+
+ free(toname);
+ }
+
+ free(cwd);
+ free(todir);
+ return 0;
+}
+
+/*
+** Pathname subroutines.
+**
+** Brendan Eich, 8/29/95
+*/
+
+char *program;
+
+void
+fail(char *format, ...)
+{
+ int error;
+ va_list ap;
+
+#ifdef USE_REENTRANT_LIBC
+ R_STRERROR_INIT_R();
+#endif
+
+ error = errno;
+ fprintf(stderr, "%s: ", program);
+ va_start(ap, format);
+ vfprintf(stderr, format, ap);
+ va_end(ap);
+ if (error)
+
+#ifdef USE_REENTRANT_LIBC
+ R_STRERROR_R(errno);
+ fprintf(stderr, ": %s", r_strerror_r);
+#else
+ fprintf(stderr, ": %s", strerror(errno));
+#endif
+
+ putc('\n', stderr);
+ exit(1);
+}
+
+char *
+getcomponent(char *path, char *name)
+{
+ if (*path == '\0')
+ return 0;
+ if (*path == '/') {
+ *name++ = '/';
+ } else {
+ do {
+ *name++ = *path++;
+ } while (*path != '/' && *path != '\0');
+ }
+ *name = '\0';
+ while (*path == '/')
+ path++;
+ return path;
+}
+
+#ifdef UNIXWARE_READDIR_BUFFER_TOO_SMALL
+/* Sigh. The static buffer in Unixware's readdir is too small. */
+struct dirent * readdir(DIR *d)
+{
+ static struct dirent *buf = NULL;
+#define MAX_PATH_LEN 1024
+
+
+ if(buf == NULL)
+ buf = (struct dirent *) malloc(sizeof(struct dirent) + MAX_PATH_LEN)
+;
+ return(readdir_r(d, buf));
+}
+#endif
+
+char *
+ino2name(ino_t ino, char *dir)
+{
+ DIR *dp;
+ struct dirent *ep;
+ char *name;
+
+ dp = opendir("..");
+ if (!dp)
+ fail("cannot read parent directory");
+ for (;;) {
+ if (!(ep = readdir(dp)))
+ fail("cannot find current directory");
+ if (ep->d_ino == ino)
+ break;
+ }
+ name = xstrdup(ep->d_name);
+ closedir(dp);
+ return name;
+}
+
+void *
+xmalloc(size_t size)
+{
+ void *p = malloc(size);
+ if (!p)
+ fail("cannot allocate %u bytes", size);
+ return p;
+}
+
+char *
+xstrdup(char *s)
+{
+ return strcpy((char*)xmalloc(strlen(s) + 1), s);
+}
+
+char *
+xbasename(char *path)
+{
+ char *cp;
+
+ while ((cp = strrchr(path, '/')) && cp[1] == '\0')
+ *cp = '\0';
+ if (!cp) return path;
+ return cp + 1;
+}
+
+void
+xchdir(char *dir)
+{
+ if (chdir(dir) < 0)
+ fail("cannot change directory to %s", dir);
+}
+
+int
+relatepaths(char *from, char *to, char *outpath)
+{
+ char *cp, *cp2;
+ int len;
+ char buf[NAME_MAX];
+
+ assert(*from == '/' && *to == '/');
+ for (cp = to, cp2 = from; *cp == *cp2; cp++, cp2++)
+ if (*cp == '\0')
+ break;
+ while (cp[-1] != '/')
+ cp--, cp2--;
+ if (cp - 1 == to) {
+ /* closest common ancestor is /, so use full pathname */
+ len = strlen(strcpy(outpath, to));
+ if (outpath[len] != '/') {
+ outpath[len++] = '/';
+ outpath[len] = '\0';
+ }
+ } else {
+ len = 0;
+ while ((cp2 = getcomponent(cp2, buf)) != 0) {
+ strcpy(outpath + len, "../");
+ len += 3;
+ }
+ while ((cp = getcomponent(cp, buf)) != 0) {
+ sprintf(outpath + len, "%s/", buf);
+ len += strlen(outpath + len);
+ }
+ }
+ return len;
+}
+
+void
+reversepath(char *inpath, char *name, int len, char *outpath)
+{
+ char *cp, *cp2;
+ char buf[NAME_MAX];
+ struct stat sb;
+
+ cp = strcpy(outpath + PATH_MAX - (len + 1), name);
+ cp2 = inpath;
+ while ((cp2 = getcomponent(cp2, buf)) != 0) {
+ if (strcmp(buf, ".") == 0)
+ continue;
+ if (strcmp(buf, "..") == 0) {
+ if (stat(".", &sb) < 0)
+ fail("cannot stat current directory");
+ name = ino2name(sb.st_ino, "..");
+ len = strlen(name);
+ cp -= len + 1;
+ strcpy(cp, name);
+ cp[len] = '/';
+ free(name);
+ xchdir("..");
+ } else {
+ cp -= 3;
+ strncpy(cp, "../", 3);
+ xchdir(buf);
+ }
+ }
+ strcpy(outpath, cp);
+}
diff --git a/src/libs/xpcom18a4/nsprpub/config/nspr-config.in b/src/libs/xpcom18a4/nsprpub/config/nspr-config.in
new file mode 100755
index 00000000..e9e18679
--- /dev/null
+++ b/src/libs/xpcom18a4/nsprpub/config/nspr-config.in
@@ -0,0 +1,116 @@
+#!/bin/sh
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec_prefix_set=no
+
+major_version=@MOD_MAJOR_VERSION@
+minor_version=@MOD_MINOR_VERSION@
+patch_version=@MOD_PATCH_VERSION@
+
+usage()
+{
+ cat <<EOF
+Usage: nspr-config [OPTIONS] [LIBRARIES]
+Options:
+ [--prefix[=DIR]]
+ [--exec-prefix[=DIR]]
+ [--version]
+ [--libs]
+ [--cflags]
+Libraries:
+ nspr
+ plc
+ plds
+EOF
+ exit $1
+}
+
+if test $# -eq 0; then
+ usage 1 1>&2
+fi
+
+lib_nspr=yes
+lib_plc=yes
+lib_plds=yes
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case $1 in
+ --prefix=*)
+ prefix=$optarg
+ if test $exec_prefix_set = no ; then
+ exec_prefix=$optarg
+ fi
+ ;;
+ --prefix)
+ echo_prefix=yes
+ ;;
+ --exec-prefix=*)
+ exec_prefix=$optarg
+ exec_prefix_set=yes
+ ;;
+ --exec-prefix)
+ echo_exec_prefix=yes
+ ;;
+ --version)
+ echo ${major_version}.${minor_version}.${patch_version}
+ ;;
+ --cflags)
+ echo_cflags=yes
+ ;;
+ --libs)
+ echo_libs=yes
+ ;;
+ nspr)
+ lib_nspr=yes
+ ;;
+ plc)
+ lib_plc=yes
+ ;;
+ plds)
+ lib_plds=yes
+ ;;
+ *)
+ usage 1 1>&2
+ ;;
+ esac
+ shift
+done
+
+if test "$echo_prefix" = "yes"; then
+ echo $prefix
+fi
+
+if test "$echo_exec_prefix" = "yes"; then
+ echo $exec_prefix
+fi
+
+if test "$echo_cflags" = "yes"; then
+ echo -I${prefix}/include/nspr
+fi
+
+if test "$echo_libs" = "yes"; then
+ libdirs=-L${exec_prefix}/lib
+ if test -n "$lib_plds"; then
+ libdirs="$libdirs -lplds${major_version}"
+ fi
+ if test -n "$lib_plc"; then
+ libdirs="$libdirs -lplc${major_version}"
+ fi
+ if test -n "$lib_nspr"; then
+ libdirs="$libdirs -lnspr${major_version}"
+ fi
+ os_ldflags="@LDFLAGS@"
+ for i in $os_ldflags ; do
+ if echo $i | grep \^-L >/dev/null; then
+ libdirs="$libdirs $i"
+ fi
+ done
+ echo $libdirs @OS_LIBS@
+fi
+
diff --git a/src/libs/xpcom18a4/nsprpub/config/nspr.m4 b/src/libs/xpcom18a4/nsprpub/config/nspr.m4
new file mode 100644
index 00000000..8174bea9
--- /dev/null
+++ b/src/libs/xpcom18a4/nsprpub/config/nspr.m4
@@ -0,0 +1,67 @@
+# -*- tab-width: 4; -*-
+# Configure paths for NSPR
+# Public domain - Chris Seawood <cls@seawood.org> 2001-04-05
+# Based upon gtk.m4 (also PD) by Owen Taylor
+
+dnl AM_PATH_NSPR([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+dnl Test for NSPR, and define NSPR_CFLAGS and NSPR_LIBS
+AC_DEFUN(AM_PATH_NSPR,
+[dnl
+
+AC_ARG_WITH(nspr-prefix,
+ [ --with-nspr-prefix=PFX Prefix where NSPR is installed],
+ nspr_config_prefix="$withval",
+ nspr_config_prefix="")
+
+AC_ARG_WITH(nspr-exec-prefix,
+ [ --with-nspr-exec-prefix=PFX
+ Exec prefix where NSPR is installed],
+ nspr_config_exec_prefix="$withval",
+ nspr_config_exec_prefix="")
+
+ if test -n "$nspr_config_exec_prefix"; then
+ nspr_config_args="$nspr_config_args --exec-prefix=$nspr_config_exec_prefix"
+ if test -z "$NSPR_CONFIG"; then
+ NSPR_CONFIG=$nspr_config_exec_prefix/bin/nspr-config
+ fi
+ fi
+ if test -n "$nspr_config_prefix"; then
+ nspr_config_args="$nspr_config_args --prefix=$nspr_config_prefix"
+ if test -z "$NSPR_CONFIG"; then
+ NSPR_CONFIG=$nspr_config_prefix/bin/nspr-config
+ fi
+ fi
+
+ unset ac_cv_path_NSPR_CONFIG
+ AC_PATH_PROG(NSPR_CONFIG, nspr-config, no)
+ min_nspr_version=ifelse([$1], ,4.0.0,$1)
+ AC_MSG_CHECKING(for NSPR - version >= $min_nspr_version (skipping))
+
+ no_nspr=""
+ if test "$NSPR_CONFIG" = "no"; then
+ no_nspr="yes"
+ else
+ NSPR_CFLAGS=`$NSPR_CONFIG $nspr_config_args --cflags`
+ NSPR_LIBS=`$NSPR_CONFIG $nspr_config_args --libs`
+
+ dnl Skip version check for now
+ nspr_config_major_version=`$NSPR_CONFIG $nspr_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ nspr_config_minor_version=`$NSPR_CONFIG $nspr_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ nspr_config_micro_version=`$NSPR_CONFIG $nspr_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ fi
+
+ if test -z "$no_nspr"; then
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+ else
+ AC_MSG_RESULT(no)
+ fi
+
+
+ AC_SUBST(NSPR_CFLAGS)
+ AC_SUBST(NSPR_LIBS)
+
+])
diff --git a/src/libs/xpcom18a4/nsprpub/config/nsprincl.mk.in b/src/libs/xpcom18a4/nsprpub/config/nsprincl.mk.in
new file mode 100644
index 00000000..d56cc024
--- /dev/null
+++ b/src/libs/xpcom18a4/nsprpub/config/nsprincl.mk.in
@@ -0,0 +1,5 @@
+# Include in Makefiles to define NSPR variables
+
+NSPR_VERSION = @NSPR_VERSION@
+NSPR_LIB = -lnspr@NSPR_VERSION@
+NSPR_EXTRA_LIBS = @EXTRA_LIBS@
diff --git a/src/libs/xpcom18a4/nsprpub/config/nsprincl.sh.in b/src/libs/xpcom18a4/nsprpub/config/nsprincl.sh.in
new file mode 100644
index 00000000..be4e1450
--- /dev/null
+++ b/src/libs/xpcom18a4/nsprpub/config/nsprincl.sh.in
@@ -0,0 +1,5 @@
+# Include in shell scripts to define NSPR variables
+
+NSPR_VERSION=@NSPR_VERSION@
+NSPR_LIB=-lnspr$NSPR_VERSION
+NSPR_EXTRA_LIBS="@EXTRA_LIBS@"
diff --git a/src/libs/xpcom18a4/nsprpub/config/pathsub.h b/src/libs/xpcom18a4/nsprpub/config/pathsub.h
new file mode 100644
index 00000000..bf3fca31
--- /dev/null
+++ b/src/libs/xpcom18a4/nsprpub/config/pathsub.h
@@ -0,0 +1,78 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Netscape Portable Runtime (NSPR).
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef pathsub_h___
+#define pathsub_h___
+/*
+** Pathname subroutines.
+**
+** Brendan Eich, 8/29/95
+*/
+#include <limits.h>
+#include <sys/types.h>
+
+#if SUNOS4
+#include "../pr/include/md/sunos4.h"
+#endif
+
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+
+/*
+ * Just prevent stupidity
+ */
+#undef NAME_MAX
+#define NAME_MAX 256
+
+extern char *program;
+
+extern void fail(char *format, ...);
+extern char *getcomponent(char *path, char *name);
+extern char *ino2name(ino_t ino, char *dir);
+extern void *xmalloc(size_t size);
+extern char *xstrdup(char *s);
+extern char *xbasename(char *path);
+extern void xchdir(char *dir);
+
+/* Relate absolute pathnames from and to returning the result in outpath. */
+extern int relatepaths(char *from, char *to, char *outpath);
+
+/* XXX changes current working directory -- caveat emptor */
+extern void reversepath(char *inpath, char *name, int len, char *outpath);
+
+#endif /* pathsub_h___ */
diff --git a/src/libs/xpcom18a4/nsprpub/config/prdepend.h b/src/libs/xpcom18a4/nsprpub/config/prdepend.h
new file mode 100644
index 00000000..df72c568
--- /dev/null
+++ b/src/libs/xpcom18a4/nsprpub/config/prdepend.h
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Netscape Portable Runtime (NSPR).
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ * A dummy header file that is a dependency for all the object files.
+ * Used to force a full recompilation of NSPR in Mozilla's Tinderbox
+ * depend builds. See comments in rules.mk.
+ */
+
+#error "Do not include this header file."
diff --git a/src/libs/xpcom18a4/nsprpub/config/prmkdir.bat b/src/libs/xpcom18a4/nsprpub/config/prmkdir.bat
new file mode 100644
index 00000000..9bea8553
--- /dev/null
+++ b/src/libs/xpcom18a4/nsprpub/config/prmkdir.bat
@@ -0,0 +1,38 @@
+REM
+REM ***** BEGIN LICENSE BLOCK *****
+REM Version: MPL 1.1/GPL 2.0/LGPL 2.1
+REM
+REM The contents of this file are subject to the Mozilla Public License Version
+REM 1.1 (the "License"); you may not use this file except in compliance with
+REM the License. You may obtain a copy of the License at
+REM http://www.mozilla.org/MPL/
+REM
+REM Software distributed under the License is distributed on an "AS IS" basis,
+REM WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+REM for the specific language governing rights and limitations under the
+REM License.
+REM
+REM The Original Code is the Netscape Portable Runtime (NSPR).
+REM
+REM The Initial Developer of the Original Code is
+REM Netscape Communications Corporation.
+REM Portions created by the Initial Developer are Copyright (C) 1998-2000
+REM the Initial Developer. All Rights Reserved.
+REM
+REM Contributor(s):
+REM
+REM Alternatively, the contents of this file may be used under the terms of
+REM either the GNU General Public License Version 2 or later (the "GPL"), or
+REM the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+REM in which case the provisions of the GPL or the LGPL are applicable instead
+REM of those above. If you wish to allow use of your version of this file only
+REM under the terms of either the GPL or the LGPL, and not to allow others to
+REM use your version of this file under the terms of the MPL, indicate your
+REM decision by deleting the provisions above and replace them with the notice
+REM and other provisions required by the GPL or the LGPL. If you do not delete
+REM the provisions above, a recipient may use your version of this file under
+REM the terms of any one of the MPL, the GPL or the LGPL.
+REM
+REM ***** END LICENSE BLOCK *****
+
+mkdir %1
diff --git a/src/libs/xpcom18a4/nsprpub/config/rules.mk b/src/libs/xpcom18a4/nsprpub/config/rules.mk
new file mode 100644
index 00000000..bba50ee7
--- /dev/null
+++ b/src/libs/xpcom18a4/nsprpub/config/rules.mk
@@ -0,0 +1,514 @@
+#! gmake
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is the Netscape Portable Runtime (NSPR).
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 1998-2000
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+################################################################################
+# We have a 4 pass build process:
+#
+# Pass 1. export - Create generated headers and stubs. Publish public headers to
+# dist/<arch>/include.
+#
+# Pass 2. libs - Create libraries. Publish libraries to dist/<arch>/lib.
+#
+# Pass 3. all - Create programs.
+#
+# Pass 4. install - Publish programs to dist/<arch>/bin.
+#
+# Parameters to this makefile (set these before including):
+#
+# a)
+# TARGETS -- the target to create
+# (defaults to $LIBRARY $PROGRAM)
+# b)
+# DIRS -- subdirectories for make to recurse on
+# (the 'all' rule builds $TARGETS $DIRS)
+# c)
+# CSRCS -- .c files to compile
+# (used to define $OBJS)
+# d)
+# PROGRAM -- the target program name to create from $OBJS
+# ($OBJDIR automatically prepended to it)
+# e)
+# LIBRARY -- the target library name to create from $OBJS
+# ($OBJDIR automatically prepended to it)
+#
+################################################################################
+
+ifndef topsrcdir
+topsrcdir=$(MOD_DEPTH)
+endif
+
+ifndef srcdir
+srcdir=.
+endif
+
+ifndef NSPR_CONFIG_MK
+include $(topsrcdir)/config/config.mk
+endif
+
+ifdef USE_AUTOCONF
+ifdef CROSS_COMPILE
+ifdef INTERNAL_TOOLS
+CC=$(HOST_CC)
+CCC=$(HOST_CXX)
+CFLAGS=$(HOST_CFLAGS)
+CXXFLAGS=$(HOST_CXXFLAGS)
+endif
+endif
+endif
+
+#
+# This makefile contains rules for building the following kinds of
+# libraries:
+# - LIBRARY: a static (archival) library
+# - SHARED_LIBRARY: a shared (dynamic link) library
+# - IMPORT_LIBRARY: an import library, used only on Windows and OS/2
+#
+# The names of these libraries can be generated by simply specifying
+# LIBRARY_NAME and LIBRARY_VERSION.
+#
+
+ifdef LIBRARY_NAME
+ifeq (,$(filter-out WINNT OS2,$(OS_ARCH)))
+
+#
+# Win95, Win16, and OS/2 require library names conforming to the 8.3 rule.
+# other platforms do not.
+#
+ifeq (,$(filter-out WIN95 OS2,$(OS_TARGET)))
+LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX)
+SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
+SHARED_LIB_PDB = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).pdb
+else
+LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX)
+SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+IMPORT_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
+SHARED_LIB_PDB = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).pdb
+endif
+
+else
+
+LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
+ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
+SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_shr.a
+else
+ifdef MKSHLIB
+SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+endif
+endif
+
+endif
+endif
+
+ifndef TARGETS
+ifeq (,$(filter-out WINNT OS2,$(OS_ARCH)))
+TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY)
+ifndef BUILD_OPT
+ifdef MSC_VER
+ifneq ($(MSC_VER),1200)
+TARGETS += $(SHARED_LIB_PDB)
+endif
+endif
+endif
+else
+TARGETS = $(LIBRARY) $(SHARED_LIBRARY)
+endif
+endif
+
+#
+# OBJS is the list of object files. It can be constructed by
+# specifying CSRCS (list of C source files) and ASFILES (list
+# of assembly language source files).
+#
+
+ifndef OBJS
+OBJS = $(addprefix $(OBJDIR)/,$(CSRCS:.c=.$(OBJ_SUFFIX))) \
+ $(addprefix $(OBJDIR)/,$(ASFILES:.$(ASM_SUFFIX)=.$(OBJ_SUFFIX)))
+endif
+
+ifeq ($(MOZ_OS2_TOOLS),VACPP)
+EXTRA_LIBS := $(patsubst -l%,$(DIST)/lib/%.$(LIB_SUFFIX),$(EXTRA_LIBS))
+endif
+
+ALL_TRASH = $(TARGETS) $(OBJS) $(filter-out . .., $(OBJDIR)) LOGS TAGS $(GARBAGE) \
+ $(NOSUCHFILE) \
+ so_locations
+
+ifeq ($(OS_ARCH),OpenVMS)
+ALL_TRASH += $(wildcard *.c*_defines)
+ifdef SHARED_LIBRARY
+VMS_SYMVEC_FILE = $(SHARED_LIBRARY:.$(DLL_SUFFIX)=_symvec.opt)
+VMS_SYMVEC_FILE_MODULE = $(srcdir)/$(LIBRARY_NAME)_symvec.opt
+ALL_TRASH += $(VMS_SYMVEC_FILE)
+endif
+endif
+
+ifndef RELEASE_LIBS_DEST
+RELEASE_LIBS_DEST = $(RELEASE_LIB_DIR)
+endif
+
+ifdef DIRS
+LOOP_OVER_DIRS = \
+ @for d in $(DIRS); do \
+ if test -d $$d; then \
+ set -e; \
+ echo "cd $$d; $(MAKE) $@"; \
+ $(MAKE) -C $$d $@; \
+ set +e; \
+ else \
+ echo "Skipping non-directory $$d..."; \
+ fi; \
+ done
+endif
+
+################################################################################
+
+all:: export
+
+export::
+ +$(LOOP_OVER_DIRS)
+
+libs:: export
+
+install:: export
+
+clean::
+ rm -rf $(OBJS) so_locations $(NOSUCHFILE) $(GARBAGE)
+ +$(LOOP_OVER_DIRS)
+
+clobber::
+ rm -rf $(OBJS) $(TARGETS) $(filter-out . ..,$(OBJDIR)) $(GARBAGE) so_locations $(NOSUCHFILE)
+ +$(LOOP_OVER_DIRS)
+
+realclean clobber_all::
+ rm -rf $(wildcard *.OBJ *.OBJD) dist $(ALL_TRASH)
+ +$(LOOP_OVER_DIRS)
+
+distclean::
+ rm -rf $(wildcard *.OBJ *.OBJD) dist $(ALL_TRASH) $(DIST_GARBAGE)
+ +$(LOOP_OVER_DIRS)
+
+real_install:: $(RELEASE_BINS) $(RELEASE_HEADERS) $(RELEASE_LIBS)
+ifdef RELEASE_BINS
+ $(NSINSTALL) -t -m 0755 $(RELEASE_BINS) $(DESTDIR)$(bindir)
+endif
+ifdef RELEASE_HEADERS
+ $(NSINSTALL) -t -m 0644 $(RELEASE_HEADERS) $(DESTDIR)$(includedir)/$(include_subdir)
+endif
+ifdef RELEASE_LIBS
+ $(NSINSTALL) -t -m 0755 $(RELEASE_LIBS) $(DESTDIR)$(libdir)/$(lib_subdir)
+endif
+ +$(LOOP_OVER_DIRS)
+
+release:: export
+ifdef RELEASE_BINS
+ @echo "Copying executable programs and scripts to release directory"
+ @if test -z "$(BUILD_NUMBER)"; then \
+ echo "BUILD_NUMBER must be defined"; \
+ false; \
+ else \
+ true; \
+ fi
+ @if test ! -d $(RELEASE_BIN_DIR); then \
+ rm -rf $(RELEASE_BIN_DIR); \
+ $(NSINSTALL) -D $(RELEASE_BIN_DIR);\
+ else \
+ true; \
+ fi
+ cp $(RELEASE_BINS) $(RELEASE_BIN_DIR)
+endif
+ifdef RELEASE_LIBS
+ @echo "Copying libraries to release directory"
+ @if test -z "$(BUILD_NUMBER)"; then \
+ echo "BUILD_NUMBER must be defined"; \
+ false; \
+ else \
+ true; \
+ fi
+ @if test ! -d $(RELEASE_LIBS_DEST); then \
+ rm -rf $(RELEASE_LIBS_DEST); \
+ $(NSINSTALL) -D $(RELEASE_LIBS_DEST);\
+ else \
+ true; \
+ fi
+ cp $(RELEASE_LIBS) $(RELEASE_LIBS_DEST)
+endif
+ifdef RELEASE_HEADERS
+ @echo "Copying header files to release directory"
+ @if test -z "$(BUILD_NUMBER)"; then \
+ echo "BUILD_NUMBER must be defined"; \
+ false; \
+ else \
+ true; \
+ fi
+ @if test ! -d $(RELEASE_HEADERS_DEST); then \
+ rm -rf $(RELEASE_HEADERS_DEST); \
+ $(NSINSTALL) -D $(RELEASE_HEADERS_DEST);\
+ else \
+ true; \
+ fi
+ cp $(RELEASE_HEADERS) $(RELEASE_HEADERS_DEST)
+endif
+ +$(LOOP_OVER_DIRS)
+
+alltags:
+ rm -f TAGS tags
+ find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs etags -a
+ find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs ctags -a
+
+$(NFSPWD):
+ cd $(@D); $(MAKE) $(@F)
+
+$(PROGRAM): $(OBJS)
+ @$(MAKE_OBJDIR)
+ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
+ $(CC) $(OBJS) -Fe$@ -link $(LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS)
+else
+ifeq ($(MOZ_OS2_TOOLS),VACPP)
+ $(CC) $(OBJS) -Fe$@ $(LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS)
+else
+ $(CC) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS)
+endif
+endif
+ifdef ENABLE_STRIP
+ $(STRIP) $@
+endif
+
+$(LIBRARY): $(OBJS)
+ @$(MAKE_OBJDIR)
+ rm -f $@
+ifeq ($(MOZ_OS2_TOOLS),VACPP)
+ $(AR) $(subst /,\\,$(OBJS)) $(AR_FLAGS)
+else
+ $(AR) $(AR_FLAGS) $(OBJS) $(AR_EXTRA_ARGS)
+endif
+ $(RANLIB) $@
+
+ifeq ($(OS_TARGET), OS2)
+$(IMPORT_LIBRARY): $(MAPFILE)
+ rm -f $@
+ $(IMPLIB) $@ $(MAPFILE)
+endif
+
+$(SHARED_LIBRARY): $(OBJS) $(RES) $(MAPFILE)
+ @$(MAKE_OBJDIR)
+ rm -f $@
+ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
+ echo "#!" > $(OBJDIR)/lib$(LIBRARY_NAME)_syms
+ nm -B -C -g $(OBJS) \
+ | awk '/ [T,D] / {print $$3}' \
+ | sed -e 's/^\.//' \
+ | sort -u >> $(OBJDIR)/lib$(LIBRARY_NAME)_syms
+ $(LD) $(XCFLAGS) -o $@ $(OBJS) -bE:$(OBJDIR)/lib$(LIBRARY_NAME)_syms \
+ -bM:SRE -bnoentry $(OS_LIBS) $(EXTRA_LIBS)
+else # AIX 4.1
+ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
+ $(LINK_DLL) -MAP $(DLLBASE) $(DLL_LIBS) $(EXTRA_LIBS) $(OBJS) $(RES)
+else
+ifeq ($(MOZ_OS2_TOOLS),VACPP)
+ $(LINK_DLL) $(DLLBASE) $(OBJS) $(OS_LIBS) $(EXTRA_LIBS) $(MAPFILE)
+else # !os2 vacpp
+ifeq ($(OS_TARGET), OpenVMS)
+ @if test ! -f $(VMS_SYMVEC_FILE); then \
+ if test -f $(VMS_SYMVEC_FILE_MODULE); then \
+ echo Creating component options file $(VMS_SYMVEC_FILE); \
+ cp $(VMS_SYMVEC_FILE_MODULE) $(VMS_SYMVEC_FILE); \
+ fi; \
+ fi
+endif # OpenVMS
+ $(MKSHLIB) $(OBJS) $(RES) $(EXTRA_LIBS)
+endif # OS2 vacpp
+endif # WINNT
+endif # AIX 4.1
+ifdef ENABLE_STRIP
+ $(STRIP) $@
+endif
+
+ifeq ($(OS_ARCH),WINNT)
+$(RES): $(RESNAME)
+ @$(MAKE_OBJDIR)
+# The resource compiler does not understand the -U option.
+ifdef NS_USE_GCC
+ $(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $<
+else
+ $(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$@ $<
+endif # GCC
+ @echo $(RES) finished
+endif
+
+$(MAPFILE): $(LIBRARY_NAME).def
+ @$(MAKE_OBJDIR)
+ifeq ($(OS_ARCH),SunOS)
+ grep -v ';-' $< | \
+ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
+endif
+ifeq ($(OS_ARCH),OS2)
+ echo LIBRARY $(LIBRARY_NAME)$(LIBRARY_VERSION) INITINSTANCE TERMINSTANCE > $@
+ echo PROTMODE >> $@
+ echo CODE LOADONCALL MOVEABLE DISCARDABLE >> $@
+ echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED >> $@
+ echo EXPORTS >> $@
+ifeq ($(MOZ_OS2_TOOLS),VACPP)
+ grep -v ';+' $< | grep -v ';-' | \
+ sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' >> $@
+else
+ grep -v ';+' $< | grep -v ';-' | \
+ sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,\([\t ]*\),\1_,' | \
+ awk 'BEGIN {ord=1;} { print($$0 " @" ord " RESIDENTNAME"); ord++;}' >> $@
+ $(ADD_TO_DEF_FILE)
+endif
+endif
+
+#
+# Translate source filenames to absolute paths. This is required for
+# debuggers under Windows and OS/2 to find source files automatically.
+#
+
+ifeq ($(OS_ARCH),OS2)
+NEED_ABSOLUTE_PATH = 1
+endif
+
+ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
+NEED_ABSOLUTE_PATH = 1
+endif
+
+ifdef NEED_ABSOLUTE_PATH
+PWD := $(shell pwd)
+abspath = $(if $(findstring :,$(1)),$(1),$(if $(filter /%,$(1)),$(1),$(PWD)/$(1)))
+endif
+
+$(OBJDIR)/%.$(OBJ_SUFFIX): %.cpp
+ @$(MAKE_OBJDIR)
+ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
+ $(CCC) -Fo$@ -c $(CCCFLAGS) $(call abspath,$<)
+else
+ifeq ($(MOZ_OS2_TOOLS),VACPP)
+ $(CCC) -Fo$@ -c $(CCCFLAGS) $(call abspath,$<)
+else
+ifdef NEED_ABSOLUTE_PATH
+ $(CCC) -o $@ -c $(CCCFLAGS) $(call abspath,$<)
+else
+ $(CCC) -o $@ -c $(CCCFLAGS) $<
+endif
+endif
+endif
+
+WCCFLAGS1 = $(subst /,\\,$(CFLAGS))
+WCCFLAGS2 = $(subst -I,-i=,$(WCCFLAGS1))
+WCCFLAGS3 = $(subst -D,-d,$(WCCFLAGS2))
+$(OBJDIR)/%.$(OBJ_SUFFIX): %.c
+ @$(MAKE_OBJDIR)
+ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
+ $(CC) -Fo$@ -c $(CFLAGS) $(call abspath,$<)
+else
+ifeq ($(MOZ_OS2_TOOLS),VACPP)
+ $(CC) -Fo$@ -c $(CFLAGS) $(call abspath,$<)
+else
+ifdef NEED_ABSOLUTE_PATH
+ $(CC) -o $@ -c $(CFLAGS) $(call abspath,$<)
+else
+ $(CC) -o $@ -c $(CFLAGS) $<
+endif
+endif
+endif
+
+
+$(OBJDIR)/%.$(OBJ_SUFFIX): %.s
+ @$(MAKE_OBJDIR)
+ $(AS) -o $@ $(ASFLAGS) -c $<
+
+ifeq ($(MOZ_OS2_TOOLS),VACPP)
+$(OBJDIR)/%.$(OBJ_SUFFIX): %.asm
+ @$(MAKE_OBJDIR)
+ $(AS) -Fdo:./$(OBJDIR) $(ASFLAGS) $<
+endif
+
+%.i: %.c
+ $(CC) -C -E $(CFLAGS) $< > $*.i
+
+%: %.pl
+ rm -f $@; cp $< $@; chmod +x $@
+
+#
+# HACK ALERT
+#
+# The only purpose of this rule is to pass Mozilla's Tinderbox depend
+# builds (http://tinderbox.mozilla.org/showbuilds.cgi). Mozilla's
+# Tinderbox builds NSPR continuously as part of the Mozilla client.
+# Because NSPR's make depend is not implemented, whenever we change
+# an NSPR header file, the depend build does not recompile the NSPR
+# files that depend on the header.
+#
+# This rule makes all the objects depend on a dummy header file.
+# Touch this dummy header file to force the depend build to recompile
+# everything.
+#
+# This rule should be removed when make depend is implemented.
+#
+
+DUMMY_DEPEND_H = $(topsrcdir)/config/prdepend.h
+
+$(filter $(OBJDIR)/%.$(OBJ_SUFFIX),$(OBJS)): $(OBJDIR)/%.$(OBJ_SUFFIX): $(DUMMY_DEPEND_H)
+
+# END OF HACK
+
+################################################################################
+# Special gmake rules.
+################################################################################
+
+#
+# Re-define the list of default suffixes, so gmake won't have to churn through
+# hundreds of built-in suffix rules for stuff we don't need.
+#
+.SUFFIXES:
+.SUFFIXES: .a .$(OBJ_SUFFIX) .c .cpp .s .h .i .pl
+
+#
+# Fake targets. Always run these rules, even if a file/directory with that
+# name already exists.
+#
+.PHONY: all alltags clean export install libs realclean release
+
+#
+# List the target pattern of an implicit rule as a dependency of the
+# special target .PRECIOUS to preserve intermediate files made by
+# implicit rules whose target patterns match that file's name.
+# (See GNU Make documentation, Edition 0.51, May 1996, Sec. 10.4,
+# p. 107.)
+#
+.PRECIOUS: $(OBJDIR)/%.$(OBJ_SUFFIX)
diff --git a/src/libs/xpcom18a4/nsprpub/configure b/src/libs/xpcom18a4/nsprpub/configure
new file mode 100755
index 00000000..2046d79f
--- /dev/null
+++ b/src/libs/xpcom18a4/nsprpub/configure
@@ -0,0 +1,6034 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_help="$ac_help
+ --with-dist-prefix=DIST_PREFIX
+ place build files in DIST_PREFIX [dist]"
+ac_help="$ac_help
+ --with-dist-bindir=DIR build execuatables in DIR [DIST_PREFIX/bin]"
+ac_help="$ac_help
+ --with-dist-includedir=DIR
+ build include files in DIR [DIST_PREFIX/include/nspr]"
+ac_help="$ac_help
+ --with-dist-libdir=DIR build library files in DIR [DIST_PREFIX/lib]"
+ac_help="$ac_help
+ --with-mozilla Compile NSPR with Mozilla support"
+ac_help="$ac_help
+ --enable-optimize(=val) Enable code optimizations (val, ie. -O2) "
+ac_help="$ac_help
+ --disable-debug Do not compile in debugging symbols"
+ac_help="$ac_help
+ --enable-win32-target=\$t
+ Specify win32 flavor. (WIN95 or WINNT)"
+ac_help="$ac_help
+ --enable-debug-rtl Use the MSVC debug runtime library"
+ac_help="$ac_help
+ --enable-n32 Enable n32 ABI support (IRIX only)"
+ac_help="$ac_help
+ --enable-64bit Enable 64-bit support (on certain platforms)"
+ac_help="$ac_help
+ --enable-mdupdate Enable use of certain compilers' mdupdate feature"
+ac_help="$ac_help
+ --enable-macos-target=VER (default=10.1)
+ Set the minimum MacOS version needed at runtime"
+ac_help="$ac_help
+ --enable-strip Enable stripping of shared libs and programs"
+ac_help="$ac_help
+ --with-pthreads Use system pthreads library as thread subsystem"
+ac_help="$ac_help
+ --enable-user-pthreads Build using userland pthreads"
+ac_help="$ac_help
+ --enable-nspr-threads Build using classic nspr threads"
+ac_help="$ac_help
+ --with-bthreads Use system bthreads library as thread subsystem (BeOS only)"
+ac_help="$ac_help
+ --with-native-threads Use native system threads as thread subsystem (Solaris only)"
+ac_help="$ac_help
+ --enable-cplus Enable some c++ api routines"
+ac_help="$ac_help
+ --enable-ipv6 Compile ipv6 support"
+ac_help="$ac_help
+ --enable-boehm Enable the Boehm Garbage Collector"
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.13"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=config/libc_r.h
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+ac_aux_dir=
+for ac_dir in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf" 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+# configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+# same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+# as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:621: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:642: checking target system type" >&5
+
+target_alias=$target
+case "$target_alias" in
+NONE)
+ case $nonopt in
+ NONE) target_alias=$host_alias ;;
+ *) target_alias=$nonopt ;;
+ esac ;;
+esac
+
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
+target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$target" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:660: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+ case $nonopt in
+ NONE) build_alias=$host_alias ;;
+ *) build_alias=$nonopt ;;
+ esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+test "$host_alias" != "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+
+MOD_MAJOR_VERSION=4
+MOD_MINOR_VERSION=5
+MOD_PATCH_VERSION=0
+NSPR_MODNAME=nspr20
+_HAVE_PTHREADS=
+USE_PTHREADS=
+USE_USER_PTHREADS=
+USE_NSPR_THREADS=
+USE_N32=
+USE_64=
+USE_CPLUS=
+USE_IPV6=
+USE_MDUPDATE=
+MACOS_DEPLOYMENT_TARGET=
+_OPTIMIZE_FLAGS=-O
+_DEBUG_FLAGS=-g
+MOZ_DEBUG=1
+MOZ_OPTIMIZE=
+OBJDIR=.
+OBJDIR_NAME=.
+OBJDIR_SUFFIX=OBJ
+NSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'
+NOSUCHFILE=/no-such-file
+LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
+LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'
+CYGWIN_WRAPPER=
+
+RESOLVE_LINK_SYMBOLS=
+
+CFLAGS="${CFLAGS=}"
+CXXFLAGS="${CXXFLAGS=}"
+LDFLAGS="${LDFLAGS=}"
+HOST_CFLAGS="${HOST_CFLAGS=}"
+HOST_LDFLAGS="${HOST_LDFLAGS=}"
+
+case "$target" in
+*-cygwin*|*-mingw*)
+ # Check to see if we are really running in a msvc environemnt
+ _WIN32_MSVC=
+ for ac_prog in cl
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:727: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$CC" && break
+done
+
+ if test "$CC" = "cl"; then
+ echo 'main() { return 0; }' > dummy.c
+ ${CC} -o dummy dummy.c >/dev/null 2>&1
+ if test $? = 0; then
+ _WIN32_MSVC=1
+ CXX=$CC
+ else
+ echo "configure: warning: $(CC) test failed. Using normal feature tests" 1>&2
+ fi
+ rm -f dummy dummy.o dummy.obj dummy.exe dummy.c
+ fi
+ ;;
+*-msvc*)
+ _WIN32_MSVC=1
+ ;;
+*-mks*)
+ _WIN32_MSVC=1
+ ;;
+esac
+
+if test -n "$_WIN32_MSVC"; then
+ SKIP_PATH_CHECKS=1
+ SKIP_COMPILER_CHECKS=1
+ SKIP_LIBRARY_CHECKS=1
+fi
+
+dist_prefix='${MOD_DEPTH}/dist'
+dist_bindir='${dist_prefix}/bin'
+dist_includedir='${dist_prefix}/include/nspr'
+dist_libdir='${dist_prefix}/lib'
+if test "${includedir}" = '${prefix}/include'; then
+ includedir='${prefix}/include/nspr'
+fi
+
+# Check whether --with-dist-prefix or --without-dist-prefix was given.
+if test "${with_dist_prefix+set}" = set; then
+ withval="$with_dist_prefix"
+ dist_prefix=$withval
+fi
+
+
+# Check whether --with-dist-bindir or --without-dist-bindir was given.
+if test "${with_dist_bindir+set}" = set; then
+ withval="$with_dist_bindir"
+ dist_bindir=$withval
+fi
+
+
+# Check whether --with-dist-includedir or --without-dist-includedir was given.
+if test "${with_dist_includedir+set}" = set; then
+ withval="$with_dist_includedir"
+ dist_includedir=$withval
+fi
+
+
+# Check whether --with-dist-libdir or --without-dist-libdir was given.
+if test "${with_dist_libdir+set}" = set; then
+ withval="$with_dist_libdir"
+ dist_libdir=$withval
+fi
+
+
+
+
+
+
+
+# Check whether --with-mozilla or --without-mozilla was given.
+if test "${with_mozilla+set}" = set; then
+ withval="$with_mozilla"
+ if test "$withval" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define MOZILLA_CLIENT 1
+EOF
+
+ MOZILLA_CLIENT=1
+ else
+ MOZILLA_CLIENT=
+ fi
+else
+ if test -n "$MOZILLA_CLIENT"; then
+ cat >> confdefs.h <<\EOF
+#define MOZILLA_CLIENT 1
+EOF
+
+ fi
+fi
+
+
+# Check whether --enable-optimize or --disable-optimize was given.
+if test "${enable_optimize+set}" = set; then
+ enableval="$enable_optimize"
+ if test "$enableval" != "no"; then
+ MOZ_OPTIMIZE=1
+ if test -n "$enableval" && test "$enableval" != "yes"; then
+ _OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
+ _SAVE_OPTIMIZE_FLAGS=$_OPTIMIZE_FLAGS
+ fi
+ else
+ MOZ_OPTIMIZE=
+ fi
+fi
+
+
+# Check whether --enable-debug or --disable-debug was given.
+if test "${enable_debug+set}" = set; then
+ enableval="$enable_debug"
+ if test "$enableval" = "no"; then
+ MOZ_DEBUG=
+ else
+ MOZ_DEBUG=1
+ fi
+fi
+
+
+# Check whether --enable-win32-target or --disable-win32-target was given.
+if test "${enable_win32_target+set}" = set; then
+ enableval="$enable_win32_target"
+ OS_TARGET=`echo $enableval | tr a-z A-Z`
+else
+ OS_TARGET=
+fi
+
+
+# Check whether --enable-debug-rtl or --disable-debug-rtl was given.
+if test "${enable_debug_rtl+set}" = set; then
+ enableval="$enable_debug_rtl"
+ if test "$enableval" = "yes"; then
+ USE_DEBUG_RTL=1
+ fi
+fi
+
+
+# Check whether --enable-n32 or --disable-n32 was given.
+if test "${enable_n32+set}" = set; then
+ enableval="$enable_n32"
+ if test "$enableval" = "yes"; then
+ USE_N32=1
+ else if test "$enableval" = "no"; then
+ USE_N32=
+ fi
+ fi
+fi
+
+
+# Check whether --enable-64bit or --disable-64bit was given.
+if test "${enable_64bit+set}" = set; then
+ enableval="$enable_64bit"
+ if test "$enableval" = "yes"; then
+ USE_64=1
+ fi
+fi
+
+
+# Check whether --enable-mdupdate or --disable-mdupdate was given.
+if test "${enable_mdupdate+set}" = set; then
+ enableval="$enable_mdupdate"
+ if test "$enableval" = "yes"; then
+ USE_MDUPDATE=1
+ fi
+fi
+
+
+# Check whether --enable-macos-target or --disable-macos-target was given.
+if test "${enable_macos_target+set}" = set; then
+ enableval="$enable_macos_target"
+ MACOS_DEPLOYMENT_TARGET_STR=$enableval
+else
+ MACOS_DEPLOYMENT_TARGET_STR=10.1
+fi
+
+
+case "$target" in
+
+*-aix*)
+ case "${target_os}" in
+ aix3.2*)
+ USE_NSPR_THREADS=1
+ ;;
+ *)
+ USE_PTHREADS=1
+ ;;
+ esac
+ ;;
+
+esac
+
+if test -z "$CC"; then
+ case "$target" in
+
+ *-aix*)
+ if test -z "$USE_NSPR_THREADS"; then
+ CC=xlc_r
+ else
+ CC=xlc
+ fi
+ ;;
+
+ *-hpux*)
+ CC=cc
+ ;;
+
+ *-irix*)
+ CC=cc
+ ;;
+
+ *-openvms*)
+ CC=cc
+ ;;
+
+ *-osf*)
+ CC=cc
+ ;;
+
+ *-solaris*)
+ CC=cc
+ ;;
+
+ esac
+fi
+
+if test -z "$CXX"; then
+ case "$target" in
+
+ *-aix*)
+ if test -z "$USE_NSPR_THREADS"; then
+ CXX=xlC_r
+ else
+ CXX=xlC
+ fi
+ ;;
+
+ *-hpux*)
+ case "${target_os}" in
+ hpux10.30)
+ CXX=aCC
+ ;;
+ hpux11.*)
+ CXX=aCC
+ ;;
+ *)
+ CXX=CC
+ ;;
+ esac
+ ;;
+
+ *-irix*)
+ CXX=CC
+ ;;
+
+ *-openvms*)
+ CXX=cxx
+ ;;
+
+ *-osf*)
+ CXX=cxx
+ ;;
+
+ *-solaris*)
+ CXX=CC
+ ;;
+
+ esac
+fi
+
+if test -z "$SKIP_PATH_CHECKS"; then
+ # Extract the first word of "$WHOAMI whoami", so it can be a program name with args.
+set dummy $WHOAMI whoami; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1025: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_WHOAMI'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$WHOAMI" in
+ /*)
+ ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_WHOAMI="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_WHOAMI" && ac_cv_path_WHOAMI="echo not_whoami"
+ ;;
+esac
+fi
+WHOAMI="$ac_cv_path_WHOAMI"
+if test -n "$WHOAMI"; then
+ echo "$ac_t""$WHOAMI" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+if test -n "$MOZ_DEBUG"; then
+ cat >> confdefs.h <<\EOF
+#define DEBUG 1
+EOF
+
+ DEFINES="$DEFINES -UNDEBUG"
+
+ case "${target_os}" in
+ beos*)
+ DEFINES="$DEFINES -DDEBUG_${USER}"
+ ;;
+ msvc*|mks*|cygwin*|mingw*|os2*)
+ DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`"
+ ;;
+ *)
+ DEFINES="$DEFINES -DDEBUG_`$WHOAMI`"
+ ;;
+ esac
+else
+ cat >> confdefs.h <<\EOF
+#define NDEBUG 1
+EOF
+
+ DEFINES="$DEFINES -UDEBUG"
+fi
+
+if test -z "$SKIP_COMPILER_CHECKS"; then
+if test "$target" != "$host"; then
+ echo "cross compiling from $host to $target"
+ cross_compiling=yes
+
+ _SAVE_CC="$CC"
+ _SAVE_CFLAGS="$CFLAGS"
+ _SAVE_LDFLAGS="$LDFLAGS"
+
+ echo $ac_n "checking for $host compiler""... $ac_c" 1>&6
+echo "configure:1096: checking for $host compiler" >&5
+ for ac_prog in $HOST_CC gcc cc /usr/ucb/cc
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1102: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$HOST_CC"; then
+ ac_cv_prog_HOST_CC="$HOST_CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_HOST_CC="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+HOST_CC="$ac_cv_prog_HOST_CC"
+if test -n "$HOST_CC"; then
+ echo "$ac_t""$HOST_CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$HOST_CC" && break
+done
+test -n "$HOST_CC" || HOST_CC=""""
+
+ if test -z "$HOST_CC"; then
+ { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+ fi
+ echo "$ac_t""$HOST_CC" 1>&6
+ if test -z "$HOST_CFLAGS"; then
+ HOST_CFLAGS="$CFLAGS"
+ fi
+ if test -z "$HOST_LDFLAGS"; then
+ HOST_LDFLAGS="$LDFLAGS"
+ fi
+
+ CC="$HOST_CC"
+ CFLAGS="$HOST_CFLAGS"
+ LDFLAGS="$HOST_LDFLAGS"
+
+ echo $ac_n "checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1148: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
+ cat > conftest.$ac_ext <<EOF
+#line 1150 "configure"
+#include "confdefs.h"
+
+int main() {
+return(0);
+; return 0; }
+EOF
+if { (eval echo configure:1157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_prog_host_cc_works=1 echo "$ac_t""yes" 1>&6
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ { echo "configure: error: installation or configuration problem: $host compiler $HOST_CC cannot create executables." 1>&2; exit 1; }
+fi
+rm -f conftest*
+
+ CC=$_SAVE_CC
+ CFLAGS=$_SAVE_CFLAGS
+ LDFLAGS=$_SAVE_LDFLAGS
+
+ for ac_prog in $CC "${target_alias}-gcc" "${target}-gcc"
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1177: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$CC" && break
+done
+test -n "$CC" || CC="echo"
+
+ unset ac_cv_prog_CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1211: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1241: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_prog_rejected=no
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1292: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ ;;
+ esac
+ fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1324: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 1335 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:1340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1366: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:1371: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1399: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+
+ for ac_prog in $CXX "${target_alias}-g++" "${target}-g++"
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1435: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CXX="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CXX="$ac_cv_prog_CXX"
+if test -n "$CXX"; then
+ echo "$ac_t""$CXX" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$CXX" && break
+done
+test -n "$CXX" || CXX="echo"
+
+ unset ac_cv_prog_CXX
+ for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1471: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CXX="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CXX="$ac_cv_prog_CXX"
+if test -n "$CXX"; then
+ echo "$ac_t""$CXX" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$CXX" && break
+done
+test -n "$CXX" || CXX="gcc"
+
+
+echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1503: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+
+ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 1514 "configure"
+#include "confdefs.h"
+
+int main(){return(0);}
+EOF
+if { (eval echo configure:1519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cxx_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cxx_cross=no
+ else
+ ac_cv_prog_cxx_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cxx_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
+if test $ac_cv_prog_cxx_works = no; then
+ { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1545: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
+cross_compiling=$ac_cv_prog_cxx_cross
+
+echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
+echo "configure:1550: checking whether we are using GNU C++" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.C <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gxx=yes
+else
+ ac_cv_prog_gxx=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gxx" 1>&6
+
+if test $ac_cv_prog_gxx = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+
+ac_test_CXXFLAGS="${CXXFLAGS+set}"
+ac_save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS=
+echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
+echo "configure:1578: checking whether ${CXX-g++} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.cc
+if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
+ ac_cv_prog_cxx_g=yes
+else
+ ac_cv_prog_cxx_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS="$ac_save_CXXFLAGS"
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+
+ for ac_prog in $RANLIB "${target_alias}-ranlib" "${target}-ranlib"
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1614: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$RANLIB" && break
+done
+test -n "$RANLIB" || RANLIB="echo"
+
+ for ac_prog in $AR "${target_alias}-ar" "${target}-ar"
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1649: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_AR="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+AR="$ac_cv_prog_AR"
+if test -n "$AR"; then
+ echo "$ac_t""$AR" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$AR" && break
+done
+test -n "$AR" || AR="echo"
+
+ for ac_prog in $AS "${target_alias}-as" "${target}-as"
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1684: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_AS="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+AS="$ac_cv_prog_AS"
+if test -n "$AS"; then
+ echo "$ac_t""$AS" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$AS" && break
+done
+test -n "$AS" || AS="echo"
+
+ for ac_prog in $LD "${target_alias}-ld" "${target}-ld"
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1719: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$LD"; then
+ ac_cv_prog_LD="$LD" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_LD="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+LD="$ac_cv_prog_LD"
+if test -n "$LD"; then
+ echo "$ac_t""$LD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$LD" && break
+done
+test -n "$LD" || LD="echo"
+
+ for ac_prog in $STRIP "${target_alias}-strip" "${target}-strip"
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1754: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_STRIP="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+ echo "$ac_t""$STRIP" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$STRIP" && break
+done
+test -n "$STRIP" || STRIP="echo"
+
+ for ac_prog in $WINDRES "${target_alias}-windres" "${target}-windres"
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1789: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$WINDRES"; then
+ ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_WINDRES="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+WINDRES="$ac_cv_prog_WINDRES"
+if test -n "$WINDRES"; then
+ echo "$ac_t""$WINDRES" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$WINDRES" && break
+done
+test -n "$WINDRES" || WINDRES="echo"
+
+
+else
+ for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1826: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CXX="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CXX="$ac_cv_prog_CXX"
+if test -n "$CXX"; then
+ echo "$ac_t""$CXX" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$CXX" && break
+done
+test -n "$CXX" || CXX="gcc"
+
+
+echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1858: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+
+ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 1869 "configure"
+#include "confdefs.h"
+
+int main(){return(0);}
+EOF
+if { (eval echo configure:1874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cxx_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cxx_cross=no
+ else
+ ac_cv_prog_cxx_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cxx_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
+if test $ac_cv_prog_cxx_works = no; then
+ { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1900: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
+cross_compiling=$ac_cv_prog_cxx_cross
+
+echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
+echo "configure:1905: checking whether we are using GNU C++" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.C <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gxx=yes
+else
+ ac_cv_prog_gxx=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gxx" 1>&6
+
+if test $ac_cv_prog_gxx = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+
+ac_test_CXXFLAGS="${CXXFLAGS+set}"
+ac_save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS=
+echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
+echo "configure:1933: checking whether ${CXX-g++} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.cc
+if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
+ ac_cv_prog_cxx_g=yes
+else
+ ac_cv_prog_cxx_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS="$ac_save_CXXFLAGS"
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+
+ if test "$CXX" = "cl" -a -z "$CC"; then
+ CC=$CXX
+ else
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1970: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2000: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_prog_rejected=no
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2051: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ ;;
+ esac
+ fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:2083: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 2094 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:2099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:2125: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:2130: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:2158: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+
+ fi
+ echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:2191: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 2206 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 2223 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 2240 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2273: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ for ac_prog in as
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2305: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$AS" in
+ /*)
+ ac_cv_path_AS="$AS" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_AS="$AS" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_AS="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+fi
+AS="$ac_cv_path_AS"
+if test -n "$AS"; then
+ echo "$ac_t""$AS" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$AS" && break
+done
+test -n "$AS" || AS="$CC"
+
+ for ac_prog in ar
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2346: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$AR" in
+ /*)
+ ac_cv_path_AR="$AR" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_AR="$AR" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_AR="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+fi
+AR="$ac_cv_path_AR"
+if test -n "$AR"; then
+ echo "$ac_t""$AR" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$AR" && break
+done
+test -n "$AR" || AR="echo not_ar"
+
+ for ac_prog in ld link
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2387: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$LD" in
+ /*)
+ ac_cv_path_LD="$LD" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_LD="$LD" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_LD="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+fi
+LD="$ac_cv_path_LD"
+if test -n "$LD"; then
+ echo "$ac_t""$LD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$LD" && break
+done
+test -n "$LD" || LD="echo not_ld"
+
+ for ac_prog in strip
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2428: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$STRIP" in
+ /*)
+ ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_STRIP="$STRIP" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_STRIP="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+fi
+STRIP="$ac_cv_path_STRIP"
+if test -n "$STRIP"; then
+ echo "$ac_t""$STRIP" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$STRIP" && break
+done
+test -n "$STRIP" || STRIP="echo not_strip"
+
+ for ac_prog in windres
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2469: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_WINDRES'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$WINDRES" in
+ /*)
+ ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_WINDRES="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+fi
+WINDRES="$ac_cv_path_WINDRES"
+if test -n "$WINDRES"; then
+ echo "$ac_t""$WINDRES" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$WINDRES" && break
+done
+test -n "$WINDRES" || WINDRES="echo not_windres"
+
+ if test -z "$HOST_CC"; then
+ HOST_CC="$CC"
+ fi
+ if test -z "$HOST_CFLAGS"; then
+ HOST_CFLAGS="$CFLAGS"
+ fi
+fi
+
+if test "$GCC" = "yes"; then
+ GNU_CC=1
+fi
+if test "$GXX" = "yes"; then
+ GNU_CXX=1
+fi
+if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then
+ GNU_AS=1
+fi
+rm -f a.out
+
+if test "$cross_compiling" = "yes"; then
+ CROSS_COMPILE=1
+else
+ CROSS_COMPILE=
+fi
+
+echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
+echo "configure:2531: checking for gcc -pipe support" >&5
+if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
+ echo '#include <stdio.h>' > dummy-hello.c
+ echo 'int main() { printf("Hello World\n"); return 0; }' >> dummy-hello.c
+ ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
+ cat dummy-hello.s | ${AS} -o dummy-hello.S - 2>&5
+ if test $? = 0; then
+ _res_as_stdin="yes"
+ else
+ _res_as_stdin="no"
+ fi
+ if test "$_res_as_stdin" = "yes"; then
+ _SAVE_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -pipe"
+ cat > conftest.$ac_ext <<EOF
+#line 2546 "configure"
+#include "confdefs.h"
+ #include <stdio.h>
+int main() {
+printf("Hello World\n");
+; return 0; }
+EOF
+if { (eval echo configure:2553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ _res_gcc_pipe="yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ _res_gcc_pipe="no"
+fi
+rm -f conftest*
+ 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
+ echo "$ac_t""$_res" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi # SKIP_COMPILER_CHECKS
+
+if test -z "$SKIP_PATH_CHECKS"; then
+ for ac_prog in perl5 perl
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2586: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$PERL" in
+ /*)
+ ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_PERL="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+fi
+PERL="$ac_cv_path_PERL"
+if test -n "$PERL"; then
+ echo "$ac_t""$PERL" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$PERL" && break
+done
+test -n "$PERL" || PERL="echo not_perl"
+
+elif test -z "$PERL"; then
+ PERL=perl
+fi
+
+OBJ_SUFFIX=o
+LIB_SUFFIX=a
+DLL_SUFFIX=so
+ASM_SUFFIX=s
+MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
+PR_MD_ASFILES=
+PR_MD_CSRCS=
+PR_MD_ARCH_DIR=unix
+AR_FLAGS='cr $@'
+AS='$(CC)'
+ASFLAGS='$(CFLAGS)'
+
+if test -n "$CROSS_COMPILE"; then
+ OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
+ OS_RELEASE=
+ OS_TEST="${target_cpu}"
+ case "${target_os}" in
+ linux*) OS_ARCH=Linux ;;
+ solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
+ mingw*) OS_ARCH=WINNT ;;
+ esac
+else
+ OS_ARCH=`uname -s | sed -e 's|/|_|g'`
+ OS_RELEASE=`uname -r`
+ OS_TEST=`uname -m`
+fi
+
+if test "$OS_ARCH" = "IRIX64"; then
+ OS_ARCH=IRIX
+fi
+
+if test "$OS_ARCH" = "AIX"; then
+ OS_RELEASE=`uname -v`.`uname -r`
+fi
+
+if test "$OS_ARCH" = "FreeBSD"; then
+ OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
+fi
+
+if test "$OS_ARCH" = "Linux"; then
+ OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
+ OS_RELEASE=`echo $OS_RELEASE | awk -F\. '{ print $1 "." $2 }'`
+fi
+
+if test "$OS_ARCH" = "OpenVMS"; then
+ OS_RELEASE=`uname -v`
+fi
+
+#######################################################################
+# 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
+elif test "$OS_ARCH" = 'Windows_98'; then
+ OS_ARCH=Windows_NT
+ OS_TARGET=WIN95
+elif test "`echo $OS_ARCH | egrep -c '^(CYGWIN_9|CYGWIN_ME)' 2>/dev/null`" != 0; then
+ OS_ARCH='CYGWIN_NT-4.0'
+ OS_TARGET=WIN95
+elif test "$OS_ARCH" = "OS_2"; then
+ 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
+ OS_MINOR_RELEASE=`uname -v`
+ 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
+
+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
+if test -z "$OS_TARGET"; then
+ OS_TARGET=$OS_ARCH
+fi
+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}"
+
+
+case "$host" in
+*-mingw*|*-cygwin*|*-msvc*|*-mks*)
+ NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
+ if test `echo "${PATH}" | grep -c \;` = 0; then
+ CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
+ fi
+ ;;
+*-beos*)
+ HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE"
+ ;;
+*os2*)
+ ;;
+*)
+ HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
+ ;;
+esac
+
+case "$target" in
+
+*-aix*)
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define AIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define SYSV 1
+EOF
+
+ DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
+ ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
+echo "configure:2831: checking for sys/atomic_op.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2836 "configure"
+#include "confdefs.h"
+#include <sys/atomic_op.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define AIX_HAVE_ATOMIC_OP_H 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ case "${target_os}" in
+ aix3.2*)
+ cat >> confdefs.h <<\EOF
+#define AIX_RENAME_SELECT 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_NO_LARGE_FILES 1
+EOF
+
+ AIX_LINK_OPTS='-bnso -berok'
+ PR_MD_ASFILES=os_AIX.s
+ ;;
+ aix4.1*)
+ cat >> confdefs.h <<\EOF
+#define AIX_TIMERS 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_NO_LARGE_FILES 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define AIX4_1 1
+EOF
+
+ MKSHLIB=
+ DSO_LDOPTS=
+ AIX_LINK_OPTS='-bnso -berok'
+ LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)_shr'
+ LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)_shr'
+ ;;
+ aix4.2*)
+ cat >> confdefs.h <<\EOF
+#define AIX_TIMERS 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_OFF64_T 1
+EOF
+
+ AIX_LINK_OPTS='-brtl -bnso -berok'
+ ;;
+ aix4.3*)
+ cat >> confdefs.h <<\EOF
+#define AIX_TIMERS 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_OFF64_T 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define AIX4_3_PLUS 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_SOCKLEN_T 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_FCNTL_FILE_LOCKING 1
+EOF
+
+ USE_IPV6=1
+ AIX_LINK_OPTS='-brtl -bnso -berok'
+ ;;
+ *)
+ cat >> confdefs.h <<\EOF
+#define AIX_TIMERS 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_OFF64_T 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define AIX4_3_PLUS 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_SOCKLEN_T 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_FCNTL_FILE_LOCKING 1
+EOF
+
+ USE_IPV6=1
+ AIX_LINK_OPTS='-brtl -bnso -berok'
+ ;;
+ esac
+ CFLAGS="$CFLAGS -qro -qroconst"
+ AIX_WRAP='$(DIST)/lib/aixwrap.o'
+ AIX_TMP='./_aix_tmp.o'
+ if test -n "$USE_64"; then
+ MDCPUCFG_H=_aix64.cfg
+ OBJECT_MODE=64
+ else
+ MDCPUCFG_H=_aix32.cfg
+ fi
+ PR_MD_CSRCS=aix.c
+ RESOLVE_LINK_SYMBOLS=1
+ ;;
+
+*-beos*)
+ cat >> confdefs.h <<\EOF
+#define XP_BEOS 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define BeOS 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define BEOS 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _POSIX_SOURCE 1
+EOF
+
+ DSO_LDOPTS=-nostart
+ MDCPUCFG_H=_beos.cfg
+ USE_BTHREADS=1
+ PR_MD_ARCH_DIR=beos
+ RESOLVE_LINK_SYMBOLS=1
+ case "${target_cpu}" in
+ i*86)
+ _OPTIMIZE_FLAGS=-O2
+ _DEBUG_FLAGS='-gdwarf-2 -O0'
+ MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
+ echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
+echo "configure:2998: checking for gethostbyaddr in -lbind" >&5
+ac_lib_var=`echo bind'_'gethostbyaddr | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lbind $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3006 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostbyaddr();
+
+int main() {
+gethostbyaddr()
+; return 0; }
+EOF
+if { (eval echo configure:3017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ OS_LIBS="$OS_LIBS -lbind -lsocket"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ ;;
+ 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
+ ;;
+
+*-bsdi*)
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define BSDI 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define NEED_BSDREGEX 1
+EOF
+
+
+ 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*)
+ cat >> confdefs.h <<\EOF
+#define _PR_BSDI_JMPBUF_IS_ARRAY 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_STAT_HAS_ONLY_ST_ATIME 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_NEED_H_ERRNO 1
+EOF
+
+ MKSHLIB=
+ DSO_CFLAGS=
+ DSO_LDOPTS=
+ ;;
+
+ bsdi2.1*)
+ cat >> confdefs.h <<\EOF
+#define _PR_TIMESPEC_HAS_TS_SEC 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_BSDI_JMPBUF_IS_ARRAY 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_DLL 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define USE_DLFCN 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_STAT_HAS_ST_ATIMESPEC 1
+EOF
+
+ PR_MD_ASFILES=os_BSD_OS_386_2.s
+ ;;
+
+ bsdi4.* | bsdi5.*)
+ cat >> confdefs.h <<\EOF
+#define _PR_SELECT_CONST_TIMEVAL 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_BSDI_JMPBUF_IS_STRUCT 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_DLL 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define USE_DLFCN 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_STAT_HAS_ST_ATIMESPEC 1
+EOF
+
+ MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
+ DSO_CFLAGS=-fPIC
+ DSO_LDOPTS='-shared -Wl,-soname,$(@:$(OBJDIR)/%.so=%.so)'
+ STRIP="$STRIP -d"
+ case "$target_os" in
+ bsdi4.2* | bsdi4.3* | bsdi5.*)
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_GETPROTO_R 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_GETPROTO_R_POINTER 1
+EOF
+
+ ;;
+ esac
+ ;;
+ *)
+ cat >> confdefs.h <<\EOF
+#define _PR_SELECT_CONST_TIMEVAL 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_BSDI_JMPBUF_IS_STRUCT 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_DLL 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define USE_DLFCN 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_STAT_HAS_ST_ATIMESPEC 1
+EOF
+
+ ;;
+ esac
+
+ ;;
+
+*-darwin*)
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define DARWIN 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_BSD_FLOCK 1
+EOF
+
+ CFLAGS="$CFLAGS -Wmost -fno-common"
+ if echo $OS_TEST | grep -c 86 2>/dev/null; then
+ cat >> confdefs.h <<\EOF
+#define i386 1
+EOF
+
+ CPU_ARCH=i386
+ else
+ cat >> confdefs.h <<\EOF
+#define ppc 1
+EOF
+
+ CPU_ARCH=ppc
+ fi
+ DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
+ # Use the standard preprocessor (cpp)
+ CFLAGS="$CFLAGS -no-cpp-precomp"
+ MKSHLIB='$(CC) -arch $(CPU_ARCH) $(DSO_LDOPTS) -o $@'
+ STRIP="$STRIP -x -S"
+ DLL_SUFFIX=dylib
+ USE_PTHREADS=1
+ MDCPUCFG_H=_darwin.cfg
+ PR_MD_CSRCS=darwin.c
+ if test "$CPU_ARCH" = "ppc"; then
+ PR_MD_ASFILES=os_Darwin_ppc.s
+ fi
+
+ # Add Mac OS X support for loading CFM & CFBundle plugins
+ if test -f /System/Library/Frameworks/Carbon.framework/Carbon; then
+ cat >> confdefs.h <<\EOF
+#define XP_MACOSX 1
+EOF
+
+ OS_TARGET=MacOSX
+
+
+ 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"`
+ cat >> confdefs.h <<EOF
+#define MACOS_DEPLOYMENT_TARGET $MACOS_DEPLOYMENT_TARGET
+EOF
+
+ fi
+
+ # do the right thing for panther SDK support
+ if test "$NEXT_ROOT"; then
+ CFLAGS="-I${NEXT_ROOT}/usr/include $CFLAGS"
+ CXXFLAGS="-I${NEXT_ROOT}/usr/include $CXXFLAGS"
+ fi
+ ;;
+
+*-dgux*)
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_LOCAL_THREADS_ONLY 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define SVR4 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define SYSV 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define DGUX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _DGUX_SOURCE 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _POSIX4A_DRAFT6_SOURCE 1
+EOF
+
+ DSO_LDOPTS=-G
+ _OPTIMIZE_FLAGS=-O2
+ _DEBUG_FLAGS=
+ MDCPUCFG_H=_dgux.cfg
+ PR_MD_CSRCS=dgux.c
+ ;;
+
+*-freebsd*)
+ if test -z "$USE_NSPR_THREADS"; then
+ USE_PTHREADS=1
+ fi
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define FREEBSD 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_BSD_FLOCK 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_SOCKLEN_T 1
+EOF
+
+ CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
+ 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
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ DSO_CFLAGS=-fPIC
+ DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
+ MDCPUCFG_H=_freebsd.cfg
+ PR_MD_CSRCS=freebsd.c
+ ;;
+
+*-hpux*)
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HPUX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _HPUX_SOURCE 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define hppa 1
+EOF
+
+ # 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.
+ cat >> confdefs.h <<\EOF
+#define _PR_POLL_WITH_SELECT 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _USE_BIG_FDS 1
+EOF
+
+ DLL_SUFFIX=sl
+ DSO_LDOPTS='-b +h $(notdir $@)'
+ PR_MD_CSRCS=hpux.c
+ if test "$OS_TEST" != "ia64"; then
+ PR_MD_ASFILES=os_HPUX.s
+ fi
+ if test -n "$USE_64"; then
+ MDCPUCFG_H=_hpux64.cfg
+ else
+ MDCPUCFG_H=_hpux32.cfg
+ fi
+ if test -z "$GNU_CC"; then
+ CC="$CC -Ae"
+ CXX="$CXX -ext"
+ DSO_CFLAGS=+Z
+ else
+ DSO_CFLAGS=-fPIC
+ fi
+
+ if test -n "$MOZILLA_CLIENT"; then
+ DEFAULT_IMPL_STRATEGY=_EMU
+ fi
+
+ if echo "$OS_RELEASE" | grep ^A.09 >/dev/null; then
+ cat >> confdefs.h <<\EOF
+#define _PR_NEED_H_ERRNO 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HPUX9 1
+EOF
+
+ DEFAULT_IMPL_STRATEGY=_EMU
+ USE_NSPR_THREADS=1
+ fi
+
+ if echo "$OS_RELEASE" | egrep '^(A.09|B.10)' >/dev/null; then
+ cat >> confdefs.h <<\EOF
+#define _PR_NO_LARGE_FILES 1
+EOF
+
+ fi
+
+ if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
+ cat >> confdefs.h <<\EOF
+#define _PR_NEED_H_ERRNO 1
+EOF
+
+ fi
+
+ if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_INT_LOCALTIME_R 1
+EOF
+
+ fi
+
+ if echo "$OS_RELEASE" | egrep '^(B.10.30|B.11)' >/dev/null; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_POINTER_LOCALTIME_R 1
+EOF
+
+ fi
+
+ # HP-UX 11i (B.11.11) or higher
+
+ 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
+
+
+ if test "$OS_RELEASE" = "B.10.01"; then
+ cat >> confdefs.h <<\EOF
+#define HPUX10 1
+EOF
+
+ DEFAULT_IMPL_STRATEGY=_EMU
+ fi
+
+ if test "$OS_RELEASE" = "B.10.10"; then
+ cat >> confdefs.h <<\EOF
+#define HPUX10 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HPUX10_10 1
+EOF
+
+ DEFAULT_IMPL_STRATEGY=_PTH
+ fi
+
+ if test "$OS_RELEASE" = "B.10.20"; then
+ cat >> confdefs.h <<\EOF
+#define HPUX10 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HPUX10_20 1
+EOF
+
+ if test -z "$GNU_CC"; then
+ CFLAGS="$CFLAGS +DAportable +DS1.1"
+ CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
+ fi
+ DEFAULT_IMPL_STRATEGY=_PTH
+ fi
+
+ if test "$OS_RELEASE" = "B.10.30"; then
+ cat >> confdefs.h <<\EOF
+#define HPUX10 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HPUX10_30 1
+EOF
+
+ if test -z "$GNU_CC"; then
+ CFLAGS="$CFLAGS +DAportable +DS1.1"
+ CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
+ fi
+ DEFAULT_IMPL_STRATEGY=_PTH
+ fi
+
+ if echo "$OS_RELEASE" | grep ^B.11 >/dev/null; then
+ cat >> confdefs.h <<\EOF
+#define HPUX10 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HPUX11 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _LARGEFILE64_SOURCE 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_OFF64_T 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_FCNTL_FILE_LOCKING 1
+EOF
+
+ if test -z "$GNU_CC"; then
+ if test -z "$USE_64"; then
+ if test "$OS_TEST" = "ia64"; then
+ CFLAGS="$CFLAGS +DD32"
+ CXXFLAGS="$CXXFLAGS +DD32"
+ else
+ CFLAGS="$CFLAGS +DAportable +DS2.0"
+ CXXFLAGS="$CXXFLAGS +DAportable +DS2.0"
+ fi
+ else
+ 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
+ fi
+ fi
+ 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
+ USE_PTHREADS=1
+ if test "$USE_NSPR_THREADS"; then
+ USE_PTHREADS=
+ fi
+ if test "$USE_USER_PTHREADS"; then
+ USE_PTHREADS=
+ fi
+ fi
+ ;;
+
+*-irix*)
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define IRIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define SVR4 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _SGI_MP_SOURCE 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_FCNTL_FILE_LOCKING 1
+EOF
+
+ PR_MD_CSRCS=irix.c
+ PR_MD_ASFILES=os_Irix.s
+ MKSHLIB='$(LD) $(DSO_LDOPTS) -rdata_shared -shared -soname $(notdir $@) -o $@'
+ STRIP="$STRIP -f"
+ RESOLVE_LINK_SYMBOLS=1
+ if test -n "$USE_64"; then
+ MDCPUCFG_H=_irix64.cfg
+ else
+ MDCPUCFG_H=_irix32.cfg
+ fi
+ case "${target_os}" in
+ irix6*)
+ cat >> confdefs.h <<\EOF
+#define IRIX6 1
+EOF
+
+ USE_PTHREADS=1
+ USE_N32=1
+ COMPILER_TAG=_n32
+ IMPL_STRATEGY=_PTH
+ ;;
+ irix5*)
+ cat >> confdefs.h <<\EOF
+#define IRIX5 1
+EOF
+
+ USE_NSPR_THREADS=1
+ ;;
+ *)
+ USE_PTHREADS=1
+ USE_N32=1
+ ;;
+ esac
+ if test "$GNU_CC"; then
+ AS='$(CC) -Wp,-P -x assembler-with-cpp -D_ASM -mips2 $(INCLUDES)'
+ CFLAGS="$CFLAGS -Wall -Wno-format"
+ _OPTIMIZE_FLAGS="-O6"
+ else
+ if test -n "$USE_N32"; then
+ AS='as -D_ASM $(INCLUDES) -n32'
+ else
+ AS='as -D_ASM $(INCLUDES)'
+ fi
+ CFLAGS="$CFLAGS -fullwarn -xansi"
+ if test "$USE_N32"; then
+ _OPTIMIZE_FLAGS="-O -OPT:Olimit=4000"
+ else
+ _OPTIMIZE_FLAGS="-O -Olimit 4000"
+ fi
+ if test "$USE_MDUPDATE"; then
+ CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
+ fi
+ case "${target}" in
+ *-irix6.*)
+ CFLAGS="$CFLAGS -multigot"
+ DSO_LDOPTS="-no_unresolved"
+ if test "$USE_N32"; then
+ CFLAGS="$CFLAGS -n32 -woff 1209"
+ DSO_LDOPTS="$DSO_LDOPTS -n32"
+ else
+ if test "$USE_64"; then
+ CFLAGS="$CFLAGS -64"
+ else
+ CFLAGS="$CFLAGS -32"
+ fi
+ fi
+ ;;
+ *)
+ CFLAGS="$CFLAGS -xgot"
+ ;;
+ esac
+ fi
+ if test "${target_os}" = "irix5.3"; then
+ cat >> confdefs.h <<\EOF
+#define IRIX5_3 1
+EOF
+
+ fi
+ case "${target_os}" in
+ irix6.5)
+ if test -z "$GNU_CC"; then
+ CFLAGS="$CFLAGS -mips3"
+ fi
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_GETPROTO_R 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_GETPROTO_R_POINTER 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_SGI_PRDA_PROCMASK 1
+EOF
+
+ ;;
+ irix5*)
+ ;;
+ *)
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_SGI_PRDA_PROCMASK 1
+EOF
+
+ ;;
+ esac
+ ;;
+
+*-linux*)
+ if test -z "$USE_NSPR_THREADS"; then
+ USE_PTHREADS=1
+ IMPL_STRATEGY=_PTH
+ fi
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _POSIX_SOURCE 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _BSD_SOURCE 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _SVID_SOURCE 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _LARGEFILE64_SOURCE 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_FCNTL_FILE_LOCKING 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define LINUX 1
+EOF
+
+ CFLAGS="$CFLAGS -ansi -Wall"
+ CXXFLAGS="$CXXFLAGS -ansi -Wall"
+ MDCPUCFG_H=_linux.cfg
+ PR_MD_CSRCS=linux.c
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ DSO_CFLAGS=-fPIC
+ DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
+ _OPTIMIZE_FLAGS=-O2
+ _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)
+ COMPILER_TAG=_glibc
+ if echo "$OS_TEST" | grep -c 86 >/dev/null; then
+ CPU_ARCH=x86
+ else
+ CPU_ARCH=$OS_TEST
+ fi
+ CPU_ARCH_TAG=_${CPU_ARCH}
+ case "${target_cpu}" in
+ alpha)
+ cat >> confdefs.h <<\EOF
+#define _ALPHA_ 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define __alpha 1
+EOF
+
+ CFLAGS="$CFLAGS -mieee"
+ CXXFLAGS="$CXXFLAGS -mieee"
+ ;;
+ i*86)
+ cat >> confdefs.h <<\EOF
+#define i386 1
+EOF
+
+ PR_MD_ASFILES=os_Linux_x86.s
+ ;;
+ ia64)
+ PR_MD_ASFILES=os_Linux_ia64.s
+ ;;
+ x86_64)
+ PR_MD_ASFILES=os_Linux_x86_64.s
+ ;;
+ m68k)
+ CFLAGS="$CFLAGS -m68020-60"
+ CXXFLAGS="$CXXFLAGS -m68020-60"
+ ;;
+ esac
+ ;;
+
+*-mingw*|*-cygwin*|*-msvc*|*-mks*)
+ cat >> confdefs.h <<\EOF
+#define XP_PC 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define WIN32 1
+EOF
+
+ PR_MD_ARCH_DIR=windows
+ RESOLVE_LINK_SYMBOLS=1
+
+ if test -n "$GNU_CC"; then
+ 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
+ # Use temp file for windres (bug 213281)
+ RCFLAGS='-O coff --use-temp-file'
+ else
+ CC=cl
+ CXX=cl
+ LD=link
+ AR='lib -NOLOGO -OUT:"$@"'
+ AR_FLAGS=
+ RANLIB='echo not_ranlib'
+ STRIP='echo not_strip'
+ RC=rc.exe
+ GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
+ OBJ_SUFFIX=obj
+ LIB_SUFFIX=lib
+ DLL_SUFFIX=dll
+
+ # Determine compiler version
+ CC_VERSION=`"${CC}" -v 2>&1 | grep Version | sed -e 's|.* Version ||' -e 's| .*||'`
+ _CC_MAJOR_VERSION=`echo $CC_VERSION | awk -F\. '{ print $1 }'`
+ _CC_MINOR_VERSION=`echo $CC_VERSION | awk -F\. '{ print $2 }'`
+ MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION}
+
+ CFLAGS="$CFLAGS -W3 -nologo -GF -Gy"
+ DLLFLAGS='-OUT:"$@"'
+ _DEBUG_FLAGS=-Z7
+ _OPTIMIZE_FLAGS=-O2
+ if test -z "$MOZ_OPTIMIZE"; then
+ CFLAGS="$CFLAGS -Od"
+ fi
+
+ if test -n "$USE_DEBUG_RTL"; then
+ CFLAGS="$CFLAGS -MDd"
+ else
+ CFLAGS="$CFLAGS -MD"
+ fi
+
+ if test -n "$MOZ_DEBUG"; then
+ cat >> confdefs.h <<\EOF
+#define _DEBUG 1
+EOF
+
+ else
+ DEFINES="$DEFINES -U_DEBUG"
+ fi
+
+ if test -n "$MOZ_OPTIMIZE"; then
+ if test -n "$MOZ_PROFILE"; then
+ _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Z7"
+ fi
+ if test -n "$MOZ_DEBUG_SYMBOLS"; then
+ _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Zi"
+ fi
+ if test -n "$MOZ_PROFILE" -o -n "$MOZ_DEBUG_SYMBOLS"; then
+ DLLFLAGS="$DLLFLAGS -DEBUG -OPT:REF"
+ LDFLAGS="$LDFLAGS -DEBUG -OPT:REF"
+ fi
+ fi
+
+ if test -n "$MOZ_DEBUG"; then
+ DLLFLAGS="$DLLFLAGS -DEBUG -DEBUGTYPE:CV"
+ LDFLAGS="$LDFLAGS -DEBUG -DEBUGTYPE:CV"
+ fi
+
+ if test "$OS_TARGET" = "WINNT"; then
+ CFLAGS="$CFLAGS -GT"
+ if test "$CPU_ARCH" = "x86"; then
+ CFLAGS="$CFLAGS -G5"
+ fi
+ 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
+
+ if test -n "$USE_STATIC_TLS"; then
+ cat >> confdefs.h <<\EOF
+#define _PR_USE_STATIC_TLS 1
+EOF
+
+ fi
+
+ if test "$OS_TARGET" = "WINNT"; then
+ cat >> confdefs.h <<\EOF
+#define WINNT 1
+EOF
+
+ else
+ cat >> confdefs.h <<\EOF
+#define WIN95 1
+EOF
+
+ # undefine WINNT as some versions of mingw gcc define it by default
+ DEFINES="$DEFINES -UWINNT"
+ cat >> confdefs.h <<\EOF
+#define _PR_GLOBAL_THREADS_ONLY 1
+EOF
+
+ 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"
+ if test "$MSC_VER" = "1200" -a -z "$MOZ_DEBUG_SYMBOLS"; then
+ OS_DLLFLAGS="$OS_DLLFLAGS -PDB:NONE"
+ fi
+
+ case "$OS_TARGET" in
+ WINNT)
+ MDCPUCFG_H=_winnt.cfg
+ ;;
+ WIN95)
+ MDCPUCFG_H=_win95.cfg
+ ;;
+ WIN16)
+ MDCPUCFG_H=_win16.cfg
+ ;;
+ *)
+ { echo "configure: error: Missing OS_TARGET for ${target}. Use --enable-win32-target to set." 1>&2; exit 1; }
+ ;;
+ esac
+
+ case "$target_cpu" in
+ i*86)
+ cat >> confdefs.h <<\EOF
+#define _X86_ 1
+EOF
+
+ ;;
+ alpha)
+ cat >> confdefs.h <<\EOF
+#define _ALPHA_ 1
+EOF
+
+ ;;
+ mips)
+ cat >> confdefs.h <<\EOF
+#define _MIPS_ 1
+EOF
+
+ ;;
+ *)
+ cat >> confdefs.h <<\EOF
+#define _CPU_ARCH_NOT_DEFINED 1
+EOF
+
+ ;;
+ esac
+
+ ;;
+
+*-ncr-sysv*)
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define SVR4 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define SYSV 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define NCR 1
+EOF
+
+ USE_NSPR_THREADS=1
+ if test "$OS_RELEASE" = "2.03"; then
+ cat >> confdefs.h <<\EOF
+#define _PR_STAT_HAS_ST_ATIM 1
+EOF
+
+ else
+ cat >> confdefs.h <<\EOF
+#define _PR_STAT_HAS_ST_ATIM_UNION 1
+EOF
+
+ fi
+
+ if test -z "$GNU_CC"; then
+ CFLAGS="$CFLAGS -Hnocopyr"
+ CXXFLAGS="$CXXFLAGS -Hnocopyr"
+ else
+ CFLAGS="$CFLAGS -fPIC -Wall"
+ CXXFLAGS="$CXXFLAGS -fPIC -Wall"
+ DSO_LDOPTS=-G
+ fi
+ MDCPUCFG_H=_ncr.cfg
+ PR_MD_CSRCS=ncr.c
+ ;;
+
+mips-nec-sysv*)
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define SVR4 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define __SVR4 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define NEC 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define nec_ews 1
+EOF
+
+ 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
+ MDCPUCFG_H=_nec.cfg
+ PR_MD_CSRCS=nec.c
+ ;;
+
+*-netbsd*)
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define NETBSD 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_BSD_FLOCK 1
+EOF
+
+ USE_NSPR_THREADS=1
+ MDCPUCFG_H=_netbsd.cfg
+ PR_MD_CSRCS=netbsd.c
+
+ DSO_CFLAGS='-fPIC -DPIC'
+ CFLAGS="$CFLAGS -ansi -Wall"
+ CXXFLAGS="$CXXFLAGS -ansi -Wall"
+ MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
+
+ if test -z "$OBJECT_FMT"; then
+ if echo __ELF__ | ${CC-cc} -E - | grep -q __ELF__ 2>/dev/null; then
+ OBJECT_FMT=a.out
+ DLL_SUFFIX=so.1.0
+ DSO_LDOPTS='-shared'
+ else
+ OBJECT_FMT=ELF
+ DLL_SUFFIX=so
+ DSO_LDOPTS='-shared -Wl,-soname,$(notdir $@)'
+ fi
+ fi
+
+ if test "$LIBRUNPATH"; then
+ DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
+ fi
+ ;;
+
+mips-sony-newsos*)
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define SONY 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define SYSV 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define SVR4 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define __svr4 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define __svr4__ 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_SVID_GETTOD 1
+EOF
+
+ USE_NSPR_THREADS=1
+ CFLAGS="$CFLAGS -Xa -fullwarn"
+ CXXFLAGS="$CXXFLAGS -Xa -fullwarn"
+ DSO_LDOPTS=-G
+ MDCPUCFG_H=_sony.cfg
+ PR_MD_CSRCS=sony.c
+ ;;
+
+*-nextstep*|*-openstep*)
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define NEXTSTEP 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_BSD_FLOCK 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _POSIX_SOURCE 1
+EOF
+
+ CFLAGS="$CFLAGS -Wall -fno-common -traditional-cpp -posix"
+ CXXFLAGS="$CXXFLAGS -Wall -fno-common -traditional-cpp -posix"
+ USE_NSPR_THREADS=1
+ DLL_SUFFIX=dylib
+ MDCPUCFG_H=_nextstep.cfg
+ PR_MD_CSRCS=nextstep.c
+ ;;
+
+
+*-nto*)
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define NTO 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _QNX_SOURCE 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_POINTER_LOCALTIME_R 1
+EOF
+
+ MDCPUCFG_H=_nto.cfg
+ PR_MD_CSRCS=nto.c
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(notdir $@) -o $@'
+ DSO_CFLAGS=-fPIC
+ DSO_LDOPTS=-shared
+ OS_LIBS="$OS_LIBS -lsocket"
+ _OPTIMIZE_FLAGS="-O1"
+ _DEBUG_FLAGS="-gstabs"
+ ;;
+
+*-openbsd*)
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define OPENBSD 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_BSD_FLOCK 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_SOCKLEN_T 1
+EOF
+
+ CFLAGS="$CFLAGS -ansi -Wall"
+ CXXFLAGS="$CXXFLAGS -ansi -Wall"
+ DLL_SUFFIX=so.1.0
+ DSO_CFLAGS=-fPIC
+ MDCPUCFG_H=_openbsd.cfg
+ PR_MD_CSRCS=openbsd.c
+ USE_NSPR_THREADS=1
+ DSO_LDOPTS='-shared -fPIC'
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ ;;
+
+*-openvms*)
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define VMS 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define PR_GETIPNODE_NOT_THREADSAFE 1
+EOF
+
+ RESOLVE_LINK_SYMBOLS=1
+ AR_FLAGS='c $@'
+ MDCPUCFG_H=_openvms.cfg
+ PR_MD_CSRCS=openvms.c
+ 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
+ ;;
+
+*-osf*)
+ SHELL_OVERRIDE="SHELL = /usr/bin/ksh"
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define OSF1 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _REENTRANT 1
+EOF
+
+ # 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.
+ cat >> confdefs.h <<\EOF
+#define _PR_POLL_WITH_SELECT 1
+EOF
+
+
+ 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"
+ if test "$OS_RELEASE" != "V2.0"; then
+ CC="$CC -readonly_strings"
+ fi
+ _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
+ ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
+echo "configure:4220: checking for machine/builtins.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4225 "configure"
+#include "confdefs.h"
+#include <machine/builtins.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define OSF1_HAVE_MACHINE_BUILTINS_H 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ else
+ CFLAGS="$CFLAGS -mieee"
+ CXXFLAGS="$CXXFLAGS -mieee"
+ fi
+
+ if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_INT_LOCALTIME_R 1
+EOF
+
+ else
+ cat >> confdefs.h <<\EOF
+#define HAVE_FCNTL_FILE_LOCKING 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_POINTER_LOCALTIME_R 1
+EOF
+
+ fi
+ if echo $OS_RELEASE | grep -c V4.0 >/dev/null; then
+ cat >> confdefs.h <<\EOF
+#define OSF1V4_MAP_PRIVATE_BUG 1
+EOF
+
+ fi
+ DSO_LDOPTS='-shared -all -expect_unresolved "*" -soname $(notdir $@)'
+ MDCPUCFG_H=_osf1.cfg
+ PR_MD_CSRCS=osf1.c
+ ;;
+
+*-qnx*)
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define QNX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_NEED_H_ERRNO 1
+EOF
+
+ USE_NSPR_THREADS=1
+ MDCPUCFG_H=_qnx.cfg
+ PR_MD_CSRCS=qnx.c
+ ;;
+
+*-*-sco*)
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define SCO 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define sco 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define SYSV 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _SVID3 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_NEED_H_ERRNO 1
+EOF
+
+ CC='cc -b elf -KPIC'
+ CXX='$(NSDEPTH)/build/hcpp CC +.cpp +w'
+ USE_NSPR_THREADS=1
+ CPU_ARCH=x86
+ DSO_LDOPTS='-b elf -G'
+ MDCPUCFG_H=_scoos.cfg
+ PR_MD_SRCS=scoos.c
+ ;;
+
+*-sinix*)
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define SVR4 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define SNI 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define RELIANTUNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define sinix 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_SVID_GETTOD 1
+EOF
+
+ if echo "$OS_TEST" | grep -c 86 2>/dev/null; then
+ cat >> confdefs.h <<\EOF
+#define i386 1
+EOF
+
+ 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
+ cat >> confdefs.h <<\EOF
+#define IP_MULTICAST 1
+EOF
+
+ fi
+
+ OS_LIBS="$OS_LIBS -lsocket -lnsl -lresolv -ldl -lc"
+ USE_NSPR_THREADS=1
+ MDCPUCFG_H=_reliantunix.cfg
+ PR_MD_CSRCS=reliantunix.c
+ if test "${OS_ARCH}" = "mips"; then
+ PR_MD_ASFILES=os_ReliantUNIX.s
+ fi
+ ;;
+
+*-sunos*)
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define SUNOS4 1
+EOF
+
+ 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
+ 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
+ ;;
+
+*-solaris*)
+ if test -z "$USE_USER_THREADS" && test -z "$USE_NATIVE_THREADS"; then
+ USE_PTHREADS=1
+ fi
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define SVR4 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define SYSV 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define __svr4 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define __svr4__ 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define SOLARIS 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_FCNTL_FILE_LOCKING 1
+EOF
+
+ if test -n "$USE_64"; then
+ MDCPUCFG_H=_solaris64.cfg
+ else
+ MDCPUCFG_H=_solaris32.cfg
+ fi
+ PR_MD_CSRCS=solaris.c
+ LD=/usr/ccs/bin/ld
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ RESOLVE_LINK_SYMBOLS=1
+ if test -n "$GNU_CC"; then
+ DSO_CFLAGS=-fPIC
+ 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'
+ else
+ DSO_CFLAGS=-KPIC
+ DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs'
+ fi
+ if test -z "$GNU_AS"; then
+ ASFLAGS="$ASFLAGS -Wa,-P"
+ fi
+ if test -n "$GNU_CC"; then
+ CFLAGS="$CFLAGS -Wall"
+ CXXFLAGS="$CXXFLAGS -Wall"
+ if test -n "$USE_MDUPDATE"; then
+ CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
+ CXXFLAGS="$CXXFLAGS -MDupdate \$(DEPENDENCIES)"
+ fi
+ else
+ CFLAGS="$CFLAGS -xstrconst"
+ CXXFLAGS="$CXXFLAGS -Qoption cg -xstrconst -features=tmplife"
+ if test -z "$MOZ_OPTIMIZE"; then
+ CFLAGS="$CFLAGS -xs"
+ CXXFLAGS="$CXXFLAGS -xs"
+ fi
+ _OPTIMIZE_FLAGS=-xO4
+ fi
+ if test -n "$USE_64"; then
+ if test -n "$GNU_CC"; then
+ CC="$CC -m64"
+ CXX="$CXX -m64"
+ else
+ CC="$CC -xarch=v9"
+ CXX="$CXX -xarch=v9"
+ fi
+ fi
+ if test "$OS_TEST" = "i86pc"; then
+ cat >> confdefs.h <<\EOF
+#define i386 1
+EOF
+
+ CPU_ARCH_TAG=_$OS_TEST
+ # 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.
+ if test -n "$MOZ_DEBUG" && test -n "$GNU_CC"; then
+ _DEBUG_FLAGS=-gstabs
+ if test -z "$GNU_AS"; then
+ _DEBUG_FLAGS="$_DEBUG_FLAGS -Wa,-s"
+ fi
+ fi
+ fi
+ case "${target_os}" in
+ solaris2.3*)
+ cat >> confdefs.h <<\EOF
+#define _PR_NO_LARGE_FILES 1
+EOF
+
+ ;;
+ solaris2.4*)
+ cat >> confdefs.h <<\EOF
+#define _PR_NO_LARGE_FILES 1
+EOF
+
+ ;;
+ solaris2.5*)
+ cat >> confdefs.h <<\EOF
+#define SOLARIS2_5 1
+EOF
+
+ ;;
+ *)
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_OFF64_T 1
+EOF
+
+ # 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.
+ if test -n "$GNU_CC"; then
+ cat >> confdefs.h <<\EOF
+#define _LARGEFILE64_SOURCE 1
+EOF
+
+ fi
+ ;;
+ esac
+ case "${target_os}" in
+ solaris2.3*)
+ ;;
+ solaris2.4*)
+ ;;
+ solaris2.5*)
+ ;;
+ solaris2.6*)
+ ;;
+ solaris2.7*)
+ ;;
+ *)
+ # Solaris 8 or higher has IPv6.
+ cat >> confdefs.h <<\EOF
+#define _PR_INET6 1
+EOF
+
+ ;;
+ esac
+ if test "$OS_TEST" = "sun4u"; then
+ # 64-bit Solaris requires SPARC V9 architecture, so the following
+ # is not needed.
+ if test -z "$USE_64"; then
+ ULTRASPARC_LIBRARY=nspr_flt
+ fi
+ fi
+ # 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"
+ ;;
+
+*-sco-sysv5*)
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define UNIXWARE 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define SVR4 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define SYSV 1
+EOF
+
+ USE_NSPR_THREADS=1
+ if echo $OS_RELEASE | grep -c 2.1 2>/dev/null; then
+ cat >> confdefs.h <<\EOF
+#define _PR_NO_LARGE_FILES 1
+EOF
+
+ CC='$(NSDEPTH)/build/hcc cc'
+ CXX='$(NSDEPTH)/build/hcpp CC'
+ MDCPUCFG_H=_unixware.cfg
+ else
+ cat >> confdefs.h <<\EOF
+#define _LARGEFILE64_SOURCE 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_OFF64_T 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_SOCKADDR_LEN 1
+EOF
+
+ MDCPUCFG_H=_unixware7.cfg
+ fi
+ PR_MD_CSRCS=unixware.c
+ DSO_LDOPTS=-G
+ CPU_ARCH=x86
+ ;;
+
+*-os2*)
+ cat >> confdefs.h <<\EOF
+#define XP_OS2 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define XP_PC 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define BSD_SELECT 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define TCPV40HDRS 1
+EOF
+
+ LIB_SUFFIX=lib
+ DLL_SUFFIX=dll
+ RC=rc.exe
+ PR_MD_ARCH_DIR=os2
+ PROG_SUFFIX=.exe
+ NSINSTALL=nsinstall
+ MDCPUCFG_H=_os2.cfg
+ RESOLVE_LINK_SYMBOLS=1
+
+ # EMX/GCC build
+ if test -n "$GNU_CC"; then
+ cat >> confdefs.h <<\EOF
+#define XP_OS2_EMX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define OS2 1
+EOF
+
+ AR=emxomfar
+ AR_FLAGS='r $@'
+ CFLAGS="$CFLAGS -Wall -Zomf"
+ CXXFLAGS="$CFLAGS -Wall -Zomf"
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ DSO_CFLAGS=
+ DSO_LDOPTS='-Zomf -Zdll -Zmap'
+ LDFLAGS='-Zmap'
+ _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
+ OS_LIBS="-lsocket"
+ IMPLIB='emximp -o'
+ FILTER='emxexp -o'
+
+ # GCC for OS/2 currently predefines these, but we don't want them
+ DEFINES="$DEFINES -Uunix -U__unix -U__unix__"
+
+ # Visual Age C++ build
+ elif test "$VACPP" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define XP_OS2_VACPP 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define OS2 4
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _X86_ 1
+EOF
+
+ OBJ_SUFFIX=obj
+ AS=alp
+ ASFLAGS='-Mb'
+ ASM_SUFFIX=asm
+ AR=-ilib
+ AR_FLAGS='/NOL /NOI /O:$(subst /,\\,$@)'
+ CFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9'
+ HOST_CFLAGS="$CFLAGS"
+ 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'
+ OS_LIBS='so32dll.lib tcp32dll.lib'
+ LD='-ilink'
+ MKSHLIB='$(LD) $(DSO_LDOPTS)'
+ IMPLIB='implib -nologo -noignorecase'
+ FILTER='cppfilt -q -B -P'
+ _OPTIMIZE_FLAGS='/O+ /Gl+ /qtune=pentium /qarch=pentium'
+ _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'
+ if test -n "$MOZ_DEBUG"; then
+ 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"
+ fi
+ LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
+ LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
+ fi
+ ;;
+
+*)
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ ;;
+
+esac
+
+if test -z "$SKIP_LIBRARY_CHECKS"; then
+
+
+
+case $target in
+*-darwin*)
+ ;;
+*)
+ echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
+echo "configure:4765: checking for dlopen in -ldl" >&5
+ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-ldl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4773 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen();
+
+int main() {
+dlopen()
+; return 0; }
+EOF
+if { (eval echo configure:4784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
+echo "configure:4801: checking for dlfcn.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4806 "configure"
+#include "confdefs.h"
+#include <dlfcn.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ OS_LIBS="-ldl $OS_LIBS"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ ;;
+esac
+
+
+
+
+if test $ac_cv_prog_gcc = yes; then
+ echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
+echo "configure:4844: checking whether ${CC-cc} needs -traditional" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_pattern="Autoconf.*'x'"
+ cat > conftest.$ac_ext <<EOF
+#line 4850 "configure"
+#include "confdefs.h"
+#include <sgtty.h>
+Autoconf TIOCGETP
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "$ac_pattern" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_prog_gcc_traditional=yes
+else
+ rm -rf conftest*
+ ac_cv_prog_gcc_traditional=no
+fi
+rm -f conftest*
+
+
+ if test $ac_cv_prog_gcc_traditional = no; then
+ cat > conftest.$ac_ext <<EOF
+#line 4868 "configure"
+#include "confdefs.h"
+#include <termio.h>
+Autoconf TCGETA
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "$ac_pattern" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_prog_gcc_traditional=yes
+fi
+rm -f conftest*
+
+ fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
+ if test $ac_cv_prog_gcc_traditional = yes; then
+ CC="$CC -traditional"
+ fi
+fi
+
+for ac_func in lchown strerror
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:4892: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4897 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+
+
+# Check whether --enable-strip or --disable-strip was given.
+if test "${enable_strip+set}" = set; then
+ enableval="$enable_strip"
+ if test "$enableval" = "yes"; then
+ ENABLE_STRIP=1
+ fi
+fi
+
+
+case "${target_os}" in
+hpux*)
+if test -z "$GNU_CC"; then
+
+ echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
+echo "configure:4961: checking for +Olit support" >&5
+if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ 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*
+
+fi
+
+echo "$ac_t""$ac_cv_hpux_usable_olit_option" 1>&6
+
+ 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
+
+
+
+
+echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
+echo "configure:4995: checking for pthread_create in -lpthreads" >&5
+echo "
+ #include <pthread.h>
+ void *foo(void *v) { return v; }
+ int main() {
+ pthread_t t;
+ if (!pthread_create(&t, 0, &foo, 0)) {
+ pthread_join(t, 0);
+ }
+ return 0;
+ }" > dummy.c ;
+ echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS" 1>&5;
+ ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS 2>&5;
+ _res=$? ;
+ rm -f dummy.c dummy${ac_exeext} ;
+ if test "$_res" = "0"; then
+ echo "$ac_t""yes" 1>&6
+ _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads"
+ else
+ echo "$ac_t""no" 1>&6
+
+echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
+echo "configure:5017: checking for pthread_create in -lpthread" >&5
+echo "
+ #include <pthread.h>
+ void *foo(void *v) { return v; }
+ int main() {
+ pthread_t t;
+ if (!pthread_create(&t, 0, &foo, 0)) {
+ pthread_join(t, 0);
+ }
+ return 0;
+ }" > dummy.c ;
+ echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS" 1>&5;
+ ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS 2>&5;
+ _res=$? ;
+ rm -f dummy.c dummy${ac_exeext} ;
+ if test "$_res" = "0"; then
+ echo "$ac_t""yes" 1>&6
+ _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
+ else
+ echo "$ac_t""no" 1>&6
+
+echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
+echo "configure:5039: checking for pthread_create in -lc_r" >&5
+echo "
+ #include <pthread.h>
+ void *foo(void *v) { return v; }
+ int main() {
+ pthread_t t;
+ if (!pthread_create(&t, 0, &foo, 0)) {
+ pthread_join(t, 0);
+ }
+ return 0;
+ }" > dummy.c ;
+ echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS" 1>&5;
+ ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS 2>&5;
+ _res=$? ;
+ rm -f dummy.c dummy${ac_exeext} ;
+ if test "$_res" = "0"; then
+ echo "$ac_t""yes" 1>&6
+ _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
+ else
+ echo "$ac_t""no" 1>&6
+
+echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
+echo "configure:5061: checking for pthread_create in -lc" >&5
+echo "
+ #include <pthread.h>
+ void *foo(void *v) { return v; }
+ int main() {
+ pthread_t t;
+ if (!pthread_create(&t, 0, &foo, 0)) {
+ pthread_join(t, 0);
+ }
+ return 0;
+ }" > dummy.c ;
+ echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS" 1>&5;
+ ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS 2>&5;
+ _res=$? ;
+ rm -f dummy.c dummy${ac_exeext} ;
+ if test "$_res" = "0"; then
+ echo "$ac_t""yes" 1>&6
+ _HAVE_PTHREADS=1
+
+ else
+ echo "$ac_t""no" 1>&6
+
+ fi
+
+
+ fi
+
+
+ fi
+
+
+ fi
+
+
+# Check whether --with-pthreads or --without-pthreads was given.
+if test "${with_pthreads+set}" = set; then
+ withval="$with_pthreads"
+ if test "$withval" = "yes"; then
+ if test -n "$_HAVE_PTHREADS"; then
+ USE_PTHREADS=1
+ USE_USER_PTHREADS=
+ USE_NSPR_THREADS=
+ else
+ { echo "configure: error: --with-pthreads specified for a system without pthread support " 1>&2; exit 1; };
+ fi
+ else
+ USE_PTHREADS=
+ _PTHREAD_LDFLAGS=
+ fi
+else
+ if test -n "$_HAVE_PTHREADS" && test -z "$USE_USER_PTHREADS" && test -z "$USE_NSPR_THREADS"; then
+ USE_PTHREADS=1
+ USE_USER_PTHREADS=
+ USE_NSPR_THREADS=
+ fi
+fi
+
+
+# Check whether --enable-user-pthreads or --disable-user-pthreads was given.
+if test "${enable_user_pthreads+set}" = set; then
+ enableval="$enable_user_pthreads"
+ if test "$enableval" = "yes"; then
+ if test -n "$_HAVE_PTHREADS"; then
+ USE_PTHREADS=
+ USE_USER_PTHREADS=1
+ USE_NSPR_THREADS=
+ else
+ { echo "configure: error: --enable-user-pthreads specified for a system without pthread support " 1>&2; exit 1; };
+ fi
+ fi
+fi
+
+
+# Check whether --enable-nspr-threads or --disable-nspr-threads was given.
+if test "${enable_nspr_threads+set}" = set; then
+ enableval="$enable_nspr_threads"
+ if test "$enableval" = "yes"; then
+ USE_PTHREADS=
+ USE_USER_PTHREADS=
+ USE_NSPR_THREADS=1
+ fi
+fi
+
+
+case "$target" in
+*-beos*)
+ # Check whether --with-bthreads or --without-bthreads was given.
+if test "${with_bthreads+set}" = set; then
+ withval="$with_bthreads"
+ if test "$withval" = "yes"; then
+ USE_BTHREADS=1
+ USE_USER_PTHREADS=
+ USE_PTHREADS=
+ fi
+fi
+
+ ;;
+
+*-solaris*)
+ # Check whether --with-native-threads or --without-native-threads was given.
+if test "${with_native_threads+set}" = set; then
+ withval="$with_native_threads"
+ if test "$withval" = "yes"; then
+ USE_NATIVE_THREADS=1
+ USE_USER_PTHREADS=
+ USE_PTHREADS=
+ fi
+fi
+
+ ;;
+esac
+
+fi # SKIP_LIBRARY_CHECKS
+
+# Check whether --enable-cplus or --disable-cplus was given.
+if test "${enable_cplus+set}" = set; then
+ enableval="$enable_cplus"
+ if test "$enableval" = "yes"; then
+ USE_CPLUS=1
+ fi
+fi
+
+
+# Check whether --enable-ipv6 or --disable-ipv6 was given.
+if test "${enable_ipv6+set}" = set; then
+ enableval="$enable_ipv6"
+ if test "$enableval" = "yes"; then
+ USE_IPV6=1
+ else
+ USE_IPV6=
+ fi
+fi
+
+
+
+# Check whether --enable-boehm or --disable-boehm was given.
+if test "${enable_boehm+set}" = set; then
+ enableval="$enable_boehm"
+ if test "$enableval" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define GC_LEAK_DETECTOR 1
+EOF
+
+ GC_LEAK_DETECTOR=1
+ fi
+fi
+
+
+if test -n "$USE_PTHREADS"; then
+ rm -f conftest*
+ ac_cv_have_dash_pthread=no
+ echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
+echo "configure:5213: checking whether ${CC-cc} accepts -pthread" >&5
+ echo 'int main() { return 0; }' | cat > conftest.c
+ ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
+ if test $? -eq 0; then
+ if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
+ ac_cv_have_dash_pthread=yes
+ case "$target_os" in
+ freebsd*)
+# Freebsd doesn't use -pthread for compiles, it uses them for linking
+ ;;
+ *)
+ CFLAGS="$CFLAGS -pthread"
+ CXXFLAGS="$CXXFLAGS -pthread"
+ ;;
+ esac
+ fi
+ fi
+ rm -f conftest*
+ echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6
+
+ ac_cv_have_dash_pthreads=no
+ if test "$ac_cv_have_dash_pthread" = "no"; then
+ echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
+echo "configure:5236: checking whether ${CC-cc} accepts -pthreads" >&5
+ echo 'int main() { return 0; }' | cat > conftest.c
+ ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
+ if test $? -eq 0; then
+ if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && 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*
+ echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6
+ fi
+
+ case "$target" in
+ *-solaris*)
+ if test "$ac_cv_have_dash_pthreads" = "yes"; then
+ _PTHREAD_LDFLAGS=
+ fi
+ ;;
+ *-freebsd*)
+ cat >> confdefs.h <<\EOF
+#define _REENTRANT 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _THREAD_SAFE 1
+EOF
+
+ if test "$ac_cv_have_dash_pthread" = "yes"; then
+ _PTHREAD_LDFLAGS="-pthread"
+ else
+ _PTHREAD_LDFLAGS="-lc_r"
+ fi
+ ;;
+ *-netbsd*)
+ if test "$ac_cv_have_dash_pthread" = "yes"; then
+ _PTHREAD_LDFLAGS="-pthread"
+ fi
+ ;;
+ *-bsdi*)
+ cat >> confdefs.h <<\EOF
+#define _THREAD_SAFE 1
+EOF
+
+ if test "$ac_cv_have_dash_pthread" = "yes"; then
+ _PTHREAD_LDFLAGS=
+ fi
+ ;;
+ *-openbsd*)
+ if test "$ac_cv_have_dash_pthread" = "yes"; then
+ _PTHREAD_LDFLAGS=-pthread
+ fi
+ ;;
+ *-linux*)
+ cat >> confdefs.h <<\EOF
+#define _REENTRANT 1
+EOF
+
+ ;;
+ esac
+
+else
+ if test -n "$USE_USER_PTHREADS"; then
+ USE_PTHREADS=
+ USE_NSPR_THREADS=
+ else
+ _PTHREAD_LDFLAGS=
+ fi
+fi
+
+case "$target" in
+*-aix*)
+ if test -n "$USE_NSPR_THREADS"; then
+ cat >> confdefs.h <<\EOF
+#define _PR_LOCAL_THREADS_ONLY 1
+EOF
+
+ fi
+ case "$target_os" in
+ aix4.1*)
+ if test -z "$USE_PTHREADS"; then
+ cat >> confdefs.h <<\EOF
+#define AIX_RENAME_SELECT 1
+EOF
+
+ fi
+ ;;
+ aix4.2*)
+ if test -z "$USE_NSPR_THREADS"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_POINTER_LOCALTIME_R 1
+EOF
+
+ fi
+ ;;
+ aix4.3*)
+ if test -z "$USE_NSPR_THREADS"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_POINTER_LOCALTIME_R 1
+EOF
+
+ fi
+ if test -n "$USE_PTHREADS"; then
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_THREADSAFE_GETHOST 1
+EOF
+
+ fi
+ ;;
+ *)
+ if test -z "$USE_NSPR_THREADS"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_POINTER_LOCALTIME_R 1
+EOF
+
+ fi
+ if test -n "$USE_PTHREADS"; then
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_THREADSAFE_GETHOST 1
+EOF
+
+ fi
+ ;;
+ esac
+ ;;
+*-bsdi*)
+ if test -n "$USE_PTHREADS"; then
+ cat >> confdefs.h <<\EOF
+#define _PR_NEED_PTHREAD_INIT 1
+EOF
+
+ fi
+ ;;
+*-freebsd*)
+ if test -n "$USE_NSPR_THREADS"; then
+ cat >> confdefs.h <<\EOF
+#define _PR_LOCAL_THREADS_ONLY 1
+EOF
+
+ fi
+ ;;
+*-hpux*)
+ if test -n "$USE_NSPR_THREADS"; then
+ cat >> confdefs.h <<\EOF
+#define _PR_LOCAL_THREADS_ONLY 1
+EOF
+
+ fi
+ if test "$USE_PTHREADS"; then
+ if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
+ cat >> confdefs.h <<\EOF
+#define _REENTRANT 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_DCETHREADS 1
+EOF
+
+ else
+ cat >> confdefs.h <<EOF
+#define _POSIX_C_SOURCE 199506L
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_THREADSAFE_GETHOST 1
+EOF
+
+ fi
+ fi
+ if test "$USE_USER_PTHREADS"; then
+ cat >> confdefs.h <<EOF
+#define _POSIX_C_SOURCE 199506L
+EOF
+
+ fi
+ ;;
+*-irix*)
+ if test "${target_os}" = "irix6.5"; then
+ if test -n "$USE_PTHREADS"; then
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_GETHOST_R 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_GETHOST_R_POINTER 1
+EOF
+
+ fi
+ fi
+ ;;
+*-linux*)
+ if test -n "$USE_NSPR_THREADS"; then
+ cat >> confdefs.h <<\EOF
+#define _PR_LOCAL_THREADS_ONLY 1
+EOF
+
+ fi
+ ;;
+*-mingw*|*-cygwin*|*-msvc*|*-mks*)
+ USE_PTHREADS=
+ _PTHREAD_LDFLAGS=
+ USE_USER_PTHREADS=
+ ;;
+*-netbsd*|*-openbsd*)
+ if test -n "$USE_NSPR_THREADS"; then
+ cat >> confdefs.h <<\EOF
+#define _PR_LOCAL_THREADS_ONLY 1
+EOF
+
+ fi
+ ;;
+*-osf*)
+ if test -n "$USE_NSPR_THREADS"; then
+ cat >> confdefs.h <<\EOF
+#define _PR_LOCAL_THREADS_ONLY 1
+EOF
+
+ fi
+ if test -n "$USE_PTHREADS"; then
+ if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
+ :
+ else
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_THREADSAFE_GETHOST 1
+EOF
+
+ fi
+ fi
+ ;;
+*-solaris*)
+ if test -n "$USE_NATIVE_THREADS"; then
+ cat >> confdefs.h <<\EOF
+#define _PR_GLOBAL_THREADS_ONLY 1
+EOF
+
+ else
+ if test -n "$USE_NSPR_THREADS"; then
+ cat >> confdefs.h <<\EOF
+#define _PR_LOCAL_THREADS_ONLY 1
+EOF
+
+ fi
+ fi
+ if test -z "$USE_NSPR_THREADS"; then
+ cat >> confdefs.h <<\EOF
+#define _REENTRANT 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_POINTER_LOCALTIME_R 1
+EOF
+
+ if test "$OS_TEST" = "i86pc"; then
+ PR_MD_ASFILES=os_SunOS_x86.s
+ else
+ PR_MD_ASFILES=os_SunOS.s
+ if test -n "$USE_64"; then
+ PR_MD_ASFILES="$PR_MD_ASFILES os_SunOS_sparcv9.s"
+ fi
+ fi
+ fi
+ ;;
+*-nto*)
+ if test -n "$USE_PTHREADS"; then
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_GETHOST_R 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_GETHOST_R_POINTER 1
+EOF
+
+ fi
+ ;;
+esac
+
+OS_LIBS="$_PTHREAD_LDFLAGS $OS_LIBS"
+
+if test -n "$_SAVE_OPTIMIZE_FLAGS"; then
+ _OPTIMIZE_FLAGS="$_SAVE_OPTIMIZE_FLAGS"
+fi
+
+if test -n "$MOZ_OPTIMIZE"; then
+ CFLAGS="$CFLAGS $_OPTIMIZE_FLAGS"
+ CXXFLAGS="$CXXFLAGS $_OPTIMIZE_FLAGS"
+fi
+
+if test -n "$MOZ_DEBUG"; then
+ CFLAGS="$CFLAGS $_DEBUG_FLAGS"
+ CXXFLAGS="$CXXFLAGS $_DEBUG_FLAGS"
+fi
+
+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}"
+
+case "$target_os" in
+mingw*|cygwin*|msvc*|mks*)
+ CC="\$(CYGWIN_WRAPPER) $CC"
+ CXX="\$(CYGWIN_WRAPPER) $CXX"
+ RC="\$(CYGWIN_WRAPPER) $RC"
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+MAKEFILES="
+Makefile
+config/Makefile
+config/autoconf.mk
+config/nsprincl.mk
+config/nsprincl.sh
+config/nspr-config
+lib/Makefile
+lib/ds/Makefile
+lib/libc/Makefile
+lib/libc/include/Makefile
+lib/libc/src/Makefile
+lib/tests/Makefile
+pkg/Makefile
+pkg/linux/Makefile
+pkg/solaris/Makefile
+pkg/solaris/SUNWpr/Makefile
+pkg/solaris/SUNWprx/Makefile
+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
+pr/src/md/${PR_MD_ARCH_DIR}/Makefile
+pr/src/memory/Makefile
+pr/src/misc/Makefile
+pr/src/threads/Makefile
+pr/tests/Makefile
+pr/tests/dll/Makefile
+"
+
+
+if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then
+ 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
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+
+trap 'rm -fr `echo "$MAKEFILES" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@target@%$target%g
+s%@target_alias@%$target_alias%g
+s%@target_cpu@%$target_cpu%g
+s%@target_vendor@%$target_vendor%g
+s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+s%@CC@%$CC%g
+s%@dist_prefix@%$dist_prefix%g
+s%@dist_bindir@%$dist_bindir%g
+s%@dist_includedir@%$dist_includedir%g
+s%@dist_libdir@%$dist_libdir%g
+s%@WHOAMI@%$WHOAMI%g
+s%@HOST_CC@%$HOST_CC%g
+s%@CXX@%$CXX%g
+s%@RANLIB@%$RANLIB%g
+s%@AR@%$AR%g
+s%@AS@%$AS%g
+s%@LD@%$LD%g
+s%@STRIP@%$STRIP%g
+s%@WINDRES@%$WINDRES%g
+s%@CPP@%$CPP%g
+s%@PERL@%$PERL%g
+s%@SHELL_OVERRIDE@%$SHELL_OVERRIDE%g
+s%@MOZILLA_CLIENT@%$MOZILLA_CLIENT%g
+s%@HOST_CFLAGS@%$HOST_CFLAGS%g
+s%@GNU_CC@%$GNU_CC%g
+s%@GCC_USE_GNU_LD@%$GCC_USE_GNU_LD%g
+s%@MSC_VER@%$MSC_VER%g
+s%@CROSS_COMPILE@%$CROSS_COMPILE%g
+s%@MOZ_OPTIMIZE@%$MOZ_OPTIMIZE%g
+s%@USE_CPLUS@%$USE_CPLUS%g
+s%@USE_IPV6@%$USE_IPV6%g
+s%@USE_N32@%$USE_N32%g
+s%@USE_64@%$USE_64%g
+s%@OBJECT_MODE@%$OBJECT_MODE%g
+s%@GC_LEAK_DETECTOR@%$GC_LEAK_DETECTOR%g
+s%@ENABLE_STRIP@%$ENABLE_STRIP%g
+s%@USE_PTHREADS@%$USE_PTHREADS%g
+s%@USE_BTHREADS@%$USE_BTHREADS%g
+s%@USE_USER_PTHREADS@%$USE_USER_PTHREADS%g
+s%@USE_NATIVE_THREADS@%$USE_NATIVE_THREADS%g
+s%@USE_NSPR_THREADS@%$USE_NSPR_THREADS%g
+s%@LIBNSPR@%$LIBNSPR%g
+s%@LIBPLC@%$LIBPLC%g
+s%@MOD_MAJOR_VERSION@%$MOD_MAJOR_VERSION%g
+s%@MOD_MINOR_VERSION@%$MOD_MINOR_VERSION%g
+s%@MOD_PATCH_VERSION@%$MOD_PATCH_VERSION%g
+s%@NSPR_MODNAME@%$NSPR_MODNAME%g
+s%@MDCPUCFG_H@%$MDCPUCFG_H%g
+s%@PR_MD_CSRCS@%$PR_MD_CSRCS%g
+s%@PR_MD_ASFILES@%$PR_MD_ASFILES%g
+s%@PR_MD_ARCH_DIR@%$PR_MD_ARCH_DIR%g
+s%@CPU_ARCH@%$CPU_ARCH%g
+s%@OBJ_SUFFIX@%$OBJ_SUFFIX%g
+s%@LIB_SUFFIX@%$LIB_SUFFIX%g
+s%@DLL_SUFFIX@%$DLL_SUFFIX%g
+s%@ASM_SUFFIX@%$ASM_SUFFIX%g
+s%@MKSHLIB@%$MKSHLIB%g
+s%@DSO_CFLAGS@%$DSO_CFLAGS%g
+s%@DSO_LDOPTS@%$DSO_LDOPTS%g
+s%@OS_TARGET@%$OS_TARGET%g
+s%@OS_ARCH@%$OS_ARCH%g
+s%@OS_RELEASE@%$OS_RELEASE%g
+s%@OS_TEST@%$OS_TEST%g
+s%@MACOS_DEPLOYMENT_TARGET@%$MACOS_DEPLOYMENT_TARGET%g
+s%@DEFINES@%$DEFINES%g
+s%@AR_FLAGS@%$AR_FLAGS%g
+s%@ASFLAGS@%$ASFLAGS%g
+s%@FILTER@%$FILTER%g
+s%@IMPLIB@%$IMPLIB%g
+s%@OS_LIBS@%$OS_LIBS%g
+s%@RESOLVE_LINK_SYMBOLS@%$RESOLVE_LINK_SYMBOLS%g
+s%@AIX_LINK_OPTS@%$AIX_LINK_OPTS%g
+s%@NOSUCHFILE@%$NOSUCHFILE%g
+s%@MOZ_OBJFORMAT@%$MOZ_OBJFORMAT%g
+s%@ULTRASPARC_LIBRARY@%$ULTRASPARC_LIBRARY%g
+s%@OBJDIR@%$OBJDIR%g
+s%@OBJDIR_NAME@%$OBJDIR_NAME%g
+s%@RELEASE_OBJDIR_NAME@%$RELEASE_OBJDIR_NAME%g
+s%@NSINSTALL@%$NSINSTALL%g
+s%@OPTIMIZER@%$OPTIMIZER%g
+s%@RC@%$RC%g
+s%@RCFLAGS@%$RCFLAGS%g
+s%@DLLFLAGS@%$DLLFLAGS%g
+s%@EXEFLAGS@%$EXEFLAGS%g
+s%@OS_DLLFLAGS@%$OS_DLLFLAGS%g
+s%@CYGWIN_WRAPPER@%$CYGWIN_WRAPPER%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"$MAKEFILES"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+chmod +x config/nspr-config
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/src/libs/xpcom18a4/nsprpub/configure.in b/src/libs/xpcom18a4/nsprpub/configure.in
new file mode 100644
index 00000000..a9ef3c2b
--- /dev/null
+++ b/src/libs/xpcom18a4/nsprpub/configure.in
@@ -0,0 +1,2556 @@
+dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; -*-
+dnl
+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/
+dnl
+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.
+dnl
+dnl The Original Code is the Netscape Portable Runtime (NSPR).
+dnl
+dnl The Initial Developer of the Original Code is Netscape
+dnl Communications Corporation. Portions created by Netscape are
+dnl Copyright (C) 1998o-2000 Netscape Communications Corporation. All
+dnl Rights Reserved.
+dnl
+dnl Contributor(s):
+dnl Christopher Seawood <cls@seawood.org>
+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
+
+AC_PREREQ(2.12)
+AC_INIT(config/libc_r.h)
+
+AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)
+AC_CANONICAL_SYSTEM
+
+dnl ========================================================
+dnl = Defaults
+dnl ========================================================
+MOD_MAJOR_VERSION=4
+MOD_MINOR_VERSION=5
+MOD_PATCH_VERSION=0
+NSPR_MODNAME=nspr20
+_HAVE_PTHREADS=
+USE_PTHREADS=
+USE_USER_PTHREADS=
+USE_NSPR_THREADS=
+USE_N32=
+USE_64=
+USE_CPLUS=
+USE_IPV6=
+USE_MDUPDATE=
+MACOS_DEPLOYMENT_TARGET=
+_OPTIMIZE_FLAGS=-O
+_DEBUG_FLAGS=-g
+MOZ_DEBUG=1
+MOZ_OPTIMIZE=
+OBJDIR=.
+OBJDIR_NAME=.
+OBJDIR_SUFFIX=OBJ
+NSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'
+NOSUCHFILE=/no-such-file
+LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
+LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'
+CYGWIN_WRAPPER=
+
+dnl Link in libraries necessary to resolve all symbols for shared libs
+RESOLVE_LINK_SYMBOLS=
+
+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=}"
+
+case "$target" in
+*-cygwin*|*-mingw*)
+ # Check to see if we are really running in a msvc environemnt
+ _WIN32_MSVC=
+ AC_CHECK_PROGS(CC, cl)
+ if test "$CC" = "cl"; then
+ echo 'main() { return 0; }' > dummy.c
+ ${CC} -o dummy dummy.c >/dev/null 2>&1
+ if test $? = 0; then
+ _WIN32_MSVC=1
+ CXX=$CC
+ else
+ AC_MSG_WARN([$(CC) test failed. Using normal feature tests])
+ fi
+ rm -f dummy dummy.o dummy.obj dummy.exe dummy.c
+ fi
+ ;;
+*-msvc*)
+ _WIN32_MSVC=1
+ ;;
+*-mks*)
+ _WIN32_MSVC=1
+ ;;
+esac
+
+if test -n "$_WIN32_MSVC"; then
+ SKIP_PATH_CHECKS=1
+ SKIP_COMPILER_CHECKS=1
+ SKIP_LIBRARY_CHECKS=1
+fi
+
+dnl ========================================================
+dnl =
+dnl = Check options that may affect the compiler
+dnl =
+dnl ========================================================
+dist_prefix='${MOD_DEPTH}/dist'
+dist_bindir='${dist_prefix}/bin'
+dist_includedir='${dist_prefix}/include/nspr'
+dist_libdir='${dist_prefix}/lib'
+if test "${includedir}" = '${prefix}/include'; then
+ includedir='${prefix}/include/nspr'
+fi
+
+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
+ build include files in DIR [DIST_PREFIX/include/nspr]],
+ dist_includedir=$withval)
+
+AC_ARG_WITH(dist-libdir,
+ [ --with-dist-libdir=DIR build library files in DIR [DIST_PREFIX/lib]],
+ dist_libdir=$withval)
+
+AC_SUBST(dist_prefix)
+AC_SUBST(dist_bindir)
+AC_SUBST(dist_includedir)
+AC_SUBST(dist_libdir)
+
+dnl Check if NSPR is being compiled for 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])
+
+AC_ARG_ENABLE(optimize,
+ [ --enable-optimize(=val) Enable code optimizations (val, ie. -O2) ],
+ [ if test "$enableval" != "no"; then
+ MOZ_OPTIMIZE=1
+ if test -n "$enableval" && test "$enableval" != "yes"; then
+ _OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
+ _SAVE_OPTIMIZE_FLAGS=$_OPTIMIZE_FLAGS
+ fi
+ else
+ MOZ_OPTIMIZE=
+ fi ])
+
+AC_ARG_ENABLE(debug,
+ [ --disable-debug Do not compile in debugging symbols],
+ [ if test "$enableval" = "no"; then
+ MOZ_DEBUG=
+ else
+ MOZ_DEBUG=1
+ fi])
+
+AC_ARG_ENABLE(win32-target,
+ [ --enable-win32-target=\$t
+ Specify win32 flavor. (WIN95 or WINNT)],
+ OS_TARGET=`echo $enableval | tr a-z A-Z`,
+ OS_TARGET=)
+
+AC_ARG_ENABLE(debug-rtl,
+ [ --enable-debug-rtl Use the MSVC debug runtime library],
+ [ if test "$enableval" = "yes"; then
+ USE_DEBUG_RTL=1
+ fi ])
+
+AC_ARG_ENABLE(n32,
+ [ --enable-n32 Enable n32 ABI support (IRIX only)],
+ [ if test "$enableval" = "yes"; then
+ USE_N32=1
+ else if test "$enableval" = "no"; then
+ USE_N32=
+ fi
+ fi ])
+
+AC_ARG_ENABLE(64bit,
+ [ --enable-64bit Enable 64-bit support (on certain platforms)],
+ [ if test "$enableval" = "yes"; then
+ USE_64=1
+ fi ])
+
+AC_ARG_ENABLE(mdupdate,
+ [ --enable-mdupdate Enable use of certain compilers' mdupdate feature],
+ [ if test "$enableval" = "yes"; then
+ USE_MDUPDATE=1
+ fi ])
+
+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])
+
+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
+ ;;
+
+ *-irix*)
+ CC=cc
+ ;;
+
+ *-openvms*)
+ CC=cc
+ ;;
+
+ *-osf*)
+ CC=cc
+ ;;
+
+ *-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
+ ;;
+
+ *-irix*)
+ CXX=CC
+ ;;
+
+ *-openvms*)
+ CXX=cxx
+ ;;
+
+ *-osf*)
+ CXX=cxx
+ ;;
+
+ *-solaris*)
+ CXX=CC
+ ;;
+
+ esac
+fi
+
+if test -z "$SKIP_PATH_CHECKS"; then
+ AC_PATH_PROG(WHOAMI, $WHOAMI whoami, echo not_whoami)
+fi
+
+if test -n "$MOZ_DEBUG"; then
+ AC_DEFINE(DEBUG)
+ DEFINES="$DEFINES -UNDEBUG"
+
+ case "${target_os}" in
+ beos*)
+ DEFINES="$DEFINES -DDEBUG_${USER}"
+ ;;
+ msvc*|mks*|cygwin*|mingw*|os2*)
+ DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`"
+ ;;
+ *)
+ DEFINES="$DEFINES -DDEBUG_`$WHOAMI`"
+ ;;
+ esac
+else
+ AC_DEFINE(NDEBUG)
+ DEFINES="$DEFINES -UDEBUG"
+fi
+
+if test -z "$SKIP_COMPILER_CHECKS"; then
+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])
+ AC_CHECK_PROGS(HOST_CC, $HOST_CC gcc cc /usr/ucb/cc, "")
+ if test -z "$HOST_CC"; then
+ AC_MSG_ERROR([no acceptable cc found in \$PATH])
+ fi
+ AC_MSG_RESULT([$HOST_CC])
+ if test -z "$HOST_CFLAGS"; then
+ HOST_CFLAGS="$CFLAGS"
+ fi
+ if test -z "$HOST_LDFLAGS"; then
+ HOST_LDFLAGS="$LDFLAGS"
+ fi
+
+ CC="$HOST_CC"
+ CFLAGS="$HOST_CFLAGS"
+ LDFLAGS="$HOST_LDFLAGS"
+
+ AC_MSG_CHECKING([whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works])
+ AC_TRY_COMPILE([], [return(0);],
+ [ac_cv_prog_host_cc_works=1 AC_MSG_RESULT([yes])],
+ AC_MSG_ERROR([installation or configuration problem: $host compiler $HOST_CC cannot create executables.]) )
+
+ CC=$_SAVE_CC
+ CFLAGS=$_SAVE_CFLAGS
+ LDFLAGS=$_SAVE_LDFLAGS
+
+ AC_CHECK_PROGS(CC, $CC "${target_alias}-gcc" "${target}-gcc", echo)
+ unset ac_cv_prog_CC
+ AC_PROG_CC
+ AC_CHECK_PROGS(CXX, $CXX "${target_alias}-g++" "${target}-g++", echo)
+ unset ac_cv_prog_CXX
+ AC_PROG_CXX
+ AC_CHECK_PROGS(RANLIB, $RANLIB "${target_alias}-ranlib" "${target}-ranlib", echo)
+ AC_CHECK_PROGS(AR, $AR "${target_alias}-ar" "${target}-ar", echo)
+ AC_CHECK_PROGS(AS, $AS "${target_alias}-as" "${target}-as", echo)
+ AC_CHECK_PROGS(LD, $LD "${target_alias}-ld" "${target}-ld", echo)
+ AC_CHECK_PROGS(STRIP, $STRIP "${target_alias}-strip" "${target}-strip", echo)
+ AC_CHECK_PROGS(WINDRES, $WINDRES "${target_alias}-windres" "${target}-windres", echo)
+
+else
+ AC_PROG_CXX
+ if test "$CXX" = "cl" -a -z "$CC"; then
+ CC=$CXX
+ else
+ AC_PROG_CC
+ fi
+ AC_PROG_CPP
+ AC_PROG_RANLIB
+ AC_PATH_PROGS(AS, as, $CC)
+ AC_PATH_PROGS(AR, ar, echo not_ar)
+ AC_PATH_PROGS(LD, ld link, echo not_ld)
+ AC_PATH_PROGS(STRIP, strip, echo not_strip)
+ AC_PATH_PROGS(WINDRES, windres, echo not_windres)
+ if test -z "$HOST_CC"; then
+ HOST_CC="$CC"
+ fi
+ if test -z "$HOST_CFLAGS"; then
+ HOST_CFLAGS="$CFLAGS"
+ fi
+fi
+
+if test "$GCC" = "yes"; then
+ GNU_CC=1
+fi
+if test "$GXX" = "yes"; then
+ GNU_CXX=1
+fi
+if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then
+ GNU_AS=1
+fi
+rm -f a.out
+
+if test "$cross_compiling" = "yes"; then
+ CROSS_COMPILE=1
+else
+ CROSS_COMPILE=
+fi
+
+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
+ echo 'int main() { printf("Hello World\n"); return 0; }' >> dummy-hello.c
+ ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
+ cat dummy-hello.s | ${AS} -o dummy-hello.S - 2>&5
+ if test $? = 0; then
+ _res_as_stdin="yes"
+ else
+ _res_as_stdin="no"
+ fi
+ if test "$_res_as_stdin" = "yes"; then
+ _SAVE_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -pipe"
+ AC_TRY_COMPILE( [ #include <stdio.h> ],
+ [printf("Hello World\n");],
+ [_res_gcc_pipe="yes"],
+ [_res_gcc_pipe="no"] )
+ CFLAGS=$_SAVE_CFLAGS
+ fi
+ if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then
+ _res="yes";
+ CFLAGS="$CFLAGS -pipe"
+ CXXFLAGS="$CXXFLAGS -pipe"
+ else
+ _res="no"
+ fi
+ rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out
+ AC_MSG_RESULT([$_res])
+else
+ AC_MSG_RESULT([no])
+fi
+
+fi # SKIP_COMPILER_CHECKS
+
+dnl ========================================================
+dnl Checks for programs.
+dnl ========================================================
+if test -z "$SKIP_PATH_CHECKS"; then
+ AC_PATH_PROGS(PERL, perl5 perl, echo not_perl)
+elif test -z "$PERL"; then
+ PERL=perl
+fi
+
+dnl ========================================================
+dnl Default platform specific options
+dnl ========================================================
+OBJ_SUFFIX=o
+LIB_SUFFIX=a
+DLL_SUFFIX=so
+ASM_SUFFIX=s
+MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
+PR_MD_ASFILES=
+PR_MD_CSRCS=
+PR_MD_ARCH_DIR=unix
+AR_FLAGS='cr $@'
+AS='$(CC)'
+ASFLAGS='$(CFLAGS)'
+
+if test -n "$CROSS_COMPILE"; then
+ OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
+ OS_RELEASE=
+ OS_TEST="${target_cpu}"
+ case "${target_os}" in
+ linux*) OS_ARCH=Linux ;;
+ solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
+ mingw*) OS_ARCH=WINNT ;;
+ esac
+else
+ OS_ARCH=`uname -s | sed -e 's|/|_|g'`
+ OS_RELEASE=`uname -r`
+ OS_TEST=`uname -m`
+fi
+
+if test "$OS_ARCH" = "IRIX64"; then
+ OS_ARCH=IRIX
+fi
+
+if test "$OS_ARCH" = "AIX"; then
+ OS_RELEASE=`uname -v`.`uname -r`
+fi
+
+if test "$OS_ARCH" = "FreeBSD"; then
+ OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
+fi
+
+if test "$OS_ARCH" = "Linux"; then
+ OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
+ OS_RELEASE=`echo $OS_RELEASE | awk -F\. '{ print $1 "." $2 }'`
+fi
+
+if test "$OS_ARCH" = "OpenVMS"; then
+ OS_RELEASE=`uname -v`
+fi
+
+#######################################################################
+# 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
+elif test "$OS_ARCH" = 'Windows_98'; then
+ OS_ARCH=Windows_NT
+ OS_TARGET=WIN95
+elif test "`echo $OS_ARCH | egrep -c '^(CYGWIN_9|CYGWIN_ME)' 2>/dev/null`" != 0; then
+ OS_ARCH='CYGWIN_NT-4.0'
+ OS_TARGET=WIN95
+elif test "$OS_ARCH" = "OS_2"; then
+ 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
+ OS_MINOR_RELEASE=`uname -v`
+ 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
+
+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
+if test -z "$OS_TARGET"; then
+ OS_TARGET=$OS_ARCH
+fi
+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}"
+
+dnl ========================================================
+
+dnl ========================================================
+dnl Override of system specific host options
+dnl ========================================================
+case "$host" in
+*-mingw*|*-cygwin*|*-msvc*|*-mks*)
+ NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
+ if test `echo "${PATH}" | grep -c \;` = 0; then
+ CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
+ fi
+ ;;
+*-beos*)
+ HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE"
+ ;;
+*os2*)
+ ;;
+*)
+ HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
+ ;;
+esac
+
+dnl ========================================================
+dnl Override of system specific target options
+dnl ========================================================
+case "$target" in
+
+*-aix*)
+ AC_DEFINE(XP_UNIX)
+ AC_DEFINE(AIX)
+ AC_DEFINE(SYSV)
+ DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
+ AC_CHECK_HEADER(sys/atomic_op.h, AC_DEFINE(AIX_HAVE_ATOMIC_OP_H))
+ case "${target_os}" in
+ aix3.2*)
+ AC_DEFINE(AIX_RENAME_SELECT)
+ AC_DEFINE(_PR_NO_LARGE_FILES)
+ AIX_LINK_OPTS='-bnso -berok'
+ PR_MD_ASFILES=os_AIX.s
+ ;;
+ aix4.1*)
+ AC_DEFINE(AIX_TIMERS)
+ AC_DEFINE(_PR_NO_LARGE_FILES)
+ AC_DEFINE(AIX4_1)
+ MKSHLIB=
+ DSO_LDOPTS=
+ AIX_LINK_OPTS='-bnso -berok'
+ LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)_shr'
+ LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)_shr'
+ ;;
+ aix4.2*)
+ AC_DEFINE(AIX_TIMERS)
+ AC_DEFINE(_PR_HAVE_OFF64_T)
+ AIX_LINK_OPTS='-brtl -bnso -berok'
+ ;;
+ aix4.3*)
+ AC_DEFINE(AIX_TIMERS)
+ AC_DEFINE(_PR_HAVE_OFF64_T)
+ AC_DEFINE(AIX4_3_PLUS)
+ AC_DEFINE(HAVE_SOCKLEN_T)
+ AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
+ USE_IPV6=1
+ AIX_LINK_OPTS='-brtl -bnso -berok'
+ ;;
+ *)
+ AC_DEFINE(AIX_TIMERS)
+ AC_DEFINE(_PR_HAVE_OFF64_T)
+ AC_DEFINE(AIX4_3_PLUS)
+ AC_DEFINE(HAVE_SOCKLEN_T)
+ AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
+ USE_IPV6=1
+ AIX_LINK_OPTS='-brtl -bnso -berok'
+ ;;
+ esac
+ CFLAGS="$CFLAGS -qro -qroconst"
+ AIX_WRAP='$(DIST)/lib/aixwrap.o'
+ AIX_TMP='./_aix_tmp.o'
+ if test -n "$USE_64"; then
+ MDCPUCFG_H=_aix64.cfg
+ OBJECT_MODE=64
+ else
+ MDCPUCFG_H=_aix32.cfg
+ fi
+ PR_MD_CSRCS=aix.c
+ RESOLVE_LINK_SYMBOLS=1
+ ;;
+
+*-beos*)
+ AC_DEFINE(XP_BEOS)
+ AC_DEFINE(BeOS)
+ AC_DEFINE(BEOS)
+ AC_DEFINE(_POSIX_SOURCE)
+ DSO_LDOPTS=-nostart
+ MDCPUCFG_H=_beos.cfg
+ USE_BTHREADS=1
+ PR_MD_ARCH_DIR=beos
+ RESOLVE_LINK_SYMBOLS=1
+ case "${target_cpu}" in
+ i*86)
+ _OPTIMIZE_FLAGS=-O2
+ _DEBUG_FLAGS='-gdwarf-2 -O0'
+ MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
+ AC_CHECK_LIB(bind, gethostbyaddr, [OS_LIBS="$OS_LIBS -lbind -lsocket"])
+ ;;
+ 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
+ ;;
+
+*-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
+ ;;
+
+ bsdi4.* | bsdi5.*)
+ 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)'
+ STRIP="$STRIP -d"
+ case "$target_os" in
+ bsdi4.2* | bsdi4.3* | bsdi5.*)
+ AC_DEFINE(_PR_HAVE_GETPROTO_R)
+ AC_DEFINE(_PR_HAVE_GETPROTO_R_POINTER)
+ ;;
+ esac
+ ;;
+ *)
+ 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
+
+ ;;
+
+*-darwin*)
+ AC_DEFINE(XP_UNIX)
+ AC_DEFINE(DARWIN)
+ AC_DEFINE(HAVE_BSD_FLOCK)
+ CFLAGS="$CFLAGS -Wmost -fno-common"
+ 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/$@ -headerpad_max_install_names'
+ # Use the standard preprocessor (cpp)
+ CFLAGS="$CFLAGS -no-cpp-precomp"
+ MKSHLIB='$(CC) -arch $(CPU_ARCH) $(DSO_LDOPTS) -o $@'
+ STRIP="$STRIP -x -S"
+ DLL_SUFFIX=dylib
+ USE_PTHREADS=1
+ MDCPUCFG_H=_darwin.cfg
+ PR_MD_CSRCS=darwin.c
+ if test "$CPU_ARCH" = "ppc"; then
+ PR_MD_ASFILES=os_Darwin_ppc.s
+ fi
+
+ # Add Mac OS X support for loading CFM & CFBundle plugins
+ if test -f /System/Library/Frameworks/Carbon.framework/Carbon; then
+ 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)
+ fi
+
+ # do the right thing for panther SDK support
+ if test "$NEXT_ROOT"; then
+ CFLAGS="-I${NEXT_ROOT}/usr/include $CFLAGS"
+ CXXFLAGS="-I${NEXT_ROOT}/usr/include $CXXFLAGS"
+ fi
+ ;;
+
+*-dgux*)
+ AC_DEFINE(XP_UNIX)
+ 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=
+ MDCPUCFG_H=_dgux.cfg
+ PR_MD_CSRCS=dgux.c
+ ;;
+
+*-freebsd*)
+ if test -z "$USE_NSPR_THREADS"; then
+ USE_PTHREADS=1
+ fi
+ AC_DEFINE(XP_UNIX)
+ AC_DEFINE(FREEBSD)
+ AC_DEFINE(HAVE_BSD_FLOCK)
+ AC_DEFINE(HAVE_SOCKLEN_T)
+ CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
+ 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
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ DSO_CFLAGS=-fPIC
+ DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
+ MDCPUCFG_H=_freebsd.cfg
+ PR_MD_CSRCS=freebsd.c
+ ;;
+
+*-hpux*)
+ AC_DEFINE(XP_UNIX)
+ AC_DEFINE(HPUX)
+ AC_DEFINE(_HPUX_SOURCE)
+ AC_DEFINE(hppa)
+ # 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)
+ DLL_SUFFIX=sl
+ DSO_LDOPTS='-b +h $(notdir $@)'
+ PR_MD_CSRCS=hpux.c
+ if test "$OS_TEST" != "ia64"; then
+ PR_MD_ASFILES=os_HPUX.s
+ fi
+ if test -n "$USE_64"; then
+ MDCPUCFG_H=_hpux64.cfg
+ else
+ MDCPUCFG_H=_hpux32.cfg
+ fi
+ if test -z "$GNU_CC"; then
+ CC="$CC -Ae"
+ CXX="$CXX -ext"
+ DSO_CFLAGS=+Z
+ else
+ DSO_CFLAGS=-fPIC
+ fi
+
+ if test -n "$MOZILLA_CLIENT"; then
+ DEFAULT_IMPL_STRATEGY=_EMU
+ fi
+
+ if echo "$OS_RELEASE" | grep ^A.09 >/dev/null; then
+ AC_DEFINE(_PR_NEED_H_ERRNO)
+ AC_DEFINE(HPUX9)
+ DEFAULT_IMPL_STRATEGY=_EMU
+ USE_NSPR_THREADS=1
+ fi
+
+ if echo "$OS_RELEASE" | egrep '^(A.09|B.10)' >/dev/null; then
+ AC_DEFINE(_PR_NO_LARGE_FILES)
+ fi
+
+ if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
+ AC_DEFINE(_PR_NEED_H_ERRNO)
+ fi
+
+ if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
+ AC_DEFINE(HAVE_INT_LOCALTIME_R)
+ fi
+
+ if echo "$OS_RELEASE" | egrep '^(B.10.30|B.11)' >/dev/null; then
+ AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
+ fi
+
+ # 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([,])
+
+ if test "$OS_RELEASE" = "B.10.01"; then
+ AC_DEFINE(HPUX10)
+ DEFAULT_IMPL_STRATEGY=_EMU
+ fi
+
+ if test "$OS_RELEASE" = "B.10.10"; then
+ AC_DEFINE(HPUX10)
+ AC_DEFINE(HPUX10_10)
+ DEFAULT_IMPL_STRATEGY=_PTH
+ fi
+
+ if test "$OS_RELEASE" = "B.10.20"; then
+ AC_DEFINE(HPUX10)
+ AC_DEFINE(HPUX10_20)
+ if test -z "$GNU_CC"; then
+ CFLAGS="$CFLAGS +DAportable +DS1.1"
+ CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
+ fi
+ DEFAULT_IMPL_STRATEGY=_PTH
+ fi
+
+ if test "$OS_RELEASE" = "B.10.30"; then
+ AC_DEFINE(HPUX10)
+ AC_DEFINE(HPUX10_30)
+ if test -z "$GNU_CC"; then
+ CFLAGS="$CFLAGS +DAportable +DS1.1"
+ CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
+ fi
+ DEFAULT_IMPL_STRATEGY=_PTH
+ fi
+
+ if echo "$OS_RELEASE" | grep ^B.11 >/dev/null; then
+ AC_DEFINE(HPUX10)
+ AC_DEFINE(HPUX11)
+ AC_DEFINE(_LARGEFILE64_SOURCE)
+ AC_DEFINE(_PR_HAVE_OFF64_T)
+ AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
+ if test -z "$GNU_CC"; then
+ if test -z "$USE_64"; then
+ if test "$OS_TEST" = "ia64"; then
+ CFLAGS="$CFLAGS +DD32"
+ CXXFLAGS="$CXXFLAGS +DD32"
+ else
+ CFLAGS="$CFLAGS +DAportable +DS2.0"
+ CXXFLAGS="$CXXFLAGS +DAportable +DS2.0"
+ fi
+ else
+ 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
+ fi
+ fi
+ 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
+ USE_PTHREADS=1
+ if test "$USE_NSPR_THREADS"; then
+ USE_PTHREADS=
+ fi
+ if test "$USE_USER_PTHREADS"; then
+ USE_PTHREADS=
+ fi
+ fi
+ ;;
+
+*-irix*)
+ AC_DEFINE(XP_UNIX)
+ AC_DEFINE(IRIX)
+ AC_DEFINE(SVR4)
+ AC_DEFINE(_SGI_MP_SOURCE)
+ AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
+ PR_MD_CSRCS=irix.c
+ PR_MD_ASFILES=os_Irix.s
+ MKSHLIB='$(LD) $(DSO_LDOPTS) -rdata_shared -shared -soname $(notdir $@) -o $@'
+ STRIP="$STRIP -f"
+ RESOLVE_LINK_SYMBOLS=1
+ if test -n "$USE_64"; then
+ MDCPUCFG_H=_irix64.cfg
+ else
+ MDCPUCFG_H=_irix32.cfg
+ fi
+ case "${target_os}" in
+ irix6*)
+ AC_DEFINE(IRIX6)
+ USE_PTHREADS=1
+ USE_N32=1
+ COMPILER_TAG=_n32
+ IMPL_STRATEGY=_PTH
+ ;;
+ irix5*)
+ AC_DEFINE(IRIX5)
+ USE_NSPR_THREADS=1
+ ;;
+ *)
+ USE_PTHREADS=1
+ USE_N32=1
+ ;;
+ esac
+ if test "$GNU_CC"; then
+ 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
+ AS='$(CC) -Wp,-P -x assembler-with-cpp -D_ASM -mips2 $(INCLUDES)'
+ CFLAGS="$CFLAGS -Wall -Wno-format"
+ _OPTIMIZE_FLAGS="-O6"
+ else
+ if test -n "$USE_N32"; then
+ AS='as -D_ASM $(INCLUDES) -n32'
+ else
+ AS='as -D_ASM $(INCLUDES)'
+ fi
+ CFLAGS="$CFLAGS -fullwarn -xansi"
+ if test "$USE_N32"; then
+ _OPTIMIZE_FLAGS="-O -OPT:Olimit=4000"
+ else
+ _OPTIMIZE_FLAGS="-O -Olimit 4000"
+ fi
+ if test "$USE_MDUPDATE"; then
+ CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
+ fi
+ case "${target}" in
+ *-irix6.*)
+ CFLAGS="$CFLAGS -multigot"
+ DSO_LDOPTS="-no_unresolved"
+ if test "$USE_N32"; then
+ CFLAGS="$CFLAGS -n32 -woff 1209"
+ DSO_LDOPTS="$DSO_LDOPTS -n32"
+ else
+ if test "$USE_64"; then
+ CFLAGS="$CFLAGS -64"
+ else
+ CFLAGS="$CFLAGS -32"
+ fi
+ fi
+ ;;
+ *)
+ CFLAGS="$CFLAGS -xgot"
+ ;;
+ esac
+ fi
+ if test "${target_os}" = "irix5.3"; then
+ AC_DEFINE(IRIX5_3)
+ fi
+ case "${target_os}" in
+ irix6.5)
+ if test -z "$GNU_CC"; then
+ CFLAGS="$CFLAGS -mips3"
+ fi
+ AC_DEFINE(_PR_HAVE_GETPROTO_R)
+ AC_DEFINE(_PR_HAVE_GETPROTO_R_POINTER)
+ AC_DEFINE(_PR_HAVE_SGI_PRDA_PROCMASK)
+ ;;
+ irix5*)
+ ;;
+ *)
+ AC_DEFINE(_PR_HAVE_SGI_PRDA_PROCMASK)
+ ;;
+ esac
+ ;;
+
+*-linux*)
+ if test -z "$USE_NSPR_THREADS"; then
+ USE_PTHREADS=1
+ IMPL_STRATEGY=_PTH
+ fi
+ AC_DEFINE(XP_UNIX)
+ AC_DEFINE(_POSIX_SOURCE)
+ AC_DEFINE(_BSD_SOURCE)
+ AC_DEFINE(_SVID_SOURCE)
+ AC_DEFINE(_LARGEFILE64_SOURCE)
+ AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
+ AC_DEFINE(LINUX)
+ CFLAGS="$CFLAGS -ansi -Wall"
+ CXXFLAGS="$CXXFLAGS -ansi -Wall"
+ MDCPUCFG_H=_linux.cfg
+ PR_MD_CSRCS=linux.c
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ DSO_CFLAGS=-fPIC
+ DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
+ _OPTIMIZE_FLAGS=-O2
+ _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)
+ COMPILER_TAG=_glibc
+ if echo "$OS_TEST" | grep -c 86 >/dev/null; then
+ CPU_ARCH=x86
+ else
+ CPU_ARCH=$OS_TEST
+ fi
+ CPU_ARCH_TAG=_${CPU_ARCH}
+ case "${target_cpu}" in
+ alpha)
+ AC_DEFINE(_ALPHA_)
+ AC_DEFINE(__alpha)
+ CFLAGS="$CFLAGS -mieee"
+ CXXFLAGS="$CXXFLAGS -mieee"
+ ;;
+ i*86)
+ AC_DEFINE(i386)
+ PR_MD_ASFILES=os_Linux_x86.s
+ ;;
+ ia64)
+ PR_MD_ASFILES=os_Linux_ia64.s
+ ;;
+ x86_64)
+ PR_MD_ASFILES=os_Linux_x86_64.s
+ ;;
+ m68k)
+ CFLAGS="$CFLAGS -m68020-60"
+ CXXFLAGS="$CXXFLAGS -m68020-60"
+ ;;
+ esac
+ ;;
+
+*-mingw*|*-cygwin*|*-msvc*|*-mks*)
+ AC_DEFINE(XP_PC)
+ AC_DEFINE(WIN32)
+ PR_MD_ARCH_DIR=windows
+ RESOLVE_LINK_SYMBOLS=1
+
+ if test -n "$GNU_CC"; then
+ 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
+ # Use temp file for windres (bug 213281)
+ RCFLAGS='-O coff --use-temp-file'
+ else
+ CC=cl
+ CXX=cl
+ LD=link
+ AR='lib -NOLOGO -OUT:"$@"'
+ AR_FLAGS=
+ RANLIB='echo not_ranlib'
+ STRIP='echo not_strip'
+ RC=rc.exe
+ GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
+ OBJ_SUFFIX=obj
+ LIB_SUFFIX=lib
+ DLL_SUFFIX=dll
+
+ # Determine compiler version
+ CC_VERSION=`"${CC}" -v 2>&1 | grep Version | sed -e 's|.* Version ||' -e 's| .*||'`
+ _CC_MAJOR_VERSION=`echo $CC_VERSION | awk -F\. '{ print $1 }'`
+ _CC_MINOR_VERSION=`echo $CC_VERSION | awk -F\. '{ print $2 }'`
+ MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION}
+
+ CFLAGS="$CFLAGS -W3 -nologo -GF -Gy"
+ DLLFLAGS='-OUT:"$@"'
+ _DEBUG_FLAGS=-Z7
+ _OPTIMIZE_FLAGS=-O2
+ if test -z "$MOZ_OPTIMIZE"; then
+ CFLAGS="$CFLAGS -Od"
+ fi
+
+ if test -n "$USE_DEBUG_RTL"; then
+ CFLAGS="$CFLAGS -MDd"
+ else
+ CFLAGS="$CFLAGS -MD"
+ fi
+
+ if test -n "$MOZ_DEBUG"; then
+ AC_DEFINE(_DEBUG)
+ else
+ DEFINES="$DEFINES -U_DEBUG"
+ fi
+
+ if test -n "$MOZ_OPTIMIZE"; then
+ if test -n "$MOZ_PROFILE"; then
+ _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Z7"
+ fi
+ if test -n "$MOZ_DEBUG_SYMBOLS"; then
+ _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Zi"
+ fi
+ if test -n "$MOZ_PROFILE" -o -n "$MOZ_DEBUG_SYMBOLS"; then
+ DLLFLAGS="$DLLFLAGS -DEBUG -OPT:REF"
+ LDFLAGS="$LDFLAGS -DEBUG -OPT:REF"
+ fi
+ fi
+
+ if test -n "$MOZ_DEBUG"; then
+ DLLFLAGS="$DLLFLAGS -DEBUG -DEBUGTYPE:CV"
+ LDFLAGS="$LDFLAGS -DEBUG -DEBUGTYPE:CV"
+ fi
+
+ if test "$OS_TARGET" = "WINNT"; then
+ CFLAGS="$CFLAGS -GT"
+ if test "$CPU_ARCH" = "x86"; then
+ CFLAGS="$CFLAGS -G5"
+ fi
+ 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
+
+ if test -n "$USE_STATIC_TLS"; then
+ AC_DEFINE(_PR_USE_STATIC_TLS)
+ fi
+
+ if test "$OS_TARGET" = "WINNT"; then
+ AC_DEFINE(WINNT)
+ else
+ AC_DEFINE(WIN95)
+ # undefine WINNT as some versions of mingw gcc define it by default
+ DEFINES="$DEFINES -UWINNT"
+ 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"
+ if test "$MSC_VER" = "1200" -a -z "$MOZ_DEBUG_SYMBOLS"; then
+ OS_DLLFLAGS="$OS_DLLFLAGS -PDB:NONE"
+ fi
+
+ case "$OS_TARGET" in
+ WINNT)
+ MDCPUCFG_H=_winnt.cfg
+ ;;
+ WIN95)
+ MDCPUCFG_H=_win95.cfg
+ ;;
+ WIN16)
+ MDCPUCFG_H=_win16.cfg
+ ;;
+ *)
+ AC_MSG_ERROR([Missing OS_TARGET for ${target}. Use --enable-win32-target to set.])
+ ;;
+ esac
+
+ case "$target_cpu" in
+ i*86)
+ AC_DEFINE(_X86_)
+ ;;
+ alpha)
+ AC_DEFINE(_ALPHA_)
+ ;;
+ mips)
+ AC_DEFINE(_MIPS_)
+ ;;
+ *)
+ AC_DEFINE(_CPU_ARCH_NOT_DEFINED)
+ ;;
+ esac
+
+ ;;
+
+*-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
+ CFLAGS="$CFLAGS -fPIC -Wall"
+ CXXFLAGS="$CXXFLAGS -fPIC -Wall"
+ DSO_LDOPTS=-G
+ fi
+ MDCPUCFG_H=_ncr.cfg
+ PR_MD_CSRCS=ncr.c
+ ;;
+
+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
+ MDCPUCFG_H=_nec.cfg
+ PR_MD_CSRCS=nec.c
+ ;;
+
+*-netbsd*)
+ AC_DEFINE(XP_UNIX)
+ AC_DEFINE(NETBSD)
+ AC_DEFINE(HAVE_BSD_FLOCK)
+ USE_NSPR_THREADS=1
+ MDCPUCFG_H=_netbsd.cfg
+ PR_MD_CSRCS=netbsd.c
+
+ DSO_CFLAGS='-fPIC -DPIC'
+ CFLAGS="$CFLAGS -ansi -Wall"
+ CXXFLAGS="$CXXFLAGS -ansi -Wall"
+ MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
+
+ if test -z "$OBJECT_FMT"; then
+ if echo __ELF__ | ${CC-cc} -E - | grep -q __ELF__ 2>/dev/null; then
+ OBJECT_FMT=a.out
+ DLL_SUFFIX=so.1.0
+ DSO_LDOPTS='-shared'
+ else
+ OBJECT_FMT=ELF
+ DLL_SUFFIX=so
+ DSO_LDOPTS='-shared -Wl,-soname,$(notdir $@)'
+ fi
+ fi
+
+ if test "$LIBRUNPATH"; then
+ DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
+ 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
+ MDCPUCFG_H=_sony.cfg
+ PR_MD_CSRCS=sony.c
+ ;;
+
+*-nextstep*|*-openstep*)
+ AC_DEFINE(XP_UNIX)
+ AC_DEFINE(NEXTSTEP)
+ AC_DEFINE(HAVE_BSD_FLOCK)
+ AC_DEFINE(_POSIX_SOURCE)
+ CFLAGS="$CFLAGS -Wall -fno-common -traditional-cpp -posix"
+ CXXFLAGS="$CXXFLAGS -Wall -fno-common -traditional-cpp -posix"
+ USE_NSPR_THREADS=1
+ DLL_SUFFIX=dylib
+ MDCPUCFG_H=_nextstep.cfg
+ PR_MD_CSRCS=nextstep.c
+ ;;
+
+
+*-nto*)
+ AC_DEFINE(XP_UNIX)
+ AC_DEFINE(NTO)
+ AC_DEFINE(_QNX_SOURCE)
+ AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
+ MDCPUCFG_H=_nto.cfg
+ PR_MD_CSRCS=nto.c
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(notdir $@) -o $@'
+ DSO_CFLAGS=-fPIC
+ DSO_LDOPTS=-shared
+ OS_LIBS="$OS_LIBS -lsocket"
+ _OPTIMIZE_FLAGS="-O1"
+ _DEBUG_FLAGS="-gstabs"
+ ;;
+
+*-openbsd*)
+ AC_DEFINE(XP_UNIX)
+ AC_DEFINE(OPENBSD)
+ AC_DEFINE(HAVE_BSD_FLOCK)
+ AC_DEFINE(HAVE_SOCKLEN_T)
+ CFLAGS="$CFLAGS -ansi -Wall"
+ CXXFLAGS="$CXXFLAGS -ansi -Wall"
+ DLL_SUFFIX=so.1.0
+ DSO_CFLAGS=-fPIC
+ MDCPUCFG_H=_openbsd.cfg
+ PR_MD_CSRCS=openbsd.c
+ USE_NSPR_THREADS=1
+ DSO_LDOPTS='-shared -fPIC'
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ ;;
+
+*-openvms*)
+ AC_DEFINE(XP_UNIX)
+ AC_DEFINE(VMS)
+ AC_DEFINE(PR_GETIPNODE_NOT_THREADSAFE)
+ RESOLVE_LINK_SYMBOLS=1
+ AR_FLAGS='c $@'
+ MDCPUCFG_H=_openvms.cfg
+ PR_MD_CSRCS=openvms.c
+ 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
+ ;;
+
+*-osf*)
+ SHELL_OVERRIDE="SHELL = /usr/bin/ksh"
+ AC_DEFINE(XP_UNIX)
+ AC_DEFINE(OSF1)
+ AC_DEFINE(_REENTRANT)
+ # 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)
+
+ 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"
+ if test "$OS_RELEASE" != "V2.0"; then
+ CC="$CC -readonly_strings"
+ fi
+ _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
+ AC_CHECK_HEADER(machine/builtins.h, AC_DEFINE(OSF1_HAVE_MACHINE_BUILTINS_H))
+ else
+ CFLAGS="$CFLAGS -mieee"
+ CXXFLAGS="$CXXFLAGS -mieee"
+ fi
+
+ if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
+ AC_DEFINE(HAVE_INT_LOCALTIME_R)
+ else
+ AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
+ AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
+ fi
+ if echo $OS_RELEASE | grep -c V4.0 >/dev/null; then
+ AC_DEFINE(OSF1V4_MAP_PRIVATE_BUG)
+ fi
+ DSO_LDOPTS='-shared -all -expect_unresolved "*" -soname $(notdir $@)'
+ MDCPUCFG_H=_osf1.cfg
+ PR_MD_CSRCS=osf1.c
+ ;;
+
+*-qnx*)
+ AC_DEFINE(XP_UNIX)
+ AC_DEFINE(QNX)
+ AC_DEFINE(_PR_NEED_H_ERRNO)
+ USE_NSPR_THREADS=1
+ MDCPUCFG_H=_qnx.cfg
+ PR_MD_CSRCS=qnx.c
+ ;;
+
+*-*-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'
+ MDCPUCFG_H=_scoos.cfg
+ PR_MD_SRCS=scoos.c
+ ;;
+
+*-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
+ MDCPUCFG_H=_reliantunix.cfg
+ PR_MD_CSRCS=reliantunix.c
+ if test "${OS_ARCH}" = "mips"; then
+ PR_MD_ASFILES=os_ReliantUNIX.s
+ fi
+ ;;
+
+*-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
+ 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
+ ;;
+
+*-solaris*)
+ if test -z "$USE_USER_THREADS" && test -z "$USE_NATIVE_THREADS"; then
+ USE_PTHREADS=1
+ fi
+ AC_DEFINE(XP_UNIX)
+ AC_DEFINE(SVR4)
+ AC_DEFINE(SYSV)
+ AC_DEFINE(__svr4)
+ AC_DEFINE(__svr4__)
+ AC_DEFINE(SOLARIS)
+ AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
+ if test -n "$USE_64"; then
+ MDCPUCFG_H=_solaris64.cfg
+ else
+ MDCPUCFG_H=_solaris32.cfg
+ fi
+ PR_MD_CSRCS=solaris.c
+ LD=/usr/ccs/bin/ld
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ RESOLVE_LINK_SYMBOLS=1
+ if test -n "$GNU_CC"; then
+ DSO_CFLAGS=-fPIC
+ 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'
+ else
+ DSO_CFLAGS=-KPIC
+ DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs'
+ fi
+ if test -z "$GNU_AS"; then
+ ASFLAGS="$ASFLAGS -Wa,-P"
+ fi
+ if test -n "$GNU_CC"; then
+ CFLAGS="$CFLAGS -Wall"
+ CXXFLAGS="$CXXFLAGS -Wall"
+ if test -n "$USE_MDUPDATE"; then
+ CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
+ CXXFLAGS="$CXXFLAGS -MDupdate \$(DEPENDENCIES)"
+ fi
+ else
+ CFLAGS="$CFLAGS -xstrconst"
+ CXXFLAGS="$CXXFLAGS -Qoption cg -xstrconst -features=tmplife"
+ if test -z "$MOZ_OPTIMIZE"; then
+ CFLAGS="$CFLAGS -xs"
+ CXXFLAGS="$CXXFLAGS -xs"
+ fi
+ _OPTIMIZE_FLAGS=-xO4
+ fi
+ if test -n "$USE_64"; then
+ if test -n "$GNU_CC"; then
+ CC="$CC -m64"
+ CXX="$CXX -m64"
+ else
+ CC="$CC -xarch=v9"
+ CXX="$CXX -xarch=v9"
+ fi
+ fi
+ if test "$OS_TEST" = "i86pc"; then
+ AC_DEFINE(i386)
+ CPU_ARCH_TAG=_$OS_TEST
+ # 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.
+ if test -n "$MOZ_DEBUG" && test -n "$GNU_CC"; then
+ _DEBUG_FLAGS=-gstabs
+ if test -z "$GNU_AS"; then
+ _DEBUG_FLAGS="$_DEBUG_FLAGS -Wa,-s"
+ fi
+ 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)
+ # 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.
+ if test -n "$GNU_CC"; then
+ AC_DEFINE(_LARGEFILE64_SOURCE)
+ fi
+ ;;
+ esac
+ case "${target_os}" in
+ solaris2.3*)
+ ;;
+ solaris2.4*)
+ ;;
+ solaris2.5*)
+ ;;
+ solaris2.6*)
+ ;;
+ solaris2.7*)
+ ;;
+ *)
+ # Solaris 8 or higher has IPv6.
+ AC_DEFINE(_PR_INET6)
+ ;;
+ esac
+ if test "$OS_TEST" = "sun4u"; then
+ # 64-bit Solaris requires SPARC V9 architecture, so the following
+ # is not needed.
+ if test -z "$USE_64"; then
+ ULTRASPARC_LIBRARY=nspr_flt
+ fi
+ fi
+ # 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"
+ ;;
+
+*-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'
+ MDCPUCFG_H=_unixware.cfg
+ else
+ AC_DEFINE(_LARGEFILE64_SOURCE)
+ AC_DEFINE(_PR_HAVE_OFF64_T)
+ AC_DEFINE(_PR_HAVE_SOCKADDR_LEN)
+ MDCPUCFG_H=_unixware7.cfg
+ fi
+ PR_MD_CSRCS=unixware.c
+ DSO_LDOPTS=-G
+ CPU_ARCH=x86
+ ;;
+
+*-os2*)
+ AC_DEFINE(XP_OS2)
+ AC_DEFINE(XP_PC)
+ AC_DEFINE(BSD_SELECT)
+ AC_DEFINE(TCPV40HDRS)
+ LIB_SUFFIX=lib
+ DLL_SUFFIX=dll
+ RC=rc.exe
+ PR_MD_ARCH_DIR=os2
+ PROG_SUFFIX=.exe
+ NSINSTALL=nsinstall
+ MDCPUCFG_H=_os2.cfg
+ RESOLVE_LINK_SYMBOLS=1
+
+ # EMX/GCC build
+ if test -n "$GNU_CC"; then
+ AC_DEFINE(XP_OS2_EMX)
+ AC_DEFINE(OS2)
+ AR=emxomfar
+ AR_FLAGS='r $@'
+ CFLAGS="$CFLAGS -Wall -Zomf"
+ CXXFLAGS="$CFLAGS -Wall -Zomf"
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ DSO_CFLAGS=
+ DSO_LDOPTS='-Zomf -Zdll -Zmap'
+ LDFLAGS='-Zmap'
+ _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
+ OS_LIBS="-lsocket"
+ IMPLIB='emximp -o'
+ FILTER='emxexp -o'
+
+ # GCC for OS/2 currently predefines these, but we don't want them
+ DEFINES="$DEFINES -Uunix -U__unix -U__unix__"
+
+ # Visual Age C++ build
+ elif test "$VACPP" = "yes"; then
+ AC_DEFINE(XP_OS2_VACPP)
+ AC_DEFINE(OS2,4)
+ AC_DEFINE(_X86_)
+ OBJ_SUFFIX=obj
+ AS=alp
+ ASFLAGS='-Mb'
+ ASM_SUFFIX=asm
+ AR=-ilib
+ AR_FLAGS='/NOL /NOI /O:$(subst /,\\,$@)'
+ CFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9'
+ HOST_CFLAGS="$CFLAGS"
+ 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'
+ OS_LIBS='so32dll.lib tcp32dll.lib'
+ LD='-ilink'
+ MKSHLIB='$(LD) $(DSO_LDOPTS)'
+ IMPLIB='implib -nologo -noignorecase'
+ FILTER='cppfilt -q -B -P'
+ _OPTIMIZE_FLAGS='/O+ /Gl+ /qtune=pentium /qarch=pentium'
+ _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'
+ if test -n "$MOZ_DEBUG"; then
+ 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"
+ fi
+ LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
+ LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
+ fi
+ ;;
+
+*)
+ AC_DEFINE(XP_UNIX)
+ ;;
+
+esac
+
+if test -z "$SKIP_LIBRARY_CHECKS"; then
+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)
+
+
+dnl We don't want anything to link with libdl even if it's present on OS X,
+dnl since it's not used and not part of the default installation.
+
+case $target in
+*-darwin*)
+ ;;
+*)
+ AC_CHECK_LIB(dl, dlopen,
+ AC_CHECK_HEADER(dlfcn.h,
+ OS_LIBS="-ldl $OS_LIBS"))
+ ;;
+esac
+
+
+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 ========================================================
+
+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],
+ [ if test "$enableval" = "yes"; then
+ ENABLE_STRIP=1
+ fi ])
+
+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
+
+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>
+ void *foo(void *v) { return v; }
+ int main() {
+ pthread_t t;
+ if (!pthread_create(&t, 0, &foo, 0)) {
+ pthread_join(t, 0);
+ }
+ return 0;
+ }" > 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,
+ _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads",
+ MOZ_CHECK_PTHREADS(pthread,
+ _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread",
+ MOZ_CHECK_PTHREADS(c_r,
+ _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r",
+ MOZ_CHECK_PTHREADS(c,
+ _HAVE_PTHREADS=1
+ )
+ )
+ )
+)
+
+AC_ARG_WITH(pthreads,
+ [ --with-pthreads Use system pthreads library as thread subsystem],
+ [ if test "$withval" = "yes"; then
+ if test -n "$_HAVE_PTHREADS"; then
+ USE_PTHREADS=1
+ USE_USER_PTHREADS=
+ USE_NSPR_THREADS=
+ else
+ AC_MSG_ERROR([ --with-pthreads specified for a system without pthread support ]);
+ fi
+ else
+ USE_PTHREADS=
+ _PTHREAD_LDFLAGS=
+ fi],
+ [ if test -n "$_HAVE_PTHREADS" && test -z "$USE_USER_PTHREADS" && test -z "$USE_NSPR_THREADS"; then
+ USE_PTHREADS=1
+ USE_USER_PTHREADS=
+ USE_NSPR_THREADS=
+ fi])
+
+AC_ARG_ENABLE(user-pthreads,
+ [ --enable-user-pthreads Build using userland pthreads],
+ [ if test "$enableval" = "yes"; then
+ if test -n "$_HAVE_PTHREADS"; then
+ USE_PTHREADS=
+ USE_USER_PTHREADS=1
+ USE_NSPR_THREADS=
+ else
+ AC_MSG_ERROR([ --enable-user-pthreads specified for a system without pthread support ]);
+ fi
+ fi])
+
+AC_ARG_ENABLE(nspr-threads,
+ [ --enable-nspr-threads Build using classic nspr threads],
+ [ if test "$enableval" = "yes"; then
+ USE_PTHREADS=
+ USE_USER_PTHREADS=
+ USE_NSPR_THREADS=1
+ fi])
+
+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
+ USE_USER_PTHREADS=
+ USE_PTHREADS=
+ fi])
+ ;;
+
+*-solaris*)
+ AC_ARG_WITH(native-threads,
+ [ --with-native-threads Use native system threads as thread subsystem (Solaris only)],
+ [ if test "$withval" = "yes"; then
+ USE_NATIVE_THREADS=1
+ USE_USER_PTHREADS=
+ USE_PTHREADS=
+ fi])
+ ;;
+esac
+
+fi # SKIP_LIBRARY_CHECKS
+
+AC_ARG_ENABLE(cplus,
+ [ --enable-cplus Enable some c++ api routines],
+ [ if test "$enableval" = "yes"; then
+ USE_CPLUS=1
+ fi])
+
+AC_ARG_ENABLE(ipv6,
+ [ --enable-ipv6 Compile ipv6 support],
+ [ if test "$enableval" = "yes"; then
+ USE_IPV6=1
+ else
+ USE_IPV6=
+ fi])
+
+
+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])
+
+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
+ case "$target_os" in
+ freebsd*)
+# Freebsd doesn't use -pthread for compiles, it uses them for linking
+ ;;
+ *)
+ CFLAGS="$CFLAGS -pthread"
+ CXXFLAGS="$CXXFLAGS -pthread"
+ ;;
+ esac
+ fi
+ fi
+ rm -f conftest*
+ AC_MSG_RESULT($ac_cv_have_dash_pthread)
+
+ 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
+
+ case "$target" in
+ *-solaris*)
+ if test "$ac_cv_have_dash_pthreads" = "yes"; then
+ _PTHREAD_LDFLAGS=
+ fi
+ ;;
+ *-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
+ ;;
+ *-netbsd*)
+ if test "$ac_cv_have_dash_pthread" = "yes"; then
+ _PTHREAD_LDFLAGS="-pthread"
+ fi
+ ;;
+ *-bsdi*)
+ 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=
+ fi
+ ;;
+ *-openbsd*)
+ if test "$ac_cv_have_dash_pthread" = "yes"; then
+ _PTHREAD_LDFLAGS=-pthread
+ fi
+ ;;
+ *-linux*)
+ AC_DEFINE(_REENTRANT)
+ ;;
+ esac
+
+else
+ if test -n "$USE_USER_PTHREADS"; then
+ USE_PTHREADS=
+ USE_NSPR_THREADS=
+ else
+ _PTHREAD_LDFLAGS=
+ fi
+fi
+dnl Special thread exceptions
+
+case "$target" in
+*-aix*)
+ if test -n "$USE_NSPR_THREADS"; then
+ AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
+ fi
+ case "$target_os" in
+ aix4.1*)
+ if test -z "$USE_PTHREADS"; then
+ AC_DEFINE(AIX_RENAME_SELECT)
+ fi
+ ;;
+ aix4.2*)
+ if test -z "$USE_NSPR_THREADS"; then
+ AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
+ fi
+ ;;
+ aix4.3*)
+ 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
+ ;;
+ *)
+ 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
+ ;;
+ esac
+ ;;
+*-bsdi*)
+ if test -n "$USE_PTHREADS"; then
+ AC_DEFINE(_PR_NEED_PTHREAD_INIT)
+ fi
+ ;;
+*-freebsd*)
+ if test -n "$USE_NSPR_THREADS"; then
+ AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
+ fi
+ ;;
+*-hpux*)
+ if test -n "$USE_NSPR_THREADS"; then
+ AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
+ fi
+ if test "$USE_PTHREADS"; then
+ if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
+ AC_DEFINE(_REENTRANT)
+ AC_DEFINE(_PR_DCETHREADS)
+ else
+ AC_DEFINE_UNQUOTED(_POSIX_C_SOURCE,199506L)
+ AC_DEFINE(_PR_HAVE_THREADSAFE_GETHOST)
+ fi
+ fi
+ if test "$USE_USER_PTHREADS"; then
+ AC_DEFINE_UNQUOTED(_POSIX_C_SOURCE,199506L)
+ fi
+ ;;
+*-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
+ ;;
+*-linux*)
+ if test -n "$USE_NSPR_THREADS"; then
+ AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
+ fi
+ ;;
+*-mingw*|*-cygwin*|*-msvc*|*-mks*)
+ dnl win32 does not use pthreads
+ USE_PTHREADS=
+ _PTHREAD_LDFLAGS=
+ USE_USER_PTHREADS=
+ ;;
+*-netbsd*|*-openbsd*)
+ if test -n "$USE_NSPR_THREADS"; then
+ AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
+ fi
+ ;;
+*-osf*)
+ if test -n "$USE_NSPR_THREADS"; then
+ AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
+ fi
+ if test -n "$USE_PTHREADS"; then
+ if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
+ :
+ else
+ AC_DEFINE(_PR_HAVE_THREADSAFE_GETHOST)
+ fi
+ fi
+ ;;
+*-solaris*)
+ if test -n "$USE_NATIVE_THREADS"; then
+ AC_DEFINE(_PR_GLOBAL_THREADS_ONLY)
+ else
+ if test -n "$USE_NSPR_THREADS"; then
+ AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
+ fi
+ fi
+ if test -z "$USE_NSPR_THREADS"; then
+ AC_DEFINE(_REENTRANT)
+ AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
+ if test "$OS_TEST" = "i86pc"; then
+ PR_MD_ASFILES=os_SunOS_x86.s
+ else
+ PR_MD_ASFILES=os_SunOS.s
+ if test -n "$USE_64"; then
+ PR_MD_ASFILES="$PR_MD_ASFILES os_SunOS_sparcv9.s"
+ fi
+ fi
+ fi
+ ;;
+*-nto*)
+ if test -n "$USE_PTHREADS"; then
+ AC_DEFINE(_PR_HAVE_GETHOST_R)
+ AC_DEFINE(_PR_HAVE_GETHOST_R_POINTER)
+ fi
+ ;;
+esac
+
+OS_LIBS="$_PTHREAD_LDFLAGS $OS_LIBS"
+
+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
+
+if test -n "$MOZ_OPTIMIZE"; then
+ CFLAGS="$CFLAGS $_OPTIMIZE_FLAGS"
+ CXXFLAGS="$CXXFLAGS $_OPTIMIZE_FLAGS"
+fi
+
+if test -n "$MOZ_DEBUG"; then
+ CFLAGS="$CFLAGS $_DEBUG_FLAGS"
+ CXXFLAGS="$CXXFLAGS $_DEBUG_FLAGS"
+fi
+
+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}"
+
+dnl ========================================================
+dnl Use cygwin wrapper for win32 builds
+dnl ========================================================
+case "$target_os" in
+mingw*|cygwin*|msvc*|mks*)
+ CC="\$(CYGWIN_WRAPPER) $CC"
+ CXX="\$(CYGWIN_WRAPPER) $CXX"
+ RC="\$(CYGWIN_WRAPPER) $RC"
+ ;;
+esac
+
+dnl ========================================================
+dnl Substitution of found variables.
+dnl ========================================================
+AC_SUBST(SHELL_OVERRIDE)
+
+AC_SUBST(MOZILLA_CLIENT)
+AC_SUBST(CC)
+AC_SUBST(CXX)
+AC_SUBST(CFLAGS)
+AC_SUBST(CXXFLAGS)
+AC_SUBST(CPPFLAGS)
+AC_SUBST(HOST_CC)
+AC_SUBST(HOST_CFLAGS)
+AC_SUBST(LDFLAGS)
+AC_SUBST(GNU_CC)
+AC_SUBST(GCC_USE_GNU_LD)
+AC_SUBST(MSC_VER)
+AC_SUBST(CROSS_COMPILE)
+
+AC_SUBST(MOZ_OPTIMIZE)
+
+AC_SUBST(USE_CPLUS)
+AC_SUBST(USE_IPV6)
+AC_SUBST(USE_N32)
+AC_SUBST(USE_64)
+AC_SUBST(OBJECT_MODE)
+AC_SUBST(GC_LEAK_DETECTOR)
+AC_SUBST(ENABLE_STRIP)
+
+AC_SUBST(USE_PTHREADS)
+AC_SUBST(USE_BTHREADS)
+AC_SUBST(USE_USER_PTHREADS)
+AC_SUBST(USE_NATIVE_THREADS)
+AC_SUBST(USE_NSPR_THREADS)
+
+AC_SUBST(LIBNSPR)
+AC_SUBST(LIBPLC)
+
+AC_SUBST(MOD_MAJOR_VERSION)
+AC_SUBST(MOD_MINOR_VERSION)
+AC_SUBST(MOD_PATCH_VERSION)
+AC_SUBST(NSPR_MODNAME)
+AC_SUBST(MDCPUCFG_H)
+AC_SUBST(PR_MD_CSRCS)
+AC_SUBST(PR_MD_ASFILES)
+AC_SUBST(PR_MD_ARCH_DIR)
+AC_SUBST(CPU_ARCH)
+
+AC_SUBST(OBJ_SUFFIX)
+AC_SUBST(LIB_SUFFIX)
+AC_SUBST(DLL_SUFFIX)
+AC_SUBST(ASM_SUFFIX)
+AC_SUBST(MKSHLIB)
+AC_SUBST(DSO_CFLAGS)
+AC_SUBST(DSO_LDOPTS)
+
+AC_SUBST(OS_TARGET)
+AC_SUBST(OS_ARCH)
+AC_SUBST(OS_RELEASE)
+AC_SUBST(OS_TEST)
+AC_SUBST(MACOS_DEPLOYMENT_TARGET)
+
+AC_SUBST(DEFINES)
+AC_SUBST(DEFS)
+AC_SUBST(AR)
+AC_SUBST(AR_FLAGS)
+AC_SUBST(AS)
+AC_SUBST(ASFLAGS)
+AC_SUBST(LD)
+AC_SUBST(RANLIB)
+AC_SUBST(PERL)
+AC_SUBST(STRIP)
+AC_SUBST(FILTER)
+AC_SUBST(IMPLIB)
+
+AC_SUBST(OS_LIBS)
+AC_SUBST(RESOLVE_LINK_SYMBOLS)
+AC_SUBST(AIX_LINK_OPTS)
+AC_SUBST(NOSUCHFILE)
+AC_SUBST(MOZ_OBJFORMAT)
+AC_SUBST(ULTRASPARC_LIBRARY)
+
+AC_SUBST(OBJDIR)
+AC_SUBST(OBJDIR_NAME)
+AC_SUBST(RELEASE_OBJDIR_NAME)
+AC_SUBST(NSINSTALL)
+AC_SUBST(OPTIMIZER)
+AC_SUBST(RC)
+AC_SUBST(RCFLAGS)
+AC_SUBST(DLLFLAGS)
+AC_SUBST(EXEFLAGS)
+AC_SUBST(OS_DLLFLAGS)
+AC_SUBST(CYGWIN_WRAPPER)
+
+dnl ========================================================
+dnl Generate output files.
+dnl ========================================================
+MAKEFILES="
+Makefile
+config/Makefile
+config/autoconf.mk
+config/nsprincl.mk
+config/nsprincl.sh
+config/nspr-config
+lib/Makefile
+lib/ds/Makefile
+lib/libc/Makefile
+lib/libc/include/Makefile
+lib/libc/src/Makefile
+lib/tests/Makefile
+pkg/Makefile
+pkg/linux/Makefile
+pkg/solaris/Makefile
+pkg/solaris/SUNWpr/Makefile
+pkg/solaris/SUNWprx/Makefile
+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
+pr/src/md/${PR_MD_ARCH_DIR}/Makefile
+pr/src/memory/Makefile
+pr/src/misc/Makefile
+pr/src/threads/Makefile
+pr/tests/Makefile
+pr/tests/dll/Makefile
+"
+
+dnl lib/tests/Makefile
+dnl pr/tests/w16gui/Makefile
+dnl tools/Makefile
+
+if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then
+ 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
+
+AC_OUTPUT([$MAKEFILES], [chmod +x config/nspr-config])