masqmail
diff aclocal.m4 @ 52:c80a5730bcc5
next release will be 0.2.23
author | meillo@marmaro.de |
---|---|
date | Thu, 27 May 2010 13:33:14 +0200 |
parents | 9cb4031fa5e0 |
children | e3e1a030c703 |
line diff
1.1 --- a/aclocal.m4 Fri May 21 14:45:56 2010 +0200 1.2 +++ b/aclocal.m4 Thu May 27 13:33:14 2010 +0200 1.3 @@ -20,6 +20,7 @@ 1.4 To do so, use the procedure documented by the package, typically `autoreconf'.])]) 1.5 1.6 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 1.7 +# serial 1 (pkg-config-0.24) 1.8 # 1.9 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 1.10 # 1.11 @@ -47,7 +48,10 @@ 1.12 AC_DEFUN([PKG_PROG_PKG_CONFIG], 1.13 [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 1.14 m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 1.15 -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 1.16 +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 1.17 +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 1.18 +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 1.19 + 1.20 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 1.21 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 1.22 fi 1.23 @@ -60,7 +64,6 @@ 1.24 AC_MSG_RESULT([no]) 1.25 PKG_CONFIG="" 1.26 fi 1.27 - 1.28 fi[]dnl 1.29 ])# PKG_PROG_PKG_CONFIG 1.30 1.31 @@ -69,34 +72,31 @@ 1.32 # Check to see whether a particular set of modules exists. Similar 1.33 # to PKG_CHECK_MODULES(), but does not set variables or print errors. 1.34 # 1.35 -# 1.36 -# Similar to PKG_CHECK_MODULES, make sure that the first instance of 1.37 -# this or PKG_CHECK_MODULES is called, or make sure to call 1.38 -# PKG_CHECK_EXISTS manually 1.39 +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1.40 +# only at the first occurence in configure.ac, so if the first place 1.41 +# it's called might be skipped (such as if it is within an "if", you 1.42 +# have to call PKG_CHECK_EXISTS manually 1.43 # -------------------------------------------------------------- 1.44 AC_DEFUN([PKG_CHECK_EXISTS], 1.45 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1.46 if test -n "$PKG_CONFIG" && \ 1.47 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 1.48 - m4_ifval([$2], [$2], [:]) 1.49 + m4_default([$2], [:]) 1.50 m4_ifvaln([$3], [else 1.51 $3])dnl 1.52 fi]) 1.53 1.54 - 1.55 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 1.56 # --------------------------------------------- 1.57 m4_define([_PKG_CONFIG], 1.58 -[if test -n "$PKG_CONFIG"; then 1.59 - if test -n "$$1"; then 1.60 - pkg_cv_[]$1="$$1" 1.61 - else 1.62 - PKG_CHECK_EXISTS([$3], 1.63 - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 1.64 - [pkg_failed=yes]) 1.65 - fi 1.66 -else 1.67 - pkg_failed=untried 1.68 +[if test -n "$$1"; then 1.69 + pkg_cv_[]$1="$$1" 1.70 + elif test -n "$PKG_CONFIG"; then 1.71 + PKG_CHECK_EXISTS([$3], 1.72 + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 1.73 + [pkg_failed=yes]) 1.74 + else 1.75 + pkg_failed=untried 1.76 fi[]dnl 1.77 ])# _PKG_CONFIG 1.78 1.79 @@ -138,16 +138,17 @@ 1.80 See the pkg-config man page for more details.]) 1.81 1.82 if test $pkg_failed = yes; then 1.83 + AC_MSG_RESULT([no]) 1.84 _PKG_SHORT_ERRORS_SUPPORTED 1.85 if test $_pkg_short_errors_supported = yes; then 1.86 - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 1.87 + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 1.88 else 1.89 - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 1.90 + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 1.91 fi 1.92 # Put the nasty error message in config.log where it belongs 1.93 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1.94 1.95 - ifelse([$4], , [AC_MSG_ERROR(dnl 1.96 + m4_default([$4], [AC_MSG_ERROR( 1.97 [Package requirements ($2) were not met: 1.98 1.99 $$1_PKG_ERRORS 1.100 @@ -155,25 +156,24 @@ 1.101 Consider adjusting the PKG_CONFIG_PATH environment variable if you 1.102 installed software in a non-standard prefix. 1.103 1.104 -_PKG_TEXT 1.105 -])], 1.106 - [AC_MSG_RESULT([no]) 1.107 - $4]) 1.108 +_PKG_TEXT])dnl 1.109 + ]) 1.110 elif test $pkg_failed = untried; then 1.111 - ifelse([$4], , [AC_MSG_FAILURE(dnl 1.112 + AC_MSG_RESULT([no]) 1.113 + m4_default([$4], [AC_MSG_FAILURE( 1.114 [The pkg-config script could not be found or is too old. Make sure it 1.115 is in your PATH or set the PKG_CONFIG environment variable to the full 1.116 path to pkg-config. 1.117 1.118 _PKG_TEXT 1.119 1.120 -To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 1.121 - [$4]) 1.122 +To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl 1.123 + ]) 1.124 else 1.125 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1.126 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1.127 AC_MSG_RESULT([yes]) 1.128 - ifelse([$3], , :, [$3]) 1.129 + $3 1.130 fi[]dnl 1.131 ])# PKG_CHECK_MODULES 1.132