Blame acinclude.m4

Packit 713213
# This file is part of Autoconf.                       -*- Autoconf -*-
Packit 713213
Packit 713213
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
Packit 713213
# 
Packit 713213
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
Packit 713213
#
Packit 713213
# This program is free software; you can redistribute it and/or modify
Packit 713213
# it under the terms of the GNU General Public License as published by
Packit 713213
# the Free Software Foundation; either version 2 of the License, or
Packit 713213
# (at your option) any later version.
Packit 713213
#
Packit 713213
# This program is distributed in the hope that it will be useful, but
Packit 713213
# WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 713213
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 713213
# General Public License for more details.
Packit 713213
#
Packit 713213
# You should have received a copy of the GNU General Public License
Packit 713213
# along with this program; if not, write to the Free Software
Packit 713213
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Packit 713213
#
Packit 713213
# As a special exception to the GNU General Public License, if you
Packit 713213
# distribute this file as part of a program that contains a
Packit 713213
# configuration script generated by Autoconf, you may include it under
Packit 713213
# the same distribution terms that you use for the rest of that program.
Packit 713213
Packit 713213
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
Packit 713213
# ----------------------------------
Packit 713213
AC_DEFUN([PKG_PROG_PKG_CONFIG],
Packit 713213
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
Packit 713213
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
Packit 713213
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
Packit 713213
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
Packit 713213
	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
Packit 713213
fi
Packit 713213
if test -n "$PKG_CONFIG"; then
Packit 713213
	_pkg_min_version=m4_default([$1], [0.9.0])
Packit 713213
	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
Packit 713213
	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
Packit 713213
		AC_MSG_RESULT([yes])
Packit 713213
	else
Packit 713213
		AC_MSG_RESULT([no])
Packit 713213
		PKG_CONFIG=""
Packit 713213
	fi
Packit 713213
		
Packit 713213
fi[]dnl
Packit 713213
])# PKG_PROG_PKG_CONFIG
Packit 713213
Packit 713213
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
Packit 713213
#
Packit 713213
# Check to see whether a particular set of modules exists.  Similar
Packit 713213
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
Packit 713213
#
Packit 713213
#
Packit 713213
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
Packit 713213
# this or PKG_CHECK_MODULES is called, or make sure to call
Packit 713213
# PKG_CHECK_EXISTS manually
Packit 713213
# --------------------------------------------------------------
Packit 713213
AC_DEFUN([PKG_CHECK_EXISTS],
Packit 713213
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
Packit 713213
if test -n "$PKG_CONFIG" && \
Packit 713213
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
Packit 713213
  m4_ifval([$2], [$2], [:])
Packit 713213
m4_ifvaln([$3], [else
Packit 713213
  $3])dnl
Packit 713213
fi])
Packit 713213
Packit 713213
Packit 713213
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
Packit 713213
# ---------------------------------------------
Packit 713213
m4_define([_PKG_CONFIG],
Packit 713213
[if test -n "$$1"; then
Packit 713213
    pkg_cv_[]$1="$$1"
Packit 713213
 elif test -n "$PKG_CONFIG"; then
Packit 713213
    PKG_CHECK_EXISTS([$3],
Packit 713213
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
Packit 713213
		     [pkg_failed=yes])
Packit 713213
 else
Packit 713213
    pkg_failed=untried
Packit 713213
fi[]dnl
Packit 713213
])# _PKG_CONFIG
Packit 713213
Packit 713213
# _PKG_SHORT_ERRORS_SUPPORTED
Packit 713213
# -----------------------------
Packit 713213
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
Packit 713213
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
Packit 713213
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
Packit 713213
        _pkg_short_errors_supported=yes
Packit 713213
else
Packit 713213
        _pkg_short_errors_supported=no
