summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2000-09-25 22:23:01 +0000
committerPeter Eisentraut <peter_e@gmx.net>2000-09-25 22:23:01 +0000
commitf428d053ce075bafe1785d0ba7792f4eb92d93d5 (patch)
tree5a7e6981c0929343338ca0fa3de0f4e3e4702af1 /src
parente353e73768e54c7e5cfd5a1d6e97e1f6315207bb (diff)
downloadpostgresql-f428d053ce075bafe1785d0ba7792f4eb92d93d5.tar.gz
Revise Tcl/Tk configuration. Make missing Tcl after --with-tcl an error,
add --without-tk option to disable Tk. We don't need the AC_PATH_XTRA test because tkConfig.sh already contains all the information about how to compile and link with X. Also make sure that libpq is up to date for libpgtcl. Remove executable bits from pgaccess.sh, but add it to pgaccess.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.global.in14
-rw-r--r--src/bin/Makefile7
-rw-r--r--src/bin/pgaccess/Makefile9
-rwxr-xr-xsrc/bin/pgaccess/pgaccess.sh6
-rw-r--r--src/bin/pgtclsh/Makefile23
-rw-r--r--src/interfaces/Makefile4
-rw-r--r--src/interfaces/libpgtcl/Makefile8
-rw-r--r--src/pl/Makefile4
8 files changed, 36 insertions, 39 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 80069263b1..c5c7f4e815 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -1,4 +1,4 @@
-# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.94 2000/09/21 20:17:43 petere Exp $
+# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.95 2000/09/25 22:22:54 petere Exp $
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -97,19 +97,13 @@ python_moduledir = @python_moduledir@
krb_srvtab = @krb_srvtab@
-#
-# Please do not edit USE_TCL and USE_TK by hand.
-#
-USE_TCL= @USE_TCL@
-USE_TK= @USE_TK@
+with_tcl = @with_tcl@
+with_tk = @with_tk@
+
WISH= @WISH@
TCL_CONFIG_SH = @TCL_CONFIG_SH@
TK_CONFIG_SH = @TK_CONFIG_SH@
-X_CFLAGS= @X_CFLAGS@
-X_LIBS= @X_LIBS@
-X11_LIBS= -lX11 @X_EXTRA_LIBS@
-
# flag whether multibyte is on/off
MULTIBYTE=@MULTIBYTE@
diff --git a/src/bin/Makefile b/src/bin/Makefile
index 0519a29491..e635f5f4ce 100644
--- a/src/bin/Makefile
+++ b/src/bin/Makefile
@@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
-# $Header: /cvsroot/pgsql/src/bin/Makefile,v 1.31 2000/08/31 16:11:03 petere Exp $
+# $Header: /cvsroot/pgsql/src/bin/Makefile,v 1.32 2000/09/25 22:22:54 petere Exp $
#
#-------------------------------------------------------------------------
@@ -19,9 +19,8 @@ ifdef MULTIBYTE
DIRS += pg_encoding
endif
-# TCL/TK programs
-ifeq ($(USE_TCL), true)
-ifeq ($(USE_TK), true)
+ifeq ($(with_tcl), yes)
+ifeq ($(with_tk), yes)
DIRS += pgaccess
endif
DIRS += pgtclsh
diff --git a/src/bin/pgaccess/Makefile b/src/bin/pgaccess/Makefile
index 359f98f4e5..8360973208 100644
--- a/src/bin/pgaccess/Makefile
+++ b/src/bin/pgaccess/Makefile
@@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
-# $Header: /cvsroot/pgsql/src/bin/pgaccess/Attic/Makefile,v 1.12 2000/09/17 13:02:41 petere Exp $
+# $Header: /cvsroot/pgsql/src/bin/pgaccess/Attic/Makefile,v 1.13 2000/09/25 22:22:56 petere Exp $
#
#-------------------------------------------------------------------------
@@ -16,8 +16,11 @@ pgaccessdir = $(datadir)/pgaccess
all: pgaccess
-pgaccess: pgaccess.sh
- sed -e 's,__wish__,$(WISH),' -e 's,__PGACCESSHOME__,$(pgaccessdir),' < $< > $@
+pgaccess: pgaccess.sh $(top_builddir)/src/Makefile.global
+ sed -e 's,@WISH@,$(WISH),g' \
+ -e 's,@PGACCESSHOME@,$(pgaccessdir),g' \
+ $< >$@
+ chmod a+x $@
install: all installdirs
$(INSTALL_SCRIPT) pgaccess $(DESTDIR)$(bindir)/pgaccess
diff --git a/src/bin/pgaccess/pgaccess.sh b/src/bin/pgaccess/pgaccess.sh
index c41cf53cce..196873b804 100755
--- a/src/bin/pgaccess/pgaccess.sh
+++ b/src/bin/pgaccess/pgaccess.sh
@@ -1,9 +1,9 @@
#! /bin/sh
-PATH_TO_WISH=__wish__
-PGACCESS_HOME=__PGACCESSHOME__
+PATH_TO_WISH='@WISH@'
+PGACCESS_HOME='@PGACCESSHOME@'
export PATH_TO_WISH
export PGACCESS_HOME
-exec ${PATH_TO_WISH} ${PGACCESS_HOME}/main.tcl "$@"
+exec "${PATH_TO_WISH}" "${PGACCESS_HOME}/main.tcl" "$@"
diff --git a/src/bin/pgtclsh/Makefile b/src/bin/pgtclsh/Makefile
index e2ae981f9e..053b50a6f0 100644
--- a/src/bin/pgtclsh/Makefile
+++ b/src/bin/pgtclsh/Makefile
@@ -5,7 +5,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
-# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.32 2000/09/17 13:02:42 petere Exp $
+# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.33 2000/09/25 22:22:58 petere Exp $
#
#-------------------------------------------------------------------------
@@ -17,7 +17,7 @@ include $(top_builddir)/src/Makefile.global
# Include definitions from the tclConfig.sh file
#
-include Makefile.tcldefs
-ifeq ($(USE_TK), true)
+ifeq ($(with_tk), yes)
-include Makefile.tkdefs
endif
@@ -25,27 +25,24 @@ libpgtcl_srcdir = $(top_srcdir)/src/interfaces/libpgtcl
libpgtcl_builddir = $(top_builddir)/src/interfaces/libpgtcl
libpgtcl = -L$(libpgtcl_builddir) -lpgtcl
-CFLAGS+= $(X_CFLAGS) -I$(libpgtcl_srcdir)
+CPPFLAGS += -I$(libpgtcl_srcdir) $(TK_XINCLUDES)
-# If we are here then TCL is available
+# If we are here then Tcl is available
PROGRAMS = pgtclsh
-# Add TK targets if TK is available
-ifeq ($(USE_TK), true)
+# Add Tk targets if Tk is available
+ifeq ($(with_tk), yes)
PROGRAMS += pgtksh
endif
all: submake $(PROGRAMS)
pgtclsh: pgtclAppInit.o
- $(CC) $(CFLAGS) $(TCL_DEFS) -o $@ $< \
- $(libpgtcl) $(libpq) $(TCL_LIB_SPEC) $(TCL_LIBS) $(LDFLAGS)
+ $(CC) $(CFLAGS) -o $@ $< $(libpgtcl) $(libpq) $(TCL_LIB_SPEC) $(TCL_LIBS) $(LDFLAGS)
pgtksh: pgtkAppInit.o
- $(CC) $(CFLAGS) $(TK_DEFS) -o $@ $< \
- $(libpgtcl) $(libpq) $(X_LIBS) $(TK_LIB_SPEC) $(TK_LIBS) \
- $(TCL_LIB_SPEC) $(X11_LIBS) $(LDFLAGS)
+ $(CC) $(CFLAGS) -o $@ $< $(libpgtcl) $(libpq) $(TK_LIB_SPEC) $(TK_LIBS) $(TCL_LIB_SPEC) $(LDFLAGS)
.PHONY: submake
submake:
@@ -53,7 +50,7 @@ submake:
install: all installdirs
$(INSTALL_PROGRAM) pgtclsh $(DESTDIR)$(bindir)/pgtclsh
-ifeq ($(USE_TK), true)
+ifeq ($(with_tk), yes)
$(INSTALL_PROGRAM) pgtksh $(DESTDIR)$(bindir)/pgtksh
endif
@@ -70,7 +67,7 @@ Makefile.tkdefs: mkMakefile.tkdefs.sh
$(SHELL) $< '$(TK_CONFIG_SH)' '$@'
clean distclean maintainer-clean:
- rm -f *.o Makefile.tcldefs Makefile.tkdefs pgtclsh pgtksh
+ rm -f pgtclAppInit.o pgtkAppInit.o Makefile.tcldefs Makefile.tkdefs pgtclsh pgtksh
dep depend:
$(CC) -MM $(CFLAGS) *.c > depend
diff --git a/src/interfaces/Makefile b/src/interfaces/Makefile
index 5640c8d0bc..ee9fed3851 100644
--- a/src/interfaces/Makefile
+++ b/src/interfaces/Makefile
@@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
-# $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.42 2000/08/31 16:11:30 petere Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.43 2000/09/25 22:23:00 petere Exp $
#
#-------------------------------------------------------------------------
@@ -24,7 +24,7 @@ ifeq ($(with_CXX), yes)
DIRS += libpq++
endif
-ifeq ($(USE_TCL), true)
+ifeq ($(with_tcl), yes)
DIRS += libpgtcl
endif
diff --git a/src/interfaces/libpgtcl/Makefile b/src/interfaces/libpgtcl/Makefile
index 636891e3e8..a20970c098 100644
--- a/src/interfaces/libpgtcl/Makefile
+++ b/src/interfaces/libpgtcl/Makefile
@@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
-# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile,v 1.21 2000/09/17 13:02:49 petere Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile,v 1.22 2000/09/25 22:23:00 petere Exp $
#
#-------------------------------------------------------------------------
@@ -27,7 +27,11 @@ SHLIB_LINK+= $(libpq)
# braindead; users of libpq should not need to know what it depends on.)
SHLIB_LINK+= $(findstring -lcrypt,$(LIBS))
-all: all-lib
+all: submake all-lib
+
+.PHONY: submake
+submake:
+ $(MAKE) -C $(libpq_builddir) all
# Shared library stuff
include $(top_srcdir)/src/Makefile.shlib
diff --git a/src/pl/Makefile b/src/pl/Makefile
index dbe85b5b3b..b0160f5927 100644
--- a/src/pl/Makefile
+++ b/src/pl/Makefile
@@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
-# $Header: /cvsroot/pgsql/src/pl/Makefile,v 1.14 2000/09/25 12:43:24 momjian Exp $
+# $Header: /cvsroot/pgsql/src/pl/Makefile,v 1.15 2000/09/25 22:23:01 petere Exp $
#
#-------------------------------------------------------------------------
@@ -14,7 +14,7 @@ include $(top_builddir)/src/Makefile.global
DIRS := plpgsql
-ifeq ($(USE_TCL), true)
+ifeq ($(with_tcl), yes)
DIRS += tcl
endif