* [PATCH/itcl] Fix itkConfig.sh
@ 2008-08-02 20:36 Keith Seitz
2008-08-02 21:24 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Keith Seitz @ 2008-08-02 20:36 UTC (permalink / raw)
To: insight
[-- Attachment #1: Type: text/plain, Size: 732 bytes --]
Hi,
Well, I don't know exactly how the upstream Itk sources ever output a
correct itkConfig.sh, but I've committed the attached patch which fixes
it. Which really means that it now outputs useful information into
itkConfig.sh.
I simply used the Itcl configure.ac/itclConfig.sh as templates and
forced this onto their corresponding itk/ files.
Please let me know if there are any further problems with this.
Keith
ChangeLog
2008-08-02 Keith Seitz <keiths@redhat.com>
* itk/configure.ac: Add missing bits to actually fill in
itkConfig.sh.
* itk/itkConfig.sh.in: Rewrite substitution values so that
this file looks more like itcl/itclConfig.sh.in.
* itk/configure: Regenerated.
[-- Attachment #2: itkConfig-sh.patch --]
[-- Type: text/x-patch, Size: 4554 bytes --]
Index: itk/configure.ac
===================================================================
RCS file: /cvs/src/src/itcl/itk/configure.ac,v
retrieving revision 1.1
diff -u -p -r1.1 configure.ac
--- itk/configure.ac 23 Jul 2008 22:44:51 -0000 1.1
+++ itk/configure.ac 2 Aug 2008 20:31:13 -0000
@@ -219,7 +219,9 @@ fi
# library.
#--------------------------------------------------------------------
-AC_SUBST(itkstub_LIB_FILE)
+itk_STUB_LIB_FILE=${PKG_STUB_LIB_FILE}
+itk_LIB_FILE=${PKG_LIB_FILE}
+AC_SUBST(itk_STUB_LIB_FILE)
AC_SUBST(itk_LIB_FILE)
#--------------------------------------------------------------------
@@ -234,6 +236,39 @@ TEA_PROG_TCLSH
TEA_PROG_WISH
#--------------------------------------------------------------------
+# These are for itkConfig.sh
+#--------------------------------------------------------------------
+
+# pkglibdir must be a fully qualified path and (not ${exec_prefix/lib)
+eval pkglibdir="${libdir}/${PACKAGE_NAME}${PACKAGE_VERSION}"
+if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
+ eval itk_LIB_FLAG="-litk${PACKAGE_VERSION}${DBGX}"
+ eval itk_STUB_LIB_FLAG="-litclstub${PACKAGE_VERSION}${DBGX}"
+else
+ eval itk_LIB_FLAG="-litcl`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
+ eval itk_STUB_LIB_FLAG="-litcl`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
+fi
+itk_BUILD_LIB_SPEC="-L`pwd` ${itk_LIB_FLAG}"
+itk_LIB_SPEC="-L${pkglibdir} ${itk_LIB_FLAG}"
+
+itk_BUILD_STUB_LIB_SPEC="-L`pwd` ${itk_STUB_LIB_FLAG}"
+itk_STUB_LIB_SPEC="-L${pkglibdir} ${itk_STUB_LIB_FLAG}"
+itk_BUILD_STUB_LIB_PATH="`pwd`/${itk_STUB_LIB_FILE}"
+itk_STUB_LIB_PATH="${pkglibdir}/${itk_STUB_LIB_FILE}"
+
+AC_SUBST(itk_BUILD_LIB_SPEC)
+AC_SUBST(itk_LIB_SPEC)
+AC_SUBST(itk_BUILD_STUB_LIB_SPEC)
+AC_SUBST(itk_STUB_LIB_SPEC)
+AC_SUBST(itk_BUILD_STUB_LIB_PATH)
+AC_SUBST(itk_STUB_LIB_PATH)
+
+# itk_SRC_DIR must be a fully qualified path
+eval itk_SRC_DIR="$srcdir"
+itk_SRC_DIR=`cd "${itk_SRC_DIR}"; pwd`
+AC_SUBST(itk_SRC_DIR)
+
+#--------------------------------------------------------------------
# Finally, substitute all of the various values into the Makefile.
#--------------------------------------------------------------------
Index: itk/itkConfig.sh.in
===================================================================
RCS file: /cvs/src/src/itcl/itk/itkConfig.sh.in,v
retrieving revision 1.6
diff -u -p -r1.6 itkConfig.sh.in
--- itk/itkConfig.sh.in 23 Jul 2008 22:44:51 -0000 1.6
+++ itk/itkConfig.sh.in 2 Aug 2008 20:31:13 -0000
@@ -12,29 +12,41 @@
# The information in this file is specific to a single platform.
# Itcl's version number.
-ITCL_VERSION='@ITCL_VERSION@'
+itk_VERSION='@PACKAGE_VERSION@'
+ITK_VERSION='@PACKAGE_VERSION@'
# The name of the Itk library (may be either a .a file or a shared library):
-ITK_LIB_FILE=@ITK_LIB_FILE@
+itk_LIB_FILE=@itk_LIB_FILE@
+ITK_LIB_FILE=@itk_LIB_FILE@
# String to pass to linker to pick up the Itk library from its
# build directory.
-ITK_BUILD_LIB_SPEC='@ITK_BUILD_LIB_SPEC@'
+itk_BUILD_LIB_SPEC='@itk_BUILD_LIB_SPEC@'
+ITK_BUILD_LIB_SPEC='@itk_BUILD_LIB_SPEC@'
# String to pass to linker to pick up the Itk library from its
# installed directory.
-ITK_LIB_SPEC='@ITK_LIB_SPEC@'
+itk_LIB_SPEC='@itk_LIB_SPEC@'
+ITK_LIB_SPEC='@itk_LIB_SPEC@'
# The name of the Itk stub library (a .a file):
-ITK_STUB_LIB_FILE=@ITK_STUB_LIB_FILE@
+itk_STUB_LIB_FILE=@itk_STUB_LIB_FILE@
+ITK_STUB_LIB_FILE=@itk_STUB_LIB_FILE@
# String to pass to linker to pick up the Itk stub library from its
# build directory.
-ITK_BUILD_STUB_LIB_SPEC='@ITK_BUILD_STUB_LIB_SPEC@'
+itk_BUILD_STUB_LIB_SPEC='@itk_BUILD_STUB_LIB_SPEC@'
+ITK_BUILD_STUB_LIB_SPEC='@itk_BUILD_STUB_LIB_SPEC@'
# String to pass to linker to pick up the Itk stub library from its
# installed directory.
-ITK_STUB_LIB_SPEC='@ITK_STUB_LIB_SPEC@'
+itk_STUB_LIB_SPEC='@itk_STUB_LIB_SPEC@'
+ITK_STUB_LIB_SPEC='@itk_STUB_LIB_SPEC@'
+
+# String to pass to linker to pick up the Itk stub library from its
+# build directory.
+itk_BUILD_STUB_LIB_PATH='@itk_BUILD_STUB_LIB_PATH@'
+ITK_BUILD_STUB_LIB_PATH='@itk_BUILD_STUB_LIB_PATH@'
# Location of the top-level source directories from which [incr Tk]
# was built. This is the directory that contains a README file as well
@@ -42,4 +54,5 @@ ITK_STUB_LIB_SPEC='@ITK_STUB_LIB_SPEC@'
# compiled in a different place than the directory containing the source
# files, this points to the location of the sources, not the location
# where [incr Tk] was compiled.
-ITK_SRC_DIR='@ITK_SRC_DIR@'
+itk_SRC_DIR='@itk_SRC_DIR@'
+ITK_SRC_DIR='@itk_SRC_DIR@'
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH/itcl] Fix itkConfig.sh
2008-08-02 20:36 [PATCH/itcl] Fix itkConfig.sh Keith Seitz
@ 2008-08-02 21:24 ` Tom Tromey
2008-08-02 21:30 ` Keith Seitz
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2008-08-02 21:24 UTC (permalink / raw)
To: Keith Seitz; +Cc: insight
>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
Keith> Please let me know if there are any further problems with this.
Thanks, it builds fine for me.
Unfortunately now it won't start:
opsy. ./gdb
./gdb: error while loading shared libraries: libitcl3.3.so: cannot open shared object file: No such file or directory
The shared libraries are installed in install/lib/itk3.3 and
install/lib/itcl3.3. I think just install/lib would be preferable.
Also, it seems to me that the test suite ought to set LD_LIBRARY_PATH
somewhere. I didn't see anything for this; without it, 'make check'
fails a lot.
Is there some other way I ought to be doing this? Like, maybe I
should just install the system itcl... ?
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH/itcl] Fix itkConfig.sh
2008-08-02 21:24 ` Tom Tromey
@ 2008-08-02 21:30 ` Keith Seitz
0 siblings, 0 replies; 3+ messages in thread
From: Keith Seitz @ 2008-08-02 21:30 UTC (permalink / raw)
To: Tom Tromey; +Cc: insight
Tom Tromey wrote:
> Unfortunately now it won't start:
>
> opsy. ./gdb
> ./gdb: error while loading shared libraries: libitcl3.3.so: cannot open shared object file: No such file or directory
Yeah, you're going to need to add those to LD_LIBRARY_PATH... Or maybe I
could add something to gdbtk_init to do that for us? I guess I'll get to
that when I'm "finished" with ripping it out.
FWIW, I do not plan to use the in-tree tcl, tk, and itcl anymore. Only
the system-supplied ones. I (will) consider building insight with
src/tcl, src/tk, and src/itcl deprecated. Hopefully, in a few hours. :-)
> The shared libraries are installed in install/lib/itk3.3 and
> install/lib/itcl3.3. I think just install/lib would be preferable.
This is where the upstream sources put them since Itcl and Itk are now
using the TEA. I am hesitant (but not unwilling) to change this if there
is need.
> Also, it seems to me that the test suite ought to set LD_LIBRARY_PATH
> somewhere. I didn't see anything for this; without it, 'make check'
> fails a lot.
Ugh. I didn't even consider that. Hacking gdbtk_init for LD_LIBRARY_PATH
sounds more and more like a better idea: it kills two birds with one stone.
> Is there some other way I ought to be doing this? Like, maybe I
> should just install the system itcl... ?
Well, for my sanity, I would recommend that you switch to installing
system tcl, tk, and itcl when I commit the final changes. It'll mean
less work for me! :-P
Won't be long now...
Keith
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-08-02 21:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-02 20:36 [PATCH/itcl] Fix itkConfig.sh Keith Seitz
2008-08-02 21:24 ` Tom Tromey
2008-08-02 21:30 ` Keith Seitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).