+2004-02-24 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * stepmake/stepmake/c++-vars.make (EXTRA_CXXFLAGS): Remove -pipe
+ comment.
+
+ * stepmake/aclocal.m4: Add --enable-pipe option, with check.
+ Enabled by default, may save 10% compile time.
+
2004-02-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
* Documentation/user/refman.itely (Customized accidental rules):
optimise_b=yes
profile_b=no
debug_b=yes
+ pipe_b=yes
AC_ARG_ENABLE(checking,
[ --enable-checking set runtime checks (assert calls). Default: on],
[ --enable-profiling compile with gprof support. Default: off],
[profile_b=$enableval])
+ AC_ARG_ENABLE(pipe,
+ [ --enable-pipe compile with -pipe. Default: on],
+ [pipe_b=$enableval])
if test "$checking_b" = no; then
# ugh
OPTIMIZE="-O2 -finline-functions"
fi
-
if test $profile_b = yes; then
EXTRA_LIBES="-pg"
OPTIMIZE="$OPTIMIZE -pg"
fi
- if test $debug_b = yes; then
+ if test $debug_b = yes; then
OPTIMIZE="$OPTIMIZE -g"
fi
-
-
+
AC_PROG_CC
STEPMAKE_OPTIONAL_REQUIRED(CC, cc, $1)
LD='$(CC)'
AC_SUBST(LD)
+ # If -pipe requested, test if it works and add to CFLAGS.
+ if test "$pipe_b" = yes; then
+ save_cflags="$CFLAGS"
+ CFLAGS="-pipe $CFLAGS";
+ AC_CACHE_CHECK([whether compiler understands -pipe],
+ [stepmake_cflags_pipe],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[/* -pipe test */]])],
+ [stepmake_cflags_pipe=yes],
+ [stepmake_cflags_pipe=no]))
+ CFLAGS=$save_cflags
+ if test $stepmake_cflags_pipe = yes; then
+ OPTIMIZE="$OPTIMIZE -pipe"
+ fi
+ fi
+
CFLAGS="$CFLAGS $OPTIMIZE"
CPPFLAGS=${CPPFLAGS-""}
AC_MSG_RESULT([none])
;;
esac
+
AC_SUBST(cross_compiling)
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
include $(stepdir)/compile-vars.make
-# added two warnings that are treated by cygwin32's gcc 2.7.2 as errors.
-# huh, but still, no warnings even provoced with linux's gcc 2.7.2.1?
-
-# -pipe makes it go faster, but is not supported on all platforms.
-# how much faster -- would this warrant configure check?
-# EXTRA_CXXFLAGS= -Wall -Winline -W -Wmissing-prototypes -Wmissing-declarations -Wconversion
EXTRA_CXXFLAGS= -W -Wall -Wconversion
ALL_CXXFLAGS = $(CXXFLAGS) $(ICFLAGS) $(DEFINES) $(addprefix -I,$(INCLUDES)) $(USER_CFLAGS) $(EXTRA_CFLAGS) $(MODULE_CFLAGS) $($(PACKAGE)_CFLAGS) $($(PACKAGE)_CXXFLAGS) $(USER_CXXFLAGS) $(EXTRA_CXXFLAGS) $(MODULE_CXXFLAGS)