File: configure

package info (click to toggle)
xcdroast 0.96d-final-3
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 3,568 kB
  • ctags: 5,050
  • sloc: ansic: 28,503; tcl: 9,657; sh: 601; makefile: 373
file content (338 lines) | stat: -rwxr-xr-x 8,530 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
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
#!/bin/sh
# simple configure script to locate system-libraries.
# 20.12.97 Thomas Niederreiter

BASEDIR="/usr/local/lib"
BASEDIR2="/usr/lib"
INCDIR="/usr/local/include"
INCDIR2="/usr/include"
LIBDIRPREFIX="/usr/local"

if test "$1" = --help; then 
	echo
	echo "Available configure-options:"
	echo "	--prefixdir <directoryname> (default: $LIBDIRPREFIX)"
	echo
	exit 1
fi

if test "$1" = --prefixdir; then
	if test -z "$2"; then
		echo
		echo "Warning: Need value for --prefixdir"
		echo
		exit 1
	else 
		LIBDIRPREFIX=$2
	fi
fi
	
echo
echo "Autoconfiguration of X-CD-Roast 0.96d:"
echo

echo -n "Looking for TCL 8.0-Library: "
DYNTCLLIBDIR=""
STATCLLIBDIR=""
FND=""
if test -f $BASEDIR/libtcl8.0.so; then
	echo "$BASEDIR/libtcl8.0.so (shared)"
	DYNTCLLIBDIR=$BASEDIR
	FND=1
elif test -f $BASEDIR2/libtcl8.0.so; then
	echo "$BASEDIR2/libtcl8.0.so (shared)"
	DYNTCLLIBDIR=$BASEDIR2
	FND=1
fi

if test -f $BASEDIR/libtcl8.0.a; then
	if test -n "$FND"; then echo -n "                             "; fi
	echo "$BASEDIR/libtcl8.0.a (static)"
	STATCLLIBDIR=$BASEDIR
elif test -f $BASEDIR2/libtcl8.0.a; then
  	if test -n "$FND"; then echo -n "                             "; fi
  	echo "$BASEDIR2/libtcl8.0.a (static)"
  	STATCLLIBDIR=$BASEDIR2
fi

if test -z "$DYNTCLLIBDIR" -a -z "$STATCLLIBDIR"; then
	echo "not found"
fi

echo -n "Looking for TK 8.0-Library: "
DYNTKLIBDIR=""
STATKLIBDIR=""
FND=""
if test -f $BASEDIR/libtk8.0.so; then
  	echo "$BASEDIR/libtk8.0.so (shared)"
  	DYNTKLIBDIR=$BASEDIR
  	FND=1
elif test -f $BASEDIR2/libtk8.0.so; then
  	echo "$BASEDIR2/libtk8.0.so (shared)"
  	DYNTKLIBDIR=$BASEDIR2
  	FND=1
fi

if test -f $BASEDIR/libtk8.0.a; then
  	if test -n "$FND"; then echo -n "                            "; fi
  	echo "$BASEDIR/libtk8.0.a (static)"
  	STATKLIBDIR=$BASEDIR
elif test -f $BASEDIR2/libtk8.0.a; then
  	if test -n "$FND"; then echo -n "                            "; fi
  	echo "$BASEDIR2/libtk8.0.a (static)"
  	STATKLIBDIR=$BASEDIR2
fi

if test -z "$DYNTKLIBDIR" -a -z "$STATKLIBDIR"; then
	echo "not found"
fi

echo -n "Looking for Tix 4.1-Library: "
DYNTIXLIBDIR=""
STATIXLIBDIR=""
FND=""
if test -f $BASEDIR/libtix4.1.8.0.so; then
  	echo "$BASEDIR/libtix4.1.8.0.so (shared)"
  	DYNTIXLIBDIR=$BASEDIR
	TIXLIB=-ltix4.1.8.0
  	FND=1
elif test -f $BASEDIR2/libtix4.1.8.0.so; then
  	echo "$BASEDIR2/libtix4.1.8.0.so (shared)"
  	DYNTIXLIBDIR=$BASEDIR2
	TIXLIB=-ltix4.1.8.0
  	FND=1
elif test -f $BASEDIR1/libtix.so.4.1; then
  	echo "$BASEDIR1/libtix.so.4.1 (shared)"
  	DYNTIXLIBDIR=$BASEDIR1
	TIXLIB=-ltix
  	FND=1
