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
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
+)
# 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 $
#
#-------------------------------------------------------------------------
# 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
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.
#
$(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
# 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 $
#
#-------------------------------------------------------------------------
all: $(INFILES)
Makefile.tcldefs:
- ./mkMakefile.tcldefs
+ /bin/sh mkMakefile.tcldefs.sh
#
# Clean
+++ /dev/null
-#!/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