From f8ca518f3171eb402b06a4c899363f0e5f86c497 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Fri, 22 Apr 2005 10:59:17 +0000 Subject: [PATCH] Move the setting of the Qt preprocessor flags out of the Makefiles and into qt.m4 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9855 a592a061-630c-0410-9148-cb99ea01b6c8 --- config/ChangeLog | 5 +++++ config/qt.m4 | 7 +++++++ src/frontends/qt2/ChangeLog | 8 ++++++++ src/frontends/qt2/Makefile.am | 3 +-- src/frontends/qt2/moc/Makefile.am | 3 ++- src/frontends/qt2/ui/Makefile.am | 4 +--- src/frontends/qt2/ui/moc/Makefile.am | 3 ++- 7 files changed, 26 insertions(+), 7 deletions(-) diff --git a/config/ChangeLog b/config/ChangeLog index 72c53ca5a6..9456197c06 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,8 @@ +2005-04-22 Angus Leeming + + * qt.m4: Move the Qt-specific preprocessor flags out of the + various Makefile.am files to here. Specialise the flags for mingw. + 2005-02-17 Michael Schmitt * qt.m4: detect Qt Win/Free library diff --git a/config/qt.m4 b/config/qt.m4 index abf80eee9b..22167f6aa0 100644 --- a/config/qt.m4 +++ b/config/qt.m4 @@ -199,6 +199,13 @@ AC_DEFUN([QT_DO_IT_ALL], AC_SUBST(QT_INCLUDES) AC_SUBST(QT_LDFLAGS) + dnl Preprocessor flags + case ${host} in + *mingw*) QT_CPPFLAGS="-DQT_DLL -DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR";; + *) QT_CPPFLAGS="-DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR";; + esac + AC_SUBST(QT_CPPFLAGS) + if test -z "$MOC"; then QT_FIND_MOC MOC=$ac_moc diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 6c563eacc2..8a73828822 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,11 @@ +2005-04-22 Angus Leeming + + * Makefile.am: + * moc/Makefile.am: + * ui/Makefile.am: + * ui/moc/Makefile.am: Move the Qt-specific preprocessor flags out of + the various Makefile.am files to config/qt.m4. + 2005-04-15 Jürgen Spitzmüller * ui/QPrefsConvertersModule.ui: diff --git a/src/frontends/qt2/Makefile.am b/src/frontends/qt2/Makefile.am index 2eff015dfe..36298be8ca 100644 --- a/src/frontends/qt2/Makefile.am +++ b/src/frontends/qt2/Makefile.am @@ -11,8 +11,7 @@ libqt2_la_LDFLAGS = $(QT_LDFLAGS) libqt2_la_LIBADD = $(QT_LIB) ui/*.lo moc/*.lo ui/moc/*.lo AM_CPPFLAGS = \ - -DQT_CLEAN_NAMESPACE \ - -DQT_GENUINE_STR \ + $(QT_CPPFLAGS) \ $(PCH_FLAGS) \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/frontends \ diff --git a/src/frontends/qt2/moc/Makefile.am b/src/frontends/qt2/moc/Makefile.am index effc4c54a2..555814197b 100644 --- a/src/frontends/qt2/moc/Makefile.am +++ b/src/frontends/qt2/moc/Makefile.am @@ -3,7 +3,8 @@ include $(srcdir)/../Makefile.dialogs DISTCLEANFILES += *.C -AM_CPPFLAGS = -DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR -DQT_NO_TRANSLATION \ +AM_CPPFLAGS = \ + $(QT_CPPFLAGS) -DQT_NO_TRANSLATION \ $(PCH_FLAGS) \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/frontends \ diff --git a/src/frontends/qt2/ui/Makefile.am b/src/frontends/qt2/ui/Makefile.am index 80de977553..b1e8919fd1 100644 --- a/src/frontends/qt2/ui/Makefile.am +++ b/src/frontends/qt2/ui/Makefile.am @@ -8,9 +8,7 @@ SUBDIRS = . moc EXTRA_DIST = QPreambleDialogBase.ui $(UIFILES) AM_CPPFLAGS = \ - -DQT_CLEAN_NAMESPACE \ - -DQT_GENUINE_STR \ - -DQT_NO_TRANSLATION \ + $(QT_CPPFLAGS) -DQT_NO_TRANSLATION \ $(PCH_FLAGS) \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/frontends \ diff --git a/src/frontends/qt2/ui/moc/Makefile.am b/src/frontends/qt2/ui/moc/Makefile.am index b35519010b..1cac7d84bf 100644 --- a/src/frontends/qt2/ui/moc/Makefile.am +++ b/src/frontends/qt2/ui/moc/Makefile.am @@ -3,7 +3,8 @@ include $(srcdir)/../../Makefile.dialogs DISTCLEANFILES += $(UIFILES:.ui=_moc.C) -AM_CPPFLAGS = -DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR -DQT_NO_TRANSLATION \ +AM_CPPFLAGS = \ + $(QT_CPPFLAGS) -DQT_NO_TRANSLATION \ $(PCH_FLAGS) \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/frontends \ -- 2.39.2