| OLD | NEW |
| 1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*- | 1 # generated automatically by aclocal 1.15 -*- Autoconf -*- |
| 2 | 2 |
| 3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, | 3 # Copyright (C) 1996-2014 Free Software Foundation, Inc. |
| 4 # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | 4 |
| 5 # This file is free software; the Free Software Foundation | 5 # This file is free software; the Free Software Foundation |
| 6 # gives unlimited permission to copy and/or distribute it, | 6 # gives unlimited permission to copy and/or distribute it, |
| 7 # with or without modifications, as long as this notice is preserved. | 7 # with or without modifications, as long as this notice is preserved. |
| 8 | 8 |
| 9 # This program is distributed in the hope that it will be useful, | 9 # This program is distributed in the hope that it will be useful, |
| 10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | 10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
| 11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | 11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
| 12 # PARTICULAR PURPOSE. | 12 # PARTICULAR PURPOSE. |
| 13 | 13 |
| 14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun
([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) |
| 14 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- | 15 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- |
| 16 # serial 1 (pkg-config-0.24) |
| 15 # | 17 # |
| 16 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. | 18 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. |
| 17 # | 19 # |
| 18 # This program is free software; you can redistribute it and/or modify | 20 # This program is free software; you can redistribute it and/or modify |
| 19 # it under the terms of the GNU General Public License as published by | 21 # it under the terms of the GNU General Public License as published by |
| 20 # the Free Software Foundation; either version 2 of the License, or | 22 # the Free Software Foundation; either version 2 of the License, or |
| 21 # (at your option) any later version. | 23 # (at your option) any later version. |
| 22 # | 24 # |
| 23 # This program is distributed in the hope that it will be useful, but | 25 # This program is distributed in the hope that it will be useful, but |
| 24 # WITHOUT ANY WARRANTY; without even the implied warranty of | 26 # WITHOUT ANY WARRANTY; without even the implied warranty of |
| 25 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 27 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 26 # General Public License for more details. | 28 # General Public License for more details. |
| 27 # | 29 # |
| 28 # You should have received a copy of the GNU General Public License | 30 # You should have received a copy of the GNU General Public License |
| 29 # along with this program; if not, write to the Free Software | 31 # along with this program; if not, write to the Free Software |
| 30 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 32 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 31 # | 33 # |
| 32 # As a special exception to the GNU General Public License, if you | 34 # As a special exception to the GNU General Public License, if you |
| 33 # distribute this file as part of a program that contains a | 35 # distribute this file as part of a program that contains a |
| 34 # configuration script generated by Autoconf, you may include it under | 36 # configuration script generated by Autoconf, you may include it under |
| 35 # the same distribution terms that you use for the rest of that program. | 37 # the same distribution terms that you use for the rest of that program. |
| 36 | 38 |
| 37 # PKG_PROG_PKG_CONFIG([MIN-VERSION]) | 39 # PKG_PROG_PKG_CONFIG([MIN-VERSION]) |
| 38 # ---------------------------------- | 40 # ---------------------------------- |
| 39 AC_DEFUN([PKG_PROG_PKG_CONFIG], | 41 AC_DEFUN([PKG_PROG_PKG_CONFIG], |
| 40 [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) | 42 [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) |
| 41 m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) | 43 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIB
S)))?$]) |
| 42 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl | 44 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) |
| 45 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) |
| 46 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) |
| 47 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search pa
th]) |
| 48 |
| 43 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then | 49 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then |
| 44 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) | 50 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) |
| 45 fi | 51 fi |
| 46 if test -n "$PKG_CONFIG"; then | 52 if test -n "$PKG_CONFIG"; then |
| 47 _pkg_min_version=m4_default([$1], [0.9.0]) | 53 _pkg_min_version=m4_default([$1], [0.9.0]) |
| 48 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) | 54 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) |
| 49 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then | 55 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then |
| 50 AC_MSG_RESULT([yes]) | 56 AC_MSG_RESULT([yes]) |
| 51 else | 57 else |
| 52 AC_MSG_RESULT([no]) | 58 AC_MSG_RESULT([no]) |
| 53 PKG_CONFIG="" | 59 PKG_CONFIG="" |
| 54 fi | 60 fi |
| 55 | |
| 56 fi[]dnl | 61 fi[]dnl |
| 57 ])# PKG_PROG_PKG_CONFIG | 62 ])# PKG_PROG_PKG_CONFIG |
| 58 | 63 |
| 59 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | 64 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
| 60 # | 65 # |
| 61 # Check to see whether a particular set of modules exists. Similar | 66 # Check to see whether a particular set of modules exists. Similar |
| 62 # to PKG_CHECK_MODULES(), but does not set variables or print errors. | 67 # to PKG_CHECK_MODULES(), but does not set variables or print errors. |
| 63 # | 68 # |
| 64 # | 69 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
| 65 # Similar to PKG_CHECK_MODULES, make sure that the first instance of | 70 # only at the first occurence in configure.ac, so if the first place |
| 66 # this or PKG_CHECK_MODULES is called, or make sure to call | 71 # it's called might be skipped (such as if it is within an "if", you |
| 67 # PKG_CHECK_EXISTS manually | 72 # have to call PKG_CHECK_EXISTS manually |
| 68 # -------------------------------------------------------------- | 73 # -------------------------------------------------------------- |
| 69 AC_DEFUN([PKG_CHECK_EXISTS], | 74 AC_DEFUN([PKG_CHECK_EXISTS], |
| 70 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | 75 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
| 71 if test -n "$PKG_CONFIG" && \ | 76 if test -n "$PKG_CONFIG" && \ |
| 72 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then | 77 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then |
| 73 m4_ifval([$2], [$2], [:]) | 78 m4_default([$2], [:]) |
| 74 m4_ifvaln([$3], [else | 79 m4_ifvaln([$3], [else |
| 75 $3])dnl | 80 $3])dnl |
| 76 fi]) | 81 fi]) |
| 77 | 82 |
| 78 | |
| 79 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) | 83 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) |
| 80 # --------------------------------------------- | 84 # --------------------------------------------- |
| 81 m4_define([_PKG_CONFIG], | 85 m4_define([_PKG_CONFIG], |
| 82 [if test -n "$$1"; then | 86 [if test -n "$$1"; then |
| 83 pkg_cv_[]$1="$$1" | 87 pkg_cv_[]$1="$$1" |
| 84 elif test -n "$PKG_CONFIG"; then | 88 elif test -n "$PKG_CONFIG"; then |
| 85 PKG_CHECK_EXISTS([$3], | 89 PKG_CHECK_EXISTS([$3], |
| 86 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], | 90 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` |
| 91 » » test "x$?" != "x0" && pkg_failed=yes ], |
| 87 [pkg_failed=yes]) | 92 [pkg_failed=yes]) |
| 88 else | 93 else |
| 89 pkg_failed=untried | 94 pkg_failed=untried |
| 90 fi[]dnl | 95 fi[]dnl |
| 91 ])# _PKG_CONFIG | 96 ])# _PKG_CONFIG |
| 92 | 97 |
| 93 # _PKG_SHORT_ERRORS_SUPPORTED | 98 # _PKG_SHORT_ERRORS_SUPPORTED |
| 94 # ----------------------------- | 99 # ----------------------------- |
| 95 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], | 100 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], |
| 96 [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | 101 [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
| (...skipping 24 matching lines...) Expand all Loading... |
| 121 AC_MSG_CHECKING([for $1]) | 126 AC_MSG_CHECKING([for $1]) |
| 122 | 127 |
| 123 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) | 128 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) |
| 124 _PKG_CONFIG([$1][_LIBS], [libs], [$2]) | 129 _PKG_CONFIG([$1][_LIBS], [libs], [$2]) |
| 125 | 130 |
| 126 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[
]_CFLAGS | 131 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[
]_CFLAGS |
| 127 and $1[]_LIBS to avoid the need to call pkg-config. | 132 and $1[]_LIBS to avoid the need to call pkg-config. |
| 128 See the pkg-config man page for more details.]) | 133 See the pkg-config man page for more details.]) |
| 129 | 134 |
| 130 if test $pkg_failed = yes; then | 135 if test $pkg_failed = yes; then |
| 136 AC_MSG_RESULT([no]) |
| 131 _PKG_SHORT_ERRORS_SUPPORTED | 137 _PKG_SHORT_ERRORS_SUPPORTED |
| 132 if test $_pkg_short_errors_supported = yes; then | 138 if test $_pkg_short_errors_supported = yes; then |
| 133 » $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2"
2>&1` | 139 » $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cfl
ags --libs "$2" 2>&1` |
| 134 else | 140 else |
| 135 » $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` | 141 » $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2"
2>&1` |
| 136 fi | 142 fi |
| 137 # Put the nasty error message in config.log where it belongs | 143 # Put the nasty error message in config.log where it belongs |
| 138 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD | 144 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD |
| 139 | 145 |
| 140 » ifelse([$4], , [AC_MSG_ERROR(dnl | 146 » m4_default([$4], [AC_MSG_ERROR( |
| 141 [Package requirements ($2) were not met: | 147 [Package requirements ($2) were not met: |
| 142 | 148 |
| 143 $$1_PKG_ERRORS | 149 $$1_PKG_ERRORS |
| 144 | 150 |
| 145 Consider adjusting the PKG_CONFIG_PATH environment variable if you | 151 Consider adjusting the PKG_CONFIG_PATH environment variable if you |
| 146 installed software in a non-standard prefix. | 152 installed software in a non-standard prefix. |
| 147 | 153 |
| 148 _PKG_TEXT | 154 _PKG_TEXT])[]dnl |
| 149 ])], | 155 ]) |
| 150 » » [AC_MSG_RESULT([no]) | |
| 151 $4]) | |
| 152 elif test $pkg_failed = untried; then | 156 elif test $pkg_failed = untried; then |
| 153 » ifelse([$4], , [AC_MSG_FAILURE(dnl | 157 » AC_MSG_RESULT([no]) |
| 158 » m4_default([$4], [AC_MSG_FAILURE( |
| 154 [The pkg-config script could not be found or is too old. Make sure it | 159 [The pkg-config script could not be found or is too old. Make sure it |
| 155 is in your PATH or set the PKG_CONFIG environment variable to the full | 160 is in your PATH or set the PKG_CONFIG environment variable to the full |
| 156 path to pkg-config. | 161 path to pkg-config. |
| 157 | 162 |
| 158 _PKG_TEXT | 163 _PKG_TEXT |
| 159 | 164 |
| 160 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], | 165 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl |
| 161 » » [$4]) | 166 ]) |
| 162 else | 167 else |
| 163 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS | 168 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS |
| 164 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS | 169 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS |
| 165 AC_MSG_RESULT([yes]) | 170 AC_MSG_RESULT([yes]) |
| 166 » ifelse([$3], , :, [$3]) | 171 » $3 |
| 167 fi[]dnl | 172 fi[]dnl |
| 168 ])# PKG_CHECK_MODULES | 173 ])# PKG_CHECK_MODULES |
| 169 | 174 |
| 175 |
| 176 # PKG_INSTALLDIR(DIRECTORY) |
| 177 # ------------------------- |
| 178 # Substitutes the variable pkgconfigdir as the location where a module |
| 179 # should install pkg-config .pc files. By default the directory is |
| 180 # $libdir/pkgconfig, but the default can be changed by passing |
| 181 # DIRECTORY. The user can override through the --with-pkgconfigdir |
| 182 # parameter. |
| 183 AC_DEFUN([PKG_INSTALLDIR], |
| 184 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) |
| 185 m4_pushdef([pkg_description], |
| 186 [pkg-config installation directory @<:@]pkg_default[@:>@]) |
| 187 AC_ARG_WITH([pkgconfigdir], |
| 188 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, |
| 189 [with_pkgconfigdir=]pkg_default) |
| 190 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) |
| 191 m4_popdef([pkg_default]) |
| 192 m4_popdef([pkg_description]) |
| 193 ]) dnl PKG_INSTALLDIR |
| 194 |
| 195 |
| 196 # PKG_NOARCH_INSTALLDIR(DIRECTORY) |
| 197 # ------------------------- |
| 198 # Substitutes the variable noarch_pkgconfigdir as the location where a |
| 199 # module should install arch-independent pkg-config .pc files. By |
| 200 # default the directory is $datadir/pkgconfig, but the default can be |
| 201 # changed by passing DIRECTORY. The user can override through the |
| 202 # --with-noarch-pkgconfigdir parameter. |
| 203 AC_DEFUN([PKG_NOARCH_INSTALLDIR], |
| 204 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) |
| 205 m4_pushdef([pkg_description], |
| 206 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) |
| 207 AC_ARG_WITH([noarch-pkgconfigdir], |
| 208 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, |
| 209 [with_noarch_pkgconfigdir=]pkg_default) |
| 210 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) |
| 211 m4_popdef([pkg_default]) |
| 212 m4_popdef([pkg_description]) |
| 213 ]) dnl PKG_NOARCH_INSTALLDIR |
| 214 |
| 215 |
| 216 # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, |
| 217 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
| 218 # ------------------------------------------- |
| 219 # Retrieves the value of the pkg-config variable for the given module. |
| 220 AC_DEFUN([PKG_CHECK_VAR], |
| 221 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
| 222 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl |
| 223 |
| 224 _PKG_CONFIG([$1], [variable="][$3]["], [$2]) |
| 225 AS_VAR_COPY([$1], [pkg_cv_][$1]) |
| 226 |
| 227 AS_VAR_IF([$1], [""], [$5], [$4])dnl |
| 228 ])# PKG_CHECK_VAR |
| 229 |
| 230 m4_include([config/m4/icu-conditional.m4]) |
| 170 m4_include([acinclude.m4]) | 231 m4_include([acinclude.m4]) |
| OLD | NEW |