Packit 713213
fi[]dnl
Packit 713213
])# _PKG_SHORT_ERRORS_SUPPORTED
Packit 713213
Packit 713213
Packit 713213
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
Packit 713213
# [ACTION-IF-NOT-FOUND])
Packit 713213
#
Packit 713213
#
Packit 713213
# Note that if there is a possibility the first call to
Packit 713213
# PKG_CHECK_MODULES might not happen, you should be sure to include an
Packit 713213
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
Packit 713213
#
Packit 713213
#
Packit 713213
# --------------------------------------------------------------
Packit 713213
AC_DEFUN([PKG_CHECK_MODULES],
Packit 713213
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
Packit 713213
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
Packit 713213
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
Packit 713213
Packit 713213
pkg_failed=no
Packit 713213
AC_MSG_CHECKING([for $1])
Packit 713213
Packit 713213
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
Packit 713213
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
Packit 713213
Packit 713213
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
Packit 713213
and $1[]_LIBS to avoid the need to call pkg-config.
Packit 713213
See the pkg-config man page for more details.])
Packit 713213
Packit 713213
if test $pkg_failed = yes; then
Packit 713213
        _PKG_SHORT_ERRORS_SUPPORTED
Packit 713213
        if test $_pkg_short_errors_supported = yes; then
Packit 713213
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
Packit 713213
        else 
Packit 713213
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
Packit 713213
        fi
Packit 713213
	# Put the nasty error message in config.log where it belongs
Packit 713213
	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
Packit 713213
Packit 713213
	ifelse([$4], , [AC_MSG_ERROR(dnl
Packit 713213
[Package requirements ($2) were not met:
Packit 713213
Packit 713213
$$1_PKG_ERRORS
Packit 713213
Packit 713213
Consider adjusting the PKG_CONFIG_PATH environment variable if you
Packit 713213
installed software in a non-standard prefix.
Packit 713213
Packit 713213
_PKG_TEXT
Packit 713213
])],
Packit 713213
		[AC_MSG_RESULT([no])
Packit 713213
                $4])
