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

Commit dd01cfe

Browse files
committed
Remove possibility to specify an installation root after --with-krbx and
--with-openssl options. This creates too much risk to pick up the wrong directory accidentally (for example when there are lib64 directories), and does not really help much with contemporary installation layouts.
1 parent 859accd commit dd01cfe

File tree

3 files changed

+73
-175
lines changed

3 files changed

+73
-175
lines changed

configure

Lines changed: 44 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -865,12 +865,12 @@ Optional Packages:
865865
--with-perl build Perl modules (PL/Perl)
866866
--with-python build Python modules (PL/Python)
867867
--with-java build JDBC interface and Java tools
868-
--with-krb4[=DIR] build with Kerberos 4 support [/usr/athena]
869-
--with-krb5[=DIR] build with Kerberos 5 support [/usr/athena]
868+
--with-krb4 build with Kerberos 4 support
869+
--with-krb5 build with Kerberos 5 support
870870
--with-krb-srvnam=NAME name of the service principal in Kerberos [postgres]
871871
--with-pam build with PAM support
872872
--with-rendezvous build with Rendezvous support
873-
--with-openssl[=DIR] build with OpenSSL support [/usr/local/ssl]
873+
--with-openssl build with OpenSSL support
874874
--without-readline do not use Readline
875875
--without-zlib do not use Zlib
876876
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
@@ -3309,7 +3309,6 @@ fi;
33093309

33103310

33113311

3312-
33133312
#
33143313
# Kerberos 4
33153314
#
@@ -3324,47 +3323,32 @@ if test "${with_krb4+set}" = set; then
33243323

33253324
case $withval in
33263325
yes)
3327-
krb4_prefix=/usr/athena
3326+
3327+
3328+
cat >>confdefs.h <<\_ACEOF
3329+
#define KRB4 1
3330+
_ACEOF
3331+
3332+
krb_srvtab="/etc/srvtab"
3333+
33283334
;;
33293335
no)
33303336
:
33313337
;;
33323338
*)
3333-
with_krb4=yes
3334-
krb4_prefix=$withval
3339+
{ { echo "$as_me:$LINENO: error: no argument expected for --with-krb4 option" >&5
3340+
echo "$as_me: error: no argument expected for --with-krb4 option" >&2;}
3341+
{ (exit 1); exit 1; }; }
33353342
;;
33363343
esac
33373344

33383345
else
33393346
with_krb4=no
3340-
fi;
3341-
3342-
3343-
if test "$with_krb4" = yes; then
3344-
3345-
echo "$as_me:$LINENO: result: yes" >&5
3346-
echo "${ECHO_T}yes" >&6
3347-
3348-
cat >>confdefs.h <<\_ACEOF
3349-
#define KRB4 1
3350-
_ACEOF
3351-
3352-
3353-
if test -d "$krb4_prefix/include"; then
3354-
INCLUDES="$INCLUDES -I$krb4_prefix/include"
3355-
fi
3356-
if test -d "$krb4_prefix/lib"; then
3357-
LIBDIRS="$LIBDIRS -L$krb4_prefix/lib"
3358-
fi
3359-
3360-
krb_srvtab="/etc/srvtab"
3361-
3362-
else
3363-
echo "$as_me:$LINENO: result: no" >&5
3364-
echo "${ECHO_T}no" >&6
3365-
fi
33663347

3348+
fi;
33673349

3350+
echo "$as_me:$LINENO: result: $with_krb4" >&5
3351+
echo "${ECHO_T}$with_krb4" >&6
33683352

33693353

33703354

@@ -3382,47 +3366,32 @@ if test "${with_krb5+set}" = set; then
33823366

