Use cygwin-wrapper only when we are using cygwin (the mingw and cygwin

targets).
This commit is contained in:
wtc%netscape.com 2002-08-28 19:53:05 +00:00
parent 926ca2b98f
commit ce2f2d9763
2 changed files with 32 additions and 26 deletions

51
nsprpub/configure vendored
View File

@ -3763,8 +3763,11 @@ EOF
MKSHLIB='$(DLLTOOL) --as=$(AS) -k --dllname $*.dll --output-lib $@'
else
topsrcdir=$srcdir
CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
case "$target" in
*-mingw*|*-cygwin*)
CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
;;
esac
CC='$(CYGWIN_WRAPPER) cl'
CXX='$(CYGWIN_WRAPPER) cl'
LD=link
@ -4205,17 +4208,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:4209: checking for machine/builtins.h" >&5
echo "configure:4212: 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 4214 "configure"
#line 4217 "configure"
#include "confdefs.h"
#include <machine/builtins.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4222: \"$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*
@ -4722,12 +4725,12 @@ esac
if test -z "$SKIP_LIBRARY_CHECKS"; then
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
echo "configure:4726: checking for dlopen" >&5
echo "configure:4729: 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 4731 "configure"
#line 4734 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dlopen(); below. */
@ -4750,7 +4753,7 @@ dlopen();
; return 0; }
EOF
if { (eval echo configure:4754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4757: \"$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
@ -4769,7 +4772,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:4773: checking for dlopen in -ldl" >&5
echo "configure:4776: 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
@ -4777,7 +4780,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4781 "configure"
#line 4784 "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
@ -4788,7 +4791,7 @@ int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:4792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4795: \"$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
@ -4816,13 +4819,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:4820: checking whether ${CC-cc} needs -traditional" >&5
echo "configure:4823: 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 4826 "configure"
#line 4829 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@ -4840,7 +4843,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
#line 4844 "configure"
#line 4847 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@ -4864,12 +4867,12 @@ fi
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4868: checking for $ac_func" >&5
echo "configure:4871: 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 4873 "configure"
#line 4876 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -4892,7 +4895,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:4896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4899: \"$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
@ -4931,7 +4934,7 @@ hpux*)
if test -z "$GNU_CC"; then
echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
echo "configure:4935: checking for +Olit support" >&5
echo "configure:4938: 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
@ -4965,7 +4968,7 @@ esac
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
echo "configure:4969: checking for pthread_create in -lpthreads" >&5
echo "configure:4972: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -4987,7 +4990,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
echo "configure:4991: checking for pthread_create in -lpthread" >&5
echo "configure:4994: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5009,7 +5012,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
echo "configure:5013: checking for pthread_create in -lc_r" >&5
echo "configure:5016: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5031,7 +5034,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
echo "configure:5035: checking for pthread_create in -lc" >&5
echo "configure:5038: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5183,7 +5186,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:5187: checking whether ${CC-cc} accepts -pthread" >&5
echo "configure:5190: 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
@ -5206,7 +5209,7 @@ echo "configure:5187: 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:5210: checking whether ${CC-cc} accepts -pthreads" >&5
echo "configure:5213: 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

View File

@ -1187,8 +1187,11 @@ case "$target" in
AC_DEFINE(NONAMELESSUNION)
MKSHLIB='$(DLLTOOL) --as=$(AS) -k --dllname $*.dll --output-lib $@'
else
topsrcdir=$srcdir
CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
case "$target" in
*-mingw*|*-cygwin*)
CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
;;
esac
CC='$(CYGWIN_WRAPPER) cl'
CXX='$(CYGWIN_WRAPPER) cl'
LD=link