Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f49cf6d

Browse files
committed
The TCL/TK configuration cleanup patches I submitted have the following
problem: 'tclsh' still had to be found even if --with-libs (or --with-libraries) was specified to configure. --with-libs is really an overloaded option. It really should only be used to specify additions directories to search in order to file needed libraries. It was also being used to locate the *Config.sh files. Billy G. Allie
1 parent 8ccf86b commit f49cf6d

File tree

3 files changed

+40
-16
lines changed

3 files changed

+40
-16
lines changed

src/GNUmakefile.in

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.40 1998/10/18 02:33:54 tgl Exp $
10+
# $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.41 1998/10/18 04:16:07 momjian Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -80,8 +80,6 @@ distclean: clean
8080
backend/port/tas.s \
8181
backend/port/dynloader.c \
8282
backend/utils/Gen_fmgrtab.sh \
83-
bin/pgtclsh/Makefile.tcldefs \
84-
bin/pgtclsh/Makefile.tkdefs \
8583
\
8684
\
8785
\

src/bin/pgtclsh/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.22 1998/10/15 15:58:15 momjian Exp $
10+
# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.23 1998/10/18 04:16:08 momjian Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -69,7 +69,7 @@ install_tk: pgtksh
6969
$(INSTALL) $(INSTL_EXE_OPTS) pgtksh $(BINDIR)/pgtksh
7070

7171
clean:
72-
rm -f pgtclAppInit.o pgtkAppInit.o pgtclsh pgtksh
72+
rm -f *.o Makefile.t*defs pgtclsh pgtksh
7373

7474
dep depend:
7575
$(CC) -MM $(CFLAGS) *.c > depend

src/configure.in

+37-11
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ if test "$INCLUDE_DIRS"; then
134134
fi
135135

136136
AC_ARG_WITH(libs,
137-
[ --with-libs=DIR site library directories for tk/tcl, etc in DIR],
137+
[ --with-libs=DIR also search for libraries in DIR],
138138
[
139139
case "$withval" in
140140
"" | y | ye | yes | n | no)
@@ -145,7 +145,7 @@ AC_ARG_WITH(libs,
145145
])
146146

147147
AC_ARG_WITH(libraries,
148-
[ --with-libraries=DIR site library directories for tk/tcl, etc in DIR],
148+
[ --with-libraries=DIR also search for libraries in DIR],
149149
[
150150
case "$withval" in
151151
"" | y | ye | yes | n | no)
@@ -232,6 +232,21 @@ AC_ARG_WITH(
232232
export USE_TCL
233233
export USE_TK
234234

235+
dnl We see if the path to the TCL/TK configuration scripts is specified.
236+
dnl This will overide the use of tclsh to find the paths to search.
237+
238+
AC_ARG_WITH(tclconfig,
239+
[ --with-tclconfig=DIR tclConfig.sh and tkConfig.sh are in DIR],
240+
[
241+
case "$withval" in
242+
"" | y | ye | yes | n | no)
243+
AC_MSG_ERROR([*** You must supply an argument to the --with-tclconfig option.])
244+
;;
245+
esac
246+
TCL_DIRS="$withval"
247+
]
248+
)
249+
235250
dnl We exclude perl support unless we override it with --with-perl
236251
AC_MSG_CHECKING(setting USE_PERL)
237252
AC_ARG_WITH(
@@ -250,7 +265,7 @@ dnl We include odbc support unless we disable it with --with-odbc=false
250265
AC_MSG_CHECKING(setting USE_ODBC)
251266
AC_ARG_WITH(
252267
odbc,
253-
[ --with-odbc build ODBC driver package ],
268+
[ --with-odbc build ODBC driver package ],
254269
[
255270
case "$withval" in
256271
y | ye | yes) USE_ODBC=true; AC_MSG_RESULT(enabled) ;;
@@ -276,7 +291,7 @@ then
276291
AC_MSG_CHECKING(setting ODBCINST)
277292
AC_ARG_WITH(
278293
odbcinst,
279-
[ --with-odbcinst=dir change default directory for odbcinst.ini],
294+
[ --with-odbcinst=dir change default directory for odbcinst.ini],
280295
AC_DEFINE_UNQUOTED(ODBCINST, ${with_odbcinst}) AC_MSG_RESULT($with_odbcinst),
281296
AC_DEFINE_UNQUOTED(ODBCINST, ${ODBCINSTDIR}) AC_MSG_RESULT(${ODBCINSTDIR})
282297
)
@@ -754,20 +769,31 @@ fi
754769

755770
dnl Check for Tcl configuration script tclConfig.sh
756771

757-
AC_PATH_PROG(TCLSH, tclsh)
758-
759-
if test -z "$TCLSH"
772+
dnl If --with-tclconfig was given, don't check for tclsh, tcl
773+
if test -z "$TCL_DIRS"
760774
then
761-
AC_MSG_WARN(TCL/TK support disabled; tclsh is not in your path)
762-
USE_TCL=
775+
AC_PATH_PROG(TCLSH, tclsh)
776+
if test -z "$TCLSH"
777+
then
778+
AC_PATH_PROG(TCLSH, tcl)
779+
if test -z "$TCLSH"
780+
then
781+
AC_MSG_WARN(TCL/TK support disabled; tcl shell is not in your path)
782+
USE_TCL=
783+
fi
784+
fi
763785
fi
764786

765787
if test "$USE_TCL" = true
766788
then
767789
AC_MSG_CHECKING(for tclConfig.sh)
768790
TCL_CONFIG_SH=
769-
library_dirs=`echo 'puts $auto_path' | $TCLSH`
770-
library_dirs="$LIBRARY_DIRS $library_dirs"
791+
library_dirs=
792+
if test -z "$TCL_DIRS"
793+
then
794+
library_dirs=`echo 'puts $auto_path' | $TCLSH`
795+
fi
796+
library_dirs="$TCL_DIRS $library_dirs"
771797
for dir in $library_dirs; do
772798
if test -d "$dir" -a -r "$dir/tclConfig.sh"; then
773799
TCL_CONFIG_SH=$dir/tclConfig.sh

0 commit comments

Comments
 (0)