Re: [HACKERS] mega-patch--tcl/tk configuration

From: Tom Ivar Helbekkmo <tih(at)Hamartun(dot)Priv(dot)NO>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: scrappy(at)hub(dot)org (The Hermit Hacker), brook(at)trillium(dot)NMSU(dot)Edu, hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] mega-patch--tcl/tk configuration
Date: 1998-03-23 19:59:10
Message-ID: 86u38pch69.fsf@barsoom.Hamartun.Priv.NO
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Marc wrote:

| Having it search several directories in order of preference, IMHO, is
| proper behaviour for configure...it should remain as version search
| instead of "just tcl.h"...

Bruce answered:

| OK, go ahead. I did fix several problem with the tcl/tk stuff also.
| For example, if it found /usr/include/tk.h, the flag would be -I with no
| directory, causing any compile to fail.

While you guys are thinking about this, let me remind you of the
following patch for these problems that I sent you on March 2nd. It
fixes the problem Bruce mentions, and extends the version checking to
include the last versions of TCL and TK prior to 8.0 -- since I can
observe here that they do work.

Marc's argument that version numbers have to stay where TCL/TK is
involved is very important: they are nearly always incompatible with
themselves in preceding and following versions, making it necessary
for a typical site to have one complete TCL/TK installation for each
and every application that uses the damn things. (You may recall that
I expressed amazement at my discovery that I could use 7.6/4.2 with
both Scotty and PostgreSQL.)

Anyway, my take on the --with-tcl (and --with-perl) things, relative
to PostgreSQL 6.3:

*** configure.in.orig Mon Mar 2 06:33:14 1998
--- configure.in Mon Mar 2 21:42:59 1998
***************
*** 239,246 ****
AC_ARG_WITH(
tcl,
[ --with-tcl use tcl ],
! USE_TCL=true AC_MSG_RESULT(enabled),
! USE_TCL=false AC_MSG_RESULT(disabled)
)
export USE_TCL
USE_X=$USE_TCL
--- 239,246 ----
AC_ARG_WITH(
tcl,
[ --with-tcl use tcl ],
! USE_TCL=true; AC_MSG_RESULT(enabled),
! USE_TCL=false; AC_MSG_RESULT(disabled)
)
export USE_TCL
USE_X=$USE_TCL
***************
*** 250,257 ****
AC_ARG_WITH(
perl,
[ --with-perl use perl ],
! USE_PERL=true AC_MSG_RESULT(enabled),
! USE_PERL=false AC_MSG_RESULT(disabled)
)
export USE_PERL

--- 250,257 ----
AC_ARG_WITH(
perl,
[ --with-perl use perl ],
! USE_PERL=true; AC_MSG_RESULT(enabled),
! USE_PERL=false; AC_MSG_RESULT(disabled)
)
export USE_PERL

***************
*** 563,570 ****
if test "$USE_TCL" = "true"
then
TCL_INCDIR=no
! AC_CHECK_HEADER(tcl.h, TCL_INCDIR=)
! for f in /usr/include /usr/include/tcl8.0 /usr/local/include /usr/local/include/tcl8.0; do
if test "$TCL_INCDIR" = "no"; then
AC_CHECK_HEADER($f/tcl.h, TCL_INCDIR=$f)
fi
--- 563,569 ----
if test "$USE_TCL" = "true"
then
TCL_INCDIR=no
! for f in /usr/include /usr/include/tcl8.0 /usr/include/tcl7.6 /usr/local/include /usr/local/include/tcl8.0 /usr/local/include/tcl7.6; do
if test "$TCL_INCDIR" = "no"; then
AC_CHECK_HEADER($f/tcl.h, TCL_INCDIR=$f)
fi
***************
*** 580,586 ****
if test "$USE_TCL" = "true"
then
TCL_LIB=
! for f in tcl8.0 tcl80; do
if test -z "$TCL_LIB"; then
AC_CHECK_LIB($f, main, TCL_LIB=$f)
fi
--- 579,585 ----
if test "$USE_TCL" = "true"
then
TCL_LIB=
! for f in tcl8.0 tcl80 tcl7.6 tcl76; do
if test -z "$TCL_LIB"; then
AC_CHECK_LIB($f, main, TCL_LIB=$f)
fi
***************
*** 606,616 ****
ice_save_CPPFLAGS="$CPPFLAGS"
ice_save_LDFLAGS="$LDFLAGS"

CPPFLAGS="$CPPFLAGS $X_CFLAGS -I$TCL_INCDIR"

TK_INCDIR=no
! AC_CHECK_HEADER(tk.h, TK_INCDIR=)
! for f in /usr/include /usr/include/tk8.0 /usr/local/include /usr/local/include/tk8.0; do
if test "$TK_INCDIR" = "no"; then
AC_CHECK_HEADER($f/tk.h, TK_INCDIR=$f)
fi
--- 605,619 ----
ice_save_CPPFLAGS="$CPPFLAGS"
ice_save_LDFLAGS="$LDFLAGS"

+ if test "$TCL_INCDIR" = ""
+ then
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ else
CPPFLAGS="$CPPFLAGS $X_CFLAGS -I$TCL_INCDIR"
+ fi

TK_INCDIR=no
! for f in /usr/include /usr/include/tk8.0 /usr/include/tk4.2 /usr/local/include /usr/local/include/tk8.0 /usr/local/include/tk4.2; do
if test "$TK_INCDIR" = "no"; then
AC_CHECK_HEADER($f/tk.h, TK_INCDIR=$f)
fi
***************
*** 631,637 ****
if test "$USE_TCL" = "true"
then
TK_LIB=
! for f in tk8.0 tk80; do
if test -z "$TK_LIB"; then
AC_CHECK_LIB($f, main, TK_LIB=$f)
fi
--- 634,640 ----
if test "$USE_TCL" = "true"
then
TK_LIB=
! for f in tk8.0 tk80 tk4.2 tk42; do
if test -z "$TK_LIB"; then
AC_CHECK_LIB($f, main, TK_LIB=$f)
fi
*** configure.orig Mon Mar 2 15:55:42 1998
--- configure Mon Mar 2 21:43:39 1998
***************
*** 825,833 ****
# Check whether --with-tcl or --without-tcl was given.
if test "${with_tcl+set}" = set; then
withval="$with_tcl"
! USE_TCL=true echo "$ac_t""enabled" 1>&6
else
! USE_TCL=false echo "$ac_t""disabled" 1>&6

fi

--- 825,833 ----
# Check whether --with-tcl or --without-tcl was given.
if test "${with_tcl+set}" = set; then
withval="$with_tcl"
! USE_TCL=true; echo "$ac_t""enabled" 1>&6
else
! USE_TCL=false; echo "$ac_t""disabled" 1>&6

fi

***************
*** 839,847 ****
# Check whether --with-perl or --without-perl was given.
if test "${with_perl+set}" = set; then
withval="$with_perl"
! USE_PERL=true echo "$ac_t""enabled" 1>&6
else
! USE_PERL=false echo "$ac_t""disabled" 1>&6

fi

--- 839,847 ----
# Check whether --with-perl or --without-perl was given.
if test "${with_perl+set}" = set; then
withval="$with_perl"
! USE_PERL=true; echo "$ac_t""enabled" 1>&6
else
! USE_PERL=false; echo "$ac_t""disabled" 1>&6

fi

