summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in152
1 files changed, 40 insertions, 112 deletions
diff --git a/configure.in b/configure.in
index cf8925e..6df80ab 100644
--- a/configure.in
+++ b/configure.in
@@ -12,6 +12,7 @@ AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(config)
AM_CONFIG_HEADER(src/platform.hpp)
AM_INIT_AUTOMAKE(tar-ustar dist-zip foreign)
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# This lets us use PACKAGE_VERSION in Makefiles
AC_SUBST(PACKAGE_VERSION)
@@ -45,6 +46,10 @@ AC_PROG_SED
AC_PROG_AWK
# Libtool configuration for different targets. See acinclude.m4
+AC_ARG_VAR([XMLTO], [Path to xmlto command])
+AC_PATH_PROG([XMLTO], [xmlto])
+AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
+AC_PATH_PROG([ASCIIDOC], [asciidoc])
AC_ZMQ_CONFIG_LIBTOOL
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
@@ -212,10 +217,6 @@ esac
# Check if the compiler supports -fvisibility=hidden flag. MinGW32 uses __declspec
#
if test "x$ac_zmq_dso_visibility" = "xyes"; then
- AC_LANG_PUSH([C])
- AC_ZMQ_CHECK_LANG_VISIBILITY([LIBZMQ_EXTRA_CFLAGS="$ac_zmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag ${LIBZMQ_EXTRA_CFLAGS}"])
- AC_LANG_POP([C])
-
AC_LANG_PUSH([C++])
AC_ZMQ_CHECK_LANG_VISIBILITY([LIBZMQ_EXTRA_CXXFLAGS="$ac_zmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag ${LIBZMQ_EXTRA_CXXFLAGS}"])
AC_LANG_POP([C++])
@@ -266,70 +267,21 @@ AC_C_VOLATILE
# PGM extension
ac_zmq_pgm_ext="no"
-pgm_basename="libpgm-5.0.92~dfsg"
-
-AC_SUBST(pgm_basename)
+pgm_basename="libpgm-5.1.115~dfsg"
AC_ARG_WITH([pgm], [AS_HELP_STRING([--with-pgm],
[build libzmq with PGM extension [default=no]])],
- [with_pgm_ext=yes], [with_pgm_ext=no])
+ [with_pgm_ext=$withval], [with_pgm_ext=no])
if test "x$with_pgm_ext" != "xno"; then
- if test "x$ac_cv_prog_cc_c99" = "xno"; then
- AC_MSG_WARN([The C compiler is not set to C99 mode. The build will most likely fail])
- fi
-
- AC_MSG_CHECKING([if the PGM extension is supported on this platform])
- # OpenPGM is only supported by the vendor on x86, AMD64, and SPARC platforms...
- case "${host_cpu}" in
- i*86|x86_64|amd64|*sparc*|s390*)
- # Supported
- ;;
- *)
- AC_MSG_ERROR([the PGM extension is not supported on the ${host_cpu} platform.])
- ;;
- esac
-
- # ... and on Linux/Windows/Solaris/FreeBSD/OSX systems.
- case "${host_os}" in
- *linux*|*mingw32*|*solaris*|*freebsd*|*darwin*)
- AC_MSG_RESULT([yes])
-
- AC_LANG_PUSH([C++])
- AC_ZMQ_CHECK_LANG_FLAG([-Wno-variadic-macros], [LIBZMQ_EXTRA_CXXFLAGS="-Wno-variadic-macros $LIBZMQ_EXTRA_CXXFLAGS"])
- AC_ZMQ_CHECK_LANG_FLAG([-Wno-long-long], [LIBZMQ_EXTRA_CXXFLAGS="-Wno-long-long $LIBZMQ_EXTRA_CXXFLAGS"])
- AC_LANG_POP([C++])
-
- AC_LANG_PUSH([C])
- AC_ZMQ_LANG_STRICT([LIBZMQ_EXTRA_CFLAGS="$ac_zmq_cv_[]_AC_LANG_ABBREV[]_strict_flag $LIBZMQ_EXTRA_CFLAGS"])
-
- if test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes" -o \
- "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then
- LIBZMQ_EXTRA_CFLAGS="-Dasm=__asm__ $LIBZMQ_EXTRA_CFLAGS"
- fi
- AC_LANG_POP([C])
- ;;
- *)
- AC_MSG_ERROR([the PGM extension is not supported on system ${host_os}.])
- ;;
- esac
-
- # Gzip, Perl and Python are required during PGM build
- AC_CHECK_PROG(ac_zmq_have_gzip, gzip, yes, no)
- if test "x$ac_zmq_have_gzip" != "xyes"; then
- AC_MSG_ERROR([gzip is required for building the PGM extension.])
- fi
- AC_CHECK_PROG(ac_zmq_have_perl, perl, yes, no)
- if test "x$ac_zmq_have_perl" != "xyes"; then
- AC_MSG_ERROR([perl is required for building the PGM extension.])
- fi
- AC_CHECK_PROG(ac_zmq_have_python, python, yes, no)
- if test "x$ac_zmq_have_python" != "xyes"; then
- AC_MSG_ERROR([python is required for building the PGM extension.])
+ # This allows placing the tar.gz to foreign/openpgm
+ # and using ./configure --with-pgm=libpgm-x.y.z
+ if test "x$with_pgm_ext" != "xyes"; then
+ pgm_basename="$with_pgm_ext"
fi
- # Unpack libpgm
+ # Unpack libpgm
AC_MSG_NOTICE([Unpacking ${pgm_basename}.tar.gz])
ac_zmq_pwd=`pwd`
cd foreign/openpgm
@@ -337,17 +289,38 @@ if test "x$with_pgm_ext" != "xno"; then
if ! (gzip -dc "${pgm_basename}.tar.gz" || echo "failed") | ${am__untar}; then
AC_MSG_ERROR([cannot unpack the foreign/openpgm/${pgm_basename}.tar.gz file])
fi
+
cd "${ac_zmq_pwd}"
- # Success!
+ if test -d foreign/openpgm/build-staging; then
+ rm -rf foreign/openpgm/build-staging
+ fi
+
+ mv foreign/openpgm/${pgm_basename} foreign/openpgm/build-staging
+ pgm_srcdir=foreign/openpgm/build-staging/openpgm/pgm
+
+ if ! test -d foreign/openpgm/build-staging/openpgm/pgm/config; then
+ mkdir foreign/openpgm/build-staging/openpgm/pgm/config
+ fi
+
+ # DSO symbol visibility for openpgm
+ AC_LANG_PUSH([C])
+ AC_ZMQ_CHECK_LANG_VISIBILITY([ac_configure_args="CFLAGS='$ac_zmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag' ${ac_configure_args}"])
+ AC_LANG_POP([C])
+
+ pgm_subdir=build-staging/openpgm/pgm
+ AC_SUBST(pgm_subdir)
+
+ AC_SUBST(pgm_srcdir)
+ AC_CONFIG_SUBDIRS([foreign/openpgm/build-staging/openpgm/pgm/])
+
+ # Success!
AC_DEFINE(ZMQ_HAVE_OPENPGM, 1, [Have OpenPGM extension])
ac_zmq_pgm_ext="yes"
-
- # these break OpenPGM so don't specify them if we are building with it.
- ac_zmq_pedantic="no"
- ac_zmq_werror="no"
fi
+AC_SUBST(pgm_basename)
+
# Set -Wall, -Werror and -pedantic
AC_LANG_PUSH([C++])
@@ -371,52 +344,6 @@ AC_TYPE_SIGNAL
AC_CHECK_FUNCS(perror gettimeofday memset socket getifaddrs freeifaddrs)
AC_CHECK_HEADERS([alloca.h])
-if test "x$with_pgm_ext" != "xno"; then
-
- # Check additional functions for PGM build
- AC_CHECK_FUNCS(poll epoll_create pselect getopt vasprintf getprotobyname_r2 getprotobyname_r)
-
- if test "x$ac_cv_func_gettimeofday" = "xyes"; then
- LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_GETTIMEOFDAY $LIBZMQ_EXTRA_CFLAGS"
- fi
- if test "x$ac_cv_func_getprotobyname_r2" = "xyes"; then
- LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_GETPROTOBYNAME_R2 $LIBZMQ_EXTRA_CFLAGS"
- fi
- if test "x$ac_cv_func_poll" = "xyes"; then
- LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_POLL $LIBZMQ_EXTRA_CFLAGS"
- fi
- if test "x$ac_cv_func_epoll_create" = "xyes"; then
- LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_EPOLL $LIBZMQ_EXTRA_CFLAGS"
- fi
- if test "x$ac_cv_func_getifaddrs" = "xyes"; then
- LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_GETIFADDRS $LIBZMQ_EXTRA_CFLAGS"
- fi
- if test "x$ac_cv_func_getopt" = "xyes"; then
- LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_GETOPT $LIBZMQ_EXTRA_CFLAGS"
- fi
- if test "x$ac_cv_func_pselect" = "xyes"; then
- LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_PSELECT $LIBZMQ_EXTRA_CFLAGS"
- fi
- if test "x$ac_cv_header_alloca_h" = "xyes"; then
- LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_ALLOCA_H $LIBZMQ_EXTRA_CFLAGS"
- fi
- if test "x$ac_cv_c_compiler_gnu" = "xno"; then
- LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_ISO_VARARGS $LIBZMQ_EXTRA_CFLAGS"
- else
- LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_GNU_VARARGS $LIBZMQ_EXTRA_CFLAGS"
- fi
- if test "x$ac_cv_func_vasprintf" = "xyes"; then
- LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_VASPRINTF $LIBZMQ_EXTRA_CFLAGS"
- fi
- case "${host_cpu}" in
- i*86|x86_64|amd64|*sparc*)
- LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_TSC -DCONFIG_HAVE_RTC -DCONFIG_HAVE_HPET $LIBZMQ_EXTRA_CFLAGS"
- ;;
- *sparc*|s390*)
- ;;
- esac
-fi
-
# Subst LIBZMQ_EXTRA_CFLAGS & CXXFLAGS & LDFLAGS
AC_SUBST(LIBZMQ_EXTRA_CFLAGS)
AC_SUBST(LIBZMQ_EXTRA_CXXFLAGS)
@@ -424,6 +351,7 @@ AC_SUBST(LIBZMQ_EXTRA_LDFLAGS)
AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile
perf/Makefile src/libzmq.pc \
- builds/msvc/Makefile tests/Makefile])
+ builds/msvc/Makefile tests/Makefile \
+ foreign/openpgm/Makefile])
AC_OUTPUT