diff options
author | Bruce Momjian | 2001-05-09 19:19:00 +0000 |
---|---|---|
committer | Bruce Momjian | 2001-05-09 19:19:00 +0000 |
commit | 1cb24f15e19e8a495095eec497b5545019617dd9 (patch) | |
tree | b8247db28e55ecb0368a8c94cb469cf05df76827 | |
parent | fa7bb4b9615b1a7af6cafbca0aa339db7219ad7e (diff) |
This patch adds a new configure option --with-pltcl-unknown which
enables pltcl unknown support.
Also it adds substituting of tclsh with tclsh that was by configure in
pltcl_*mod scripts. For example, On freebsd, tclsh can be called
tclsh8.2 or
tclsh8.3 depending on installed version of Tcl.
After patching files
src/pl/tcl/modules/pltcl_listmod
src/pl/tcl/modules/pltcl_loadmod
src/pl/tcl/modules/pltcl_delmod
must be renamed(copied,repocopied) to
src/pl/tcl/modules/pltcl_listmod.in
src/pl/tcl/modules/pltcl_loadmod.in
src/pl/tcl/modules/pltcl_delmod.in
[email protected]
-rw-r--r-- | configure.in | 13 | ||||
-rw-r--r-- | doc/src/sgml/installation.sgml | 9 | ||||
-rw-r--r-- | src/Makefile.global.in | 1 | ||||
-rw-r--r-- | src/pl/tcl/Makefile | 17 | ||||
-rw-r--r--[-rwxr-xr-x] | src/pl/tcl/modules/pltcl_delmod.in (renamed from src/pl/tcl/modules/pltcl_delmod) | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | src/pl/tcl/modules/pltcl_listmod.in (renamed from src/pl/tcl/modules/pltcl_listmod) | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | src/pl/tcl/modules/pltcl_loadmod.in (renamed from src/pl/tcl/modules/pltcl_loadmod) | 2 |
7 files changed, 40 insertions, 6 deletions
diff --git a/configure.in b/configure.in index 8f09195d48..b1e665c0b0 100644 --- a/configure.in +++ b/configure.in @@ -359,6 +359,16 @@ PGAC_ARG_BOOL(with, tcl, no, [ --with-tcl build Tcl and Tk interfa AC_MSG_RESULT([$with_tcl]) AC_SUBST([with_tcl]) +# If Tcl is enabled (above) then check for pltcl_unknown_support +AC_MSG_CHECKING([whether to build with pl/tcl unknown support]) +if test "$with_tcl" = yes; then + PGAC_ARG_BOOL(with, pltcl_unknown, no, [ --with-pltcl-unknown build pl/tcl unknown support if Tcl is enabled]) +else + with_pltcl_unknown=no +fi +AC_MSG_RESULT([$with_pltcl_unknown]) +AC_SUBST([with_pltcl_unknown]) + # If Tcl is enabled (above) then Tk is also, unless the user disables it using --without-tk AC_MSG_CHECKING([whether to build with Tk]) if test "$with_tcl" = yes; then @@ -1165,6 +1175,9 @@ AC_OUTPUT( src/GNUmakefile src/Makefile.global src/backend/port/Makefile + src/pl/tcl/modules/pltcl_listmod + src/pl/tcl/modules/pltcl_loadmod + src/pl/tcl/modules/pltcl_delmod ], [ # Update timestamp for config.h (see Makefile.global) diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml index ea57d45448..4e7987985f 100644 --- a/doc/src/sgml/installation.sgml +++ b/doc/src/sgml/installation.sgml @@ -588,6 +588,15 @@ su - postgres </varlistentry> <varlistentry> + <term>--with-pltcl-unknown</term> + <listitem> + <para> + Enables enables PL/Tcl unknown support. + </para> + </listitem> + </varlistentry> + + <varlistentry> <term>--enable-odbc</term> <listitem> <para> diff --git a/src/Makefile.global.in b/src/Makefile.global.in index 8e3c4baaf8..486a13a02a 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -111,6 +111,7 @@ with_java = @with_java@ with_perl = @with_perl@ with_python = @with_python@ with_tcl = @with_tcl@ +with_pltcl_unknown = @with_pltcl_unknown@ with_tk = @with_tk@ enable_odbc = @enable_odbc@ MULTIBYTE = @MULTIBYTE@ diff --git a/src/pl/tcl/Makefile b/src/pl/tcl/Makefile index 879267772e..f6d070775e 100644 --- a/src/pl/tcl/Makefile +++ b/src/pl/tcl/Makefile @@ -70,8 +70,9 @@ override CFLAGS = $(TCL_CFLAGS_OPTIMIZE) $(TCL_SHLIB_CFLAGS) # first of all calls to the call handler. See the doc in the modules # directory about details. -#override CPPFLAGS+= -DPLTCL_UNKNOWN_SUPPORT - +ifeq ($(with_pltcl_unknown), yes) +override CPPFLAGS+= -DPLTCL_UNKNOWN_SUPPORT +endif # # DLOBJS is the dynamically-loaded object file. @@ -98,6 +99,16 @@ pltcl$(DLSUFFIX): pltcl.o install: all installdirs $(INSTALL_SHLIB) $(DLOBJS) $(DESTDIR)$(libdir)/$(DLOBJS) +ifeq ($(with_pltcl_unknown), yes) + $(INSTALL_SCRIPT) modules/pltcl_loadmod \ + $(DESTDIR)$(bindir)/pltcl_loadmod + $(INSTALL_SCRIPT) modules/pltcl_delmod \ + $(DESTDIR)$(bindir)/pltcl_delmod + $(INSTALL_SCRIPT) modules/pltcl_listmod \ + $(DESTDIR)$(bindir)/pltcl_listmod + $(INSTALL_DATA) modules/unknown.pltcl \ + $(DESTDIR)$(datadir)/unknown.pltcl +endif installdirs: $(mkinstalldirs) $(DESTDIR)$(libdir) @@ -117,4 +128,4 @@ Makefile.tcldefs: mkMakefile.tcldefs.sh $(SHELL) $< '$(TCL_CONFIG_SH)' '$@' clean distclean maintainer-clean: - rm -f $(INFILES) pltcl.o Makefile.tcldefs + rm -f $(INFILES) pltcl.o Makefile.tcldefs modules/pltcl_listmod modules/pltcl_loadmod modules/pltcl_delmod diff --git a/src/pl/tcl/modules/pltcl_delmod b/src/pl/tcl/modules/pltcl_delmod.in index 79be7e5859..5bb89be528 100755..100644 --- a/src/pl/tcl/modules/pltcl_delmod +++ b/src/pl/tcl/modules/pltcl_delmod.in @@ -1,6 +1,6 @@ #!/bin/sh # Start tclsh \ -exec tclsh "$0" $@ +exec @TCLSH@ "$0" $@ # # Code still has to be documented diff --git a/src/pl/tcl/modules/pltcl_listmod b/src/pl/tcl/modules/pltcl_listmod.in index 92de363d72..4882044032 100755..100644 --- a/src/pl/tcl/modules/pltcl_listmod +++ b/src/pl/tcl/modules/pltcl_listmod.in @@ -1,6 +1,6 @@ #!/bin/sh # Start tclsh \ -exec tclsh "$0" $@ +exec @TCLSH@ "$0" $@ # # Code still has to be documented diff --git a/src/pl/tcl/modules/pltcl_loadmod b/src/pl/tcl/modules/pltcl_loadmod.in index 615dc1c755..150b8d39d4 100755..100644 --- a/src/pl/tcl/modules/pltcl_loadmod +++ b/src/pl/tcl/modules/pltcl_loadmod.in @@ -1,6 +1,6 @@ #!/bin/sh # Start tclsh \ -exec tclsh "$0" $@ +exec @TCLSH@ "$0" $@ # # Code still has to be documented |