From ce2f2d9763e475b83a4147d720bb70092e36fffd Mon Sep 17 00:00:00 2001 From: "wtc%netscape.com" Date: Wed, 28 Aug 2002 19:53:05 +0000 Subject: [PATCH] Use cygwin-wrapper only when we are using cygwin (the mingw and cygwin targets). --- nsprpub/configure | 51 +++++++++++++++++++++++--------------------- nsprpub/configure.in | 7 ++++-- 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/nsprpub/configure b/nsprpub/configure index f6f82c0a2085..62b85552348b 100755 --- a/nsprpub/configure +++ b/nsprpub/configure @@ -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 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 <&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 <&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 < Autoconf TIOCGETP @@ -4840,7 +4843,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < 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 <&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 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 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 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 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 diff --git a/nsprpub/configure.in b/nsprpub/configure.in index 71bc1172a58f..ce2e13021a8f 100644 --- a/nsprpub/configure.in +++ b/nsprpub/configure.in @@ -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