Fix build if Doxygen is missing

This commit is contained in:
Bradlee Speice 2012-07-19 12:24:01 -04:00
parent 68f6dbbff2
commit 9596cca6a0
2 changed files with 16 additions and 3 deletions

View File

@ -1,4 +1,8 @@
if BUILD_DOXYGEN
SUBDIRS = libcvautomation examples docs
else
SUBDIRS = libcvautomation examples
endif
#And the BASH macros
dist_sysconf_DATA = libcvautomation_funcs

View File

@ -56,25 +56,34 @@ AC_ARG_WITH(docs, [ --with-documentation build documentation for libcvautoma
AC_ARG_ENABLE(man, [ --enable-man enable building the 'man' pages for libcvautomation @<:@default=enable@:>@])
AC_ARG_ENABLE(tex, [ --enable-tex enable building the 'latex' pages for libcvautomation @<:@default=enable@:>@])
if test "$with_docs" != "no"; then
AC_CHECK_PROGS([Doxygen], [doxygen], [true])
if test -z "$Doxygen"; then
AC_CHECK_PROGS([Doxygen], [doxygen], [missing], [found])
echo "$Doxygen"
if test "$Doxygen" == "missing"; then
AC_MSG_WARN([Doxygen not found - continuing without building documentation.])
AM_CONDITIONAL(BUILD_DOXYGEN, [test "$Doxygen" != "missing"])
enable_man="no"
enable_tex="no"
else
AM_CONDITIONAL(BUILD_DOXYGEN, [test "$with_docs" != "no"])
AC_CONFIG_FILES([docs/Doxyfile])
fi
#Check if we should generate man pages
if test "$enable_man" != "no"; then
AC_SUBST(ENABLE_MAN, YES)
AM_CONDITIONAL(BUILD_MAN, [test "$enable_man" != "no"])
else
AC_SUBST(ENABLE_MAN, NO)
AM_CONDITIONAL(BUILD_MAN, [test "$enable_man" != "no"])
fi
#Check if we should build Tex pages
if test "$enable_tex" != "no"; then
AC_SUBST(ENABLE_TEX, YES)
AM_CONDITIONAL(BUILD_TEX, [test "$enable_tex" != "no"])
else
AC_SUBST(ENABLE_TEX, NO)
AM_CONDITIONAL(BUILD_TEX, [test "$enable_tex" != "no"])
fi
fi