зеркало из https://github.com/mozilla/pjs.git
Moved darwin section to proper platform location.
Added note about why -traditional-cpp is used for darwin. Added Mac OSX linker options to be used in darwin builds. Bug #106617
This commit is contained in:
Родитель
307509f6a0
Коммит
2e19b186c3
|
@ -3100,6 +3100,44 @@ EOF
|
|||
|
||||
;;
|
||||
|
||||
*-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 -pipe"
|
||||
if echo $OS_TEST | grep -c 86 2>/dev/null; then
|
||||
CFLAGS="$CFLAGS -mno-486"
|
||||
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/$@'
|
||||
# Use the standard preprocessor (cpp)
|
||||
CFLAGS="$CFLAGS -traditional-cpp"
|
||||
MKSHLIB='$(CC) -arch $(CPU_ARCH) $(DSO_LDOPTS) -o $@'
|
||||
DLL_SUFFIX=dylib
|
||||
USE_PTHREADS=1
|
||||
MDCPUCFG_H=_darwin.cfg
|
||||
PR_MD_CSRCS=darwin.c
|
||||
;;
|
||||
|
||||
*-dgux*)
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define XP_UNIX 1
|
||||
|
@ -4012,17 +4050,17 @@ EOF
|
|||
|
||||
ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
|
||||
echo "configure:4016: checking for machine/builtins.h" >&5
|
||||
echo "configure:4054: 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 4021 "configure"
|
||||
#line 4059 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <machine/builtins.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:4026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:4064: \"$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*
|
||||
|
@ -4103,42 +4141,6 @@ EOF
|
|||
PR_MD_CSRCS=qnx.c
|
||||
;;
|
||||
|
||||
*-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 -pipe"
|
||||
if echo $OS_TEST | grep -c 86 2>/dev/null; then
|
||||
CFLAGS="$CFLAGS -mno-486"
|
||||
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'
|
||||
MKSHLIB='$(CC) -arch $(CPU_ARCH) $(DSO_LDOPTS) -o $@'
|
||||
DLL_SUFFIX=dylib
|
||||
USE_PTHREADS=1
|
||||
MDCPUCFG_H=_darwin.cfg
|
||||
PR_MD_CSRCS=darwin.c
|
||||
;;
|
||||
|
||||
*-*-sco*)
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define XP_UNIX 1
|
||||
|
@ -4569,12 +4571,12 @@ esac
|
|||
if test -z "$SKIP_LIBRARY_CHECKS"; then
|
||||
|
||||
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
|
||||
echo "configure:4573: checking for dlopen" >&5
|
||||
echo "configure:4575: checking for dlopen" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4578 "configure"
|
||||
#line 4580 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char dlopen(); below. */
|
||||
|
@ -4597,7 +4599,7 @@ dlopen();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:4603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_dlopen=yes"
|
||||
else
|
||||
|
@ -4616,7 +4618,7 @@ else
|
|||
echo "$ac_t""no" 1>&6
|
||||
|
||||
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
|
||||
echo "configure:4620: checking for dlopen in -ldl" >&5
|
||||
echo "configure:4622: 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
|
||||
|
@ -4624,7 +4626,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-ldl $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4628 "configure"
|
||||
#line 4630 "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
|
||||
|
@ -4635,7 +4637,7 @@ int main() {
|
|||
dlopen()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:4641: \"$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
|
||||
|
@ -4663,13 +4665,13 @@ fi
|
|||
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
|
||||
echo "configure:4667: checking whether ${CC-cc} needs -traditional" >&5
|
||||
echo "configure:4669: 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 4673 "configure"
|
||||
#line 4675 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sgtty.h>
|
||||
Autoconf TIOCGETP
|
||||
|
@ -4687,7 +4689,7 @@ rm -f conftest*
|
|||
|
||||
if test $ac_cv_prog_gcc_traditional = no; then
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4691 "configure"
|
||||
#line 4693 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <termio.h>
|
||||
Autoconf TCGETA
|
||||
|
@ -4711,12 +4713,12 @@ fi
|
|||
for ac_func in lchown strerror
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:4715: checking for $ac_func" >&5
|
||||
echo "configure:4717: 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 4720 "configure"
|
||||
#line 4722 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
|
@ -4739,7 +4741,7 @@ $ac_func();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:4745: \"$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
|
||||
|
@ -4777,7 +4779,7 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
|
||||
echo "configure:4781: checking for pthread_create in -lpthreads" >&5
|
||||
echo "configure:4783: checking for pthread_create in -lpthreads" >&5
|
||||
echo "
|
||||
#include <pthread.h>
|
||||
void *foo(void *v) { int a = 1; }
|
||||
|
@ -4799,7 +4801,7 @@ echo "
|
|||
echo "$ac_t""no" 1>&6
|
||||
|
||||
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
|
||||
echo "configure:4803: checking for pthread_create in -lpthread" >&5
|
||||
echo "configure:4805: checking for pthread_create in -lpthread" >&5
|
||||
echo "
|
||||
#include <pthread.h>
|
||||
void *foo(void *v) { int a = 1; }
|
||||
|
@ -4821,7 +4823,7 @@ echo "
|
|||
echo "$ac_t""no" 1>&6
|
||||
|
||||
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
|
||||
echo "configure:4825: checking for pthread_create in -lc_r" >&5
|
||||
echo "configure:4827: checking for pthread_create in -lc_r" >&5
|
||||
echo "
|
||||
#include <pthread.h>
|
||||
void *foo(void *v) { int a = 1; }
|
||||
|
@ -4843,7 +4845,7 @@ echo "
|
|||
echo "$ac_t""no" 1>&6
|
||||
|
||||
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
|
||||
echo "configure:4847: checking for pthread_create in -lc" >&5
|
||||
echo "configure:4849: checking for pthread_create in -lc" >&5
|
||||
echo "
|
||||
#include <pthread.h>
|
||||
void *foo(void *v) { int a = 1; }
|
||||
|
@ -4993,7 +4995,7 @@ 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:4997: checking whether ${CC-cc} accepts -pthread" >&5
|
||||
echo "configure:4999: 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
|
||||
|
@ -5009,7 +5011,7 @@ echo "configure:4997: checking whether ${CC-cc} accepts -pthread" >&5
|
|||
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:5013: checking whether ${CC-cc} accepts -pthreads" >&5
|
||||
echo "configure:5015: 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
|
||||
|
@ -5483,7 +5485,7 @@ s%\[%\\&%g
|
|||
s%\]%\\&%g
|
||||
s%\$%$$%g
|
||||
EOF
|
||||
DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' ' | tr '\015' ' '`
|
||||
DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '| tr '\015' ' '`
|
||||
rm -f conftest.defs
|
||||
|
||||
|
||||
|
|
|
@ -784,6 +784,29 @@ case "$target" in
|
|||
|
||||
;;
|
||||
|
||||
*-darwin*)
|
||||
AC_DEFINE(XP_UNIX)
|
||||
AC_DEFINE(DARWIN)
|
||||
AC_DEFINE(HAVE_BSD_FLOCK)
|
||||
CFLAGS="$CFLAGS -Wmost -fno-common -pipe"
|
||||
if echo $OS_TEST | grep -c 86 2>/dev/null; then
|
||||
CFLAGS="$CFLAGS -mno-486"
|
||||
AC_DEFINE(i386)
|
||||
CPU_ARCH=i386
|
||||
else
|
||||
AC_DEFINE(ppc)
|
||||
CPU_ARCH=ppc
|
||||
fi
|
||||
DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@'
|
||||
# Use the standard preprocessor (cpp)
|
||||
CFLAGS="$CFLAGS -traditional-cpp"
|
||||
MKSHLIB='$(CC) -arch $(CPU_ARCH) $(DSO_LDOPTS) -o $@'
|
||||
DLL_SUFFIX=dylib
|
||||
USE_PTHREADS=1
|
||||
MDCPUCFG_H=_darwin.cfg
|
||||
PR_MD_CSRCS=darwin.c
|
||||
;;
|
||||
|
||||
*-dgux*)
|
||||
AC_DEFINE(XP_UNIX)
|
||||
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
|
||||
|
@ -1417,27 +1440,6 @@ mips-sony-newsos*)
|
|||
PR_MD_CSRCS=qnx.c
|
||||
;;
|
||||
|
||||
*-darwin*)
|
||||
AC_DEFINE(XP_UNIX)
|
||||
AC_DEFINE(DARWIN)
|
||||
AC_DEFINE(HAVE_BSD_FLOCK)
|
||||
CFLAGS="$CFLAGS -Wmost -fno-common -pipe"
|
||||
if echo $OS_TEST | grep -c 86 2>/dev/null; then
|
||||
CFLAGS="$CFLAGS -mno-486"
|
||||
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'
|
||||
MKSHLIB='$(CC) -arch $(CPU_ARCH) $(DSO_LDOPTS) -o $@'
|
||||
DLL_SUFFIX=dylib
|
||||
USE_PTHREADS=1
|
||||
MDCPUCFG_H=_darwin.cfg
|
||||
PR_MD_CSRCS=darwin.c
|
||||
;;
|
||||
|
||||
*-*-sco*)
|
||||
AC_DEFINE(XP_UNIX)
|
||||
AC_DEFINE(SCO)
|
||||
|
|
Загрузка…
Ссылка в новой задаче