1 dnl Detection and configuration of the visibility feature of gcc
2 dnl Vincent Torri 2006-02-11
4 dnl XCB_CHECK_VISIBILITY([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
5 dnl Check the visibility feature of gcc
7 AC_DEFUN([XCB_CHECK_VISIBILITY],
9 AC_MSG_CHECKING([whether ${CC} supports symbol visibility])
12 CFLAGS="$CFLAGS -fvisibility=hidden -fvisibility-inlines-hidden"
16 #pragma GCC visibility push(hidden)
18 #pragma GCC visibility pop
25 [Defined if GCC supports the visibility feature])
26 m4_if([$1], [], [:], [$1])
28 [m4_if([$2], [], [:], [$2])
34 dnl Configure script for doxygen
35 dnl Vincent Torri 2006-05-11
37 dnl XCB_CHECK_DOXYGEN([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
38 dnl Test for the doxygen program, and define BUILD_DOCS and DOXYGEN.
40 AC_DEFUN([XCB_CHECK_DOXYGEN],
45 dnl Disable the build of the documentation
50 [--disable-build-docs],
51 [Disable the build of the documentation]),
52 [if test x"$enableval" != x"yes" ; then
53 enable_build_docs="no"
55 enable_build_docs="yes"
57 [enable_build_docs="yes"])
59 if test "$enable_build_docs" = "no" ; then
63 dnl Get the prefix where doxygen is installed.
68 [--with-doxygen=FILE],
69 [doxygen program to use (eg /usr/bin/doxygen)]),
71 dnl Check the given doxygen program.
79 if test $BUILD_DOCS = no; then
81 echo "The doxygen program you specified:"
83 echo "was not found. Please check the path and make sure "
84 echo "the program exists and is executable."
86 [Warning: no doxygen detected. Documentation will not be built])
93 if test ${BUILD_DOCS} = no; then
95 echo "The doxygen program was not found in your execute"
96 echo "You may have doxygen installed somewhere not covered by your path."
98 echo "If this is the case make sure you have the packages installed, AND"
99 echo "that the doxygen program is in your execute path (see your"
100 echo "shell manual page on setting the \$PATH environment variable), OR"
101 echo "alternatively, specify the program to use with --with-doxygen."
103 [Warning: no doxygen detected. Documentation will not be built])
105 AC_PATH_PROG(DOT, dot, no)
106 if test "$DOT" = "no"; then
107 AC_MSG_WARN([Warning: no dot detected. Documentation will not be built])
111 AC_MSG_CHECKING([whether documentation is built])
112 AC_MSG_RESULT([${BUILD_DOCS}])
119 AM_CONDITIONAL(BUILD_DOCS, test "x$BUILD_DOCS" = "xyes")
123 dnl Detection and configuration of the visibility feature of gcc
124 dnl Vincent Torri 2006-02-11
126 dnl XCB_EXTENSION(name, default)
127 dnl set the X extension
129 AC_DEFUN([XCB_EXTENSION],
131 pushdef([UP], translit([$1], [-a-z], [_A-Z]))dnl
132 pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl
135 [AS_HELP_STRING([--enable-[]DOWN], [Build XCB $1 Extension (default: $2)])],
136 [BUILD_[]UP=$enableval],
139 AM_CONDITIONAL(BUILD_[]UP, [test "x$BUILD_[]UP" = "xyes"])
142 dnl End of acinclude.m4