1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

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.
This commit is contained in:
Peter Eisentraut
2000-09-25 22:23:01 +00:00
parent e353e73768
commit f428d053ce
12 changed files with 613 additions and 1553 deletions

View File

@ -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@

View File

@ -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

View File

@ -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

View File

@ -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" "$@"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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