Mercurial > masqmail
comparison 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 |
comparison
equal
deleted
inserted
replaced
51:8a92de5e8907 | 52:c80a5730bcc5 |
---|---|
18 You have another version of autoconf. It may work, but is not guaranteed to. | 18 You have another version of autoconf. It may work, but is not guaranteed to. |
19 If you have problems, you may need to regenerate the build system entirely. | 19 If you have problems, you may need to regenerate the build system entirely. |
20 To do so, use the procedure documented by the package, typically `autoreconf'.])]) | 20 To do so, use the procedure documented by the package, typically `autoreconf'.])]) |
21 | 21 |
22 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- | 22 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- |
23 # serial 1 (pkg-config-0.24) | |
23 # | 24 # |
24 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. | 25 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. |
25 # | 26 # |
26 # This program is free software; you can redistribute it and/or modify | 27 # This program is free software; you can redistribute it and/or modify |
27 # it under the terms of the GNU General Public License as published by | 28 # it under the terms of the GNU General Public License as published by |
45 # PKG_PROG_PKG_CONFIG([MIN-VERSION]) | 46 # PKG_PROG_PKG_CONFIG([MIN-VERSION]) |
46 # ---------------------------------- | 47 # ---------------------------------- |
47 AC_DEFUN([PKG_PROG_PKG_CONFIG], | 48 AC_DEFUN([PKG_PROG_PKG_CONFIG], |
48 [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) | 49 [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) |
49 m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) | 50 m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) |
50 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl | 51 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) |
52 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) | |
53 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) | |
54 | |
51 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then | 55 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then |
52 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) | 56 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) |
53 fi | 57 fi |
54 if test -n "$PKG_CONFIG"; then | 58 if test -n "$PKG_CONFIG"; then |
55 _pkg_min_version=m4_default([$1], [0.9.0]) | 59 _pkg_min_version=m4_default([$1], [0.9.0]) |
58 AC_MSG_RESULT([yes]) | 62 AC_MSG_RESULT([yes]) |
59 else | 63 else |
60 AC_MSG_RESULT([no]) | 64 AC_MSG_RESULT([no]) |
61 PKG_CONFIG="" | 65 PKG_CONFIG="" |
62 fi | 66 fi |
63 | |
64 fi[]dnl | 67 fi[]dnl |
65 ])# PKG_PROG_PKG_CONFIG | 68 ])# PKG_PROG_PKG_CONFIG |
66 | 69 |
67 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | 70 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
68 # | 71 # |
69 # Check to see whether a particular set of modules exists. Similar | 72 # Check to see whether a particular set of modules exists. Similar |
70 # to PKG_CHECK_MODULES(), but does not set variables or print errors. | 73 # to PKG_CHECK_MODULES(), but does not set variables or print errors. |
71 # | 74 # |
72 # | 75 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
73 # Similar to PKG_CHECK_MODULES, make sure that the first instance of | 76 # only at the first occurence in configure.ac, so if the first place |
74 # this or PKG_CHECK_MODULES is called, or make sure to call | 77 # it's called might be skipped (such as if it is within an "if", you |
75 # PKG_CHECK_EXISTS manually | 78 # have to call PKG_CHECK_EXISTS manually |
76 # -------------------------------------------------------------- | 79 # -------------------------------------------------------------- |
77 AC_DEFUN([PKG_CHECK_EXISTS], | 80 AC_DEFUN([PKG_CHECK_EXISTS], |
78 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | 81 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
79 if test -n "$PKG_CONFIG" && \ | 82 if test -n "$PKG_CONFIG" && \ |
80 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then | 83 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then |
81 m4_ifval([$2], [$2], [:]) | 84 m4_default([$2], [:]) |
82 m4_ifvaln([$3], [else | 85 m4_ifvaln([$3], [else |
83 $3])dnl | 86 $3])dnl |
84 fi]) | 87 fi]) |
85 | 88 |
86 | |
87 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) | 89 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) |
88 # --------------------------------------------- | 90 # --------------------------------------------- |
89 m4_define([_PKG_CONFIG], | 91 m4_define([_PKG_CONFIG], |
90 [if test -n "$PKG_CONFIG"; then | 92 [if test -n "$$1"; then |
91 if test -n "$$1"; then | 93 pkg_cv_[]$1="$$1" |
92 pkg_cv_[]$1="$$1" | 94 elif test -n "$PKG_CONFIG"; then |
93 else | 95 PKG_CHECK_EXISTS([$3], |
94 PKG_CHECK_EXISTS([$3], | 96 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], |
95 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], | 97 [pkg_failed=yes]) |
96 [pkg_failed=yes]) | 98 else |
97 fi | 99 pkg_failed=untried |
98 else | |
99 pkg_failed=untried | |
100 fi[]dnl | 100 fi[]dnl |
101 ])# _PKG_CONFIG | 101 ])# _PKG_CONFIG |
102 | 102 |
103 # _PKG_SHORT_ERRORS_SUPPORTED | 103 # _PKG_SHORT_ERRORS_SUPPORTED |
104 # ----------------------------- | 104 # ----------------------------- |
136 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS | 136 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS |
137 and $1[]_LIBS to avoid the need to call pkg-config. | 137 and $1[]_LIBS to avoid the need to call pkg-config. |
138 See the pkg-config man page for more details.]) | 138 See the pkg-config man page for more details.]) |
139 | 139 |
140 if test $pkg_failed = yes; then | 140 if test $pkg_failed = yes; then |
141 AC_MSG_RESULT([no]) | |
141 _PKG_SHORT_ERRORS_SUPPORTED | 142 _PKG_SHORT_ERRORS_SUPPORTED |
142 if test $_pkg_short_errors_supported = yes; then | 143 if test $_pkg_short_errors_supported = yes; then |
143 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` | 144 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` |
144 else | 145 else |
145 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` | 146 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` |
146 fi | 147 fi |
147 # Put the nasty error message in config.log where it belongs | 148 # Put the nasty error message in config.log where it belongs |
148 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD | 149 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD |
149 | 150 |
150 ifelse([$4], , [AC_MSG_ERROR(dnl | 151 m4_default([$4], [AC_MSG_ERROR( |
151 [Package requirements ($2) were not met: | 152 [Package requirements ($2) were not met: |
152 | 153 |
153 $$1_PKG_ERRORS | 154 $$1_PKG_ERRORS |
154 | 155 |
155 Consider adjusting the PKG_CONFIG_PATH environment variable if you | 156 Consider adjusting the PKG_CONFIG_PATH environment variable if you |
156 installed software in a non-standard prefix. | 157 installed software in a non-standard prefix. |
157 | 158 |
158 _PKG_TEXT | 159 _PKG_TEXT])dnl |
159 ])], | 160 ]) |
160 [AC_MSG_RESULT([no]) | |
161 $4]) | |
162 elif test $pkg_failed = untried; then | 161 elif test $pkg_failed = untried; then |
163 ifelse([$4], , [AC_MSG_FAILURE(dnl | 162 AC_MSG_RESULT([no]) |
163 m4_default([$4], [AC_MSG_FAILURE( | |
164 [The pkg-config script could not be found or is too old. Make sure it | 164 [The pkg-config script could not be found or is too old. Make sure it |
165 is in your PATH or set the PKG_CONFIG environment variable to the full | 165 is in your PATH or set the PKG_CONFIG environment variable to the full |
166 path to pkg-config. | 166 path to pkg-config. |
167 | 167 |
168 _PKG_TEXT | 168 _PKG_TEXT |
169 | 169 |
170 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], | 170 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl |
171 [$4]) | 171 ]) |
172 else | 172 else |
173 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS | 173 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS |
174 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS | 174 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS |
175 AC_MSG_RESULT([yes]) | 175 AC_MSG_RESULT([yes]) |
176 ifelse([$3], , :, [$3]) | 176 $3 |
177 fi[]dnl | 177 fi[]dnl |
178 ])# PKG_CHECK_MODULES | 178 ])# PKG_CHECK_MODULES |
179 | 179 |
180 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | 180 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
181 # | 181 # |