Add mingw support.

Bug #134113 r=mcs sr=dmose
This commit is contained in:
seawood%netscape.com 2003-03-07 21:12:09 +00:00
parent c27c3fff25
commit c745660cee
9 changed files with 128 additions and 164 deletions

View File

@ -220,7 +220,11 @@ endif
ifeq ($(OS_ARCH), WINNT)
EXE_SUFFIX=.exe
RSC=rc
ifdef NS_USE_GCC
OFFLAG=-o #
else
OFFLAG=/Fo
endif
else
OFFLAG=-o
endif
@ -230,9 +234,11 @@ DEFS += -DLINUX2_0 -DLINUX1_2 -DLINUX2_1
endif
ifeq ($(OS_ARCH), WINNT)
ifndef NS_USE_GCC
DLLEXPORTS_PREFIX=/DEF:
USE_DLL_EXPORTS_FILE = 1
endif
endif
ifeq ($(OS_ARCH), SunOS)
DLLEXPORTS_PREFIX=-Blocal -M
@ -349,6 +355,11 @@ endif # Linux
ifeq ($(OS_ARCH), WINNT)
ifdef NS_USE_GCC
LINK_EXE = $(CC) -o $@ $(LDFLAGS) $(LCFLAGS) $(DEPLIBS) $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
LINK_LIB = $(AR) cr $@ $(OBJS)
LINK_DLL = $(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(@:.$(DLL_SUFFIX)=.$(LIB_SUFFIX)) $(LLFLAGS) $(DLL_LDFLAGS) -o $@ $(OBJS) $(EXTRA_LIBS) $(EXTRA_DLL_LIBS)
else
DEBUG_LINK_OPT=/DEBUG:FULL
ifeq ($(BUILD_OPT), 1)
DEBUG_LINK_OPT=
@ -363,6 +374,7 @@ LINK_LIB = lib -OUT:"$@" $(OBJS)
LINK_DLL = link $(DEBUG_LINK_OPT) /nologo /MAP /DLL /PDB:NONE /DEBUGTYPE:BOTH \
$(ML_DEBUG) /SUBSYSTEM:$(SUBSYSTEM) $(LLFLAGS) $(DLL_LDFLAGS) \
$(EXTRA_LIBS) /out:"$@" $(OBJS)
endif # NS_USE_GCC
else # WINNT
#
# UNIX link commands

View File

@ -110,8 +110,10 @@ endif
OUTOPTION = -o # end of the line
ifeq (,$(filter-out WINNT OS2,$(OS_ARCH)))
ifndef NS_USE_GCC
OUTOPTION = /Fe
endif
endif
# Redefine MAKE_OBJDIR for just this directory
define MAKE_OBJDIR

View File

@ -55,7 +55,6 @@ AR_FLAGS = @AR_FLAGS@
LD = @LD@
RANLIB = @RANLIB@
PERL = @PERL@
DLLTOOL = @DLLTOOL@
WINDRES = @WINDRES@
RC = @RC@
STRIP = @STRIP@

View File

@ -286,7 +286,7 @@ $(NFSPWD):
$(PROGRAM): $(OBJS)
@$(MAKE_OBJDIR)
ifeq ($(OS_ARCH),WINNT)
ifeq ($(OS_ARCH)_$(NS_USE_GCC),WINNT_)
$(CC) $(OBJS) -Fe$@ -link $(LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS)
else
ifeq ($(MOZ_OS2_TOOLS),VACPP)
@ -390,14 +390,18 @@ ifeq ($(OS_TARGET),OS2)
$(RC) -DOS2 -r $(RESNAME) $(RES)
else
# The resource compiler does not understand the -U option.
ifdef NS_USE_GCC
$(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $<
else
$(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$(RES) $(RESNAME)
endif
endif
@echo $(RES) finished
endif
$(OBJDIR)/%.$(OBJ_SUFFIX): %.cpp
@$(MAKE_OBJDIR)
ifeq ($(OS_ARCH), WINNT)
ifeq ($(OS_ARCH)_$(NS_USE_GCC), WINNT_)
$(CCC) -Fo$@ -c $(CCCFLAGS) $<
else
ifeq ($(MOZ_OS2_TOOLS),VACPP)
@ -412,7 +416,7 @@ WCCFLAGS2 = $(subst -I,-i=,$(WCCFLAGS1))
WCCFLAGS3 = $(subst -D,-d,$(WCCFLAGS2))
$(OBJDIR)/%.$(OBJ_SUFFIX): %.c
@$(MAKE_OBJDIR)
ifeq ($(OS_ARCH), WINNT)
ifeq ($(OS_ARCH)_$(NS_USE_GCC), WINNT_)
ifeq ($(OS_TARGET), WIN16)
# $(MOD_DEPTH)/config/w16opt $(WCCFLAGS3)
echo $(WCCFLAGS3) >w16wccf

View File

@ -1892,43 +1892,6 @@ test -n "$STRIP" && break
done
test -n "$STRIP" || STRIP="echo"
fi
if test -z "$DLLTOOL"; then
for ac_prog in "${target_alias}-dlltool" "${target}-dlltool"
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1903: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$DLLTOOL"; then
ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_DLLTOOL="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
DLLTOOL="$ac_cv_prog_DLLTOOL"
if test -n "$DLLTOOL"; then
echo "$ac_t""$DLLTOOL" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$DLLTOOL" && break
done
test -n "$DLLTOOL" || DLLTOOL="echo"
fi
if test -z "$WINDRES"; then
for ac_prog in "${target_alias}-windres" "${target}-windres"
@ -1936,7 +1899,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1940: checking for $ac_word" >&5
echo "configure:1903: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1974,7 +1937,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1978: checking for $ac_word" >&5
echo "configure:1941: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2006,7 +1969,7 @@ test -n "$CXX" || CXX="gcc"
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:2010: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
echo "configure:1973: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@ -2017,12 +1980,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext << EOF
#line 2021 "configure"
#line 1984 "configure"
#include "confdefs.h"
int main(){return(0);}
EOF
if { (eval echo configure:2026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@ -2048,12 +2011,12 @@ if test $ac_cv_prog_cxx_works = no; then
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:2052: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:2015: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
echo "configure:2057: checking whether we are using GNU C++" >&5
echo "configure:2020: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2062,7 +2025,7 @@ else
yes;
#endif
EOF
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
@ -2081,7 +2044,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
echo "configure:2085: checking whether ${CXX-g++} accepts -g" >&5
echo "configure:2048: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2118,7 +2081,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2122: checking for $ac_word" >&5
echo "configure:2085: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2148,7 +2111,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2152: checking for $ac_word" >&5
echo "configure:2115: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2199,7 +2162,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2203: checking for $ac_word" >&5
echo "configure:2166: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2231,7 +2194,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:2235: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
echo "configure:2198: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@ -2242,12 +2205,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
#line 2246 "configure"
#line 2209 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:2251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@ -2273,12 +2236,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:2277: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:2240: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:2282: checking whether we are using GNU C" >&5
echo "configure:2245: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2287,7 +2250,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@ -2306,7 +2269,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:2310: checking whether ${CC-cc} accepts -g" >&5
echo "configure:2273: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2339,7 +2302,7 @@ fi
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:2343: checking how to run the C preprocessor" >&5
echo "configure:2306: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@ -2354,13 +2317,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 2358 "configure"
#line 2321 "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:2364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2327: \"$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
:
@ -2371,13 +2334,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 2375 "configure"
#line 2338 "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:2381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2344: \"$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
:
@ -2388,13 +2351,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 2392 "configure"
#line 2355 "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:2398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2361: \"$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
:
@ -2421,7 +2384,7 @@ echo "$ac_t""$CPP" 1>&6
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2425: checking for $ac_word" >&5
echo "configure:2388: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2453,7 +2416,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2457: checking for $ac_word" >&5
echo "configure:2420: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2494,7 +2457,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2498: checking for $ac_word" >&5
echo "configure:2461: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2535,7 +2498,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2539: checking for $ac_word" >&5
echo "configure:2502: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2576,7 +2539,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2580: checking for $ac_word" >&5
echo "configure:2543: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2612,53 +2575,12 @@ test -n "$STRIP" && break
done
test -n "$STRIP" || STRIP="echo not_strip"
for ac_prog in dlltool
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2621: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$DLLTOOL" in
/*)
ac_cv_path_DLLTOOL="$DLLTOOL" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_DLLTOOL="$DLLTOOL" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_DLLTOOL="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
;;
esac
fi
DLLTOOL="$ac_cv_path_DLLTOOL"
if test -n "$DLLTOOL"; then
echo "$ac_t""$DLLTOOL" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$DLLTOOL" && break
done
test -n "$DLLTOOL" || DLLTOOL="echo not_dlltool"
for ac_prog in windres
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2662: checking for $ac_word" >&5
echo "configure:2584: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2720,7 +2642,7 @@ else
fi
echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
echo "configure:2724: checking for gcc -pipe support" >&5
echo "configure:2646: checking for gcc -pipe support" >&5
if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
echo '#include <stdio.h>' > dummy-hello.c
echo 'int main() { printf("Hello World\n"); exit(0); }' >> dummy-hello.c
@ -2735,14 +2657,14 @@ if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
_SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -pipe"
cat > conftest.$ac_ext <<EOF
#line 2739 "configure"
#line 2661 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
printf("Hello World\n");
; return 0; }
EOF
if { (eval echo configure:2746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
_res_gcc_pipe="yes"
else
@ -2775,7 +2697,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2779: checking for $ac_word" >&5
echo "configure:2701: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2997,17 +2919,17 @@ EOF
DSO_LDOPTS='-brtl -bM:SRE -bnoentry -bexpall'
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:3001: checking for sys/atomic_op.h" >&5
echo "configure:2923: 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 3006 "configure"
#line 2928 "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:3011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2933: \"$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*
@ -3165,7 +3087,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:3169: checking for gethostbyaddr in -lbind" >&5
echo "configure:3091: 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
@ -3173,7 +3095,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lbind $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3177 "configure"
#line 3099 "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
@ -3184,7 +3106,7 @@ int main() {
gethostbyaddr()
; return 0; }
EOF
if { (eval echo configure:3188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3110: \"$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
@ -3873,13 +3795,15 @@ EOF
PR_MD_ARCH_DIR=windows
RESOLVE_LINK_SYMBOLS=1
PROG_SUFFIX=.exe
NSINSTALL=nsinstall
if test -n "$GNU_CC"; then
cat >> confdefs.h <<\EOF
#define NONAMELESSUNION 1
EOF
MKSHLIB='$(DLLTOOL) --as=$(AS) -k --dllname $*.dll --output-lib $@'
CC="$CC -mno-cygwin"
CXX="$CXX -mno-cygwin"
DLL_SUFFIX=dll
MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) -o $@'
RC="$WINDRES -O coff"
else
CC=cl
CXX=cl
@ -3888,14 +3812,12 @@ EOF
AR_FLAGS=
RANLIB='echo not_ranlib'
STRIP='echo not_strip'
NSINSTALL=nsinstall
RC=rc.exe
GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
OBJ_SUFFIX=obj
LIB_SUFFIX=lib
LIB_PREFIX=
DLL_SUFFIX=dll
PROG_SUFFIX=.exe
CFLAGS="$CFLAGS -W3 -nologo -GF -Gy"
@ -3962,6 +3884,8 @@ EOF
#define WIN95 1
EOF
# undefine WINNT as some versions of mingw gcc define it by default
DEFINES="$DEFINES -UWINNT"
cat >> confdefs.h <<\EOF
#define _PR_GLOBAL_THREADS_ONLY 1
EOF
@ -4308,17 +4232,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:4312: checking for machine/builtins.h" >&5
echo "configure:4236: 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 4317 "configure"
#line 4241 "configure"
#include "confdefs.h"
#include <machine/builtins.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4246: \"$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*
@ -4726,7 +4650,6 @@ EOF
LIB_PREFIX=
DLL_SUFFIX=dll
ASM_SUFFIX=asm
DLLTOOL=''
RC=rc.exe
PR_MD_ARCH_DIR=os2
PROG_SUFFIX=.exe
@ -4829,12 +4752,12 @@ esac
if test -z "$SKIP_LIBRARY_CHECKS"; then
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
echo "configure:4833: checking for dlopen" >&5
echo "configure:4756: 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 4838 "configure"
#line 4761 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dlopen(); below. */
@ -4857,7 +4780,7 @@ dlopen();
; return 0; }
EOF
if { (eval echo configure:4861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4784: \"$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
@ -4876,7 +4799,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:4880: checking for dlopen in -ldl" >&5
echo "configure:4803: 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
@ -4884,7 +4807,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4888 "configure"
#line 4811 "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
@ -4895,7 +4818,7 @@ int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:4899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4822: \"$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
@ -4923,13 +4846,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:4927: checking whether ${CC-cc} needs -traditional" >&5
echo "configure:4850: 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 4933 "configure"
#line 4856 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@ -4947,7 +4870,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
#line 4951 "configure"
#line 4874 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@ -4971,12 +4894,12 @@ fi
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4975: checking for $ac_func" >&5
echo "configure:4898: 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 4980 "configure"
#line 4903 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -4999,7 +4922,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:5003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4926: \"$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
@ -5037,7 +4960,7 @@ fi
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
echo "configure:5041: checking for pthread_create in -lpthreads" >&5
echo "configure:4964: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@ -5059,7 +4982,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
echo "configure:5063: checking for pthread_create in -lpthread" >&5
echo "configure:4986: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@ -5081,7 +5004,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
echo "configure:5085: checking for pthread_create in -lc_r" >&5
echo "configure:5008: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@ -5103,7 +5026,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
echo "configure:5107: checking for pthread_create in -lc" >&5
echo "configure:5030: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@ -5253,7 +5176,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:5257: checking whether ${CC-cc} accepts -pthread" >&5
echo "configure:5180: 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
@ -5269,7 +5192,7 @@ echo "configure:5257: 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:5273: checking whether ${CC-cc} accepts -pthreads" >&5
echo "configure:5196: 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
@ -5535,6 +5458,13 @@ 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
@ -5814,7 +5744,6 @@ s%@AR@%$AR%g
s%@AS@%$AS%g
s%@LD@%$LD%g
s%@STRIP@%$STRIP%g
s%@DLLTOOL@%$DLLTOOL%g
s%@WINDRES@%$WINDRES%g
s%@CPP@%$CPP%g
s%@PERL@%$PERL%g

View File

@ -427,9 +427,6 @@ if test "$target" != "$host"; then
if test -z "$STRIP"; then
AC_CHECK_PROGS(STRIP, "${target_alias}-strip" "${target}-strip", echo)
fi
if test -z "$DLLTOOL"; then
AC_CHECK_PROGS(DLLTOOL, "${target_alias}-dlltool" "${target}-dlltool", echo)
fi
if test -z "$WINDRES"; then
AC_CHECK_PROGS(WINDRES, "${target_alias}-windres" "${target}-windres", echo)
fi
@ -447,7 +444,6 @@ else
AC_PATH_PROGS(AR, ar, echo not_ar)
AC_PATH_PROGS(LD, ld link, echo not_ld)
AC_PATH_PROGS(STRIP, strip, echo not_strip)
AC_PATH_PROGS(DLLTOOL, dlltool, echo not_dlltool)
AC_PATH_PROGS(WINDRES, windres, echo not_windres)
if test -z "$HOST_CC"; then
HOST_CC="$CC"
@ -1195,10 +1191,15 @@ case "$target" in
AC_DEFINE(_WINDOWS)
PR_MD_ARCH_DIR=windows
RESOLVE_LINK_SYMBOLS=1
PROG_SUFFIX=.exe
NSINSTALL=nsinstall
if test -n "$GNU_CC"; then
AC_DEFINE(NONAMELESSUNION)
MKSHLIB='$(DLLTOOL) --as=$(AS) -k --dllname $*.dll --output-lib $@'
CC="$CC -mno-cygwin"
CXX="$CXX -mno-cygwin"
DLL_SUFFIX=dll
MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) -o $@'
RC="$WINDRES -O coff"
else
CC=cl
CXX=cl
@ -1207,14 +1208,12 @@ case "$target" in
AR_FLAGS=
RANLIB='echo not_ranlib'
STRIP='echo not_strip'
NSINSTALL=nsinstall
RC=rc.exe
GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
OBJ_SUFFIX=obj
LIB_SUFFIX=lib
LIB_PREFIX=
DLL_SUFFIX=dll
PROG_SUFFIX=.exe
CFLAGS="$CFLAGS -W3 -nologo -GF -Gy"
@ -1269,6 +1268,8 @@ case "$target" in
AC_DEFINE(WINNT)
else
AC_DEFINE(WIN95)
# undefine WINNT as some versions of mingw gcc define it by default
DEFINES="$DEFINES -UWINNT"
AC_DEFINE(_PR_GLOBAL_THREADS_ONLY)
fi
@ -1719,7 +1720,6 @@ mips-sony-newsos*)
LIB_PREFIX=
DLL_SUFFIX=dll
ASM_SUFFIX=asm
DLLTOOL=''
RC=rc.exe
PR_MD_ARCH_DIR=os2
PROG_SUFFIX=.exe
@ -2287,7 +2287,6 @@ AC_SUBST(AR_FLAGS)
AC_SUBST(AS)
AC_SUBST(ASFLAGS)
AC_SUBST(LD)
AC_SUBST(DLLTOOL)
AC_SUBST(WINDRES)
AC_SUBST(RANLIB)
AC_SUBST(PERL)

View File

@ -168,12 +168,16 @@ EXTRA_LIBS = -L$(dist_libdir) -l$(LBER_LIBNAME)
endif
ifeq ($(OS_ARCH), WINNT)
ifdef NS_USE_GCC
EXTRA_DLL_LIBS=-L$(dist_libdir) -l$(LBER_LIBNAME)
else
EXTRA_LIBS =wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
rpcrt4.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib
EXTRA_LIBS += $(dist_libdir)/$(LDIF_LIBNAME).lib
EXTRA_LIBS += $(dist_libdir)/$(LBER_LIBNAME).lib
endif
endif
ifeq ($(OS_ARCH),OS2)
EXTRA_LIBS = $(dist_libdir)/$(LDIF_LIBNAME).lib

View File

@ -99,6 +99,10 @@ EXTRA_LIBS += -L$(dist_libdir) $(DYNAMICNSPR)
endif
ifeq ($(OS_ARCH), WINNT)
ifdef NS_USE_GCC
EXTRA_DLL_LIBS =-L$(dist_libdir) -l$(LDAP_LIBNAME) \
-l$(PLC_BASENAME) -l$(PLDS_BASENAME) -l$(NSPR_BASENAME)
else
EXTRA_LIBS =wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
rpcrt4.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib
@ -107,6 +111,7 @@ EXTRA_LIBS += $(dist_libdir)/$(PLC_BASENAME).lib
EXTRA_LIBS += $(dist_libdir)/$(PLDS_BASENAME).lib
EXTRA_LIBS += $(dist_libdir)/$(NSPR_BASENAME).lib
endif
endif
ifeq ($(OS_ARCH),OS2)
EXTRA_LIBS = $(dist_libdir)/$(LDAP_LIBNAME).lib

View File

@ -91,6 +91,15 @@ EXTRA_LIBS += $(DYNAMICNSPR)
endif
ifeq ($(OS_ARCH), WINNT)
ifdef NS_USE_GCC
EXTRA_DLL_LIBS = -L$(dist_libdir) -l$(LDAP_LIBNAME) -l$(PRLDAP_LIBNAME) \
-l$(NSS_LIBNAME)
ifeq ($(NSS_DYNAMIC_SOFTOKN),1)
EXTRA_DLL_LIBS += -l$(SOFTOKN_LIBNAME)
endif
EXTRA_DLL_LIBS += -l$(SSL_LIBNAME) \
-l$(PLC_BASENAME) -l$(PLDS_BASENAME) -l$(NSPR_BASENAME)
else
EXTRA_LIBS =wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
rpcrt4.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib
@ -105,6 +114,7 @@ EXTRA_LIBS += $(dist_libdir)/$(SOFTOKN_LIBNAME).lib
endif
EXTRA_LIBS += $(dist_libdir)/$(SSL_LIBNAME).lib
endif
endif
ifeq ($(OS_ARCH),OS2)
EXTRA_LIBS = $(OS_LIBS)