diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2010-01-17 20:49:47 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2010-01-17 20:49:47 +0000 |
commit | 67be1cf00577ddd5f80db31d053909337ee8de05 (patch) | |
tree | 6cb027ae9ceaaa5de0c050205176b44d4c6bc110 /app | |
parent | 5b3a8a44d884b9672261db44af5e73d13e22d1cd (diff) |
regen
Diffstat (limited to 'app')
-rw-r--r-- | app/xfs/aclocal.m4 | 51 | ||||
-rw-r--r-- | app/xfs/configure | 83 |
2 files changed, 132 insertions, 2 deletions
diff --git a/app/xfs/aclocal.m4 b/app/xfs/aclocal.m4 index 132fa4215..4dfd036bc 100644 --- a/app/xfs/aclocal.m4 +++ b/app/xfs/aclocal.m4 @@ -1307,6 +1307,57 @@ AC_SUBST(MAKE_PDF) AC_SUBST(MAKE_HTML) ]) # XORG_CHECK_DOCBOOK +# XORG_WITH_XMLTO +# ---------------- +# Minimum version: 1.5.0 +# +# Documentation tools are not always available on all platforms and sometimes +# not at the appropriate level. This macro enables a module to test for the +# presence of the tool and obtain it's path in separate variables. Coupled with +# the --with-xmlto option, it allows maximum flexibilty in making decisions +# as whether or not to use the xmlto package. +# +# Interface to module: +# HAVE_XMLTO: used in makefiles to conditionally generate documentation +# XMLTO: returns the path of the xmlto program found +# returns the path set by the user in the environment +# --with-xmlto: 'yes' user instructs the module to use xmlto +# 'no' user instructs the module not to use xmlto +# +# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_XMLTO],[ +AC_ARG_VAR([XMLTO], [Path to xmlto command]) +AC_ARG_WITH(xmlto, + AS_HELP_STRING([--with-xmlto], + [Use xmlto to regenerate documentation (default: yes, if installed)]), + [use_xmlto=$withval], [use_xmlto=auto]) + +if test "x$use_xmlto" = x"auto"; then + AC_PATH_PROG([XMLTO], [xmlto]) + if test "x$XMLTO" = "x"; then + AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) + have_xmlto=no + else + have_xmlto=yes + fi +elif test "x$use_xmlto" = x"yes" ; then + AC_PATH_PROG([XMLTO], [xmlto]) + if test "x$XMLTO" = "x"; then + AC_MSG_WARN([--with-xmlto=yes specified but xmlto not found in PATH]) + fi + have_xmlto=yes +elif test "x$use_xmlto" = x"no" ; then + if test "x$XMLTO" != "x"; then + AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) + fi + have_xmlto=no +else + AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) +fi +AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) +]) # XORG_CHECK_XMLTO + # XORG_CHECK_MALLOC_ZERO # ---------------------- # Minimum version: 1.0.0 diff --git a/app/xfs/configure b/app/xfs/configure index d8b7e28f4..fe10e3862 100644 --- a/app/xfs/configure +++ b/app/xfs/configure @@ -764,6 +764,7 @@ ac_user_opts=' enable_option_checking enable_maintainer_mode enable_dependency_tracking +with_xmlto with_default_config_file with_default_font_path enable_devel_docs @@ -1438,6 +1439,8 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-xmlto Use xmlto to regenerate documentation (default: yes, + if installed) --with-default-config-file=PATH comma-separated list of paths to look for config file when not specified (default: @@ -5499,7 +5502,18 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # xmlto is used to convert doc/design.xml from DocBook to PDF/HTML -# Extract the first word of "xmlto", so it can be a program name with args. + + +# Check whether --with-xmlto was given. +if test "${with_xmlto+set}" = set; then + withval=$with_xmlto; use_xmlto=$withval +else + use_xmlto=auto +fi + + +if test "x$use_xmlto" = x"auto"; then + # Extract the first word of "xmlto", so it can be a program name with args. set dummy xmlto; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } @@ -5539,9 +5553,73 @@ $as_echo "no" >&6; } fi + if test "x$XMLTO" = "x"; then + { $as_echo "$as_me:$LINENO: WARNING: xmlto not found - documentation targets will be skipped" >&5 +$as_echo "$as_me: WARNING: xmlto not found - documentation targets will be skipped" >&2;} + have_xmlto=no + else + have_xmlto=yes + fi +elif test "x$use_xmlto" = x"yes" ; then + # Extract the first word of "xmlto", so it can be a program name with args. +set dummy xmlto; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_XMLTO+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $XMLTO in + [\\/]* | ?:[\\/]*) + ac_cv_path_XMLTO="$XMLTO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_XMLTO="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +XMLTO=$ac_cv_path_XMLTO +if test -n "$XMLTO"; then + { $as_echo "$as_me:$LINENO: result: $XMLTO" >&5 +$as_echo "$XMLTO" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi -if test "x$XMLTO" != "x"; then + if test "x$XMLTO" = "x"; then + { $as_echo "$as_me:$LINENO: WARNING: --with-xmlto=yes specified but xmlto not found in PATH" >&5 +$as_echo "$as_me: WARNING: --with-xmlto=yes specified but xmlto not found in PATH" >&2;} + fi + have_xmlto=yes +elif test "x$use_xmlto" = x"no" ; then + if test "x$XMLTO" != "x"; then + { $as_echo "$as_me:$LINENO: WARNING: ignoring XMLTO environment variable since --with-xmlto=no was specified" >&5 +$as_echo "$as_me: WARNING: ignoring XMLTO environment variable since --with-xmlto=no was specified" >&2;} + fi + have_xmlto=no +else + { { $as_echo "$as_me:$LINENO: error: --with-xmlto expects 'yes' or 'no'" >&5 +$as_echo "$as_me: error: --with-xmlto expects 'yes' or 'no'" >&2;} + { (exit 1); exit 1; }; } +fi + + +if test "$have_xmlto" = yes; then HAVE_XMLTO_TRUE= HAVE_XMLTO_FALSE='#' else @@ -5551,6 +5629,7 @@ fi + for ac_header in stdint.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |