Skip to content

Commit 7fc17a4

Browse files
committed
build: Collect all Cflags from pkg-config files.
* m4/acinclude.m4 (OCTAVE_CHECK_LIB, OCTAVE_CHECK_QT_VERSION): Call pkg-config with "--cflags" instead of "--cflags-only-I" to get all preprocessor flags (including "-D" and "-F" flags).
1 parent 40e7ac5 commit 7fc17a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

m4/acinclude.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ AC_DEFUN([OCTAVE_CHECK_LIB], [
976976
if test $[ac_octave_]patsubst([$1], [-], [_])_pkg_check = yes; then
977977
PKG_CHECK_EXISTS(m4_default([$9], [$1]), [
978978
if test -z "$m4_toupper(patsubst([$1], [-], [_]))_CPPFLAGS"; then
979-
m4_toupper(patsubst([$1], [-], [_]))_CPPFLAGS="$($PKG_CONFIG --cflags-only-I m4_default([$9], [$1]) | $SED -e 's/^ *$//')"
979+
m4_toupper(patsubst([$1], [-], [_]))_CPPFLAGS="$($PKG_CONFIG --cflags m4_default([$9], [$1]) | $SED -e 's/^ *$//')"
980980
fi
981981
if test -z "$m4_toupper(patsubst([$1], [-], [_]))_LDFLAGS"; then
982982
m4_toupper(patsubst([$1], [-], [_]))_LDFLAGS="$($PKG_CONFIG --libs-only-L m4_default([$9], [$1]) | $SED -e 's/^ *$//')"
@@ -2278,7 +2278,7 @@ AC_DEFUN([OCTAVE_CHECK_QT_VERSION], [AC_MSG_CHECKING([Qt version $1])
22782278
22792279
if test $build_qt_gui = yes; then
22802280
## Retrieve Qt compilation and linker flags
2281-
QT_CPPFLAGS="$($PKG_CONFIG --cflags-only-I $QT_MODULES | $SED -e 's/^ *$//')"
2281+
QT_CPPFLAGS="$($PKG_CONFIG --cflags $QT_MODULES | $SED -e 's/^ *$//')"
22822282
QT_LDFLAGS="$($PKG_CONFIG --libs-only-L $QT_MODULES | $SED -e 's/^ *$//')"
22832283
QT_LIBS="$($PKG_CONFIG --libs-only-l --libs-only-other $QT_MODULES | $SED -e 's/^ *$//')"
22842284

0 commit comments

Comments
 (0)