configure.ac |   13 +++++++++++++
 1 file changed, 13 insertions(+)

New commits:
commit 3b4ecb07a6f0295441317ab889796034506bc8af
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Fri Sep 20 15:21:34 2024 +0200
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Fri Sep 20 21:25:03 2024 +0200

    Invent --with-extra-cc/cxx-flags
    
    Change-Id: I22ce959f1fe74b8eb1fa0d0fbffe8b257e7f3110
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173731
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>
    Tested-by: Jenkins

diff --git a/configure.ac b/configure.ac
index 698fadaf1940..32df06e53e70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2190,6 +2190,16 @@ AC_ARG_ENABLE(cli,
         [Disable the generation of old CLI bindings.]),
 ,enable_cli=yes)
 
+AC_ARG_WITH(extra-cc-flags,
+    AS_HELP_STRING([--with-extra-cc-flags=...],
+        [Specify extra flags (like GCC's -fdiagnostics-color=always, which is 
useful in combination
+         with the GNU Make --output-sync option) to add to the end of the CC 
variable.]))
+
+AC_ARG_WITH(extra-cxx-flags,
+    AS_HELP_STRING([--with-extra-cxx-flags=...],
+        [Specify extra flags (like GCC's -fdiagnostics-color=always, which is 
useful in combination
+         with the GNU Make --output-sync option) to add to the end of the CXX 
variable.]))
+
 dnl ===================================================================
 dnl Optional Packages (--with/without-)
 dnl ===================================================================
@@ -7323,6 +7333,9 @@ if test "$_os" != "WINNT"; then
     fi
 fi
 
+CC="$CC $with_extra_cc_flags"
+CXX="$CXX $with_extra_cxx_flags"
+
 dnl check for GNU C++ compiler version
 if test "$GXX" = "yes" -a -z "$COM_IS_CLANG"; then
     AC_MSG_CHECKING([the GNU C++ compiler version])

Reply via email to