File: configure

package info (click to toggle)
dpm 1.7.4.7-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 13,836 kB
  • ctags: 10,783
  • sloc: ansic: 146,136; sh: 13,383; perl: 11,142; python: 5,529; cpp: 5,113; sql: 1,790; makefile: 987; fortran: 113
file content (504 lines) | stat: -rwxr-xr-x 17,491 bytes parent folder | download | duplicates (4)
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
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
#!/bin/sh

VERBOSE='no'
basedir=`dirname $0`
SITE_DEF=${basedir}/config/site.def

# lfc, dpm, dpm-dicom, cns, dm
unset MODULE
unset SWIG_LOCATION
with_client_only='no'
with_dicom='no'

CC=${CC:-cc}
MAKE=${MAKE:-make}
export CC MAKE

if [ `uname -m` = 'x86_64' ]; then
    LIBDIR='lib64'
fi

echo "$@" >${basedir}/config.status

while test $# -ne 0; do
case "$1" in
    --verbose)
        shift
        VERBOSE='yes'
        export VERBOSE
        ;;
    --with-mysql)
        shift
		sed \
		-e 's#UseMySQL	.*$#UseMySQL		YES#g' \
		-e 's#UseOracle	.*$#UseOracle		NO#g' \
		-e 's#UsePostgres	.*$#UsePostgres		NO#g' \
            $SITE_DEF >$SITE_DEF.new
        mv $SITE_DEF.new $SITE_DEF
		[ "$VERBOSE" = 'yes' ] && echo "configure: with MySQL"
        with_client_only='no'
        ;;
    --with-oracle)
        shift
		sed \
		-e 's#UseMySQL	.*$#UseMySQL		NO#g' \
		-e 's#UseOracle	.*$#UseOracle		YES#g' \
		-e 's#UsePostgres	.*$#UsePostgres		NO#g' \
		-e 's#BuildInterfaces	.*$#BuildInterfaces		NO#g' \
            $SITE_DEF >$SITE_DEF.new
        mv $SITE_DEF.new $SITE_DEF
		[ "$VERBOSE" = 'yes' ] && echo "configure: with Oracle"
        with_client_only='no'
        ;;
    --with-postgres)
        shift
		sed \
		-e 's#UseMySQL	.*$#UseMySQL		NO#g' \
		-e 's#UseOracle	.*$#UseOracle		NO#g' \
		-e 's#UsePostgres	.*$#UsePostgres		YES#g' \
		-e 's#BuildInterfaces	.*$#BuildInterfaces		NO#g' \
            $SITE_DEF >$SITE_DEF.new
        mv $SITE_DEF.new $SITE_DEF
		[ "$VERBOSE" = 'yes' ] && echo "configure: with PostgreSQL"
        with_client_only='no'
        ;;
    --with-dicom)
        shift
		[ "$VERBOSE" = 'yes' ] && echo "configure: with DICOM"
        with_dicom='yes'
        with_client_only='no'
        ;;
    --with-client-only)
        shift
		sed \
		-e 's#UseMySQL	.*$#UseMySQL		NO#g' \
		-e 's#UseOracle	.*$#UseOracle		NO#g' \
		-e 's#UsePostgres	.*$#UsePostgres		NO#g' \
		-e 's#BuildDicomCopy	.*$#BuildDicomCopy		NO#g' \
		-e 's#BuildDLI	.*$#BuildDLI		NO#g' \
		-e 's#BuildDPMServer	.*$#BuildDPMServer		NO#g' \
		-e 's#BuildNameServerDaemon	.*$#BuildNameServerDaemon	NO#g' \
		-e 's#BuildSRMv1Server	.*$#BuildSRMv1Server	NO#g' \
		-e 's#BuildSRMv2Server	.*$#BuildSRMv2Server	NO#g' \
		-e 's#BuildSRMv2_2Server	.*$#BuildSRMv2_2Server	NO#g' \
		-e 's#BuildTest	.*$#BuildTest		NO#g' \
            $SITE_DEF >$SITE_DEF.new
        mv $SITE_DEF.new $SITE_DEF
		[ "$VERBOSE" = 'yes' ] && echo "configure: only clients"
        with_client_only='yes'
        ;;
    --with-globus-location*)
        if [ '--with-globus-location' = "$1" ]; then
            location="$2"
            shift
        else
            location=`echo $1 | cut -d= -f 2`
        fi
        shift
        [ 'yes' = "$VERBOSE" ] && echo "Globus location: $location"
        if [ ! -d "$location" ]; then 
            echo "Globus location does not exists: '$location'" >&2
            exit 2
        fi
        sed -e "s# GlobusLocation\	.*\$# GlobusLocation	$location#" \
            $SITE_DEF >$SITE_DEF.new
        mv $SITE_DEF.new $SITE_DEF
        ;;  
    --with-voms-location*)
        if [ '--with-voms-location' = "$1" ]; then
            location="$2"
            shift
        else
            location=`echo $1 | cut -d= -f 2`
        fi
        shift
        [ 'yes' = "$VERBOSE" ] && echo "VOMS location: $location"
        if [ ! -d "$location" ]; then 
            echo "VOMS location does not exists: '$location'" >&2
            exit 2
        fi
        sed -e "s# VomsLocation\	.*\$# VomsLocation	$location#" \
            $SITE_DEF >$SITE_DEF.new
        mv $SITE_DEF.new $SITE_DEF
        ;;  
    --with-cgsi-gsoap-location*)
        if [ '--with-cgsi-gsoap-location' = "$1" ]; then
            location="$2"
            shift
        else
            location=`echo $1 | cut -d= -f 2`
        fi
        shift
        [ 'yes' = "$VERBOSE" ] && echo "CGSI_gSOAP location: $location"
        if [ ! -d "$location" ]; then 
            echo "CGSI_gSOAP location does not exists: '$location'" >&2
            exit 2
        fi
        sed -e "s# CgsiGsoapLocation\	.*\$# CgsiGsoapLocation	$location#"  \
            $SITE_DEF >$SITE_DEF.new
        mv $SITE_DEF.new $SITE_DEF
        ;;
    --with-dpm-config-file*)
        if [ '--with-dpm-config-file' = "$1" ]; then
            location="$2"
            shift
        else
            location=`echo $1 | cut -d= -f 2`
        fi
        shift
        [ 'yes' = "$VERBOSE" ] && echo "DPM config file: $location"
        sed -e "s# DpmConfigFile\	.*\$# DpmConfigFile	$location#"  \
            $SITE_DEF >$SITE_DEF.new
        mv $SITE_DEF.new $SITE_DEF
        ;;
    --with-id-map-file*)
        if [ '--with-id-map-file' = "$1" ]; then
            location="$2"
            shift
        else
            location=`echo $1 | cut -d= -f 2`
        fi
        shift
        [ 'yes' = "$VERBOSE" ] && echo "ID Map file: $location"
        sed -e "s# IdMapFile\	.*\$# IdMapFile	$location#"  \
            $SITE_DEF >$SITE_DEF.new
        mv $SITE_DEF.new $SITE_DEF
        ;;
    --with-ns-config-file*)
        if [ '--with-ns-config-file' = "$1" ]; then
            location="$2"
            shift
        else
            location=`echo $1 | cut -d= -f 2`
        fi
        shift
        [ 'yes' = "$VERBOSE" ] && echo "NS config file: $location"
        sed -e "s# NsConfigFile\	.*\$# NsConfigFile	$location#"  \
            $SITE_DEF >$SITE_DEF.new
        mv $SITE_DEF.new $SITE_DEF
        ;;
    --with-sysconf-dir*)
        if [ '--with-sysconf-dir' = "$1" ]; then
            location="$2"
            shift
        else
            location=`echo $1 | cut -d= -f 2`
        fi
        shift
        [ 'yes' = "$VERBOSE" ] && echo "Sysconf dir: $location"
        sed -e "s# SysconfDir\	.*\$# SysconfDir	$location#"  \
            $SITE_DEF >$SITE_DEF.new
        mv $SITE_DEF.new $SITE_DEF
        ;;
    --with-gsoap-location*)
        if [ '--with-gsoap-location' = "$1" ]; then
            location="$2"
            shift
        else
            location=`echo $1 | cut -d= -f 2`
        fi
        shift
        [ 'yes' = "$VERBOSE" ] && echo "gSOAP location: $location"
        if [ ! -d "$location" ]; then 
            echo "gSOAP location does not exists: '$location'" >&2
            exit 2
        fi
        sed -e "s# GsoapLocation	.*\$# GsoapLocation	$location#"  \
            $SITE_DEF >$SITE_DEF.new
        mv $SITE_DEF.new $SITE_DEF
        ;;
    --with-gsoap-version*)
        if [ '--with-gsoap-version' = "$1" ]; then
            gsoap_version="$2"
            shift
        else
            gsoap_version=`echo $1 | cut -d= -f 2`
        fi
        shift
        [ 'yes' = "$VERBOSE" ] && echo "gSOAP version: $gsoap_version"
        GSOAP_MAJOR_MINOR=`echo $gsoap_version | cut -d. -f1,2`
        sed -e "s# GsoapVersion\	.*\$# GsoapVersion	${GSOAP_MAJOR_MINOR}#"  \
            $SITE_DEF >$SITE_DEF.new
        mv $SITE_DEF.new $SITE_DEF
        GSOAP_FULL_VERSION=`echo $gsoap_version | awk -F. '{ printf "%02d%02d%02d",$1,$2,$3 }'`
        if [ "${GSOAP_FULL_VERSION}" '>' '020715' ]; then
            sed -e "s# GsoapWsdl2hFlags.*\$# GsoapWsdl2hFlags	-z1#"  \
                $SITE_DEF >$SITE_DEF.new
            mv $SITE_DEF.new $SITE_DEF
        elif [ "${GSOAP_FULL_VERSION}" '>' '020706' ]; then
            sed -e "s# GsoapWsdl2hFlags.*\$# GsoapWsdl2hFlags	-z#"  \
                $SITE_DEF >$SITE_DEF.new
            mv $SITE_DEF.new $SITE_DEF
        fi
	    ;;
    --with-mysql-location*)
        if [ '--with-mysql-location' = "$1" ]; then
            location="$2"
            shift
        else
            location=`echo $1 | cut -d= -f 2`
        fi
        shift
        [ 'yes' = "$VERBOSE" ] && echo "MySQL location: $location"
        if [ ! -d "$location" ]; then 
            echo "MySQL location does not exists: '$location'" >&2
            exit 2
        fi
        sed -e "s# MySQLLocation\	.*\$# MySQLLocation	$location#"  \
            $SITE_DEF >$SITE_DEF.new
        mv $SITE_DEF.new $SITE_DEF
        ;;
    --with-swig-location*)
        if [ '--with-swig-location' = "$1" ]; then
            location="$2"
            shift
        else
            location=`echo $1 | cut -d= -f 2`
        fi
        shift
        [ 'yes' = "$VERBOSE" ] && echo "Swig location: $location"
        if [ ! -d "$location" ]; then 
            echo "Swig location does not exists: '$location'" >&2
            exit 2
        fi
        sed -e "s# SwigLocation\	.*\$# SwigLocation	$location#"  \
            $SITE_DEF >$SITE_DEF.new
        mv $SITE_DEF.new $SITE_DEF
        SWIG_LOCATION="$location"
        ;;
    --libdir*)
        if [ '--libdir' = "$1" ]; then
            LIBDIR="$2"
            shift
        else
            LIBDIR=`echo $1 | cut -d= -f 2`
        fi
        shift
        [ 'yes' = "$VERBOSE" ] && echo "libdir: $libdir"
        ;;
    --*)
        echo "Unknown option '$1'"
        exit 2
        ;;
    CC=*)
        CC=`echo $1 | cut -d= -f 2`
        shift
        ;;
    MAKE=*)
        MAKE=`echo $1 | cut -d= -f 2`
        shift
        ;;
    *)
        # the first non-option is the MODULE
        if [ -z "$MODULE" ]; then
            MODULE="$1"
            shift
        else
            echo "Unknown parameter '$1'"
            exit 2
        fi
        ;;
