Add support for msys uname & cleanup OS_ARCH checks.

Thanks to Howard Chu <hyc@symas.com> for the patch.
Bug #294122 r=cls sr=wtc a=shaver
This commit is contained in:
cls%seawood.org 2005-06-01 15:30:48 +00:00
Родитель 75a4727606
Коммит 67150fef30
4 изменённых файлов: 177 добавлений и 155 удалений

109
directory/c-sdk/configure поставляемый
Просмотреть файл

@ -2898,33 +2898,45 @@ fi
# 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
case "$OS_ARCH" in
WIN95)
OS_ARCH=WINNT
OS_TARGET=WIN95
elif test "$OS_ARCH" = 'Windows_95'; then
;;
Windows_95)
OS_ARCH=Windows_NT
OS_TARGET=WIN95
elif test "$OS_ARCH" = 'Windows_98'; then
;;
Windows_98)
OS_ARCH=Windows_NT
OS_TARGET=WIN95
elif test "`echo $OS_ARCH | egrep -c '^(CYGWIN_9|CYGWIN_ME)' 2>/dev/null`" != 0; then
;;
CYGWIN_9*|CYGWIN_ME*)
OS_ARCH='CYGWIN_NT-4.0'
OS_TARGET=WIN95
elif test "$OS_ARCH" = "OS_2"; then
;;
OS_2)
OS_ARCH=OS2
OS_TARGET=OS2
fi
;;
WINCE)
OS_ARCH=WINCE
OS_TARGET=WINCE
;;
esac
#
# On WIN32, we also define the variable CPU_ARCH.
#
if test "$OS_ARCH" = "WINNT"; then
case "$OS_ARCH" in
WINNT)
CPU_ARCH=`uname -p`
if test "$CPU_ARCH" = "I386"; then
CPU_ARCH=x86
fi
elif test "$OS_ARCH" = "Windows_NT"; then
;;
Windows_NT)
#
# If uname -s returns "Windows_NT", we assume that we are using
# the uname.exe in MKS toolkit.
@ -2946,12 +2958,18 @@ elif test "$OS_ARCH" = "Windows_NT"; then
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
;;
CYGWIN32_NT|CYGWIN_NT*|MINGW*_NT*)
#
# If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
# the uname.exe in the Cygwin tools.
# 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.
# If uname -s returns MINGW32_NT-5.1, we assume that we are using
# the uname.exe in the MSYS tools.
#
OS_RELEASE=`echo $OS_ARCH | sed 's|^CYGWIN_NT-||'`
OS_RELEASE=`expr $OS_ARCH : '.*NT-\(.*\)'`
OS_ARCH=WINNT
CPU_ARCH=`uname -m`
#
@ -2960,21 +2978,8 @@ elif echo "$OS_ARCH" | grep -c CYGWIN_NT >/dev/null; then
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
;;
esac
if test -n "$MOZILLA_CLIENT" && test "$OS_ARCH" = "WINNT"; then
OS_TARGET=WIN95
@ -3030,17 +3035,17 @@ EOF
DSO_LDOPTS='-brtl -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:3034: checking for sys/atomic_op.h" >&5
echo "configure:3039: 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 3039 "configure"
#line 3044 "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:3044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3049: \"$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*
@ -3198,7 +3203,7 @@ EOF
_DEBUG_FLAGS='-gdwarf-2 -O0'
MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
echo "configure:3202: checking for gethostbyaddr in -lbind" >&5
echo "configure:3207: 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
@ -3206,7 +3211,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lbind $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3210 "configure"
#line 3215 "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
@ -3217,7 +3222,7 @@ int main() {
gethostbyaddr()
; return 0; }
EOF
if { (eval echo configure:3221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3226: \"$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
@ -4435,17 +4440,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:4439: checking for machine/builtins.h" >&5
echo "configure:4444: 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 4444 "configure"
#line 4449 "configure"
#include "confdefs.h"
#include <machine/builtins.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4454: \"$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*
@ -4848,12 +4853,12 @@ esac
if test -z "$SKIP_LIBRARY_CHECKS"; then
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
echo "configure:4852: checking for dlopen" >&5
echo "configure:4857: 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 4857 "configure"
#line 4862 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dlopen(); below. */
@ -4876,7 +4881,7 @@ dlopen();
; return 0; }
EOF
if { (eval echo configure:4880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4885: \"$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
@ -4895,7 +4900,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:4899: checking for dlopen in -ldl" >&5
echo "configure:4904: 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
@ -4903,7 +4908,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4907 "configure"
#line 4912 "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
@ -4914,7 +4919,7 @@ int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:4918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4923: \"$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
@ -4942,13 +4947,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:4946: checking whether ${CC-cc} needs -traditional" >&5
echo "configure:4951: 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 4952 "configure"
#line 4957 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@ -4966,7 +4971,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
#line 4970 "configure"
#line 4975 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@ -4990,12 +4995,12 @@ fi
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4994: checking for $ac_func" >&5
echo "configure:4999: 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 4999 "configure"
#line 5004 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -5018,7 +5023,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:5022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5027: \"$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
@ -5056,7 +5061,7 @@ fi
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
echo "configure:5060: checking for pthread_create in -lpthreads" >&5
echo "configure:5065: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@ -5078,7 +5083,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
echo "configure:5082: checking for pthread_create in -lpthread" >&5
echo "configure:5087: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@ -5100,7 +5105,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
echo "configure:5104: checking for pthread_create in -lc_r" >&5
echo "configure:5109: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@ -5122,7 +5127,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
echo "configure:5126: checking for pthread_create in -lc" >&5
echo "configure:5131: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@ -5272,7 +5277,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:5276: checking whether ${CC-cc} accepts -pthread" >&5
echo "configure:5281: 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
@ -5288,7 +5293,7 @@ echo "configure:5276: 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:5292: checking whether ${CC-cc} accepts -pthreads" >&5
echo "configure:5297: 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

Просмотреть файл

@ -23,6 +23,7 @@ dnl
dnl Contributor(s):
dnl Christopher Seawood <cls@seawood.org>
dnl Dan Mosedale <dmose@netscape.com>
dnl Howard Chu <hyc@symas.com>
dnl
dnl Alternatively, the contents of this file may be used under the terms of
dnl either of the GNU General Public License Version 2 or later (the "GPL"),
@ -583,33 +584,45 @@ fi
# 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
case "$OS_ARCH" in
WIN95)
OS_ARCH=WINNT
OS_TARGET=WIN95
elif test "$OS_ARCH" = 'Windows_95'; then
;;
Windows_95)
OS_ARCH=Windows_NT
OS_TARGET=WIN95
elif test "$OS_ARCH" = 'Windows_98'; then
;;
Windows_98)
OS_ARCH=Windows_NT
OS_TARGET=WIN95
elif test "`echo $OS_ARCH | egrep -c '^(CYGWIN_9|CYGWIN_ME)' 2>/dev/null`" != 0; then
;;
CYGWIN_9*|CYGWIN_ME*)
OS_ARCH='CYGWIN_NT-4.0'
OS_TARGET=WIN95
elif test "$OS_ARCH" = "OS_2"; then
;;
OS_2)
OS_ARCH=OS2
OS_TARGET=OS2
fi
;;
WINCE)
OS_ARCH=WINCE
OS_TARGET=WINCE
;;
esac
#
# On WIN32, we also define the variable CPU_ARCH.
#
if test "$OS_ARCH" = "WINNT"; then
case "$OS_ARCH" in
WINNT)
CPU_ARCH=`uname -p`
if test "$CPU_ARCH" = "I386"; then
CPU_ARCH=x86
fi
elif test "$OS_ARCH" = "Windows_NT"; then
;;
Windows_NT)
#
# If uname -s returns "Windows_NT", we assume that we are using
# the uname.exe in MKS toolkit.
@ -631,12 +644,18 @@ elif test "$OS_ARCH" = "Windows_NT"; then
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
;;
CYGWIN32_NT|CYGWIN_NT*|MINGW*_NT*)
#
# If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
# the uname.exe in the Cygwin tools.
# 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.
# If uname -s returns MINGW32_NT-5.1, we assume that we are using
# the uname.exe in the MSYS tools.
#
OS_RELEASE=`echo $OS_ARCH | sed 's|^CYGWIN_NT-||'`
OS_RELEASE=`expr $OS_ARCH : '.*NT-\(.*\)'`
OS_ARCH=WINNT
CPU_ARCH=`uname -m`
#
@ -645,21 +664,8 @@ elif echo "$OS_ARCH" | grep -c CYGWIN_NT >/dev/null; then
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
;;
esac
if test -n "$MOZILLA_CLIENT" && test "$OS_ARCH" = "WINNT"; then
OS_TARGET=WIN95