elif test -f $BASEDIR2/libtix.so.4.1; then
  	echo "$BASEDIR2/libtix.so.4.1 (shared)"
  	DYNTIXLIBDIR=$BASEDIR2
	TIXLIB=-ltix
  	FND=1
fi

if test -f $BASEDIR/libtix4.1.8.0.a; then
  	if test -n "$FND"; then echo -n "                             "; fi
  	echo "$BASEDIR/libtix4.1.8.0.a (static)"
  	STATIXLIBDIR=$BASEDIR
elif test -f $BASEDIR2/libtix4.1.8.0.a; then
  	if test -n "$FND"; then echo -n "                             "; fi
  	echo "$BASEDIR2/libtix4.1.8.0.a (static)"
  	STATIXLIBDIR=$BASEDIR2
fi

if test -z "$DYNTIXLIBDIR" -a -z "$STATIXLIBDIR"; then
	echo "not found"
fi

echo -n "Looking for Tix 4.1-SAM-Library: "
DYNTIXSAMLIBDIR=""
STATIXSAMLIBDIR=""
FND=""
if test -f $BASEDIR/libtixsam4.1.8.0.so; then
  	echo "$BASEDIR/libtixsam4.1.8.0.so (shared)"
  	DYNTIXSAMLIBDIR=$BASEDIR
  	FND=1
elif test -f $BASEDIR2/libtixsam4.1.8.0.so; then
  	echo "$BASEDIR2/libtixsam4.1.8.0.so (shared)"
  	DYNTIXSAMLIBDIR=$BASEDIR2
  	FND=1
fi

if test -f $BASEDIR/libtixsam4.1.8.0.a; then
  	if test -n "$FND"; then echo -n "                                 "; fi
  	echo "$BASEDIR/libtixsam4.1.8.0.a (static)"
  	STATIXSAMLIBDIR=$BASEDIR
elif test -f $BASEDIR2/libtixsam4.1.8.0.a; then
  	if test -n "$FND"; then echo -n "                                 "; fi
  	echo "$BASEDIR2/libtixsam4.1.8.0.a (static)"
  	STATIXSAMLIBDIR=$BASEDIR2
fi

if test -z "$DYNTIXSAMLIBDIR" -a -z "$STATIXSAMLIBDIR"; then
	echo "not found"
fi

echo -n "Looking for TCL 8.0 lib-directory: "
TCLLIBDIR=""
if test -d $BASEDIR/tcl8.0; then
  	echo "$BASEDIR/tcl8.0/"
  	TCLLIBDIR=$BASEDIR/tcl8.0/
elif test -d $BASEDIR2/tcl8.0; then
  	echo "$BASEDIR2/tcl8.0/"
  	TCLLIBDIR=$BASEDIR2/tcl8.0/
else
  	echo "not found"
fi

echo -n "Looking for TK 8.0 lib-directory: "
TKLIBDIR=""
if test -d $BASEDIR/tk8.0; then
  	echo "$BASEDIR/tk8.0/"
  	TKLIBDIR=$BASEDIR/tk8.0/
elif test -d $BASEDIR2/tk8.0; then
  	echo "$BASEDIR2/tk8.0/"
  	TKLIBDIR=$BASEDIR2/tk8.0/
else
 	echo "not found"
fi

echo -n "Looking for Tix 4.1 lib-directory: "
TIXLIBDIR=""
if test -d $BASEDIR/tix4.1; then
  	echo "$BASEDIR/tix4.1/"
  	TIXLIBDIR=$BASEDIR/tix4.1/
elif test -d $BASEDIR2/tix4.1; then
  	echo "$BASEDIR2/tix4.1/"
  	TIXLIBDIR=$BASEDIR2/tix4.1/
else
  	echo "not found"
fi

echo -n "Looking for TCL/TK/Tix include-files: "
TCLTKINCLUDE=""
if test -f $INCDIR/tcl.h -a -f $INCDIR/tk.h -a -f $INCDIR/tix.h; then
  	echo "$INCDIR/"
  	TCLTKINCLUDE=$INCDIR
elif test -f $INCDIR2/tcl.h -a -f $INCDIR2/tk.h -a -f $INCDIR2/tix.h; then
  	echo "$INCDIR2/"
  	TCLTKINCLUDE=$INCDIR2
else
  	echo "not found"
fi

