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

Commit a8b9cbf

Browse files
committed
Make DEF_PGPORT available to Makefiles, so it can be substituted into
scripts like pgaccess.
1 parent 5add3e8 commit a8b9cbf

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

configure

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,8 @@ if test x"${with_pgport+set}" = xset; then
976976
else
977977
default_port=5432
978978
fi
979-
# Need both of these because backend wants an integer and frontend a string
979+
echo "$ac_t""$default_port" 1>&6
980+
# Need both of these because some places want an integer and some a string
980981
cat >> confdefs.h <<EOF
981982
#define DEF_PGPORT ${default_port}
982983
EOF
@@ -985,7 +986,6 @@ cat >> confdefs.h <<EOF
985986
#define DEF_PGPORT_STR "${default_port}"
986987
EOF
987988

988-
echo "$ac_t""$default_port" 1>&6
989989

990990

991991
#
@@ -7903,6 +7903,7 @@ s%@host_os@%$host_os%g
79037903
s%@PORTNAME@%$PORTNAME%g
79047904
s%@TAS@%$TAS%g
79057905
s%@MULTIBYTE@%$MULTIBYTE%g
7906+
s%@default_port@%$default_port%g
79067907
s%@enable_shared@%$enable_shared%g
79077908
s%@enable_rpath@%$enable_rpath%g
79087909
s%@CC@%$CC%g

configure.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,11 @@ AC_MSG_CHECKING([for default port number])
223223
PGAC_ARG_REQ(with, pgport, [ --with-pgport=PORTNUM change default port number [5432]],
224224
[default_port=$withval],
225225
[default_port=5432])
226-
# Need both of these because backend wants an integer and frontend a string
226+
AC_MSG_RESULT([$default_port])
227+
# Need both of these because some places want an integer and some a string
227228
AC_DEFINE_UNQUOTED(DEF_PGPORT, ${default_port})
228229
AC_DEFINE_UNQUOTED(DEF_PGPORT_STR, "${default_port}")
229-
AC_MSG_RESULT([$default_port])
230-
230+
AC_SUBST(default_port)
231231

232232
#
233233
# Maximum number of allowed connections (--with-maxbackends), default 32

src/Makefile.global.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*-makefile-*-
2-
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.117 2001/01/20 22:56:33 tgl Exp $
2+
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.118 2001/02/07 20:13:27 tgl Exp $
33

44
#------------------------------------------------------------------------------
55
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -200,6 +200,10 @@ JADE = @JADE@
200200
NSGMLS = @NSGMLS@
201201
SGMLSPL = @SGMLSPL@
202202

203+
# Feature settings
204+
205+
DEF_PGPORT = @default_port@
206+
203207

204208
##########################################################################
205209
#

0 commit comments

Comments
 (0)