]> granicus.if.org Git - postgresql/commitdiff
This patch adds a new configure option --with-pltcl-unknown which
authorBruce Momjian <bruce@momjian.us>
Wed, 9 May 2001 19:19:00 +0000 (19:19 +0000)
committerBruce Momjian <bruce@momjian.us>
Wed, 9 May 2001 19:19:00 +0000 (19:19 +0000)
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

seva@sevasoft.kiev.ua

configure.in
doc/src/sgml/installation.sgml
src/Makefile.global.in
src/pl/tcl/Makefile
src/pl/tcl/modules/pltcl_delmod.in [moved from src/pl/tcl/modules/pltcl_delmod with 99% similarity, mode: 0644]
src/pl/tcl/modules/pltcl_listmod.in [moved from src/pl/tcl/modules/pltcl_listmod with 99% similarity, mode: 0644]
src/pl/tcl/modules/pltcl_loadmod.in [moved from src/pl/tcl/modules/pltcl_loadmod with 99% similarity, mode: 0644]

index 8f09195d483908954accbae1fa1b5b1d626d21c0..b1e665c0b048bca85a5ed6329512b4e3bc180462 100644 (file)
@@ -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)
index 31c9a1054785ce935eb03c523ba5c066a1eb9736..afae1e600c62f2bc8f19c57b1e56e0386f32d498 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.45 2001/04/06 15:52:41 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.46 2001/05/09 19:19:00 momjian Exp $ -->
 
 <chapter id="installation">
  <title><![%flattext-install-include[<productname>PostgreSQL</>]]>
@@ -587,6 +587,15 @@ su - postgres
        </listitem>
       </varlistentry>
 
+      <varlistentry>
+       <term>--with-pltcl-unknown</term>
+       <listitem>
+        <para>
+         Enables enables PL/Tcl unknown support.
+        </para>
+       </listitem>
+      </varlistentry>
+
       <varlistentry>
        <term>--enable-odbc</term>
        <listitem>
index 007857eaf739ef8d57ae1c1424d59bfd00d2b37c..f21239364fd4f77bd00d6be4757c6e4800b58020 100644 (file)
@@ -1,5 +1,5 @@
 # -*-makefile-*-
-# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.123 2001/03/10 10:38:59 petere Exp $
+# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.124 2001/05/09 19:19:00 momjian Exp $
 
 #------------------------------------------------------------------------------
 # All PostgreSQL makefiles include this file and use the variables it sets,
@@ -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@
index c47a8df915cf84f40268c197da5f9ea839b70ff9..b86df3fda65b3c990f1a047926c512c5b311b27f 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Makefile for the pltcl shared object
 #
-# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.26 2000/12/15 18:50:35 petere Exp $
+# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.27 2001/05/09 19:19:00 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -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
old mode 100755 (executable)
new mode 100644 (file)
similarity index 99%
rename from src/pl/tcl/modules/pltcl_delmod
rename to src/pl/tcl/modules/pltcl_delmod.in
index 79be7e5..5bb89be
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Start tclsh \
-exec tclsh "$0" $@
+exec @TCLSH@ "$0" $@
 
 #
 # Code still has to be documented
old mode 100755 (executable)
new mode 100644 (file)
similarity index 99%
rename from src/pl/tcl/modules/pltcl_listmod
rename to src/pl/tcl/modules/pltcl_listmod.in
index 92de363..4882044
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Start tclsh \
-exec tclsh "$0" $@
+exec @TCLSH@ "$0" $@
 
 #
 # Code still has to be documented
old mode 100755 (executable)
new mode 100644 (file)
similarity index 99%
rename from src/pl/tcl/modules/pltcl_loadmod
rename to src/pl/tcl/modules/pltcl_loadmod.in
index 615dc1c..150b8d3
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Start tclsh \
-exec tclsh "$0" $@
+exec @TCLSH@ "$0" $@
 
 #
 # Code still has to be documented