summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikko Koppanen <mkoppanen@php.net>2011-04-04 22:52:02 +0200
committerMartin Sustrik <sustrik@250bpm.com>2011-04-04 22:52:02 +0200
commit6fd403c4d8d22cec6c47aad4b978b3cc78b956c4 (patch)
treeb704e29f77f9c0ec0f46086321c5a86f5e02a8c8
parent4b52cf949fa02274ec8817f8e704eaa7cc66adbf (diff)
Make pkg-config dependency conditional
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
-rwxr-xr-xautogen.sh6
-rw-r--r--configure.in13
2 files changed, 8 insertions, 11 deletions
diff --git a/autogen.sh b/autogen.sh
index 75f1009..2cc40b9 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -20,12 +20,6 @@
# Script to generate all required files from fresh git checkout.
-command -v pkg-config >/dev/null 2>&1
-if [ $? -ne 0 ]; then
- echo "autogen.sh: error: could not find pkg-config. pkg-config is required to run autogen.sh." 1>&2
- exit 1
-fi
-
command -v libtool >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "autogen.sh: error: could not find libtool. libtool is required to run autogen.sh." 1>&2
diff --git a/configure.in b/configure.in
index 3f5408f..b6c24b4 100644
--- a/configure.in
+++ b/configure.in
@@ -278,7 +278,7 @@ AC_ARG_WITH([pgm], [AS_HELP_STRING([--with-pgm],
# build using system pgm
AC_ARG_WITH([system-pgm], [AS_HELP_STRING([--with-system-pgm],
- [build libzmq with PGM extension [default=no]])],
+ [build libzmq with PGM extension. Requires pkg-config [default=no]])],
[with_system_pgm_ext=yes], [with_system_pgm_ext=no])
if test "x$with_pgm_ext" != "xno" -a "x$with_system_pgm_ext" != "xno"; then
@@ -333,10 +333,13 @@ fi
# Build with system openpgm
if test "x$with_system_pgm_ext" != "xno"; then
- PKG_CHECK_MODULES([OpenPGM], [openpgm-5.1 >= 5.1])
- AC_DEFINE(ZMQ_HAVE_OPENPGM, 1, [Have OpenPGM extension])
- LIBZMQ_EXTRA_CXXFLAGS="$OpenPGM_CFLAGS $LIBZMQ_EXTRA_CXXFLAGS"
- LIBS="$OpenPGM_LIBS $LIBS"
+ m4_ifdef([PKG_CHECK_MODULES], [
+ PKG_CHECK_MODULES([OpenPGM], [openpgm-5.1 >= 5.1])
+ AC_DEFINE(ZMQ_HAVE_OPENPGM, 1, [Have OpenPGM extension])
+ LIBZMQ_EXTRA_CXXFLAGS="$OpenPGM_CFLAGS $LIBZMQ_EXTRA_CXXFLAGS"
+ LIBS="$OpenPGM_LIBS $LIBS"
+ ],
+ [AC_MSG_ERROR([--with-system-pgm requires a working pkg-config installation])])
fi
AC_SUBST(pgm_basename)