+2010-07-12 Andreas Schwab <schwab@linux-m68k.org>
+
+ * configure.in (C_WARNINGS_SWITCH, PROFILING_CFLAGS)
+ (PROFILING_LDFLAGS): Substitute, don't add them to CFLAGS/LDFLAGS.
+ (C_OPTIMIZE_SWITCH): Remove.
+ (TEMACS_LDFLAGS2): Add ${PROFILING_LDFLAGS}.
+
2010-07-11 Andreas Schwab <schwab@linux-m68k.org>
* configure.in: Don't check for index and rindex, check for strchr
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
+C_WARNINGS_SWITCH
EGREP
GREP
CPP
build_vendor
build_cpu
build
+PROFILING_LDFLAGS
+PROFILING_CFLAGS
MAINT
GZIP_INFO
target_alias
PROFILING_LDFLAGS=
fi
+
+
# Check whether --enable-autodepend was given.
if test "${enable_autodepend+set}" = set; then :
enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
CC="$NON_GNU_CC"
fi
-if test x$GCC = xyes; then
- C_OPTIMIZE_SWITCH=-O2
- test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
-else
- C_OPTIMIZE_SWITCH=-O
- test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
-fi
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
unset SAVE_CFLAGS
+
#### Some other nice autoconf tests.
ac_ext=c
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}"
-
# The value of CPP is a quoted variable reference, so we need to do this
# to get its actual value...
CPP=`eval "echo $CPP"`
-### First figure out CFLAGS (which we use for running the compiler here)
-### and REAL_CFLAGS (which we use for real compilation).
-### The two are the same except when using GCC where we might use
-### extra warning and profiling flags.
-
-### If the CFLAGS env var is specified, we use that value
-### instead of the default.
-
-if test "x$SPECIFIED_CFLAGS" = x; then
- CFLAGS="-g $C_OPTIMIZE_SWITCH"
- if test x$GCC = xyes; then
- REAL_CFLAGS="$CFLAGS $C_WARNINGS_SWITCH $PROFILING_CFLAGS"
- else
- REAL_CFLAGS="$CFLAGS"
- fi
-else
- REAL_CFLAGS="$CFLAGS"
-fi
-
-
CANNOT_DUMP=no
case "$opsys" in
your-opsys-here)
tmp_CFLAGS="$CFLAGS"
CPPFLAGS="$CPPFLAGS -x objective-c"
CFLAGS="$CFLAGS -x objective-c"
-TEMACS_LDFLAGS2="\${LDFLAGS}"
+TEMACS_LDFLAGS2="\${LDFLAGS} \${PROFILING_LDFLAGS}"
if test "${with_ns}" != no; then
if test "${opsys}" = darwin; then
NS_IMPL_COCOA=yes
GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
- REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
LIB_STANDARD=
START_FILES=
# used for the tests that follow. We set them back to REAL_CFLAGS and
# REAL_CPPFLAGS later on.
+REAL_CFLAGS="$CFLAGS"
REAL_CPPFLAGS="$CPPFLAGS"
if test "${HAVE_X11}" = "yes"; then
PROFILING_CFLAGS=
PROFILING_LDFLAGS=
fi
+AC_SUBST(PROFILING_CFLAGS)
+AC_SUBST(PROFILING_LDFLAGS)
AC_ARG_ENABLE(autodepend,
[AS_HELP_STRING([--enable-autodepend],
CC="$NON_GNU_CC"
fi
-if test x$GCC = xyes; then
- C_OPTIMIZE_SWITCH=-O2
- test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
-else
- C_OPTIMIZE_SWITCH=-O
- test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
-fi
-
dnl checks for Unix variants
AC_USE_SYSTEM_EXTENSIONS
CFLAGS="$SAVE_CFLAGS"
unset has_option
unset SAVE_CFLAGS
+AC_SUBST(C_WARNINGS_SWITCH)
#### Some other nice autoconf tests.
LDFLAGS=$late_LDFLAGS
[AC_MSG_RESULT(no)])
-LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}"
-
# The value of CPP is a quoted variable reference, so we need to do this
# to get its actual value...
CPP=`eval "echo $CPP"`
-### First figure out CFLAGS (which we use for running the compiler here)
-### and REAL_CFLAGS (which we use for real compilation).
-### The two are the same except when using GCC where we might use
-### extra warning and profiling flags.
-
-### If the CFLAGS env var is specified, we use that value
-### instead of the default.
-
-dnl Note AC_PROG_CC sets CFLAGS to -g -O2 for gcc anyway.
-if test "x$SPECIFIED_CFLAGS" = x; then
- CFLAGS="-g $C_OPTIMIZE_SWITCH"
- if test x$GCC = xyes; then
- REAL_CFLAGS="$CFLAGS $C_WARNINGS_SWITCH $PROFILING_CFLAGS"
- else
- REAL_CFLAGS="$CFLAGS"
- fi
-else
- REAL_CFLAGS="$CFLAGS"
-fi
-
-
dnl Not used by any currently supported platform.
dnl The function dump-emacs will not be defined and temacs will do
dnl (load "loadup") automatically unless told otherwise.
tmp_CFLAGS="$CFLAGS"
CPPFLAGS="$CPPFLAGS -x objective-c"
CFLAGS="$CFLAGS -x objective-c"
-TEMACS_LDFLAGS2="\${LDFLAGS}"
+TEMACS_LDFLAGS2="\${LDFLAGS} \${PROFILING_LDFLAGS}"
dnl I don't think it's especially important, but src/Makefile.in
dnl (now the only user of ns_appdir) used to go to the trouble of adding a
dnl trailing "/" to it, so now we do it here.
GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
- REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
LIB_STANDARD=
START_FILES=
# used for the tests that follow. We set them back to REAL_CFLAGS and
# REAL_CPPFLAGS later on.
+REAL_CFLAGS="$CFLAGS"
REAL_CPPFLAGS="$CPPFLAGS"
if test "${HAVE_X11}" = "yes"; then
+2010-07-12 Andreas Schwab <schwab@linux-m68k.org>
+
+ * Makefile.in (C_WARNINGS_SWITCH, PROFILING_CFLAGS)
+ (PROFILING_LDFLAGS): Set from substitution.
+ (BASE_CFLAGS): Add ${C_WARNINGS_SWITCH}.
+ (ALL_CFLAGS, CPP_CFLAGS): Add ${PROFILING_CFLAGS}.
+ (LINK_CFLAGS): Add ${PROFILING_LDFLAGS}.
+
2010-07-12 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in (lisp2): Change hebrew.el to hebrew.elc (see
EXEEXT=@EXEEXT@
C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
+C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@
+PROFILING_CFLAGS = @PROFILING_CFLAGS@
+PROFILING_LDFLAGS = @PROFILING_LDFLAGS@
# Program name transformation.
TRANSFORM = @program_transform_name@
# Those files shared with other GNU utilities need HAVE_CONFIG_H
# defined before they know they can take advantage of the information
# in ../src/config.h.
-BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) -DHAVE_CONFIG_H \
- -I. -I../src -I${srcdir} -I${srcdir}/../src
+BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) ${C_WARNINGS_SWITCH} \
+ -DHAVE_CONFIG_H -I. -I../src -I${srcdir} -I${srcdir}/../src
-ALL_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
-LINK_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CFLAGS}
-CPP_CFLAGS = ${BASE_CFLAGS} ${CPPFLAGS} ${CFLAGS}
+ALL_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
+LINK_CFLAGS = ${BASE_CFLAGS} ${PROFILING_LDFLAGS} ${LDFLAGS} ${CFLAGS}
+CPP_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${CPPFLAGS} ${CFLAGS}
LOADLIBES=$(LIBS_SYSTEM)
+2010-07-12 Andreas Schwab <schwab@linux-m68k.org>
+
+ * Makefile.in (C_WARNINGS_SWITCH, PROFILING_CFLAGS): Set from
+ substitution.
+ (ALL_CFLAGS): Add ${C_WARNINGS_SWITCH} and ${PROFILING_CFLAGS}.
+
2010-07-08 Jan Djärv <jan.h.d@swipnet.se>
* xlwmenu.c (size_menu_item): Change from K&R to prototype.
C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@
C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
+C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@
+PROFILING_CFLAGS = @PROFILING_CFLAGS@
CC=@CC@
CFLAGS=@CFLAGS@
# ../src is needed to find config.h.
ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
- $(C_SWITCH_X_SYSTEM) $(C_SWITCH_MACHINE) $(CFLAGS) \
+ $(C_SWITCH_X_SYSTEM) $(C_SWITCH_MACHINE) \
+ ${C_WARNINGS_SWITCH} ${PROFILING_CFLAGS} $(CFLAGS) \
-DHAVE_CONFIG_H -Demacs -I. -I../src -I${srcdir} -I${srcdir}/../src
.c.o:
+2010-07-12 Andreas Schwab <schwab@linux-m68k.org>
+
+ * Makefile.in (C_WARNINGS_SWITCH, PROFILING_CFLAGS): Set from
+ substitution.
+ (ALL_CFLAGS): Add ${C_WARNINGS_SWITCH} and ${PROFILING_CFLAGS}.
+
2010-07-04 Dan Nicolaescu <dann@ics.uci.edu>
* Activate.c: Convert function definitions to standard C.
C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@
C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
+C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@
+PROFILING_CFLAGS = @PROFILING_CFLAGS@
EXTRA=insque.o
CC=@CC@
ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \
$(C_SWITCH_X_SITE) $(C_SWITCH_X_SYSTEM) \
+ ${C_WARNINGS_SWITCH} ${PROFILING_CFLAGS} \
$(CPPFLAGS) $(CFLAGS) -DEMACS_BITMAP_FILES \
-I../src -I${srcdir} -I${srcdir}/../src
+2010-07-12 Andreas Schwab <schwab@linux-m68k.org>
+
+ * Makefile.in (C_WARNINGS_SWITCH, PROFILING_CFLAGS)
+ (PROFILING_LDFLAGS): Set from substitution.
+ (ALL_CFLAGS): Add C_WARNINGS_SWITCH and PROFILING_CFLAGS, put
+ CFLAGS last.
+
2010-07-12 Kenichi Handa <handa@m17n.org>
* Makefile.in (lisp): Change hebrew.el to hebrew.elc.
CRT_DIR=@CRT_DIR@
+## Flags to pass for profiling builds
+PROFILING_CFLAGS = @PROFILING_CFLAGS@
+PROFILING_LDFLAGS = @PROFILING_LDFLAGS@
+
+## Flags to pass to the compiler to enable build warnings
+C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@
+
## Machine-specific CFLAGS.
C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
## System-specific CFLAGS.
## Flags to pass to ld only for temacs.
TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_TEMACS)
-## $LDFLAGS, or empty if NS_IMPL_GNUSTEP (for some reason).
+## $LDFLAGS $PROFILING_LDFLAGS, or empty if NS_IMPL_GNUSTEP (for some reason).
TEMACS_LDFLAGS2 = @TEMACS_LDFLAGS2@
## Some systems define this to request special libraries.
ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} \
${C_SWITCH_MACHINE} ${C_SWITCH_SYSTEM} ${C_SWITCH_X_SITE} \
${C_SWITCH_X_SYSTEM} ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} \
- ${GCONF_CFLAGS} ${CFLAGS} ${FREETYPE_CFLAGS} ${FONTCONFIG_CFLAGS} \
- ${LIBOTF_CFLAGS} ${M17N_FLT_CFLAGS} ${DEPFLAGS}
+ ${GCONF_CFLAGS} ${FREETYPE_CFLAGS} ${FONTCONFIG_CFLAGS} \
+ ${LIBOTF_CFLAGS} ${M17N_FLT_CFLAGS} ${DEPFLAGS} ${PROFILING_CFLAGS} \
+ ${C_WARNINGS_SWITCH} ${CFLAGS}
ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS)
.SUFFIXES: .m