Packit 713213
elif test $pkg_failed = untried; then
Packit 713213
	ifelse([$4], , [AC_MSG_FAILURE(dnl
Packit 713213
[The pkg-config script could not be found or is too old.  Make sure it
Packit 713213
is in your PATH or set the PKG_CONFIG environment variable to the full
Packit 713213
path to pkg-config.
Packit 713213
Packit 713213
_PKG_TEXT
Packit 713213
Packit 713213
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
Packit 713213
		[$4])
Packit 713213
else
Packit 713213
	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
Packit 713213
	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
Packit 713213
        AC_MSG_RESULT([yes])
Packit 713213
	ifelse([$3], , :, [$3])
Packit 713213
fi[]dnl
Packit 713213
])# PKG_CHECK_MODULES
Packit 713213
Packit 713213
# Copyright (C) 2004 Oren Ben-Kiki
Packit 713213
# This file is distributed under the same terms as the Autoconf macro files.
Packit 713213
Packit 713213
# Generate automatic documentation using Doxygen. Works in concert with the
Packit 713213
# aminclude.m4 file and a compatible doxygen configuration file. Defines the
Packit 713213
# following public macros:
Packit 713213
#
Packit 713213
# DX_???_FEATURE(ON|OFF) - control the default setting fo a Doxygen feature.
Packit 713213
# Supported features are 'DOXYGEN' itself, 'DOT' for generating graphics,
Packit 713213
# 'HTML' for plain HTML, 'CHM' for compressed HTML help (for MS users), 'CHI'
Packit 713213
# for generating a seperate .chi file by the .chm file, and 'MAN', 'RTF',
Packit 713213
# 'XML', 'PDF' and 'PS' for the appropriate output formats. The environment
Packit 713213
# variable DOXYGEN_PAPER_SIZE may be specified to override the default 'a4wide'
Packit 713213
# paper size.
Packit 713213
#
Packit 713213
# By default, HTML, PDF and PS documentation is generated as this seems to be
Packit 713213
# the most popular and portable combination. MAN pages created by Doxygen are
Packit 713213
# usually problematic, though by picking an appropriate subset and doing some
Packit 713213
# massaging they might be better than nothing. CHM and RTF are specific for MS
Packit 713213
# (note that you can't generate both HTML and CHM at the same time). The XML is
Packit 713213
# rather useless unless you apply specialized post-processing to it.
Packit 713213
#
Packit 713213
# The macro mainly controls the default state of the feature. The use can
Packit 713213
# override the default by specifying --enable or --disable. The macros ensure
Packit 713213
# that contradictory flags are not given (e.g., --enable-doxygen-html and
Packit 713213
# --enable-doxygen-chm, --enable-doxygen-anything with --disable-doxygen, etc.)
Packit 713213
# Finally, each feature will be automatically disabled (with a warning) if the
Packit 713213
# required programs are missing.
Packit 713213
#
Packit 713213
# Once all the feature defaults have been specified, call DX_INIT_DOXYGEN with
Packit 713213
# the following parameters: a one-word name for the project for use as a
Packit 713213
# filename base etc., an optional configuration file name (the default is
Packit 713213
# 'Doxyfile', the same as Doxygen's default), and an optional output directory
Packit 713213
# name (the default is 'doxygen-doc').
Packit 713213
Packit 713213
## ----------##
Packit 713213
## Defaults. ##
Packit 713213
## ----------##
Packit 713213
Packit 713213
DX_ENV=""
Packit 713213
AC_DEFUN([DX_FEATURE_doc],  ON)
Packit 713213
AC_DEFUN([DX_FEATURE_dot],  OFF)
Packit 713213
AC_DEFUN([DX_FEATURE_man],  OFF)
Packit 713213
AC_DEFUN([DX_FEATURE_html], OFF)
Packit 713213
AC_DEFUN([DX_FEATURE_chm],  OFF)
Packit 713213
AC_DEFUN([DX_FEATURE_chi],  OFF)
Packit 713213
AC_DEFUN([DX_FEATURE_rtf],  OFF)
Packit 713213
AC_DEFUN([DX_FEATURE_xml],  OFF)
Packit 713213
AC_DEFUN([DX_FEATURE_pdf],  OFF)
Packit 713213
AC_DEFUN([DX_FEATURE_ps],   OFF)
Packit 713213
Packit 713213
## --------------- ##
Packit 713213
## Private macros. ##
Packit 713213
## --------------- ##
Packit 713213
Packit 713213
# DX_ENV_APPEND(VARIABLE, VALUE)
Packit 713213
# ------------------------------
Packit 713213
# Append VARIABLE="VALUE" to DX_ENV for invoking doxygen.
Packit 713213
AC_DEFUN([DX_ENV_APPEND], [AC_SUBST([DX_ENV], ["$DX_ENV $1='$2'"])])
Packit 713213
Packit 713213
# DX_DIRNAME_EXPR
Packit 713213
# ---------------
Packit 713213
# Expand into a shell expression prints the directory part of a path.
Packit 713213
AC_DEFUN([DX_DIRNAME_EXPR],
Packit 713213
         [[expr ".$1" : '\(\.\)[^/]*$' \| "x$1" : 'x\(.*\)/[^/]*$']])
Packit 713213
Packit 713213
# DX_IF_FEATURE(FEATURE, IF-ON, IF-OFF)
Packit 713213
# -------------------------------------
Packit 713213
# Expands according to the M4 (static) status of the feature.
Packit 713213
AC_DEFUN([DX_IF_FEATURE], [ifelse(DX_FEATURE_$1, ON, [$2], [$3])])
Packit 713213
Packit 713213
# DX_REQUIRE_PROG(VARIABLE, PROGRAM)
Packit 713213
# ----------------------------------
Packit 713213
# Require the specified program to be found for the DX_CURRENT_FEATURE to work.
Packit 713213
AC_DEFUN([DX_REQUIRE_PROG], [
Packit 713213
AC_PATH_TOOL([$1], [$2])
Packit 713213
if test "$DX_FLAG_[]DX_CURRENT_FEATURE$$1" = 1; then
Packit 713213
    AC_MSG_WARN([$2 not found - will not DX_CURRENT_DESCRIPTION])
Packit 713213
    AC_SUBST([DX_FLAG_]DX_CURRENT_FEATURE, 0)
Packit 713213
fi
Packit 713213
])
Packit 713213
Packit 713213
# DX_TEST_FEATURE(FEATURE)
Packit 713213
# ------------------------
Packit 713213
# Expand to a shell expression testing whether the feature is active.
Packit 713213
AC_DEFUN([DX_TEST_FEATURE], [test "$DX_FLAG_$1" = 1])
Packit 713213
Packit 713213
# DX_CHECK_DEPEND(REQUIRED_FEATURE, REQUIRED_STATE)
Packit 713213
# -------------------------------------------------
Packit 713213
# Verify that a required features has the right state before trying to turn on
Packit 713213
# the DX_CURRENT_FEATURE.
Packit 713213
AC_DEFUN([DX_CHECK_DEPEND], [
Packit 713213
test "$DX_FLAG_$1" = "$2" \
Packit 713213
|| AC_MSG_ERROR([doxygen-DX_CURRENT_FEATURE ifelse([$2], 1,
Packit 713213
                            requires, contradicts) doxygen-DX_CURRENT_FEATURE])
Packit 713213
])
Packit 713213
Packit 713213
# DX_CLEAR_DEPEND(FEATURE, REQUIRED_FEATURE, REQUIRED_STATE)
Packit 713213
# ----------------------------------------------------------
Packit 713213
# Turn off the DX_CURRENT_FEATURE if the required feature is off.
Packit 713213
AC_DEFUN([DX_CLEAR_DEPEND], [
Packit 713213
test "$DX_FLAG_$1" = "$2" || AC_SUBST([DX_FLAG_]DX_CURRENT_FEATURE, 0)
Packit 713213
])
Packit 713213
Packit 713213
# DX_FEATURE_ARG(FEATURE, DESCRIPTION,
Packit 713213
#                CHECK_DEPEND, CLEAR_DEPEND,
Packit 713213
#                REQUIRE, DO-IF-ON, DO-IF-OFF)
Packit 713213
# --------------------------------------------
Packit 713213
# Parse the command-line option controlling a feature. CHECK_DEPEND is called
Packit 713213
# if the user explicitly turns the feature on (and invokes DX_CHECK_DEPEND),
Packit 713213
# otherwise CLEAR_DEPEND is called to turn off the default state if a required
Packit 713213
# feature is disabled (using DX_CLEAR_DEPEND). REQUIRE performs additional
Packit 713213
# requirement tests (DX_REQUIRE_PROG). Finally, an automake flag is set and
Packit 713213
# DO-IF-ON or DO-IF-OFF are called according to the final state of the feature.
Packit 713213
AC_DEFUN([DX_ARG_ABLE], [
Packit 713213
    AC_DEFUN([DX_CURRENT_FEATURE], [$1])
Packit 713213
    AC_DEFUN([DX_CURRENT_DESCRIPTION], [$2])
Packit 713213
    AC_ARG_ENABLE(doxygen-$1,
Packit 713213
                  [AS_HELP_STRING(DX_IF_FEATURE([$1], [--disable-doxygen-$1],
Packit 713213
                                                      [--enable-doxygen-$1]),
Packit 713213
                                  DX_IF_FEATURE([$1], [don't $2], [$2]))],
Packit 713213
                  [
Packit 713213
case "$enableval" in
Packit 713213
#(
Packit 713213
y|Y|yes|Yes|YES)
Packit 713213
    AC_SUBST([DX_FLAG_$1], 1)
Packit 713213
    $3
Packit 713213
;; #(
Packit 713213
n|N|no|No|NO)
Packit 713213
    AC_SUBST([DX_FLAG_$1], 0)
Packit 713213
;; #(
Packit 713213
*)
Packit 713213
    AC_MSG_ERROR([invalid value '$enableval' given to doxygen-$1])
Packit 713213
;;
Packit 713213
esac
Packit 713213
], [
Packit 713213
AC_SUBST([DX_FLAG_$1], [DX_IF_FEATURE([$1], 1, 0)])
Packit 713213
$4
Packit 713213
])
Packit 713213
if DX_TEST_FEATURE([$1]); then
Packit 713213
    $5
Packit 713213
    :
Packit 713213
fi
Packit 713213
if DX_TEST_FEATURE([$1]); then
Packit 713213
    AM_CONDITIONAL(DX_COND_$1, :)
Packit 713213
    $6
Packit 713213
    :
Packit 713213
else
Packit 713213
    AM_CONDITIONAL(DX_COND_$1, false)
Packit 713213
    $7
Packit 713213
    :
Packit 713213
fi
Packit 713213
])
Packit 713213
Packit 713213
## -------------- ##
Packit 713213
## Public macros. ##
Packit 713213
## -------------- ##
Packit 713213
Packit 713213
# DX_XXX_FEATURE(DEFAULT_STATE)
Packit 713213
# -----------------------------
Packit 713213
AC_DEFUN([DX_DOXYGEN_FEATURE], [AC_DEFUN([doc],  [$1])])
Packit 713213
AC_DEFUN([DX_MAN_FEATURE],     [AC_DEFUN([DX_FEATURE_man],  [$1])])
Packit 713213
AC_DEFUN([DX_HTML_FEATURE],    [AC_DEFUN([DX_FEATURE_html], [$1])])
Packit 713213
AC_DEFUN([DX_CHM_FEATURE],     [AC_DEFUN([DX_FEATURE_chm],  [$1])])
Packit 713213
AC_DEFUN([DX_CHI_FEATURE],     [AC_DEFUN([DX_FEATURE_chi],  [$1])])
Packit 713213
AC_DEFUN([DX_RTF_FEATURE],     [AC_DEFUN([DX_FEATURE_rtf],  [$1])])
Packit 713213
AC_DEFUN([DX_XML_FEATURE],     [AC_DEFUN([DX_FEATURE_xml],  [$1])])
Packit 713213
AC_DEFUN([DX_XML_FEATURE],     [AC_DEFUN([DX_FEATURE_xml],  [$1])])
Packit 713213
AC_DEFUN([DX_PDF_FEATURE],     [AC_DEFUN([DX_FEATURE_pdf],  [$1])])
Packit 713213
AC_DEFUN([DX_PS_FEATURE],      [AC_DEFUN([DX_FEATURE_ps],   [$1])])
Packit 713213
Packit 713213
# DX_INIT_DOXYGEN(PROJECT, [CONFIG-FILE], [OUTPUT-DOC-DIR])
Packit 713213
# ---------------------------------------------------------
Packit 713213
# PROJECT also serves as the base name for the documentation files.
Packit 713213
# The default CONFIG-FILE is "Doxyfile" and OUTPUT-DOC-DIR is "doc".
Packit 713213
AC_DEFUN([DX_INIT_DOXYGEN], [
Packit 713213
Packit 713213
# Files:
Packit 713213
AC_SUBST([DX_PROJECT], [$1])
Packit 713213
AC_SUBST([DX_CONFIG], [ifelse([$2], [], Doxyfile, [$2])])
Packit 713213
AC_SUBST([DX_DOCDIR], [ifelse([$3], [], doc, [$3])])
Packit 713213
Packit 713213
# Environment variables used inside Doxyfile.in:
Packit 713213
DX_ENV_APPEND(SRCDIR, $srcdir)
Packit 713213
DX_ENV_APPEND(PROJECT, $DX_PROJECT)
Packit 713213
DX_ENV_APPEND(DOCDIR, $DX_DOCDIR)
Packit 713213
DX_ENV_APPEND(VERSION, $PACKAGE_VERSION)
Packit 713213
Packit 713213
# Doxygen itself:
Packit 713213
DX_ARG_ABLE(doc, [generate any doxygen documentation (requires doxygen package)],
Packit 713213
            [],
Packit 713213
            [],
Packit 713213
            [DX_REQUIRE_PROG([DX_DOXYGEN], doxygen)
Packit 713213
             DX_REQUIRE_PROG([DX_PERL], perl)],
Packit 713213
            [DX_ENV_APPEND(PERL_PATH, $DX_PERL)])
Packit 713213
Packit 713213
# Dot for graphics:
Packit 713213
DX_ARG_ABLE(dot, [generate graphics for doxygen documentation (requires doxygen package)],
Packit 713213
            [DX_CHECK_DEPEND(doc, 1)],
Packit 713213
            [DX_CLEAR_DEPEND(doc, 1)],
Packit 713213
            [DX_REQUIRE_PROG([DX_DOT], dot)],
Packit 713213
            [DX_ENV_APPEND(HAVE_DOT, YES)
Packit 713213
             DX_ENV_APPEND(DOT_PATH, [`DX_DIRNAME_EXPR($DX_DOT)`])],
Packit 713213
            [DX_ENV_APPEND(HAVE_DOT, NO)])
Packit 713213
Packit 713213
# Man pages generation:
Packit 713213
DX_ARG_ABLE(man, [generate doxygen manual pages (requires doxygen package)],
Packit 713213
            [DX_CHECK_DEPEND(doc, 1)],
Packit 713213
            [DX_CLEAR_DEPEND(doc, 1)],
Packit 713213
            [],
Packit 713213
            [DX_ENV_APPEND(GENERATE_MAN, YES)],
Packit 713213
            [DX_ENV_APPEND(GENERATE_MAN, NO)])
Packit 713213
Packit 713213
# RTF file generation:
Packit 713213
DX_ARG_ABLE(rtf, [generate doxygen RTF documentation (requires doxygen package)],
Packit 713213
            [DX_CHECK_DEPEND(doc, 1)],
Packit 713213
            [DX_CLEAR_DEPEND(doc, 1)],
Packit 713213
            [],
Packit 713213
            [DX_ENV_APPEND(GENERATE_RTF, YES)],
Packit 713213
            [DX_ENV_APPEND(GENERATE_RTF, NO)])
Packit 713213
Packit 713213
# XML file generation:
Packit 713213
DX_ARG_ABLE(xml, [generate doxygen XML documentation (requires doxygen package)],
Packit 713213
            [DX_CHECK_DEPEND(doc, 1)],
Packit 713213
            [DX_CLEAR_DEPEND(doc, 1)],
Packit 713213
            [],
Packit 713213
            [DX_ENV_APPEND(GENERATE_XML, YES)],
Packit 713213
            [DX_ENV_APPEND(GENERATE_XML, NO)])
Packit 713213
Packit 713213
# (Compressed) HTML help generation:
Packit 713213
DX_ARG_ABLE(chm, [generate doxygen compressed HTML help documentation (requires doxygen package)],
Packit 713213
            [DX_CHECK_DEPEND(doc, 1)],
Packit 713213
            [DX_CLEAR_DEPEND(doc, 1)],
Packit 713213
            [DX_REQUIRE_PROG([DX_HHC], hhc)],
Packit 713213
            [DX_ENV_APPEND(HHC_PATH, $DX_HHC)
Packit 713213
             DX_ENV_APPEND(GENERATE_HTML, YES)
Packit 713213
             DX_ENV_APPEND(GENERATE_HTMLHELP, YES)],
Packit 713213
            [DX_ENV_APPEND(GENERATE_HTMLHELP, NO)])
Packit 713213
Packit 713213
# Seperate CHI file generation.
Packit 713213
DX_ARG_ABLE(chi, [generate doxygen seperate compressed HTML help index file (requires doxygen package)],
Packit 713213
            [DX_CHECK_DEPEND(chm, 1)],
Packit 713213
            [DX_CLEAR_DEPEND(chm, 1)],
Packit 713213
            [],
Packit 713213
            [DX_ENV_APPEND(GENERATE_CHI, YES)],
Packit 713213
            [DX_ENV_APPEND(GENERATE_CHI, NO)])
Packit 713213
Packit 713213
# Plain HTML pages generation:
Packit 713213
DX_ARG_ABLE(html, [generate doxygen plain HTML documentation (requires doxygen package)],
Packit 713213
            [DX_CHECK_DEPEND(doc, 1) DX_CHECK_DEPEND(chm, 0)],
Packit 713213
            [DX_CLEAR_DEPEND(doc, 1) DX_CLEAR_DEPEND(chm, 0)],
Packit 713213
            [],
Packit 713213
            [DX_ENV_APPEND(GENERATE_HTML, YES)],
Packit 713213
            [DX_TEST_FEATURE(chm) || DX_ENV_APPEND(GENERATE_HTML, NO)])
Packit 713213
Packit 713213
# PostScript file generation:
Packit 713213
DX_ARG_ABLE(ps, [generate doxygen PostScript documentation (requires doxygen and latex packages)],
Packit 713213
            [DX_CHECK_DEPEND(doc, 1)],
Packit 713213
            [DX_CLEAR_DEPEND(doc, 1)],
Packit 713213
            [DX_REQUIRE_PROG([DX_LATEX], latex)
Packit 713213
             DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex)
Packit 713213
             DX_REQUIRE_PROG([DX_DVIPS], dvips)
Packit 713213
             DX_REQUIRE_PROG([DX_EGREP], egrep)])
Packit 713213
Packit 713213
# PDF file generation:
Packit 713213
DX_ARG_ABLE(pdf, [generate doxygen PDF documentation (requires doxygen and pdflatex packages)],
Packit 713213
            [DX_CHECK_DEPEND(doc, 1)],
Packit 713213
            [DX_CLEAR_DEPEND(doc, 1)],
Packit 713213
            [DX_REQUIRE_PROG([DX_PDFLATEX], pdflatex)
Packit 713213
             DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex)
Packit 713213
             DX_REQUIRE_PROG([DX_EGREP], egrep)])
Packit 713213
Packit 713213
# LaTeX generation for PS and/or PDF:
Packit 713213
if DX_TEST_FEATURE(ps) || DX_TEST_FEATURE(pdf); then
Packit 713213
    AM_CONDITIONAL(DX_COND_latex, :)
Packit 713213
    DX_ENV_APPEND(GENERATE_LATEX, YES)
Packit 713213
else
Packit 713213
    AM_CONDITIONAL(DX_COND_latex, false)
Packit 713213
    DX_ENV_APPEND(GENERATE_LATEX, NO)
Packit 713213
fi
Packit 713213
Packit 713213
# Paper size for PS and/or PDF:
Packit 713213
AC_ARG_VAR(DOXYGEN_PAPER_SIZE,
Packit 713213
           [a4wide (default), a4, letter, legal or executive])
Packit 713213
case "$DOXYGEN_PAPER_SIZE" in
Packit 713213
#(
Packit 713213
"")
Packit 713213
    AC_SUBST(DOXYGEN_PAPER_SIZE, "")
Packit 713213
;; #(
Packit 713213
a4wide|a4|letter|legal|executive)
Packit 713213
    DX_ENV_APPEND(PAPER_SIZE, $DOXYGEN_PAPER_SIZE)
Packit 713213
;; #(
Packit 713213
*)
Packit 713213
    AC_MSG_ERROR([unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE'])
Packit 713213
;;
Packit 713213
esac
Packit 713213
Packit 713213
#For debugging:
Packit 713213
#echo DX_FLAG_doc=$DX_FLAG_doc
Packit 713213
#echo DX_FLAG_dot=$DX_FLAG_dot
Packit 713213
#echo DX_FLAG_man=$DX_FLAG_man
Packit 713213
#echo DX_FLAG_html=$DX_FLAG_html
Packit 713213
#echo DX_FLAG_chm=$DX_FLAG_chm
Packit 713213
#echo DX_FLAG_chi=$DX_FLAG_chi
Packit 713213
#echo DX_FLAG_rtf=$DX_FLAG_rtf
Packit 713213
#echo DX_FLAG_xml=$DX_FLAG_xml
Packit 713213
#echo DX_FLAG_pdf=$DX_FLAG_pdf
Packit 713213
#echo DX_FLAG_ps=$DX_FLAG_ps
Packit 713213
#echo DX_ENV=$DX_ENV
Packit 713213
])