From: Helmut Grohne Subject: prefix pkg-config with $ac_tool_prefix to support cross compilation Index: wvstreams-4.6.1/configure.ac =================================================================== --- wvstreams-4.6.1.orig/configure.ac +++ wvstreams-4.6.1/configure.ac @@ -345,8 +345,8 @@ LDFLAGS="$LDFLAGS_save" # Detect pkg-config -AC_PATH_PROG([PKGCONFIG], [pkg-config], [no]) -if test "$PKGCONFIG" = "no"; then +PKG_PROG_PKG_CONFIG +if test "x$PKG_CONFIG" = "x"; then AC_MSG_WARN([pkg-config is not installed]) fi @@ -370,10 +370,10 @@ if test "$with_dbus" != "no"; then if test "$with_dbus" = "" -o "$with_dbus" = "yes"; then AC_MSG_CHECKING([Checking that D-Bus version greater than 1.2.14 installed.]) - if pkg-config --atleast-version 1.2.14 dbus-1; then - WV_APPEND(CPPFLAGS, [`pkg-config --cflags dbus-1`]) - WV_APPEND(LDFLAGS, [`pkg-config --libs-only-L dbus-1`]) - LIBS_DBUS=`pkg-config --libs-only-l dbus-1` + if $PKG_CONFIG --atleast-version 1.2.14 dbus-1; then + WV_APPEND(CPPFLAGS, [`$PKG_CONFIG --cflags dbus-1`]) + WV_APPEND(LDFLAGS, [`$PKG_CONFIG --libs-only-L dbus-1`]) + LIBS_DBUS=`$PKG_CONFIG --libs-only-l dbus-1` AC_MSG_RESULT([yes]) else with_dbus=no @@ -497,7 +497,7 @@ CPPFLAGS_save="$CPPFLAGS" LDFLAGS_save="$LDFLAGS" LIBS_save="$LIBS" - for wv_qtdir in $with_qt $QTDIR $QT_SEARCH_PATH $(pkg-config --variable=prefix qt-mt); do + for wv_qtdir in $with_qt $QTDIR $QT_SEARCH_PATH $($PKG_CONFIG --variable=prefix qt-mt); do eval wv_qtdir="$wv_qtdir" CPPFLAGS="$CPPFLAGS_save -I$wv_qtdir/include -I$wv_qtdir/include/qt3" LDFLAGS="$LDFLAGS_save -L$wv_qtdir/lib" Index: wvstreams-4.6.1/autogen.sh =================================================================== --- wvstreams-4.6.1.orig/autogen.sh +++ wvstreams-4.6.1/autogen.sh @@ -1,5 +1,6 @@ #!/bin/sh set -e +aclocal autoheader autoconf (cd argp && autoconf)