Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ef1a785

Browse files
committed
Remove configure-time probe for DocBook DTD.
Checking for DocBook being installed was valuable when we were on the OpenSP docs toolchain, because that was rather hard to get installed fully. Nowadays, as long as you have xmllint and xsltproc installed, you're good, because those programs will fetch the DocBook files off the net at need. Moreover, testing this at configure time means that a network access may well occur whether or not you have any interest in building the docs later. That can be slow (typically 2 or 3 seconds, though much higher delays have been reported), and it seems not very nice to be doing an off-machine access without warning, too. Hence, drop the PGAC_CHECK_DOCBOOK probe, and adjust related documentation. Without that macro, there's not much left of config/docbook.m4 at all, so I just removed it. Back-patch to v11, where we started to use xmllint in the PGAC_CHECK_DOCBOOK probe. Discussion: https://postgr.es/m/E2EE6B76-2D96-408A-B961-CAE47D1A86F0@yesql.se Discussion: https://postgr.es/m/A55A7FC9-FA60-47FE-98B5-139CDC57CE6E@gmail.com
1 parent 16a1e1e commit ef1a785

File tree

5 files changed

+81
-142
lines changed

5 files changed

+81
-142
lines changed

aclocal.m4

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ m4_include([config/ax_pthread.m4])
55
m4_include([config/c-compiler.m4])
66
m4_include([config/c-library.m4])
77
m4_include([config/check_decls.m4])
8-
m4_include([config/docbook.m4])
98
m4_include([config/general.m4])
109
m4_include([config/libtool.m4])
1110
m4_include([config/llvm.m4])

config/docbook.m4

Lines changed: 0 additions & 40 deletions
This file was deleted.

configure

Lines changed: 50 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -630,10 +630,9 @@ vpath_build
630630
PG_SYSROOT
631631
PG_VERSION_NUM
632632
PROVE
633+
DBTOEPUB
633634
FOP
634635
XSLTPROC
635-
DBTOEPUB
636-
have_docbook
637636
XMLLINT
638637
TCL_SHLIB_LD_LIBS
639638
TCL_SHARED_BUILD
@@ -18799,7 +18798,7 @@ fi
1879918798
fi
1880018799

1880118800
#
18802-
# Check for DocBook and tools
18801+
# Check for documentation-building tools
1880318802
#
1880418803
if test -z "$XMLLINT"; then
1880518804
for ac_prog in xmllint
@@ -18855,55 +18854,19 @@ $as_echo_n "checking for XMLLINT... " >&6; }
1885518854
$as_echo "$XMLLINT" >&6; }
1885618855
fi
1885718856

18858-
18859-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook XML V4.2" >&5
18860-
$as_echo_n "checking for DocBook XML V4.2... " >&6; }
18861-
if ${pgac_cv_check_docbook+:} false; then :
18862-
$as_echo_n "(cached) " >&6
18863-
else
18864-
cat >conftest.xml <<EOF
18865-
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
18866-
<book>
18867-
<title>test</title>
18868-
<chapter>
18869-
<title>random</title>
18870-
<sect1>
18871-
<title>testsect</title>
18872-
<para>text</para>
18873-
</sect1>
18874-
</chapter>
18875-
</book>
18876-
EOF
18877-
18878-
pgac_cv_check_docbook=no
18879-
18880-
if test -n "$XMLLINT"; then
18881-
$XMLLINT --noout --valid conftest.xml 1>&5 2>&1
18882-
if test $? -eq 0; then
18883-
pgac_cv_check_docbook=yes
18884-
fi
18885-
fi
18886-
rm -f conftest.xml
18887-
fi
18888-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
18889-
$as_echo "$pgac_cv_check_docbook" >&6; }
18890-
18891-
have_docbook=$pgac_cv_check_docbook
18892-
18893-
18894-
if test -z "$DBTOEPUB"; then
18895-
for ac_prog in dbtoepub
18857+
if test -z "$XSLTPROC"; then
18858+
for ac_prog in xsltproc
1889618859
do
1889718860
# Extract the first word of "$ac_prog", so it can be a program name with args.
1889818861
set dummy $ac_prog; ac_word=$2
1889918862
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
1890018863
$as_echo_n "checking for $ac_word... " >&6; }
18901-
if ${ac_cv_path_DBTOEPUB+:} false; then :
18864+
if ${ac_cv_path_XSLTPROC+:} false; then :
1890218865
$as_echo_n "(cached) " >&6
1890318866
else
18904-
case $DBTOEPUB in
18867+
case $XSLTPROC in
1890518868
[\\/]* | ?:[\\/]*)
18906-
ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18869+
ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
1890718870
;;
1890818871
*)
1890918872
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -18913,7 +18876,7 @@ do
1891318876
test -z "$as_dir" && as_dir=.
1891418877
for ac_exec_ext in '' $ac_executable_extensions; do
1891518878
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18916-
ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18879+
ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
1891718880
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1891818881
break 2
1891918882
fi
@@ -18924,40 +18887,40 @@ IFS=$as_save_IFS
1892418887
;;
1892518888
esac
1892618889
fi
18927-
DBTOEPUB=$ac_cv_path_DBTOEPUB
18928-
if test -n "$DBTOEPUB"; then
18929-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18930-
$as_echo "$DBTOEPUB" >&6; }
18890+
XSLTPROC=$ac_cv_path_XSLTPROC
18891+
if test -n "$XSLTPROC"; then
18892+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18893+
$as_echo "$XSLTPROC" >&6; }
1893118894
else
1893218895
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1893318896
$as_echo "no" >&6; }
1893418897
fi
1893518898

