Re: [QUESTIONS] warning: tcl support disabled

From: Brook Milligan <brook(at)trillium(dot)NMSU(dot)Edu>
To: bruce(at)cenderis(dot)demon(dot)co(dot)uk
Cc: dwj(at)aaronsrod(dot)com, pgsql-questions(at)postgreSQL(dot)org, hackers(at)postgreSQL(dot)org
Subject: Re: [QUESTIONS] warning: tcl support disabled
Date: 1998-04-08 04:13:38
Message-ID: 199804080413.WAA15876@trillium.nmsu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Anyway, the problem is that configure is trying to link a main program
with -ltk8.0, which will fail *even if libtk8.0 is present*. The
reason is that libTk requires both Tcl and the X libraries in order to
link successfully.

I guess this may only be a problem with shared libraries, because this
didn't occur for me when I had the static versions. Sorry about
that. A more complete integration of the solution with my earlier
patch follows. Note that this patch should be applied afer the
earlier one, then autoconf run to reconstruct the configure script.

Hope this works for all.

Cheers,
Brook

===========================================================================
--- configure.in.orig Tue Apr 7 20:55:44 1998
+++ configure.in Tue Apr 7 22:05:44 1998
@@ -639,6 +639,17 @@

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="$TCL_LIB $X_PRE_LIBS $X11_LIBS $X_EXTRA_LIBS $LIBS"
+ CFLAGS="$CFLAGS $X_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ LDFLAGS="$LDFLAGS $X_LIBS"
+
TK_LIB=
tk_libs="tk8.0 tk80 tk4.2 tk42 tk"
for tk_lib in $tk_libs; do
@@ -653,6 +664,11 @@
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 )

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dwight Johnson 1998-04-08 07:58:42 Re: [QUESTIONS] warning: tcl support disabled
Previous Message Toshiaki Okuda 1998-04-08 03:00:01