Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7267fdd

Browse files
committed
Add some configure checks for DocBook and related tools. With a somewhat
standard installation layout it should be possible to build the HTMLand print documentation without additional manual setup.
1 parentbee6cc6 commit7267fdd

File tree

6 files changed

+373
-75
lines changed

6 files changed

+373
-75
lines changed

‎aclocal.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
dnl $Header: /cvsroot/pgsql/aclocal.m4,v 1.10 2000/10/20 23:57:32 petere Exp $
1+
dnl $Header: /cvsroot/pgsql/aclocal.m4,v 1.11 2000/11/05 21:04:05 petere Exp $
22
builtin([include],[config/ac_func_accept_argtypes.m4])
33
builtin([include],[config/c-compiler.m4])
44
builtin([include],[config/c-library.m4])
55
builtin([include],[config/cxx.m4])
6+
builtin([include],[config/docbook.m4])
67
builtin([include],[config/general.m4])
78
builtin([include],[config/libtool.m4])
89
builtin([include],[config/programs.m4])

‎config/docbook.m4

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# $Header: /cvsroot/pgsql/config/docbook.m4,v 1.1 2000/11/05 21:04:06 petere Exp $
2+
3+
# PGAC_PROG_JADE
4+
# --------------
5+
AC_DEFUN([PGAC_PROG_JADE],
6+
[AC_CHECK_PROGS([JADE],[openjade jade])])
7+
8+
9+
# PGAC_PROG_NSGMLS
10+
# ----------------
11+
AC_DEFUN([PGAC_PROG_NSGMLS],
12+
[AC_CHECK_PROGS([NSGMLS],[onsgmls nsgmls])])
13+
14+
15+
# PGAC_CHECK_DOCBOOK(VERSION)
16+
# ---------------------------
17+
AC_DEFUN([PGAC_CHECK_DOCBOOK],
18+
[AC_REQUIRE([PGAC_PROG_NSGMLS])
19+
AC_CACHE_CHECK([for DocBook V$1],[pgac_cv_check_docbook],
20+
[cat >conftest.sgml <<EOF
21+
<!doctype book PUBLIC "-//OASIS//DTD DocBook V$1//EN">
22+
<book>
23+
<title>test</title>
24+
<chapter>
25+
<title>random</title>
26+
<sect1>
27+
<title>testsect</title>
28+
<para>text</para>
29+
</sect1>
30+
</chapter>
31+
</book>
32+
EOF
33+
34+
${NSGMLS-false} -s conftest.sgml 1>&5 2>&1
35+
if test $? -eq 0; then
36+
pgac_cv_check_docbook=yes
37+
else
38+
pgac_cv_check_docbook=no
39+
fi
40+
rm -f conftest.sgml])
41+
42+
have_docbook=$pgac_cv_check_docbook
43+
AC_SUBST([have_docbook])
44+
])# PGAC_CHECK_DOCBOOK
45+
46+
47+
# PGAC_PATH_DOCBOOK_STYLESHEETS
48+
# -----------------------------
49+
AC_DEFUN([PGAC_PATH_DOCBOOK_STYLESHEETS],
50+
[AC_MSG_CHECKING([for DocBook stylesheets])
51+
AC_CACHE_VAL([pgac_cv_path_stylesheets],
52+
[if test -n "$DOCBOOKSTYLE"; then
53+
pgac_cv_path_stylesheets=$DOCBOOKSTYLE
54+
else
55+
for pgac_prefix in /usr /usr/local /opt; do
56+
for pgac_infix in share lib; do
57+
for pgac_postfix in \
58+
sgml/stylesheets/nwalsh-modular \
59+
sgml/stylesheets/docbook \
60+
sgml/docbook/dsssl/modular
61+
do
62+
pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
63+
if test -r "$pgac_candidate/html/docbook.dsl" \
64+
&& test -r "$pgac_candidate/print/docbook.dsl"
65+
then
66+
pgac_cv_path_stylesheets=$pgac_candidate
67+
break 3
68+
fi
69+
done
70+
done
71+
done
72+
fi])
73+
DOCBOOKSTYLE=$pgac_cv_path_stylesheets
74+
AC_SUBST([DOCBOOKSTYLE])
75+
if test -n "$DOCBOOKSTYLE"; then
76+
AC_MSG_RESULT([$DOCBOOKSTYLE])
77+
else
78+
AC_MSG_RESULT(no)
79+
fi])# PGAC_PATH_DOCBOOK_STYLESHEETS

‎configure

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7463,6 +7463,185 @@ fi
74637463
fi
74647464

74657465

