AC_PATH_PROG(JADE,jade)
fi
+AC_PATH_PROG(DB2MAN,docbook2man)
+if test -z "$DB2MAN"; then
+ AC_PATH_PROG(DB2MAN,db2man)
+fi
+AC_MSG_CHECKING(Looking for docbook2man converter)
+AC_ARG_WITH(db2man,
+[ --with-db2man-spec=PATH set PATH to a docbook2man converter.],
+[ case "$withval" in
+ no)
+ DB2MAN=""
+ AC_MSG_RESULT(none)
+ ;;
+ yes)
+ AC_MSG_ERROR(Must be set to PATH or "no".)
+ ;;
+ *)
+ if ! test -x "$withval"; then
+ AC_MSG_ERROR($withval is not an exe file.)
+ fi
+ DB2MAN="$withval"
+ AC_MSG_RESULT($withval)
+ ;;
+ esac ],
+ AC_MSG_RESULT(default: $DB2MAN)
+)
+AC_SUBST(DB2MAN)
+
AC_PATH_PROG(NSGMLS, nsgmls)
AC_PATH_PROG(SGMLSPL, sgmlspl)
-
DB2MAN_SPEC="/usr/share/sgml/docbook/utils-0.6.9/helpers/docbook2man-spec.pl"
AC_MSG_CHECKING(Looking for docbook2man-spec file)
)
AC_SUBST(DB2MAN_SPEC)
+if test -x "$DB2MAN"; then
+ DB2MAN_BEFORE="$DB2MAN"
+ DB2MAN_AFTER=""
+else
+ if test \( \( -f "$DB2MAN_SPEC" \) -a \( -x "$NSGMLS" \) \
+ -a \( -x "$SGMLSPL" \) \); then
+ DB2MAN_BEFORE="$NSGMLS"
+ DB2MAN_AFTER="2> /dev/null | $SGMLSPL $DB2MAN_SPEC"
+ else
+ DB2MAN_BEFORE=""
+ DB2MAN_AFTER=""
+ fi
+fi
+AC_SUBST(DB2MAN_BEFORE)
+AC_SUBST(DB2MAN_AFTER)
+
DSSSL_DIR="/usr/share/sgml/docbook/dsssl-stylesheets-1.72/"
# @configure_input@
-# $Id: Makefile.in,v 1.5 2002-01-04 18:02:06 thib Exp $
+# $Id: Makefile.in,v 1.6 2002-01-04 19:11:52 thib Exp $
# The following should not be edited manually (use configure options)
# If you must do it, BEWARE : some of the following is also defined
INSTALL = @INSTALL@
JADE = @JADE@
-NSGMLS = @NSGMLS@
-SGMLSPL = @SGMLSPL@
-DB2MAN_SPEC = @DB2MAN_SPEC@
+DB2MAN_BEFORE = @DB2MAN_BEFORE@
+DB2MAN_AFTER = @DB2MAN_AFTER@
ROOTNAME = @ROOTNAME@
ROOTGROUP = @ROOTGROUP@
doc: HTML/index.html
mandoc:
- @(if test \( ! -f $(DB2MAN_SPEC) \) -o \( ! -x $(NSGMLS) \) -o \( ! -x $(SGMLSPL) \); then \
+ @(if test -z "$(DB2MAN_BEFORE)"; then \
echo "ERROR: cannot generate man pages." ; \
- echo " Please check if nsgmls, sgmlspl are installed, and " ; \
- echo " if configure's option --with-db2man-spec is correctly set." ; \
+ echo " Please check if a db2man converter is installed, or if" \
+ echo " nsgmls, sgmlspl are installed, and if configure's options" \
+ echo " --with-db2man and --with-db2man-spec are correctly set." ; \
exit 1 ; \
fi)
@(echo ; echo "Building man pages ..."; echo )
<!ENTITY % decl SYSTEM "fcron-doc.mod"> \
%decl;]>' > _tmp_ ; \
echo "&$$i;" >> _tmp_ ; \
- $(NSGMLS) _tmp_ 2> /dev/null | $(SGMLSPL) $(DB2MAN_SPEC) 2>&1 > /dev/null ; \
+ $(DB2MAN_BEFORE) _tmp_ $(DB2MAN_AFTER) 2>&1 > /dev/null ; \
rm -f _tmp_ ; \
mv `basename $$i .sgml` man/ ; \
done)