esac
done

if [ -z "$MODULE" ]; then
    echo "Usage: $0 (lfc|dpm|cns|dm)"
    echo "  with the following build choices:"
    echo "    --with-mysql (default)"
    echo "    --with-oracle"
    echo "    --with-postgres"
    echo "    --with-client-only (no servers are built)"
    echo "  and the following configuration options:"
    echo "    --with-dicom (DPM server only)"
    echo "    --with-globus-location=<directory>"
    echo "    --with-voms-location=<directory>"
    echo "    --with-cgsi-gsoap-location=<directory>"
    echo "    --with-dpm-config-file=<file>"
    echo "    --with-id-map-file=<file>"
    echo "    --with-ns-config-file=<file>"
    echo "    --with-gsoap-location=<directory>"
    echo "    --with-gsoap-version=<major.minor.patch>"
    echo "    --with-mysql-location=<directory>"
    echo "    --with-swig-location=<directory>"
    exit 1
fi

case $MODULE in
	lfc)
		sed \
		-e 's#BuildNameServerAsLFC	.*$#BuildNameServerAsLFC	YES#g' \
		-e 's#BuildNameServerAsDPNS	.*$#BuildNameServerAsDPNS	NO#g' \
		-e 's#BuildDicomCopy	.*$#BuildDicomCopy		NO#g' \
		-e 's#BuildDLI	.*$#BuildDLI		YES#g' \
		-e 's#BuildDPMClient	.*$#BuildDPMClient		NO#g' \
		-e 's#BuildDPMServer	.*$#BuildDPMServer		NO#g' \
		-e 's#BuildNameServerClient	.*$#BuildNameServerClient	YES#g' \
		-e 's#BuildNameServerDaemon	.*$#BuildNameServerDaemon	YES#g' \
		-e 's#BuildNameServerLibrary	.*$#BuildNameServerLibrary	YES#g' \
		-e 's#BuildSRMv1Server	.*$#BuildSRMv1Server	NO#g' \
		-e 's#BuildSRMv2Server	.*$#BuildSRMv2Server	NO#g' \
		-e 's#BuildSRMv2_2Server	.*$#BuildSRMv2_2Server	NO#g' \
		-e 's#BuildTest	.*$#BuildTest		NO#g' \
		-e 's#BuildInterfaces	.*$#BuildInterfaces		YES#g' \
		-e 's#BuildRfioClient	.*$#BuildRfioClient		NO#g' \
		-e 's#BuildRfioServer	.*$#BuildRfioServer		NO#g' \
		-e 's#BuildSecurity	.*$#BuildSecurity		YES#g' \
		-e 's#UseGSI	.*$#UseGSI		YES#g' \
		-e 's#UseKRB5	.*$#UseKRB5		NO#g' \
		-e 's#SecMakeStaticLibrary	.*$#SecMakeStaticLibrary	NO#g' \
            $SITE_DEF >$SITE_DEF.new
        mv $SITE_DEF.new $SITE_DEF
        if [ "$with_client_only" = 'yes' ]; then
            sed \
            -e 's#BuildDLI	.*$#BuildDLI		NO#g' \
            -e 's#BuildNameServerDaemon	.*$#BuildNameServerDaemon	NO#g' \
            $SITE_DEF >$SITE_DEF.new
            mv $SITE_DEF.new $SITE_DEF
        fi
		[ "$VERBOSE" = 'yes' ] && echo "configure: for LFC"
		;;

	dpm)
		sed \
		-e 's#BuildNameServerAsLFC	.*$#BuildNameServerAsLFC	NO#g' \
		-e 's#BuildNameServerAsDPNS	.*$#BuildNameServerAsDPNS	YES#g' \
		-e 's#BuildDicomCopy	.*$#BuildDicomCopy		NO#g' \
		-e 's#BuildDLI	.*$#BuildDLI		NO#g' \
		-e 's#BuildDPMClient	.*$#BuildDPMClient		YES#g' \
		-e 's#BuildDPMServer	.*$#BuildDPMServer		YES#g' \
		-e 's#BuildNameServerClient	.*$#BuildNameServerClient	YES#g' \
		-e 's#BuildNameServerDaemon	.*$#BuildNameServerDaemon	YES#g' \
		-e 's#BuildNameServerLibrary	.*$#BuildNameServerLibrary	YES#g' \
		-e 's#BuildSRMv1Server	.*$#BuildSRMv1Server	YES#g' \
		-e 's#BuildSRMv2Server	.*$#BuildSRMv2Server	YES#g' \
		-e 's#BuildSRMv2_2Server	.*$#BuildSRMv2_2Server	YES#g' \
		-e 's#BuildTest	.*$#BuildTest		NO#g' \
		-e 's#BuildInterfaces	.*$#BuildInterfaces		YES#g' \
		-e 's#BuildRfioClient	.*$#BuildRfioClient		YES#g' \
		-e 's#BuildRfioServer	.*$#BuildRfioServer		YES#g' \
		-e 's#BuildSecurity	.*$#BuildSecurity		YES#g' \
		-e 's#UseGSI	.*$#UseGSI		YES#g' \
		-e 's#UseKRB5	.*$#UseKRB5		NO#g' \
		-e 's#SecMakeStaticLibrary	.*$#SecMakeStaticLibrary	NO#g' \
            $SITE_DEF >$SITE_DEF.new
        mv $SITE_DEF.new $SITE_DEF
        if [ "$with_client_only" = 'yes' ]; then
            sed \
            -e 's#BuildDPMServer	.*$#BuildDPMServer		NO#g' \
            -e 's#BuildNameServerDaemon	.*$#BuildNameServerDaemon	NO#g' \
            -e 's#BuildSRMv1Server	.*$#BuildSRMv1Server	NO#g' \
            -e 's#BuildSRMv2Server	.*$#BuildSRMv2Server	NO#g' \
            -e 's#BuildSRMv2_2Server	.*$#BuildSRMv2_2Server	NO#g' \
            -e 's#BuildRfioServer	.*$#BuildRfioServer		NO#g' \
            $SITE_DEF >$SITE_DEF.new
            mv $SITE_DEF.new $SITE_DEF
        fi
        if [ "$with_dicom" = 'yes' ]; then
            sed \
            -e 's#BuildDicomCopy	.*$#BuildDicomCopy		YES#g' \
                $SITE_DEF >$SITE_DEF.new
            mv $SITE_DEF.new $SITE_DEF
        fi
		[ "$VERBOSE" = 'yes' ] && echo "configure: for DPM"
		;;

	cns)
		sed \
		-e 's#BuildNameServerAsLFC	.*$#BuildNameServerAsLFC	NO#g' \
		-e 's#BuildNameServerAsDPNS	.*$#BuildNameServerAsDPNS	NO#g' \
		-e 's#BuildDicomCopy	.*$#BuildDicomCopy		NO#g' \
		-e 's#BuildDPMClient	.*$#BuildDPMClient		NO#g' \
		-e 's#BuildDPMServer	.*$#BuildDPMServer		NO#g' \
		-e 's#BuildNameServerClient	.*$#BuildNameServerClient	YES#g' \
		-e 's#BuildNameServerDaemon	.*$#BuildNameServerDaemon	YES#g' \
		-e 's#BuildNameServerLibrary	.*$#BuildNameServerLibrary	YES#g' \
		-e 's#BuildSRMv1Server	.*$#BuildSRMv1Server	NO#g' \
		-e 's#BuildSRMv2Server	.*$#BuildSRMv2Server	NO#g' \
		-e 's#BuildSRMv2_2Server	.*$#BuildSRMv2_2Server	NO#g' \
		-e 's#BuildTest	.*$#BuildTest		NO#g' \
		-e 's#BuildRfioClient	.*$#BuildRfioClient		NO#g' \
		-e 's#BuildRfioServer	.*$#BuildRfioServer		NO#g' \
		-e 's#UseGSI	.*$#UseGSI		YES#g' \
		-e 's#UseKRB5	.*$#UseKRB5		NO#g' \
		-e 's#SecMakeStaticLibrary	.*$#SecMakeStaticLibrary	NO#g' \
            $SITE_DEF >$SITE_DEF.new
        mv $SITE_DEF.new $SITE_DEF
		[ "$VERBOSE" = 'yes' ] && echo "configure: for CNS"
		;;

	dm)
		sed \
		-e 's#BuildNameServerAsLFC	.*$#BuildNameServerAsLFC	NO#g' \
		-e 's#BuildNameServerAsDPNS	.*$#BuildNameServerAsDPNS	NO#g' \
		-e 's#BuildDicomCopy	.*$#BuildDicomCopy		NO#g' \
		-e 's#BuildDLI	.*$#BuildDLI		NO#g' \
		-e 's#BuildDPMClient	.*$#BuildDPMClient		NO#g' \
		-e 's#BuildDPMServer	.*$#BuildDPMServer		NO#g' \
		-e 's#BuildNameServerClient	.*$#BuildNameServerClient	NO#g' \
		-e 's#BuildNameServerDaemon	.*$#BuildNameServerDaemon	NO#g' \
		-e 's#BuildNameServerLibrary	.*$#BuildNameServerLibrary	NO#g' \
		-e 's#BuildRfioClient	.*$#BuildRfioClient		NO#g' \
		-e 's#BuildRfioServer	.*$#BuildRfioServer		NO#g' \
		-e 's#BuildSecurity	.*$#BuildSecurity		YES#g' \
		-e 's#BuildSRMv1Server	.*$#BuildSRMv1Server	NO#g' \
		-e 's#BuildSRMv2Server	.*$#BuildSRMv2Server	NO#g' \
		-e 's#BuildSRMv2_2Server	.*$#BuildSRMv2_2Server	NO#g' \
		-e 's#BuildTest	.*$#BuildTest		NO#g' \
		-e 's#BuildInterfaces	.*$#BuildInterfaces		NO#g' \
		-e 's#UseGSI	.*$#UseGSI		YES#g' \
		-e 's#UseKRB5	.*$#UseKRB5		NO#g' \
		-e 's#SecMakeStaticLibrary	.*$#SecMakeStaticLibrary	NO#g' \
            $SITE_DEF >$SITE_DEF.new
        mv $SITE_DEF.new $SITE_DEF
		[ "$VERBOSE" = 'yes' ] && echo "configure: for lcg-dm-common"
		;;

	*)
		echo "Usage : $0 <module>"
		echo "The second argument can only be : cns, lfc, dpm or dm"
		;;
