Allow overriding CFLAGS when running configure. Other small cleanups.

This commit is contained in:
Alexandre Julliard 2003-04-14 21:46:41 +00:00
parent 46adbecd13
commit fc09423d3d
8 changed files with 37 additions and 66 deletions

View File

@ -23,8 +23,7 @@
SHELL = /bin/sh
CC = @CC@
CPP = @CPP@
CFLAGS = @CFLAGS@ $(EXTRACFLAGS)
OPTIONS = @OPTIONS@ -D_REENTRANT
CFLAGS = @CFLAGS@
LIBS = @LIBS@
YACC = @YACC@
LEX = @LEX@
@ -45,8 +44,6 @@ WINDRES = @WINDRES@
LN = @LN@
LN_S = @LN_S@
TOOLSDIR = @TOOLSDIR@
DIVINCL = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL)
ALLCFLAGS = $(DIVINCL) $(CFLAGS) $(DEFS) $(OPTIONS)
AS = @AS@
LD = @LD@
LDFLAGS = @LDFLAGS@
@ -56,8 +53,11 @@ MV = mv
C2MAN = @C2MAN@
LINT = @LINT@
LINTFLAGS = @LINTFLAGS@
ALLLINTFLAGS = $(LINTFLAGS) $(DEFS) $(OPTIONS) $(DIVINCL)
MKINSTALLDIRS= $(TOPSRCDIR)/tools/mkinstalldirs
INCLUDES = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL)
EXTRACFLAGS = @EXTRACFLAGS@
ALLCFLAGS = $(INCLUDES) $(DEFS) $(EXTRACFLAGS) $(CFLAGS)
ALLLINTFLAGS = $(INCLUDES) $(DEFS) $(LINTFLAGS)
MKINSTALLDIRS= $(TOPSRCDIR)/tools/mkinstalldirs -m 755
WINAPI_CHECK = $(TOPSRCDIR)/tools/winapi_check/winapi_check
WINEWRAPPER = $(TOPSRCDIR)/tools/winewrapper
RUNTEST = $(TOPSRCDIR)/tools/runtest
@ -66,7 +66,7 @@ MAKEDEP = $(TOOLSDIR)/tools/makedep
WRC = $(TOOLSDIR)/tools/wrc/wrc
WMC = $(TOOLSDIR)/tools/wmc/wmc
WIDL = $(TOOLSDIR)/tools/widl/widl
WRCFLAGS = --nostdinc $(EXTRAWRCFLAGS)
WRCFLAGS = --nostdinc $(INCLUDES) $(EXTRAWRCFLAGS)
LDPATH = @LDPATH@
DLLDIR = $(TOPOBJDIR)/dlls
LIBPORT = -L$(TOPOBJDIR)/libs/port -lwine_port
@ -120,7 +120,7 @@ LINTS = $(C_SRCS:.c=.ln)
$(LDPATH) $(WMC) -i -U -H /dev/null -o $@ $<
.rc.res:
$(LDPATH) $(WRC) $(WRCFLAGS) $(DIVINCL) -o $@ $<
$(LDPATH) $(WRC) $(WRCFLAGS) -o $@ $<
.res.res.o:
$(WINDRES) -i $< -o $@
@ -188,7 +188,7 @@ $(SUBDIRS:%=%/__depend__): $(MAKEDEP) dummy
cd `dirname $@` && $(MAKE) depend
depend: $(MAKEDEP) $(SUBDIRS:%=%/__depend__)
$(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(C_SRCS16) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(IDL_SRCS) $(EXTRA_SRCS)
$(MAKEDEP) $(INCLUDES) -C$(SRCDIR) $(C_SRCS) $(C_SRCS16) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(IDL_SRCS) $(EXTRA_SRCS)
.PHONY: depend $(SUBDIRS:%=%/__depend__)

36
configure vendored
View File

@ -308,7 +308,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS OPTIONS WIN16_FILES WIN16_INSTALL LIBPTHREAD build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP TOOLSDIR X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS YACC LEX LEXLIB LEX_OUTPUT_ROOT XYACC XLEX AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP WINDRES ac_ct_WINDRES LN_S LN C2MAN LDCONFIG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LINT LINTFLAGS DB2HTML DB2PDF DB2PS JPEGLIB EGREP GIFLIB XLIB XFILES OPENGLFILES GLU32FILES OPENGL_LIBS NASLIBS CURSESLIBS sane_devel SANELIBS SANEINCL ft_devel ft_devel2 FREETYPEINCL ARTSCCONFIG ARTSLIBS ARTSINCL ALSALIBS AUDIOIOLIBS DLLEXT DLLFLAGS DLLIBS LDDLLFLAGS LDSHARED LIBEXT IMPLIBEXT DLLTOOL ac_ct_DLLTOOL DLLWRAP ac_ct_DLLWRAP LDEXECFLAGS CROSSTEST CROSSCC LDPATH CRTLIBS LDD ALLOCA LIBOBJS LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS WIN16_FILES WIN16_INSTALL LIBPTHREAD build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP TOOLSDIR X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS YACC LEX LEXLIB LEX_OUTPUT_ROOT XYACC XLEX AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP WINDRES ac_ct_WINDRES LN_S LN C2MAN LDCONFIG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LINT LINTFLAGS DB2HTML DB2PDF DB2PS JPEGLIB EGREP GIFLIB XLIB XFILES OPENGLFILES GLU32FILES OPENGL_LIBS NASLIBS CURSESLIBS sane_devel SANELIBS SANEINCL ft_devel ft_devel2 FREETYPEINCL ARTSCCONFIG ARTSLIBS ARTSINCL ALSALIBS AUDIOIOLIBS EXTRACFLAGS DLLEXT DLLFLAGS DLLIBS LDDLLFLAGS LDSHARED LIBEXT IMPLIBEXT DLLTOOL ac_ct_DLLTOOL DLLWRAP ac_ct_DLLWRAP LDEXECFLAGS CROSSTEST CROSSCC LDPATH CRTLIBS LDD ALLOCA LIBOBJS LTLIBOBJS'
ac_subst_files='MAKE_RULES MAKE_DLL_RULES MAKE_TEST_RULES MAKE_PROG_RULES'
# Initialize some variables set by options.
@ -1358,7 +1358,6 @@ if test "${with_wine_tools+set}" = set; then
fi;
WIN16_FILES="\$(WIN16_FILES)"
WIN16_INSTALL="\$(WIN16_INSTALL)"
@ -10683,9 +10682,11 @@ _ACEOF
fi
EXTRACFLAGS=""
if test "x${GCC}" = "xyes"
then
CFLAGS="$CFLAGS -Wall"
EXTRACFLAGS=-Wall
echo "$as_me:$LINENO: checking for gcc strength-reduce bug" >&5
echo $ECHO_N "checking for gcc strength-reduce bug... $ECHO_C" >&6
@ -10742,7 +10743,7 @@ echo "$as_me:$LINENO: result: $ac_cv_c_gcc_strength_bug" >&5
echo "${ECHO_T}$ac_cv_c_gcc_strength_bug" >&6
if test "$ac_cv_c_gcc_strength_bug" = "yes"
then
CFLAGS="$CFLAGS -fno-strength-reduce"
EXTRACFLAGS="$EXTRACFLAGS -fno-strength-reduce"
fi
echo "$as_me:$LINENO: checking for gcc -mpreferred-stack-boundary=2 support" >&5
@ -10794,7 +10795,7 @@ echo "$as_me:$LINENO: result: $ac_cv_c_gcc_stack_boundary" >&5
echo "${ECHO_T}$ac_cv_c_gcc_stack_boundary" >&6
if test "$ac_cv_c_gcc_stack_boundary" = "yes"
then
CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"
EXTRACFLAGS="$EXTRACFLAGS -mpreferred-stack-boundary=2"
fi
echo "$as_me:$LINENO: checking for gcc -gstabs+ support" >&5
@ -10846,7 +10847,7 @@ echo "$as_me:$LINENO: result: $ac_cv_c_gcc_gstabs" >&5
echo "${ECHO_T}$ac_cv_c_gcc_gstabs" >&6
if test "$ac_cv_c_gcc_gstabs" = "yes"
then
CFLAGS="$CFLAGS -gstabs+"
EXTRACFLAGS="$EXTRACFLAGS -gstabs+"
fi
saved_CFLAGS="$CFLAGS"
@ -10898,7 +10899,7 @@ echo "${ECHO_T}$ac_cv_c_string_h_warnings" >&6
CFLAGS="$saved_CFLAGS"
if test "$ac_cv_c_string_h_warnings" = "no"
then
CFLAGS="$CFLAGS -Wpointer-arith"
EXTRACFLAGS="$EXTRACFLAGS -Wpointer-arith"
fi
fi
@ -11284,7 +11285,7 @@ fi
DLLEXT=""
DLLFLAGS=""
DLLFLAGS="-D_REENTRANT"
DLLIBS=""
@ -11763,7 +11764,7 @@ done
if test "$LIBEXT" = "so"
then
DLLFLAGS="-fPIC"
DLLFLAGS="$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
@ -16763,7 +16764,6 @@ 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,@OPTIONS@,$OPTIONS,;t t
s,@WIN16_FILES@,$WIN16_FILES,;t t
s,@WIN16_INSTALL@,$WIN16_INSTALL,;t t
s,@LIBPTHREAD@,$LIBPTHREAD,;t t
@ -16840,6 +16840,7 @@ s,@ARTSLIBS@,$ARTSLIBS,;t t
s,@ARTSINCL@,$ARTSINCL,;t t
s,@ALSALIBS@,$ALSALIBS,;t t
s,@AUDIOIOLIBS@,$AUDIOIOLIBS,;t t
s,@EXTRACFLAGS@,$EXTRACFLAGS,;t t
s,@DLLEXT@,$DLLEXT,;t t
s,@DLLFLAGS@,$DLLFLAGS,;t t
s,@DLLIBS@,$DLLIBS,;t t
@ -17462,21 +17463,6 @@ then
echo "*** Xlib/Xfree86 at the very least."
fi
if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
then
echo
echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
echo "*** terminal resize support. Consider upgrading ncurses."
fi
if test "$wine_cv_libc_reentrant" = "no"
then
echo
echo "*** Warning: non-reentrant libc detected. Wine will be built without"
echo "*** threading support. Consider upgrading libc to a more recent"
echo "*** reentrant version of libc."
fi
if test "$wine_cv_opengl_version_OK" = "no"
then
echo

View File

@ -21,7 +21,6 @@ AC_ARG_WITH(curses, AC_HELP_STRING([--without-curses],[do not use curses]))
AC_ARG_WITH(nptl, AC_HELP_STRING([--with-nptl],[use glibc NPTL threading support]))
AC_ARG_WITH(wine-tools,AC_HELP_STRING([--with-wine-tools=<dir>],[use Wine tools from directory <dir>]))
AC_SUBST(OPTIONS)
AC_SUBST(WIN16_FILES,"\$(WIN16_FILES)")
AC_SUBST(WIN16_INSTALL,"\$(WIN16_INSTALL)")
if test "x$enable_win16" = "xno"
@ -642,9 +641,10 @@ fi
dnl **** Check for gcc specific options ****
AC_SUBST(EXTRACFLAGS,"")
if test "x${GCC}" = "xyes"
then
CFLAGS="$CFLAGS -Wall"
EXTRACFLAGS=-Wall
dnl Check for strength-reduce bug
AC_CACHE_CHECK( [for gcc strength-reduce bug], ac_cv_c_gcc_strength_bug,
@ -665,7 +665,7 @@ int main(void) {
ac_cv_c_gcc_strength_bug="yes") )
if test "$ac_cv_c_gcc_strength_bug" = "yes"
then
CFLAGS="$CFLAGS -fno-strength-reduce"
EXTRACFLAGS="$EXTRACFLAGS -fno-strength-reduce"
fi
dnl Check for -mpreferred-stack-boundary
@ -674,7 +674,7 @@ int main(void) {
ac_cv_c_gcc_stack_boundary="yes",ac_cv_c_gcc_stack_boundary="no")])
if test "$ac_cv_c_gcc_stack_boundary" = "yes"
then
CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"
EXTRACFLAGS="$EXTRACFLAGS -mpreferred-stack-boundary=2"
fi
dnl Check for -gstabs+ option
@ -682,7 +682,7 @@ int main(void) {
[WINE_TRY_CFLAGS([-gstabs+],ac_cv_c_gcc_gstabs="yes", ac_cv_c_gcc_gstabs="no")])
if test "$ac_cv_c_gcc_gstabs" = "yes"
then
CFLAGS="$CFLAGS -gstabs+"
EXTRACFLAGS="$EXTRACFLAGS -gstabs+"
fi
dnl Check for noisy string.h
@ -694,7 +694,7 @@ int main(void) {
CFLAGS="$saved_CFLAGS"
if test "$ac_cv_c_string_h_warnings" = "no"
then
CFLAGS="$CFLAGS -Wpointer-arith"
EXTRACFLAGS="$EXTRACFLAGS -Wpointer-arith"
fi
fi
@ -773,7 +773,7 @@ fi
dnl **** Check for working dll ****
AC_SUBST(DLLEXT,"")
AC_SUBST(DLLFLAGS,"")
AC_SUBST(DLLFLAGS,"-D_REENTRANT")
AC_SUBST(DLLIBS,"")
AC_SUBST(LDDLLFLAGS,"")
AC_SUBST(LDSHARED,"")
@ -803,7 +803,7 @@ case $host_os in
if test "$LIBEXT" = "so"
then
DLLFLAGS="-fPIC"
DLLFLAGS="$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],
@ -1539,21 +1539,6 @@ then
echo "*** Xlib/Xfree86 at the very least."
fi
if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
then
echo
echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
echo "*** terminal resize support. Consider upgrading ncurses."
fi
if test "$wine_cv_libc_reentrant" = "no"
then
echo
echo "*** Warning: non-reentrant libc detected. Wine will be built without"
echo "*** threading support. Consider upgrading libc to a more recent"
echo "*** reentrant version of libc."
fi
if test "$wine_cv_opengl_version_OK" = "no"
then
echo

View File

@ -68,13 +68,13 @@ crosstest:: $(SUBDIRS:%=%/__crosstest__)
# Rules for auto documentation
man: $(C_SRCS)
$(C2MAN) -o $(TOPOBJDIR)/documentation/man$(api_manext) -R$(TOPOBJDIR) -S$(api_manext) $(DIVINCL) $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16)
$(C2MAN) -o $(TOPOBJDIR)/documentation/man$(api_manext) -R$(TOPOBJDIR) -S$(api_manext) $(INCLUDES) $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16)
doc-html: $(C_SRCS)
$(C2MAN) -o $(TOPOBJDIR)/documentation/html -R$(TOPOBJDIR) $(DIVINCL) -Th $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16)
$(C2MAN) -o $(TOPOBJDIR)/documentation/html -R$(TOPOBJDIR) $(INCLUDES) -Th $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16)
doc-sgml: $(C_SRCS)
$(C2MAN) -o $(TOPOBJDIR)/documentation/api-guide -R$(TOPOBJDIR) $(DIVINCL) -Ts $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16)
$(C2MAN) -o $(TOPOBJDIR)/documentation/api-guide -R$(TOPOBJDIR) $(INCLUDES) -Ts $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16)
.PHONY: man doc-html doc-sgml

