From e028d77fcee6521535226aa095397a684dddbea6 Mon Sep 17 00:00:00 2001 From: Christophe Barbe Date: Wed, 12 Jun 2002 16:13:45 +0000 Subject: [PATCH] * Added --with-doc-formats configure option. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@4634 67ed7778-7388-44ab-90cf-0a291f65f57c --- ChangeLog | 6 ++++ libgphoto2_port/configure.in | 11 ++++++++ libgphoto2_port/m4/documentation.m4 | 43 +++++++++++++++++++---------- 3 files changed, 45 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 78ceb6906..30c24aa09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-06-12 Christophe Barbé + + * libgphoto2_port/m4/documentation.m4: Added --with-doc-formats option and + removed xmlto tests to find the available formats. + * libgphoto2_port/configure.in: Duplicated tr hack from main configure.in. + 2002-06-12 Lutz Müller * doc/FAQ: New entry. diff --git a/libgphoto2_port/configure.in b/libgphoto2_port/configure.in index 26fad2d7e..f10689474 100644 --- a/libgphoto2_port/configure.in +++ b/libgphoto2_port/configure.in @@ -42,6 +42,17 @@ AC_SUBST(BUILD_INCLUDED_LIBINTL) dnl USE_INCLUDED_LIBINTL=no dnl AC_SUBST(USE_INCLUDED_LIBINTL) +dnl Solaris hack for grep and tr +[ +if test -n "`echo $host_os | grep '[sS]olaris'`"; then + TR=/usr/xpg4/bin/tr + GREP=/usr/xpg4/bin/grep +else + TR=tr + GREP=grep +fi +] + dnl --------------------------------------------------------------------------- dnl i18n support dnl --------------------------------------------------------------------------- diff --git a/libgphoto2_port/m4/documentation.m4 b/libgphoto2_port/m4/documentation.m4 index b1bb6b6da..bfd8813dc 100644 --- a/libgphoto2_port/m4/documentation.m4 +++ b/libgphoto2_port/m4/documentation.m4 @@ -154,21 +154,35 @@ if $try_xmlto; then manual_msg="yes" fi fi -if $have_xmlto; then - if ${XMLTO} --help | grep html > /dev/null 2>&1; then - have_xmltohtml=true - fi - if ${XMLTO} --help | grep man > /dev/null 2>&1; then - have_xmltoman=true - fi - if ${XMLTO} --help | grep pdf > /dev/null 2>&1; then - have_xmltopdf=true - fi - if ${XMLTO} --help | grep ps > /dev/null 2>&1; then - have_xmltops=true - fi -fi + AM_CONDITIONAL(XMLTO, $have_xmlto) + +doc_formats_list='man html ps pdf' +for i in $doc_formats_list; do + d=`echo $i | $TR a-z A-Z` + eval "have_xmlto$d=false" +done +AC_MSG_CHECKING(checking doc formats) +AC_ARG_WITH(doc_formats, + [ --with-doc-formats= create doc with format in ; ] + [ 'all' build all doc formats; ] + [ possible formats are: ] + [ man, html, ps, pdf ], + doc_formats="$withval", doc_formats="man html") +if test "$doc_formats" = "all"; then + doc_formats=$doc_formats_list; +else + doc_formats=`echo $doc_formats | sed 's/,/ /g'` +fi +for i in $doc_formats; do + if test -n "`echo $doc_formats_list | $GREP -E \"(^| )$i( |\$)\"`"; then + eval "have_xmlto$i=true" + else + AC_ERROR(Unknown doc format $i!) + fi +done +AC_MSG_RESULT($doc_formats) + AM_CONDITIONAL(XMLTOHTML,$have_xmltohtml) AM_CONDITIONAL(XMLTOMAN,$have_xmltoman) AM_CONDITIONAL(XMLTOPDF,$have_xmltopdf) @@ -206,7 +220,6 @@ then fig_out="out" fi manual_msg="in (${xxx} ) format with${fig_out} figures" - AC_MSG_RESULT([support for {${xxx} } found]) fi ])dnl