esac

# setting LIBDIR
if [ -n "$LIBDIR" ]; then
    sed -e "s#^_lib.*\$#_lib = $LIBDIR#"  \
        $SITE_DEF >$SITE_DEF.new
    mv $SITE_DEF.new $SITE_DEF
fi

# checking for Swig and disabling the build of interfaces, if not found
tmp_path="$PATH"
if [ -n "$SWIG_LOCATION" ]; then
    PATH="$SWIG_LOCATION/bin:$PATH"
fi
is_swig=`which swig 2>/dev/null`
if [ -z "$is_swig" ]; then
    echo "Warning: Swig not found, disabling the build of interfaces" >&2
    sed \
    -e 's#BuildInterfaces	.*$#BuildInterfaces		NO#g' \
        $SITE_DEF >$SITE_DEF.new
    mv $SITE_DEF.new $SITE_DEF
else
    # setting SwigLib according to SwigLocation
    # we cannot use 'swig -swiglib', because the 
    # ETICS dependency does not return this properly
    SWIG_LOCATION=`awk '/SwigLocation/ { print $3 }' config/site.def`
    for SWIG_LIB in $SWIG_LOCATION/share/swig/* \
                    $SWIG_LOCATION/share/swig* \
                    $SWIG_LOCATION/lib*/swig/* \
                    $SWIG_LOCATION/lib*/swig* \
           unkown; do
      if [ -f "$SWIG_LIB/perl5/perl5.swg" ]; then break; fi
    done
    if [ "$SWIG_LIB" = 'unknown' ]; then
        echo "Warning: unknown Swig lib location, trying the default!"
   SWIG_LIB=`swig -swiglib`
    fi
    sed -e "s# SwigLib.*\$# SwigLib    $SWIG_LIB#"  \
        $SITE_DEF >$SITE_DEF.new
    mv $SITE_DEF.new $SITE_DEF
fi
PATH="$tmp_path"

$MAKE -f Makefile.ini Makefiles