111
nsprpub/configure поставляемый
Просмотреть файл

@ -2874,33 +2874,45 @@ fi
# 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
case "$OS_ARCH" in
WIN95)
OS_ARCH=WINNT
OS_TARGET=WIN95
elif test "$OS_ARCH" = 'Windows_95'; then
;;
Windows_95)
OS_ARCH=Windows_NT
OS_TARGET=WIN95
elif test "$OS_ARCH" = 'Windows_98'; then
;;
Windows_98)
OS_ARCH=Windows_NT
OS_TARGET=WIN95
elif test "`echo $OS_ARCH | egrep -c '^(CYGWIN_9|CYGWIN_ME)' 2>/dev/null`" != 0; then
;;
CYGWIN_9*|CYGWIN_ME*)
OS_ARCH='CYGWIN_NT-4.0'
OS_TARGET=WIN95
elif test "$OS_ARCH" = "OS_2"; then
;;
OS_2)
OS_ARCH=OS2
OS_TARGET=OS2
fi
;;
WINCE)
OS_ARCH=WINCE
OS_TARGET=WINCE
;;
esac
#
# On WIN32, we also define the variable CPU_ARCH.
#
if test "$OS_ARCH" = "WINNT"; then
case "$OS_ARCH" in
WINNT)
CPU_ARCH=`uname -p`
if test "$CPU_ARCH" = "I386"; then
CPU_ARCH=x86
fi
elif test "$OS_ARCH" = "Windows_NT"; then
;;
Windows_NT)
#
# If uname -s returns "Windows_NT", we assume that we are using
# the uname.exe in MKS toolkit.
@ -2922,12 +2934,18 @@ elif test "$OS_ARCH" = "Windows_NT"; then
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
;;
CYGWIN32_NT|CYGWIN_NT*|MINGW*_NT*)
#
# If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
# the uname.exe in the Cygwin tools.
# 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.
# If uname -s returns MINGW32_NT-5.1, we assume that we are using
# the uname.exe in the MSYS tools.
#
OS_RELEASE=`echo $OS_ARCH | sed 's|^CYGWIN_NT-||'`
OS_RELEASE=`expr $OS_ARCH : '.*NT-\(.*\)'`
OS_ARCH=WINNT
CPU_ARCH=`uname -m`
#
@ -2936,21 +2954,8 @@ elif echo "$OS_ARCH" | grep -c CYGWIN_NT >/dev/null; then
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
;;
esac
if test -n "$MOZILLA_CLIENT" && test "$OS_ARCH" = "WINNT"; then
OS_TARGET=WIN95
@ -3005,17 +3010,17 @@ 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:3009: checking for sys/atomic_op.h" >&5
echo "configure:3014: 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 3014 "configure"
#line 3019 "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:3019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3024: \"$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*
@ -3172,7 +3177,7 @@ EOF
_DEBUG_FLAGS='-gdwarf-2 -O0'
MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
echo "configure:3176: checking for gethostbyaddr in -lbind" >&5
echo "configure:3181: 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
@ -3180,7 +3185,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lbind $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3184 "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
@ -3191,7 +3196,7 @@ int main() {
gethostbyaddr()
; return 0; }
EOF
if { (eval echo configure:3195: \"$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
@ -4422,17 +4427,17 @@ EOF
_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:4426: checking for machine/builtins.h" >&5
echo "configure:4431: 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 4431 "configure"
#line 4436 "configure"
#include "confdefs.h"
#include <machine/builtins.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4441: \"$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*
@ -4974,7 +4979,7 @@ case $target in
;;
*)
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:4978: checking for dlopen in -ldl" >&5
echo "configure:4983: 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
@ -4982,7 +4987,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4986 "configure"
#line 4991 "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
@ -4993,7 +4998,7 @@ int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:4997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5002: \"$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
@ -5010,17 +5015,17 @@ 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:5014: checking for dlfcn.h" >&5
echo "configure:5019: 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 5019 "configure"
#line 5024 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:5029: \"$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*
@ -5053,13 +5058,13 @@ esac
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
echo "configure:5057: checking whether ${CC-cc} needs -traditional" >&5
echo "configure:5062: 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 5063 "configure"
#line 5068 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@ -5077,7 +5082,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
#line 5081 "configure"
#line 5086 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@ -5101,12 +5106,12 @@ fi
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5105: checking for $ac_func" >&5
echo "configure:5110: 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 5110 "configure"
#line 5115 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -5129,7 +5134,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:5133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5138: \"$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
@ -5170,7 +5175,7 @@ hpux*)
if test -z "$GNU_CC"; then
echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
echo "configure:5174: checking for +Olit support" >&5
echo "configure:5179: 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
@ -5204,7 +5209,7 @@ esac
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
echo "configure:5208: checking for pthread_create in -lpthreads" >&5
echo "configure:5213: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5226,7 +5231,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
echo "configure:5230: checking for pthread_create in -lpthread" >&5
echo "configure:5235: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5248,7 +5253,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
echo "configure:5252: checking for pthread_create in -lc_r" >&5
echo "configure:5257: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5270,7 +5275,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
echo "configure:5274: checking for pthread_create in -lc" >&5
echo "configure:5279: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5422,7 +5427,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:5426: checking whether ${CC-cc} accepts -pthread" >&5
echo "configure:5431: 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
@ -5445,7 +5450,7 @@ echo "configure:5426: 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:5449: checking whether ${CC-cc} accepts -pthreads" >&5
echo "configure:5454: 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

