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

Commit b3d72d3

Browse files
committed
Use --with-docdir to choose installation location of documentation; put
back --infodir, which several automatic build environments expect to exist. Add --without-docdir to prevent installation of documentation, which is helpful for things like RPM that have their own method of installing documentation.
1 parent c52204b commit b3d72d3

File tree

5 files changed

+76
-37
lines changed

5 files changed

+76
-37
lines changed

config/libtool.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
# AC_PROG_LD - find the path to the GNU or non-GNU linker
3232
AC_DEFUN([AC_PROG_LD],
3333
[AC_ARG_WITH(gnu-ld,
34-
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
34+
[ --with-gnu-ld assume the C compiler uses GNU ld [[default=no]]],
3535
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3636
AC_REQUIRE([AC_PROG_CC])dnl
3737
AC_REQUIRE([AC_CANONICAL_HOST])dnl

configure

+41-12
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ localstatedir='${prefix}/var'
337337
libdir='${exec_prefix}/lib'
338338
includedir='${prefix}/include'
339339
oldincludedir='/usr/include'
340-
docdir='${prefix}/doc'
340+
infodir='${prefix}/info'
341341
mandir='${prefix}/man'
342342

343343
ac_prev=
@@ -436,10 +436,10 @@ do
436436
| --includ=* | --inclu=* | --incl=* | --inc=*)
437437
includedir=$ac_optarg ;;
438438

439-
-docdir | --docdir | --infodi | --infod | --doc | --inf)
440-
ac_prev=docdir ;;
441-
-docdir=* | --docdir=* | --infodi=* | --infod=* | --doc=* | --inf=*)
442-
docdir=$ac_optarg ;;
439+
-infodir | --infodir | --infodi | --infod | --info | --inf)
440+
ac_prev=infodir ;;
441+
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
442+
infodir=$ac_optarg ;;
443443

444444
-libdir | --libdir | --libdi | --libd)
445445
ac_prev=libdir ;;
@@ -658,7 +658,7 @@ done
658658

659659
# Be sure to have absolute paths.
660660
for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
661-
localstatedir libdir includedir oldincludedir docdir mandir
661+
localstatedir libdir includedir oldincludedir infodir mandir
662662
do
663663
eval ac_val=$`echo $ac_var`
664664
case $ac_val in
@@ -852,6 +852,8 @@ Optional Packages:
852852
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
853853
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
854854

855+
--with-docdir=DIR install the documentation in DIR [PREFIX/doc]
856+
--without-docdir do not install the documentation
855857
--with-includes=DIRS look for additional header files in DIRS
856858
--with-libraries=DIRS look for additional libraries in DIRS
857859
--with-libs=DIRS alternative spelling of --with-libraries
@@ -865,13 +867,13 @@ Optional Packages:
865867
--with-java build JDBC interface and Java tools
866868
--with-krb4[=DIR] build with Kerberos 4 support [/usr/athena]
867869
--with-krb5[=DIR] build with Kerberos 5 support [/usr/athena]
868-
--with-krb-srvnam=NAME name of the service principal in Kerberos postgres
870+
--with-krb-srvnam=NAME name of the service principal in Kerberos [postgres]
869871
--with-pam build with PAM support
870872
--with-rendezvous build with Rendezvous support
871873
--with-openssl[=DIR] build with OpenSSL support [/usr/local/ssl]
872874
--without-readline do not use Readline
873875
--without-zlib do not use Zlib
874-
--with-gnu-ld assume the C compiler uses GNU ld default=no
876+
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
875877

876878
Some influential environment variables:
877879
CC C compiler command
@@ -1245,9 +1247,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
12451247

12461248

12471249

1248-
1249-
1250-
12511250

12521251

12531252

@@ -1472,6 +1471,36 @@ fi
14721471
## Command line options
14731472
##
14741473

1474+
#
1475+
# Installation directory for documentation
1476+
#
1477+
1478+
1479+
1480+
# Check whether --with-docdir or --without-docdir was given.
1481+
if test "${with_docdir+set}" = set; then
1482+
withval="$with_docdir"
1483+
1484+
case $withval in
1485+
yes)
1486+
{ { echo "$as_me:$LINENO: error: option --with-docdir requires an argument" >&5
1487+
echo "$as_me: error: option --with-docdir requires an argument" >&2;}
1488+
{ (exit 1); exit 1; }; }
1489+
;;
1490+
no)
1491+
docdir=
1492+
;;
1493+
*)
1494+
docdir=$withval
1495+
;;
1496+
esac
1497+
1498+
else
1499+
docdir='${prefix}/doc'
1500+
fi;
1501+
1502+
1503+
14751504

14761505
#
14771506
# Add non-standard directories to the include path
@@ -18225,7 +18254,6 @@ s,@ECHO_C@,$ECHO_C,;t t
1822518254
s,@ECHO_N@,$ECHO_N,;t t
1822618255
s,@ECHO_T@,$ECHO_T,;t t
1822718256
s,@LIBS@,$LIBS,;t t
18228-
s,@docdir@,$docdir,;t t
1822918257
s,@configure_args@,$configure_args,;t t
1823018258
s,@build@,$build,;t t
1823118259
s,@build_cpu@,$build_cpu,;t t
@@ -18237,6 +18265,7 @@ s,@host_vendor@,$host_vendor,;t t
1823718265
s,@host_os@,$host_os,;t t
1823818266
s,@PORTNAME@,$PORTNAME,;t t
1823918267
s,@TAS@,$TAS,;t t
18268+
s,@docdir@,$docdir,;t t
1824018269
s,@enable_nls@,$enable_nls,;t t
1824118270
s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
1824218271
s,@default_port@,$default_port,;t t

