diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pgtclsh/Makefile | 22 | ||||
-rwxr-xr-x | src/configure | 35 | ||||
-rw-r--r-- | src/configure.in | 35 | ||||
-rw-r--r-- | src/interfaces/libpgtcl/Makefile.in | 3 | ||||
-rw-r--r-- | src/pl/tcl/mkMakefile.tcldefs.sh.in | 18 |
5 files changed, 94 insertions, 19 deletions
diff --git a/src/bin/pgtclsh/Makefile b/src/bin/pgtclsh/Makefile index b0e474508e9..0bf1952dbb9 100644 --- a/src/bin/pgtclsh/Makefile +++ b/src/bin/pgtclsh/Makefile @@ -7,14 +7,19 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.18 1998/05/12 15:42:08 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.19 1998/10/12 02:40:58 momjian Exp $ # #------------------------------------------------------------------------- SRCDIR= ../.. include ../../Makefile.global -CFLAGS+= $(X_CFLAGS) -I$(SRCDIR)/interfaces/libpgtcl +# +# Include definitions from the tclConfig.sh file +# +include Makefile.tcltkdefs + +CFLAGS+= -I$(SRCDIR)/interfaces/libpgtcl ifdef KRBVERS LDFLAGS+= $(KRBLIBS) @@ -27,14 +32,17 @@ LIBPQ= -L$(LIBPQDIR) -lpq all: pgtclsh pgtksh +Makefile.tcltkdefs: + /bin/sh mkMakefile.tcltkdefs.sh + pgtclsh: pgtclAppInit.o - $(CC) $(CFLAGS) -o $@ pgtclAppInit.o \ - $(LIBPGTCL) $(LIBPQ) $(TCL_LIB) -lm $(LDFLAGS) + $(CC) $(CFLAGS) $(TCL_DEFS) -o $@ pgtclAppInit.o \ + $(LIBPGTCL) $(LIBPQ) $(TCL_LIB_SPEC) $(TCL_LIBS) $(LDFLAGS) pgtksh: pgtkAppInit.o - $(CC) $(CFLAGS) -o $@ pgtkAppInit.o \ - $(LIBPGTCL) $(LIBPQ) $(X_LIBS) $(TK_LIB) $(TCL_LIB) \ - $(X11_LIBS) -lm $(LDFLAGS) + $(CC) $(CFLAGS) $(TK_DEFS) -o $@ pgtkAppInit.o \ + $(LIBPGTCL) $(LIBPQ) $(TK_LIB_SPEC) $(TK_LIBS) \ + $(TCL_LIB_SPEC) $(TCL_LIB) $(LDFLAGS) install: pgtclsh pgtksh $(INSTALL) $(INSTL_EXE_OPTS) pgtclsh $(BINDIR)/pgtclsh diff --git a/src/configure b/src/configure index 187e7c71b6e..ace665d6897 100755 --- a/src/configure +++ b/src/configure @@ -6118,7 +6118,7 @@ fi if test "$USE_TCL"; then echo $ac_n "checking for tclConfig.sh""... $ac_c" 1>&6 echo "configure:6121: checking for tclConfig.sh" >&5 - library_dirs="/usr/lib $LIBRARY_DIRS" + library_dirs="$LIBRARY_DIRS /usr/lib" TCL_CONFIG_SH= for dir in $library_dirs; do for tcl_dir in $tcl_dirs; do @@ -6268,6 +6268,36 @@ fi LDFLAGS="$ice_save_LDFLAGS" fi +if test "$USE_TCL"; then + echo $ac_n "checking for tkConfig.sh""... $ac_c" 1>&6 +echo "configure:6121: checking for tkConfig.sh" >&5 + library_dirs="$LIBRARY_DIRS /usr/lib" + TK_CONFIG_SH= + for dir in $library_dirs; do + for tk_dir in $tk_dirs; do + if test -z "$TK_CONFIG_SH"; then + if test -d "$dir/$tk_dir" -a -r "$dir/$tk_dir/tkConfig.sh"; then + TK_CONFIG_SH=$dir/$tk_dir/tkConfig.sh + fi + fi + done + if test -z "$TK_CONFIG_SH"; then + if test -d "$dir" -a -r "$dir/tkConfig.sh"; then + TK_CONFIG_SH=$dir/tkConfig.sh + fi + fi + done + if test -z "$TK_CONFIG_SH"; then + echo "$ac_t""no" 1>&6 + echo "configure: warning: tcl support disabled; Tk configuration script missing" 1>&2 + USE_TCL= + else + echo "$ac_t""$TK_CONFIG_SH" 1>&6 + + fi +fi + + #if test "X$USE_ODBC" = "Xtrue" #then # AC_CONFIG_SUBDIRS(interfaces/odbc) @@ -6424,6 +6454,7 @@ trap 'rm -fr `echo "GNUmakefile bin/pg_dump/Makefile bin/pg_version/Makefile bin/psql/Makefile + bin/pgtclsh/mkMakefile.tcltkdefs.sh include/version.h interfaces/libpq/Makefile interfaces/ecpg/lib/Makefile @@ -6532,6 +6563,7 @@ s%@X11_LIBS@%$X11_LIBS%g s%@TCL_LIB@%$TCL_LIB%g s%@TCL_CONFIG_SH@%$TCL_CONFIG_SH%g s%@TK_LIB@%$TK_LIB%g +s%@TK_CONFIG_SH@%$TK_CONFIG_SH%g CEOF EOF @@ -6580,6 +6612,7 @@ CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile bin/pg_dump/Makefile bin/pg_version/Makefile bin/psql/Makefile + bin/pgtclsh/mkMakefile.tcltkdefs.sh include/version.h interfaces/libpq/Makefile interfaces/ecpg/lib/Makefile diff --git a/src/configure.in b/src/configure.in index 4c611517397..910a2fa74b7 100644 --- a/src/configure.in +++ b/src/configure.in @@ -801,13 +801,12 @@ if test "$USE_TCL" = "true"; then else TCL_LIB=-l$TCL_LIB fi - 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" + library_dirs="$LIBRARY_DIRS /usr/lib" TCL_CONFIG_SH= for dir in $library_dirs; do for tcl_dir in $tcl_dirs; do @@ -886,14 +885,41 @@ then TK_LIB=-l$TK_LIB fi - AC_SUBST(TK_LIB) - LIBS="$ice_save_LIBS" CFLAGS="$ice_save_CFLAGS" CPPFLAGS="$ice_save_CPPFLAGS" LDFLAGS="$ice_save_LDFLAGS" fi +dnl Check for Tk configuration script tkConfig.sh +if test "$USE_TCL"; then + AC_MSG_CHECKING(for tkConfig.sh) + library_dirs="$LIBRARY_DIRS /usr/lib" + TK_CONFIG_SH= + for dir in $library_dirs; do + for tk_dir in $tk_dirs; do + if test -z "$TK_CONFIG_SH"; then + if test -d "$dir/$tk_dir" -a -r "$dir/$tk_dir/tkConfig.sh"; then + TK_CONFIG_SH=$dir/$tk_dir/tkConfig.sh + fi + fi + done + if test -z "$TK_CONFIG_SH"; then + if test -d "$dir" -a -r "$dir/tkConfig.sh"; then + TK_CONFIG_SH=$dir/tkConfig.sh + fi + fi + done + if test -z "$TK_CONFIG_SH"; then + AC_MSG_RESULT(no) + AC_MSG_WARN(tcl support disabled; Tk configuration script missing) + USE_TCL= + else + AC_MSG_RESULT($TK_CONFIG_SH) + AC_SUBST(TK_CONFIG_SH) + fi +fi + dnl cause configure to recurse into subdirectories with their own configure dnl Darn, setting AC_CONFIG_SUBDIRS sets a list $subdirs$ in the configure output dnl file, but then configure doesn't bother using that list. Probably a bug in @@ -925,6 +951,7 @@ AC_OUTPUT( bin/pg_dump/Makefile bin/pg_version/Makefile bin/psql/Makefile + bin/pgtclsh/mkMakefile.tcltkdefs.sh include/version.h interfaces/libpq/Makefile interfaces/ecpg/lib/Makefile diff --git a/src/interfaces/libpgtcl/Makefile.in b/src/interfaces/libpgtcl/Makefile.in index 27a8fc44b7f..ec663a96101 100644 --- a/src/interfaces/libpgtcl/Makefile.in +++ b/src/interfaces/libpgtcl/Makefile.in @@ -7,7 +7,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.29 1998/10/12 01:23:23 momjian Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.30 1998/10/12 02:40:59 momjian Exp $ # #------------------------------------------------------------------------- @@ -146,6 +146,7 @@ install-libpgtcl: libpgtcl.a install-shlib: $(shlib) $(INSTALL) $(INSTL_SHLIB_OPTS) $(shlib) \ $(LIBDIR)/$(shlib) + rm -f $(LIBDIR)/libpgtcl.so $(LN_S) -f $(shlib) $(LIBDIR)/libpgtcl.so .PHONY: clean diff --git a/src/pl/tcl/mkMakefile.tcldefs.sh.in b/src/pl/tcl/mkMakefile.tcldefs.sh.in index c3981dd3102..940eb04928c 100644 --- a/src/pl/tcl/mkMakefile.tcldefs.sh.in +++ b/src/pl/tcl/mkMakefile.tcldefs.sh.in @@ -1,15 +1,21 @@ -if [ -f @TCL_CONFIG_SH@ ]; then - . @TCL_CONFIG_SH@ -else +if [ ! -f @TCL_CONFIG_SH@ ]; then echo "@TCL_CONFIG_SH@ not found" echo "I need this file! Please make a symbolic link to this file" echo "and start make again." exit 1 fi -for v in `set | grep '^TCL' | sed -e 's/=.*//'` ; do - echo $v = `eval "echo \\$$v"` -done >Makefile.tcldefs +. @TCL_CONFIG_SH@ + +set | + egrep '^TCL_|^TK_' | + sed -e 's/=[ ]*/="/' -e 's/[ ]*$/"/' | + while read v + do + eval "$v" + v1=`echo $v | sed -e 's/=.*//'` + eval "echo $v1 = \"\$$v1\"" + done >Makefile.tcldefs exit 0 |