+2005-05-20 <lgb@tandberg.net>
+
+ * configure.ac: Use AM_* flags for CLAGS,CXXFLAGS where we require
+ the values to be properly set.
+
2005-05-03 Angus Leeming <leeming@lyx.org>
* configure.ac: test for io.h and process.h.
noinst_LTLIBRARIES = libboost_filesystem.la
-AM_CPPFLAGS = \
+AM_CPPFLAGS += \
$(PCH_FLAGS) \
-DBOOST_USER_CONFIG="<config.h>" \
$(BOOST_INCLUDES)
noinst_LTLIBRARIES = libboost_regex.la
-AM_CPPFLAGS = \
+AM_CPPFLAGS += \
$(PCH_FLAGS) \
-DBOOST_USER_CONFIG="<config.h>" \
$(BOOST_INCLUDES)
noinst_LTLIBRARIES = libboost_signals.la
-AM_CPPFLAGS = \
+AM_CPPFLAGS += \
$(PCH_FLAGS) \
-DBOOST_USER_CONFIG="<config.h>" \
$(BOOST_INCLUDES)
enable_warnings=no;
fi;])
if test x$enable_warnings = xyes ; then
- lyx_flags="$lyx_flags warnings"
+ lyx_flags="warnings $lyx_flags"
AC_DEFINE(WITH_WARNINGS, 1,
[Define this if you want to see the warning directives put here and
there by the developpers to get attention])
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS"
else
- case $gxx_version in
- 2.95.1) CXXFLAGS="$lyx_opt -fpermissive -ftemplate-depth-30";;
- 2.95.*) CXXFLAGS="$lyx_opt -Wno-non-template-friend -ftemplate-depth-30";;
- 2.96*) CXXFLAGS="$lyx_opt -fno-exceptions -ftemplate-depth-30 -Wno-non-template-friend";;
- 3.1*) CXXFLAGS="$lyx_opt -finline-limit=500 -fno-exceptions";;
- 3.2*|3.3*) CXXFLAGS="$lyx_opt -fno-exceptions";;
- 3.4*|4.0*)
- CXXFLAGS="$lyx_opt -fno-exceptions"
- test $enable_pch = yes && lyx_pch_comp=yes
- ;;
- *) CXXFLAGS="$lyx_opt";;
- esac
+ CFLAGS="$lyx_opt"
+ CXXFLAGS="$lyx_opt"
if test x$enable_debug = xyes ; then
+ CFLAGS="-g $CFLAGS"
CXXFLAGS="-g $CXXFLAGS"
fi
+ if test x$enable_warnings = xyes ; then
+ case $gxx_version in
+ 2.*|3.1*|3.2*|3.3*)
+ CPPFLAGS="-W -Wall $CPPFLAGS"
+ ;;
+ *)
+ CPPFLAGS="-Wextra -Wall $CPPFLAGS "
+ ;;
+ esac
+ fi
fi
+ case $gxx_version in
+ 2.95.1) AM_CXXFLAGS="-fpermissive -ftemplate-depth-30";;
+ 2.95.*) AM_CXXFLAGS="-Wno-non-template-friend -ftemplate-depth-30";;
+ 2.96*) AM_CXXFLAGS="-fno-exceptions -ftemplate-depth-30 -Wno-non-template-friend";;
+ 3.1*) AM_CXXFLAGS="-finline-limit=500 -fno-exceptions";;
+ 3.2*|3.3*) AM_CXXFLAGS="-fno-exceptions";;
+ 3.4*|4.0*)
+ AM_CXXFLAGS="-fno-exceptions"
+ test $enable_pch = yes && lyx_pch_comp=yes
+ ;;
+ *) AM_CXXFLAGS="";;
+ esac
if test x$enable_stdlib_debug = xyes ; then
case $gxx_version in
3.4*|4.0*)
- lyx_flags="$lyx_flags stdlib-debug"
+ lyx_flags="stdlib-debug $lyx_flags"
AC_DEFINE(_GLIBCXX_DEBUG, 1, [libstdc++ debug mode])
AC_DEFINE(_GLIBCXX_DEBUG_PEDANTIC, 1, [libstdc++ pedantic debug mode])
;;
if test x$enable_concept_checks = xyes ; then
case $gxx_version in
3.3*)
- lyx_flags="$lyx_flags concept-checks"
+ lyx_flags="concept-checks $lyx_flags"
AC_DEFINE(_GLIBCPP_CONCEPT_CHECKS, 1, [libstdc++ concept checking])
;;
3.4*|4.0*)
- lyx_flags="$lyx_flags concept-checks"
+ lyx_flags="concept-checks $lyx_flags"
AC_DEFINE(_GLIBCXX_CONCEPT_CHECKS, 1, [libstdc++ concept checking])
;;
esac
fi
- if test x$enable_warnings = xyes ; then
- case $gxx_version in
- 2.*|3.1*|3.2*|3.3*)
- CPPFLAGS="$CPPFLAGS -W -Wall"
- ;;
- *)
- CPPFLAGS="$CPPFLAGS -Wextra -Wall"
- ;;
- esac
- fi
fi
-test "$lyx_pch_comp" = yes && lyx_flags="$lyx_flags pch"
+test "$lyx_pch_comp" = yes && lyx_flags="pch $lyx_flags"
AM_CONDITIONAL(LYX_BUILD_PCH, test "$lyx_pch_comp" = yes)
])dnl
enable_assertions=no;
fi;])
if test "x$enable_assertions" = xyes ; then
- lyx_flags="$lyx_flags assertions"
+ lyx_flags="assertions $lyx_flags"
AC_DEFINE(ENABLE_ASSERTIONS,1,
[Define if you want assertions to be enabled in the code])
fi
AC_CHECK_LIB(Aiksaurus, main,
[AC_DEFINE(HAVE_LIBAIKSAURUS,1,[Define this if you have the AikSaurus library])
AIKSAURUS_LIBS="-lAiksaurus"
- lyx_flags="$lyx_flags aiksaurus"
+ lyx_flags="aiksaurus $lyx_flags"
])
AC_CHECK_HEADER(Aiksaurus.h,[
ac_cv_header_aiksaurus_h=yes
AC_CHECK_LIB(z, gzopen,[use_compression=true;LIBS="$LIBS -lz"], use_compression=false)
if test $use_compression = true ; then
AC_DEFINE(USE_COMPRESSION, 1, [Define as 1 if you want to support compressed files.])
- lyx_flags="$lyx_flags compression"
+ lyx_flags="compression $lyx_flags"
fi
fi
AM_CONDITIONAL(USE_COMPRESSION, test x$use_compression = xtrue)
real_datadir=`eval "echo \`eval \"echo ${datadir}/${PACKAGE}\"\`"`
VERSION_INFO="Configuration\n\
Host type: ${host}\n\
- Special build flags: ${lyx_flags}\n\
- C Compiler: ${CC}\n\
+ Special build flags: ${lyx_flags}\n\
+ C Compiler: ${CC} ${CC_VERSION}\n\
+ C Compiler LyX flags: ${AM_CPPFLAGS} ${AM_CFLAGS}\n\
C Compiler flags: ${CPPFLAGS} ${CFLAGS}\n\
C++ Compiler: ${CXX} ${CXX_VERSION}\n\
+ C++ Compiler LyX flags: ${AM_CPPFLAGS} ${AM_CXXFLAGS}\n\
C++ Compiler flags: ${CPPFLAGS} ${CXXFLAGS}\n\
- Linker flags: ${LDFLAGS}\n\
+ Linker flags: ${AM_LDFLAGS}\n\
+ Linker user flags: ${LDFLAGS}\n\
${FRONTEND_INFO}\
Packaging: ${lyx_use_packaging}\n\
LyX binary dir: ${real_bindir}\n\
AC_SUBST(VERSION_INFO)
AC_SUBST(RPM_FRONTEND)
+AC_SUBST(AM_CPPFLAGS)
+AC_SUBST(AM_CXXFLAGS)
+AC_SUBST(AM_CFLAGS)
+AC_SUBST(AM_LDFLAGS)
## Some config.h stuff
BUILT_SOURCES = version.C
-AM_CPPFLAGS = $(PCH_FLAGS) $(BOOST_INCLUDES)
+AM_CPPFLAGS += $(PCH_FLAGS) $(BOOST_INCLUDES)
if USE_ASPELL
ASPELL = aspell.C aspell_local.h
bin_PROGRAMS = lyxclient
-AM_CPPFLAGS = $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
+AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
BOOST_LIBS = $(BOOST_REGEX) $(BOOST_FILESYSTEM)
noinst_LTLIBRARIES = libfrontends.la
-AM_CPPFLAGS = $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
+AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
libfrontends_la_SOURCES = \
Alert.C \
noinst_LTLIBRARIES = libcontrollers.la
-AM_CPPFLAGS = $(PCH_FLAGS) -I$(top_srcdir)/src $(BOOST_INCLUDES)
+AM_CPPFLAGS += $(PCH_FLAGS) -I$(top_srcdir)/src $(BOOST_INCLUDES)
libcontrollers_la_SOURCES= \
Dialog.C \
noinst_LTLIBRARIES = libgtk.la
-AM_CPPFLAGS = \
+AM_CPPFLAGS += \
$(PCH_FLAGS) \
-I$(top_srcdir)/images \
-I$(top_srcdir)/src \
libqt2_la_LDFLAGS = $(QT_LDFLAGS)
libqt2_la_LIBADD = $(QT_LIB) ui/*.lo moc/*.lo ui/moc/*.lo
-AM_CPPFLAGS = \
+AM_CPPFLAGS += \
$(QT_CPPFLAGS) \
$(PCH_FLAGS) \
-I$(top_srcdir)/src \
DISTCLEANFILES += *.C
-AM_CPPFLAGS = \
+AM_CPPFLAGS += \
$(QT_CPPFLAGS) -DQT_NO_TRANSLATION \
$(PCH_FLAGS) \
-I$(top_srcdir)/src \
EXTRA_DIST = QPreambleDialogBase.ui $(UIFILES)
-AM_CPPFLAGS = \
+AM_CPPFLAGS += \
$(QT_CPPFLAGS) -DQT_NO_TRANSLATION \
$(PCH_FLAGS) \
-I$(top_srcdir)/src \
DISTCLEANFILES += $(UIFILES:.ui=_moc.C)
-AM_CPPFLAGS = \
+AM_CPPFLAGS += \
$(QT_CPPFLAGS) -DQT_NO_TRANSLATION \
$(PCH_FLAGS) \
-I$(top_srcdir)/src \
EXTRA_DIST = lyx_forms.h.in lyx_xpm.h.in
-AM_CPPFLAGS = \
+AM_CPPFLAGS += \
-I$(top_srcdir)/images \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/frontends \
# This cannot be put in AM_CPPFLAGS since that is used both for C and C++
# And the precompiled header is setup only for C++
-AM_CXXFLAGS = $(PCH_FLAGS)
+AM_CXXFLAGS += $(PCH_FLAGS)
noinst_LTLIBRARIES = libxforms.la
EXTRA_DIST = fdfixc.sed fdfixh.sed fdfix.sh tmp_str.sed README $(SRCS)
# For (forms_fwd.h, forms_gettext.h) and support/std_string.h, respectively.
-AM_CPPFLAGS = $(PCH_FLAGS) -I$(srcdir)/.. -I$(top_srcdir)/src -I..
+AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. -I$(top_srcdir)/src -I..
noinst_LTLIBRARIES = libfdesign.la
noinst_LTLIBRARIES = libgraphics.la
-AM_CPPFLAGS = $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
+AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
libgraphics_la_SOURCES = \
GraphicsCache.h \
insettheorem.C \
insettheorem.h
-AM_CPPFLAGS = $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
+AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
libinsets_la_SOURCES = \
mailinset.C \
noinst_LTLIBRARIES = libmathed.la
-AM_CPPFLAGS = $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
+AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
libmathed_la_SOURCES = \
textpainter.C \
BUILT_SOURCES = package.C
-AM_CPPFLAGS = $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
+AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
libsupport_la_SOURCES = \
FileMonitor.h \
convert \
lstrings
-AM_CPPFLAGS = $(BOOST_INCLUDES)
+AM_CPPFLAGS += $(BOOST_INCLUDES)
convert_LDADD = ../convert.o
convert_SOURCES = \
bin_PROGRAMS = tex2lyx
-AM_CPPFLAGS = $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
+AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
BOOST_LIBS = $(BOOST_REGEX) $(BOOST_FILESYSTEM)