Only link with msvcrt on mingw32. Cleaned up a few AC_SUBST.

This commit is contained in:
Alexandre Julliard 2002-08-03 00:25:59 +00:00
parent d1c144148c
commit 7bf07d154e
3 changed files with 48 additions and 53 deletions

56
configure vendored
View File

@ -1241,7 +1241,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
LIBEXT=so # library type .so or .a
LIBEXT="so"
# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
@ -10171,10 +10172,17 @@ _ACEOF
fi
LDSHARED=""
LDDLLFLAGS=""
DLLEXT=""
DLLFLAGS=""
DLLIBS=""
LDDLLFLAGS=""
LDSHARED=""
case $host_os in
cygwin*|mingw32*)
if test -n "$ac_tool_prefix"; then
@ -10525,6 +10533,8 @@ done
if test "$LIBEXT" = "so"
then
DLLFLAGS="-fPIC"
DLLEXT=".so"
echo "$as_me:$LINENO: checking whether we can build a GNU style ELF dll" >&5
echo $ECHO_N "checking whether we can build a GNU style ELF dll... $ECHO_C" >&6
if test "${ac_cv_c_dll_gnuelf+set}" = set; then
@ -10650,30 +10660,21 @@ If you are using Linux, you will need a newer binutils.
{ (exit 1); exit 1; }; }
fi
DLLFLAGS=""
if test "$LIBEXT" = "so"; then
DLLFLAGS="-fPIC"
DLLEXT=".so"
elif test "$LIBEXT" = "dll"; then
#DLLFLAGS="-fPIC" # -fPIC doesn't work(at least in cygwin-b20) - FIXME
DLLEXT=""
fi
case $build_os in
cygwin*|mingw32*)
LDPATH="PATH=\"\$(TOOLSDIR)/library:\$(TOOLSDIR)/unicode:\$\$PATH\"" ;;
LDPATH="PATH=\"\$(TOOLSDIR)/library:\$(TOOLSDIR)/unicode:\$\$PATH\""
;;
*)
LDPATH="LD_LIBRARY_PATH=\"\$(TOOLSDIR)/library:\$(TOOLSDIR)/unicode:\$\$LD_LIBRARY_PATH\"" ;;
LDPATH="LD_LIBRARY_PATH=\"\$(TOOLSDIR)/library:\$(TOOLSDIR)/unicode:\$\$LD_LIBRARY_PATH\""
;;
esac
CRTLIBS=""
case $host_os in
mingw32*)
CRTLIBS="-lmsvcrt" ;;
esac
if test "$LIBEXT" = "so"
@ -14736,6 +14737,7 @@ s,@ECHO_C@,$ECHO_C,;t t
s,@ECHO_N@,$ECHO_N,;t t
s,@ECHO_T@,$ECHO_T,;t t
s,@LIBS@,$LIBS,;t t
s,@LIBEXT@,$LIBEXT,;t t
s,@OPTIONS@,$OPTIONS,;t t
s,@build@,$build,;t t
s,@build_cpu@,$build_cpu,;t t
@ -14803,15 +14805,15 @@ s,@ARTSINCL@,$ARTSINCL,;t t
s,@ALSALIBS@,$ALSALIBS,;t t
s,@NASLIBS@,$NASLIBS,;t t
s,@AUDIOIOLIBS@,$AUDIOIOLIBS,;t t
s,@DLLEXT@,$DLLEXT,;t t
s,@DLLFLAGS@,$DLLFLAGS,;t t
s,@DLLIBS@,$DLLIBS,;t t
s,@LDDLLFLAGS@,$LDDLLFLAGS,;t t
s,@LDSHARED@,$LDSHARED,;t t
s,@DLLWRAP@,$DLLWRAP,;t t
s,@ac_ct_DLLWRAP@,$ac_ct_DLLWRAP,;t t
s,@DLLIBS@,$DLLIBS,;t t
s,@DLLFLAGS@,$DLLFLAGS,;t t
s,@DLLEXT@,$DLLEXT,;t t
s,@LDSHARED@,$LDSHARED,;t t
s,@LDDLLFLAGS@,$LDDLLFLAGS,;t t
s,@LIBEXT@,$LIBEXT,;t t
s,@LDPATH@,$LDPATH,;t t
s,@CRTLIBS@,$CRTLIBS,;t t
s,@LDD@,$LDD,;t t
s,@ALLOCA@,$ALLOCA,;t t
/@MAKE_RULES@/r $MAKE_RULES

View File

@ -12,8 +12,8 @@ AC_CONFIG_AUX_DIR(tools)
dnl **** Command-line arguments ****
dnl Default values
LIBEXT=so # library type .so or .a
dnl Library type .so or .a
AC_SUBST(LIBEXT,"so")
AC_ARG_ENABLE(debug, AC_HELP_STRING([--disable-debug],[compile out all debugging messages]))
AC_ARG_ENABLE(trace, AC_HELP_STRING([--disable-trace],[compile out TRACE messages]))
@ -723,9 +723,11 @@ fi
dnl **** Check for working dll ****
LDSHARED=""
LDDLLFLAGS=""
DLLIBS=""
AC_SUBST(DLLEXT,"")
AC_SUBST(DLLFLAGS,"")
AC_SUBST(DLLIBS,"")
AC_SUBST(LDDLLFLAGS,"")
AC_SUBST(LDSHARED,"")
case $host_os in
cygwin*|mingw32*)
@ -748,6 +750,8 @@ case $host_os in
if test "$LIBEXT" = "so"
then
DLLFLAGS="-fPIC"
DLLEXT=".so"
AC_CACHE_CHECK([whether we can build a GNU style ELF dll], ac_cv_c_dll_gnuelf,
[WINE_TRY_CFLAGS([-fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic],
ac_cv_c_dll_gnuelf="yes",ac_cv_c_dll_gnuelf="no")])
@ -778,30 +782,19 @@ If you are using Linux, you will need a newer binutils.]
)
fi
DLLFLAGS=""
if test "$LIBEXT" = "so"; then
DLLFLAGS="-fPIC"
DLLEXT=".so"
elif test "$LIBEXT" = "dll"; then
#DLLFLAGS="-fPIC" # -fPIC doesn't work(at least in cygwin-b20) - FIXME
DLLEXT=""
fi
case $build_os in
cygwin*|mingw32*)
LDPATH="PATH=\"\$(TOOLSDIR)/library:\$(TOOLSDIR)/unicode:\$\$PATH\"" ;;
AC_SUBST(LDPATH,"PATH=\"\$(TOOLSDIR)/library:\$(TOOLSDIR)/unicode:\$\$PATH\"") ;;
*)
LDPATH="LD_LIBRARY_PATH=\"\$(TOOLSDIR)/library:\$(TOOLSDIR)/unicode:\$\$LD_LIBRARY_PATH\"" ;;
AC_SUBST(LDPATH,"LD_LIBRARY_PATH=\"\$(TOOLSDIR)/library:\$(TOOLSDIR)/unicode:\$\$LD_LIBRARY_PATH\"") ;;
esac
AC_SUBST(DLLIBS)
AC_SUBST(DLLFLAGS)
AC_SUBST(DLLEXT)
AC_SUBST(LDSHARED)
AC_SUBST(LDDLLFLAGS)
AC_SUBST(LIBEXT)
AC_SUBST(LDPATH)
dnl Mingw needs explicit msvcrt for linking libwine
AC_SUBST(CRTLIBS,"")
case $host_os in
mingw32*)
CRTLIBS="-lmsvcrt" ;;
esac
dnl **** Get the soname for libraries that we load dynamically ****

View File

@ -7,7 +7,7 @@ LIBEXT = @LIBEXT@
MODULE = none
SOVERSION = 1.0
SONAME = libwine.so
EXTRALIBS = @DLLIBS@
EXTRALIBS = @DLLIBS@ @CRTLIBS@
C_SRCS = \
config.c \
@ -33,7 +33,7 @@ libwine.a: $(OBJS)
$(RANLIB) $@
libwine.dll: $(OBJS)
$(DLLWRAP) $(DLLWRAPFLAGS) --export-all --implib libwine.a -o libwine.dll $(OBJS) -lmsvcrt
$(DLLWRAP) $(DLLWRAPFLAGS) --export-all --implib libwine.a -o libwine.dll $(OBJS) $(EXTRALIBS)
.PHONY: install_so install_a install_dll