X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=acinclude.m4;h=8b240add9a8e21579e5a896c8d4504d07681dff4;hb=1ead02e88eb9f37757eeb1cc8c762fc48d6d08ee;hp=46a82b915892f8e5bb32ba552409bea16bb6c06c;hpb=522a6e0eac9adeaac533a5b700f42d85d46e2dd7;p=free-sw%2Fxcb%2Flibxcb diff --git a/acinclude.m4 b/acinclude.m4 index 46a82b9..8b240ad 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -5,7 +5,7 @@ dnl GCC_CHECK_VISIBILITY([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl Check the visibility feature of gcc dnl AC_DEFUN([GCC_CHECK_VISIBILITY], - [AC_MSG_CHECKING([whether ${CC} supports visibility feature]) + [AC_MSG_CHECKING([whether ${CC} supports symbol visibility]) save_CFLAGS=${CFLAGS} CFLAGS="$CFLAGS -fvisibility=hidden -fvisibility-inlines-hidden" AC_COMPILE_IFELSE( @@ -20,10 +20,90 @@ extern void f(int); [AC_DEFINE( GCC_HAS_VISIBILITY, [], - [Defined if GCC supports the vilibility feature]) + [Defined if GCC supports the visibility feature]) m4_if([$1], [], [:], [$1]) AC_MSG_RESULT(yes)], [m4_if([$2], [], [:], [$2]) AC_MSG_RESULT(no)]) CFLAGS=${save_CFLAGS} ]) +dnl Configure script for doxygen +dnl Vincent Torri 2006-05-11 +dnl +dnl AM_CHECK_DOXYGEN([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +dnl Test for the doxygen program, and define BUILD_DOCS and DOXYGEN. +dnl +AC_DEFUN([AM_CHECK_DOXYGEN], + [ + DOXYGEN="doxygen" + dnl + dnl Disable the build of the documentation + dnl + AC_ARG_ENABLE( + [build_docs], + AC_HELP_STRING( + [--disable-build-docs], + [Disable the build of the documentation]), + [if test x"$enableval" != x"yes" ; then + enable_build_docs="no" + else + enable_build_docs="yes" + fi], + [enable_build_docs="yes"]) + + if test "$enable_build_docs" = "no" ; then + BUILD_DOCS=no + else + dnl + dnl Get the prefix where doxygen is installed. + dnl + AC_ARG_WITH( + [doxygen], + AC_HELP_STRING( + [--with-doxygen=FILE], + [doxygen program to use (eg /usr/bin/doxygen)]), + dnl + dnl Check the given doxygen program. + dnl + [DOXYGEN=${withval} + AC_CHECK_PROG( + [BUILD_DOCS], + [${DOXYGEN}], + [yes], + [no]) + if test $BUILD_DOCS = no; then + echo "WARNING:" + echo "The doxygen program you specified:" + echo "$DOXYGEN" + echo "was not found. Please check the path and make sure " + echo "the program exists and is executable." + AC_MSG_WARN( + [Warning: no doxygen detected. Documentation will not be built]) + fi], + [AC_CHECK_PROG( + [BUILD_DOCS], + [${DOXYGEN}], + [yes], + [no]) + if test ${BUILD_DOCS} = no; then + echo "WARNING:" + echo "The doxygen program was not found in your execute" + echo "You may have doxygen installed somewhere not covered by your path." + echo "" + echo "If this is the case make sure you have the packages installed, AND" + echo "that the doxygen program is in your execute path (see your" + echo "shell's manual page on setting the \$PATH environment variable), OR" + echo "alternatively, specify the program to use with --with-doxygen." + AC_MSG_WARN( + [Warning: no doxygen detected. Documentation will not be built]) + fi]) + fi + AC_MSG_CHECKING([whether documentation is built]) + AC_MSG_RESULT([${BUILD_DOCS}]) + dnl + dnl Substitution + dnl + AC_SUBST([DOXYGEN]) + AM_CONDITIONAL(BUILD_DOCS, test "x$BUILD_DOCS" = "xyes") + ]) +dnl End of acinclude.m4