From dc056d91c1231e0e0b7f15de70210a45a18356d3 Mon Sep 17 00:00:00 2001 From: "cls%seawood.org" Date: Mon, 15 Mar 2004 07:15:51 +0000 Subject: [PATCH] Fixing whatever got missed between the missed bug 141834 checkin & bug 134113 checkin. --- directory/c-sdk/configure | 67 ++++++++++++++++++++---------------- directory/c-sdk/configure.in | 28 ++++++++++----- 2 files changed, 56 insertions(+), 39 deletions(-) diff --git a/directory/c-sdk/configure b/directory/c-sdk/configure index 0f28b9e6f484..8e869f8f65b2 100755 --- a/directory/c-sdk/configure +++ b/directory/c-sdk/configure @@ -3894,7 +3894,11 @@ EOF PR_MD_ARCH_DIR=windows RESOLVE_LINK_SYMBOLS=1 PROG_SUFFIX=.exe - NSINSTALL=nsinstall + CYGWIN_WRAPPER='sh $(topsrcdir)/config/cygwin-wrapper' + NSINSTALL='$(CYGWIN_WRAPPER) nsinstall' + if test "`${PERL} -v | grep -c cygwin 2>/dev/null`" = 0; then + PERL='$(CYGWIN_WRAPPER) perl' + fi if test -n "$GNU_CC"; then CC="$CC -mno-cygwin" @@ -3905,19 +3909,14 @@ EOF RC="$WINDRES -O coff --use-temp-file" else CYGWIN_WRAPPER='sh $(topsrcdir)/config/cygwin-wrapper' - CC='$(CYGWIN_WRAPPER) cl' - CXX='$(CYGWIN_WRAPPER) cl' - LD='$(CYGWIN_WRAPPER) link' + CC=cl + CXX=cl + LD=link AR='lib -NOLOGO -OUT:"$@"' AR_FLAGS= RANLIB='echo not_ranlib' STRIP='echo not_strip' - NSINSTALL='$(CYGWIN_WRAPPER) nsinstall' RC='$(CYGWIN_WRAPPER) rc.exe' - PERL=perl - if test "`${PERL} -v | grep -c cygwin 2>/dev/null`" = 0; then - PERL='$(CYGWIN_WRAPPER) perl' - fi GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb' OBJ_SUFFIX=obj LIB_SUFFIX=lib @@ -4428,17 +4427,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:4432: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4442: \"$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* @@ -4836,12 +4835,12 @@ esac if test -z "$SKIP_LIBRARY_CHECKS"; then echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -echo "configure:4840: checking for dlopen" >&5 +echo "configure:4839: 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:4867: \"$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 @@ -4883,7 +4882,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:4887: checking for dlopen in -ldl" >&5 +echo "configure:4886: 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 @@ -4891,7 +4890,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:4905: \"$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 @@ -4930,13 +4929,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:4934: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:4933: 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 @@ -4954,7 +4953,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -4978,12 +4977,12 @@ fi for ac_func in lchown strerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4982: checking for $ac_func" >&5 +echo "configure:4981: 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:5009: \"$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 @@ -5044,7 +5043,7 @@ fi echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:5048: checking for pthread_create in -lpthreads" >&5 +echo "configure:5047: checking for pthread_create in -lpthreads" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -5066,7 +5065,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:5070: checking for pthread_create in -lpthread" >&5 +echo "configure:5069: checking for pthread_create in -lpthread" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -5088,7 +5087,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:5092: checking for pthread_create in -lc_r" >&5 +echo "configure:5091: checking for pthread_create in -lc_r" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -5110,7 +5109,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -echo "configure:5114: checking for pthread_create in -lc" >&5 +echo "configure:5113: checking for pthread_create in -lc" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -5260,7 +5259,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:5264: checking whether ${CC-cc} accepts -pthread" >&5 +echo "configure:5263: 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 @@ -5276,7 +5275,7 @@ echo "configure:5264: 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:5280: checking whether ${CC-cc} accepts -pthreads" >&5 +echo "configure:5279: 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 @@ -5542,6 +5541,14 @@ fi RELEASE_OBJDIR_NAME="${OS_CONFIG}${CPU_ARCH_TAG}${COMPILER_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}.${OBJDIR_SUFFIX}" +case "$target_os" in +mingw*|cygwin*|msvc*|mksnt*) + CC="\$(CYGWIN_WRAPPER) $CC" + CXX="\$(CYGWIN_WRAPPER) $CXX" + RC="\$(CYGWIN_WRAPPER) $RC" + ;; +esac + diff --git a/directory/c-sdk/configure.in b/directory/c-sdk/configure.in index 97fd03ab00ab..49e1b0d49f49 100644 --- a/directory/c-sdk/configure.in +++ b/directory/c-sdk/configure.in @@ -1192,7 +1192,11 @@ case "$target" in PR_MD_ARCH_DIR=windows RESOLVE_LINK_SYMBOLS=1 PROG_SUFFIX=.exe - NSINSTALL=nsinstall + CYGWIN_WRAPPER='sh $(topsrcdir)/config/cygwin-wrapper' + NSINSTALL='$(CYGWIN_WRAPPER) nsinstall' + if test "`${PERL} -v | grep -c cygwin 2>/dev/null`" = 0; then + PERL='$(CYGWIN_WRAPPER) perl' + fi if test -n "$GNU_CC"; then CC="$CC -mno-cygwin" @@ -1203,19 +1207,14 @@ case "$target" in RC="$WINDRES -O coff --use-temp-file" else CYGWIN_WRAPPER='sh $(topsrcdir)/config/cygwin-wrapper' - CC='$(CYGWIN_WRAPPER) cl' - CXX='$(CYGWIN_WRAPPER) cl' - LD='$(CYGWIN_WRAPPER) link' + CC=cl + CXX=cl + LD=link AR='lib -NOLOGO -OUT:"$@"' AR_FLAGS= RANLIB='echo not_ranlib' STRIP='echo not_strip' - NSINSTALL='$(CYGWIN_WRAPPER) nsinstall' RC='$(CYGWIN_WRAPPER) rc.exe' - PERL=perl - if test "`${PERL} -v | grep -c cygwin 2>/dev/null`" = 0; then - PERL='$(CYGWIN_WRAPPER) perl' - fi GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb' OBJ_SUFFIX=obj LIB_SUFFIX=lib @@ -2219,6 +2218,17 @@ fi RELEASE_OBJDIR_NAME="${OS_CONFIG}${CPU_ARCH_TAG}${COMPILER_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}.${OBJDIR_SUFFIX}" +dnl ======================================================== +dnl Use cygwin wrapper for win32 builds +dnl ======================================================== +case "$target_os" in +mingw*|cygwin*|msvc*|mksnt*) + CC="\$(CYGWIN_WRAPPER) $CC" + CXX="\$(CYGWIN_WRAPPER) $CXX" + RC="\$(CYGWIN_WRAPPER) $RC" + ;; +esac + dnl ======================================================== dnl Substitution of found variables. dnl ========================================================