From b3d72d3ec52e4477eb9837c2b0d701e47fa55ef5 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 24 Nov 2003 14:52:58 +0000 Subject: [PATCH] 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. --- config/libtool.m4 | 2 +- configure | 53 ++++++++++++++++++++++++++-------- configure.in | 24 ++++++++------- doc/Makefile | 4 ++- doc/src/sgml/installation.sgml | 32 +++++++++++--------- 5 files changed, 77 insertions(+), 38 deletions(-) diff --git a/config/libtool.m4 b/config/libtool.m4 index 798420d5bc..2373e5720d 100644 --- a/config/libtool.m4 +++ b/config/libtool.m4 @@ -31,7 +31,7 @@ # AC_PROG_LD - find the path to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH(gnu-ld, -[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], +[ --with-gnu-ld assume the C compiler uses GNU ld [[default=no]]], test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl diff --git a/configure b/configure index 74245b7c42..6e4781f396 100755 --- a/configure +++ b/configure @@ -337,7 +337,7 @@ localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${prefix}/doc' +infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= @@ -436,10 +436,10 @@ do | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; - -docdir | --docdir | --infodi | --infod | --doc | --inf) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --infodi=* | --infod=* | --doc=* | --inf=*) - docdir=$ac_optarg ;; + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; @@ -658,7 +658,7 @@ done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir docdir mandir + localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in @@ -852,6 +852,8 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-docdir=DIR install the documentation in DIR [PREFIX/doc] + --without-docdir do not install the documentation --with-includes=DIRS look for additional header files in DIRS --with-libraries=DIRS look for additional libraries in DIRS --with-libs=DIRS alternative spelling of --with-libraries @@ -865,13 +867,13 @@ Optional Packages: --with-java build JDBC interface and Java tools --with-krb4[=DIR] build with Kerberos 4 support [/usr/athena] --with-krb5[=DIR] build with Kerberos 5 support [/usr/athena] - --with-krb-srvnam=NAME name of the service principal in Kerberos postgres + --with-krb-srvnam=NAME name of the service principal in Kerberos [postgres] --with-pam build with PAM support --with-rendezvous build with Rendezvous support --with-openssl[=DIR] build with OpenSSL support [/usr/local/ssl] --without-readline do not use Readline --without-zlib do not use Zlib - --with-gnu-ld assume the C compiler uses GNU ld default=no + --with-gnu-ld assume the C compiler uses GNU ld [default=no] Some influential environment variables: CC C compiler command @@ -1245,9 +1247,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - @@ -1472,6 +1471,36 @@ fi ## Command line options ## +# +# Installation directory for documentation +# + + + +# Check whether --with-docdir or --without-docdir was given. +if test "${with_docdir+set}" = set; then + withval="$with_docdir" + + case $withval in + yes) + { { echo "$as_me:$LINENO: error: option --with-docdir requires an argument" >&5 +echo "$as_me: error: option --with-docdir requires an argument" >&2;} + { (exit 1); exit 1; }; } + ;; + no) + docdir= + ;; + *) + docdir=$withval + ;; + esac + +else + docdir='${prefix}/doc' +fi; + + + # # Add non-standard directories to the include path @@ -18225,7 +18254,6 @@ s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t -s,@docdir@,$docdir,;t t s,@configure_args@,$configure_args,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t @@ -18237,6 +18265,7 @@ s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@PORTNAME@,$PORTNAME,;t t s,@TAS@,$TAS,;t t +s,@docdir@,$docdir,;t t s,@enable_nls@,$enable_nls,;t t s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t s,@default_port@,$default_port,;t t diff --git a/configure.in b/configure.in index 940524b62c..2b64964894 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -dnl $Header: /cvsroot/pgsql/configure.in,v 1.303 2003/11/24 13:16:22 petere Exp $ +dnl $Header: /cvsroot/pgsql/configure.in,v 1.304 2003/11/24 14:52:57 petere Exp $ dnl dnl Developers, please strive to achieve this order: dnl @@ -16,15 +16,8 @@ dnl dnl Read the Autoconf manual for details. dnl m4_pattern_forbid(^PGAC_)dnl to catch undefined macros -dnl -dnl The GNU folks apparently haven't heard that some people don't use -dnl Texinfo. Use this sorcery to use "docdir" instead of "infodir". -m4_define([info], [doc]) -m4_define([infodir], [docdir]) + AC_INIT([PostgreSQL], [7.5devel], [pgsql-bugs@postgresql.org]) -m4_undefine([infodir]) -m4_undefine([info]) -AC_SUBST(docdir) AC_PREREQ(2.53) AC_COPYRIGHT([Copyright 2003 PostgreSQL Global Development Group]) @@ -126,6 +119,17 @@ AC_SUBST(TAS) ## Command line options ## +# +# Installation directory for documentation +# +PGAC_ARG(with, docdir, [ --with-docdir=DIR install the documentation in DIR [[PREFIX/doc]] + --without-docdir do not install the documentation], + [AC_MSG_ERROR([option --with-docdir requires an argument])], + [docdir=], + [docdir=$withval], + [docdir='${prefix}/doc']) +AC_SUBST(docdir) + # # Add non-standard directories to the include path @@ -490,7 +494,7 @@ AC_SUBST(krb_srvtab) # Kerberos configuration parameters # PGAC_ARG_REQ(with, krb-srvnam, - [ --with-krb-srvnam=NAME name of the service principal in Kerberos [postgres]], + [ --with-krb-srvnam=NAME name of the service principal in Kerberos [[postgres]]], [], [with_krb_srvnam="postgres"]) AC_DEFINE_UNQUOTED([PG_KRB_SRVNAM], ["$with_krb_srvnam"], diff --git a/doc/Makefile b/doc/Makefile index 2bdecc996e..84cc008810 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -4,7 +4,7 @@ # # Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/doc/Makefile,v 1.25 2003/08/04 20:52:48 tgl Exp $ +# $Header: /cvsroot/pgsql/doc/Makefile,v 1.26 2003/11/24 14:52:58 petere Exp $ # #---------------------------------------------------------------------------- @@ -26,8 +26,10 @@ include $(top_builddir)/src/Makefile.global .NOTPARALLEL: ifneq ($(wildcard $(srcdir)/postgres.tar.gz),) +ifneq (,$(docdir)) found_html := yes endif +endif ifneq ($(wildcard $(srcdir)/man.tar.gz),) # SCO OpenServer's man system is sufficiently different to not bother. diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml index cb80c970d4..90eb08e54d 100644 --- a/doc/src/sgml/installation.sgml +++ b/doc/src/sgml/installation.sgml @@ -1,4 +1,4 @@ - + <![%standalone-include[<productname>PostgreSQL</>]]> @@ -610,17 +610,6 @@ JAVACMD=$JAVA_HOME/bin/java </listitem> </varlistentry> - <varlistentry> - <term><option>--docdir=<replaceable>DIRECTORY</></option></term> - <listitem> - <para> - Documentation files, except <quote>man</> pages, will be - installed into this directory. The default is - <filename><replaceable>PREFIX</>/doc</>. - </para> - </listitem> - </varlistentry> - <varlistentry> <term><option>--mandir=<replaceable>DIRECTORY</></option></term> <listitem> @@ -634,10 +623,25 @@ JAVACMD=$JAVA_HOME/bin/java </varlistentry> </variablelist> + <varlistentry> + <term><option>--with-docdir=<replaceable>DIRECTORY</></option></term> + <term><option>--without-docdir</option></term> + <listitem> + <para> + Documentation files, except <quote>man</> pages, will be + installed into this directory. The default is + <filename><replaceable>PREFIX</>/doc</>. If the option + <option>--without-docdir</option> is specified, the + documentation will not be installed by <command>make + install</command>. This is intended for packaging scripts + that have special methods for installing documentation. + </para> + </listitem> + </varlistentry> + <note> <para> - Care has been taken to make it possible to install - <productname>PostgreSQL</> + Care has been taken to make it possible to install <productname>PostgreSQL</> into shared installation locations (such as <filename>/usr/local/include</filename>) without interfering with the namespace of the rest of the system. First, the