
 See:

./configure     --prefix=/usr/lib/postgresql \
                --with-unixodbc \
                --enable-odbc \
                --with-openssl \
                --with-pam \
                --with-python \
                --with-perl \
                --with-tcl \
                --enable-nls \
                --enable-multibyte \
                --enable-recode \
                --enable-locale

 [--cut--]
 checking for tclsh... /usr/bin/tclsh
 checking for tclConfig.sh... /usr/lib/tcl8.3/tclConfig.sh
 checking for tkConfig.sh... no
 configure: error: file `tkConfig.sh' is required for Tk

 ..hmm, I try:

 $ ls -la /usr/lib/tk8.3/tkConfig.sh
 -rw-r--r--    1 root     root         3194 Oct 27 10:00
 /usr/lib/tk8.3/tkConfig.sh

 
 If I define directly path by --with-tkconfig=/usr/lib/tk8.3 it pass. 
 But why is it needful for tkConfig.sh if it's at very simular place 
 as tclConfig.sh?

 /usr/lib/tcl8.3/tclConfig.sh
 /usr/lib/tk8.3/tkConfig.sh

 Comments?

        Karel

-- 
 Karel Zak  <zakkr@zf.jcu.cz>
 http://home.zf.jcu.cz/~zakkr/
 
 C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz

Thu, 20 Dec 2001 14:53:07 +0100
Karel Zak <zakkr@zf.jcu.cz>
tkConfig.sh vs. ./configure
Karel Zak <zakkr@zf.jcu.cz> writes:
>  checking for tclConfig.sh... /usr/lib/tcl8.3/tclConfig.sh
>  checking for tkConfig.sh... no
>  configure: error: file `tkConfig.sh' is required for Tk
 
>  If I define directly path by --with-tkconfig=/usr/lib/tk8.3 it pass. 
>  But why is it needful for tkConfig.sh if it's at very simular place 
>  as tclConfig.sh?

It looks like the default way to find the search path for these things
is to ask Tcl, via
        echo 'puts $auto_path' | $TCLSH

Unfortunately tclsh is only going to answer about plain Tcl, not Tk.
We'd need to ask wish to get the path for Tk stuff.  For example,
I get

$ tclsh
% puts $auto_path
/usr/local/lib/tcl8.0 /usr/local/lib

$ wish
% puts $auto_path
/usr/local/lib/tcl8.0 /usr/local/lib /usr/local/lib/tk8.0

Asking wish does not seem like a good idea, since it will fail to fire
up if you aren't in an X environment.

However, on my machine both tclConfig.sh and tkConfig.sh are in
/usr/local/lib, not in the subdirectories.  Putting them in
version-specific subdirectories seems pretty self-defeating.
What packaging of tcl/tk did you use?

			regards, tom lane

Thu, 20 Dec 2001 10:20:34 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: tkConfig.sh vs. ./configure 
On Thu, Dec 20, 2001 at 10:20:34AM -0500, Tom Lane wrote:
> Karel Zak <zakkr@zf.jcu.cz> writes:

> However, on my machine both tclConfig.sh and tkConfig.sh are in
> /usr/local/lib, not in the subdirectories.  Putting them in
> version-specific subdirectories seems pretty self-defeating.
> What packaging of tcl/tk did you use?

 Latest unstable GNU/Linux Debian. Tcl 8.3.3-1, Tk 8.3.3-1.
 
        Karel

-- 
 Karel Zak  <zakkr@zf.jcu.cz>
 http://home.zf.jcu.cz/~zakkr/
 
 C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz

Thu, 20 Dec 2001 16:36:18 +0100
Karel Zak <zakkr@zf.jcu.cz>
Re: tkConfig.sh vs. ./configure
Karel Zak <zakkr@zf.jcu.cz> writes:
> On Thu, Dec 20, 2001 at 10:20:34AM -0500, Tom Lane wrote:
>> What packaging of tcl/tk did you use?

>  Latest unstable GNU/Linux Debian. Tcl 8.3.3-1, Tk 8.3.3-1.

I think the Debian packager blew it.

I just looked at a Red Hat 7.2 machine, and it has both tclConfig.sh
and tkConfig.sh in /usr/lib.

			regards, tom lane

