File: configure.in.tk

package info (click to toggle)
vic 2.8ucl4-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 5,864 kB
  • ctags: 9,033
  • sloc: ansic: 56,989; cpp: 44,560; tcl: 5,550; sh: 1,382; perl: 1,329; makefile: 357
file content (301 lines) | stat: -rw-r--r-- 6,952 bytes parent folder | download
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
dnl autoconf rules to find tcl & tk 
dnl $Header: /cs/research/mice/starship/src/local/CVS_repository/vic/configure.in.tk,v 1.4 1999/04/23 14:42:57 piers Exp $ (LBL)

ARCH=`uname`
case $ARCH in
IRIX)
  OPSYS=irix
  ;;
*)
  OPSYS=solaris
  ;;
esac

AC_ARG_WITH(tcl,	--with-tcl=path	specify a pathname for tcl, d=$withval, d="")
if test "$d" != "" ; then 
	if test ! -d $d ; then 
		echo "'$d' is not a directory"
		exit 1
	fi
	V_INCLUDE_TCL=-I$d/include
	if test ! -r $d/include/tcl.h ; then
		echo "can't find tcl.h in $d/include"
		exit 1
	fi
	places="$d/lib/libtcl8.0.so \
		$d/lib/libtcl8.0.a \
		$d/lib/libtcl.so \
		$d/lib/libtcl.a"
	V_LIB_TCL=FAIL
	for dir in $places; do
		if test -r $dir ; then
			V_LIB_TCL=$dir
			break
		fi
	done
	if test $V_LIB_TCL = FAIL ; then
		echo "can't find libtcl.a in $d/lib"
		exit 1
	fi
	places="$d/lib/tcl8.0 \
		$d/lib/tcl"
	V_LIBRARY_TCL=FAIL
	for dir in $places; do
		if test -r $dir/init.tcl ; then
			V_LIBRARY_TCL=$dir
			break
		fi
	done
	if test $V_LIBRARY_TCL = FAIL ; then
		echo "can't find init.tcl in $d/lib/tcl"
		exit 1
	fi
