diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-08-11 20:55:14 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-08-12 20:21:33 +0200 |
commit | b0c4ca9e088cbff5a5dbc5e95486397041a51d4a (patch) | |
tree | e43eb1b6b1070150c3a43f05fdd39120e301e885 /configure.ac | |
parent | dd76c656017b11d30b48a2df6c20e4b42f35a23c (diff) |
make --with-idlc-cpp=cpp work for gcc cpp as a ucpp replacement
e.g. the example of
https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1524638
has the same output .urd using cpp with these flags as ucpp created
Change-Id: Iadfd2deba7d365c66c3260fd6736c031987e107c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120347
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index f4a0071e1dd9..bafd5b39e135 100644 --- a/configure.ac +++ b/configure.ac @@ -8807,9 +8807,22 @@ dnl =================================================================== dnl Check for C preprocessor to use dnl =================================================================== AC_MSG_CHECKING([which C preprocessor to use in idlc]) +SYSTEM_UCPP_IS_GCC= if test -n "$with_idlc_cpp"; then AC_MSG_RESULT([$with_idlc_cpp]) AC_PATH_PROG(SYSTEM_UCPP, $with_idlc_cpp) + AC_MSG_CHECKING([if $with_idlc_cpp is GCC CPP]) + # ucpp will accept -v (to output version), warn about the others as unknown + # and return 1 (due to -v) + # gcc will accept -v (as verbose), --version (to output version) and -nostdinc + # and return 0 (due to --version ) if all options are supported + $SYSTEM_UCPP -v --version -nostdinc >/dev/null 2>/dev/null + if test $? -eq 0; then + SYSTEM_UCPP_IS_GCC=TRUE + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi else AC_MSG_RESULT([ucpp]) AC_MSG_CHECKING([which ucpp tp use]) @@ -8822,6 +8835,7 @@ else fi fi AC_SUBST(SYSTEM_UCPP) +AC_SUBST(SYSTEM_UCPP_IS_GCC) dnl =================================================================== dnl Check for epm (not needed for Windows) |