diff options
Diffstat (limited to 'qpid/cpp/configure.ac')
-rw-r--r-- | qpid/cpp/configure.ac | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/qpid/cpp/configure.ac b/qpid/cpp/configure.ac index 43a32d3ad7..0a28b21968 100644 --- a/qpid/cpp/configure.ac +++ b/qpid/cpp/configure.ac @@ -27,7 +27,7 @@ AC_PROG_CC_STDC AM_PROG_CC_C_O AC_PROG_CXX AC_USE_SYSTEM_EXTENSIONS -AC_LANG([C++]) +AC_LANG([C++]) # Check for optional use of help2man AC_CHECK_PROG([HELP2MAN], [help2man], [help2man]) @@ -81,14 +81,15 @@ if test x$GXX = xyes; then gl_COMPILER_FLAGS(-Wvolatile-register-var) gl_COMPILER_FLAGS(-Winvalid-pch) gl_COMPILER_FLAGS(-Wno-system-headers) - gl_COMPILER_FLAGS(-Woverloaded-virtual) + gl_COMPILER_FLAGS(-Woverloaded-virtual) + gl_COMPILER_FLAGS(-Wno-attributes) AC_SUBST([WARNING_CFLAGS], [$COMPILER_FLAGS]) AC_DEFINE([lint], 1, [Define to 1 if the compiler is checking for lint.]) COMPILER_FLAGS= fi else AC_CHECK_DECL([__SUNPRO_CC], [SUNCC=yes], [SUNCC=no]) - + # Set up for sun CC compiler if test x$SUNCC = xyes; then if test "${enableval}" = yes; then @@ -116,7 +117,7 @@ LIBS=$gl_saved_libs gl_CLOCK_TIME -# Enable Valgrind +# Enable Valgrind AC_ARG_ENABLE([valgrind], [AS_HELP_STRING([--enable-valgrind], [run valgrind memory checker on tests, if available (default yes)])], @@ -236,7 +237,7 @@ if test -n "$PERL"; then PERL_ARCHLIB=`perl -MConfig -e 'print "$Config{archlib}";'` AC_CHECK_FILE( ["$PERL_ARCHLIB/CORE/perl.h"], [AC_SUBST([PERL_INC], ["$PERL_ARCHLIB/CORE"])] ) -fi +fi AM_CONDITIONAL([HAVE_PERL_DEVEL], [test -n "$PERL" && test -n "$SWIG" && test -n "$PERL_INC"]) specdir=`pwd`/$srcdir/../specs @@ -261,7 +262,7 @@ tmp_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -L/usr/lib/openais -L/usr/lib64/openais -L/usr/lib/corosync -L/usr/lib64/corosync" AC_CHECK_LIB([cpg],[cpg_local_get],[have_libcpg=yes],) AC_CHECK_HEADERS([openais/cpg.h corosync/cpg.h],[have_cpg_h=yes],) -AC_ARG_WITH([cpg], +AC_ARG_WITH([cpg], [AS_HELP_STRING([--with-cpg], [Build with CPG support for clustering.])], [case "${withval}" in yes) # yes - require dependencies @@ -269,7 +270,7 @@ AC_ARG_WITH([cpg], test x$have_cpg_h = xyes || AC_MSG_ERROR([cpg.h not found, install openais-devel or corosync-devel]) with_cpg=yes ;; - no) with_cpg=no ;; + no) with_cpg=no ;; *) AC_MSG_ERROR([Bad value ${withval} for --with-cpg option]) ;; esac], [ # not specified - use if present @@ -282,7 +283,7 @@ AS_IF([test ! x$with_cpg = xyes], [LDFLAGS=$tmp_LDFLAGS]) AC_CHECK_LIB([cman],[cman_is_quorate],have_libcman=yes,) AC_CHECK_HEADERS([libcman.h],have_libcman_h=yes,) -AC_ARG_WITH([libcman], +AC_ARG_WITH([libcman], [AS_HELP_STRING([--with-libcman], [Integration with libcman quorum service.])], [case "${withval}" in yes) # yes - require dependencies @@ -290,7 +291,7 @@ AC_ARG_WITH([libcman], test x$have_libcman_h = xyes || AC_MSG_ERROR([libcman.h not found, install cman-devel or cmanlib-devel]) with_libcman=yes ;; - no) with_libcman=no ;; + no) with_libcman=no ;; *) AC_MSG_ERROR([Bad value ${withval} for --with-libcman option]) ;; esac], [ # not specified - use if present and we're using with_cpg @@ -442,9 +443,9 @@ AC_ARG_WITH([ssl], [ with_SSL=yes AC_PATH_PROG([NSPR_CONFIG], [nspr-config]) - AS_IF([test x$NSPR_CONFIG = x], [with_SSL=no], + AS_IF([test x$NSPR_CONFIG = x], [with_SSL=no], [AC_PATH_PROG([NSS_CONFIG], [nss-config]) - AS_IF([test x$NSS_CONFIG = x], [with_SSL=no], + AS_IF([test x$NSS_CONFIG = x], [with_SSL=no], [SSL_CFLAGS="`$NSPR_CONFIG --cflags` `$NSS_CONFIG --cflags`" SSL_LDFLAGS="`$NSPR_CONFIG --libs` `$NSS_CONFIG --libs`"])]) ] @@ -493,11 +494,11 @@ esac AM_CONDITIONAL([SUNOS], [test x$arch = xsolaris]) # Check for some syslog capabilities not present in all systems -AC_TRY_COMPILE([#include <sys/syslog.h>], +AC_TRY_COMPILE([#include <sys/syslog.h>], [int v = LOG_AUTHPRIV;], [AC_DEFINE([HAVE_LOG_AUTHPRIV], [1], [Set to 1 whether LOG_AUTHPRIV is supported.])],) -AC_TRY_COMPILE([#include <sys/syslog.h>], +AC_TRY_COMPILE([#include <sys/syslog.h>], [int v = LOG_FTP;], [AC_DEFINE([HAVE_LOG_FTP], [1], [Set to 1 whether LOG_FTP is supported.])],) @@ -521,6 +522,13 @@ AM_PATH_PYTHON() builddir_lib_suffix="/.libs" AC_SUBST([builddir_lib_suffix]) +# Enable -fvisibility=hidden if using a gcc that supports it +save_CXXFLAGS="$CXXFLAGS" +AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden]) +CXXFLAGS="$CXXFLAGS -fvisibility=hidden -fvisibility-inlines-hidden" +AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]), + [CXXFLAGS="$save_CXXFLAGS" ; AC_MSG_RESULT([no])]); + # Files to generate AC_CONFIG_FILES([ Makefile |