Просмотреть файл

@ -19,6 +19,7 @@ dnl Rights Reserved.
dnl
dnl Contributor(s):
dnl Christopher Seawood <cls@seawood.org>
dnl Howard Chu <hyc@symas.com>
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
@ -634,33 +635,45 @@ fi
# 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
case "$OS_ARCH" in
WIN95)
OS_ARCH=WINNT
OS_TARGET=WIN95
elif test "$OS_ARCH" = 'Windows_95'; then
;;
Windows_95)
OS_ARCH=Windows_NT
OS_TARGET=WIN95
elif test "$OS_ARCH" = 'Windows_98'; then
;;
Windows_98)
OS_ARCH=Windows_NT
OS_TARGET=WIN95
elif test "`echo $OS_ARCH | egrep -c '^(CYGWIN_9|CYGWIN_ME)' 2>/dev/null`" != 0; then
;;
CYGWIN_9*|CYGWIN_ME*)
OS_ARCH='CYGWIN_NT-4.0'
OS_TARGET=WIN95
elif test "$OS_ARCH" = "OS_2"; then
;;
OS_2)
OS_ARCH=OS2
OS_TARGET=OS2
fi
;;
WINCE)
OS_ARCH=WINCE
OS_TARGET=WINCE
;;
esac
#
# On WIN32, we also define the variable CPU_ARCH.
#
if test "$OS_ARCH" = "WINNT"; then
case "$OS_ARCH" in
WINNT)
CPU_ARCH=`uname -p`
if test "$CPU_ARCH" = "I386"; then
CPU_ARCH=x86
fi
elif test "$OS_ARCH" = "Windows_NT"; then
;;
Windows_NT)
#
# If uname -s returns "Windows_NT", we assume that we are using
# the uname.exe in MKS toolkit.
@ -682,12 +695,18 @@ elif test "$OS_ARCH" = "Windows_NT"; then
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
;;
CYGWIN32_NT|CYGWIN_NT*|MINGW*_NT*)
#
# If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
# the uname.exe in the Cygwin tools.
# 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.
# If uname -s returns MINGW32_NT-5.1, we assume that we are using
# the uname.exe in the MSYS tools.
#
OS_RELEASE=`echo $OS_ARCH | sed 's|^CYGWIN_NT-||'`
OS_RELEASE=`expr $OS_ARCH : '.*NT-\(.*\)'`
OS_ARCH=WINNT
CPU_ARCH=`uname -m`
#
@ -696,21 +715,8 @@ elif echo "$OS_ARCH" | grep -c CYGWIN_NT >/dev/null; then
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
;;
esac
if test -n "$MOZILLA_CLIENT" && test "$OS_ARCH" = "WINNT"; then
OS_TARGET=WIN95