Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
aed2eeaf
Commit
aed2eeaf
authored
Dec 07, 2010
by
Mikko Koppanen
Committed by
Martin Sustrik
Dec 07, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix visibility on rhel4
Signed-off-by:
Mikko Koppanen
<
mkoppanen@php.net
>
parent
9bb5323a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
11 deletions
+53
-11
acinclude.m4
acinclude.m4
+46
-2
configure.in
configure.in
+7
-9
No files found.
acinclude.m4
View file @
aed2eeaf
...
...
@@ -67,6 +67,22 @@ AC_DEFUN([AC_ZMQ_CHECK_LANG_CLANG],
[ac_zmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler="no" ; $2])
])])
dnl ##############################################################################
dnl # AC_ZMQ_CHECK_LANG_GCC4([action-if-found], [action-if-not-found]) #
dnl # Check if the current language is compiled using clang #
dnl ##############################################################################
AC_DEFUN([AC_ZMQ_CHECK_LANG_GCC4],
[AC_CACHE_CHECK([whether we are using gcc >= 4 _AC_LANG compiler],
[ac_zmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler],
[_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
[[#if (!defined __GNUC__ || __GNUC__ < 4)
error if not gcc4 or higher
#endif
]])],
[ac_zmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler="yes" ; $1],
[ac_zmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler="no" ; $2])
])])
dnl ##############################################################################
dnl # AC_ZMQ_CHECK_DOC_BUILD #
dnl # Check whether to build documentation and install man-pages #
...
...
@@ -142,6 +158,7 @@ AC_DEFUN([AC_ZMQ_CHECK_COMPILERS], [{
AC_ZMQ_CHECK_LANG_ICC
AC_ZMQ_CHECK_LANG_SUN_STUDIO
AC_ZMQ_CHECK_LANG_CLANG
AC_ZMQ_CHECK_LANG_GCC4
AC_LANG_POP([C])
AC_LANG_PUSH(C++)
...
...
@@ -150,6 +167,7 @@ AC_DEFUN([AC_ZMQ_CHECK_COMPILERS], [{
AC_ZMQ_CHECK_LANG_ICC
AC_ZMQ_CHECK_LANG_SUN_STUDIO
AC_ZMQ_CHECK_LANG_CLANG
AC_ZMQ_CHECK_LANG_GCC4
AC_LANG_POP([C++])
# Set GCC and GXX variables correctly
...
...
@@ -173,6 +191,8 @@ dnl # Sets ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_[FLAG]=yes/no #
dnl ############################################################################
AC_DEFUN([AC_ZMQ_CHECK_LANG_FLAG], [{
AC_REQUIRE([AC_PROG_GREP])
AC_MSG_CHECKING([whether _AC_LANG compiler supports $1])
ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save=$ac_c_werror_flag
...
...
@@ -195,8 +215,8 @@ AC_DEFUN([AC_ZMQ_CHECK_LANG_FLAG], [{
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
# This hack exist for ICC, which outputs unknown options as remarks
# Remarks are not turned into errors even with -Werror on
[if (
grep
'ignoring unknown' conftest.err ||
grep
'not supported' conftest.err) >/dev/null 2>&1; then
[if (
$GREP
'ignoring unknown' conftest.err ||
$GREP
'not supported' conftest.err) >/dev/null 2>&1; then
eval AS_TR_SH(ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="no"
else
eval AS_TR_SH(ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="yes"
...
...
@@ -494,3 +514,27 @@ AC_DEFUN([AC_ZMQ_CHECK_LANG_PRAGMA], [{
AS_IF([eval test x$]AS_TR_SH(ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_pragma_$1)[ = "xyes"],
[$2], [$3])
}])
dnl ################################################################################
dnl # AC_ZMQ_CHECK_LANG_VISIBILITY([action-if-found], [action-if-not-found]) #
dnl # Check if the compiler supports dso visibility #
dnl ################################################################################
AC_DEFUN([AC_ZMQ_CHECK_LANG_VISIBILITY], [{
ac_zmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag=""
if test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes" -o \
"x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes" -o \
"x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler" = "xyes"; then
AC_ZMQ_CHECK_LANG_FLAG([-fvisibility=hidden],
[ac_zmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag="-fvisibility=hidden"])
elif test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then
AC_ZMQ_CHECK_LANG_FLAG([-xldscope=hidden],
[ac_zmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag="-xldscope=hidden"])
fi
AC_MSG_CHECKING(whether _AC_LANG compiler supports dso visibility)
AS_IF([test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag" != "x"],
[AC_MSG_RESULT(yes) ; $1], [AC_MSG_RESULT(no) ; $2])
}])
configure.in
View file @
aed2eeaf
...
...
@@ -56,6 +56,9 @@ ac_zmq_pedantic="yes"
# By default compiling with -Werror except OSX.
ac_zmq_werror="yes"
# By default use DSO visibility
ac_zmq_dso_visibility="yes"
# Whether we are on mingw or not.
ac_zmq_on_mingw32="no"
...
...
@@ -175,6 +178,7 @@ case "${host_os}" in
AC_ZMQ_CHECK_LANG_FLAG_PREPEND([-Wno-long-long])
AC_LANG_POP([C++])
ac_zmq_on_mingw32="yes"
ac_zmq_dso_visibility="no"
if test "x$enable_static" = "xyes"; then
AC_MSG_ERROR([Building static libraries is not supported under MinGW32])
...
...
@@ -202,19 +206,13 @@ esac
#
# Check if the compiler supports -fvisibility=hidden flag. MinGW32 uses __declspec
#
if test "x$ac_zmq_
on_mingw32" !
= "xyes"; then
if test "x$ac_zmq_
dso_visibility"
= "xyes"; then
AC_LANG_PUSH([C])
AC_ZMQ_CHECK_LANG_FLAG([-fvisibility=hidden],
[LIBZMQ_EXTRA_CFLAGS="-fvisibility=hidden ${LIBZMQ_EXTRA_CFLAGS}"],
[AC_ZMQ_CHECK_LANG_FLAG([-xldscope=hidden],
[LIBZMQ_EXTRA_CFLAGS="-xldscope=hidden ${LIBZMQ_EXTRA_CFLAGS}"])])
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_FLAG([-fvisibility=hidden],
[LIBZMQ_EXTRA_CXXFLAGS="-fvisibility=hidden ${LIBZMQ_EXTRA_CXXFLAGS}"],
[AC_ZMQ_CHECK_LANG_FLAG([-xldscope=hidden],
[LIBZMQ_EXTRA_CXXFLAGS="-xldscope=hidden ${LIBZMQ_EXTRA_CXXFLAGS}"])])
AC_ZMQ_CHECK_LANG_VISIBILITY([LIBZMQ_EXTRA_CXXFLAGS="$ac_zmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag ${LIBZMQ_EXTRA_CXXFLAGS}"])
AC_LANG_POP([C++])
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment