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

Commit1652d43

Browse files
committed
Remove fmgrstamp-h business -- not needed and confusing
Add options to configure to automatically build for Kerberossupport; no more editing of make files.
1 parentb36d310 commit1652d43

File tree

23 files changed

+1055
-678
lines changed

23 files changed

+1055
-678
lines changed

‎configure

Lines changed: 881 additions & 485 deletions
Large diffs are not rendered by default.

‎configure.in

Lines changed: 128 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -149,30 +149,31 @@ sed 's/^\([A-Za-z_]*\):\(.*\)$/\1="\2"/' "src/template/$TEMPLATE" >conftest.sh
149149
rm -f conftest.sh
150150
]
151151

152+
dnl
153+
dnl Add non-standard directories to the include path
154+
dnl
155+
AC_ARG_WITH(includes, [ --with-includes=DIRS add non-standard include paths],
156+
[if test x"$withval" = x"yes" || test x"$withval" = x"no" ; then
157+
AC_MSG_ERROR([You must supply an argument to the --with-includes option.])
158+
fi])
159+
160+
# SRCH_INC comes from the template file
161+
ac_save_IFS=$IFS
162+
IFS=':'
163+
for dir in $with_includes $SRCH_INC; do
164+
if test -d "$dir"; then
165+
INCLUDES="$INCLUDES -I$dir"
166+
else
167+
AC_MSG_WARN([*** Include directory $dir does not exist.])
168+
fi
169+
done
170+
IFS=$ac_save_IFS
171+
AC_SUBST(INCLUDES)
152172

153-
AC_ARG_WITH(includes,
154-
[ --with-includes=DIRS look for header files for tcl/tk, etc in DIRS],
155-
[
156-
case "$withval" in
157-
"" | y | ye | yes | n | no)
158-
AC_MSG_ERROR([*** You must supply an argument to the --with-includes option.])
159-
;;
160-
esac
161-
INCLUDE_DIRS="$withval"
162-
])
163-
164-
dnl INCLUDE_DIRS comes from command line, SRCH_INC from template file.
165-
dnl Each can name one or more directories.
166-
if test "$INCLUDE_DIRS" -o "$SRCH_INC"; then
167-
for dir in $INCLUDE_DIRS $SRCH_INC; do
168-
if test -d "$dir"; then
169-
PGSQL_INCLUDES="$PGSQL_INCLUDES -I$dir"
170-
else
171-
AC_MSG_WARN([*** Include directory $dir does not exist.])
172-
fi
173-
done
174-
fi
175173

174+
dnl
175+
dnl Add non-standard directories to the library search path
176+
dnl
176177
AC_ARG_WITH(libraries,
177178
[ --with-libraries=DIRS look for additional libraries in DIRS],
178179
[
@@ -394,6 +395,108 @@ fi],
394395
[AC_MSG_RESULT(no)])
395396
AC_SUBST(with_python)
396397