configure.in

+14-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $Header: /cvsroot/pgsql/configure.in,v 1.303 2003/11/24 13:16:22 petere Exp $
2+
dnl $Header: /cvsroot/pgsql/configure.in,v 1.304 2003/11/24 14:52:57 petere Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -16,15 +16,8 @@ dnl
1616
dnl Read the Autoconf manual for details.
1717
dnl
1818
m4_pattern_forbid(^PGAC_)dnl to catch undefined macros
19-
dnl
20-
dnl The GNU folks apparently haven't heard that some people don't use
21-
dnl Texinfo. Use this sorcery to use "docdir" instead of "infodir".
22-
m4_define([info], [doc])
23-
m4_define([infodir], [docdir])
19+
2420
AC_INIT([PostgreSQL], [7.5devel], [pgsql-bugs@postgresql.org])
25-
m4_undefine([infodir])
26-
m4_undefine([info])
27-
AC_SUBST(docdir)
2821

2922
AC_PREREQ(2.53)
3023
AC_COPYRIGHT([Copyright 2003 PostgreSQL Global Development Group])
@@ -126,6 +119,17 @@ AC_SUBST(TAS)
126119
## Command line options
127120
##
128121

122+
#
123+
# Installation directory for documentation
124+
#
125+
PGAC_ARG(with, docdir, [ --with-docdir=DIR install the documentation in DIR [[PREFIX/doc]]
126+
--without-docdir do not install the documentation],
127+
[AC_MSG_ERROR([option --with-docdir requires an argument])],
128+
[docdir=],
129+
[docdir=$withval],
130+
[docdir='${prefix}/doc'])
131+
AC_SUBST(docdir)
132+
129133

130134
#
131135
# Add non-standard directories to the include path
@@ -490,7 +494,7 @@ AC_SUBST(krb_srvtab)
490494
# Kerberos configuration parameters
491495
#
492496
PGAC_ARG_REQ(with, krb-srvnam,
493-
[ --with-krb-srvnam=NAME name of the service principal in Kerberos [postgres]],
497+
[ --with-krb-srvnam=NAME name of the service principal in Kerberos [[postgres]]],
494498
[],
495499
[with_krb_srvnam="postgres"])
496500
AC_DEFINE_UNQUOTED([PG_KRB_SRVNAM], ["$with_krb_srvnam"],

doc/Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $Header: /cvsroot/pgsql/doc/Makefile,v 1.25 2003/08/04 20:52:48 tgl Exp $
7+
# $Header: /cvsroot/pgsql/doc/Makefile,v 1.26 2003/11/24 14:52:58 petere Exp $
88
#
99
#----------------------------------------------------------------------------
1010

@@ -26,8 +26,10 @@ include $(top_builddir)/src/Makefile.global
2626
.NOTPARALLEL:
2727

2828
ifneq ($(wildcard $(srcdir)/postgres.tar.gz),)
29+
ifneq (,$(docdir))
2930
found_html := yes
3031
endif
32+
endif
3133

3234
ifneq ($(wildcard $(srcdir)/man.tar.gz),)
3335
# SCO OpenServer's man system is sufficiently different to not bother.

doc/src/sgml/installation.sgml

+17-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.182 2003/11/16 17:16:47 tgl Exp $ -->
1+
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.183 2003/11/24 14:52:58 petere Exp $ -->
22

33
<chapter id="installation">
44
<title><![%standalone-include[<productname>PostgreSQL</>]]>
@@ -611,33 +611,37 @@ JAVACMD=$JAVA_HOME/bin/java
611611
</varlistentry>
612612

613613
<varlistentry>
614-
<term><option>--docdir=<replaceable>DIRECTORY</></option></term>
614+
<term><option>--mandir=<replaceable>DIRECTORY</></option></term>
615615
<listitem>
616616
<para>
617-
Documentation files, except <quote>man</> pages, will be
618-
installed into this directory. The default is
619-
<filename><replaceable>PREFIX</>/doc</>.
617+
The man pages that come with <productname>PostgreSQL</> will be installed under
618+
this directory, in their respective
619+
<filename>man<replaceable>x</></> subdirectories.
620+
The default is <filename><replaceable>PREFIX</>/man</>.
620621
</para>
621622
</listitem>
622623
</varlistentry>
624+
</variablelist>
623625

624626
<varlistentry>
625-
<term><option>--mandir=<replaceable>DIRECTORY</></option></term>
627+
<term><option>--with-docdir=<replaceable>DIRECTORY</></option></term>
628+
<term><option>--without-docdir</option></term>
626629
<listitem>
627630
<para>
628-
The man pages that come with <productname>PostgreSQL</> will be installed under
629-
this directory, in their respective
630-
<filename>man<replaceable>x</></> subdirectories.
631-
The default is <filename><replaceable>PREFIX</>/man</>.
631+
Documentation files, except <quote>man</> pages, will be
632+
installed into this directory. The default is
633+
<filename><replaceable>PREFIX</>/doc</>. If the option
634+
<option>--without-docdir</option> is specified, the
635+
documentation will not be installed by <command>make
636+
install</command>. This is intended for packaging scripts
637+
that have special methods for installing documentation.
632638
</para>
633639
</listitem>
634640
</varlistentry>
635-
</variablelist>
636641

637642
<note>
638643
<para>
639-
Care has been taken to make it possible to install
640-
<productname>PostgreSQL</>
644+
Care has been taken to make it possible to install <productname>PostgreSQL</>
641645
into shared installation locations (such as
642646
<filename>/usr/local/include</filename>) without interfering
643647
with the namespace of the rest of the system. First, the

0 commit comments

Comments
 (0)