mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Add some configure checks for DocBook and related tools. With a somewhat
standard installation layout it should be possible to build the HTML and print documentation without additional manual setup.
This commit is contained in:
184
configure
vendored
184
configure
vendored
@ -7463,6 +7463,185 @@ fi
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Check for DocBook and tools
|
||||
#
|
||||
for ac_prog in onsgmls nsgmls
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:7475: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_NSGMLS'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test -n "$NSGMLS"; then
|
||||
ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
||||
ac_dummy="$PATH"
|
||||
for ac_dir in $ac_dummy; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_prog_NSGMLS="$ac_prog"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
fi
|
||||
fi
|
||||
NSGMLS="$ac_cv_prog_NSGMLS"
|
||||
if test -n "$NSGMLS"; then
|
||||
echo "$ac_t""$NSGMLS" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
test -n "$NSGMLS" && break
|
||||
done
|
||||
|
||||
# If you don't have nsgmls you won't get very far, so save the cycles.
|
||||
if test -n "$NSGMLS"; then
|
||||
for ac_prog in openjade jade
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:7511: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_JADE'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test -n "$JADE"; then
|
||||
ac_cv_prog_JADE="$JADE" # Let the user override the test.
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
||||
ac_dummy="$PATH"
|
||||
for ac_dir in $ac_dummy; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_prog_JADE="$ac_prog"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
fi
|
||||
fi
|
||||
JADE="$ac_cv_prog_JADE"
|
||||
if test -n "$JADE"; then
|
||||
echo "$ac_t""$JADE" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
test -n "$JADE" && break
|
||||
done
|
||||
|
||||
|
||||
echo $ac_n "checking for DocBook V3.1""... $ac_c" 1>&6
|
||||
echo "configure:7542: checking for DocBook V3.1" >&5
|
||||
if eval "test \"`echo '$''{'pgac_cv_check_docbook'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat >conftest.sgml <<EOF
|
||||
<!doctype book PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
|
||||
<book>
|
||||
<title>test</title>
|
||||
<chapter>
|
||||
<title>random</title>
|
||||
<sect1>
|
||||
<title>testsect</title>
|
||||
<para>text</para>
|
||||
</sect1>
|
||||
</chapter>
|
||||
</book>
|
||||
EOF
|
||||
|
||||
${NSGMLS-false} -s conftest.sgml 1>&5 2>&1
|
||||
if test $? -eq 0; then
|
||||
pgac_cv_check_docbook=yes
|
||||
else
|
||||
pgac_cv_check_docbook=no
|
||||
fi
|
||||
rm -f conftest.sgml
|
||||
fi
|
||||
|
||||
echo "$ac_t""$pgac_cv_check_docbook" 1>&6
|
||||
|
||||
have_docbook=$pgac_cv_check_docbook
|
||||
|
||||
|
||||
echo $ac_n "checking for DocBook stylesheets""... $ac_c" 1>&6
|
||||
echo "configure:7575: checking for DocBook stylesheets" >&5
|
||||
if eval "test \"`echo '$''{'pgac_cv_path_stylesheets'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test -n "$DOCBOOKSTYLE"; then
|
||||
pgac_cv_path_stylesheets=$DOCBOOKSTYLE
|
||||
else
|
||||
for pgac_prefix in /usr /usr/local /opt; do
|
||||
for pgac_infix in share lib; do
|
||||
for pgac_postfix in \
|
||||
sgml/stylesheets/nwalsh-modular \
|
||||
sgml/stylesheets/docbook \
|
||||
sgml/docbook/dsssl/modular
|
||||
do
|
||||
pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
|
||||
if test -r "$pgac_candidate/html/docbook.dsl" \
|
||||
&& test -r "$pgac_candidate/print/docbook.dsl"
|
||||
then
|
||||
pgac_cv_path_stylesheets=$pgac_candidate
|
||||
break 3
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
DOCBOOKSTYLE=$pgac_cv_path_stylesheets
|
||||
|
||||
if test -n "$DOCBOOKSTYLE"; then
|
||||
echo "$ac_t""$DOCBOOKSTYLE" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
for ac_prog in sgmlspl
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:7614: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_SGMLSPL'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test -n "$SGMLSPL"; then
|
||||
ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
||||
ac_dummy="$PATH"
|
||||
for ac_dir in $ac_dummy; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_prog_SGMLSPL="$ac_prog"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
fi
|
||||
fi
|
||||
SGMLSPL="$ac_cv_prog_SGMLSPL"
|
||||
if test -n "$SGMLSPL"; then
|
||||
echo "$ac_t""$SGMLSPL" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
test -n "$SGMLSPL" && break
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# Finally ready to produce output files ...
|
||||
|
||||
if test x"$abs_top_srcdir" != x"$abs_top_builddir"; then
|
||||
@ -7686,6 +7865,11 @@ s%@HAVE_POSIX_SIGNALS@%$HAVE_POSIX_SIGNALS%g
|
||||
s%@TCLSH@%$TCLSH%g
|
||||
s%@TCL_CONFIG_SH@%$TCL_CONFIG_SH%g
|
||||
s%@TK_CONFIG_SH@%$TK_CONFIG_SH%g
|
||||
s%@NSGMLS@%$NSGMLS%g
|
||||
s%@JADE@%$JADE%g
|
||||
s%@have_docbook@%$have_docbook%g
|
||||
s%@DOCBOOKSTYLE@%$DOCBOOKSTYLE%g
|
||||
s%@SGMLSPL@%$SGMLSPL%g
|
||||
|
||||
CEOF
|
||||
EOF
|
||||
|
Reference in New Issue
Block a user