View File

@ -83,6 +83,6 @@ gdi.exe.spec.c: gdi.exe.spec version16.res
$(LDPATH) $(WINEBUILD) $(DEFS) -o $@ --heap 65520 --main-module $(MODULE) --res version16.res --spec $(SRCDIR)/gdi.exe.spec
version16.res: version16.rc
$(LDPATH) $(WRC) $(WRCFLAGS) $(DIVINCL) -o $@ -O res16 $(SRCDIR)/version16.rc
$(LDPATH) $(WRC) $(WRCFLAGS) -o $@ -O res16 $(SRCDIR)/version16.rc
### Dependencies:

View File

@ -67,6 +67,6 @@ krnl386.exe.spec.c: krnl386.exe.spec version16.res
$(LDPATH) $(WINEBUILD) $(DEFS) -o $@ --dll-name kernel --main-module $(MODULE) --res version16.res --spec $(SRCDIR)/krnl386.exe.spec
version16.res: version16.rc
$(LDPATH) $(WRC) $(WRCFLAGS) $(DIVINCL) -o $@ -O res16 $(SRCDIR)/version16.rc
$(LDPATH) $(WRC) $(WRCFLAGS) -o $@ -O res16 $(SRCDIR)/version16.rc
### Dependencies:

View File

@ -68,7 +68,7 @@ uninstall::
# Special rules for 16-bit resource files
version16.res: version16.rc
$(LDPATH) $(WRC) $(WRCFLAGS) $(DIVINCL) -o $@ -O res16 $(SRCDIR)/version16.rc
$(LDPATH) $(WRC) $(WRCFLAGS) -o $@ -O res16 $(SRCDIR)/version16.rc
shell.spec.c: shell.spec version16.res
$(LDPATH) $(WINEBUILD) $(DEFS) -o $@ --main-module $(MODULE) --res version16.res --spec $(SRCDIR)/shell.spec