Thu, 20 Dec 2001 10:42:41 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: tkConfig.sh vs. ./configure 
Karel Zak writes:

>  [--cut--]
>  checking for tclsh... /usr/bin/tclsh
>  checking for tclConfig.sh... /usr/lib/tcl8.3/tclConfig.sh
>  checking for tkConfig.sh... no
>  configure: error: file `tkConfig.sh' is required for Tk
>
>  ..hmm, I try:
>
>  $ ls -la /usr/lib/tk8.3/tkConfig.sh
>  -rw-r--r--    1 root     root         3194 Oct 27 10:00
>  /usr/lib/tk8.3/tkConfig.sh

The tclConfig.sh file is found by looking into the path returned by `echo
'puts $auto_path' | tclsh`.

Then theoretically, the tkConfig.sh file should be found by looking into
the path returned by `echo 'puts $auto_path' | wish`, which would indeed
give the right answer, but when I execute that, wish also opens a window
on my desktop and hangs, which is not exactly what you'd want during a
configure run.

If you have a plan to work around that and the case where X is not running
during configuration, then I'm all ears.

-- 
Peter Eisentraut   peter_e@gmx.net


Thu, 20 Dec 2001 18:13:12 +0100 (CET)
Peter Eisentraut <peter_e@gmx.net>
Re: tkConfig.sh vs. ./configure
>>>Peter Eisentraut said:
 > Karel Zak writes:
 > 
 > >  [--cut--]
 > >  checking for tclsh... /usr/bin/tclsh
 > >  checking for tclConfig.sh... /usr/lib/tcl8.3/tclConfig.sh
 > >  checking for tkConfig.sh... no
 > >  configure: error: file `tkConfig.sh' is required for Tk
 > >
 > >  ..hmm, I try:
 > >
 > >  $ ls -la /usr/lib/tk8.3/tkConfig.sh
 > >  -rw-r--r--    1 root     root         3194 Oct 27 10:00
 > >  /usr/lib/tk8.3/tkConfig.sh
 > 
 > The tclConfig.sh file is found by looking into the path returned by `echo
 > 'puts $auto_path' | tclsh`.
 > 
 > Then theoretically, the tkConfig.sh file should be found by looking into
 > the path returned by `echo 'puts $auto_path' | wish`, which would indeed
 > give the right answer, but when I execute that, wish also opens a window
 > on my desktop and hangs, which is not exactly what you'd want during a
 > configure run.

What about `echo 'puts $auto_path; exit' | wish'?

Daniel



Thu, 20 Dec 2001 19:29:35 +0200
Daniel Kalchev <daniel@digsys.bg>
Re: tkConfig.sh vs. ./configure 
On Thu, Dec 20, 2001 at 06:13:12PM +0100, Peter Eisentraut wrote:

> The tclConfig.sh file is found by looking into the path returned by `echo
> 'puts $auto_path' | tclsh`.
> 
> Then theoretically, the tkConfig.sh file should be found by looking into
> the path returned by `echo 'puts $auto_path' | wish`, which would indeed

 In the X-win:

 $ echo 'puts $auto_path; exit' | wish
 /usr/lib/tcl8.3 /usr/lib /usr/lib/tk8.3

 it's right, but really ugly is that it require X display. 
 
 $ echo 'puts $auto_path; exit' | wish
 Application initialization failed: no display name and no $DISPLAY
 environment variable


 The other thing is that tcl*.h and tk.h files are in /usr/inlude/tcl8.3,
 and 

$ ./configure     --prefix=/usr/lib/postgresql \
                  --with-tcl \
                  --with-tkconfig=/usr/lib/tk8.3/
 
 finish with:

make[4]: Leaving directory `/var/home/PG_DEVEL/pgsql/src/interfaces/libpgtcl'
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpgtcl -I../../../src/include  -I/usr/X11R6/include  -c -o pgtkAppInit.o pgtkAppInit.c
pgtkAppInit.c:15: tk.h: No such file or directory
make[3]: *** [pgtkAppInit.o] Error 1

 (yes, I know --includedir= etc., but it's _standard_ latest unstable
  Debian...)  

        Karel

-- 
 Karel Zak  <zakkr@zf.jcu.cz>
 http://home.zf.jcu.cz/~zakkr/
 
 C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz

Thu, 20 Dec 2001 19:00:20 +0100
Karel Zak <zakkr@zf.jcu.cz>
Re: tkConfig.sh vs. ./configure
Karel Zak <zakkr@zf.jcu.cz> writes:
>  The other thing is that tcl*.h and tk.h files are in /usr/inlude/tcl8.3,

There's not a darn thing we can do about that, because tclConfig.sh
doesn't tell exactly where the include files are (which is Tcl's
oversight, but we're stuck with it).  We could try "$TCL_PREFIX/include",
which'd work on standard Tcl install layouts, but Debian has evidently
managed to botch that too.

>  (yes, I know --includedir= etc., but it's _standard_ latest unstable
>   Debian...)  

It may be Debian's idea of standard, but that doesn't mean it's not
broken.  How are we supposed to guess where they are hiding these files,
short of searching the entire filesystem?

			regards, tom lane

Thu, 20 Dec 2001 13:29:42 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: tkConfig.sh vs. ./configure 
On Thu, Dec 20, 2001 at 01:29:42PM -0500, Tom Lane wrote:
> Karel Zak <zakkr@zf.jcu.cz> writes:
> >  The other thing is that tcl*.h and tk.h files are in /usr/inlude/tcl8.3,
> 
> There's not a darn thing we can do about that, because tclConfig.sh
> doesn't tell exactly where the include files are (which is Tcl's
> oversight, but we're stuck with it).  We could try "$TCL_PREFIX/include",
> which'd work on standard Tcl install layouts, but Debian has evidently
> managed to botch that too.
> 
> >  (yes, I know --includedir= etc., but it's _standard_ latest unstable
> >   Debian...)  
> 
> It may be Debian's idea of standard, but that doesn't mean it's not

 I agree, but change of this is probably out of our possibility...

> broken.  How are we supposed to guess where they are hiding these files,
> short of searching the entire filesystem?


 I see debian/rule (build system) of tkdvi package and here is 
 
    ./configure --with-tcl=/usr/lib/tcl8.3 \
                --with-tk=/usr/lib/tk8.3 \
                --with-tclinclude=/usr/include/tcl8.3 \
                --with-tkinclude=/usr/include/tcl8.3

        Karel
 
-- 
 Karel Zak  <zakkr@zf.jcu.cz>
 http://home.zf.jcu.cz/~zakkr/
 
 C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz

Thu, 20 Dec 2001 19:48:16 +0100
Karel Zak <zakkr@zf.jcu.cz>
Re: tkConfig.sh vs. ./configure

Was this resolved?

---------------------------------------------------------------------------

> On Thu, Dec 20, 2001 at 01:29:42PM -0500, Tom Lane wrote:
> > Karel Zak <zakkr@zf.jcu.cz> writes:
> > >  The other thing is that tcl*.h and tk.h files are in /usr/inlude/tcl8.3,
> > 
> > There's not a darn thing we can do about that, because tclConfig.sh
> > doesn't tell exactly where the include files are (which is Tcl's
> > oversight, but we're stuck with it).  We could try "$TCL_PREFIX/include",
> > which'd work on standard Tcl install layouts, but Debian has evidently
> > managed to botch that too.
> > 
> > >  (yes, I know --includedir= etc., but it's _standard_ latest unstable
> > >   Debian...)  
> > 
> > It may be Debian's idea of standard, but that doesn't mean it's not
> 
>  I agree, but change of this is probably out of our possibility...
> 
> > broken.  How are we supposed to guess where they are hiding these files,
> > short of searching the entire filesystem?
> 
> 
>  I see debian/rule (build system) of tkdvi package and here is 
>  
>     ./configure --with-tcl=/usr/lib/tcl8.3 \
>                 --with-tk=/usr/lib/tk8.3 \
>                 --with-tclinclude=/usr/include/tcl8.3 \
>                 --with-tkinclude=/usr/include/tcl8.3
> 
>         Karel
>  
> -- 
>  Karel Zak  <zakkr@zf.jcu.cz>
>  http://home.zf.jcu.cz/~zakkr/
>  
>  C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
> http://www.postgresql.org/users-lounge/docs/faq.html
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@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

Sat, 29 Dec 2001 16:44:18 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: tkConfig.sh vs. ./configure