1893618899

18937-
test -n "$DBTOEPUB" && break
18900+
test -n "$XSLTPROC" && break
1893818901
done
1893918902

1894018903
else
18941-
# Report the value of DBTOEPUB in configure's output in all cases.
18942-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18943-
$as_echo_n "checking for DBTOEPUB... " >&6; }
18944-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18945-
$as_echo "$DBTOEPUB" >&6; }
18904+
# Report the value of XSLTPROC in configure's output in all cases.
18905+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18906+
$as_echo_n "checking for XSLTPROC... " >&6; }
18907+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18908+
$as_echo "$XSLTPROC" >&6; }
1894618909
fi
1894718910

18948-
if test -z "$XSLTPROC"; then
18949-
for ac_prog in xsltproc
18911+
if test -z "$FOP"; then
18912+
for ac_prog in fop
1895018913
do
1895118914
# Extract the first word of "$ac_prog", so it can be a program name with args.
1895218915
set dummy $ac_prog; ac_word=$2
1895318916
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
1895418917
$as_echo_n "checking for $ac_word... " >&6; }
18955-
if ${ac_cv_path_XSLTPROC+:} false; then :
18918+
if ${ac_cv_path_FOP+:} false; then :
1895618919
$as_echo_n "(cached) " >&6
1895718920
else
18958-
case $XSLTPROC in
18921+
case $FOP in
1895918922
[\\/]* | ?:[\\/]*)
18960-
ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18923+
ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
1896118924
;;
1896218925
*)
1896318926
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -18967,7 +18930,7 @@ do
1896718930
test -z "$as_dir" && as_dir=.
1896818931
for ac_exec_ext in '' $ac_executable_extensions; do
1896918932
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18970-
ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18933+
ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
1897118934
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1897218935
break 2
1897318936
fi
@@ -18978,40 +18941,40 @@ IFS=$as_save_IFS
1897818941
;;
1897918942
esac
1898018943
fi
18981-
XSLTPROC=$ac_cv_path_XSLTPROC
18982-
if test -n "$XSLTPROC"; then
18983-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18984-
$as_echo "$XSLTPROC" >&6; }
18944+
FOP=$ac_cv_path_FOP
18945+
if test -n "$FOP"; then
18946+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18947+
$as_echo "$FOP" >&6; }
1898518948
else
1898618949
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1898718950
$as_echo "no" >&6; }
1898818951
fi
1898918952

1899018953

18991-
test -n "$XSLTPROC" && break
18954+
test -n "$FOP" && break
1899218955
done
1899318956

1899418957
else
18995-
# Report the value of XSLTPROC in configure's output in all cases.
18996-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18997-
$as_echo_n "checking for XSLTPROC... " >&6; }
18998-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18999-
$as_echo "$XSLTPROC" >&6; }
18958+
# Report the value of FOP in configure's output in all cases.
18959+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18960+
$as_echo_n "checking for FOP... " >&6; }
18961+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18962+
$as_echo "$FOP" >&6; }
1900018963
fi
1900118964

19002-
if test -z "$FOP"; then
19003-
for ac_prog in fop
18965+
if test -z "$DBTOEPUB"; then
18966+
for ac_prog in dbtoepub
1900418967
do
1900518968
# Extract the first word of "$ac_prog", so it can be a program name with args.
1900618969
set dummy $ac_prog; ac_word=$2
1900718970
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
1900818971
$as_echo_n "checking for $ac_word... " >&6; }
19009-
if ${ac_cv_path_FOP+:} false; then :
18972+
if ${ac_cv_path_DBTOEPUB+:} false; then :
1901018973
$as_echo_n "(cached) " >&6
1901118974
else
19012-
case $FOP in
18975+
case $DBTOEPUB in
1901318976
[\\/]* | ?:[\\/]*)
19014-
ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18977+
ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
1901518978
;;
1901618979
*)
1901718980
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -19021,7 +18984,7 @@ do
1902118984
test -z "$as_dir" && as_dir=.
1902218985
for ac_exec_ext in '' $ac_executable_extensions; do
1902318986
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19024-
ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18987+
ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
1902518988
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1902618989
break 2
1902718990
fi
@@ -19032,25 +18995,25 @@ IFS=$as_save_IFS
1903218995
;;
1903318996
esac
1903418997
fi
19035-
FOP=$ac_cv_path_FOP
19036-
if test -n "$FOP"; then
19037-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19038-
$as_echo "$FOP" >&6; }
18998+
DBTOEPUB=$ac_cv_path_DBTOEPUB
18999+
if test -n "$DBTOEPUB"; then
19000+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19001+
$as_echo "$DBTOEPUB" >&6; }
1903919002
else
1904019003
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1904119004
$as_echo "no" >&6; }
1904219005
fi
1904319006