7466+
#
7467+
# Check for DocBook and tools
7468+
#
7469+
forac_progin onsgmls nsgmls
7470+
do
7471+
# Extract the first word of "$ac_prog", so it can be a program name with args.
7472+
set dummy$ac_prog; ac_word=$2
7473+
echo$ac_n"checking for$ac_word""...$ac_c"1>&6
7474+
echo"configure:7475: checking for$ac_word">&5
7475+
ifeval"test\"`echo'$''{'ac_cv_prog_NSGMLS'+set}'`\" = set";then
7476+
echo$ac_n"(cached)$ac_c"1>&6
7477+
else
7478+
iftest -n"$NSGMLS";then
7479+
ac_cv_prog_NSGMLS="$NSGMLS"# Let the user override the test.
7480+
else
7481+
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7482+
ac_dummy="$PATH"
7483+
forac_dirin$ac_dummy;do
7484+
test -z"$ac_dir"&& ac_dir=.
7485+
iftest -f$ac_dir/$ac_word;then
7486+
ac_cv_prog_NSGMLS="$ac_prog"
7487+
break
7488+
fi
7489+
done
7490+
IFS="$ac_save_ifs"
7491+
fi
7492+
fi
7493+
NSGMLS="$ac_cv_prog_NSGMLS"
7494+
iftest -n"$NSGMLS";then
7495+
echo"$ac_t""$NSGMLS"1>&6
7496+
else
7497+
echo"$ac_t""no"1>&6
7498+
fi
7499+
7500+
test -n"$NSGMLS"&&break
7501+
done
7502+
7503+
# If you don't have nsgmls you won't get very far, so save the cycles.
7504+
iftest -n"$NSGMLS";then
7505+
forac_progin openjade jade
7506+
do
7507+
# Extract the first word of "$ac_prog", so it can be a program name with args.
7508+
set dummy$ac_prog; ac_word=$2
7509+
echo$ac_n"checking for$ac_word""...$ac_c"1>&6
7510+
echo"configure:7511: checking for$ac_word">&5
7511+
ifeval"test\"`echo'$''{'ac_cv_prog_JADE'+set}'`\" = set";then
7512+
echo$ac_n"(cached)$ac_c"1>&6
7513+
else
7514+
iftest -n"$JADE";then
7515+
ac_cv_prog_JADE="$JADE"# Let the user override the test.
7516+
else
7517+
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7518+
ac_dummy="$PATH"
7519+
forac_dirin$ac_dummy;do
7520+
test -z"$ac_dir"&& ac_dir=.
7521+
iftest -f$ac_dir/$ac_word;then
7522+
ac_cv_prog_JADE="$ac_prog"
7523+
break
7524+
fi
7525+
done
7526+
IFS="$ac_save_ifs"
7527+
fi
7528+
fi
7529+
JADE="$ac_cv_prog_JADE"
7530+
iftest -n"$JADE";then
7531+
echo"$ac_t""$JADE"1>&6
7532+
else
7533+
echo"$ac_t""no"1>&6
7534+
fi
7535+
7536+
test -n"$JADE"&&break
7537+
done
7538+
7539+
7540+
echo$ac_n"checking for DocBook V3.1""...$ac_c"1>&6
7541+
echo"configure:7542: checking for DocBook V3.1">&5
7542+
ifeval"test\"`echo'$''{'pgac_cv_check_docbook'+set}'`\" = set";then
7543+
echo$ac_n"(cached)$ac_c"1>&6
7544+
else
7545+
cat>conftest.sgml<<EOF
7546+
<!doctype book PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
7547+
<book>
7548+
<title>test</title>
7549+
<chapter>
7550+
<title>random</title>
7551+
<sect1>
7552+
<title>testsect</title>
7553+
<para>text</para>
7554+
</sect1>
7555+
</chapter>
7556+
</book>
7557+
EOF
7558+
7559+
${NSGMLS-false} -s conftest.sgml1>&52>&1
7560+
iftest$? -eq 0;then
7561+
pgac_cv_check_docbook=yes
7562+
else
7563+
pgac_cv_check_docbook=no
7564+
fi
7565+
rm -f conftest.sgml
7566+
fi
7567+
7568+
echo"$ac_t""$pgac_cv_check_docbook"1>&6
7569+
7570+
have_docbook=$pgac_cv_check_docbook
7571+
7572+
7573+
echo$ac_n"checking for DocBook stylesheets""...$ac_c"1>&6
7574+
echo"configure:7575: checking for DocBook stylesheets">&5
7575+
ifeval"test\"`echo'$''{'pgac_cv_path_stylesheets'+set}'`\" = set";then
7576+
echo$ac_n"(cached)$ac_c"1>&6
7577+
else
7578+
iftest -n"$DOCBOOKSTYLE";then
7579+
pgac_cv_path_stylesheets=$DOCBOOKSTYLE
7580+
else
7581+
forpgac_prefixin /usr /usr/local /opt;do
7582+
forpgac_infixin share lib;do
7583+
forpgac_postfixin \
7584+
sgml/stylesheets/nwalsh-modular \
7585+
sgml/stylesheets/docbook \
7586+
sgml/docbook/dsssl/modular
7587+
do
7588+
pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
7589+
iftest -r"$pgac_candidate/html/docbook.dsl" \
7590+
&&test -r"$pgac_candidate/print/docbook.dsl"
7591+
then
7592+
pgac_cv_path_stylesheets=$pgac_candidate
7593+
break 3
7594+
fi
7595+
done
7596+
done
7597+
done
7598+
fi
7599+
fi
7600+
7601+
DOCBOOKSTYLE=$pgac_cv_path_stylesheets
7602+
7603+
iftest -n"$DOCBOOKSTYLE";then
7604+
echo"$ac_t""$DOCBOOKSTYLE"1>&6
7605+
else
7606+
echo"$ac_t""no"1>&6
7607+
fi
7608+
forac_progin sgmlspl
7609+
do
7610+
# Extract the first word of "$ac_prog", so it can be a program name with args.
7611+
set dummy$ac_prog; ac_word=$2
7612+
echo$ac_n"checking for$ac_word""...$ac_c"1>&6
7613+
echo"configure:7614: checking for$ac_word">&5
7614+
ifeval"test\"`echo'$''{'ac_cv_prog_SGMLSPL'+set}'`\" = set";then
7615+
echo$ac_n"(cached)$ac_c"1>&6
7616+
else
7617+
iftest -n"$SGMLSPL";then
7618+
ac_cv_prog_SGMLSPL="$SGMLSPL"# Let the user override the test.
7619+
else
7620+
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7621+
ac_dummy="$PATH"
7622+
forac_dirin$ac_dummy;do
7623+
test -z"$ac_dir"&& ac_dir=.
7624+
iftest -f$ac_dir/$ac_word;then
7625+
ac_cv_prog_SGMLSPL="$ac_prog"
7626+
break
7627+
fi
7628+
done
7629+
IFS="$ac_save_ifs"
7630+
fi
7631+
fi
7632+
SGMLSPL="$ac_cv_prog_SGMLSPL"
7633+
iftest -n"$SGMLSPL";then
7634+
echo"$ac_t""$SGMLSPL"1>&6
7635+
else
7636+
echo"$ac_t""no"1>&6
7637+
fi
7638+
7639+
test -n"$SGMLSPL"&&break
7640+
done
7641+
7642+
fi
7643+
7644+
74667645
# Finally ready to produce output files ...
74677646

