diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 45 |
1 files changed, 19 insertions, 26 deletions
diff --git a/configure.in b/configure.in index 8e8df73..e52180d 100644 --- a/configure.in +++ b/configure.in @@ -53,8 +53,13 @@ LIBZMQ_EXTRA_CXXFLAGS="" # Extra LDFLAGS are appended at the end of LDFLAGS for libzmq. LIBZMQ_EXTRA_LDFLAGS="" -# By default compiling with -pedantic except QNX and OSX. -pedantic="yes" +# Enable -pedantic if not using icc, this may be overridden later +AC_CHECK_LANG_ICC +if test "xyes" = "x$ac_cv_c_intel_compiler" -o "xyes" = "x$ac_cv_cpp_intel_compiler"; then + pedantic="no" +else + pedantic="yes" +fi #By default compiling with -Werror except OSX. werror="yes" @@ -95,6 +100,7 @@ case "${host_os}" in CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS" fi AC_DEFINE(ZMQ_HAVE_LINUX, 1, [Have Linux OS]) + AC_CHECK_LIB(rt, main) AC_CHECK_LIB(uuid, main, , [AC_MSG_ERROR([cannot link with -luuid, install uuid-dev.])]) ;; @@ -228,10 +234,9 @@ AC_CHECK_HEADERS(ifaddrs.h, [AC_DEFINE(ZMQ_HAVE_IFADDRS, 1, [Have ifaddrs.h head # Use c++ in subsequent tests AC_LANG(C++) -# 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. +# pkg-config is used if found, 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 @@ -262,7 +267,7 @@ fi # PGM extension pgm_ext="no" -pgm_basename="libpgm-2-1-28~dfsg" +pgm_basename="libpgm-5.0.78" AC_SUBST(pgm_basename) @@ -273,9 +278,9 @@ AC_ARG_WITH([pgm], [AS_HELP_STRING([--with-pgm], if test "x$with_pgm_ext" != "xno"; then AC_MSG_CHECKING([if the PGM extension is supported on this platform]) - # OpenPGM is only supported by the vendor on x86 and AMD64 platforms... + # OpenPGM is only supported by the vendor on x86, AMD64, and SPARC platforms... case "${host_cpu}" in - i*86|x86_64) + i*86|x86_64|amd64|*sparc*) # Supported ;; *) @@ -283,9 +288,9 @@ if test "x$with_pgm_ext" != "xno"; then ;; esac - # ... and on Linux/Windows/Solaris systems. + # ... and on Linux/Windows/Solaris/FreeBSD/OSX systems. case "${host_os}" in - *linux*|*mingw32*|*solaris*) + *linux*|*mingw32*|*solaris*|*freebsd*|*darwin*) LIBZMQ_EXTRA_CXXFLAGS="${LIBZMQ_EXTRA_CXXFLAGS} -Wno-variadic-macros -Wno-long-long " ;; *) @@ -294,18 +299,6 @@ if test "x$with_pgm_ext" != "xno"; then esac AC_MSG_RESULT([yes]) - # Test if we have pkg-config - 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 - # Gzip, Perl and Python are required duing PGM build AC_CHECK_PROG(have_gzip, gzip, yes, no) if test "x$have_gzip" != "xyes"; then @@ -337,11 +330,11 @@ if test "x$gnu_compilers" = "xyes" -a "x$pgm_ext" = "xno"; then CPPFLAGS="-Wall $CPPFLAGS" if test "x$pedantic" = "xyes"; then - CPPFLAGS="-pedantic $CPPFLAGS" + CPPFLAGS="-pedantic $CPPFLAGS" fi if test "x$werror" = "xyes"; then - CPPFLAGS="-Werror $CPPFLAGS" + CPPFLAGS="-Werror $CPPFLAGS" fi fi @@ -367,5 +360,5 @@ AC_OUTPUT(Makefile src/Makefile doc/Makefile perf/Makefile src/libzmq.pc \ devices/Makefile devices/zmq_forwarder/Makefile \ devices/zmq_streamer/Makefile devices/zmq_queue/Makefile \ - builds/msvc/Makefile) + builds/msvc/Makefile tests/Makefile) |