the AM_* flags patch

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9963 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2005-05-20 16:56:28 +00:00
parent fae970f4c2
commit e5ae321dab
23 changed files with 69 additions and 54 deletions

View File

@ -1,3 +1,8 @@
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.

View File

@ -2,7 +2,7 @@ include $(top_srcdir)/config/common.am
noinst_LTLIBRARIES = libboost_filesystem.la
AM_CPPFLAGS = \
AM_CPPFLAGS += \
$(PCH_FLAGS) \
-DBOOST_USER_CONFIG="<config.h>" \
$(BOOST_INCLUDES)

View File

@ -2,7 +2,7 @@ include $(top_srcdir)/config/common.am
noinst_LTLIBRARIES = libboost_regex.la
AM_CPPFLAGS = \
AM_CPPFLAGS += \
$(PCH_FLAGS) \
-DBOOST_USER_CONFIG="<config.h>" \
$(BOOST_INCLUDES)

View File

@ -2,7 +2,7 @@ include $(top_srcdir)/config/common.am
noinst_LTLIBRARIES = libboost_signals.la
AM_CPPFLAGS = \
AM_CPPFLAGS += \
$(PCH_FLAGS) \
-DBOOST_USER_CONFIG="<config.h>" \
$(BOOST_INCLUDES)

View File

@ -169,7 +169,7 @@ AC_ARG_ENABLE(warnings,
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])
@ -224,26 +224,39 @@ if test x$GXX = xyes; then
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])
;;
@ -252,27 +265,17 @@ if test x$GXX = xyes; then
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

View File

@ -78,7 +78,7 @@ AC_ARG_ENABLE(assertions,
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
@ -112,7 +112,7 @@ if test x$lyx_use_aiksaurus != xno; then
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
@ -269,7 +269,7 @@ if test $use_compression=true ; then
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)
@ -302,11 +302,14 @@ 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\
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\
@ -315,6 +318,10 @@ ${FRONTEND_INFO}\
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

View File

@ -53,7 +53,7 @@ lyx$(EXEEXT): $(FRONTENDS_PROGS)
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

View File

@ -8,7 +8,7 @@ man_MANS = lyxclient.1
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)

View File

@ -6,7 +6,7 @@ DIST_SUBDIRS = controllers xforms qt2 gtk
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 \

View File

@ -4,7 +4,7 @@ EXTRA_DIST = BCView.tmpl
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 \

View File

@ -4,7 +4,7 @@ SUBDIRS = gimages glade
noinst_LTLIBRARIES = libgtk.la
AM_CPPFLAGS = \
AM_CPPFLAGS += \
$(PCH_FLAGS) \
-I$(top_srcdir)/images \
-I$(top_srcdir)/src \

View File

@ -10,7 +10,7 @@ noinst_LTLIBRARIES = libqt2.la
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 \

View File

@ -3,7 +3,7 @@ include $(srcdir)/../Makefile.dialogs
DISTCLEANFILES += *.C
AM_CPPFLAGS = \
AM_CPPFLAGS += \
$(QT_CPPFLAGS) -DQT_NO_TRANSLATION \
$(PCH_FLAGS) \
-I$(top_srcdir)/src \

View File

@ -7,7 +7,7 @@ SUBDIRS = . moc
EXTRA_DIST = QPreambleDialogBase.ui $(UIFILES)
AM_CPPFLAGS = \
AM_CPPFLAGS += \
$(QT_CPPFLAGS) -DQT_NO_TRANSLATION \
$(PCH_FLAGS) \
-I$(top_srcdir)/src \

View File

@ -3,7 +3,7 @@ include $(srcdir)/../../Makefile.dialogs
DISTCLEANFILES += $(UIFILES:.ui=_moc.C)
AM_CPPFLAGS = \
AM_CPPFLAGS += \
$(QT_CPPFLAGS) -DQT_NO_TRANSLATION \
$(PCH_FLAGS) \
-I$(top_srcdir)/src \

View File

@ -7,7 +7,7 @@ BUILT_SOURCES = lyx_forms.h lyx_xpm.h
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 \
@ -16,7 +16,7 @@ AM_CPPFLAGS = \
# 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

View File

@ -5,7 +5,7 @@ DISTCLEANFILES += $(SRCS:.fd=.C) $(SRCS:.fd=.h) $(SRCS:.fd=.c)
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

View File

@ -2,7 +2,7 @@ include $(top_srcdir)/config/common.am
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 \

View File

@ -6,7 +6,7 @@ EXTRA_DIST = \
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 \

View File

@ -4,7 +4,7 @@ EXTRA_DIST = formulamacro.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 \

View File

@ -14,7 +14,7 @@ endif
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 \

View File

@ -10,7 +10,7 @@ check_PROGRAMS = \
convert \
lstrings
AM_CPPFLAGS = $(BOOST_INCLUDES)
AM_CPPFLAGS += $(BOOST_INCLUDES)
convert_LDADD = ../convert.o
convert_SOURCES = \

View File

@ -13,7 +13,7 @@ DISTCLEANFILES += $(BUILT_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)