1 dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
2 dnl That code is public domain and can be freely used or copied.
4 dnl Macro that check if doxygen is available or not.
6 dnl EFL_CHECK_DOXYGEN([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7 dnl Test for the doxygen program
8 dnl Defines efl_doxygen
9 dnl Defines the automake conditionnal EFL_BUILD_DOC
11 AC_DEFUN([EFL_CHECK_DOXYGEN],
15 dnl Disable the build of the documentation
20 [Disable documentation build @<:@default=enabled@:>@])],
22 if test "x${enableval}" = "xyes" ; then
28 [efl_enable_doc="yes"])
30 AC_MSG_CHECKING([whether to build documentation])
31 AC_MSG_RESULT([${efl_enable_doc}])
33 if test "x${efl_enable_doc}" = "xyes" ; then
35 dnl Specify the file name, without path
39 AC_ARG_WITH([doxygen],
41 [--with-doxygen=FILE],
42 [doxygen program to use @<:@default=doxygen@:>@])],
44 dnl Check the given doxygen program.
46 [efl_doxygen=${withval}
47 AC_CHECK_PROG([efl_have_doxygen],
51 if test "x${efl_have_doxygen}" = "xno" ; then
53 echo "The doxygen program you specified:"
55 echo "was not found. Please check the path and make sure "
56 echo "the program exists and is executable."
57 AC_MSG_WARN([no doxygen detected. Documentation will not be built])
60 [AC_CHECK_PROG([efl_have_doxygen],
64 if test "x${efl_have_doxygen}" = "xno" ; then
66 echo "The doxygen program was not found in your execute path."
67 echo "You may have doxygen installed somewhere not covered by your path."
69 echo "If this is the case make sure you have the packages installed, AND"
70 echo "that the doxygen program is in your execute path (see your"
71 echo "shell manual page on setting the \$PATH environment variable), OR"
72 echo "alternatively, specify the program to use with --with-doxygen."
73 AC_MSG_WARN([no doxygen detected. Documentation will not be built])
81 AC_SUBST([efl_doxygen])
83 if ! test "x${efl_have_doxygen}" = "xyes" ; then
87 AM_CONDITIONAL(EFL_BUILD_DOC, test "x${efl_enable_doc}" = "xyes")
89 if test "x${efl_enable_doc}" = "xyes" ; then
97 dnl End of efl_doxygen.m4