summaryrefslogtreecommitdiff
blob: a6965bc1fd37969202544c462943b5db849e6cab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
@@ -, +, @@ 
 itk/Makefile.in     |    2 +-
 itk/configure.in    |   23 +++++++++++++++++++++++
 itk/itkConfig.sh.in |   28 +++++++++++-----------------
 3 files changed, 35 insertions(+), 18 deletions(-)
--- a/itk/Makefile.in	
+++ a/itk/Makefile.in	
@@ -395,7 +395,7 @@ install-lib-binaries:
 	  fi; \
 	done
 	$(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir)
-	: $(INSTALL_DATA) itkConfig.sh $(DESTDIR)$(libdir)
+	$(INSTALL_DATA) itkConfig.sh $(DESTDIR)$(libdir)
 
 #========================================================================
 # Install binary executables (e.g. .exe files)
--- a/itk/configure.in	
+++ a/itk/configure.in	
@@ -219,6 +219,7 @@ fi
 # library.
 #--------------------------------------------------------------------
 
+itk_LIB_FILE=${PKG_LIB_FILE}
 AC_SUBST(itkstub_LIB_FILE)
 AC_SUBST(itk_LIB_FILE)
 
@@ -234,6 +235,28 @@ 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}"
+else
+    eval itk_LIB_FLAG="-litk`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
+fi
+itk_BUILD_LIB_SPEC="-L`pwd` ${itk_LIB_FLAG}"
+itk_LIB_SPEC="-L${pkglibdir} ${itk_LIB_FLAG}"
+
+AC_SUBST(itk_BUILD_LIB_SPEC)
+AC_SUBST(itk_LIB_SPEC)
+
+# 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.
 #--------------------------------------------------------------------
 
--- a/itk/itkConfig.sh.in	
+++ a/itk/itkConfig.sh.in	
@@ -11,30 +11,23 @@ 
 #
 # The information in this file is specific to a single platform.
 
-# Itcl's version number.
-ITCL_VERSION='@ITCL_VERSION@'
+# Itk's version number.
+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@'
-
-# The name of the Itk stub library (a .a 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@'
-
-# 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_LIB_SPEC='@itk_LIB_SPEC@'
+ITK_LIB_SPEC='@itk_LIB_SPEC@'
 
 # 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 +35,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@'