else
	AC_TEST_CPP([#include <tcl.h>], V_INCLUDE_TCL="", V_INCLUDE_TCL=FAIL)
	if test "$V_INCLUDE_TCL" = FAIL; then
		echo "checking for tcl.h"
		places="$PWD/../tcl8.0 \
			$PWD/../tcl-8.0 \
			$PWD/../tcl \
			/cs/research/mice/starship/common/$OPSYS/include/tcl8.0 \
			/usr/local/include/tcl8.0 \
			/usr/src/local/tcl8.0 \
			/import/tcl/include/tcl8.0 \
			$prefix/include \
			$x_includes/tk \
			$x_includes \
			/usr/local/include \
			/usr/contrib/include \
			/usr/include"
		for dir in $places; do
			if test -r $dir/tcl.h ; then
				V_INCLUDE_TCL=-I$dir
			        break
			fi
		done
		if test "$V_INCLUDE_TCL" = FAIL; then
			echo "can't find tcl.h"
			exit 1
		fi
	fi
	AC_CHECK_LIB(tcl8.0, main, V_LIB_TCL="-ltcl8.0", V_LIB_TCL="FAIL")
	if test "$V_LIB_TCL" = FAIL; then
		echo "checking for libtcl.a"
		places="$PWD/../tcl8.0/unix \
                        $PWD/../tcl-8.0/unix \
                        $PWD/../tcl/unix \
                        /cs/research/mice/starship/common/$OPSYS/lib \
			/usr/local/lib \
			$prefix/lib \
			$x_libraries \
			/usr/contrib/lib \
			/usr/local/lib \
			/usr/lib \
			$PWD/../tcl8.0 \
			/usr/src/local/tcl8.0 \
			/import/tcl/lib/tcl8.0 \
			"
		for dir in $places; do
			if test -r $dir/libtcl8.0.so -o -r $dir/libtcl8.0.a; then
				V_LIB_TCL="-L$dir -ltcl8.0"
				break
			fi
			if test -r $dir/libtcl.so -o -r $dir/libtcl.a; then
				V_LIB_TCL="-L$dir -ltcl"
				break
			fi
		done
		if test "$V_LIB_TCL" = FAIL; then
			echo "can't find libtcl.a"
			exit 1
		else
			if test $solaris ; then
				V_LIB_TCL="-R$dir $V_LIB_TCL"
			fi
		fi
	fi
	echo "checking for tcl/init.tcl"
	V_LIBRARY_TCL=FAIL
	places="$PWD/../tcl8.0/library \
		$PWD/../tcl-8.0/library \
                $PWD/../tcl/library \
                /cs/research/mice/starship/common/$OPSYS/lib/tcl8.0 \
		/usr/local/lib/tcl8.0 \
		/usr/contrib/lib/tcl8.0 \
		/usr/lib/tcl8.0 \
		/usr/lib/tk/tcl8.0 \
		/import/tcl/lib/tcl8.0 \
		$prefix/lib/tcl8.0 \
		$x_libraries/tcl8.0 \
		/usr/local/lib/tcl \
		/usr/lib/tcl \
		/usr/lib/tk/tcl \
		/import/tcl/lib/tcl \
		$prefix/lib/tcl \
		$x_libraries/tcl \
		$x_libraries/tcl"
	for dir in $places; do
		if test -r $dir/init.tcl; then
			V_LIBRARY_TCL=$dir
			break
		fi
	done
	if test "$V_LIBRARY_TCL" = FAIL; then
		echo "can't find tcl/init.tcl"
		exit 1
	fi
fi
AC_SUBST(V_INCLUDE_TCL)
AC_SUBST(V_LIB_TCL)
AC_SUBST(V_LIBRARY_TCL)

AC_ARG_WITH(tk,	--with-tk=path	specify a pathname for tk, d=$withval, d="")
if test "$d" != "" ; then 
	if test ! -d $d ; then 
		echo "'$d' is not a directory"
		exit 1
	fi
	V_INCLUDE_TK=-I$d/include
	if test ! -r $d/include/tk.h ; then
		echo "can't find tk.h in $d/include"
		exit 1
	fi
	places="$d/lib/libtk8.0.so \
		$d/lib/libtk8.0.a \
		$d/lib/libtk.so \
		$d/lib/libtk.a"
	V_LIB_TK=FAIL
	for dir in $places; do
		if test -r $dir ; then
			V_LIB_TK=$dir
			break
		fi
	done
	if test $V_LIB_TK = FAIL ; then
		echo "can't find libtk.a in $d/lib"
		exit 1
	fi
	places="$d/lib/tk8.0 \
		$d/lib/tk"
	V_LIBRARY_TK=FAIL
	for dir in $places; do
		if test -r $dir/tk.tcl ; then
			V_LIBRARY_TK=$dir
			break
		fi
	done
	if test $V_LIBRARY_TK = FAIL ; then
		echo "can't find tk.tcl in $d/lib/tk"
		exit 1
	fi
else
	AC_TEST_CPP([#include <tk.h>], V_INCLUDE_TK="", V_INCLUDE_TK=FAIL)
	if test "$V_INCLUDE_TK" = FAIL; then
		echo "checking for tk.h"
		V_INCLUDE_TK=""
		places="$PWD/../tk8.0/generic \
	                $PWD/../tk-8.0/generic \
       		        $PWD/../tk/generic \
       		        /cs/research/mice/starship/common/$OPSYS/include \
			/usr/local/include \
			$prefix/include \
			/usr/contrib/include \
			/usr/include/tcl \
			/usr/include\
			$x_includes/tk \
			$x_includes \
			$PWD/../tk8.0 \
			/usr/src/local/tk8.0 \
			/import/tcl/include/tk8.0 \
			"
		for dir in $places; do
			if test -r $dir/tk.h ; then
				V_INCLUDE_TK=-I$dir
				break
			fi
		done
		if test "$V_INCLUDE_TK" = FAIL; then
			echo "can't find tk.h"
			exit 1
		fi
	fi
	AC_CHECK_LIB(tk8.0, main, V_LIB_TK="-ltk8.0", V_LIB_TK="FAIL")
	if test "$V_LIB_TK" = FAIL; then
		echo "checking for libtk.a"
		places="$PWD/../tk8.0/unix \
			$PWD/../tk-8.0/unix \
                	$PWD/../tk/unix \
                	/cs/research/mice/starship/common/$OPSYS/lib \
			/usr/local/lib \
			/usr/contrib/lib \
			/usr/lib \
			/usr/lib/tk \
			/import/tcl/lib \
			$PWD/../tk8.0 \
			/usr/src/local/tk8.0 \
			$prefix/lib \
			$x_libraries"
		for dir in $places; do
			if test -r $dir/libtk8.0.so -o -r $dir/libtk8.0.a; then
				V_LIB_TK="-L$dir -ltk8.0"
				break
			fi
			if test -r $dir/libtk.so -o -r $dir/libtk.a; then
				V_LIB_TK="-L$dir -ltk"
				break
			fi
		done
		if test "$V_LIB_TK" = FAIL; then
			echo "can't find libtk.a"
			exit 1
		else
			if test $solaris ; then
				V_LIB_TK="-R$dir $V_LIB_TK"
			fi
		fi
	fi
	echo "checking for tk/tk.tcl"
	V_LIBRARY_TK=FAIL
	places="$PWD/../tk8.0/library \
		$PWD/../tk-8.0/library \
               	$PWD/../tk/library \
               	/cs/research/mice/starship/common/$OPSYS/lib/tk8.0 \
		/usr/local/lib/tk8.0 \
		/usr/contrib/lib/tk8.0 \
		/usr/lib/tk8.0 \
		/usr/lib/tk/tk8.0 \
		/import/tcl/lib/tk8.0 \
		$prefix/lib/tk8.0 \
		$x_libraries/tk8.0 \
		$PWD/../tk8.0/library \
		/usr/src/local/tk8.0/library \
		/usr/local/lib/tk \
		/usr/lib/tk \
		/usr/lib/tk/tk \
		/import/tcl/lib/tk \
		$prefix/lib/tk \
		$x_libraries/tk \
		$x_libraries/tk"
	for dir in $places; do
		if test -r $dir/tk.tcl; then
			V_LIBRARY_TK=$dir
			break
		fi
	done
	if test "$V_LIBRARY_TK" = FAIL; then
		echo "can't find tk/tk.tcl"
		exit 1
	fi
fi
if test -r $V_LIBRARY_TK/optionMenu.tcl ; then
	V_TKDOSNAMES='$(LIBRARY_TK)/optionMenu.tcl $(LIBRARY_TK)/scrollbar.tcl'
	V_NEED_DL=""
else
	V_TKDOSNAMES='$(LIBRARY_TK)/optMenu.tcl $(LIBRARY_TK)/scrlbar.tcl'
	V_NEED_DL=YES
fi
AC_SUBST(V_TKDOSNAMES)
AC_SUBST(V_INCLUDE_TK)
AC_SUBST(V_LIB_TK)
AC_SUBST(V_LIBRARY_TK)