Added use of OS_* & LDFLAGS variables to autoconf build.
This commit is contained in:
Родитель
3cde9b048d
Коммит
feae1488f9
|
@ -35,6 +35,7 @@ RC = $(WINDRES)
|
|||
OS_CFLAGS = @CFLAGS@ $(DSO_CFLAGS)
|
||||
OS_CXXFLAGS = @CXXFLAGS@ $(DSO_CFLAGS)
|
||||
OS_LIBS = @OS_LIBS@
|
||||
OS_LDFLAGS = @LDFLAGS@
|
||||
|
||||
MKSHLIB = @MKSHLIB@
|
||||
DSO_CFLAGS = @DSO_CFLAGS@
|
||||
|
@ -53,6 +54,11 @@ PR_MD_CSRCS = @PR_MD_CSRCS@
|
|||
PR_MD_ASFILES = @PR_MD_ASFILES@
|
||||
PR_MD_ARCH_DIR = @PR_MD_ARCH_DIR@
|
||||
|
||||
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@
|
||||
|
|
|
@ -2271,6 +2271,11 @@ PR_MD_CSRCS=
|
|||
PR_MD_ARCH_DIR=unix
|
||||
AR_FLAGS='cr $@'
|
||||
|
||||
OS_TARGET=`uname -s`
|
||||
OS_ARCH=`uname -s | sed -e 's|/|_|g'`
|
||||
OS_RELEASE=`uname -r`
|
||||
OS_TEST=`uname -m`
|
||||
|
||||
case "$host" in
|
||||
*-mingw*)
|
||||
;;
|
||||
|
@ -2987,7 +2992,7 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
||||
echo "configure:2991: checking how to run the C preprocessor" >&5
|
||||
echo "configure:2996: checking how to run the C preprocessor" >&5
|
||||
# On Suns, sometimes $CPP names a directory.
|
||||
if test -n "$CPP" && test -d "$CPP"; then
|
||||
CPP=
|
||||
|
@ -3002,13 +3007,13 @@ else
|
|||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3006 "configure"
|
||||
#line 3011 "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:3012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:3017: \"$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
|
||||
:
|
||||
|
@ -3019,13 +3024,13 @@ else
|
|||
rm -rf conftest*
|
||||
CPP="${CC-cc} -E -traditional-cpp"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3023 "configure"
|
||||
#line 3028 "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:3029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:3034: \"$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
|
||||
:
|
||||
|
@ -3036,13 +3041,13 @@ else
|
|||
rm -rf conftest*
|
||||
CPP="${CC-cc} -nologo -E"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3040 "configure"
|
||||
#line 3045 "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:3046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:3051: \"$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
|
||||
:
|
||||
|
@ -3068,13 +3073,13 @@ echo "$ac_t""$CPP" 1>&6
|
|||
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
|
||||
echo "configure:3072: checking whether ${CC-cc} needs -traditional" >&5
|
||||
echo "configure:3077: 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 3078 "configure"
|
||||
#line 3083 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sgtty.h>
|
||||
Autoconf TIOCGETP
|
||||
|
@ -3092,7 +3097,7 @@ rm -f conftest*
|
|||
|
||||
if test $ac_cv_prog_gcc_traditional = no; then
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3096 "configure"
|
||||
#line 3101 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <termio.h>
|
||||
Autoconf TCGETA
|
||||
|
@ -3116,12 +3121,12 @@ fi
|
|||
for ac_func in lchown strerror
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:3120: checking for $ac_func" >&5
|
||||
echo "configure:3125: 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 3125 "configure"
|
||||
#line 3130 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
|
@ -3144,7 +3149,7 @@ $ac_func();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3153: \"$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
|
||||
|
@ -3171,10 +3176,8 @@ done
|
|||
|
||||
|
||||
|
||||
OS_LIBS=
|
||||
|
||||
echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6
|
||||
echo "configure:3178: checking for pthread_attr_init in -lpthread" >&5
|
||||
echo "configure:3181: checking for pthread_attr_init in -lpthread" >&5
|
||||
ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -3182,7 +3185,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lpthread $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3186 "configure"
|
||||
#line 3189 "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
|
||||
|
@ -3193,7 +3196,7 @@ int main() {
|
|||
pthread_attr_init()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3200: \"$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
|
||||
|
@ -3212,7 +3215,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6
|
||||
echo "configure:3216: checking for pthread_attr_init in -lc_r" >&5
|
||||
echo "configure:3219: checking for pthread_attr_init in -lc_r" >&5
|
||||
ac_lib_var=`echo c_r'_'pthread_attr_init | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -3220,7 +3223,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lc_r $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3224 "configure"
|
||||
#line 3227 "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
|
||||
|
@ -3231,7 +3234,7 @@ int main() {
|
|||
pthread_attr_init()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3238: \"$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
|
||||
|
@ -3250,7 +3253,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
echo $ac_n "checking for pthread_attr_init in -lc""... $ac_c" 1>&6
|
||||
echo "configure:3254: checking for pthread_attr_init in -lc" >&5
|
||||
echo "configure:3257: checking for pthread_attr_init in -lc" >&5
|
||||
ac_lib_var=`echo c'_'pthread_attr_init | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -3258,7 +3261,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lc $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3262 "configure"
|
||||
#line 3265 "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
|
||||
|
@ -3269,7 +3272,7 @@ int main() {
|
|||
pthread_attr_init()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3276: \"$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
|
||||
|
@ -3396,7 +3399,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:3400: checking whether ${CC-cc} accepts -pthread" >&5
|
||||
echo "configure:3403: 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
|
||||
|
@ -3466,12 +3469,12 @@ EOF
|
|||
esac
|
||||
|
||||
echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
|
||||
echo "configure:3470: checking for pthread_create" >&5
|
||||
echo "configure:3473: checking for pthread_create" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3475 "configure"
|
||||
#line 3478 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char pthread_create(); below. */
|
||||
|
@ -3494,7 +3497,7 @@ pthread_create();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_pthread_create=yes"
|
||||
else
|
||||
|
@ -3513,7 +3516,7 @@ else
|
|||
echo "$ac_t""no" 1>&6
|
||||
|
||||
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
|
||||
echo "configure:3517: checking for pthread_create in -lpthread" >&5
|
||||
echo "configure:3520: checking for pthread_create in -lpthread" >&5
|
||||
ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -3521,7 +3524,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lpthread $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3525 "configure"
|
||||
#line 3528 "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
|
||||
|
@ -3532,7 +3535,7 @@ int main() {
|
|||
pthread_create()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3539: \"$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
|
||||
|
@ -3631,12 +3634,12 @@ EOF
|
|||
esac
|
||||
|
||||
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
|
||||
echo "configure:3635: checking for dlopen" >&5
|
||||
echo "configure:3638: 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 3640 "configure"
|
||||
#line 3643 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char dlopen(); below. */
|
||||
|
@ -3659,7 +3662,7 @@ dlopen();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3666: \"$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
|
||||
|
@ -3678,7 +3681,7 @@ else
|
|||
echo "$ac_t""no" 1>&6
|
||||
|
||||
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
|
||||
echo "configure:3682: checking for dlopen in -ldl" >&5
|
||||
echo "configure:3685: 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
|
||||
|
@ -3686,7 +3689,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-ldl $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3690 "configure"
|
||||
#line 3693 "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
|
||||
|
@ -3697,7 +3700,7 @@ int main() {
|
|||
dlopen()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3704: \"$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
|
||||
|
@ -3722,9 +3725,6 @@ fi
|
|||
|
||||
|
||||
EXTRA_LIBS=
|
||||
if test "$enable_shared" = no; then
|
||||
EXTRA_LIBS="$OS_LIBS"
|
||||
fi
|
||||
|
||||
if test -n "$MOZ_OPTIMIZE"; then
|
||||
CFLAGS="$CFLAGS $_OPTIMIZE_FLAGS"
|
||||
|
@ -3783,6 +3783,12 @@ fi
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -4033,6 +4039,10 @@ s%@DLL_SUFFIX@%$DLL_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%@DEFINES@%$DEFINES%g
|
||||
s%@AR_FLAGS@%$AR_FLAGS%g
|
||||
s%@ASFLAGS@%$ASFLAGS%g
|
||||
|
|
|
@ -238,6 +238,11 @@ PR_MD_CSRCS=
|
|||
PR_MD_ARCH_DIR=unix
|
||||
AR_FLAGS='cr $@'
|
||||
|
||||
OS_TARGET=`uname -s`
|
||||
OS_ARCH=`uname -s | sed -e 's|/|_|g'`
|
||||
OS_RELEASE=`uname -r`
|
||||
OS_TEST=`uname -m`
|
||||
|
||||
dnl ========================================================
|
||||
dnl Override of system specific host options
|
||||
dnl ========================================================
|
||||
|
@ -774,8 +779,6 @@ dnl ========================================================
|
|||
dnl Check options
|
||||
dnl ========================================================
|
||||
|
||||
OS_LIBS=
|
||||
|
||||
AC_CHECK_LIB(pthread, pthread_attr_init,
|
||||
_HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread",
|
||||
AC_CHECK_LIB(c_r, pthread_attr_init,
|
||||
|
@ -971,9 +974,6 @@ AC_CHECK_FUNC(dlopen,,[
|
|||
])
|
||||
|
||||
EXTRA_LIBS=
|
||||
if test "$enable_shared" = no; then
|
||||
EXTRA_LIBS="$OS_LIBS"
|
||||
fi
|
||||
|
||||
if test -n "$MOZ_OPTIMIZE"; then
|
||||
CFLAGS="$CFLAGS $_OPTIMIZE_FLAGS"
|
||||
|
@ -995,6 +995,7 @@ AC_SUBST(CFLAGS)
|
|||
AC_SUBST(CXXFLAGS)
|
||||
AC_SUBST(HOST_CC)
|
||||
AC_SUBST(HOST_CFLAGS)
|
||||
AC_SUBST(LDFLAGS)
|
||||
AC_SUBST(GNU_CC)
|
||||
|
||||
AC_SUBST(USE_CPLUS)
|
||||
|
@ -1023,6 +1024,11 @@ 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(DEFINES)
|
||||
AC_SUBST(DEFS)
|
||||
AC_SUBST(AR)
|
||||
|
|
Загрузка…
Ссылка в новой задаче