A couple of weeks ago I submitted a patch to fix configure --with-tcl.

However somebody else also applied a patch to the same part of
configure to fix a different problem. So part of my patch was not
applied or got reversed or ... whatever.

The attached patch will restore configure --with-tcl to working
order and should remove a lot of the messages complaining about
tcl not working.

Alvin
This commit is contained in:
Bruce Momjian 1998-04-03 20:21:51 +00:00
parent bb80f8a918
commit 6755026937
2 changed files with 29 additions and 5 deletions

20
src/configure vendored
View File

@ -5562,24 +5562,32 @@ fi
if test "$USE_TCL" = "true"
then
ice_save_LIBS="$LIBS"
ice_save_CFLAGS="$CFLAGS"
ice_save_CPPFLAGS="$CPPFLAGS"
ice_save_LDFLAGS="$LDFLAGS"
LIBS="$LIBS $X_EXTRA_LIBS"
CFLAGS="$CFLAGS $X_CFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
LDFLAGS="$LDFLAGS $X_LIBS"
TK_LIB=
echo $ac_n "checking for main in -ltk""... $ac_c" 1>&6
echo "configure:5568: checking for main in -ltk" >&5
echo "configure:5576: checking for main in -ltk" >&5
ac_lib_var=`echo tk'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-ltk $LIBS"
LIBS="-ltk $X11_LIBS $TCL_LIB $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5576 "configure"
#line 5584 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:5583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:5591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -5606,6 +5614,10 @@ else
TK_LIB=-l$TK_LIB
fi
LIBS="$ice_save_LIBS"
CFLAGS="$ice_save_CFLAGS"
CPPFLAGS="$ice_save_CPPFLAGS"
LDFLAGS="$ice_save_LDFLAGS"
fi
trap '' 1 2 15

View File

@ -620,8 +620,16 @@ fi
dnl Check for Tk archive
if test "$USE_TCL" = "true"
then
ice_save_LIBS="$LIBS"
ice_save_CFLAGS="$CFLAGS"
ice_save_CPPFLAGS="$CPPFLAGS"
ice_save_LDFLAGS="$LDFLAGS"
LIBS="$LIBS $X_EXTRA_LIBS"
CFLAGS="$CFLAGS $X_CFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
LDFLAGS="$LDFLAGS $X_LIBS"
TK_LIB=
AC_CHECK_LIB(tk, main, TK_LIB=tk)
AC_CHECK_LIB(tk, main, TK_LIB=tk,,$X11_LIBS $TCL_LIB)
if test -z "$TK_LIB"; then
AC_MSG_WARN(tcl support disabled; Tk library missing)
USE_TCL=
@ -629,6 +637,10 @@ else
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
AC_OUTPUT(GNUmakefile Makefile.global backend/port/Makefile bin/pg_version/Makefile bin/psql/Makefile bin/pg_dump/Makefile backend/utils/Gen_fmgrtab.sh interfaces/libpq/Makefile interfaces/libpgtcl/Makefile interfaces/ecpg/lib/Makefile )