# Now we have collected the system-info. Its time to check it.

echo
if test -z "$DYNTCLLIBDIR" -a -z "$STATCLLIBDIR"; then
	echo "No TCL 8.0 Library found. Please install TCL 8.0."
	echo "(further information can be found in the README.Compile-file)"
	exit 1
fi
  
if test -z "$DYNTKLIBDIR" -a -z "$STATKLIBDIR"; then
	echo "No TK 8.0 Library found. Please install TK 8.0."
	echo "(further information can be found in the README.Compile-file)"
	exit 1
fi
  
if test -z "$DYNTIXLIBDIR" -a -z "$STATIXLIBDIR" -a -z "$DYNTIXSAMLIBDIR" -a -z "$STATIXSAMLIBDIR"; then
	echo "No Tix 4.1 Library found. Please install Tix4.1."
	echo "(further information can be found in the README.Compile-file)"
	exit 1
fi
 
if test -z "$TCLLIBDIR" -o -z "$TKLIBDIR" -o -z "$TIXLIBDIR"; then
	echo "Not all TCL/TK/Tix-library-directories found."
	echo "Please check your installation of TCL/TK and Tix."
	echo "(further information can be found in the README.Compile-file)"
 	exit 1
fi

if test -z "$TCLTKINCLUDE"; then
	echo "Have not found all the TCL/TK/Tix-include-files." 
	echo "Please check your installation of TCL/TK and Tix."
	echo "(further information can be found in the README.Compile-file)"
	exit 1
fi

STATICOK=0
# got we all to build a static version?
if test -n "$STATIXSAMLIBDIR" -o -n "$STATIXSAMLIBDIR"; then
	STATICOK=1	
fi

SHAREDOK=0
# got we all to build a shared version?
if test -n "$DYNTIXLIBDIR" -o -n "$DYNTIXLIBDIR"; then
	SHAREDOK=1	
fi

if test "$STATICOK" = 0 -a "$SHAREDOK" = 0; then
	echo
	echo "Can't build shared or static version -> aborting."
	echo "Please check your installation of TCL/TK and Tix."
	echo "(further information can be found in the README.Compile-file)"
	exit 1
fi

echo "System-check OK."
echo "Creating src/etixwish/Makefile"
rm -f src/etixwish/Makefile

cat >src/etixwish/Makefile <<EOF
#
# automatically generated by the configure-script.
# usually no need to edit that.
#
# This directory contains the tcl-library-files
TCLLIBDIR=$TCLLIBDIR

# This directory contains the tk-library-files
TKLIBDIR=$TKLIBDIR

# This directory contains the tix-library-files
TIXLIBDIR=$TIXLIBDIR

# The directory that contains tcl.h, tk.h and tix.h
TCLTKINCLUDE=$TCLTKINCLUDE

# The directories where the  tcl/tk/tix-libraries are searched
TCLTKLIBDIRS=-L/usr/local/lib -L/usr/lib

# TCL/TK/Tix-Libraries to link with the static version
TCLSTATICLIBS=-ltixsam4.1.8.0 -ltk8.0 -ltcl8.0

# TCL/TK/Tix-Libraries to link with the shared version
TCLSHAREDLIBS=$TIXLIB -ltk8.0 -ltcl8.0

# Library-path-prefix: Where X-CD-Roast looks for its utils..
LIBDIRPREFIX=$LIBDIRPREFIX

EOF

cat src/etixwish/Makefile.in >>src/etixwish/Makefile

echo "Done."

if test "$SHAREDOK" = "1"; then
	DEFTARGET=xcdroast-shared
elif test "$STATICOK" = "1"; then
	DEFTARGET=xcdroast-static
else
	# should never happen
	exit 1
fi

echo "Creating Makefile"
rm -f Makefile

cat >Makefile <<EOF
#
# automatically generated by the configure-script.
# usually no need to edit that.
#

# base-directory for X-CD-Roast installation
PREFIX=$LIBDIRPREFIX

all: $DEFTARGET utils

EOF

cat Makefile.in >>Makefile

echo "Done."

echo
echo "---------------------------------------------------------------"
echo
echo "Type \"make\" to compile X-CD-Roast and its utility-programs."
echo 
echo "Then type \"make install\" to install X-CD-Roast on your system."
echo "(Installation-prefix: $LIBDIRPREFIX)  "
echo
echo "Good Luck."