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

Commit 6755026

Browse files
committed
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
1 parent bb80f8a commit 6755026

File tree

2 files changed

+29
-5
lines changed

2 files changed

+29
-5
lines changed

src/configure

+16-4
Original file line numberDiff line numberDiff line change
@@ -5562,24 +5562,32 @@ fi
55625562

55635563
if test "$USE_TCL" = "true"
55645564
then
5565+
ice_save_LIBS="$LIBS"
5566+
ice_save_CFLAGS="$CFLAGS"
5567+
ice_save_CPPFLAGS="$CPPFLAGS"
5568+
ice_save_LDFLAGS="$LDFLAGS"
5569+
LIBS="$LIBS $X_EXTRA_LIBS"
5570+
CFLAGS="$CFLAGS $X_CFLAGS"
5571+
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5572+
LDFLAGS="$LDFLAGS $X_LIBS"
55655573
TK_LIB=
55665574
echo $ac_n "checking for main in -ltk""... $ac_c" 1>&6
5567-
echo "configure:5568: checking for main in -ltk" >&5
5575+
echo "configure:5576: checking for main in -ltk" >&5
55685576
ac_lib_var=`echo tk'_'main | sed 'y%./+-%__p_%'`
55695577
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
55705578
echo $ac_n "(cached) $ac_c" 1>&6
55715579
else
55725580
ac_save_LIBS="$LIBS"
5573-
LIBS="-ltk $LIBS"
5581+
LIBS="-ltk $X11_LIBS $TCL_LIB $LIBS"
55745582
cat > conftest.$ac_ext <<EOF
5575-
#line 5576 "configure"
5583+
#line 5584 "configure"
55765584
#include "confdefs.h"
55775585
55785586
int main() {
55795587
main()
55805588
; return 0; }
55815589
EOF
5582-
if { (eval echo configure:5583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5590+
if { (eval echo configure:5591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
55835591
rm -rf conftest*
55845592
eval "ac_cv_lib_$ac_lib_var=yes"
55855593
else
@@ -5606,6 +5614,10 @@ else
56065614
TK_LIB=-l$TK_LIB
56075615
fi
56085616

5617+
LIBS="$ice_save_LIBS"
5618+
CFLAGS="$ice_save_CFLAGS"
5619+
CPPFLAGS="$ice_save_CPPFLAGS"
5620+
LDFLAGS="$ice_save_LDFLAGS"
56095621
fi
56105622

56115623
trap '' 1 2 15

src/configure.in

+13-1
Original file line numberDiff line numberDiff line change
@@ -620,15 +620,27 @@ fi
620620
dnl Check for Tk archive
621621
if test "$USE_TCL" = "true"
622622
then
623+
ice_save_LIBS="$LIBS"
624+
ice_save_CFLAGS="$CFLAGS"
625+
ice_save_CPPFLAGS="$CPPFLAGS"
626+
ice_save_LDFLAGS="$LDFLAGS"
627+
LIBS="$LIBS $X_EXTRA_LIBS"
628+
CFLAGS="$CFLAGS $X_CFLAGS"
629+
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
630+
LDFLAGS="$LDFLAGS $X_LIBS"
623631
TK_LIB=
624-
AC_CHECK_LIB(tk, main, TK_LIB=tk)
632+
AC_CHECK_LIB(tk, main, TK_LIB=tk,,$X11_LIBS $TCL_LIB)
625633
if test -z "$TK_LIB"; then
626634
AC_MSG_WARN(tcl support disabled; Tk library missing)
627635
USE_TCL=
628636
else
629637
TK_LIB=-l$TK_LIB
630638
fi
631639
AC_SUBST(TK_LIB)
640+
LIBS="$ice_save_LIBS"
641+
CFLAGS="$ice_save_CFLAGS"
642+
CPPFLAGS="$ice_save_CPPFLAGS"
643+
LDFLAGS="$ice_save_LDFLAGS"
632644
fi
633645

634646
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 )

0 commit comments

Comments
 (0)