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

Commit 5085132

Browse files
committed
Fix configure to generate correct expansion of library directory
in pl/plpgsql/src/mklang.sql.
1 parent a9bd936 commit 5085132

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

src/configure

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7052,6 +7052,15 @@ fi
70527052

70537053
fi
70547054

7055+
7056+
test "x$prefix" = xNONE && prefix=$ac_default_prefix
7057+
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7058+
7059+
eval expanded_libdir="$libdir"
7060+
eval expanded_libdir="$expanded_libdir"
7061+
7062+
7063+
70557064
trap '' 1 2 15
70567065
cat > confcache <<\EOF
70577066
# This file is a shell script that caches the results of configure
@@ -7282,6 +7291,7 @@ s%@X_PRE_LIBS@%$X_PRE_LIBS%g
72827291
s%@X_LIBS@%$X_LIBS%g
72837292
s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
72847293
s%@X11_LIBS@%$X11_LIBS%g
7294+
s%@expanded_libdir@%$expanded_libdir%g
72857295
72867296
CEOF
72877297
EOF

src/configure.in

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,6 +1138,26 @@ then
11381138
AC_SUBST(USE_ODBC)
11391139
fi
11401140

1141+
dnl Output files that are neither makefiles nor shell scripts probably
1142+
dnl need fully-expanded substitutions, rather than partial expansions
1143+
dnl that include references to other variables. Currently the only
1144+
dnl such item that's needed is an expanded version of libdir, but
1145+
dnl others may be needed someday. NOTE: 'eval' technique only copes
1146+
dnl with one level of indirect reference per expansion; two levels is
1147+
dnl currently enough for libdir, but it's ugly...
1148+
1149+
dnl First we have to force 'NONE' prefix to be expanded itself.
1150+
dnl For some reason, autoconf 2.13 doesn't do this until AC_OUTPUT,
1151+
dnl which is too late...
1152+
test "x$prefix" = xNONE && prefix=$ac_default_prefix
1153+
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1154+
1155+
eval expanded_libdir="$libdir"
1156+
eval expanded_libdir="$expanded_libdir"
1157+
AC_SUBST(expanded_libdir)
1158+
1159+
dnl Finally ready to produce output files ...
1160+
11411161
AC_OUTPUT(
11421162
GNUmakefile
11431163
Makefile.global

src/pl/plpgsql/src/mklang.sql.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
--
22
-- PL/pgSQL language declaration
33
--
4-
-- $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Attic/mklang.sql.in,v 1.3 1999/05/11 03:30:41 momjian Exp $
4+
-- $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Attic/mklang.sql.in,v 1.4 1999/05/11 22:57:50 tgl Exp $
55
--
66

77
create function plpgsql_call_handler() returns opaque
8-
as '@libdir@/plpgsql.so'
8+
as '@expanded_libdir@/plpgsql@DLSUFFIX@'
99
language 'C';
1010

1111
create trusted procedural language 'plpgsql'

0 commit comments

Comments
 (0)