Commit 3c5335d5 authored by Karl Wette's avatar Karl Wette

Doxygen: split LALSUITE_ENABLE_DOXYGEN macro into LALSUITE_{ENABLE,USE}_DOXYGEN macros

Original: 1bad8394d002d1c4e760a5153ca22c467194464f
parent c2f09a33
# -*- mode: autoconf; -*-
# lalsuite_build.m4 - top level build macros
#
# serial 102
# serial 103
# not present in older versions of pkg.m4
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
......@@ -608,98 +608,6 @@ AC_DEFUN([LALSUITE_CHECK_LIBRARY_FOR_SUPPORT],[
# end $0
])
AC_DEFUN([LALSUITE_ENABLE_DOXYGEN],[
# $0: enable Doxygen documentation
AC_REQUIRE([LALSUITE_CHECK_GIT_REPO])
AC_ARG_ENABLE(
[doxygen],
AC_HELP_STRING(
[--enable-doxygen],
[generate Doxygen documentation]
),[
AS_CASE(["${enableval}"],
[yes],[doxygen=true],
[no],[doxygen=false],
[AC_MSG_ERROR([invalid value "${enableval}" for --enable-doxygen])]
)
],[
doxygen=false
]
)
AC_ARG_WITH(
[mathjax],
AC_HELP_STRING(
[--with-mathjax=PATH],
[use MathJax installation at PATH [default: use CDN]]
),[
DOXYGEN_MATHJAXDIR="${withval}"
],[
DOXYGEN_MATHJAXDIR=
]
)
LALSUITE_ENABLE_MODULE([DOXYGEN])
AS_IF([test "x${doxygen}" = xtrue],[
AC_CONFIG_FILES([doxygen/filter],[chmod +x doxygen/filter])
LALSUITE_REQUIRE_PYTHON([2.6]) # Python is required to run some scripts
AC_PATH_PROG([DOXYGEN],[doxygen],[],[])
AS_IF([test "x${DOXYGEN}" = x],[
AC_MSG_ERROR([could not find Doxygen in PATH])
])
doxygen_min_version=1.8.1.2 # minimum required Doxygen version
AC_MSG_CHECKING([if ${DOXYGEN} version is at least ${doxygen_min_version}])
doxygen_version=`${DOXYGEN} --version 2>/dev/null`
LALSUITE_VERSION_COMPARE([${doxygen_version}],[<],[${doxygen_min_version}],[
AC_MSG_RESULT([no (${doxygen_version})])
AC_MSG_ERROR([Doxygen version ${doxygen_min_version} or later is required])
])
AC_MSG_RESULT([yes (${doxygen_version})])
AC_CONFIG_COMMANDS_PRE([
AC_SUBST([DOXYGEN_ENABLED_SECTIONS])
AC_SUBST([DOXYGEN_TAGFILES],[])
AC_SUBST([DOXYGEN_INSTALL_DIRMAP],[])
for arg in ${lalsuite_libs}; do
AS_CASE([${arg}],
[lalsupport],[:],[
ucarg=[`echo ${arg} | tr '[a-z]' '[A-Z]'`]
DOXYGEN_ENABLED_SECTIONS="${DOXYGEN_ENABLED_SECTIONS} ${ucarg}"
arg_htmldir_name="${ucarg}_HTMLDIR"
AS_VAR_COPY([arg_htmldir],[${arg_htmldir_name}])
AS_IF([test "x${LALSUITE_BUILD}" = xtrue],[
tagpath="\$(abs_top_builddir)/../${arg}/doxygen/out"
],[
tagpath="${arg_htmldir}"
])
DOXYGEN_TAGFILES="${DOXYGEN_TAGFILES} ${tagpath}/${arg}.tag=${tagpath}"
DOXYGEN_INSTALL_DIRMAP="${DOXYGEN_INSTALL_DIRMAP} ${tagpath}:${arg_htmldir}"
]
)
done
])
AC_SUBST([DOXYGEN_MATHJAXDIR])
AS_IF([test "x${DOXYGEN_MATHJAXDIR}" != x],[
AS_IF([test ! -f "${DOXYGEN_MATHJAXDIR}/MathJax.js"],[
AC_MSG_ERROR([no MathJax installation found in ${DOXYGEN_MATHJAXDIR}])
])
],[
for dir in /usr/share/javascript/mathjax; do
AC_MSG_CHECKING([for MathJax installation in ${dir}])
AS_IF([test -f "${dir}/MathJax.js"],[
AC_MSG_RESULT([yes])
DOXYGEN_MATHJAXDIR="${dir}"
break
],[
AC_MSG_RESULT([no])
])
done
AS_IF([test "x${DOXYGEN_MATHJAXDIR}" = x],[
DOXYGEN_MATHJAXDIR='https://cdn.mathjax.org/mathjax/latest'
AC_MSG_NOTICE([using MathJax CDN at ${DOXYGEN_MATHJAXDIR}])
])
])
])
# end $0
])
AC_DEFUN([LALSUITE_ENABLE_NIGHTLY],
[AC_ARG_ENABLE(
[nightly],
......@@ -1089,3 +997,114 @@ AC_MSG_RESULT([no])
AC_MSG_RESULT([unknown])
[cuda=false])
])
AC_DEFUN([LALSUITE_ENABLE_DOXYGEN],[
# $0: enable Doxygen documentation
AC_ARG_ENABLE(
[doxygen],
AC_HELP_STRING(
[--enable-doxygen],
[generate Doxygen documentation]
),[
AS_CASE(["${enableval}"],
[yes],[doxygen=true],
[no],[doxygen=false],
[AC_MSG_ERROR([invalid value "${enableval}" for --enable-doxygen])]
)
],[
doxygen=false
]
)
# end $0
])
AC_DEFUN([LALSUITE_USE_DOXYGEN],[
# $0: configure Doxygen documentation
AC_REQUIRE([LALSUITE_CHECK_GIT_REPO])
# add configuration option for MathJax installation
AC_ARG_WITH(
[mathjax],
AC_HELP_STRING(
[--with-mathjax=PATH],
[use MathJax installation at PATH [default: use CDN]]
),[
DOXYGEN_MATHJAXDIR="${withval}"
],[
DOXYGEN_MATHJAXDIR=
]
)
# enable Doxygen module
LALSUITE_ENABLE_MODULE([DOXYGEN])
AS_IF([test "x${doxygen}" = xtrue],[
# configure Doxygen filter script
AC_CONFIG_FILES([doxygen/filter],[chmod +x doxygen/filter])
# Python is required to run some scripts
LALSUITE_REQUIRE_PYTHON([2.6])
# check for Doxygen
AC_PATH_PROG([DOXYGEN],[doxygen],[],[])
AS_IF([test "x${DOXYGEN}" = x],[
AC_MSG_ERROR([could not find Doxygen in PATH])
])
doxygen_min_version=1.8.1.2 # minimum required Doxygen version
AC_MSG_CHECKING([if ${DOXYGEN} version is at least ${doxygen_min_version}])
doxygen_version=`${DOXYGEN} --version 2>/dev/null`
LALSUITE_VERSION_COMPARE([${doxygen_version}],[<],[${doxygen_min_version}],[
AC_MSG_RESULT([no (${doxygen_version})])
AC_MSG_ERROR([Doxygen version ${doxygen_min_version} or later is required])
])
AC_MSG_RESULT([yes (${doxygen_version})])
# build some substituted variables from list of configured LAL libraries
AC_SUBST([DOXYGEN_ENABLED_SECTIONS])
AC_SUBST([DOXYGEN_TAGFILES],[])
AC_SUBST([DOXYGEN_INSTALL_DIRMAP],[])
for arg in ${lalsuite_libs}; do
AS_CASE([${arg}],
[lalsupport],[:],[
ucarg=[`echo ${arg} | tr '[a-z]' '[A-Z]'`]
DOXYGEN_ENABLED_SECTIONS="${DOXYGEN_ENABLED_SECTIONS} ${ucarg}"
arg_htmldir_name="${ucarg}_HTMLDIR"
AS_VAR_COPY([arg_htmldir],[${arg_htmldir_name}])
AS_IF([test "x${LALSUITE_BUILD}" = xtrue],[
tagpath="\$(abs_top_builddir)/../${arg}/doxygen/out"
],[
tagpath="${arg_htmldir}"
])
DOXYGEN_TAGFILES="${DOXYGEN_TAGFILES} ${tagpath}/${arg}.tag=${tagpath}"
DOXYGEN_INSTALL_DIRMAP="${DOXYGEN_INSTALL_DIRMAP} ${tagpath}:${arg_htmldir}"
]
)
done
# configure MathJax
AC_SUBST([DOXYGEN_MATHJAXDIR])
AS_IF([test "x${DOXYGEN_MATHJAXDIR}" != x],[
AS_IF([test ! -f "${DOXYGEN_MATHJAXDIR}/MathJax.js"],[
AC_MSG_ERROR([no MathJax installation found in ${DOXYGEN_MATHJAXDIR}])
])
],[
for dir in /usr/share/javascript/mathjax; do
AC_MSG_CHECKING([for MathJax installation in ${dir}])
AS_IF([test -f "${dir}/MathJax.js"],[
AC_MSG_RESULT([yes])
DOXYGEN_MATHJAXDIR="${dir}"
break
],[
AC_MSG_RESULT([no])
])
done
AS_IF([test "x${DOXYGEN_MATHJAXDIR}" = x],[
DOXYGEN_MATHJAXDIR='https://cdn.mathjax.org/mathjax/latest'
AC_MSG_NOTICE([using MathJax CDN at ${DOXYGEN_MATHJAXDIR}])
])
])
])
# end $0
])
......@@ -314,6 +314,9 @@ fi
# configure SWIG wrapping modules
LALSUITE_USE_SWIG
# configure Doxygen documentation
LALSUITE_USE_DOXYGEN
# checks for typedefs, structures, and compiler characteristics
AC_C_BIGENDIAN
AC_C_CONST
......
......@@ -368,6 +368,9 @@ if test "${boinc}" = "true" ; then
AC_LANG_POP([C++])
fi
# configure Doxygen documentation
LALSUITE_USE_DOXYGEN
# check for qthread
LALAPPS_CHECK_QTHREAD
......
......@@ -138,6 +138,9 @@ LALSUITE_CHECK_LIB([LALSimulation],[1.2.0],[XLALSimDetectorStrainREAL8TimeSeries
# configure SWIG wrapping modules
LALSUITE_USE_SWIG
# configure Doxygen documentation
LALSUITE_USE_DOXYGEN
# add gcc specific flags
LALSUITE_ADD_GCC_FLAGS
......
......@@ -131,6 +131,9 @@ LALSUITE_CHECK_LIB([LALBurst],[1.2.0],[XLALEPSearch],[lal/EPSearch.h])
# configure SWIG wrapping modules
LALSUITE_USE_SWIG
# configure Doxygen documentation
LALSUITE_USE_DOXYGEN
# add gcc specific flags
LALSUITE_ADD_GCC_FLAGS
......
......@@ -151,6 +151,9 @@ INOTIFY_ENABLE_VAL="`eval test x$inotify = xtrue && echo "ENABLED" || echo "DISA
# configure SWIG wrapping modules
LALSUITE_USE_SWIG
# configure Doxygen documentation
LALSUITE_USE_DOXYGEN
# add gcc specific flags
LALSUITE_ADD_GCC_FLAGS
......
......@@ -177,6 +177,9 @@ LALSUITE_CHECK_OPT_LIB([LALXML],[1.1.5],[XLALXMLFilePrintElements],[lal/LALXML.h
# configure SWIG wrapping modules
LALSUITE_USE_SWIG
# configure Doxygen documentation
LALSUITE_USE_DOXYGEN
# Disable OpenMP by default.
# FIXME: OpenMP should be on by default, but it breaks condor_compiling lalapps.
AS_IF(
......
......@@ -137,6 +137,9 @@ LALSUITE_CHECK_LIB([LALFrame],[1.2.0],[LALFrOpen],[lal/LALFrameL.h])
# configure SWIG wrapping modules
LALSUITE_USE_SWIG
# configure Doxygen documentation
LALSUITE_USE_DOXYGEN
# define if CUDA is enabled
if test "${cuda}" = "true"; then
AC_DEFINE([LALINSPIRAL_CUDA_ENABLED],[1],[Define if using cuda library])
......
......@@ -110,6 +110,9 @@ LALSUITE_CHECK_LIB([LALSupport],[6.13.0],[XLALCacheImport],[lal/LALCache.h])
# configure SWIG wrapping modules
LALSUITE_USE_SWIG
# configure Doxygen documentation
LALSUITE_USE_DOXYGEN
# add gcc specific flags
LALSUITE_ADD_GCC_FLAGS
......
......@@ -145,6 +145,9 @@ fi
# configure SWIG wrapping modules
LALSUITE_USE_SWIG
# configure Doxygen documentation
LALSUITE_USE_DOXYGEN
# add gcc specific flags
LALSUITE_ADD_GCC_FLAGS
......
......@@ -121,6 +121,9 @@ LALSUITE_CHECK_LIB([LALSupport],[6.13.0],[XLALCacheImport],[lal/LALCache.h])
# configure SWIG wrapping modules
LALSUITE_USE_SWIG
# configure Doxygen documentation
LALSUITE_USE_DOXYGEN
# Disable OpenMP by default.
# FIXME: OpenMP should be on by default, but it breaks condor_compiling lalapps.
AS_IF(
......
......@@ -109,6 +109,9 @@ LALSUITE_CHECK_LIB([LALMetaIO],[1.2.0],[XLALCreateMetaTableDir],[lal/LIGOLwXMLRe
# configure SWIG wrapping modules
LALSUITE_USE_SWIG
# configure Doxygen documentation
LALSUITE_USE_DOXYGEN
# add gcc specific flags
LALSUITE_ADD_GCC_FLAGS
......
......@@ -119,6 +119,9 @@ LALSUITE_CHECK_LIB([LALSupport],[6.13.0],[XLALCacheImport],[lal/LALCache.h])
# configure SWIG wrapping modules
LALSUITE_USE_SWIG
# configure Doxygen documentation
LALSUITE_USE_DOXYGEN
# add gcc specific flags
LALSUITE_ADD_GCC_FLAGS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment