public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
* [PATCH] winsup/doc: Add a configure test to find docbook2xtexi
@ 2015-07-05 18:12 Jon TURNEY
  2015-07-05 20:06 ` Corinna Vinschen
  0 siblings, 1 reply; 2+ messages in thread
From: Jon TURNEY @ 2015-07-05 18:12 UTC (permalink / raw)
  To: cygwin-patches; +Cc: Jon TURNEY

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>
---
 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
 
-- 
2.4.5

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] winsup/doc: Add a configure test to find docbook2xtexi
  2015-07-05 18:12 [PATCH] winsup/doc: Add a configure test to find docbook2xtexi Jon TURNEY
@ 2015-07-05 20:06 ` Corinna Vinschen
  0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2015-07-05 20:06 UTC (permalink / raw)
  To: cygwin-patches

[-- Attachment #1: Type: text/plain, Size: 617 bytes --]

On Jul  5 19:11, Jon TURNEY wrote:
> 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.

Looks good on Fedora, please apply.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-05 20:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-05 18:12 [PATCH] winsup/doc: Add a configure test to find docbook2xtexi Jon TURNEY
2015-07-05 20:06 ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).