***************
*** 5393,5432 ****
if test "$USE_TCL" = "true"
then
TCL_INCDIR=no
! ac_safe=`echo "tcl.h" | sed 'y%./+-%__p_%'`
! echo $ac_n "checking for tcl.h""... $ac_c" 1>&6
! echo "configure:5399: checking for tcl.h" >&5
! if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
! echo $ac_n "(cached) $ac_c" 1>&6
! else
! cat > conftest.$ac_ext <<EOF
! #line 5404 "configure"
! #include "confdefs.h"
! #include <tcl.h>
! EOF
! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:5409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
! if test -z "$ac_err"; then
! rm -rf conftest*
! eval "ac_cv_header_$ac_safe=yes"
! else
! echo "$ac_err" >&5
! echo "configure: failed program was:" >&5
! cat conftest.$ac_ext >&5
! rm -rf conftest*
! eval "ac_cv_header_$ac_safe=no"
! fi
! rm -f conftest*
! fi
! if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
! echo "$ac_t""yes" 1>&6
! TCL_INCDIR=
! else
! echo "$ac_t""no" 1>&6
! fi
!
! for f in /usr/include /usr/include/tcl8.0 /usr/local/include /usr/local/include/tcl8.0; do
if test "$TCL_INCDIR" = "no"; then
ac_safe=`echo "$f/tcl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $f/tcl.h""... $ac_c" 1>&6
--- 5393,5399 ----
if test "$USE_TCL" = "true"
then
TCL_INCDIR=no
! for f in /usr/include /usr/include/tcl8.0 /usr/include/tcl7.6 /usr/local/include /usr/local/include/tcl8.0 /usr/local/include/tcl7.6; do
if test "$TCL_INCDIR" = "no"; then
ac_safe=`echo "$f/tcl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $f/tcl.h""... $ac_c" 1>&6
***************
*** 5473,5479 ****
if test "$USE_TCL" = "true"
then
TCL_LIB=
! for f in tcl8.0 tcl80; do
if test -z "$TCL_LIB"; then
echo $ac_n "checking for main in -l$f""... $ac_c" 1>&6
echo "configure:5480: checking for main in -l$f" >&5
--- 5440,5446 ----
if test "$USE_TCL" = "true"
then
TCL_LIB=
! for f in tcl8.0 tcl80 tcl7.6 tcl76; do
if test -z "$TCL_LIB"; then
echo $ac_n "checking for main in -l$f""... $ac_c" 1>&6
echo "configure:5480: checking for main in -l$f" >&5
***************
*** 5531,5573 ****
ice_save_CPPFLAGS="$CPPFLAGS"
ice_save_LDFLAGS="$LDFLAGS"

! CPPFLAGS="$CPPFLAGS $X_CFLAGS -I$TCL_INCDIR"
!
! TK_INCDIR=no
! ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
! echo $ac_n "checking for tk.h""... $ac_c" 1>&6
! echo "configure:5540: checking for tk.h" >&5
! if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
! echo $ac_n "(cached) $ac_c" 1>&6
! else
! cat > conftest.$ac_ext <<EOF
! #line 5545 "configure"
! #include "confdefs.h"
! #include <tk.h>
! EOF
! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:5550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
! if test -z "$ac_err"; then
! rm -rf conftest*
! eval "ac_cv_header_$ac_safe=yes"
! else
! echo "$ac_err" >&5
! echo "configure: failed program was:" >&5
! cat conftest.$ac_ext >&5
! rm -rf conftest*
! eval "ac_cv_header_$ac_safe=no"
! fi
! rm -f conftest*
! fi
! if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
! echo "$ac_t""yes" 1>&6
! TK_INCDIR=
else
! echo "$ac_t""no" 1>&6
fi

! for f in /usr/include /usr/include/tk8.0 /usr/local/include /usr/local/include/tk8.0; do
if test "$TK_INCDIR" = "no"; then
ac_safe=`echo "$f/tk.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $f/tk.h""... $ac_c" 1>&6
--- 5498,5512 ----
ice_save_CPPFLAGS="$CPPFLAGS"
ice_save_LDFLAGS="$LDFLAGS"

! if test "$TCL_INCDIR" = ""
! then
! CPPFLAGS="$CPPFLAGS $X_CFLAGS"
else
! CPPFLAGS="$CPPFLAGS $X_CFLAGS -I$TCL_INCDIR"
fi

! TK_INCDIR=no
! for f in /usr/include /usr/include/tk8.0 /usr/include/tk4.2 /usr/local/include /usr/local/include/tk8.0 /usr/local/include/tk4.2; do
if test "$TK_INCDIR" = "no"; then
ac_safe=`echo "$f/tk.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $f/tk.h""... $ac_c" 1>&6
***************
*** 5619,5625 ****
if test "$USE_TCL" = "true"
then
TK_LIB=
! for f in tk8.0 tk80; do
if test -z "$TK_LIB"; then
echo $ac_n "checking for main in -l$f""... $ac_c" 1>&6
echo "configure:5626: checking for main in -l$f" >&5
--- 5558,5564 ----
if test "$USE_TCL" = "true"
then
TK_LIB=
! for f in tk8.0 tk80 tk4.2 tk42; do
if test -z "$TK_LIB"; then
echo $ac_n "checking for main in -l$f""... $ac_c" 1>&6
echo "configure:5626: checking for main in -l$f" >&5

-tih
--
Popularity is the hallmark of mediocrity. --Niles Crane, "Frasier"

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Darren King 1998-03-23 20:39:11 Re: [HACKERS] char types gone.
Previous Message brian paul rickabaugh 1998-03-23 19:50:56 C++ Interface