33833367
case $withval in
33843368
yes)
3385-
krb5_prefix=/usr/athena
3369+
3370+
3371+
cat >>confdefs.h <<\_ACEOF
3372+
#define KRB5 1
3373+
_ACEOF
3374+
3375+
krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
3376+
33863377
;;
33873378
no)
33883379
:
33893380
;;
33903381
*)
3391-
with_krb5=yes
3392-
krb5_prefix=$withval
3382+
{ { echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
3383+
echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
3384+
{ (exit 1); exit 1; }; }
33933385
;;
33943386
esac
33953387

33963388
else
33973389
with_krb5=no
3398-
fi;
3399-
3400-
3401-
if test "$with_krb5" = yes; then
3402-
3403-
echo "$as_me:$LINENO: result: yes" >&5
3404-
echo "${ECHO_T}yes" >&6
3405-
3406-
cat >>confdefs.h <<\_ACEOF
3407-
#define KRB5 1
3408-
_ACEOF
3409-
3410-
3411-
if test -d "$krb5_prefix/include"; then
3412-
INCLUDES="$INCLUDES -I$krb5_prefix/include"
3413-
fi
3414-
if test -d "$krb5_prefix/lib"; then
3415-
LIBDIRS="$LIBDIRS -L$krb5_prefix/lib"
3416-
fi
3417-
3418-
krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
3419-
3420-
else
3421-
echo "$as_me:$LINENO: result: no" >&5
3422-
echo "${ECHO_T}no" >&6
3423-
fi
34243390

3391+
fi;
34253392

3393+
echo "$as_me:$LINENO: result: $with_krb5" >&5
3394+
echo "${ECHO_T}$with_krb5" >&6
34263395

34273396

34283397

@@ -3556,6 +3525,8 @@ echo "${ECHO_T}$with_rendezvous" >&6
35563525
#
35573526
# OpenSSL
35583527
#
3528+
echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
3529+
echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6
35593530

35603531

35613532

@@ -3565,42 +3536,29 @@ if test "${with_openssl+set}" = set; then
35653536

35663537
case $withval in
35673538
yes)
3568-
openssl_prefix=/usr/local/ssl
3539+
3540+
cat >>confdefs.h <<\_ACEOF
3541+
#define USE_SSL 1
3542+
_ACEOF
3543+
35693544
;;
35703545
no)
35713546
:
35723547
;;
35733548
*)
3574-
with_openssl=yes
3575-
openssl_prefix=$withval
3549+
{ { echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
3550+
echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
3551+
{ (exit 1); exit 1; }; }
35763552
;;
35773553
esac
35783554

35793555
else
35803556
with_openssl=no
3581-
fi;
3582-
3583-
3584-
if test "$with_openssl" = yes; then
3585-
3586-
echo "$as_me:$LINENO: result: building with OpenSSL support" >&5
3587-
echo "${ECHO_T}building with OpenSSL support" >&6
3588-
3589-
cat >>confdefs.h <<\_ACEOF
3590-
#define USE_SSL 1
3591-
_ACEOF
3592-
3593-
3594-
if test -d "${openssl_prefix}/include" ; then
3595-
INCLUDES="$INCLUDES -I${openssl_prefix}/include"
3596-
fi
3597-
if test -d "${openssl_prefix}/lib" ; then
3598-
LIBDIRS="$LIBDIRS -L${openssl_prefix}/lib"
3599-
fi
3600-
3601-
fi
36023557

3558+
fi;
36033559

3560+
echo "$as_me:$LINENO: result: $with_openssl" >&5
3561+
echo "${ECHO_T}$with_openssl" >&6
36043562

36053563

36063564

configure.in

Lines changed: 11 additions & 57 deletions
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.306 2003/11/27 18:14:02 petere Exp $
2+
dnl $Header: /cvsroot/pgsql/configure.in,v 1.307 2003/11/27 19:44:55 petere Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -422,63 +422,29 @@ fi],
422422
[AC_MSG_RESULT(no)])
423423
AC_SUBST(with_java)
424424

425-
dnl A note on the Kerberos and OpenSSL options:
426-
dnl
427-
dnl The user can give an argument to the option in order the specify
428-
dnl the base path of the respective installation (what he specified
429-
dnl perhaps as --prefix). If no argument is given ($withval is "yes")
430-
dnl then we take the path where the package installs by default. This
431-
dnl way the user doesn't have to use redundant --with-includes and
432-
dnl --with-libraries options, but he can still use them if the layout
433-
dnl is non-standard.
434-
435425
#
436426
# Kerberos 4
437427
#
438428
AC_MSG_CHECKING([whether to build with Kerberos 4 support])
439-
PGAC_ARG_OPTARG(with, krb4, [[ --with-krb4[=DIR] build with Kerberos 4 support [/usr/athena]]],
440-
[krb4_prefix=/usr/athena],
441-
[krb4_prefix=$withval],
429+
PGAC_ARG_BOOL(with, krb4, no, [ --with-krb4 build with Kerberos 4 support],
442430
[
443-
AC_MSG_RESULT(yes)
444431
AC_DEFINE(KRB4, 1, [Define to build with Kerberos 4 support. (--with-krb4)])
445-
446-
if test -d "$krb4_prefix/include"; then
447-
INCLUDES="$INCLUDES -I$krb4_prefix/include"
448-
fi
449-
if test -d "$krb4_prefix/lib"; then
450-
LIBDIRS="$LIBDIRS -L$krb4_prefix/lib"
451-
fi
452-
453432
krb_srvtab="/etc/srvtab"
454-
],
455-
[AC_MSG_RESULT(no)])
456-
433+
])
434+
AC_MSG_RESULT([$with_krb4])
457435
AC_SUBST(with_krb4)
458436

459437

460438
#
461439
# Kerberos 5
462440
#
463441
AC_MSG_CHECKING([whether to build with Kerberos 5 support])
464-
PGAC_ARG_OPTARG(with, krb5, [[ --with-krb5[=DIR] build with Kerberos 5 support [/usr/athena]]],
465-
[krb5_prefix=/usr/athena],
466-
[krb5_prefix=$withval],
442+
PGAC_ARG_BOOL(with, krb5, no, [ --with-krb5 build with Kerberos 5 support],
467443
[
468-
AC_MSG_RESULT([yes])
469444
AC_DEFINE(KRB5, 1, [Define to build with Kerberos 5 support. (--with-krb5)])
470-
471-
if test -d "$krb5_prefix/include"; then
472-
INCLUDES="$INCLUDES -I$krb5_prefix/include"
473-
fi
474-
if test -d "$krb5_prefix/lib"; then
475-
LIBDIRS="$LIBDIRS -L$krb5_prefix/lib"
476-
fi
477-
478445
krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
479-
],
480-
[AC_MSG_RESULT(no)])
481-
446+
])
447+
AC_MSG_RESULT([$with_krb5])
482448
AC_SUBST(with_krb5)
483449

