TCL/TK configuration fixes for PostgreSQL 6.4
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.
This patch addresses these problems by:
1. Creating a new option (--with-tclconfig) which is used to specify the
location of the *Config.sh files. If the tkConfig.sh is located in a
different location than the tclConfig.sh, you can give both locations
seperated by a space. For example:
--with-tclconfig="/opt/lib/tcl8.0 /opt/lib/tk8.0"
2. Changing the search logic so that if '--with-tclconfg' is specified, then
the tcl shell program is not used to obtain a list of directories to search
for the *Config.sh files. It is assumed that the directories given with
the --with-tclconfig option will contain the *Config.sh files.
3. Adding 'tcl' as a name of the tcl shell program to be searched for if
'tclsh' was not found in the PATH. This seems to be another common name
for the tcl shell program.
This patch also moves the clean-up of the generated Makefile.tcldefs and
Makefile.tkdefs in bin/pgtclsh from GNUmakefile.in to the Makefile in
bin/pgtclsh (where, IMHO, they belong).
Attachments:
uw7-1.patchapplication/x-patch; name=uw7-1.patchDownload
*** ./src/bin/pgtclsh/Makefile.orig Fri Oct 16 17:06:30 1998
--- ./src/bin/pgtclsh/Makefile Fri Oct 16 17:07:43 1998
***************
*** 69,75 ****
$(INSTALL) $(INSTL_EXE_OPTS) pgtksh $(BINDIR)/pgtksh
clean:
! rm -f pgtclAppInit.o pgtkAppInit.o pgtclsh pgtksh
dep depend:
$(CC) -MM $(CFLAGS) *.c > depend
--- 69,75 ----
$(INSTALL) $(INSTL_EXE_OPTS) pgtksh $(BINDIR)/pgtksh
clean:
! rm -f *.o Makefile.t*defs pgtclsh pgtksh
dep depend:
$(CC) -MM $(CFLAGS) *.c > depend
*** ./src/configure.in.orig Fri Oct 16 17:08:41 1998
--- ./src/configure.in Sat Oct 17 01:12:27 1998
***************
*** 134,140 ****
fi
AC_ARG_WITH(libs,
! [ --with-libs=DIR site library directories for tk/tcl, etc in DIR],
[
case "$withval" in
"" | y | ye | yes | n | no)
--- 134,140 ----
fi
AC_ARG_WITH(libs,
! [ --with-libs=DIR also search for libraries in DIR],
[
case "$withval" in
"" | y | ye | yes | n | no)
***************
*** 145,151 ****
])
AC_ARG_WITH(libraries,
! [ --with-libraries=DIR site library directories for tk/tcl, etc in DIR],
[
case "$withval" in
"" | y | ye | yes | n | no)
--- 145,151 ----
])
AC_ARG_WITH(libraries,
! [ --with-libraries=DIR also search for libraries in DIR],
[
case "$withval" in
"" | y | ye | yes | n | no)
***************
*** 232,237 ****
--- 232,252 ----
export USE_TCL
export USE_TK
+ dnl We see if the path to the TCL/TK configuration scripts is specified.
+ dnl This will overide the use of tclsh to find the paths to search.
+
+ AC_ARG_WITH(tclconfig,
+ [ --with-tclconfig=DIR tclConfig.sh and tkConfig.sh are in DIR],
+ [
+ case "$withval" in
+ "" | y | ye | yes | n | no)
+ AC_MSG_ERROR([*** You must supply an argument to the --with-tclconfig option.])
+ ;;
+ esac
+ TCL_DIRS="$withval"
+ ]
+ )
+
dnl We exclude perl support unless we override it with --with-perl
AC_MSG_CHECKING(setting USE_PERL)
AC_ARG_WITH(
***************
*** 250,256 ****
AC_MSG_CHECKING(setting USE_ODBC)
AC_ARG_WITH(
odbc,
! [ --with-odbc build ODBC driver package ],
[
case "$withval" in
y | ye | yes) USE_ODBC=true; AC_MSG_RESULT(enabled) ;;
--- 265,271 ----
AC_MSG_CHECKING(setting USE_ODBC)
AC_ARG_WITH(
odbc,
! [ --with-odbc build ODBC driver package ],
[
case "$withval" in
y | ye | yes) USE_ODBC=true; AC_MSG_RESULT(enabled) ;;
***************
*** 276,282 ****
AC_MSG_CHECKING(setting ODBCINST)
AC_ARG_WITH(
odbcinst,
! [ --with-odbcinst=dir change default directory for odbcinst.ini],
AC_DEFINE_UNQUOTED(ODBCINST, ${with_odbcinst}) AC_MSG_RESULT($with_odbcinst),
AC_DEFINE_UNQUOTED(ODBCINST, ${ODBCINSTDIR}) AC_MSG_RESULT(${ODBCINSTDIR})
)
--- 291,297 ----
AC_MSG_CHECKING(setting ODBCINST)
AC_ARG_WITH(
odbcinst,
! [ --with-odbcinst=dir change default directory for odbcinst.ini],
AC_DEFINE_UNQUOTED(ODBCINST, ${with_odbcinst}) AC_MSG_RESULT($with_odbcinst),
AC_DEFINE_UNQUOTED(ODBCINST, ${ODBCINSTDIR}) AC_MSG_RESULT(${ODBCINSTDIR})
)
***************
*** 754,765 ****
dnl Check for Tcl configuration script tclConfig.sh
! AC_PATH_PROG(TCLSH, tclsh)
!
! if test -z "$TCLSH"
then
! AC_MSG_WARN(TCL/TK support disabled; tclsh is not in your path)
! USE_TCL=
fi
if test "$USE_TCL" = true
--- 769,787 ----
dnl Check for Tcl configuration script tclConfig.sh
! dnl If --with-tclconfig was given, don't check for tclsh, tcl
! if test -z "$TCL_DIRS"
then
! AC_PATH_PROG(TCLSH, tclsh)
! if test -z "$TCLSH"
! then
! AC_PATH_PROG(TCLSH, tcl)
! if test -z "$TCLSH"
! then
! AC_MSG_WARN(TCL/TK support disabled; tcl shell is not in your path)
! USE_TCL=
! fi
! fi
fi
if test "$USE_TCL" = true
***************
*** 766,773 ****
then
AC_MSG_CHECKING(for tclConfig.sh)
TCL_CONFIG_SH=
! library_dirs=`echo 'puts $auto_path' | $TCLSH`
! library_dirs="$LIBRARY_DIRS $library_dirs"
for dir in $library_dirs; do
if test -d "$dir" -a -r "$dir/tclConfig.sh"; then
TCL_CONFIG_SH=$dir/tclConfig.sh
--- 788,799 ----
then
AC_MSG_CHECKING(for tclConfig.sh)
TCL_CONFIG_SH=
! library_dirs=
! if test -z "$TCL_DIRS"
! then
! library_dirs=`echo 'puts $auto_path' | $TCLSH`
! fi
! library_dirs="$TCL_DIRS $library_dirs"
for dir in $library_dirs; do
if test -d "$dir" -a -r "$dir/tclConfig.sh"; then
TCL_CONFIG_SH=$dir/tclConfig.sh
*** ./src/GNUmakefile.in.orig Sat Oct 17 01:17:44 1998
--- ./src/GNUmakefile.in Sat Oct 17 01:19:25 1998
***************
*** 80,87 ****
backend/port/tas.s \
backend/port/dynloader.c \
backend/utils/Gen_fmgrtab.sh \
- bin/pgtclsh/Makefile.tcldefs \
- bin/pgtclsh/Makefile.tkdefs \
\
\
\
--- 80,85 ----
Applied.
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.This patch addresses these problems by:
1. Creating a new option (--with-tclconfig) which is used to specify the
location of the *Config.sh files. If the tkConfig.sh is located in a
different location than the tclConfig.sh, you can give both locations
seperated by a space. For example:--with-tclconfig="/opt/lib/tcl8.0 /opt/lib/tk8.0"
2. Changing the search logic so that if '--with-tclconfg' is specified, then
the tcl shell program is not used to obtain a list of directories to search
for the *Config.sh files. It is assumed that the directories given with
the --with-tclconfig option will contain the *Config.sh files.3. Adding 'tcl' as a name of the tcl shell program to be searched for if
'tclsh' was not found in the PATH. This seems to be another common name
for the tcl shell program.This patch also moves the clean-up of the generated Makefile.tcldefs and
Makefile.tkdefs in bin/pgtclsh from GNUmakefile.in to the Makefile in
bin/pgtclsh (where, IMHO, they belong).
Content-Description: uw7-1.patch
[Attachment, skipping...]
____ | Billy G. Allie | Domain....: Bill.Allie@mug.org
| /| | 7436 Hartwell | Compuserve: 76337,2061
|-/-|----- | Dearborn, MI 48126| MSN.......: B_G_Allie@email.msn.com
|/ |LLIE | (313) 582-1540 |
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Applied.
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.This patch addresses these problems by:
1. Creating a new option (--with-tclconfig) which is used to specify the
location of the *Config.sh files. If the tkConfig.sh is located in a
different location than the tclConfig.sh, you can give both locations
seperated by a space. For example:--with-tclconfig="/opt/lib/tcl8.0 /opt/lib/tk8.0"
2. Changing the search logic so that if '--with-tclconfg' is specified, then
the tcl shell program is not used to obtain a list of directories to search
for the *Config.sh files. It is assumed that the directories given with
the --with-tclconfig option will contain the *Config.sh files.3. Adding 'tcl' as a name of the tcl shell program to be searched for if
'tclsh' was not found in the PATH. This seems to be another common name
for the tcl shell program.This patch also moves the clean-up of the generated Makefile.tcldefs and
Makefile.tkdefs in bin/pgtclsh from GNUmakefile.in to the Makefile in
bin/pgtclsh (where, IMHO, they belong).
Content-Description: uw7-1.patch
[Attachment, skipping...]
____ | Billy G. Allie | Domain....: Bill.Allie@mug.org
| /| | 7436 Hartwell | Compuserve: 76337,2061
|-/-|----- | Dearborn, MI 48126| MSN.......: B_G_Allie@email.msn.com
|/ |LLIE | (313) 582-1540 |
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026