2009-01-11 02:27:01 -08:00
|
|
|
dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
|
|
|
|
dnl That code is public domain and can be freely used or copied.
|
|
|
|
|
|
|
|
dnl Macro that check if doxygen is available or not.
|
|
|
|
|
|
|
|
dnl EFL_CHECK_DOXYGEN([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
|
|
|
dnl Test for the doxygen program
|
2009-02-01 12:26:56 -08:00
|
|
|
dnl Defines efl_doxygen
|
2009-01-11 02:27:01 -08:00
|
|
|
dnl Defines the automake conditionnal EFL_BUILD_DOC
|
|
|
|
dnl
|
|
|
|
AC_DEFUN([EFL_CHECK_DOXYGEN],
|
|
|
|
[
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Disable the build of the documentation
|
|
|
|
dnl
|
|
|
|
AC_ARG_ENABLE([doc],
|
2009-01-31 22:52:37 -08:00
|
|
|
[AC_HELP_STRING(
|
|
|
|
[--disable-doc],
|
|
|
|
[Disable documentation build @<:@default=enabled@:>@])],
|
|
|
|
[
|
|
|
|
if test "x${enableval}" = "xyes" ; then
|
|
|
|
efl_enable_doc="yes"
|
2009-01-11 02:27:01 -08:00
|
|
|
else
|
2009-01-31 22:52:37 -08:00
|
|
|
efl_enable_doc="no"
|
|
|
|
fi
|
|
|
|
],
|
2009-05-15 01:26:45 -07:00
|
|
|
[efl_enable_doc="yes"])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether to build documentation])
|
|
|
|
AC_MSG_RESULT([${efl_enable_doc}])
|
2009-01-11 02:27:01 -08:00
|
|
|
|
2009-01-31 22:52:37 -08:00
|
|
|
if test "x${efl_enable_doc}" = "xyes" ; then
|
|
|
|
|
2009-01-11 02:27:01 -08:00
|
|
|
dnl
|
2009-05-15 01:26:45 -07:00
|
|
|
dnl Specify the file name, without path
|
2009-01-11 02:27:01 -08:00
|
|
|
dnl
|
2009-01-31 22:52:37 -08:00
|
|
|
|
|
|
|
efl_doxygen="doxygen"
|
|
|
|
|
|
|
|
AC_ARG_WITH([doxygen],
|
|
|
|
[AC_HELP_STRING(
|
|
|
|
[--with-doxygen=FILE],
|
|
|
|
[doxygen program to use @<:@default=doxygen@:>@])],
|
|
|
|
dnl
|
|
|
|
dnl Check the given doxygen program.
|
|
|
|
dnl
|
2009-02-01 12:26:56 -08:00
|
|
|
[efl_doxygen=${withval}
|
2009-01-31 22:52:37 -08:00
|
|
|
AC_CHECK_PROG([efl_have_doxygen],
|
|
|
|
[${efl_doxygen}],
|
|
|
|
[yes],
|
|
|
|
[no])
|
|
|
|
if test "x${efl_have_doxygen}" = "xno" ; then
|
|
|
|
echo "WARNING:"
|
|
|
|
echo "The doxygen program you specified:"
|
2009-05-15 01:26:45 -07:00
|
|
|
echo "${efl_doxygen}"
|
2009-01-31 22:52:37 -08:00
|
|
|
echo "was not found. Please check the path and make sure "
|
|
|
|
echo "the program exists and is executable."
|
2009-05-15 01:26:45 -07:00
|
|
|
AC_MSG_WARN([no doxygen detected. Documentation will not be built])
|
2009-01-31 22:52:37 -08:00
|
|
|
fi
|
|
|
|
],
|
|
|
|
[AC_CHECK_PROG([efl_have_doxygen],
|
|
|
|
[${efl_doxygen}],
|
|
|
|
[yes],
|
|
|
|
[no])
|
|
|
|
if test "x${efl_have_doxygen}" = "xno" ; then
|
|
|
|
echo "WARNING:"
|
2009-05-15 01:26:45 -07:00
|
|
|
echo "The doxygen program was not found in your execute path."
|
2009-01-31 22:52:37 -08:00
|
|
|
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 manual page on setting the \$PATH environment variable), OR"
|
|
|
|
echo "alternatively, specify the program to use with --with-doxygen."
|
2009-05-15 01:26:45 -07:00
|
|
|
AC_MSG_WARN([no doxygen detected. Documentation will not be built])
|
2009-01-31 22:52:37 -08:00
|
|
|
fi
|
2009-05-15 01:26:45 -07:00
|
|
|
])
|
2009-01-31 22:52:37 -08:00
|
|
|
fi
|
2009-01-11 02:27:01 -08:00
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Substitution
|
|
|
|
dnl
|
2009-01-31 22:52:37 -08:00
|
|
|
AC_SUBST([efl_doxygen])
|
|
|
|
|
|
|
|
if ! test "x${efl_have_doxygen}" = "xyes" ; then
|
|
|
|
efl_enable_doc="no"
|
|
|
|
fi
|
2009-01-11 02:27:01 -08:00
|
|
|
|
2009-01-31 22:52:37 -08:00
|
|
|
AM_CONDITIONAL(EFL_BUILD_DOC, test "x${efl_enable_doc}" = "xyes")
|
2009-01-11 02:27:01 -08:00
|
|
|
|
2009-01-31 22:52:37 -08:00
|
|
|
if test "x${efl_enable_doc}" = "xyes" ; then
|
2009-05-15 01:26:45 -07:00
|
|
|
m4_default([$1], [:])
|
2009-01-11 02:27:01 -08:00
|
|
|
else
|
2009-05-15 01:26:45 -07:00
|
|
|
m4_default([$2], [:])
|
2009-01-11 02:27:01 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl End of doxygen.m4
|