]> git.lyx.org Git - lyx.git/commitdiff
Adjust autotools default configure options for Qt5.
authorEnrico Forestieri <forenr@lyx.org>
Sun, 4 Jan 2015 17:07:11 +0000 (18:07 +0100)
committerEnrico Forestieri <forenr@lyx.org>
Sun, 4 Jan 2015 17:07:11 +0000 (18:07 +0100)
* Disable concept-checks unless explicitly required (errors out with Qt5).
* Add -fPIC to CPPFLAGS for elf targets (required with Qt5).

config/lyxinclude.m4
config/qt4.m4
configure.ac

index 33c59794162ebb9c0eff9e290876755ab6eb541a..f8f01c0a7d0fecfaa277943731398160d55abfd2 100644 (file)
@@ -62,6 +62,18 @@ AC_MSG_RESULT([$withval])
 ])
 
 
+dnl Check whether to configure for Qt5. Default is Qt4.
+dnl
+AC_DEFUN([LYX_CHECK_QT5],[
+AC_MSG_CHECKING([whether Qt5 is requested])
+AC_ARG_ENABLE([qt5],
+  [  --enable-qt5            use Qt5 for building],
+  USE_QT5=$enableval, USE_QT5=no)
+AC_MSG_RESULT([$USE_QT5])
+AC_SUBST([USE_QT5])
+])
+
+
 dnl Usage: LYX_WARNING(message)  Displays the warning "message" and sets the
 dnl flag lyx_warning to yes.
 AC_DEFUN([LYX_WARNING],[
@@ -219,6 +231,9 @@ AC_ARG_ENABLE(concept-checks,
   AC_HELP_STRING([--enable-concept-checks],[enable concept checks]),,
   [AS_CASE([$build_type], [dev*|pre*], [enable_concept_checks=yes], 
          [enable_concept_checks=no])]
+  if test x$USE_QT5 = xyes ; then
+      enable_concept_checks=no
+  fi
 )
 
 ### set up optimization
@@ -285,6 +300,9 @@ if test x$GXX = xyes; then
     fi
   fi
   if test "$ac_env_CPPFLAGS_set" != set; then
+    if test x$USE_QT5 = xyes ; then
+        AS_CASE([$host], [*mingw*|*cygwin*], [], [CPPFLAGS="-fPIC $CPPFLAGS"])
+    fi
     if test x$enable_warnings = xyes ; then
         case $gxx_version in
             3.1*|3.2*|3.3*)
index 7852c8a06e6771f8646b85684bcaaebd08de7f7b..1346146ce7a73511d219f21d32b06eca191a3a7e 100644 (file)
@@ -112,14 +112,6 @@ EOF
 dnl start here
 AC_DEFUN([QT_DO_IT_ALL],
 [
-       AC_MSG_CHECKING([whether Qt5 is requested])
-       dnl Default is Qt4
-       AC_ARG_ENABLE([qt5],
-         [  --enable-qt5            use Qt5 for building],
-         USE_QT5=$enableval, USE_QT5=no)
-       AC_MSG_RESULT([$USE_QT5])
-       AC_SUBST([USE_QT5])
-
        dnl this variable is precious
        AC_ARG_VAR(QTDIR, [the place where the Qt files are, e.g. /usr/lib/qt4])
 
index 77fe598f8b113bde5cb0955bb75b7e4ca644490d..e2e7fb4e50c673ff51ae933cc37b0a69364e5592 100644 (file)
@@ -13,6 +13,7 @@ AC_CONFIG_AUX_DIR(config)
 # First check the version
 LYX_CHECK_VERSION
 LYX_VERSION_SUFFIX
+LYX_CHECK_QT5
 # Check how the files should be packaged
 AC_CANONICAL_TARGET
 LYX_USE_PACKAGING