I have had a few problems with the PL stuff recently committed. The

following patches fix the problems (i.e., all regression tests pass)
in what I hope to be a platform-independent fashion.  The accomplish
the following:

Brook Milligan
This commit is contained in:
Bruce Momjian 1998-10-08 23:45:19 +00:00
parent 60fee725b8
commit 23815260a3
4 changed files with 95 additions and 32 deletions

View File

@ -799,6 +799,30 @@ if test "$USE_TCL" = "true"; then
AC_SUBST(TCL_LIB)
fi
dnl Check for Tcl configuration script tclConfig.sh
if test "$USE_TCL"; then
AC_MSG_CHECKING(for tclConfig.sh)
library_dirs="/usr/lib $LIBRARY_DIRS"
TCL_CONFIG_SH=
for dir in $library_dirs; do
for tcl_dir in $tcl_dirs; do
if test -z "$TCL_CONFIG_SH"; then
if test -d "$dir/$tcl_dir" -a -r "$dir/$tcl_dir/tclConfig.sh"; then
TCL_CONFIG_SH=$dir/$tcl_dir/tclConfig.sh
fi
fi
done
done
if test -z "$TCL_CONFIG_SH"; then
AC_MSG_RESULT(no)
AC_MSG_WARN(tcl support disabled; Tcl configuration script missing)
USE_TCL=
else
AC_MSG_RESULT($TCL_CONFIG_SH)
AC_SUBST(TCL_CONFIG_SH)
fi
fi
dnl Check for location of Tk support (only if Tcl used)
dnl Disable Tcl support if Tk not found
@ -883,4 +907,21 @@ fi
AC_CONFIG_HEADER(interfaces/odbc/config.h)
AC_OUTPUT(GNUmakefile Makefile.global backend/port/Makefile bin/pg_version/Makefile bin/psql/Makefile bin/pg_dump/Makefile backend/utils/Gen_fmgrtab.sh interfaces/libpq/Makefile interfaces/libpq++/Makefile interfaces/libpgtcl/Makefile interfaces/ecpg/lib/Makefile include/version.h interfaces/odbc/Makefile.global interfaces/odbc/GNUmakefile)
AC_OUTPUT(
GNUmakefile
Makefile.global
backend/port/Makefile
backend/utils/Gen_fmgrtab.sh
bin/pg_dump/Makefile
bin/pg_version/Makefile
bin/psql/Makefile
include/version.h
interfaces/ecpg/lib/Makefile
interfaces/libpgtcl/Makefile
interfaces/libpq++/Makefile
interfaces/libpq/Makefile
interfaces/odbc/GNUmakefile
interfaces/odbc/Makefile.global
pl/plpgsql/src/Makefile
pl/tcl/mkMakefile.tcldefs.sh
)

View File

@ -4,7 +4,7 @@
# Makefile for the plpgsql shared object
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.1 1998/09/25 15:50:02 momjian Exp $
# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Attic/Makefile.in,v 1.1 1998/10/08 23:45:17 momjian Exp $
#
#-------------------------------------------------------------------------
@ -17,7 +17,8 @@ SRCDIR= ../../..
# Include the global and port specific Makefiles
#
include $(SRCDIR)/Makefile.global
include $(SRCDIR)/Makefile.port
PORTNAME=@PORTNAME@
CFLAGS+= -I$(LIBPQDIR) -I$(SRCDIR)/include
LFLAGS+= -i -l
@ -27,6 +28,53 @@ CFLAGS+= -I$(SRCDIR)/backend
LDADD+= -L$(LIBPQDIR) -lpq
ifeq ($(PORTNAME), linux)
CFLAGS += $(CFLAGS_SL)
LDFLAGS_SL = -shared
endif
ifeq ($(PORTNAME), bsd)
ifdef BSD_SHLIB
LDFLAGS_SL = -x -Bshareable -Bforcearchive
CFLAGS += $(CFLAGS_SL)
endif
endif
ifeq ($(PORTNAME), bsdi)
ifdef BSD_SHLIB
ifeq ($(LDSUFFIX), .so)
LD := shlicc
LDFLAGS_SL += -O -shared
CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(LDSUFFIX), .o)
LD := shlicc
LDFLAGS_SL += -O -r
CFLAGS += $(CFLAGS_SL)
endif
endif
endif
ifeq ($(PORTNAME), solaris)
LDFLAGS_SL := -G -z text
CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), unixware)
LDFLAGS_SL := -G -z text
CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), univel)
LDFLAGS_SL := -G -z text
CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), hpux)
LDFLAGS_SL := -b
CFLAGS += $(CFLAGS_SL)
endif
#
# DLOBJ is the dynamically-loaded object file.
#
@ -54,9 +102,8 @@ install: all
$(INSTALL) $(INSTL_LIB_OPTS) $(DLOBJ) $(DESTDIR)$(LIBDIR)/$(DLOBJ)
$(DLOBJ): $(OBJS)
$(CC) -shared -o $@ $(OBJS)
$(LD) $(LDFLAGS_SL) -o $@ $(OBJS)
# $(LD) $(LDFLAGS_SL) -o $@ $(OBJS)
pl_handler.o: pl_handler.c plpgsql.h pl.tab.h

View File

@ -4,7 +4,7 @@
# Makefile for the pltcl shared object
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.5 1998/04/06 16:53:15 momjian Exp $
# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.6 1998/10/08 23:45:18 momjian Exp $
#
#-------------------------------------------------------------------------
@ -77,7 +77,7 @@ endif
all: $(INFILES)
Makefile.tcldefs:
./mkMakefile.tcldefs
/bin/sh mkMakefile.tcldefs.sh
#
# Clean

View File

@ -1,25 +0,0 @@
#!/bin/sh
if [ -f ./tclConfig.sh ]; then
. ./tclConfig.sh
else
if [ -f /usr/lib/tclConfig.sh ]; then
echo "using tclConfig.sh from /usr/lib"
. /usr/lib/tclConfig.sh
elif [ -f /usr/contrib/lib/tclConfig.sh ]; then
echo "using tclConfig.sh from /usr/contrib/lib"
. /usr/contrib/lib/tclConfig.sh
else
if [ -f /usr/local/lib/tclConfig.sh ]; then
echo "using tclConfig.sh from /usr/local/lib"
. /usr/local/lib/tclConfig.sh
else
echo "tclConfig.sh not found in /usr/lib, /usr/contrib/lib, or /usr/local/lib"
echo "I need this file! Please make a symbolic link to this file"
echo "and start make again."
exit 1
fi
fi
fi
set | grep '^TCL' >Makefile.tcldefs
exit 0