74687647
iftest x"$abs_top_srcdir"!= x"$abs_top_builddir";then
@@ -7686,6 +7865,11 @@ s%@HAVE_POSIX_SIGNALS@%$HAVE_POSIX_SIGNALS%g
76867865
s%@TCLSH@%$TCLSH%g
76877866
s%@TCL_CONFIG_SH@%$TCL_CONFIG_SH%g
76887867
s%@TK_CONFIG_SH@%$TK_CONFIG_SH%g
7868+
s%@NSGMLS@%$NSGMLS%g
7869+
s%@JADE@%$JADE%g
7870+
s%@have_docbook@%$have_docbook%g
7871+
s%@DOCBOOKSTYLE@%$DOCBOOKSTYLE%g
7872+
s%@SGMLSPL@%$SGMLSPL%g
76897873
76907874
CEOF
76917875
EOF

‎configure.in

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,19 @@ if test "$with_tk" = yes; then
10901090
fi
10911091

10921092

1093+
#
1094+
# Check for DocBook and tools
1095+
#
1096+
PGAC_PROG_NSGMLS
1097+
# If you don't have nsgmls you won't get very far, so save the cycles.
1098+
if test -n "$NSGMLS"; then
1099+
PGAC_PROG_JADE
1100+
PGAC_CHECK_DOCBOOK([3.1])
1101+
PGAC_PATH_DOCBOOK_STYLESHEETS
1102+
AC_CHECK_PROGS(SGMLSPL, sgmlspl)
1103+
fi
1104+
1105+
10931106
# Finally ready to produce output files ...
10941107

10951108
if test x"$abs_top_srcdir" != x"$abs_top_builddir"; then

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp