diff options
Diffstat (limited to 'pkg.m4')
| -rw-r--r-- | pkg.m4 | 21 |
1 files changed, 6 insertions, 15 deletions
@@ -1,5 +1,5 @@ # pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*- -# serial 13 (pkgconf) +# serial 16 (pkgconf) dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> @@ -44,8 +44,8 @@ m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ -dnl PKG_PROG_PKG_CONFIG([MIN-VERSION], [ACTION-IF-NOT-FOUND]) -dnl --------------------------------------------------------- +dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) +dnl ---------------------------------- dnl Since: 0.16 dnl dnl Search for the pkg-config tool and set the PKG_CONFIG variable to @@ -53,12 +53,6 @@ dnl first found in the path. Checks that the version of pkg-config found dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is dnl used since that's the first version where most current features of dnl pkg-config existed. -dnl -dnl If pkg-config is not found or older than specified, it will result -dnl in an empty PKG_CONFIG variable. To avoid widespread issues with -dnl scripts not checking it, ACTION-IF-NOT-FOUND defaults to aborting. -dnl You can specify [PKG_CONFIG=false] as an action instead, which would -dnl result in pkg-config tests failing, but no bogus error messages. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) @@ -79,9 +73,6 @@ if test -n "$PKG_CONFIG"; then AC_MSG_RESULT([no]) PKG_CONFIG="" fi -fi -if test -z "$PKG_CONFIG"; then - m4_default([$2], [AC_MSG_ERROR([pkg-config not found])]) fi[]dnl ])dnl PKG_PROG_PKG_CONFIG @@ -182,13 +173,13 @@ _PKG_TEXT])[]dnl elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( -[The pkg-config script could not be found or is too old. Make sure it +[A pkg-config implementation could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT -To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl +To get a pkg-config implementation, see <http://github.com/pkgconf/pkgconf>.])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS @@ -309,7 +300,7 @@ AC_ARG_WITH(with_arg, [AS_TR_SH([with_]with_arg)=def_arg]) AS_CASE([$AS_TR_SH([with_]with_arg)], - [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], + [yes],[PKG_CHECK_MODULES([$1],[$2],[$3],[$4])], [auto],[PKG_CHECK_MODULES([$1],[$2], [m4_n([def_action_if_found]) $3], [m4_n([def_action_if_not_found]) $4])]) |