484450

@@ -526,22 +492,10 @@ AC_SUBST(with_rendezvous)
526492
#
527493
# OpenSSL
528494
#
529-
PGAC_ARG_OPTARG(with, openssl,
530-
[[ --with-openssl[=DIR] build with OpenSSL support [/usr/local/ssl]]],
531-
[openssl_prefix=/usr/local/ssl],
532-
[openssl_prefix=$withval],
533-
[
534-
AC_MSG_RESULT([building with OpenSSL support])
535-
AC_DEFINE([USE_SSL], 1, [Define to build with (Open)SSL support. (--with-openssl)])
536-
537-
if test -d "${openssl_prefix}/include" ; then
538-
INCLUDES="$INCLUDES -I${openssl_prefix}/include"
539-
fi
540-
if test -d "${openssl_prefix}/lib" ; then
541-
LIBDIRS="$LIBDIRS -L${openssl_prefix}/lib"
542-
fi
543-
])
544-
495+
AC_MSG_CHECKING([whether to build with OpenSSL support])
496+
PGAC_ARG_BOOL(with, openssl, no, [ --with-openssl build with OpenSSL support],
497+
[AC_DEFINE([USE_SSL], 1, [Define to build with (Open)SSL support. (--with-openssl)])])
498+
AC_MSG_RESULT([$with_openssl])
545499
AC_SUBST(with_openssl)
546500

547501

doc/src/sgml/installation.sgml

Lines changed: 18 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.185 2003/11/26 15:56:48 petere Exp $ -->
1+
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.186 2003/11/27 19:44:56 petere Exp $ -->
22

33
<chapter id="installation">
44
<title><![%standalone-include[<productname>PostgreSQL</>]]>
@@ -812,28 +812,19 @@ JAVACMD=$JAVA_HOME/bin/java
812812
</varlistentry>
813813

814814
<varlistentry>
815-
<term><option>--with-krb4<optional>=<replaceable>DIRECTORY</></></option></term>
816-
<term><option>--with-krb5<optional>=<replaceable>DIRECTORY</></></option></term>
815+
<term><option>--with-krb4</option></term>
816+
<term><option>--with-krb5</option></term>
817817
<listitem>
818818
<para>
819819
Build with support for Kerberos authentication. You can use
820-
either Kerberos version 4 or 5, but not both. The
821-
<replaceable>DIRECTORY</> argument specifies the root
822-
directory of the Kerberos installation;
823-
<filename>/usr/athena</> is assumed as default. If the
824-
relevant header files and libraries are not under a common
825-
parent directory, then you must use the
826-
<option>--with-includes</> and <option>--with-libraries</>
827-
options in addition to this option. If, on the other hand,
828-
the required files are in a location that is searched by
829-
default (e.g., <filename>/usr/lib</>), then you can leave off
830-
the argument.
831-
</para>
832-
833-
<para>
834-
<filename>configure</> will check for the required header
835-
files and libraries to make sure that your Kerberos
836-
installation is sufficient before proceeding.
820+
either Kerberos version 4 or 5, but not both. On many
821+
systems, the Kerberos system is not installed in a location
822+
that is searched by default (e.g., <filename>/usr/include</>,
823+
<filename>/usr/lib</>), so you must use the options
824+
<option>--with-includes</> and <option>--with-libraries</> in
825+
addition to this option. <filename>configure</> will check
826+
for the required header files and libraries to make sure that
827+
your Kerberos installation is sufficient before proceeding.
837828
</para>
838829
</listitem>
839830
</varlistentry>
@@ -855,20 +846,15 @@ JAVACMD=$JAVA_HOME/bin/java
855846
<seealso>SSL</seealso>
856847
</indexterm>
857848

858-
<term><option>--with-openssl<optional>=<replaceable>DIRECTORY</></></option></term>
849+
<term><option>--with-openssl</option></term>
859850
<listitem>
860851
<para>
861-
Build with support for <acronym>SSL</> (encrypted) connections.
862-
This requires the <productname>OpenSSL</> package to be installed.
863-
The <replaceable>DIRECTORY</> argument specifies the
864-
root directory of the <productname>OpenSSL</> installation; the
865-
default is <filename>/usr/local/ssl</>.
866-
</para>
867-
868-
<para>
869-
<filename>configure</> will check for the required header
870-
files and libraries to make sure that your <productname>OpenSSL</>
871-
installation is sufficient before proceeding.
852+
Build with support for <acronym>SSL</> (encrypted)
853+
connections. This requires the <productname>OpenSSL</>
854+
package to be installed. <filename>configure</> will check
855+
for the required header files and libraries to make sure that
856+
your <productname>OpenSSL</> installation is sufficient
857+
before proceeding.
872858
</para>
873859
</listitem>
874860
</varlistentry>

0 commit comments

Comments
 (0)