summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-04-15 07:32:49 +0200
committerMartin Sustrik <sustrik@250bpm.com>2010-04-15 07:32:49 +0200
commit1c33941be9d564733c15fe0466906fdf0bbd46b8 (patch)
tree9348422063498c3598624b6e60bf4de6180b661e /configure.in
parentea18d30c209cb4e3f0dd0bc5e4380345e81b6fb6 (diff)
parent370cde09226d8a1b87eeac306fe97d64b4ea63a3 (diff)
Merge branch 'master' of git@github.com:sustrik/zeromq2
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in27
1 files changed, 18 insertions, 9 deletions
diff --git a/configure.in b/configure.in
index a196a35..b31f9d5 100644
--- a/configure.in
+++ b/configure.in
@@ -260,8 +260,15 @@ AC_CHECK_HEADERS(ifaddrs.h, [AC_DEFINE(ZMQ_HAVE_IFADDRS, 1, [Have ifaddrs.h head
# Use c++ in subsequent tests
AC_LANG(C++)
-# Optional stuff
-AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no)
+# pkg-config is used if found, and is required for builds with OpenPGM.
+# However, we need to provide a way to disable it entirely when the user
+# knows what she's doing and it's use is undesirable, such as when
+# cross-compiling.
+AC_ARG_WITH([pkg-config], [AS_HELP_STRING([--without-pkg-config],
+ [do not use pkg-config [default=no]])])
+if test "x$with_pkg_config" != "xno"; then
+ AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no)
+fi
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
@@ -328,15 +335,17 @@ if test "x$with_pgm_ext" != "xno"; then
AC_MSG_RESULT([yes])
# Test if we have pkg-config
- if test "x$have_pkg_config" != "xyes"; then
- AC_MSG_ERROR([the --with-pgm option requires that pkg-config be installed.]);
+ if test "x$with_pkg_config" != "xno"; then
+ if test "x$have_pkg_config" != "xyes"; then
+ AC_MSG_ERROR([the --with-pgm option requires that pkg-config be installed.]);
+ fi
+
+ # Check for OpenPGM dependencies
+ PKG_CHECK_MODULES([GLIB], [glib-2.0 gthread-2.0])
+ LIBZMQ_EXTRA_CXXFLAGS="${LIBZMQ_EXTRA_CXXFLAGS} ${GLIB_CFLAGS} "
+ LIBZMQ_EXTRA_LDFLAGS="${LIBZMQ_EXTRA_LDFLAGS} ${GLIB_LIBS} "
fi
- # Check for OpenPGM dependencies
- PKG_CHECK_MODULES([GLIB], [glib-2.0 gthread-2.0])
- LIBZMQ_EXTRA_CXXFLAGS="${LIBZMQ_EXTRA_CXXFLAGS} ${GLIB_CFLAGS} "
- LIBZMQ_EXTRA_LDFLAGS="${LIBZMQ_EXTRA_LDFLAGS} ${GLIB_LIBS} "
-
# Gzip, Perl and Python are required duing PGM build
AC_CHECK_PROG(have_gzip, gzip, yes, no)
if test "x$have_gzip" != "xyes"; then