1904419007

19045-
test -n "$FOP" && break
19008+
test -n "$DBTOEPUB" && break
1904619009
done
1904719010

1904819011
else
19049-
# Report the value of FOP in configure's output in all cases.
19050-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
19051-
$as_echo_n "checking for FOP... " >&6; }
19052-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19053-
$as_echo "$FOP" >&6; }
19012+
# Report the value of DBTOEPUB in configure's output in all cases.
19013+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
19014+
$as_echo_n "checking for DBTOEPUB... " >&6; }
19015+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19016+
$as_echo "$DBTOEPUB" >&6; }
1905419017
fi
1905519018

1905619019

configure.in

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2318,13 +2318,12 @@ if test "$with_python" = yes; then
23182318
fi
23192319

23202320
#
2321-
# Check for DocBook and tools
2321+
# Check for documentation-building tools
23222322
#
2323-
PGAC_PATH_XMLLINT
2324-
PGAC_CHECK_DOCBOOK(4.2)
2325-
PGAC_PATH_PROGS(DBTOEPUB, dbtoepub)
2323+
PGAC_PATH_PROGS(XMLLINT, xmllint)
23262324
PGAC_PATH_PROGS(XSLTPROC, xsltproc)
23272325
PGAC_PATH_PROGS(FOP, fop)
2326+
PGAC_PATH_PROGS(DBTOEPUB, dbtoepub)
23282327

23292328
#
23302329
# Check for test tools

doc/src/sgml/docguide.sgml

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,12 @@
155155
You can get away with not installing DocBook XML and the DocBook XSLT
156156
stylesheets locally, because the required files will be downloaded from the
157157
Internet and cached locally. This may in fact be the preferred solution if
158-
your operating system packages provide only an old version of especially
159-
the stylesheets or if no packages are available at all. See
160-
the <option>--nonet</option> option for <command>xmllint</command>
161-
and <command>xsltproc</command> for more information.
158+
your operating system packages provide only an old version of these files,
159+
or if no packages are available at all.
160+
If you want to prevent any attempt to access the Internet while building
161+
the documentation, you need to pass the <option>--nonet</option> option
162+
to <command>xmllint</command> and <command>xsltproc</command>; see below
163+
for an example.
162164
</para>
163165

164166
<sect2>
@@ -228,21 +230,37 @@ brew install docbook docbook-xsl fop
228230

229231
<para>
230232
Before you can build the documentation you need to run the
231-
<filename>configure</filename> script as you would when building
233+
<filename>configure</filename> script, as you would when building
232234
the <productname>PostgreSQL</productname> programs themselves.
233-
Check the output near the end of the run, it should look something
235+
Check the output near the end of the run; it should look something
234236
like this:
235237
<screen>
236238
checking for xmllint... xmllint
237-
checking for DocBook XML V4.2... yes
238-
checking for dbtoepub... dbtoepub
239239
checking for xsltproc... xsltproc
240240
checking for fop... fop
241+
checking for dbtoepub... dbtoepub
241242
</screen>
242-
If <filename>xmllint</filename> was not found then some of the following
243-
tests will be skipped.
243+
If <filename>xmllint</filename> or <filename>xsltproc</filename> is not
244+
found, you will not be able to build any of the documentation.
245+
<filename>fop</filename> is only needed to build the documentation in
246+
PDF format.
247+
<filename>dbtoepub</filename> is only needed to build the documentation
248+
in EPUB format.
244249
</para>
245250

251+
<para>
252+
If necessary, you can tell <filename>configure</filename> where to find
253+
these programs, for example
254+
<screen>
255+
./configure ... XMLLINT=/opt/local/bin/xmllint ...
256+
</screen>
257+
Also, if you want to ensure that <filename>xmllint</filename>
258+
and <filename>xsltproc</filename> will not perform any network access,
259+
you can do something like
260+
<screen>
261+
./configure ... XMLLINT="xmllint --nonet" XSLTPROC="xsltproc --nonet" ...
262+
</screen>
263+
</para>
246264
</sect2>
247265
</sect1>
248266

0 commit comments

Comments
 (0)