~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to m4/pandora_visibility.m4

  • Committer: Monty Taylor
  • Date: 2010-08-21 03:34:31 UTC
  • mto: (1725.1.3 build)
  • mto: This revision was merged to the branch mainline in revision 1726.
  • Revision ID: mordred@inaugust.com-20100821033431-e0czq298av2aqx25
Rearranged how we set -fvisibility, allowing us to turn it on on a
library-by-library basis even if we specify skip-visiblity as an argument to
PANDORA_CANONICAL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
dnl Set the variable CFLAG_VISIBILITY.
21
21
dnl Defines and sets the variable HAVE_VISIBILITY.
22
22
 
23
 
AC_DEFUN([PANDORA_VISIBILITY],
 
23
AC_DEFUN([PANDORA_CHECK_VISIBILITY],
24
24
[
25
25
  AC_REQUIRE([AC_PROG_CC])
26
26
  AC_REQUIRE([PANDORA_PLATFORM])
43
43
    AC_MSG_RESULT([$gl_cv_cc_visibility])
44
44
    if test $gl_cv_cc_visibility = yes; then
45
45
      CFLAG_VISIBILITY="-fvisibility=hidden"
 
46
      NO_VISIBILITY="-fvisibility=default"
46
47
      HAVE_VISIBILITY=1
47
48
    fi
48
49
  ])
49
50
  AS_IF([test "x$SUNCC" = "xyes"],[
50
51
    CFLAG_VISIBILITY="-xldscope=hidden"
 
52
    NO_VISIBILITY="-xldscope=global"
51
53
    HAVE_VISIBILITY=1
52
54
  ])
53
55
  AC_SUBST([CFLAG_VISIBILITY])
 
56
  AC_SUBST([NO_VISIBILITY])
54
57
  AC_SUBST([HAVE_VISIBILITY])
55
58
  AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
56
59
    [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
57
60
])
 
61
 
 
62
AC_DEFUN([PANDORA_ENABLE_VISIBILITY],[
 
63
  AC_REQUIRE([PANDORA_CHECK_VISIBILITY])
 
64
  AM_CFLAGS="${AM_CFLAGS} ${CFLAG_VISIBILITY}"
 
65
  AM_CXXFLAGS="${AM_CXXFLAGS} ${CFLAG_VISIBILITY}"
 
66
])