aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/configure.in43
-rw-r--r--src/pl/plpgsql/src/Makefile.in (renamed from src/pl/plpgsql/src/Makefile)55
-rw-r--r--src/pl/tcl/Makefile4
-rwxr-xr-xsrc/pl/tcl/mkMakefile.tcldefs25
4 files changed, 95 insertions, 32 deletions
diff --git a/src/configure.in b/src/configure.in
index bf72426de32..6c982efa498 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -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
+)
diff --git a/src/pl/plpgsql/src/Makefile b/src/pl/plpgsql/src/Makefile.in
index 19adfa126ff..95cdc6d13fc 100644
--- a/src/pl/plpgsql/src/Makefile
+++ b/src/pl/plpgsql/src/Makefile.in
@@ -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
diff --git a/src/pl/tcl/Makefile b/src/pl/tcl/Makefile
index c1768e82abd..781ccdd39de 100644
--- a/src/pl/tcl/Makefile
+++ b/src/pl/tcl/Makefile
@@ -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
diff --git a/src/pl/tcl/mkMakefile.tcldefs b/src/pl/tcl/mkMakefile.tcldefs
deleted file mode 100755
index 9881d6bf99e..00000000000
--- a/src/pl/tcl/mkMakefile.tcldefs
+++ /dev/null
@@ -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