Skip to content

Commit 203e70b

Browse files
committed
update configure
1 parent faed7b9 commit 203e70b

File tree

2 files changed

+886
-812
lines changed

2 files changed

+886
-812
lines changed

aclocal.m4

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
1+
# generated automatically by aclocal 1.17 -*- Autoconf -*-
22

3-
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
3+
# Copyright (C) 1996-2024 Free Software Foundation, Inc.
44

55
# This file is free software; the Free Software Foundation
66
# gives unlimited permission to copy and/or distribute it,
@@ -12,8 +12,8 @@
1212
# PARTICULAR PURPOSE.
1313

1414
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15-
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
16-
# serial 11 (pkg-config-0.29.1)
15+
# pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*-
16+
# serial 12 (pkg-config-0.29.2)
1717

1818
dnl Copyright © 2004 Scott James Remnant <[email protected]>.
1919
dnl Copyright © 2012-2015 Dan Nicholson <[email protected]>
@@ -55,20 +55,26 @@ dnl
5555
dnl See the "Since" comment for each macro you use to see what version
5656
dnl of the macros you require.
5757
m4_defun([PKG_PREREQ],
58-
[m4_define([PKG_MACROS_VERSION], [0.29.1])
58+
[m4_define([PKG_MACROS_VERSION], [0.29.2])
5959
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
6060
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
6161
])dnl PKG_PREREQ
6262

63-
dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
64-
dnl ----------------------------------
63+
dnl PKG_PROG_PKG_CONFIG([MIN-VERSION], [ACTION-IF-NOT-FOUND])
64+
dnl ---------------------------------------------------------
6565
dnl Since: 0.16
6666
dnl
6767
dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
6868
dnl first found in the path. Checks that the version of pkg-config found
6969
dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
7070
dnl used since that's the first version where most current features of
7171
dnl pkg-config existed.
72+
dnl
73+
dnl If pkg-config is not found or older than specified, it will result
74+
dnl in an empty PKG_CONFIG variable. To avoid widespread issues with
75+
dnl scripts not checking it, ACTION-IF-NOT-FOUND defaults to aborting.
76+
dnl You can specify [PKG_CONFIG=false] as an action instead, which would
77+
dnl result in pkg-config tests failing, but no bogus error messages.
7278
AC_DEFUN([PKG_PROG_PKG_CONFIG],
7379
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
7480
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
@@ -89,6 +95,9 @@ if test -n "$PKG_CONFIG"; then
8995
AC_MSG_RESULT([no])
9096
PKG_CONFIG=""
9197
fi
98+
fi
99+
if test -z "$PKG_CONFIG"; then
100+
m4_default([$2], [AC_MSG_ERROR([pkg-config not found])])
92101
fi[]dnl
93102
])dnl PKG_PROG_PKG_CONFIG
94103

@@ -100,7 +109,7 @@ dnl Check to see whether a particular set of modules exists. Similar to
100109
dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
101110
dnl
102111
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
103-
dnl only at the first occurence in configure.ac, so if the first place
112+
dnl only at the first occurrence in configure.ac, so if the first place
104113
dnl it's called might be skipped (such as if it is within an "if", you
105114
dnl have to call PKG_CHECK_EXISTS manually
106115
AC_DEFUN([PKG_CHECK_EXISTS],
@@ -156,7 +165,7 @@ AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
156165
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
157166
158167
pkg_failed=no
159-
AC_MSG_CHECKING([for $1])
168+
AC_MSG_CHECKING([for $2])
160169
161170
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
162171
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
@@ -166,17 +175,17 @@ and $1[]_LIBS to avoid the need to call pkg-config.
166175
See the pkg-config man page for more details.])
167176
168177
if test $pkg_failed = yes; then
169-
AC_MSG_RESULT([no])
178+
AC_MSG_RESULT([no])
170179
_PKG_SHORT_ERRORS_SUPPORTED
171180
if test $_pkg_short_errors_supported = yes; then
172-
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
173-
else
174-
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
181+
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
182+
else
183+
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
175184
fi
176-
# Put the nasty error message in config.log where it belongs
177-
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
185+
# Put the nasty error message in config.log where it belongs
186+
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
178187
179-
m4_default([$4], [AC_MSG_ERROR(
188+
m4_default([$4], [AC_MSG_ERROR(
180189
[Package requirements ($2) were not met:
181190
182191
$$1_PKG_ERRORS
@@ -187,8 +196,8 @@ installed software in a non-standard prefix.
187196
_PKG_TEXT])[]dnl
188197
])
189198
elif test $pkg_failed = untried; then
190-
AC_MSG_RESULT([no])
191-
m4_default([$4], [AC_MSG_FAILURE(
199+
AC_MSG_RESULT([no])
200+
m4_default([$4], [AC_MSG_FAILURE(
192201
[The pkg-config script could not be found or is too old. Make sure it
193202
is in your PATH or set the PKG_CONFIG environment variable to the full
194203
path to pkg-config.
@@ -198,10 +207,10 @@ _PKG_TEXT
198207
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
199208
])
200209
else
201-
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
202-
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
210+
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
211+
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
203212
AC_MSG_RESULT([yes])
204-
$3
213+
$3
205214
fi[]dnl
206215
])dnl PKG_CHECK_MODULES
207216

0 commit comments

Comments
 (0)