This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] winsup/doc: Add a configure test to find docbook2xtexi


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=910087f70fb66c4949075811a0c23963c677dffa

commit 910087f70fb66c4949075811a0c23963c677dffa
Author: Jon TURNEY <jon.turney@dronecode.org.uk>
Date:   Sun Jul 5 19:09:16 2015 +0100

    winsup/doc: Add a configure test to find docbook2xtexi
    
    Fedora installs docbook2texi under the name db2x_docbook2texi
    Other distros and Cygwin install docbook2texi under the name docbook2x-texi
    
    Add a configure test to find either.
    
    2015-07-05  Jon Turney  <jon.turney@dronecode.org.uk>
    
    	* configure.ac: Add check for DOCBOOK2XTEXI
    	* configure: Regenerate.
    	* Makefile.in (DOCBOOK2XTEXI): Use.
    
    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>

Diff:
---
 winsup/doc/ChangeLog    |  6 ++++++
 winsup/doc/Makefile.in  |  2 +-
 winsup/doc/configure    | 44 ++++++++++++++++++++++++++++++++++++++++++++
 winsup/doc/configure.ac |  1 +
 4 files changed, 52 insertions(+), 1 deletion(-)

diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog
index 841bbe2..b452fa9 100644
--- a/winsup/doc/ChangeLog
+++ b/winsup/doc/ChangeLog
@@ -1,3 +1,9 @@
+2015-07-05  Jon Turney  <jon.turney@dronecode.org.uk>
+
+	* configure.ac: Add check for DOCBOOK2XTEXI
+	* configure: Regenerate.
+	* Makefile.in (DOCBOOK2XTEXI): Use.
+
 2015-06-22  Jon Turney  <jon.turney@dronecode.org.uk>
 
 	* README: Update.
diff --git a/winsup/doc/Makefile.in b/winsup/doc/Makefile.in
index 7cdc72c..cfe206d 100644
--- a/winsup/doc/Makefile.in
+++ b/winsup/doc/Makefile.in
@@ -30,7 +30,7 @@ CC:=@CC@
 CC_FOR_TARGET:=@CC@
 
 XMLTO:=xmlto --skip-validation --with-dblatex
-DOCBOOK2XTEXI:=docbook2x-texi --xinclude --info --utf8trans-map=charmap
+DOCBOOK2XTEXI:=@DOCBOOK2XTEXI@ --xinclude --info --utf8trans-map=charmap
 
 include $(srcdir)/../Makefile.common
 -include Makefile.dep
diff --git a/winsup/doc/configure b/winsup/doc/configure
index a484c8d..6e053bd 100755
--- a/winsup/doc/configure
+++ b/winsup/doc/configure
@@ -608,6 +608,7 @@ build_os
 build_vendor
 build_cpu
 build
+DOCBOOK2XTEXI
 INSTALL_DATA
 INSTALL_SCRIPT
 INSTALL_PROGRAM
@@ -1874,6 +1875,49 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
+for ac_prog in docbook2x-texi db2x_docbook2texi
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DOCBOOK2XTEXI+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DOCBOOK2XTEXI"; then
+  ac_cv_prog_DOCBOOK2XTEXI="$DOCBOOK2XTEXI" # Let the user override the test.
+else
+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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_DOCBOOK2XTEXI="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+DOCBOOK2XTEXI=$ac_cv_prog_DOCBOOK2XTEXI
+if test -n "$DOCBOOK2XTEXI"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOK2XTEXI" >&5
+$as_echo "$DOCBOOK2XTEXI" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$DOCBOOK2XTEXI" && break
+done
+test -n "$DOCBOOK2XTEXI" || DOCBOOK2XTEXI="true"
+
 
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
diff --git a/winsup/doc/configure.ac b/winsup/doc/configure.ac
index 30439b8..b461750 100644
--- a/winsup/doc/configure.ac
+++ b/winsup/doc/configure.ac
@@ -16,6 +16,7 @@ AC_CONFIG_SRCDIR(cygwin-api.xml)
 AC_CONFIG_AUX_DIR(../..)
 
 AC_PROG_INSTALL
+AC_CHECK_PROGS([DOCBOOK2XTEXI], [docbook2x-texi db2x_docbook2texi], [true])
 AC_NO_EXECUTABLES
 AC_CANONICAL_SYSTEM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]