View File

@ -120,12 +120,12 @@ mouse.spec.c: mouse.spec resources/mouse.res
$(LDPATH) $(WINEBUILD) $(DEFS) -o $@ --main-module $(MODULE) --res resources/mouse.res --spec $(SRCDIR)/mouse.spec
resources/display.res: resources/display.rc
$(LDPATH) $(WRC) $(WRCFLAGS) $(DIVINCL) -o $@ -O res16 $(SRCDIR)/resources/display.rc
$(LDPATH) $(WRC) $(WRCFLAGS) -o $@ -O res16 $(SRCDIR)/resources/display.rc
resources/mouse.res: resources/mouse.rc
$(LDPATH) $(WRC) $(WRCFLAGS) $(DIVINCL) -o $@ -O res16 $(SRCDIR)/resources/mouse.rc
$(LDPATH) $(WRC) $(WRCFLAGS) -o $@ -O res16 $(SRCDIR)/resources/mouse.rc
resources/version16.res: resources/version16.rc
$(LDPATH) $(WRC) $(WRCFLAGS) $(DIVINCL) -o $@ -O res16 $(SRCDIR)/resources/version16.rc
$(LDPATH) $(WRC) $(WRCFLAGS) -o $@ -O res16 $(SRCDIR)/resources/version16.rc
### Dependencies: