diff --git a/acinclude.m4 b/acinclude.m4 index 61df08b35..07a983840 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -965,6 +965,7 @@ cd $gb_save AC_DEFUN([GB_COMPONENT_PKG_CONFIG], [ + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) AC_ARG_ENABLE( $1, [ --enable-$1 enable $3 (default: yes)], @@ -994,17 +995,17 @@ AC_DEFUN([GB_COMPONENT_PKG_CONFIG], have_$1=yes gb_testval="" - pkg-config --silence-errors --exists $5 + $PKG_CONFIG --silence-errors --exists $5 if test $? -eq "0"; then ## Checking for headers - $2_INC="`pkg-config --cflags $5`" + $2_INC="`$PKG_CONFIG --cflags $5`" ## Checking for libraries - $2_LIB="`pkg-config --libs-only-l $5`" - $2_LDFLAGS="`pkg-config --libs-only-L $5` `pkg-config --libs-only-other $5`" + $2_LIB="`$PKG_CONFIG --libs-only-l $5`" + $2_LDFLAGS="`$PKG_CONFIG --libs-only-L $5` `$PKG_CONFIG --libs-only-other $5`" $2_DIR=$4 else @@ -1031,7 +1032,7 @@ AC_DEFUN([GB_COMPONENT_PKG_CONFIG], for pkgcmp in $5 do - pkg-config --silence-errors --exists $pkgcmp + $PKG_CONFIG --silence-errors --exists $pkgcmp if test $? -eq "1"; then GB_WARNING([Unable to met pkg-config requirement: $pkgcmp]) fi diff --git a/gb.ncurses/configure.ac b/gb.ncurses/configure.ac index c13305671..6117c955e 100644 --- a/gb.ncurses/configure.ac +++ b/gb.ncurses/configure.ac @@ -6,6 +6,7 @@ AC_CONFIG_MACRO_DIR([m4]) GB_INIT(gb.ncurses) AC_PROG_LIBTOOL +PKG_PROG_PKG_CONFIG # Most distributions I have seen apparently provide the ncurses and panel # pkg-config files (which may be synonymous with ncursesw and panelw for @@ -13,7 +14,7 @@ AC_PROG_LIBTOOL # # We should prefer linking with the wide-character version but still # allow to compile on systems that don't have ncursesw pkg-config files. -pkg-config --silence-errors --exists ncursesw panelw +$PKG_CONFIG --silence-errors --exists ncursesw panelw if test $? -eq "0" then gb_ncurses_pkgconfig_names="ncursesw panelw" else gb_ncurses_pkgconfig_names="ncurses panel" diff --git a/gb.pdf/configure.ac b/gb.pdf/configure.ac index a695f13bd..d2d0245aa 100644 --- a/gb.pdf/configure.ac +++ b/gb.pdf/configure.ac @@ -6,6 +6,7 @@ AC_CONFIG_MACRO_DIR([m4]) GB_INIT(gb.pdf) AC_PROG_LIBTOOL +PKG_PROG_PKG_CONFIG GB_COMPONENT_PKG_CONFIG( poppler, POPPLER, gb.pdf, [src], @@ -13,23 +14,23 @@ GB_COMPONENT_PKG_CONFIG( ) if test "$have_poppler" = "yes"; then - pkg-config --atleast-version=0.58.0 poppler + $PKG_CONFIG --atleast-version=0.58.0 poppler AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_58, $((1-$?)), Poppler version >= 0.58) - pkg-config --atleast-version=0.64.0 poppler + $PKG_CONFIG --atleast-version=0.64.0 poppler AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_64, $((1-$?)), Poppler version >= 0.64) - pkg-config --atleast-version=0.71.0 poppler + $PKG_CONFIG --atleast-version=0.71.0 poppler AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_71, $((1-$?)), Poppler version >= 0.71) - pkg-config --atleast-version=0.72.0 poppler + $PKG_CONFIG --atleast-version=0.72.0 poppler AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_72, $((1-$?)), Poppler version >= 0.72) - pkg-config --atleast-version=0.76.0 poppler + $PKG_CONFIG --atleast-version=0.76.0 poppler AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_76, $((1-$?)), Poppler version >= 0.76) - pkg-config --atleast-version=0.83.0 poppler + $PKG_CONFIG --atleast-version=0.83.0 poppler AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_83, $((1-$?)), Poppler version >= 0.83) - pkg-config --atleast-version=0.85.0 poppler + $PKG_CONFIG --atleast-version=0.85.0 poppler AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_85, $((1-$?)), Poppler version >= 0.85) - pkg-config --atleast-version=0.86.0 poppler + $PKG_CONFIG --atleast-version=0.86.0 poppler AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_86, $((1-$?)), Poppler version >= 0.86) - pkg-config --atleast-version=21.06.0 poppler + $PKG_CONFIG --atleast-version=21.06.0 poppler AC_DEFINE_UNQUOTED(POPPLER_VERSION_21_06_0, $((1-$?)), Poppler version >= 21.06.0) fi diff --git a/gb.qt4/configure.ac b/gb.qt4/configure.ac index cf9478461..ad1dabb2d 100644 --- a/gb.qt4/configure.ac +++ b/gb.qt4/configure.ac @@ -6,6 +6,7 @@ AC_CONFIG_MACRO_DIR([m4]) GB_INIT(gb.qt4) AC_PROG_LIBTOOL +PKG_PROG_PKG_CONFIG AC_ARG_ENABLE( qt-translation, @@ -46,7 +47,7 @@ GB_COMPONENT_PKG_CONFIG( 'QtCore >= 4.5.0' QtGui QtOpenGL x11 gl ) -MOC=`pkg-config --variable=moc_location QtCore` +MOC=`$PKG_CONFIG --variable=moc_location QtCore` AC_SUBST(MOC) AC_OUTPUT( \ diff --git a/gb.qt5/configure.ac b/gb.qt5/configure.ac index ccfeb9497..16c621600 100644 --- a/gb.qt5/configure.ac +++ b/gb.qt5/configure.ac @@ -6,6 +6,7 @@ AC_CONFIG_MACRO_DIR([m4]) GB_INIT(gb.qt5) AC_PROG_LIBTOOL +PKG_PROG_PKG_CONFIG GB_CHECK_XWINDOW AM_CONDITIONAL(XWINDOW, test x"$have_x" = xyes) @@ -35,7 +36,7 @@ GB_COMPONENT_PKG_CONFIG( 'Qt5Core >= 5.5.0' Qt5WebEngineWidgets ) -pkg-config --atleast-version 5.4.0 Qt5Core +$PKG_CONFIG --atleast-version 5.4.0 Qt5Core if test $? != 0; then AC_DEFINE_UNQUOTED(QT_OLD_OPENGL, 1, Use deprecated OpenGL widget) QT_OPENGL_SUPPORT=Qt5OpenGL @@ -54,7 +55,7 @@ GB_COMPONENT_PKG_CONFIG( 'Qt5Core >= 5.3.0' Qt5Gui Qt5Widgets x11 ) -MOC=`pkg-config --variable=host_bins Qt5Core`/moc +MOC=`$PKG_CONFIG --variable=host_bins Qt5Core`/moc AC_SUBST(MOC) AC_OUTPUT( \