From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
To: xen-devel@lists.xenproject.org
Cc: Keir Fraser <keir@xen.org>,
Ian Campbell <ian.campbell@citrix.com>, Tim Deegan <tim@xen.org>,
"Luis R. Rodriguez" <mcgrof@suse.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Jan Beulich <jbeulich@suse.com>
Subject: [PATCH v4 10/15] autoconf: update m4/pkg.m4
Date: Tue, 29 Apr 2014 18:12:03 -0700 [thread overview]
Message-ID: <1398820328-15132-11-git-send-email-mcgrof@do-not-panic.com> (raw)
In-Reply-To: <1398820328-15132-1-git-send-email-mcgrof@do-not-panic.com>
From: "Luis R. Rodriguez" <mcgrof@suse.com>
The provenance of the m4 pkg.m4 macro library was not documented
and it was not clear how and if we can update this without breaking
things. Document where this comes from, update us to the latest
release from git and put a warning about avoiding private evolutions
so that instead things go upstream.
The pkg-config m4 macro library comes from the upstream pkg-config
git repository [0]. If you update the m4 library update this file
with provenance and last commit ID information. For documentation
on how to use this read the pkg-config(1) man page.
Tree: git://anongit.freedesktop.org/pkg-config
The last synch was from commit:
commit 4f0084d9d3b8726a797a373c7ec5e406000995d0
Author: Dan Nicholson <dbn.lists@gmail.com>
Date: Mon Feb 3 15:59:18 2014 -0800
glib: Fix Makefiles to suppress warnings from automake
With the newly added glib.mk, some of the noinst_* variables need to use
+= in the evaluation to avoid multiple definition warnings from
automake.
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>
Cc: Tim Deegan <tim@xen.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
---
m4/pkg.m4 | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++----
m4/pkg.m4.README | 21 ++++++++++++++
2 files changed, 103 insertions(+), 6 deletions(-)
create mode 100644 m4/pkg.m4.README
diff --git a/m4/pkg.m4 b/m4/pkg.m4
index 9bb3e06..62995f0 100644
--- a/m4/pkg.m4
+++ b/m4/pkg.m4
@@ -26,7 +26,8 @@
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
@@ -72,7 +73,8 @@ m4_define([_PKG_CONFIG],
pkg_cv_[]$1="$$1"
elif test -n "$PKG_CONFIG"; then
PKG_CHECK_EXISTS([$3],
- [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes ],
[pkg_failed=yes])
else
pkg_failed=untried
@@ -120,9 +122,9 @@ if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
- $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else
- $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
@@ -135,7 +137,7 @@ $$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
-_PKG_TEXT])dnl
+_PKG_TEXT])[]dnl
])
elif test $pkg_failed = untried; then
AC_MSG_RESULT([no])
@@ -146,7 +148,7 @@ path to pkg-config.
_PKG_TEXT
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
@@ -155,3 +157,77 @@ else
$3
fi[]dnl
])# PKG_CHECK_MODULES
+
+
+# PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+# ---------------------------------------------------------------------
+# Checks for existence of MODULES and gathers its build flags with
+# static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
+# and VARIABLE-PREFIX_LIBS from --libs.
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES_STATIC might not happen, you should be sure to include
+# an explicit call to PKG_PROG_PKG_CONFIG in your configure.ac.
+AC_DEFUN([PKG_CHECK_MODULES_STATIC],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+_save_PKG_CONFIG=$PKG_CONFIG
+PKG_CONFIG="$PKG_CONFIG --static"
+PKG_CHECK_MODULES($@)
+PKG_CONFIG=$_save_PKG_CONFIG[]dnl
+])
+
+
+# PKG_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable pkgconfigdir as the location where a module
+# should install pkg-config .pc files. By default the directory is
+# $libdir/pkgconfig, but the default can be changed by passing
+# DIRECTORY. The user can override through the --with-pkgconfigdir
+# parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+ [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+ [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+]) dnl PKG_INSTALLDIR
+
+
+# PKG_NOARCH_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable noarch_pkgconfigdir as the location where a
+# module should install arch-independent pkg-config .pc files. By
+# default the directory is $datadir/pkgconfig, but the default can be
+# changed by passing DIRECTORY. The user can override through the
+# --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+ [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+ [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+]) dnl PKG_NOARCH_INSTALLDIR
+
+
+# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# -------------------------------------------
+# Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])# PKG_CHECK_VAR
diff --git a/m4/pkg.m4.README b/m4/pkg.m4.README
new file mode 100644
index 0000000..9705040
--- /dev/null
+++ b/m4/pkg.m4.README
@@ -0,0 +1,21 @@
+The pkg-config m4 macro library comes from the upstream pkg-config
+git repository [0]. If you update the m4 library update this file
+with provenance and last commit ID information. For documentation
+on how to use this read the pkg-config(1) man page.
+
+Do not modify this file yourself, if you want to evolve it send
+patches upstream and then synch back here.
+
+Tree: git://anongit.freedesktop.org/pkg-config
+
+The last synch was from commit:
+
+commit 4f0084d9d3b8726a797a373c7ec5e406000995d0
+Author: Dan Nicholson <dbn.lists@gmail.com>
+Date: Mon Feb 3 15:59:18 2014 -0800
+
+ glib: Fix Makefiles to suppress warnings from automake
+
+ With the newly added glib.mk, some of the noinst_* variables need to use
+ += in the evaluation to avoid multiple definition warnings from
+ automake.
--
1.9.0
next prev parent reply other threads:[~2014-04-30 1:13 UTC|newest]
Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-30 1:11 [PATCH v4 00/15] xen: add systemd support Luis R. Rodriguez
2014-04-30 1:11 ` [PATCH v4 01/15] xenstore: add support for a retry open limit on xenstored Luis R. Rodriguez
2014-05-07 15:03 ` Ian Campbell
2014-05-12 13:50 ` Ian Jackson
2014-05-12 14:18 ` Ian Campbell
2014-05-12 14:40 ` Jacek Konieczny
2014-05-12 15:37 ` Ian Jackson
2014-05-12 18:59 ` Luis R. Rodriguez
2014-05-13 21:33 ` Luis R. Rodriguez
2014-04-30 1:11 ` [PATCH v4 02/15] xencommons: use the retry limit instead of implementing our own timeout Luis R. Rodriguez
2014-04-30 9:33 ` Andrew Cooper
2014-04-30 16:36 ` Luis R. Rodriguez
2014-05-07 15:05 ` Ian Campbell
2014-04-30 1:11 ` [PATCH v4 03/15] xenstored: enable usage of config.h on both xenstored and oxenstored Luis R. Rodriguez
2014-05-07 15:06 ` Ian Campbell
2014-04-30 1:11 ` [PATCH v4 04/15] cxenstored: add support for systemd active sockets Luis R. Rodriguez
2014-05-07 15:18 ` Ian Campbell
2014-05-07 15:46 ` Ian Campbell
2014-05-13 22:17 ` Luis R. Rodriguez
2014-05-14 8:44 ` Ian Campbell
2014-05-15 1:50 ` Luis R. Rodriguez
2014-04-30 1:11 ` [PATCH v4 05/15] oxenstored: " Luis R. Rodriguez
2014-04-30 8:35 ` Dave Scott
2014-04-30 17:30 ` Luis R. Rodriguez
2014-05-01 10:21 ` Dave Scott
2014-04-30 9:27 ` Anil Madhavapeddy
2014-04-30 17:35 ` Luis R. Rodriguez
2014-05-01 9:16 ` Anil Madhavapeddy
2014-05-07 15:20 ` Ian Campbell
2014-05-12 19:09 ` Luis R. Rodriguez
2014-05-12 13:57 ` Ian Jackson
2014-05-12 18:11 ` Luis R. Rodriguez
2014-05-13 8:53 ` Ian Campbell
2014-04-30 1:11 ` [PATCH v4 06/15] tools/xendomains: make xl the default Luis R. Rodriguez
2014-04-30 7:02 ` Olaf Hering
2014-04-30 17:43 ` Luis R. Rodriguez
2014-05-07 15:21 ` Ian Campbell
2014-04-30 1:12 ` [PATCH v4 07/15] tools/xendomains: do space cleanups Luis R. Rodriguez
2014-04-30 1:12 ` [PATCH v4 08/15] tools/xendomains: move to libexec and use a smaller init helper Luis R. Rodriguez
2014-05-07 15:24 ` Ian Campbell
2014-05-13 22:21 ` Luis R. Rodriguez
2014-04-30 1:12 ` [PATCH v4 09/15] autoconf: xen: force a refresh with autoconf Luis R. Rodriguez
2014-05-07 15:25 ` Ian Campbell
2014-05-07 16:12 ` Roger Pau Monné
2014-05-07 16:21 ` Ian Campbell
2014-05-07 16:44 ` Roger Pau Monné
2014-05-07 18:28 ` Luis R. Rodriguez
2014-05-12 14:00 ` Ian Jackson
2014-05-12 18:14 ` Luis R. Rodriguez
2014-04-30 1:12 ` Luis R. Rodriguez [this message]
2014-05-07 15:28 ` [PATCH v4 10/15] autoconf: update m4/pkg.m4 Ian Campbell
2014-05-13 22:32 ` Luis R. Rodriguez
2014-05-07 16:17 ` Roger Pau Monné
2014-04-30 1:12 ` [PATCH v4 11/15] autoconf: xen: move standard variables to a generic place Luis R. Rodriguez
2014-04-30 6:52 ` Jan Beulich
[not found] ` <5360B9CB020000780000D9BB@suse.com>
2014-04-30 17:53 ` Luis R. Rodriguez
2014-05-02 8:12 ` Jan Beulich
2014-05-13 23:03 ` Luis R. Rodriguez
2014-04-30 1:12 ` [PATCH v4 12/15] autoconf: xen: peg the xenstored preference onto the top level config Luis R. Rodriguez
2014-05-07 15:32 ` Ian Campbell
2014-05-13 23:05 ` Luis R. Rodriguez
2014-04-30 1:12 ` [PATCH v4 13/15] systemd: add xen systemd service and module files Luis R. Rodriguez
2014-05-07 15:46 ` Ian Campbell
2014-05-12 18:22 ` Luis R. Rodriguez
2014-05-13 23:28 ` Luis R. Rodriguez
2014-05-12 14:11 ` Ian Jackson
2014-05-12 14:32 ` Jacek Konieczny
2014-05-12 15:36 ` Ian Jackson
2014-05-12 18:55 ` Luis R. Rodriguez
2014-05-12 18:46 ` Luis R. Rodriguez
2014-05-13 8:57 ` Ian Campbell
2014-04-30 1:12 ` [PATCH v4 14/15] autoconf: xen: add systemd support into the build system Luis R. Rodriguez
2014-05-07 16:40 ` Roger Pau Monné
2014-05-15 1:58 ` Luis R. Rodriguez
2014-05-15 9:02 ` Ian Campbell
2014-04-30 1:12 ` [PATCH v4 15/15] autoconf: xen: trigger an update with autogen.sh Luis R. Rodriguez
2014-05-07 15:47 ` Ian Campbell
2014-05-07 18:34 ` Luis R. Rodriguez
2014-05-08 8:42 ` Ian Campbell
2014-04-30 1:15 ` [PATCH v4 00/15] xen: add systemd support Luis R. Rodriguez
2014-05-07 15:18 ` Ian Campbell
2014-05-08 11:28 ` Anthony PERARD
2014-05-15 2:12 ` Luis R. Rodriguez
2014-05-15 6:14 ` Luis R. Rodriguez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1398820328-15132-11-git-send-email-mcgrof@do-not-panic.com \
--to=mcgrof@do-not-panic.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=mcgrof@suse.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).