1
dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; -*-
3
dnl The contents of this file are subject to the Mozilla Public
4
dnl License Version 1.1 (the "License"); you may not use this file
5
dnl except in compliance with the License. You may obtain a copy of
6
dnl the License at http://www.mozilla.org/MPL/
8
dnl Software distributed under the License is distributed on an "AS
9
dnl IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
10
dnl implied. See the License for the specific language governing
11
dnl rights and limitations under the License.
13
dnl The Original Code is the Netscape Portable Runtime (NSPR).
15
dnl The Initial Developer of the Original Code is Netscape
16
dnl Communications Corporation. Portions created by Netscape are
17
dnl Copyright (C) 1998o-2000 Netscape Communications Corporation. All
21
dnl Christopher Seawood <cls@seawood.org>
23
dnl Alternatively, the contents of this file may be used under the
24
dnl terms of the GNU General Public License Version 2 or later (the
25
dnl "GPL"), in which case the provisions of the GPL are applicable
26
dnl instead of those above. If you wish to allow use of your
27
dnl version of this file only under the terms of the GPL and not to
28
dnl allow others to use your version of this file under the MPL,
29
dnl indicate your decision by deleting the provisions above and
30
dnl replace them with the notice and other provisions required by
31
dnl the GPL. If you do not delete the provisions above, a recipient
32
dnl may use your version of this file under either the MPL or the
37
AC_INIT(config/libc_r.h)
39
AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)
42
dnl ========================================================
44
dnl ========================================================
58
MACOS_DEPLOYMENT_TARGET=
66
NSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'
67
NOSUCHFILE=/no-such-file
68
LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
69
LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'
72
dnl Link in libraries necessary to resolve all symbols for shared libs
75
dnl ========================================================
77
dnl = Dont change the following lines. Doing so breaks:
79
dnl = CFLAGS="-foo" ./configure
81
dnl ========================================================
83
CXXFLAGS="${CXXFLAGS=}"
85
HOST_CFLAGS="${HOST_CFLAGS=}"
86
HOST_LDFLAGS="${HOST_LDFLAGS=}"
90
# Check to see if we are really running in a msvc environemnt
92
AC_CHECK_PROGS(CC, cl)
93
if test "$CC" = "cl"; then
94
echo 'main() { return 0; }' > dummy.c
95
${CC} -o dummy dummy.c >/dev/null 2>&1
100
AC_MSG_WARN([$(CC) test failed. Using normal feature tests])
102
rm -f dummy dummy.o dummy.obj dummy.exe dummy.c
113
if test -n "$_WIN32_MSVC"; then
115
SKIP_COMPILER_CHECKS=1
116
SKIP_LIBRARY_CHECKS=1
119
dnl ========================================================
121
dnl = Check options that may affect the compiler
123
dnl ========================================================
124
dist_prefix='${MOD_DEPTH}/dist'
125
dist_bindir='${dist_prefix}/bin'
126
dist_includedir='${dist_prefix}/include/nspr'
127
dist_libdir='${dist_prefix}/lib'
128
if test "${includedir}" = '${prefix}/include'; then
129
includedir='${prefix}/include/nspr'
132
AC_ARG_WITH(dist-prefix,
133
[ --with-dist-prefix=DIST_PREFIX
134
place build files in DIST_PREFIX [dist]],
135
dist_prefix=$withval)
137
AC_ARG_WITH(dist-bindir,
138
[ --with-dist-bindir=DIR build execuatables in DIR [DIST_PREFIX/bin]],
139
dist_bindir=$withval)
141
AC_ARG_WITH(dist-includedir,
142
[ --with-dist-includedir=DIR
143
build include files in DIR [DIST_PREFIX/include/nspr]],
144
dist_includedir=$withval)
146
AC_ARG_WITH(dist-libdir,
147
[ --with-dist-libdir=DIR build library files in DIR [DIST_PREFIX/lib]],
148
dist_libdir=$withval)
150
AC_SUBST(dist_prefix)
151
AC_SUBST(dist_bindir)
152
AC_SUBST(dist_includedir)
153
AC_SUBST(dist_libdir)
155
dnl Check if NSPR is being compiled for Mozilla
156
dnl Let --with-arg override environment setting
159
[ --with-mozilla Compile NSPR with Mozilla support],
160
[ if test "$withval" = "yes"; then
161
AC_DEFINE(MOZILLA_CLIENT)
166
[ if test -n "$MOZILLA_CLIENT"; then
167
AC_DEFINE(MOZILLA_CLIENT)
170
AC_ARG_ENABLE(optimize,
171
[ --enable-optimize(=val) Enable code optimizations (val, ie. -O2) ],
172
[ if test "$enableval" != "no"; then
174
if test -n "$enableval" && test "$enableval" != "yes"; then
175
_OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
176
_SAVE_OPTIMIZE_FLAGS=$_OPTIMIZE_FLAGS
183
[ --disable-debug Do not compile in debugging symbols],
184
[ if test "$enableval" = "no"; then
190
AC_ARG_ENABLE(win32-target,
191
[ --enable-win32-target=\$t
192
Specify win32 flavor. (WIN95 or WINNT)],
193
OS_TARGET=`echo $enableval | tr a-z A-Z`,
196
AC_ARG_ENABLE(debug-rtl,
197
[ --enable-debug-rtl Use the MSVC debug runtime library],
198
[ if test "$enableval" = "yes"; then
203
[ --enable-n32 Enable n32 ABI support (IRIX only)],
204
[ if test "$enableval" = "yes"; then
206
else if test "$enableval" = "no"; then
212
[ --enable-64bit Enable 64-bit support (on certain platforms)],
213
[ if test "$enableval" = "yes"; then
217
AC_ARG_ENABLE(mdupdate,
218
[ --enable-mdupdate Enable use of certain compilers' mdupdate feature],
219
[ if test "$enableval" = "yes"; then
223
AC_ARG_ENABLE(macos-target,
224
[ --enable-macos-target=VER (default=10.1)
225
Set the minimum MacOS version needed at runtime],
226
[MACOS_DEPLOYMENT_TARGET_STR=$enableval],
227
[MACOS_DEPLOYMENT_TARGET_STR=10.1])
229
dnl ========================================================
231
dnl = Set the threading model
233
dnl ========================================================
237
case "${target_os}" in
249
dnl ========================================================
251
dnl = Set the default C compiler
253
dnl ========================================================
254
if test -z "$CC"; then
258
if test -z "$USE_NSPR_THREADS"; then
288
dnl ========================================================
290
dnl = Set the default C++ compiler
292
dnl ========================================================
293
if test -z "$CXX"; then
297
if test -z "$USE_NSPR_THREADS"; then
305
case "${target_os}" in
337
if test -z "$SKIP_PATH_CHECKS"; then
338
AC_PATH_PROG(WHOAMI, $WHOAMI whoami, echo not_whoami)
341
if test -n "$MOZ_DEBUG"; then
343
DEFINES="$DEFINES -UNDEBUG"
345
case "${target_os}" in
347
DEFINES="$DEFINES -DDEBUG_${USER}"
349
msvc*|mks*|cygwin*|mingw*|os2*)
350
DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`"
353
DEFINES="$DEFINES -DDEBUG_`$WHOAMI`"
358
DEFINES="$DEFINES -UDEBUG"
361
if test -z "$SKIP_COMPILER_CHECKS"; then
362
dnl ========================================================
363
dnl Checks for compilers.
364
dnl ========================================================
365
if test "$target" != "$host"; then
366
echo "cross compiling from $host to $target"
370
_SAVE_CFLAGS="$CFLAGS"
371
_SAVE_LDFLAGS="$LDFLAGS"
373
AC_MSG_CHECKING([for $host compiler])
374
AC_CHECK_PROGS(HOST_CC, $HOST_CC gcc cc /usr/ucb/cc, "")
375
if test -z "$HOST_CC"; then
376
AC_MSG_ERROR([no acceptable cc found in \$PATH])
378
AC_MSG_RESULT([$HOST_CC])
379
if test -z "$HOST_CFLAGS"; then
380
HOST_CFLAGS="$CFLAGS"
382
if test -z "$HOST_LDFLAGS"; then
383
HOST_LDFLAGS="$LDFLAGS"
387
CFLAGS="$HOST_CFLAGS"
388
LDFLAGS="$HOST_LDFLAGS"
390
AC_MSG_CHECKING([whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works])
391
AC_TRY_COMPILE([], [return(0);],
392
[ac_cv_prog_host_cc_works=1 AC_MSG_RESULT([yes])],
393
AC_MSG_ERROR([installation or configuration problem: $host compiler $HOST_CC cannot create executables.]) )
397
LDFLAGS=$_SAVE_LDFLAGS
399
AC_CHECK_PROGS(CC, $CC "${target_alias}-gcc" "${target}-gcc", echo)
402
AC_CHECK_PROGS(CXX, $CXX "${target_alias}-g++" "${target}-g++", echo)
405
AC_CHECK_PROGS(RANLIB, $RANLIB "${target_alias}-ranlib" "${target}-ranlib", echo)
406
AC_CHECK_PROGS(AR, $AR "${target_alias}-ar" "${target}-ar", echo)
407
AC_CHECK_PROGS(AS, $AS "${target_alias}-as" "${target}-as", echo)
408
AC_CHECK_PROGS(LD, $LD "${target_alias}-ld" "${target}-ld", echo)
409
AC_CHECK_PROGS(STRIP, $STRIP "${target_alias}-strip" "${target}-strip", echo)
410
AC_CHECK_PROGS(WINDRES, $WINDRES "${target_alias}-windres" "${target}-windres", echo)
414
if test "$CXX" = "cl" -a -z "$CC"; then
421
AC_PATH_PROGS(AS, as, $CC)
422
AC_PATH_PROGS(AR, ar, echo not_ar)
423
AC_PATH_PROGS(LD, ld link, echo not_ld)
424
AC_PATH_PROGS(STRIP, strip, echo not_strip)
425
AC_PATH_PROGS(WINDRES, windres, echo not_windres)
426
if test -z "$HOST_CC"; then
429
if test -z "$HOST_CFLAGS"; then
430
HOST_CFLAGS="$CFLAGS"
434
if test "$GCC" = "yes"; then
437
if test "$GXX" = "yes"; then
440
if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then
445
if test "$cross_compiling" = "yes"; then
451
dnl ========================================================
452
dnl Check for gcc -pipe support
453
dnl ========================================================
454
AC_MSG_CHECKING([for gcc -pipe support])
455
if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
456
echo '#include <stdio.h>' > dummy-hello.c
457
echo 'int main() { printf("Hello World\n"); return 0; }' >> dummy-hello.c
458
${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
459
cat dummy-hello.s | ${AS} -o dummy-hello.S - 2>&5
465
if test "$_res_as_stdin" = "yes"; then
467
CFLAGS="$CFLAGS -pipe"
468
AC_TRY_COMPILE( [ #include <stdio.h> ],
469
[printf("Hello World\n");],
470
[_res_gcc_pipe="yes"],
471
[_res_gcc_pipe="no"] )
474
if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then
476
CFLAGS="$CFLAGS -pipe"
477
CXXFLAGS="$CXXFLAGS -pipe"
481
rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out
482
AC_MSG_RESULT([$_res])
487
fi # SKIP_COMPILER_CHECKS
489
dnl ========================================================
490
dnl Checks for programs.
491
dnl ========================================================
492
if test -z "$SKIP_PATH_CHECKS"; then
493
AC_PATH_PROGS(PERL, perl5 perl, echo not_perl)
494
elif test -z "$PERL"; then
498
dnl ========================================================
499
dnl Default platform specific options
500
dnl ========================================================
505
MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
513
if test -n "$CROSS_COMPILE"; then
514
OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
516
OS_TEST="${target_cpu}"
517
case "${target_os}" in
518
linux*) OS_ARCH=Linux ;;
519
solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
520
mingw*) OS_ARCH=WINNT ;;
523
OS_ARCH=`uname -s | sed -e 's|/|_|g'`
524
OS_RELEASE=`uname -r`
528
if test "$OS_ARCH" = "IRIX64"; then
532
if test "$OS_ARCH" = "AIX"; then
533
OS_RELEASE=`uname -v`.`uname -r`
536
if test "$OS_ARCH" = "FreeBSD"; then
537
OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
540
if test "$OS_ARCH" = "Linux"; then
541
OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
542
OS_RELEASE=`echo $OS_RELEASE | awk -F\. '{ print $1 "." $2 }'`
545
if test "$OS_ARCH" = "OpenVMS"; then
546
OS_RELEASE=`uname -v`
549
#######################################################################
550
# Master "Core Components" macros for getting the OS target #
551
#######################################################################
554
# Note: OS_TARGET should be specified on the command line for gmake.
555
# When OS_TARGET=WIN95 is specified, then a Windows 95 target is built.
556
# The difference between the Win95 target and the WinNT target is that
557
# the WinNT target uses Windows NT specific features not available
558
# in Windows 95. The Win95 target will run on Windows NT, but (supposedly)
559
# at lesser performance (the Win95 target uses threads; the WinNT target
562
# When OS_TARGET=WIN16 is specified, then a Windows 3.11 (16bit) target
563
# is built. See: win16_3.11.mk for lots more about the Win16 target.
565
# If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
570
# The following hack allows one to build on a WIN95 machine (as if
571
# s/he were cross-compiling on a WINNT host for a WIN95 target).
572
# It also accomodates for MKS's uname.exe. If you never intend
573
# to do development on a WIN95 machine, you don't need this hack.
575
if test "$OS_ARCH" = "WIN95"; then
578
elif test "$OS_ARCH" = 'Windows_95'; then
581
elif test "$OS_ARCH" = 'Windows_98'; then
584
elif test "`echo $OS_ARCH | egrep -c '^(CYGWIN_9|CYGWIN_ME)' 2>/dev/null`" != 0; then
585
OS_ARCH='CYGWIN_NT-4.0'
587
elif test "$OS_ARCH" = "OS_2"; then
593
# On WIN32, we also define the variable CPU_ARCH.
596
if test "$OS_ARCH" = "WINNT"; then
598
if test "$CPU_ARCH" = "I386"; then
601
elif test "$OS_ARCH" = "Windows_NT"; then
603
# If uname -s returns "Windows_NT", we assume that we are using
604
# the uname.exe in MKS toolkit.
606
# The -r option of MKS uname only returns the major version number.
607
# So we need to use its -v option to get the minor version number.
608
# Moreover, it doesn't have the -p option, so we need to use uname -m.
611
OS_MINOR_RELEASE=`uname -v`
612
if test "$OS_MINOR_RELEASE" = "00"; then
615
OS_RELEASE="${OS_RELEASE}.${OS_MINOR_RELEASE}"
618
# MKS's uname -m returns "586" on a Pentium machine.
620
if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
623
elif echo "$OS_ARCH" | grep -c CYGWIN_NT >/dev/null; then
625
# If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
626
# the uname.exe in the Cygwin tools.
628
OS_RELEASE=`echo $OS_ARCH | sed 's|^CYGWIN_NT-||'`
632
# Cygwin's uname -m returns "i686" on a Pentium Pro machine.
634
if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
637
elif test "$OS_ARCH" = "CYGWIN32_NT"; then
639
# Prior to the Beta 20 release, Cygwin was called GNU-Win32.
640
# If uname -s returns "CYGWIN32/NT", we assume that we are using
641
# the uname.exe in the GNU-Win32 tools.
646
# GNU-Win32's uname -m returns "i686" on a Pentium Pro machine.
648
if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
653
if test -n "$MOZILLA_CLIENT" && test "$OS_ARCH" = "WINNT"; then
655
if test -n "$MOZ_DEBUG"; then
659
if test -z "$OS_TARGET"; then
662
if test "$OS_TARGET" = "WIN95"; then
665
if test "$OS_TARGET" = "WIN16"; then
668
OS_CONFIG="${OS_TARGET}${OS_RELEASE}"
670
dnl ========================================================
672
dnl ========================================================
673
dnl Override of system specific host options
674
dnl ========================================================
676
*-mingw*|*-cygwin*|*-msvc*|*-mks*)
677
NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
678
if test `echo "${PATH}" | grep -c \;` = 0; then
679
CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
683
HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE"
688
HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
692
dnl ========================================================
693
dnl Override of system specific target options
694
dnl ========================================================
701
DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
702
AC_CHECK_HEADER(sys/atomic_op.h, AC_DEFINE(AIX_HAVE_ATOMIC_OP_H))
703
case "${target_os}" in
705
AC_DEFINE(AIX_RENAME_SELECT)
706
AC_DEFINE(_PR_NO_LARGE_FILES)
707
AIX_LINK_OPTS='-bnso -berok'
708
PR_MD_ASFILES=os_AIX.s
711
AC_DEFINE(AIX_TIMERS)
712
AC_DEFINE(_PR_NO_LARGE_FILES)
716
AIX_LINK_OPTS='-bnso -berok'
717
LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)_shr'
718
LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)_shr'
721
AC_DEFINE(AIX_TIMERS)
722
AC_DEFINE(_PR_HAVE_OFF64_T)
723
AIX_LINK_OPTS='-brtl -bnso -berok'
726
AC_DEFINE(AIX_TIMERS)
727
AC_DEFINE(_PR_HAVE_OFF64_T)
728
AC_DEFINE(AIX4_3_PLUS)
729
AC_DEFINE(HAVE_SOCKLEN_T)
730
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
732
AIX_LINK_OPTS='-brtl -bnso -berok'
735
AC_DEFINE(AIX_TIMERS)
736
AC_DEFINE(_PR_HAVE_OFF64_T)
737
AC_DEFINE(AIX4_3_PLUS)
738
AC_DEFINE(HAVE_SOCKLEN_T)
739
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
741
AIX_LINK_OPTS='-brtl -bnso -berok'
744
CFLAGS="$CFLAGS -qro -qroconst"
745
AIX_WRAP='$(DIST)/lib/aixwrap.o'
746
AIX_TMP='./_aix_tmp.o'
747
if test -n "$USE_64"; then
748
MDCPUCFG_H=_aix64.cfg
751
MDCPUCFG_H=_aix32.cfg
754
RESOLVE_LINK_SYMBOLS=1
761
AC_DEFINE(_POSIX_SOURCE)
766
RESOLVE_LINK_SYMBOLS=1
767
case "${target_cpu}" in
770
_DEBUG_FLAGS='-gdwarf-2 -O0'
771
MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
772
AC_CHECK_LIB(bind, gethostbyaddr, [OS_LIBS="$OS_LIBS -lbind -lsocket"])
778
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'
780
_DEBUG_FLAGS='-g -O0'
788
AC_DEFINE(NEED_BSDREGEX)
790
CFLAGS="$CFLAGS -Wall -Wno-format"
791
CXXFLAGS="$CXXFLAGS -Wall -Wno-format"
793
if echo "$OS_TEST" | grep -c 86 >/dev/null; then
795
elif echo "$OS_TEST" | grep -c sparc >/dev/null; then
806
AC_DEFINE(_PR_BSDI_JMPBUF_IS_ARRAY)
807
AC_DEFINE(_PR_STAT_HAS_ONLY_ST_ATIME)
808
AC_DEFINE(_PR_NEED_H_ERRNO)
815
AC_DEFINE(_PR_TIMESPEC_HAS_TS_SEC)
816
AC_DEFINE(_PR_BSDI_JMPBUF_IS_ARRAY)
819
AC_DEFINE(_PR_STAT_HAS_ST_ATIMESPEC)
820
PR_MD_ASFILES=os_BSD_OS_386_2.s
824
AC_DEFINE(_PR_SELECT_CONST_TIMEVAL)
825
AC_DEFINE(_PR_BSDI_JMPBUF_IS_STRUCT)
828
AC_DEFINE(_PR_STAT_HAS_ST_ATIMESPEC)
829
MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
831
DSO_LDOPTS='-shared -Wl,-soname,$(@:$(OBJDIR)/%.so=%.so)'
834
bsdi4.2* | bsdi4.3* | bsdi5.*)
835
AC_DEFINE(_PR_HAVE_GETPROTO_R)
836
AC_DEFINE(_PR_HAVE_GETPROTO_R_POINTER)
841
AC_DEFINE(_PR_SELECT_CONST_TIMEVAL)
842
AC_DEFINE(_PR_BSDI_JMPBUF_IS_STRUCT)
845
AC_DEFINE(_PR_STAT_HAS_ST_ATIMESPEC)
854
AC_DEFINE(HAVE_BSD_FLOCK)
855
CFLAGS="$CFLAGS -Wmost -fno-common"
856
if echo $OS_TEST | grep -c 86 2>/dev/null; then
863
DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
864
# Use the standard preprocessor (cpp)
865
CFLAGS="$CFLAGS -no-cpp-precomp"
866
MKSHLIB='$(CC) -arch $(CPU_ARCH) $(DSO_LDOPTS) -o $@'
870
MDCPUCFG_H=_darwin.cfg
872
if test "$CPU_ARCH" = "ppc"; then
873
PR_MD_ASFILES=os_Darwin_ppc.s
876
# Add Mac OS X support for loading CFM & CFBundle plugins
877
if test -f /System/Library/Frameworks/Carbon.framework/Carbon; then
881
dnl The C preprocessor can only handle integers in comparisons, so
882
dnl convert the version to the form AABBCC where AA=major release,
883
dnl BB=minor release, and CC=point/micro release.
885
MACOS_VERSION_MAJOR=`echo $MACOS_DEPLOYMENT_TARGET_STR | cut -d . -f 1`
886
MACOS_VERSION_MINOR=`echo $MACOS_DEPLOYMENT_TARGET_STR | cut -d . -f 2`
887
MACOS_VERSION_MICRO=`echo $MACOS_DEPLOYMENT_TARGET_STR | cut -d . -f 3`
888
if test -z "$MACOS_VERSION_MINOR"; then
889
MACOS_VERSION_MINOR=0
891
if test -z "$MACOS_VERSION_MICRO"; then
892
MACOS_VERSION_MICRO=0
894
MACOS_DEPLOYMENT_TARGET=`printf "%02d%02d%02d" "$MACOS_VERSION_MAJOR" "$MACOS_VERSION_MINOR" "$MACOS_VERSION_MICRO"`
895
AC_DEFINE_UNQUOTED(MACOS_DEPLOYMENT_TARGET, $MACOS_DEPLOYMENT_TARGET)
898
# do the right thing for panther SDK support
899
if test "$NEXT_ROOT"; then
900
CFLAGS="-I${NEXT_ROOT}/usr/include $CFLAGS"
901
CXXFLAGS="-I${NEXT_ROOT}/usr/include $CXXFLAGS"
907
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
911
AC_DEFINE(_DGUX_SOURCE)
912
AC_DEFINE(_POSIX4A_DRAFT6_SOURCE)
921
if test -z "$USE_NSPR_THREADS"; then
926
AC_DEFINE(HAVE_BSD_FLOCK)
927
AC_DEFINE(HAVE_SOCKLEN_T)
928
CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
929
MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
930
if test "$MOZ_OBJFORMAT" = "elf"; then
935
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
937
DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
938
MDCPUCFG_H=_freebsd.cfg
939
PR_MD_CSRCS=freebsd.c
945
AC_DEFINE(_HPUX_SOURCE)
947
# OSF1 and HPUX report the POLLHUP event for a socket when the
948
# shutdown(SHUT_WR) operation is called for the remote end, even though
949
# the socket is still writeable. Use select(), instead of poll(), to
950
# workaround this problem.
951
AC_DEFINE(_PR_POLL_WITH_SELECT)
952
AC_DEFINE(_USE_BIG_FDS)
954
DSO_LDOPTS='-b +h $(notdir $@)'
956
if test "$OS_TEST" != "ia64"; then
957
PR_MD_ASFILES=os_HPUX.s
959
if test -n "$USE_64"; then
960
MDCPUCFG_H=_hpux64.cfg
962
MDCPUCFG_H=_hpux32.cfg
964
if test -z "$GNU_CC"; then
972
if test -n "$MOZILLA_CLIENT"; then
973
DEFAULT_IMPL_STRATEGY=_EMU
976
if echo "$OS_RELEASE" | grep ^A.09 >/dev/null; then
977
AC_DEFINE(_PR_NEED_H_ERRNO)
979
DEFAULT_IMPL_STRATEGY=_EMU
983
if echo "$OS_RELEASE" | egrep '^(A.09|B.10)' >/dev/null; then
984
AC_DEFINE(_PR_NO_LARGE_FILES)
987
if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
988
AC_DEFINE(_PR_NEED_H_ERRNO)
991
if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
992
AC_DEFINE(HAVE_INT_LOCALTIME_R)
995
if echo "$OS_RELEASE" | egrep '^(B.10.30|B.11)' >/dev/null; then
996
AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
999
# HP-UX 11i (B.11.11) or higher
1001
case "$OS_RELEASE" in
1002
[C-Z]*|B.[2-9]*|B.1[2-9]*|B.11.[2-9]*|B.11.1[1-9]*)
1008
if test "$OS_RELEASE" = "B.10.01"; then
1010
DEFAULT_IMPL_STRATEGY=_EMU
1013
if test "$OS_RELEASE" = "B.10.10"; then
1015
AC_DEFINE(HPUX10_10)
1016
DEFAULT_IMPL_STRATEGY=_PTH
1019
if test "$OS_RELEASE" = "B.10.20"; then
1021
AC_DEFINE(HPUX10_20)
1022
if test -z "$GNU_CC"; then
1023
CFLAGS="$CFLAGS +DAportable +DS1.1"
1024
CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
1026
DEFAULT_IMPL_STRATEGY=_PTH
1029
if test "$OS_RELEASE" = "B.10.30"; then
1031
AC_DEFINE(HPUX10_30)
1032
if test -z "$GNU_CC"; then
1033
CFLAGS="$CFLAGS +DAportable +DS1.1"
1034
CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
1036
DEFAULT_IMPL_STRATEGY=_PTH
1039
if echo "$OS_RELEASE" | grep ^B.11 >/dev/null; then
1042
AC_DEFINE(_LARGEFILE64_SOURCE)
1043
AC_DEFINE(_PR_HAVE_OFF64_T)
1044
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
1045
if test -z "$GNU_CC"; then
1046
if test -z "$USE_64"; then
1047
if test "$OS_TEST" = "ia64"; then
1048
CFLAGS="$CFLAGS +DD32"
1049
CXXFLAGS="$CXXFLAGS +DD32"
1051
CFLAGS="$CFLAGS +DAportable +DS2.0"
1052
CXXFLAGS="$CXXFLAGS +DAportable +DS2.0"
1055
if test "$OS_TEST" = "ia64"; then
1056
CFLAGS="$CFLAGS +DD64"
1057
CXXFLAGS="$CXXFLAGS +DD64"
1059
CFLAGS="$CFLAGS +DA2.0W +DS2.0"
1060
CXXFLAGS="$CXXFLAGS +DA2.0W +DS2.0"
1064
DEFAULT_IMPL_STRATEGY=_PTH
1067
if test "$DEFAULT_IMPL_STRATEGY" = "_EMU"; then
1071
elif test "$DEFAULT_IMPL_STRATEGY" = "_PTH"; then
1073
if test "$USE_NSPR_THREADS"; then
1076
if test "$USE_USER_PTHREADS"; then
1086
AC_DEFINE(_SGI_MP_SOURCE)
1087
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
1089
PR_MD_ASFILES=os_Irix.s
1090
MKSHLIB='$(LD) $(DSO_LDOPTS) -rdata_shared -shared -soname $(notdir $@) -o $@'
1092
RESOLVE_LINK_SYMBOLS=1
1093
if test -n "$USE_64"; then
1094
MDCPUCFG_H=_irix64.cfg
1096
MDCPUCFG_H=_irix32.cfg
1098
case "${target_os}" in
1115
if test "$GNU_CC"; then
1117
dnl If we are using gcc with native binutils, we need to
1119
dnl #lineno "filename" num num
1120
dnl lines, which confuse IRIX native as. Add -Wp,-P to the
1121
dnl gcc command line, which passes -P to the preprocessor.
1123
AS='$(CC) -Wp,-P -x assembler-with-cpp -D_ASM -mips2 $(INCLUDES)'
1124
CFLAGS="$CFLAGS -Wall -Wno-format"
1125
_OPTIMIZE_FLAGS="-O6"
1127
if test -n "$USE_N32"; then
1128
AS='as -D_ASM $(INCLUDES) -n32'
1130
AS='as -D_ASM $(INCLUDES)'
1132
CFLAGS="$CFLAGS -fullwarn -xansi"
1133
if test "$USE_N32"; then
1134
_OPTIMIZE_FLAGS="-O -OPT:Olimit=4000"
1136
_OPTIMIZE_FLAGS="-O -Olimit 4000"
1138
if test "$USE_MDUPDATE"; then
1139
CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
1143
CFLAGS="$CFLAGS -multigot"
1144
DSO_LDOPTS="-no_unresolved"
1145
if test "$USE_N32"; then
1146
CFLAGS="$CFLAGS -n32 -woff 1209"
1147
DSO_LDOPTS="$DSO_LDOPTS -n32"
1149
if test "$USE_64"; then
1150
CFLAGS="$CFLAGS -64"
1152
CFLAGS="$CFLAGS -32"
1157
CFLAGS="$CFLAGS -xgot"
1161
if test "${target_os}" = "irix5.3"; then
1164
case "${target_os}" in
1166
if test -z "$GNU_CC"; then
1167
CFLAGS="$CFLAGS -mips3"
1169
AC_DEFINE(_PR_HAVE_GETPROTO_R)
1170
AC_DEFINE(_PR_HAVE_GETPROTO_R_POINTER)
1171
AC_DEFINE(_PR_HAVE_SGI_PRDA_PROCMASK)
1176
AC_DEFINE(_PR_HAVE_SGI_PRDA_PROCMASK)
1182
if test -z "$USE_NSPR_THREADS"; then
1187
AC_DEFINE(_POSIX_SOURCE)
1188
AC_DEFINE(_BSD_SOURCE)
1189
AC_DEFINE(_SVID_SOURCE)
1190
AC_DEFINE(_LARGEFILE64_SOURCE)
1191
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
1193
CFLAGS="$CFLAGS -ansi -Wall"
1194
CXXFLAGS="$CXXFLAGS -ansi -Wall"
1195
MDCPUCFG_H=_linux.cfg
1197
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
1199
DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
1201
_DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
1202
# combo is not yet good at debugging inlined
1203
# functions (even when using DWARF2 as the
1206
if echo "$OS_TEST" | grep -c 86 >/dev/null; then
1211
CPU_ARCH_TAG=_${CPU_ARCH}
1212
case "${target_cpu}" in
1216
CFLAGS="$CFLAGS -mieee"
1217
CXXFLAGS="$CXXFLAGS -mieee"
1221
PR_MD_ASFILES=os_Linux_x86.s
1224
PR_MD_ASFILES=os_Linux_ia64.s
1227
PR_MD_ASFILES=os_Linux_x86_64.s
1230
CFLAGS="$CFLAGS -m68020-60"
1231
CXXFLAGS="$CXXFLAGS -m68020-60"
1236
*-mingw*|*-cygwin*|*-msvc*|*-mks*)
1239
PR_MD_ARCH_DIR=windows
1240
RESOLVE_LINK_SYMBOLS=1
1242
if test -n "$GNU_CC"; then
1243
CC="$CC -mno-cygwin"
1244
CXX="$CXX -mno-cygwin"
1246
MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))'
1248
# Use temp file for windres (bug 213281)
1249
RCFLAGS='-O coff --use-temp-file'
1254
AR='lib -NOLOGO -OUT:"$@"'
1256
RANLIB='echo not_ranlib'
1257
STRIP='echo not_strip'
1259
GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
1264
# Determine compiler version
1265
CC_VERSION=`"${CC}" -v 2>&1 | grep Version | sed -e 's|.* Version ||' -e 's| .*||'`
1266
_CC_MAJOR_VERSION=`echo $CC_VERSION | awk -F\. '{ print $1 }'`
1267
_CC_MINOR_VERSION=`echo $CC_VERSION | awk -F\. '{ print $2 }'`
1268
MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION}
1270
CFLAGS="$CFLAGS -W3 -nologo -GF -Gy"
1271
DLLFLAGS='-OUT:"$@"'
1274
if test -z "$MOZ_OPTIMIZE"; then
1275
CFLAGS="$CFLAGS -Od"
1278
if test -n "$USE_DEBUG_RTL"; then
1279
CFLAGS="$CFLAGS -MDd"
1281
CFLAGS="$CFLAGS -MD"
1284
if test -n "$MOZ_DEBUG"; then
1287
DEFINES="$DEFINES -U_DEBUG"
1290
if test -n "$MOZ_OPTIMIZE"; then
1291
if test -n "$MOZ_PROFILE"; then
1292
_OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Z7"
1294
if test -n "$MOZ_DEBUG_SYMBOLS"; then
1295
_OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Zi"
1297
if test -n "$MOZ_PROFILE" -o -n "$MOZ_DEBUG_SYMBOLS"; then
1298
DLLFLAGS="$DLLFLAGS -DEBUG -OPT:REF"
1299
LDFLAGS="$LDFLAGS -DEBUG -OPT:REF"
1303
if test -n "$MOZ_DEBUG"; then
1304
DLLFLAGS="$DLLFLAGS -DEBUG -DEBUGTYPE:CV"
1305
LDFLAGS="$LDFLAGS -DEBUG -DEBUGTYPE:CV"
1308
if test "$OS_TARGET" = "WINNT"; then
1309
CFLAGS="$CFLAGS -GT"
1310
if test "$CPU_ARCH" = "x86"; then
1311
CFLAGS="$CFLAGS -G5"
1313
LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
1314
LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
1316
LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
1317
LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
1321
if test -n "$USE_STATIC_TLS"; then
1322
AC_DEFINE(_PR_USE_STATIC_TLS)
1325
if test "$OS_TARGET" = "WINNT"; then
1329
# undefine WINNT as some versions of mingw gcc define it by default
1330
DEFINES="$DEFINES -UWINNT"
1331
AC_DEFINE(_PR_GLOBAL_THREADS_ONLY)
1334
if test "$CPU_ARCH" = "x86"; then
1337
CPU_ARCH_TAG=$CPU_ARCH
1340
if test -n "$USE_DEBUG_RTL"; then
1344
OS_DLLFLAGS="-nologo -DLL -SUBSYSTEM:WINDOWS"
1345
if test "$MSC_VER" = "1200" -a -z "$MOZ_DEBUG_SYMBOLS"; then
1346
OS_DLLFLAGS="$OS_DLLFLAGS -PDB:NONE"
1349
case "$OS_TARGET" in
1351
MDCPUCFG_H=_winnt.cfg
1354
MDCPUCFG_H=_win95.cfg
1357
MDCPUCFG_H=_win16.cfg
1360
AC_MSG_ERROR([Missing OS_TARGET for ${target}. Use --enable-win32-target to set.])
1364
case "$target_cpu" in
1375
AC_DEFINE(_CPU_ARCH_NOT_DEFINED)
1387
if test "$OS_RELEASE" = "2.03"; then
1388
AC_DEFINE(_PR_STAT_HAS_ST_ATIM)
1390
AC_DEFINE(_PR_STAT_HAS_ST_ATIM_UNION)
1393
if test -z "$GNU_CC"; then
1394
CFLAGS="$CFLAGS -Hnocopyr"
1395
CXXFLAGS="$CXXFLAGS -Hnocopyr"
1397
CFLAGS="$CFLAGS -fPIC -Wall"
1398
CXXFLAGS="$CXXFLAGS -fPIC -Wall"
1412
if test -z "$GNU_CC"; then
1413
CC='$(NSDEPTH)/build/hcc cc -Xa -KGnum=0 -KOlimit=4000'
1416
OS_LIBS="$OS_LIBS -lsocket -lnsl -ldl"
1425
AC_DEFINE(HAVE_BSD_FLOCK)
1427
MDCPUCFG_H=_netbsd.cfg
1428
PR_MD_CSRCS=netbsd.c
1430
DSO_CFLAGS='-fPIC -DPIC'
1431
CFLAGS="$CFLAGS -ansi -Wall"
1432
CXXFLAGS="$CXXFLAGS -ansi -Wall"
1433
MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
1435
if test -z "$OBJECT_FMT"; then
1436
if echo __ELF__ | ${CC-cc} -E - | grep -q __ELF__ 2>/dev/null; then
1439
DSO_LDOPTS='-shared'
1443
DSO_LDOPTS='-shared -Wl,-soname,$(notdir $@)'
1447
if test "$LIBRUNPATH"; then
1448
DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
1459
AC_DEFINE(HAVE_SVID_GETTOD)
1461
CFLAGS="$CFLAGS -Xa -fullwarn"
1462
CXXFLAGS="$CXXFLAGS -Xa -fullwarn"
1464
MDCPUCFG_H=_sony.cfg
1468
*-nextstep*|*-openstep*)
1471
AC_DEFINE(HAVE_BSD_FLOCK)
1472
AC_DEFINE(_POSIX_SOURCE)
1473
CFLAGS="$CFLAGS -Wall -fno-common -traditional-cpp -posix"
1474
CXXFLAGS="$CXXFLAGS -Wall -fno-common -traditional-cpp -posix"
1477
MDCPUCFG_H=_nextstep.cfg
1478
PR_MD_CSRCS=nextstep.c
1485
AC_DEFINE(_QNX_SOURCE)
1486
AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
1489
MKSHLIB='$(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(notdir $@) -o $@'
1492
OS_LIBS="$OS_LIBS -lsocket"
1493
_OPTIMIZE_FLAGS="-O1"
1494
_DEBUG_FLAGS="-gstabs"
1500
AC_DEFINE(HAVE_BSD_FLOCK)
1501
AC_DEFINE(HAVE_SOCKLEN_T)
1502
CFLAGS="$CFLAGS -ansi -Wall"
1503
CXXFLAGS="$CXXFLAGS -ansi -Wall"
1506
MDCPUCFG_H=_openbsd.cfg
1507
PR_MD_CSRCS=openbsd.c
1509
DSO_LDOPTS='-shared -fPIC'
1510
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
1516
AC_DEFINE(PR_GETIPNODE_NOT_THREADSAFE)
1517
RESOLVE_LINK_SYMBOLS=1
1519
MDCPUCFG_H=_openvms.cfg
1520
PR_MD_CSRCS=openvms.c
1521
DSO_LDOPTS='-shared -auto_symvec $(LDFLAGS)'
1522
if test -n "$MOZ_DEBUG"; then
1523
DSO_LDOPTS="$DSO_LDOPTS $_DEBUG_FLAGS"
1525
DSO_LDOPTS="$DSO_LDOPTS $_OPTIMIZE_FLAGS"
1530
SHELL_OVERRIDE="SHELL = /usr/bin/ksh"
1533
AC_DEFINE(_REENTRANT)
1534
# OSF1 and HPUX report the POLLHUP event for a socket when the
1535
# shutdown(SHUT_WR) operation is called for the remote end, even though
1536
# the socket is still writeable. Use select(), instead of poll(), to
1537
# workaround this problem.
1538
AC_DEFINE(_PR_POLL_WITH_SELECT)
1540
if echo "$OS_RELEASE" | egrep -c '(V2.0|V3.2)' 2>/dev/null ; then
1544
if test -z "$GNU_CC"; then
1545
CC="$CC -std1 -ieee_with_inexact"
1546
if test "$OS_RELEASE" != "V2.0"; then
1547
CC="$CC -readonly_strings"
1549
_OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
1550
AC_CHECK_HEADER(machine/builtins.h, AC_DEFINE(OSF1_HAVE_MACHINE_BUILTINS_H))
1552
CFLAGS="$CFLAGS -mieee"
1553
CXXFLAGS="$CXXFLAGS -mieee"
1556
if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
1557
AC_DEFINE(HAVE_INT_LOCALTIME_R)
1559
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
1560
AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
1562
if echo $OS_RELEASE | grep -c V4.0 >/dev/null; then
1563
AC_DEFINE(OSF1V4_MAP_PRIVATE_BUG)
1565
DSO_LDOPTS='-shared -all -expect_unresolved "*" -soname $(notdir $@)'
1566
MDCPUCFG_H=_osf1.cfg
1573
AC_DEFINE(_PR_NEED_H_ERRNO)
1585
AC_DEFINE(_PR_NEED_H_ERRNO)
1586
CC='cc -b elf -KPIC'
1587
CXX='$(NSDEPTH)/build/hcpp CC +.cpp +w'
1590
DSO_LDOPTS='-b elf -G'
1591
MDCPUCFG_H=_scoos.cfg
1599
AC_DEFINE(RELIANTUNIX)
1601
AC_DEFINE(HAVE_SVID_GETTOD)
1602
if echo "$OS_TEST" | grep -c 86 2>/dev/null; then
1609
if test "$GNU_CC"; then
1610
AS='$(CC) -x assembler-with-cpp'
1611
if test "$CPU_ARCH" = "mips"; then
1614
CFLAGS="$CFLAGS -Wall -Wno-format"
1617
_OPTIMIZE_FLAGS='-O -F Olimit,4000'
1620
DSO_LDOPTS='-G -z defs -h $(@:$(OBJDIR)/%.so=%.so)'
1622
if test "$OS_RELEASE" = "5.43"; then
1623
AC_DEFINE(IP_MULTICAST)
1626
OS_LIBS="$OS_LIBS -lsocket -lnsl -lresolv -ldl -lc"
1628
MDCPUCFG_H=_reliantunix.cfg
1629
PR_MD_CSRCS=reliantunix.c
1630
if test "${OS_ARCH}" = "mips"; then
1631
PR_MD_ASFILES=os_ReliantUNIX.s
1638
CFLAGS="$CFLAGS -Wall -Wno-format"
1639
if test "$USE_MDUPDATE"; then
1640
CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
1647
if test "$OS_RELEASE" = "4.1.3_U1"; then
1649
OS_LIBS="$OS_LIBS -lm"
1651
MDCPUCFG_H=_sunos4.cfg
1652
PR_MD_CSRCS=sunos4.c
1656
if test -z "$USE_USER_THREADS" && test -z "$USE_NATIVE_THREADS"; then
1665
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
1666
if test -n "$USE_64"; then
1667
MDCPUCFG_H=_solaris64.cfg
1669
MDCPUCFG_H=_solaris32.cfg
1671
PR_MD_CSRCS=solaris.c
1673
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
1674
RESOLVE_LINK_SYMBOLS=1
1675
if test -n "$GNU_CC"; then
1677
if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
1680
DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs'
1683
DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs'
1685
if test -z "$GNU_AS"; then
1686
ASFLAGS="$ASFLAGS -Wa,-P"
1688
if test -n "$GNU_CC"; then
1689
CFLAGS="$CFLAGS -Wall"
1690
CXXFLAGS="$CXXFLAGS -Wall"
1691
if test -n "$USE_MDUPDATE"; then
1692
CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
1693
CXXFLAGS="$CXXFLAGS -MDupdate \$(DEPENDENCIES)"
1696
CFLAGS="$CFLAGS -xstrconst"
1697
CXXFLAGS="$CXXFLAGS -Qoption cg -xstrconst -features=tmplife"
1698
if test -z "$MOZ_OPTIMIZE"; then
1699
CFLAGS="$CFLAGS -xs"
1700
CXXFLAGS="$CXXFLAGS -xs"
1702
_OPTIMIZE_FLAGS=-xO4
1704
if test -n "$USE_64"; then
1705
if test -n "$GNU_CC"; then
1710
CXX="$CXX -xarch=v9"
1713
if test "$OS_TEST" = "i86pc"; then
1715
CPU_ARCH_TAG=_$OS_TEST
1716
# The default debug format, DWARF (-g), is not supported by gcc
1717
# on i386-ANY-sysv4/solaris, but the stabs format is. It is
1718
# assumed that the Solaris assembler /usr/ccs/bin/as is used.
1719
# If your gcc uses GNU as, you do not need the -Wa,-s option.
1720
if test -n "$MOZ_DEBUG" && test -n "$GNU_CC"; then
1721
_DEBUG_FLAGS=-gstabs
1722
if test -z "$GNU_AS"; then
1723
_DEBUG_FLAGS="$_DEBUG_FLAGS -Wa,-s"
1727
case "${target_os}" in
1729
AC_DEFINE(_PR_NO_LARGE_FILES)
1732
AC_DEFINE(_PR_NO_LARGE_FILES)
1735
AC_DEFINE(SOLARIS2_5)
1738
AC_DEFINE(_PR_HAVE_OFF64_T)
1739
# The lfcompile64(5) man page on Solaris 2.6 says:
1740
# For applications that do not wish to conform to the POSIX or
1741
# X/Open specifications, the 64-bit transitional interfaces
1742
# are available by default. No compile-time flags need to be
1744
# But gcc 2.7.2.x fails to define _LARGEFILE64_SOURCE by default.
1745
# The native compiler, gcc 2.8.x, and egcs don't have this problem.
1746
if test -n "$GNU_CC"; then
1747
AC_DEFINE(_LARGEFILE64_SOURCE)
1751
case "${target_os}" in
1763
# Solaris 8 or higher has IPv6.
1764
AC_DEFINE(_PR_INET6)
1767
if test "$OS_TEST" = "sun4u"; then
1768
# 64-bit Solaris requires SPARC V9 architecture, so the following
1770
if test -z "$USE_64"; then
1771
ULTRASPARC_LIBRARY=nspr_flt
1774
# Purify requires that binaries linked against nspr also
1775
# be linked against -lrt (or -lposix4) so add it to OS_LIBS
1777
_librt=`echo $_rev 5.6 | awk '{ if ($1 > $2) print "-lrt"; else print "-lposix4" }'`
1778
OS_LIBS="$OS_LIBS $_librt"
1787
if echo $OS_RELEASE | grep -c 2.1 2>/dev/null; then
1788
AC_DEFINE(_PR_NO_LARGE_FILES)
1789
CC='$(NSDEPTH)/build/hcc cc'
1790
CXX='$(NSDEPTH)/build/hcpp CC'
1791
MDCPUCFG_H=_unixware.cfg
1793
AC_DEFINE(_LARGEFILE64_SOURCE)
1794
AC_DEFINE(_PR_HAVE_OFF64_T)
1795
AC_DEFINE(_PR_HAVE_SOCKADDR_LEN)
1796
MDCPUCFG_H=_unixware7.cfg
1798
PR_MD_CSRCS=unixware.c
1806
AC_DEFINE(BSD_SELECT)
1807
AC_DEFINE(TCPV40HDRS)
1815
RESOLVE_LINK_SYMBOLS=1
1818
if test -n "$GNU_CC"; then
1819
AC_DEFINE(XP_OS2_EMX)
1823
CFLAGS="$CFLAGS -Wall -Zomf"
1824
CXXFLAGS="$CFLAGS -Wall -Zomf"
1825
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
1827
DSO_LDOPTS='-Zomf -Zdll -Zmap'
1829
_OPTIMIZE_FLAGS="-O2 -s"
1830
_DEBUG_FLAGS="-g -fno-inline"
1831
if test -n "$MOZ_OPTIMIZE"; then
1832
DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
1838
# GCC for OS/2 currently predefines these, but we don't want them
1839
DEFINES="$DEFINES -Uunix -U__unix -U__unix__"
1841
# Visual Age C++ build
1842
elif test "$VACPP" = "yes"; then
1843
AC_DEFINE(XP_OS2_VACPP)
1851
AR_FLAGS='/NOL /NOI /O:$(subst /,\\,$@)'
1852
CFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9'
1853
HOST_CFLAGS="$CFLAGS"
1854
OS_CFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9'
1855
OS_EXE_CFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9'
1856
CXXFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9'
1857
OS_LIBS='so32dll.lib tcp32dll.lib'
1859
MKSHLIB='$(LD) $(DSO_LDOPTS)'
1860
IMPLIB='implib -nologo -noignorecase'
1861
FILTER='cppfilt -q -B -P'
1862
_OPTIMIZE_FLAGS='/O+ /Gl+ /qtune=pentium /qarch=pentium'
1863
_DEBUG_FLAGS='/Ti+ '
1864
LDFLAGS='/NOL /M /L'
1865
DLLFLAGS='/O:$@ /DLL /INC:_dllentry /MAP:$(@:.dll=.map) /L /NOL'
1866
EXEFLAGS='/OUT:$@ /PMTYPE:VIO /MAP:$(@:.exe=.map) /L /NOL'
1867
if test -n "$MOZ_DEBUG"; then
1868
LDFLAGS="$LDFLAGS /DE"
1869
DLLFLAGS="$DLLFLAGS /DE"
1870
EXEFLAGS="$EXEFLAGS /DE"
1872
if test -n "$MOZ_OPTIMIZE"; then
1873
LDFLAGS="$LDFLAGS /OPTFUNC /EXEPACK:2 /PACKCODE /PACKDATA"
1874
DLLFLAGS="$DLLFLAGS /OPTFUNC /EXEPACK:2 /PACKCODE /PACKDATA"
1875
EXEFLAGS="$EXEFLAGS /OPTFUNC /EXEPACK:2 /PACKCODE /PACKDATA"
1877
LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
1878
LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
1888
if test -z "$SKIP_LIBRARY_CHECKS"; then
1889
dnl ========================================================
1890
dnl Check for system libraries
1891
dnl ========================================================
1892
dnl AC_CHECK_LIB(C, main)
1893
dnl AC_CHECK_LIB(C_r, main)
1894
dnl AC_CHECK_LIB(c, main)
1895
dnl AC_CHECK_LIB(c_r, main)
1896
dnl AC_CHECK_LIB(dce, main)
1897
dnl AC_CHECK_LIB(dl, main)
1898
dnl AC_CHECK_LIB(dld, main)
1899
dnl AC_CHECK_LIB(gen, main)
1900
dnl AC_CHECK_LIB(ip6, main)
1901
dnl AC_CHECK_LIB(l, main)
1902
dnl AC_CHECK_LIB(m, main)
1903
dnl AC_CHECK_LIB(nsl, main)
1904
dnl AC_CHECK_LIB(posix4, main)
1905
dnl AC_CHECK_LIB(prstrms, main)
1906
dnl AC_CHECK_LIB(prstrms_shr, main)
1907
dnl AC_CHECK_LIB(pthread, main)
1908
dnl AC_CHECK_LIB(pthreads, main)
1909
dnl AC_CHECK_LIB(resolv, main)
1910
dnl AC_CHECK_LIB(rt, main)
1911
dnl AC_CHECK_LIB(socket, main)
1912
dnl AC_CHECK_LIB(svld, main)
1913
dnl AC_CHECK_LIB(thread, main)
1914
dnl AC_CHECK_LIB(vms_jackets, main)
1917
dnl We don't want anything to link with libdl even if it's present on OS X,
1918
dnl since it's not used and not part of the default installation.
1924
AC_CHECK_LIB(dl, dlopen,
1925
AC_CHECK_HEADER(dlfcn.h,
1926
OS_LIBS="-ldl $OS_LIBS"))
1931
dnl ========================================================
1932
dnl Check for system header files.
1933
dnl ========================================================
1934
dnl AC_HEADER_DIRENT
1936
dnl AC_HEADER_SYS_WAIT
1937
dnl AC_CHECK_HEADERS(fcntl.h limits.h sys/file.h sys/ioctl.h sys/time.h unistd.h)
1939
dnl ========================================================
1940
dnl Check for typedefs and structs
1941
dnl ========================================================
1948
dnl AC_STRUCT_ST_BLKSIZE
1949
dnl AC_STRUCT_ST_BLOCKS
1950
dnl AC_STRUCT_ST_RDEV
1954
dnl ========================================================
1955
dnl Checks for library functions.
1956
dnl ========================================================
1957
AC_PROG_GCC_TRADITIONAL
1958
AC_CHECK_FUNCS(lchown strerror)
1962
dnl AC_FUNC_SETVBUF_REVERSED
1964
dnl AC_FUNC_STRFTIME
1965
dnl AC_FUNC_UTIME_NULL
1967
dnl AC_CHECK_FUNCS(ftime getcwd gethostname gettimeofday getwd mkdir mktime putenv rmdir select socket strdup strerror strstr strtol strtoul uname)
1969
dnl ========================================================
1971
dnl ========================================================
1973
dnl ========================================================
1975
dnl = --enable-strip
1977
dnl = Enable stripping of libs and executables
1979
dnl ========================================================
1980
AC_ARG_ENABLE(strip,
1981
[ --enable-strip Enable stripping of shared libs and programs],
1982
[ if test "$enableval" = "yes"; then
1986
dnl Check for hpux options
1987
case "${target_os}" in
1989
if test -z "$GNU_CC"; then
1991
AC_CACHE_CHECK(for +Olit support,
1992
ac_cv_hpux_usable_olit_option,
1993
dnl since aCC doesn't throw an error on invalid options,
1994
dnl we have to test this the hard way
1995
[ac_cv_hpux_usable_olit_option=no
1997
echo 'int main() { return 0; }' | cat > conftest.c
1998
${CC-cc} ${CFLAGS} +Olit=all -o conftest conftest.c > conftest.out 2>&1
1999
if test $? -eq 0; then
2000
if test -z "`egrep -i '(unrecognize|unknown)' conftest.out`"; then
2001
ac_cv_hpux_usable_olit_option=yes
2007
if test "$ac_cv_hpux_usable_olit_option" = "yes"; then
2008
CFLAGS="$CFLAGS +Olit=all"
2009
CXXFLAGS="$CXXFLAGS +Olit=all"
2011
CFLAGS="$CFLAGS +ESlit"
2012
CXXFLAGS="$CXXFLAGS +ESlit"
2019
dnl Apparently, some systems cannot properly check for the pthread
2020
dnl library unless <pthread.h> is included so we need to test
2023
dnl MOZ_CHECK_PTHREADS(lib, success, failure)
2024
AC_DEFUN(MOZ_CHECK_PTHREADS,
2026
AC_MSG_CHECKING([for pthread_create in -l$1])
2028
#include <pthread.h>
2029
void *foo(void *v) { return v; }
2032
if (!pthread_create(&t, 0, &foo, 0)) {
2037
echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -l[$1] $LDFLAGS $LIBS" 1>&5;
2038
${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -l[$1] $LDFLAGS $LIBS 2>&5;
2040
rm -f dummy.c dummy${ac_exeext} ;
2041
if test "$_res" = "0"; then
2042
AC_MSG_RESULT([yes])
2050
MOZ_CHECK_PTHREADS(pthreads,
2051
_HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads",
2052
MOZ_CHECK_PTHREADS(pthread,
2053
_HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread",
2054
MOZ_CHECK_PTHREADS(c_r,
2055
_HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r",
2056
MOZ_CHECK_PTHREADS(c,
2063
AC_ARG_WITH(pthreads,
2064
[ --with-pthreads Use system pthreads library as thread subsystem],
2065
[ if test "$withval" = "yes"; then
2066
if test -n "$_HAVE_PTHREADS"; then
2071
AC_MSG_ERROR([ --with-pthreads specified for a system without pthread support ]);
2077
[ if test -n "$_HAVE_PTHREADS" && test -z "$USE_USER_PTHREADS" && test -z "$USE_NSPR_THREADS"; then
2083
AC_ARG_ENABLE(user-pthreads,
2084
[ --enable-user-pthreads Build using userland pthreads],
2085
[ if test "$enableval" = "yes"; then
2086
if test -n "$_HAVE_PTHREADS"; then
2091
AC_MSG_ERROR([ --enable-user-pthreads specified for a system without pthread support ]);
2095
AC_ARG_ENABLE(nspr-threads,
2096
[ --enable-nspr-threads Build using classic nspr threads],
2097
[ if test "$enableval" = "yes"; then
2105
AC_ARG_WITH(bthreads,
2106
[ --with-bthreads Use system bthreads library as thread subsystem (BeOS only)],
2107
[ if test "$withval" = "yes"; then
2115
AC_ARG_WITH(native-threads,
2116
[ --with-native-threads Use native system threads as thread subsystem (Solaris only)],
2117
[ if test "$withval" = "yes"; then
2118
USE_NATIVE_THREADS=1
2125
fi # SKIP_LIBRARY_CHECKS
2127
AC_ARG_ENABLE(cplus,
2128
[ --enable-cplus Enable some c++ api routines],
2129
[ if test "$enableval" = "yes"; then
2134
[ --enable-ipv6 Compile ipv6 support],
2135
[ if test "$enableval" = "yes"; then
2142
AC_ARG_ENABLE(boehm,
2143
[ --enable-boehm Enable the Boehm Garbage Collector],
2144
[ if test "$enableval" = "yes"; then
2145
AC_DEFINE(GC_LEAK_DETECTOR)
2149
if test -n "$USE_PTHREADS"; then
2150
dnl See if -pthread is supported.
2152
ac_cv_have_dash_pthread=no
2153
AC_MSG_CHECKING(whether ${CC-cc} accepts -pthread)
2154
echo 'int main() { return 0; }' | cat > conftest.c
2155
${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
2156
if test $? -eq 0; then
2157
if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
2158
ac_cv_have_dash_pthread=yes
2159
case "$target_os" in
2161
# Freebsd doesn't use -pthread for compiles, it uses them for linking
2164
CFLAGS="$CFLAGS -pthread"
2165
CXXFLAGS="$CXXFLAGS -pthread"
2171
AC_MSG_RESULT($ac_cv_have_dash_pthread)
2174
dnl See if -pthreads is supported.
2176
ac_cv_have_dash_pthreads=no
2177
if test "$ac_cv_have_dash_pthread" = "no"; then
2178
AC_MSG_CHECKING(whether ${CC-cc} accepts -pthreads)
2179
echo 'int main() { return 0; }' | cat > conftest.c
2180
${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
2181
if test $? -eq 0; then
2182
if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
2183
ac_cv_have_dash_pthreads=yes
2184
CFLAGS="$CFLAGS -pthreads"
2185
CXXFLAGS="$CXXFLAGS -pthreads"
2189
AC_MSG_RESULT($ac_cv_have_dash_pthreads)
2194
if test "$ac_cv_have_dash_pthreads" = "yes"; then
2199
AC_DEFINE(_REENTRANT)
2200
AC_DEFINE(_THREAD_SAFE)
2201
dnl -pthread links in -lc_r, so don't specify it explicitly.
2202
if test "$ac_cv_have_dash_pthread" = "yes"; then
2203
_PTHREAD_LDFLAGS="-pthread"
2205
_PTHREAD_LDFLAGS="-lc_r"
2209
if test "$ac_cv_have_dash_pthread" = "yes"; then
2210
_PTHREAD_LDFLAGS="-pthread"
2214
AC_DEFINE(_THREAD_SAFE)
2215
dnl -pthread links in -lc_r, so don't specify it explicitly.
2216
if test "$ac_cv_have_dash_pthread" = "yes"; then
2221
if test "$ac_cv_have_dash_pthread" = "yes"; then
2222
_PTHREAD_LDFLAGS=-pthread
2226
AC_DEFINE(_REENTRANT)
2231
if test -n "$USE_USER_PTHREADS"; then
2238
dnl Special thread exceptions
2242
if test -n "$USE_NSPR_THREADS"; then
2243
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
2245
case "$target_os" in
2247
if test -z "$USE_PTHREADS"; then
2248
AC_DEFINE(AIX_RENAME_SELECT)
2252
if test -z "$USE_NSPR_THREADS"; then
2253
AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
2257
if test -z "$USE_NSPR_THREADS"; then
2258
AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
2260
if test -n "$USE_PTHREADS"; then
2261
AC_DEFINE(_PR_HAVE_THREADSAFE_GETHOST)
2265
if test -z "$USE_NSPR_THREADS"; then
2266
AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
2268
if test -n "$USE_PTHREADS"; then
2269
AC_DEFINE(_PR_HAVE_THREADSAFE_GETHOST)
2275
if test -n "$USE_PTHREADS"; then
2276
AC_DEFINE(_PR_NEED_PTHREAD_INIT)
2280
if test -n "$USE_NSPR_THREADS"; then
2281
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
2285
if test -n "$USE_NSPR_THREADS"; then
2286
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
2288
if test "$USE_PTHREADS"; then
2289
if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
2290
AC_DEFINE(_REENTRANT)
2291
AC_DEFINE(_PR_DCETHREADS)
2293
AC_DEFINE_UNQUOTED(_POSIX_C_SOURCE,199506L)
2294
AC_DEFINE(_PR_HAVE_THREADSAFE_GETHOST)
2297
if test "$USE_USER_PTHREADS"; then
2298
AC_DEFINE_UNQUOTED(_POSIX_C_SOURCE,199506L)
2302
if test "${target_os}" = "irix6.5"; then
2303
if test -n "$USE_PTHREADS"; then
2304
AC_DEFINE(_PR_HAVE_GETHOST_R)
2305
AC_DEFINE(_PR_HAVE_GETHOST_R_POINTER)
2310
if test -n "$USE_NSPR_THREADS"; then
2311
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
2314
*-mingw*|*-cygwin*|*-msvc*|*-mks*)
2315
dnl win32 does not use pthreads
2320
*-netbsd*|*-openbsd*)
2321
if test -n "$USE_NSPR_THREADS"; then
2322
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
2326
if test -n "$USE_NSPR_THREADS"; then
2327
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
2329
if test -n "$USE_PTHREADS"; then
2330
if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
2333
AC_DEFINE(_PR_HAVE_THREADSAFE_GETHOST)
2338
if test -n "$USE_NATIVE_THREADS"; then
2339
AC_DEFINE(_PR_GLOBAL_THREADS_ONLY)
2341
if test -n "$USE_NSPR_THREADS"; then
2342
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
2345
if test -z "$USE_NSPR_THREADS"; then
2346
AC_DEFINE(_REENTRANT)
2347
AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
2348
if test "$OS_TEST" = "i86pc"; then
2349
PR_MD_ASFILES=os_SunOS_x86.s
2351
PR_MD_ASFILES=os_SunOS.s
2352
if test -n "$USE_64"; then
2353
PR_MD_ASFILES="$PR_MD_ASFILES os_SunOS_sparcv9.s"
2359
if test -n "$USE_PTHREADS"; then
2360
AC_DEFINE(_PR_HAVE_GETHOST_R)
2361
AC_DEFINE(_PR_HAVE_GETHOST_R_POINTER)
2366
OS_LIBS="$_PTHREAD_LDFLAGS $OS_LIBS"
2368
dnl If the user passed in arg to --enable-optimize,
2369
dnl make sure that we use it.
2370
if test -n "$_SAVE_OPTIMIZE_FLAGS"; then
2371
_OPTIMIZE_FLAGS="$_SAVE_OPTIMIZE_FLAGS"
2374
if test -n "$MOZ_OPTIMIZE"; then
2375
CFLAGS="$CFLAGS $_OPTIMIZE_FLAGS"
2376
CXXFLAGS="$CXXFLAGS $_OPTIMIZE_FLAGS"
2379
if test -n "$MOZ_DEBUG"; then
2380
CFLAGS="$CFLAGS $_DEBUG_FLAGS"
2381
CXXFLAGS="$CXXFLAGS $_DEBUG_FLAGS"
2384
if test -n "$MOZ_OPTIMIZE"; then
2390
if test -n "$USE_64"; then
2394
RELEASE_OBJDIR_NAME="${OS_CONFIG}${CPU_ARCH_TAG}${COMPILER_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}.${OBJDIR_SUFFIX}"
2396
dnl ========================================================
2397
dnl Use cygwin wrapper for win32 builds
2398
dnl ========================================================
2399
case "$target_os" in
2400
mingw*|cygwin*|msvc*|mks*)
2401
CC="\$(CYGWIN_WRAPPER) $CC"
2402
CXX="\$(CYGWIN_WRAPPER) $CXX"
2403
RC="\$(CYGWIN_WRAPPER) $RC"
2407
dnl ========================================================
2408
dnl Substitution of found variables.
2409
dnl ========================================================
2410
AC_SUBST(SHELL_OVERRIDE)
2412
AC_SUBST(MOZILLA_CLIENT)
2419
AC_SUBST(HOST_CFLAGS)
2422
AC_SUBST(GCC_USE_GNU_LD)
2424
AC_SUBST(CROSS_COMPILE)
2426
AC_SUBST(MOZ_OPTIMIZE)
2432
AC_SUBST(OBJECT_MODE)
2433
AC_SUBST(GC_LEAK_DETECTOR)
2434
AC_SUBST(ENABLE_STRIP)
2436
AC_SUBST(USE_PTHREADS)
2437
AC_SUBST(USE_BTHREADS)
2438
AC_SUBST(USE_USER_PTHREADS)
2439
AC_SUBST(USE_NATIVE_THREADS)
2440
AC_SUBST(USE_NSPR_THREADS)
2445
AC_SUBST(MOD_MAJOR_VERSION)
2446
AC_SUBST(MOD_MINOR_VERSION)
2447
AC_SUBST(MOD_PATCH_VERSION)
2448
AC_SUBST(NSPR_MODNAME)
2449
AC_SUBST(MDCPUCFG_H)
2450
AC_SUBST(PR_MD_CSRCS)
2451
AC_SUBST(PR_MD_ASFILES)
2452
AC_SUBST(PR_MD_ARCH_DIR)
2455
AC_SUBST(OBJ_SUFFIX)
2456
AC_SUBST(LIB_SUFFIX)
2457
AC_SUBST(DLL_SUFFIX)
2458
AC_SUBST(ASM_SUFFIX)
2460
AC_SUBST(DSO_CFLAGS)
2461
AC_SUBST(DSO_LDOPTS)
2465
AC_SUBST(OS_RELEASE)
2467
AC_SUBST(MACOS_DEPLOYMENT_TARGET)
2483
AC_SUBST(RESOLVE_LINK_SYMBOLS)
2484
AC_SUBST(AIX_LINK_OPTS)
2485
AC_SUBST(NOSUCHFILE)
2486
AC_SUBST(MOZ_OBJFORMAT)
2487
AC_SUBST(ULTRASPARC_LIBRARY)
2490
AC_SUBST(OBJDIR_NAME)
2491
AC_SUBST(RELEASE_OBJDIR_NAME)
2498
AC_SUBST(OS_DLLFLAGS)
2499
AC_SUBST(CYGWIN_WRAPPER)
2501
dnl ========================================================
2502
dnl Generate output files.
2503
dnl ========================================================
2514
lib/libc/include/Makefile
2515
lib/libc/src/Makefile
2519
pkg/solaris/Makefile
2520
pkg/solaris/SUNWpr/Makefile
2521
pkg/solaris/SUNWprx/Makefile
2524
pr/include/md/Makefile
2525
pr/include/obsolete/Makefile
2526
pr/include/private/Makefile
2529
pr/src/linking/Makefile
2530
pr/src/malloc/Makefile
2532
pr/src/md/${PR_MD_ARCH_DIR}/Makefile
2533
pr/src/memory/Makefile
2534
pr/src/misc/Makefile
2535
pr/src/threads/Makefile
2537
pr/tests/dll/Makefile
2540
dnl lib/tests/Makefile
2541
dnl pr/tests/w16gui/Makefile
2544
if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then
2545
MAKEFILES="$MAKEFILES pr/src/threads/combined/Makefile"
2546
elif test -n "$USE_PTHREADS"; then
2547
MAKEFILES="$MAKEFILES pr/src/pthreads/Makefile"
2548
elif test -n "$USE_BTHREADS"; then
2549
MAKEFILES="$MAKEFILES pr/src/bthreads/Makefile"
2552
if test -n "$USE_CPLUS"; then
2553
MAKEFILES="$MAKEFILES pr/src/cplus/Makefile pr/src/cplus/tests/Makefile"
2556
AC_OUTPUT([$MAKEFILES], [chmod +x config/nspr-config])