Mercurial > octave
annotate m4/pkg.m4 @ 31241:5ea5fe592a9a
Don't delete labels when reordering of axes children (bug #63117)
* graphics.in.h (children_property::do_set): Avoid using a temporary variable
for new children list. Rephrase error message to be more accurate.
Always return true for clarity.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Tue, 27 Sep 2022 23:30:54 +0200 |
parents | 8c10ad441b24 |
children |
rev | line source |
---|---|
25390
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
1 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
2 # serial 12 (pkg-config-0.29.2) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
3 |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
4 dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
5 dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
6 dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
7 dnl This program is free software; you can redistribute it and/or modify |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
8 dnl it under the terms of the GNU General Public License as published by |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
9 dnl the Free Software Foundation; either version 2 of the License, or |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
10 dnl (at your option) any later version. |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
11 dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
12 dnl This program is distributed in the hope that it will be useful, but |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
13 dnl WITHOUT ANY WARRANTY; without even the implied warranty of |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
14 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
15 dnl General Public License for more details. |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
16 dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
17 dnl You should have received a copy of the GNU General Public License |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
18 dnl along with this program; if not, write to the Free Software |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
19 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
20 dnl 02111-1307, USA. |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
21 dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
22 dnl As a special exception to the GNU General Public License, if you |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
23 dnl distribute this file as part of a program that contains a |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
24 dnl configuration script generated by Autoconf, you may include it under |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
25 dnl the same distribution terms that you use for the rest of that |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
26 dnl program. |
15360
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
27 |
25390
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
28 dnl PKG_PREREQ(MIN-VERSION) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
29 dnl ----------------------- |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
30 dnl Since: 0.29 |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
31 dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
32 dnl Verify that the version of the pkg-config macros are at least |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
33 dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
34 dnl installed version of pkg-config, this checks the developer's version |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
35 dnl of pkg.m4 when generating configure. |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
36 dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
37 dnl To ensure that this macro is defined, also add: |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
38 dnl m4_ifndef([PKG_PREREQ], |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
39 dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
40 dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
41 dnl See the "Since" comment for each macro you use to see what version |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
42 dnl of the macros you require. |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
43 m4_defun([PKG_PREREQ], |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
44 [m4_define([PKG_MACROS_VERSION], [0.29.2]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
45 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
46 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
47 ])dnl PKG_PREREQ |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
48 |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
49 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
50 dnl ---------------------------------- |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
51 dnl Since: 0.16 |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
52 dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
53 dnl Search for the pkg-config tool and set the PKG_CONFIG variable to |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
54 dnl first found in the path. Checks that the version of pkg-config found |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
55 dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
56 dnl used since that's the first version where most current features of |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
57 dnl pkg-config existed. |
15360
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
58 AC_DEFUN([PKG_PROG_PKG_CONFIG], |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
59 [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) |
25390
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
60 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
61 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
62 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
63 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
64 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
65 |
15360
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
66 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
67 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
68 fi |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
69 if test -n "$PKG_CONFIG"; then |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
70 _pkg_min_version=m4_default([$1], [0.9.0]) |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
71 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
72 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
73 AC_MSG_RESULT([yes]) |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
74 else |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
75 AC_MSG_RESULT([no]) |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
76 PKG_CONFIG="" |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
77 fi |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
78 fi[]dnl |
25390
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
79 ])dnl PKG_PROG_PKG_CONFIG |
15360
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
80 |
25390
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
81 dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
82 dnl ------------------------------------------------------------------- |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
83 dnl Since: 0.18 |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
84 dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
85 dnl Check to see whether a particular set of modules exists. Similar to |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
86 dnl PKG_CHECK_MODULES(), but does not set variables or print errors. |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
87 dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
88 dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
89 dnl only at the first occurence in configure.ac, so if the first place |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
90 dnl it's called might be skipped (such as if it is within an "if", you |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
91 dnl have to call PKG_CHECK_EXISTS manually |
15360
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
92 AC_DEFUN([PKG_CHECK_EXISTS], |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
93 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
94 if test -n "$PKG_CONFIG" && \ |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
95 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then |
25390
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
96 m4_default([$2], [:]) |
15360
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
97 m4_ifvaln([$3], [else |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
98 $3])dnl |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
99 fi]) |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
100 |
25390
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
101 dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
102 dnl --------------------------------------------- |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
103 dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
104 dnl pkg_failed based on the result. |
15360
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
105 m4_define([_PKG_CONFIG], |
25390
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
106 [if test -n "$$1"; then |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
107 pkg_cv_[]$1="$$1" |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
108 elif test -n "$PKG_CONFIG"; then |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
109 PKG_CHECK_EXISTS([$3], |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
110 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
111 test "x$?" != "x0" && pkg_failed=yes ], |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
112 [pkg_failed=yes]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
113 else |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
114 pkg_failed=untried |
15360
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
115 fi[]dnl |
25390
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
116 ])dnl _PKG_CONFIG |
15360
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
117 |
25390
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
118 dnl _PKG_SHORT_ERRORS_SUPPORTED |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
119 dnl --------------------------- |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
120 dnl Internal check to see if pkg-config supports short errors. |
15360
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
121 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
122 [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
123 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
124 _pkg_short_errors_supported=yes |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
125 else |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
126 _pkg_short_errors_supported=no |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
127 fi[]dnl |
25390
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
128 ])dnl _PKG_SHORT_ERRORS_SUPPORTED |
15360
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
129 |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
130 |
25390
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
131 dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
132 dnl [ACTION-IF-NOT-FOUND]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
133 dnl -------------------------------------------------------------- |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
134 dnl Since: 0.4.0 |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
135 dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
136 dnl Note that if there is a possibility the first call to |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
137 dnl PKG_CHECK_MODULES might not happen, you should be sure to include an |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
138 dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac |
15360
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
139 AC_DEFUN([PKG_CHECK_MODULES], |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
140 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
141 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
142 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
143 |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
144 pkg_failed=no |
25390
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
145 AC_MSG_CHECKING([for $2]) |
15360
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
146 |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
147 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
148 _PKG_CONFIG([$1][_LIBS], [libs], [$2]) |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
149 |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
150 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
151 and $1[]_LIBS to avoid the need to call pkg-config. |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
152 See the pkg-config man page for more details.]) |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
153 |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
154 if test $pkg_failed = yes; then |
25390
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
155 AC_MSG_RESULT([no]) |
15360
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
156 _PKG_SHORT_ERRORS_SUPPORTED |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
157 if test $_pkg_short_errors_supported = yes; then |
25390
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
158 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` |
22757
90281ac10fb4
maint: Trim trailing whitespace from files.
Rik <rik@octave.org>
parents:
15360
diff
changeset
|
159 else |
25390
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
160 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` |
15360
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
161 fi |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
162 # Put the nasty error message in config.log where it belongs |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
163 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
164 |
25390
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
165 m4_default([$4], [AC_MSG_ERROR( |
15360
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
166 [Package requirements ($2) were not met: |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
167 |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
168 $$1_PKG_ERRORS |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
169 |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
170 Consider adjusting the PKG_CONFIG_PATH environment variable if you |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
171 installed software in a non-standard prefix. |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
172 |
25390
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
173 _PKG_TEXT])[]dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
174 ]) |
15360
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
175 elif test $pkg_failed = untried; then |
25390
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
176 AC_MSG_RESULT([no]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
177 m4_default([$4], [AC_MSG_FAILURE( |
15360
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
178 [The pkg-config script could not be found or is too old. Make sure it |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
179 is in your PATH or set the PKG_CONFIG environment variable to the full |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
180 path to pkg-config. |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
181 |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
182 _PKG_TEXT |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
183 |
25390
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
184 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
185 ]) |
15360
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
186 else |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
187 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
188 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS |
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
189 AC_MSG_RESULT([yes]) |
25390
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
190 $3 |
15360
4b82664f526b
build: Move non-Octave Autoconf pkg macros from acinclude.m4 to a separate file.
Rik <rik@octave.org>
parents:
diff
changeset
|
191 fi[]dnl |
25390
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
192 ])dnl PKG_CHECK_MODULES |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
193 |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
194 |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
195 dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
196 dnl [ACTION-IF-NOT-FOUND]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
197 dnl --------------------------------------------------------------------- |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
198 dnl Since: 0.29 |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
199 dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
200 dnl Checks for existence of MODULES and gathers its build flags with |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
201 dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
202 dnl and VARIABLE-PREFIX_LIBS from --libs. |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
203 dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
204 dnl Note that if there is a possibility the first call to |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
205 dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
206 dnl include an explicit call to PKG_PROG_PKG_CONFIG in your |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
207 dnl configure.ac. |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
208 AC_DEFUN([PKG_CHECK_MODULES_STATIC], |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
209 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
210 _save_PKG_CONFIG=$PKG_CONFIG |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
211 PKG_CONFIG="$PKG_CONFIG --static" |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
212 PKG_CHECK_MODULES($@) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
213 PKG_CONFIG=$_save_PKG_CONFIG[]dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
214 ])dnl PKG_CHECK_MODULES_STATIC |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
215 |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
216 |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
217 dnl PKG_INSTALLDIR([DIRECTORY]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
218 dnl ------------------------- |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
219 dnl Since: 0.27 |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
220 dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
221 dnl Substitutes the variable pkgconfigdir as the location where a module |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
222 dnl should install pkg-config .pc files. By default the directory is |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
223 dnl $libdir/pkgconfig, but the default can be changed by passing |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
224 dnl DIRECTORY. The user can override through the --with-pkgconfigdir |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
225 dnl parameter. |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
226 AC_DEFUN([PKG_INSTALLDIR], |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
227 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
228 m4_pushdef([pkg_description], |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
229 [pkg-config installation directory @<:@]pkg_default[@:>@]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
230 AC_ARG_WITH([pkgconfigdir], |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
231 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
232 [with_pkgconfigdir=]pkg_default) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
233 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
234 m4_popdef([pkg_default]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
235 m4_popdef([pkg_description]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
236 ])dnl PKG_INSTALLDIR |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
237 |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
238 |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
239 dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
240 dnl -------------------------------- |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
241 dnl Since: 0.27 |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
242 dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
243 dnl Substitutes the variable noarch_pkgconfigdir as the location where a |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
244 dnl module should install arch-independent pkg-config .pc files. By |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
245 dnl default the directory is $datadir/pkgconfig, but the default can be |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
246 dnl changed by passing DIRECTORY. The user can override through the |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
247 dnl --with-noarch-pkgconfigdir parameter. |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
248 AC_DEFUN([PKG_NOARCH_INSTALLDIR], |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
249 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
250 m4_pushdef([pkg_description], |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
251 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
252 AC_ARG_WITH([noarch-pkgconfigdir], |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
253 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
254 [with_noarch_pkgconfigdir=]pkg_default) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
255 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
256 m4_popdef([pkg_default]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
257 m4_popdef([pkg_description]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
258 ])dnl PKG_NOARCH_INSTALLDIR |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
259 |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
260 |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
261 dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
262 dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
263 dnl ------------------------------------------- |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
264 dnl Since: 0.28 |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
265 dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
266 dnl Retrieves the value of the pkg-config variable for the given module. |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
267 AC_DEFUN([PKG_CHECK_VAR], |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
268 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
269 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
270 |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
271 _PKG_CONFIG([$1], [variable="][$3]["], [$2]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
272 AS_VAR_COPY([$1], [pkg_cv_][$1]) |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
273 |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
274 AS_VAR_IF([$1], [""], [$5], [$4])dnl |
8c10ad441b24
m4/pkg.m4: update to latest version released with pkg-config 0.29.2 (bug #48775)
Carnë Draug <carandraug@octave.org>
parents:
24534
diff
changeset
|
275 ])dnl PKG_CHECK_VAR |