[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-5-2+backports' - configure.ac
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Mar 13 14:32:19 UTC 2019
configure.ac | 137 +++++++++++++++++++++++++++++++----------------------------
1 file changed, 73 insertions(+), 64 deletions(-)
New commits:
commit 733f31f068348f9fdc70259b9585506e26b32f9f
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Feb 14 15:56:00 2017 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed Mar 13 15:31:54 2019 +0100
Keep original CFLAGS etc. unmodified in configure.ac
...even if they are modified for the remaineder of configure.ac itself in the
MSVC 2015-specific code checking for UCRT. Otherwise, the flags determined by
LinkTarget.mk would lack any debug and optimization flags when building with
MSVC 2015.
Change-Id: Ib78418e0ad04bf2eae16a14b5c0904ba4f582eca
Reviewed-on: https://gerrit.libreoffice.org/34248
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit ed4b23548d28941f9b2c75207832afcb6c6ad0b3)
Reviewed-on: https://gerrit.libreoffice.org/69176
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/configure.ac b/configure.ac
index b7ec09a5f4ab..a8026700e3b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -926,6 +926,75 @@ AC_SUBST(WITH_MINGW)
AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_LIBS)
+# Check for explicit A/C/CXX/OBJC/OBJCXX/LDFLAGS.
+# By default use the ones specified by our build system,
+# but explicit override is possible.
+AC_MSG_CHECKING(for explicit AFLAGS)
+if test -n "$AFLAGS"; then
+ AC_MSG_RESULT([$AFLAGS])
+ x_AFLAGS=
+else
+ AC_MSG_RESULT(no)
+ x_AFLAGS=[\#]
+fi
+AC_MSG_CHECKING(for explicit CFLAGS)
+if test -n "$CFLAGS"; then
+ AC_MSG_RESULT([$CFLAGS])
+ x_CFLAGS=
+else
+ AC_MSG_RESULT(no)
+ x_CFLAGS=[\#]
+fi
+AC_MSG_CHECKING(for explicit CXXFLAGS)
+if test -n "$CXXFLAGS"; then
+ AC_MSG_RESULT([$CXXFLAGS])
+ x_CXXFLAGS=
+else
+ AC_MSG_RESULT(no)
+ x_CXXFLAGS=[\#]
+fi
+AC_MSG_CHECKING(for explicit OBJCFLAGS)
+if test -n "$OBJCFLAGS"; then
+ AC_MSG_RESULT([$OBJCFLAGS])
+ x_OBJCFLAGS=
+else
+ AC_MSG_RESULT(no)
+ x_OBJCFLAGS=[\#]
+fi
+AC_MSG_CHECKING(for explicit OBJCXXFLAGS)
+if test -n "$OBJCXXFLAGS"; then
+ AC_MSG_RESULT([$OBJCXXFLAGS])
+ x_OBJCXXFLAGS=
+else
+ AC_MSG_RESULT(no)
+ x_OBJCXXFLAGS=[\#]
+fi
+AC_MSG_CHECKING(for explicit LDFLAGS)
+if test -n "$LDFLAGS"; then
+ AC_MSG_RESULT([$LDFLAGS])
+ x_LDFLAGS=
+else
+ AC_MSG_RESULT(no)
+ x_LDFLAGS=[\#]
+fi
+AC_SUBST(AFLAGS)
+AC_SUBST(CFLAGS)
+AC_SUBST(CXXFLAGS)
+AC_SUBST(OBJCFLAGS)
+AC_SUBST(OBJCXXFLAGS)
+AC_SUBST(LDFLAGS)
+AC_SUBST(x_AFLAGS)
+AC_SUBST(x_CFLAGS)
+AC_SUBST(x_CXXFLAGS)
+AC_SUBST(x_OBJCFLAGS)
+AC_SUBST(x_OBJCXXFLAGS)
+AC_SUBST(x_LDFLAGS)
+
+dnl These are potentially set for MSVC, in the code checking for UCRT below:
+my_original_CFLAGS=$CFLAGS
+my_original_CXXFLAGS=$CXXFLAGS
+my_original_CPPFLAGS=$CPPFLAGS
+
dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
dnl Needs to precede the AC_SEARCH_LIBS call below, which apparently calls
dnl AC_PROG_CC internally.
@@ -4039,70 +4108,6 @@ if test "$enable_release_build" != yes -a \( -n "$ENABLE_SYMBOLS" -o -n "$ENABLE
fi
AC_SUBST(XCODE_DEBUG_INFORMATION_FORMAT)
-# Check for explicit A/C/CXX/OBJC/OBJCXX/LDFLAGS.
-# By default use the ones specified by our build system,
-# but explicit override is possible.
-AC_MSG_CHECKING(for explicit AFLAGS)
-if test -n "$AFLAGS"; then
- AC_MSG_RESULT([$AFLAGS])
- x_AFLAGS=
-else
- AC_MSG_RESULT(no)
- x_AFLAGS=[\#]
-fi
-AC_MSG_CHECKING(for explicit CFLAGS)
-if test -n "$CFLAGS"; then
- AC_MSG_RESULT([$CFLAGS])
- x_CFLAGS=
-else
- AC_MSG_RESULT(no)
- x_CFLAGS=[\#]
-fi
-AC_MSG_CHECKING(for explicit CXXFLAGS)
-if test -n "$CXXFLAGS"; then
- AC_MSG_RESULT([$CXXFLAGS])
- x_CXXFLAGS=
-else
- AC_MSG_RESULT(no)
- x_CXXFLAGS=[\#]
-fi
-AC_MSG_CHECKING(for explicit OBJCFLAGS)
-if test -n "$OBJCFLAGS"; then
- AC_MSG_RESULT([$OBJCFLAGS])
- x_OBJCFLAGS=
-else
- AC_MSG_RESULT(no)
- x_OBJCFLAGS=[\#]
-fi
-AC_MSG_CHECKING(for explicit OBJCXXFLAGS)
-if test -n "$OBJCXXFLAGS"; then
- AC_MSG_RESULT([$OBJCXXFLAGS])
- x_OBJCXXFLAGS=
-else
- AC_MSG_RESULT(no)
- x_OBJCXXFLAGS=[\#]
-fi
-AC_MSG_CHECKING(for explicit LDFLAGS)
-if test -n "$LDFLAGS"; then
- AC_MSG_RESULT([$LDFLAGS])
- x_LDFLAGS=
-else
- AC_MSG_RESULT(no)
- x_LDFLAGS=[\#]
-fi
-AC_SUBST(AFLAGS)
-AC_SUBST(CFLAGS)
-AC_SUBST(CXXFLAGS)
-AC_SUBST(OBJCFLAGS)
-AC_SUBST(OBJCXXFLAGS)
-AC_SUBST(LDFLAGS)
-AC_SUBST(x_AFLAGS)
-AC_SUBST(x_CFLAGS)
-AC_SUBST(x_CXXFLAGS)
-AC_SUBST(x_OBJCFLAGS)
-AC_SUBST(x_OBJCXXFLAGS)
-AC_SUBST(x_LDFLAGS)
-
#
# determine CPUNAME, OS, ...
# The USING_X11 flag tells whether the host os uses X by default. Can be overriden with the --without-x option.
@@ -13185,6 +13190,10 @@ if test -f config_host_lang.mk; then
config_lang_md5=`$MD5SUM config_host_lang.mk | sed "s/ .*//"`
fi
+CFLAGS=$my_original_CFLAGS
+CXXFLAGS=$my_original_CXXFLAGS
+CPPFLAGS=$my_original_CPPFLAGS
+
AC_CONFIG_FILES([config_host.mk
config_host_lang.mk
Makefile
More information about the Libreoffice-commits
mailing list