398+
399+
dnl
400+
dnl Optionally build with Kerberos 4 support
401+
dnl
402+
AC_MSG_CHECKING(whether to build with Kerberos 4 support)
403+
AC_ARG_WITH(krb4, [ --with-krb4[=DIR] use Kerberos 4 [/usr/athena]],
404+
[if test x"$withval" != x"no"; then
405+
# If the user didn't give an argument, we take the Kerberos 4 default
406+
# path /usr/athena. We look into lib/ and include/ for the Kerberos
407+
# libraries and includes. If the user has a more complicated layout
408+
# he can use --with-includes and --with-libraries.
409+
if test x"$withval" = x"yes"; then
410+
krb4dir=/usr/athena
411+
else
412+
krb4dir=$withval
413+
fi
414+
with_krb4=yes
415+
AC_MSG_RESULT(yes)
416+
if test -d $krb4dir; then
417+
if test -d "$krb4dir/include"; then
418+
INCLUDES="$INCLUDES -I$krb4dir/include"
419+
fi
420+
if test -d "$krb4dir/lib"; then
421+
krb_libdir="-L$krb4dir/lib"
422+
LIBS="$krb_libdir $LIBS"
423+
fi
424+
fi
425+
AC_CHECK_LIB(des, main, [], [AC_MSG_ERROR([library \`des' is required for Kerberos 4])])
426+
AC_CHECK_LIB(krb, main, [], [AC_MSG_ERROR([library \`krb' is required for Kerberos 4])])
427+
KRB_LIBS="$krb_libdir -lkrb -ldes"
428+
AC_DEFINE(KRB4,, [Define if you are building with Kerberos 4 support.])
429+
else
430+
AC_MSG_RESULT(no)
431+
fi],
432+
[AC_MSG_RESULT(no)])
433+
AC_SUBST(with_krb4)
434+
435+
436+
dnl
437+
dnl Optionally build with Kerberos 5 support
438+
dnl
439+
AC_MSG_CHECKING(whether to build with Kerberos 5 support)
440+
AC_ARG_WITH(krb5, [ --with-krb5[=DIR] use Kerberos 5 [/usr/athena]],
441+
[if test x"$withval" != x"no"; then
442+
if test x"$withval" = x"yes"; then
443+
krb5dir=/usr/athena
444+
else
445+
krb5dir=$withval
446+
fi
447+
with_krb5=yes
448+
AC_MSG_RESULT(yes)
449+
if test -d $krb5dir; then
450+
if test -d "$krb5dir/include"; then
451+
INCLUDES="$INCLUDES -I$krb5dir/include"
452+
fi
453+
if test -d "$krb5dir/lib"; then
454+
krb_libdir="-L$krb5dir/lib"
455+
LIBS="$krb_libdir $LIBS"
456+
fi
457+
fi
458+
AC_CHECK_LIB(com_err, main, [], [AC_MSG_ERROR([library \`com_err' is required for Kerberos 5])])
459+
AC_CHECK_LIB(crypto, main, [], [AC_MSG_ERROR([library \`crypto' is required for Kerberos 5])])
460+
AC_CHECK_LIB(krb5, main, [], [AC_MSG_ERROR([library \`krb5' is required for Kerberos 5])])
461+
KRB_LIBS="$krb_libdir -lkrb5 -lcrypto -lcom_err"
462+
AC_DEFINE(KRB5,, [Define if you are building with Kerberos 5 support.])
463+
else
464+
AC_MSG_RESULT(no)
465+
fi],
466+
[AC_MSG_RESULT(no)])
467+
AC_SUBST(with_krb5)
468+
469+
dnl Necessary for special libpq link
470+
AC_SUBST(KRB_LIBS)
471+
472+
473+
dnl
474+
dnl Kerberos configuration parameters
475+
dnl
476+
AC_ARG_WITH(krb-srvnam, [ --with-krb-srvnam=NAME name of the Postgres service principal in Kerberos],
477+
[if test x"$withval" = x"yes"; then
478+
AC_MSG_ERROR([argument required for --with-krb-srvnam])
479+
else
480+
krb_srvnam=$withval
481+
fi],
482+
[krb_srvnam="postgres"])
483+
AC_DEFINE_UNQUOTED(PG_KRB_SRVNAM, ["$krb_srvnam"], [The name of the Postgres service principal])
484+
485+
AC_ARG_WITH(krb-srvtab, [ --with-krb-srvtab=FILE location of Kerberos server's keytab file],
486+
[if test x"$withval" = x"yes"; then
487+
AC_MSG_ERROR([argument required for --with-krb-srvtab])
488+
else
489+
krb_srvtab=$withval
490+
fi],
491+
[if test x"$with_krb5" = x"yes"; then
492+
krb_srvtab="FILE:/usr/local/postgres/krb5.keytab"
493+
else
494+
krb_srvtab="/etc/srvtab"
495+
fi])
496+
AC_DEFINE_UNQUOTED(PG_KRB_SRVTAB, ["$krb_srvtab"], [The location of the Kerberos server's keytab file])
497+
498+
499+
397500
dnl We include odbc support unless we disable it with --with-odbc=false
398501
AC_MSG_CHECKING(setting USE_ODBC)
399502
AC_ARG_WITH(
@@ -467,7 +570,7 @@ then
467570
unixODBC_libs="$unixODBC/lib"
468571
unixODBC_includes="$unixODBC/include"
469572

470-
CPPFLAGS="$CPPFLAGS -I$unixODBC_includes"
573+
INCLUDES="$INCLUDES -I$unixODBC_includes"
471574
AC_CHECK_HEADERS(sql.h sqlext.h odbcinst.h,
472575
unixODBC_ok=yes;
473576
odbc_headers="$odbc_headers $ac_hdr",
@@ -499,7 +602,7 @@ AC_ARG_ENABLE(
499602
AC_MSG_RESULT(disabled)
500603
)
501604

502-
CPPFLAGS="$CPPFLAGS $PGSQL_INCLUDES"
605+
CPPFLAGS="$CPPFLAGS $INCLUDES"
503606
echo "- setting CPPFLAGS=$CPPFLAGS"
504607

505608
LDFLAGS="$LDFLAGS $PGSQL_LDFLAGS"
@@ -547,8 +650,6 @@ AC_SUBST(PORTNAME)
547650
AC_SUBST(CPU)
548651
AC_SUBST(SRCDIR)
549652
AC_SUBST(LDFLAGS)
550-
AC_SUBST(CPPFLAGS)
551-
AC_SUBST(PGSQL_INCLUDES)
552653
AC_SUBST(AROPT)
553654
AC_SUBST(SHARED_LIB)
554655
AC_SUBST(CFLAGS)
@@ -636,10 +737,7 @@ AC_SUBST(YFLAGS)
636737

637738

638739
AC_CHECK_LIB(sfio, main)
639-
for curses in ncurses curses ; do
640-
AC_CHECK_LIB(${curses}, main,
641-
[LIBS="-l${curses} $LIBS"; break])
642-
done
740+
AC_CHECK_LIB(ncurses, main, [], [AC_CHECK_LIB(curses, main)])
643741
AC_CHECK_LIB(termcap, main)
644742
AC_CHECK_LIB(readline, main)
645743
AC_CHECK_LIB(readline, using_history, AC_DEFINE(HAVE_HISTORY_IN_READLINE),

‎src/Makefile.global.in

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.78 2000/06/15 18:55:34 momjian Exp $
10+
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.79 2000/06/17 00:09:31 petere Exp $
1111
#
1212
# NOTES
1313
# Essentially all Postgres make files include this file and use the
@@ -108,39 +108,6 @@ ENFORCE_ALIGNMENT= true
108108
# Comment out PROFILE to generate a profile version of the binaries
109109
#PROFILE= -p -non_shared
110110

111-
# If you plan to use Kerberos for authentication...
112-
#
113-
# Comment out KRBVERS if you do not use Kerberos.
114-
# Set KRBVERS to "4" for Kerberos v4, "5" for Kerberos v5.
115-
# XXX Edit the default Kerberos variables below!
116-
#
117-
#KRBVERS=5
118-
119-
# Globally pass Kerberos file locations.
120-
# these are used in the postmaster and all libpq applications.
121-
#
122-
# Adjust KRBINCS and KRBLIBS to reflect where you have Kerberos
123-
# include files and libraries installed.
124-
# PG_KRB_SRVNAM is the name under which POSTGRES is registered in
125-
# the Kerberos database (KDC).
126-
# PG_KRB_SRVTAB is the location of the server's keytab file.
127-
#
128-
ifdef KRBVERS
129-
KRBINCS= -I/usr/krb5/include
130-
KRBLIBS= -L/usr/krb5/lib
131-
KRBFLAGS+= $(KRBINCS) -DPG_KRB_SRVNAM='"postgres"'
132-
ifeq ($(KRBVERS), 4)
133-
KRBFLAGS+= -DKRB4
134-
KRBFLAGS+= -DPG_KRB_SRVTAB='"/etc/srvtab"'
135-
KRBLIBS+= -lkrb -ldes
136-
else
137-
ifeq ($(KRBVERS), 5)
138-
KRBFLAGS+= -DKRB5
139-
KRBFLAGS+= -DPG_KRB_SRVTAB='"FILE:/usr/local/postgres/krb5.keytab"'
140-
KRBLIBS+= -lkrb5 -lcrypto -lcom_err
141-
endif
142-
endif
143-
endif
144111

145112
#
146113
# Please do not edit USE_TCL and USE_TK by hand.
@@ -179,11 +146,12 @@ YACC= @YACC@
179146
YFLAGS = @YFLAGS@
180147
LEX= @LEX@
181148
AROPT= @AROPT@
182-
CFLAGS= -I$(SRCDIR)/include @CPPFLAGS@ @CFLAGS@
149+
CPPFLAGS = @CPPFLAGS@
150+
CFLAGS = -I$(SRCDIR)/include $(CPPFLAGS) @CFLAGS@
183151
CFLAGS_SL= @SHARED_LIB@
184-
PGSQL_INCLUDES= @PGSQL_INCLUDES@
185152
LIBS= @LIBS@
186153
LDFLAGS= @LDFLAGS@ $(LIBS)
154+
KRB_LIBS = @KRB_LIBS@
187155
LDREL= -r
188156
LDOUT= -o
189157
DLSUFFIX= @DLSUFFIX@

‎src/backend/Makefile

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#
3535
#
3636
# IDENTIFICATION
37-
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.54 2000/06/05 07:16:12 tgl Exp $
37+
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.55 2000/06/17 00:09:34 petere Exp $
3838
#
3939
#-------------------------------------------------------------------------
4040

@@ -59,13 +59,6 @@ endif
5959

6060
VERSIONOBJ =$(SRCDIR)/utils/version.o
6161

62-
# kerberos flags
63-
64-
ifdefKRBVERS
65-
CFLAGS+=$(KRBFLAGS)
66-
LDFLAGS+=$(KRBLIBS)
67-
endif
68-
6962
ifeq ($(MAKE_DLL), true)
7063
DLLOBJS=$(OBJS)$(VERSIONOBJ)
7164
DLLLIBS= -L/usr/local/lib -lcygipc -lcrypt -lcygwin -lkernel32
@@ -303,5 +296,5 @@ $(IDFILE):
303296
#make foo.C
304297
#
305298
%.cpp:%.c
306-
$(CC) -E$(CFLAGS)$(<:.C=.c)| cat -s| cb| tr -s'\012*''\012'\
299+
$(CC) -E$(CPPFLAGS)$(<:.C=.c)| cat -s| cb| tr -s'\012*''\012'\
307300
>$(@F)

‎src/backend/libpq/Makefile

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,13 @@
44
# Makefile for libpq subsystem (backend half of libpq interface)
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/libpq/Makefile,v 1.19 2000/05/29 05:44:46 tgl Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/libpq/Makefile,v 1.20 2000/06/17 00:09:40 petere Exp $
88
#
99
#-------------------------------------------------------------------------
1010

1111
SRCDIR = ../..
1212
include ../../Makefile.global
1313

14-
# kerberos flags
15-
ifdefKRBVERS
16-
CFLAGS+=$(KRBFLAGS)
17-
LDFLAGS+=$(KRBLIBS)
18-
endif
19-
2014
OBJS = be-dumpdata.o be-fsstubs.o be-pqexec.o portal.o portalbuf.o\
2115
auth.o hba.o crypt.o password.o\
2216
pqcomm.o pqformat.o pqpacket.o pqsignal.o util.o

‎src/backend/utils/Makefile

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Makefile for utils
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/utils/Makefile,v 1.14 2000/06/09 02:38:36 tgl Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/utils/Makefile,v 1.15 2000/06/17 00:09:43 petere Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -32,25 +32,13 @@ SUBSYS.o: $(OBJS)
3232
submake:
3333
foriin$(DIRS);do$(MAKE) -C$$i SUBSYS.o;done
3434

35-
# Gen_fmgrtab.sh will not change the timestamp of its output files
36-
# if they already exist and would not be changed. This is to avoid
37-
# unnecessary recompilations. In order to avoid re-running it all
38-
# the time we update a stamp file instead. (Idea stolen from
39-
# autoconf and autoheader.)
4035

41-
fmgroids.hfmgrtab.c: fmgrstamp-h
42-
43-
fmgrstamp-h: Gen_fmgrtab.sh$(SRCDIR)/include/catalog/pg_proc.h
36+
fmgroids.hfmgrtab.c: Gen_fmgrtab.sh$(SRCDIR)/include/catalog/pg_proc.h
4437
$(SHELL)$(SHOPTS) Gen_fmgrtab.sh$(SRCDIR)/include/catalog/pg_proc.h
45-
date> fmgrstamp-h
4638

47-
# don't clean fmgroids.h and fmgrtab.c, but do clean fmgrstamp-h
48-
# (we don't really want to put that much trust in timestamps in
49-
# distribution files and CVS pulls, so force at least one run of
50-
# Gen_fmgrtab.sh after a make clean)
5139

5240
clean:
53-
rm -f SUBSYS.o fmgrtab.ofmgrstamp-h
41+
rm -f SUBSYS.o fmgrtab.ofmgroids.h fmgrtab.c
5442
foriin$(DIRS);do$(MAKE) -C$$i clean;done
5543

5644
depdepend: fmgroids.h fmgrtab.c

‎src/bin/pg_dump/Makefile.in

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/Makefile.in,v 1.13 2000/05/11 17:46:32 momjian Exp $
10+
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/Makefile.in,v 1.14 2000/06/17 00:09:44 petere Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -18,13 +18,6 @@ OBJS= pg_dump.o common.o @STRDUP@
1818

1919
CFLAGS+= -I$(LIBPQDIR)
2020

21-
#
22-
# And where libpq goes, so goes the authentication stuff...
23-
#
24-
ifdefKRBVERS
25-
LDFLAGS+=$(KRBLIBS)
26-
CFLAGS+=$(KRBFLAGS)
27-
endif
2821

2922
all: submake pg_dump
3023

‎src/bin/pgtclsh/Makefile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.26 2000/06/12 02:23:47momjian Exp $
10+
# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.27 2000/06/17 00:09:47petere Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -24,10 +24,6 @@ endif
2424

2525
CFLAGS+=$(X_CFLAGS) -I$(LIBPGTCLDIR)
2626

27-
ifdefKRBVERS
28-
LDFLAGS+=$(KRBLIBS)
29-
CFLAGS+=$(KRBFLAGS)
30-
endif
3127

3228
# If we are here then TCL is available
3329
PGMS = pgtclsh

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp