]> git.lyx.org Git - lyx.git/commitdiff
the AM_* flags patch
authorLars Gullik Bjønnes <larsbj@gullik.org>
Fri, 20 May 2005 16:56:28 +0000 (16:56 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Fri, 20 May 2005 16:56:28 +0000 (16:56 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9963 a592a061-630c-0410-9148-cb99ea01b6c8

23 files changed:
ChangeLog
boost/libs/filesystem/src/Makefile.am
boost/libs/regex/src/Makefile.am
boost/libs/signals/src/Makefile.am
config/lyxinclude.m4
configure.ac
src/Makefile.am
src/client/Makefile.am
src/frontends/Makefile.am
src/frontends/controllers/Makefile.am
src/frontends/gtk/Makefile.am
src/frontends/qt2/Makefile.am
src/frontends/qt2/moc/Makefile.am
src/frontends/qt2/ui/Makefile.am
src/frontends/qt2/ui/moc/Makefile.am
src/frontends/xforms/Makefile.am
src/frontends/xforms/forms/Makefile.am
src/graphics/Makefile.am
src/insets/Makefile.am
src/mathed/Makefile.am
src/support/Makefile.am
src/support/tests/Makefile.am
src/tex2lyx/Makefile.am

index 3816fc8f63f88298fabcf1d5fce07798dca44fbb..fc1e4aef7a67b78cd0f6099e39ac1c52cab55e1a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index 438d0edf8df0306c66c09a942f6e77501517d98f..6765ad56d557786f6ea5af35d297722dc490a0a8 100644 (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)
index 7674459d665acc936e3f99eb36fdfb21a091b4fc..21241e9e738fb30f27f1858ee68d9cc04f8f1d9c 100644 (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)
index c84da747a5413e911be6988bb543908367ad5ff0..99cee23980429f1c826ed8bec230a9f5a4877678 100644 (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)
index 15f28fe870713c6c8c3a013a525ed0eefaae45a5..a1681c71e4ed7ec71b5c17217eb1afaae3ddf917 100644 (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
 
index 22f641f306515fac38a0c0de11add4af5b14fbf0..9c953b608fbbe3151cdb151e60479a1fa96add44 100644 (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)
@@ -301,12 +301,15 @@ real_bindir=`eval "echo \`eval \"echo ${bindir}\"\`"`
 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\
@@ -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
 
index 6b556d44d14584a76323fbc43671321c174f1f10..ef9f546742cde317e0e1e8df4af897a6345d4633 100644 (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
index 9454d542d90e97728a32a14429bb6fcd97e20feb..feb68401fbff12ad60414c4ba1ae10631dfab9c5 100644 (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)
 
index 14a6613d3f542f49a64366a2a1cbe69d72a2e705..a310e8cc8c91e6e4dc51d29cf36e94bdef34e272 100644 (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 \
index 17d23becfefe52941c7b366d4c07388faafca3c9..618777ac1bbb7c28a9e3f5b0472696f8910b3f55 100644 (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 \
index ba192dacbc3a7842f396fcab4ad105106072861c..e8235cb84eb6ff461cdb70569ab71696619d4f63 100644 (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 \
index 36298be8cae6b9744d3a0c0d471f7b0bbc6bfe73..afaf382ceff3b78d3b40b6e49aeb5f5bee156140 100644 (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 \
index 555814197b9c88715bcad1c5fed95a27d61f270c..bb3afe28aa308fb9373f095a1e0ed2a805bea904 100644 (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 \
index c08a386edbf8be1b37bd35cacec651903fc63c98..de7f55e6c86297f212c6c69a098d2de2fbba085e 100644 (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 \
index 1cac7d84bf3f9b5dc04655b712546981379d1954..0540aeb17864d635e5e1909459aa0f4ebf5ce877 100644 (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 \
index e8d4378cc41b4d3e5b9d4a06af3e6f3df190403c..e8155c8fa128126a3f25b26b0186f88e274b15fd 100644 (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
 
index 0e66f04a616a244741738f49a27c8cb17da59008..66d42463f22d8f332e860e8e5ceb08c21fde4f4b 100644 (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
 
index 0891b93b3f48f133c001c0bfc995833444f3eda4..923fd53eb38942981cdb61bfe3fad41afc7f8f69 100644 (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 \
index 80b87e08b494b3a764e70cda72f2a1db3258889f..da08b050512fe6e16f14c0b857d06565b5e4712c 100644 (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 \
index 7d5554c2ee2e534fb0e922ac98c4c7214c7b2455..ae7aef24f5fe95ed5ce1310e54c3015524dd019c 100644 (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 \
index 55095ed1871669774eb85689cddd6e84336dd76c..da402acf27ae8ad2da9d4cd2940c6016b78c527e 100644 (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 \
index 8f1c3c8c2928c9973b2c8bd23a331ee03a7c1c26..42700c411ff543ef911701da9f34fe336f72b2b7 100644 (file)
@@ -10,7 +10,7 @@ check_PROGRAMS = \
        convert \
        lstrings
 
-AM_CPPFLAGS = $(BOOST_INCLUDES)
+AM_CPPFLAGS += $(BOOST_INCLUDES)
 
 convert_LDADD = ../convert.o
 convert_SOURCES = \
index c7bcab1d881d4619cf83d5b6cf64864642ffb280..ce7c1476194f0a458d2c6b4af5a23d3001c7bc38 100644 (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)