This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
forked from bemoody/wfdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
executable file
·724 lines (672 loc) · 21.2 KB
/
configure
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
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
#! /bin/sh
# file: configure G. Moody 24 May 2000
# Last revised: 16 December 2016
# Configuration script for the WFDB Software Package
# This script was not generated using 'autoconf'. If you can implement
# autoconf input files for a 'configure' that does what this one does,
# please send them to me ([email protected]) for inclusion in a future
# version of this package.
# Note that any -m options (although parsed below) are currently ignored,
# except on x86_64 Linux, where they are prefixed to CFLAGS. The help
# text below documents only -m32; see the gcc manual for other -m options.
# Defaults (overridden by --interactive):
INTERACTIVE=no
LIBTYPE=dynamic
DIR=/usr/local
MANDIR=unknown
LIBDIR=unknown
HOST=
MFLAGS=
NETLIB=unknown
WAVE=unknown
OWHOME=/usr/openwin
LC_ALL=C
export LC_ALL
# Read and process command-line arguments
for i in $*
do
case $i in
--dynamic) LIBTYPE=dynamic ;;
-i|--interactive) INTERACTIVE=yes
LIBTYPE=
DIR=
MANDIR= ;;
-m*) if [ "x$MFLAGS" = x ]
then
MFLAGS=$i
else
MFLAGS="$MFLAGS $i"
fi ;;
--host=*) HOST=`echo $i | sed 's/[-a-zA-Z0-9]*=//'` ;;
--mandir=*) MANDIR=`echo $i | sed 's/[-a-zA-Z0-9]*=//'` ;;
--prefix=*) DIR=`echo $i | sed 's/[-a-zA-Z0-9]*=//'` ;;
--libdir=*) LIBDIR=`echo $i | sed 's/[-a-zA-Z0-9]*=//'` ;;
-q) ;; # ignored
--shared) LIBTYPE=dynamic ;;
--static) LIBTYPE=static
SYSLIBS=dynamic ;;
--static_only) LIBTYPE=static
SYSLIBS=static ;;
--without-cygwin) NOCYGWIN=yes ;;
--without-netfiles) NETLIB=none ;;
--with-libcurl) NETLIB=libcurl ;;
--without-xview) WAVE=0 ;;
--with-xview=*) OWHOME=`echo $i | sed 's/[-a-zA-Z0-9]*=//'`
WAVE=1 ;;
*) cat <<EOF
usage: $0 [options]
Options:
--dynamic make a shared (dynamically linkable) WFDB library
if possible [default]
--help print this message
--interactive ask about library type and installation directories
-m32 on 64-bit Linux, force compilation in 32-bit mode
--mandir=MANDIR install man pages in MANDIR
--prefix=PREFIX install files in PREFIX [default: $DIR]
--shared (same as --dynamic)
--static make a static WFDB library (do not make a shared
library even if possible)
--static_only link WFDB applications to static libraries only
(assumes --static; compilation may fail if any
necessary libraries are available as shared libraries
only)
--without-cygwin on Cygwin, compile binaries that do not link to the
Cygwin DLL. WAVE will not be built.
--without-netfiles disable NETFILES even if libcurl is available
--with-libcurl enable NETFILES via libcurl [default]
--without-xview disable WAVE even if XView is available
--with-xview=PREFIX use XView libraries and headers installed in PREFIX
EOF
exit ;;
esac
done
# If cross-compiling, don't search for libraries automatically; only
# use curl and/or xview if specified on the command line.
if [ "x$HOST" != "x" ]
then
if [ "x$NETLIB" = "xunknown" ]
then
NETLIB=none
fi
if [ "x$WAVE" = "xunknown" ]
then
WAVE=0
fi
fi
echo "Checking the operating system type ..."
case x$HOST in
x) MACHINE=`uname -m | tr -d " "`
KERNEL=`uname -s | tr -d " "`
;;
x*-*-*) MACHINE=`echo $HOST | cut -d- -f1`
KERNEL=`echo $HOST | cut -d- -f3-`
;;
x*-*) MACHINE=`echo $HOST | cut -d- -f1`
KERNEL=`echo $HOST | cut -d- -f2-`
;;
x*) MACHINE=unknown
KERNEL=$HOST
;;
esac
ARCH=$MACHINE-$KERNEL
case `echo $KERNEL | tr A-Z a-z` in
linux*) case $MACHINE in
x86_64) OS=Linux-64 ;;
*) OS=Linux ;;
esac ;;
freebsd*) OS=FreeBSD ;;
solaris*) OS=Solaris ;;
sunos*) OS=Solaris ;;
hp-ux*) OS=HPUX ;;
cygwin*) if [ "x$NOCYGWIN" = "xyes" ]
then
OS=mingw-compat
T=`echo $ARCH | sed s/CYGWIN/MINGW/`
ARCH=$T
else
OS=cygwin
fi ;;
mingw*) OS=mingw
T=`echo $ARCH | sed s/CYGWIN/MINGW/`
ARCH=$T ;;
darwin*) OS=Darwin ;;
*) OS=generic ;;
esac
echo "Configuring the WFDB software package for $OS."
SRCDIR="`pwd`"
LIB=lib
cd conf
echo "Checking the echo command ..."
echo -n >echo.out
if [ -s echo.out ]
then
ln -sf prompt-c prompt
else
ln -sf prompt-n prompt
fi
rm echo.out
PACKAGE=`basename "$SRCDIR"`
MAJOR=
MINOR=
RELEASE=
case $PACKAGE in
wfdb-*) MAJOR=`echo $PACKAGE | cut -c6- | cut -d . -f 1`
MINOR=`echo $PACKAGE | cut -c6- | cut -d . -f 2`
RELEASE=`echo $PACKAGE | cut -c6- | cut -d . -f 3` ;;
*) ./prompt "Major version number: "; read MAJOR
./prompt "Minor version number: "; read MINOR
./prompt "Release number: "; read RELEASE ;;
esac
if [ "x$MAJOR" = "x" ]; then MAJOR=0; fi
if [ "x$MINOR" = "x" ]; then MINOR=0; fi
if [ "x$RELEASE" = "x" ]; then RELEASE=0; fi
sed s/VMAJ/$MAJOR/ <version.def | sed s/VMIN/$MINOR/ | \
sed s/VREL/$RELEASE/ >site.def
echo "# Definitions generated by 'configure'" >>site.def
echo >>site.def
echo "PACKAGE = $PACKAGE" >>site.def
echo "SRCDIR = \"$SRCDIR\"" >>site.def
echo LONGDATE = `date '+%e %B %Y'` >>site.def
echo SHORTDATE = `date '+%B %Y' | tr a-z A-Z` >>site.def
echo YEAR = `date '+%Y'` >>site.def
echo "ARCH = $ARCH" >>site.def
if [ "x$HOST" = "x" ]
then
echo "BUILD_CC = \$(CC)" >> site.def
else
echo "BUILD_CC = cc" >> site.def
fi
echo "# _____________________________________________________________________________" >>site.def
echo >>site.def
rm -f site-slib.def
touch site-slib.def
case $OS in
Linux)
cat site.def linux-slib.def >site-slib.def
cat linux.def >>site.def ;;
Linux-64)
if [ "x$MFLAGS" = "x-m32" ]
then
OS=Linux
cat site.def linux-slib.def | \
sed "s+MFLAGS =+MFLAGS = $MFLAGS+" >site-slib.def
cat linux.def | \
sed "s+MFLAGS =+MFLAGS = $MFLAGS+" >>site.def
else
LIB=lib64
WAVE=0
cat site.def linux-slib.def >site-slib.def
cat linux.def >>site.def
fi ;;
FreeBSD)
cat site.def freebsd-slib.def >site-slib.def
cat freebsd.def >>site.def ;;
Solaris)
cat site.def solaris-slib.def >site-slib.def
cat solaris.def >>site.def ;;
HP-UX)
cat site.def hpux-slib.def >site-slib.def
cat hpux.def >>site.def ;;
cygwin)
LIB=bin
cat site.def cygwin-slib.def >site-slib.def
cat cygwin.def >>site.def ;;
mingw)
LIB=bin
WAVE=0
sed 's/NOCYGWIN//' site.def mingw-slib.def >site-slib.def
sed 's/NOCYGWIN//' mingw.def >>site.def
( cd ../checkpkg; ./dosify ) ;;
mingw-compat)
LIB=bin
OS=mingw
WAVE=0
sed 's/NOCYGWIN/-mno-cygwin/' site.def mingw-slib.def >site-slib.def
sed 's/NOCYGWIN/-mno-cygwin/' mingw.def >>site.def ;;
Darwin)
echo "It is normal for Mac OS X to be recognized as Darwin."
if [ x$LIBTYPE != xdynamic ]
then
echo "Building static libraries is not supported on Darwin."
LIBTYPE=dynamic
fi
case $MACHINE in
x86_64) LMFLAGS="$MFLAGS -arch i386 -arch x86_64"
WMFLAGS="$MFLAGS -arch i386" ;;
i386) LMFLAGS="$MFLAGS -arch i386"
WMFLAGS="$MFLAGS -arch i386" ;;
*) LMFLAGS="$MFLAGS"
WMFLAGS="$MFLAGS" ;;
esac
cat site.def darwin-slib.def | \
sed "s+^MFLAGS =+MFLAGS = $LMFLAGS+" >site-slib.def
cat darwin.def | \
sed "s+^MFLAGS =+MFLAGS = $LMFLAGS+;s+^WMFLAGS =+WMFLAGS = $WMFLAGS+" >>site.def ;;
*) OS=generic
cat site.def generic-slib.def >site-slib.def
cat generic.def >>site.def
echo "Using the generic configuration, which may need to be customized"
echo "for your operating system. 'configure' will offer suggestions"
echo "for customization after it completes the generic configuration."
;;
esac
if [ -s site-slib.def ]
then
if [ x$LIBTYPE = x ]
then
echo
echo "The WFDB library may be compiled as a static library or as a"
echo "dynamically loaded (shared) library (the default). Type S for a"
./prompt "static library, or D for a dynamically loaded library:"
read LIBTYPE
fi
else
LIBTYPE=static
fi
case x$LIBTYPE in
xS*|xs*) rm -f site-slib.def
touch site-slib.def
LIBTYPE=static ;;
*) LIBTYPE=dynamic ;;
esac
if [ $LIBTYPE = static ]
then
if [ x$SYSLIBS = x ]
then
echo
echo "You may link the WFDB applications to dynamically loaded"
echo "system libraries (such as the standard C library) to"
echo "save disk space and for faster loading even while using"
echo "the static WFDB library, or you may link them to static"
echo "libraries only, which will make them easier to copy to"
echo "other systems. Note that choosing to link to static"
echo "libraries only may cause compilation to fail if your"
echo "system does not have a complete set of static libraries."
echo "Type S to link to static libraries only, or D to link to"
./prompt "dynamically loaded libraries where available:"
read SYSLIBS
fi
case x$SYSLIBS in
xS*|xs*) sed "s/LDFLAGS = -L/LDFLAGS = -static -L/" <site.def >site.tmp
mv site.tmp site.def
echo "Applications will be linked with static libraries only."
SYSLIBS=static
;;
*) SYSLIBS=dynamic ;;
esac
else
SYSLIBS=dynamic
dynamic_ldflags=`grep '^LDFLAGS =' site-slib.def | sed 's/LDFLAGS = *//'`
if [ "x$dynamic_ldflags" != "x" ]; then
sed "s|^LDFLAGS =.*|LDFLAGS = $dynamic_ldflags|" <site.def >site.tmp
mv site.tmp site.def
fi
fi
echo
./prompt "Looking for the C compiler ..."
if [ "x$HOST" != "x" ]
then
CROSS_COMPILE=$HOST-
fi
WCC=`which ${CROSS_COMPILE}gcc 2>&1`
if [ "x$WCC" = "x" ]
then
WCC="no gcc"
fi
if ( echo $WCC | egrep "no |not |unknown " >wcc.t1 )
then
WCC=`which ${CROSS_COMPILE}cc 2>&1`
if [ "x$WCC" = "x" ]
then
WCC="no cc"
fi
if ( echo $WCC | egrep "no |not |unknown " >wcc.t2 )
then
echo "not found"
echo
echo "The WFDB software cannot be compiled, because there does not"
echo "appear to be a C compiler installed on this system. Please"
echo "install one, be sure that it is in your PATH, and that it is"
echo "accessible as either '${CROSS_COMPILE}cc' or '${CROSS_COMPILE}gcc', then run ./configure again."
cd ..
exit
else
CC=${CROSS_COMPILE}cc
fi
else
CC=${CROSS_COMPILE}gcc
fi
echo "$CC"
sed "s|CC = gcc|CC = $CC|" <site.def >site.tmp
mv site.tmp site.def
sed "s|CC = gcc|CC = $CC|" <site-slib.def >site.tmp
mv site.tmp site-slib.def
rm -f wcc.t1 wcc.t2
./prompt "Looking for the command to strip debugging metadata ..."
WSTRIP=`which ${CROSS_COMPILE}strip 2>&1`
if [ "x$WSTRIP" = "x" ]
then
WSTRIP="no strip"
fi
if ( echo $WSTRIP | egrep "no |not |unknown " >wstrip.t1 )
then
STRIP=:
echo "not found"
else
STRIP=${CROSS_COMPILE}strip
echo "$STRIP"
fi
rm -f wstrip.t1
if [ "x$STRIP" != "xstrip" ]
then
sed "s|^STRIP = .*|STRIP = $STRIP|" <site.def >site.tmp
mv site.tmp site.def
sed "s|^STRIP = .*|STRIP = $STRIP|" <site-slib.def >site.tmp
mv site.tmp site-slib.def
fi
if [ x$DIR = x ]
then
echo
echo "Where do you wish to install the WFDB Software Package?"
echo "It will be installed in subdirectories of WFDBROOT (by default,"
echo "WFDBROOT is /usr, so that files are installed in /usr/bin,"
echo "/usr/include, /usr/$LIB, etc.). Other reasonable choices for"
echo "WFDBROOT are /usr/local, /opt, or your home directory ($HOME)."
echo "The value of WFDBROOT must be a full pathname (beginning with '/',"
echo "but without a '/' at the end). If the subdirectories (bin, include,"
echo "lib, ...) of WFDBROOT don't exist, they will be created as necessary."
echo
DIR=
while [ x$DIR = x ]
do
./prompt "Choose a location, or press <Enter> to install in /usr:"
read DIR
case x$DIR in
x/usr) ;;
x) DIR=/usr ;;
x*/) DIR=
echo "Please type the path again, omitting the '/' at the end." ;;
x/*) ;;
x*) DIR=
echo "Please enter an absolute pathname, beginning with '/'." ;;
esac
done
fi
case $DIR in
/usr) ;;
/*) sed "s+^WFDBROOT = /usr+WFDBROOT = $DIR+" <site.def >site.tmp
mv site.tmp site.def
sed "s+^WFDBROOT = /usr+WFDBROOT = $DIR+" <site-slib.def \
>site.tmp
mv site.tmp site-slib.def
esac
echo "The WFDB software will be installed in '$DIR'."
if [ x$LIBDIR = xunknown ]
then
case $OS in
Linux*)
nativelibdirs=`$CC -print-search-dirs | sed -n '/^libraries:/{s/^[^=]*=//; s/:/\n/g; p}' | sed ':LP; s+/[^/]*/\.\./+/+; tLP; s+/$++'`
if [ "$MACHINE" = "x86_64" ] && echo "$nativelibdirs" | grep -q "^$DIR/lib64"; then
if [ "x$MFLAGS" = "x-m32" ]; then
LIB=lib
else
LIB=lib64
fi
else
if [ "x$MFLAGS" = "x-m32" ]; then
LIB=lib32
else
LIB=lib
fi
fi ;;
esac
LIBDIR="\$(WFDBROOT)/$LIB"
fi
sed "s+^LIBDIR = .*+LIBDIR = $LIBDIR+" <site.def >site.tmp
mv site.tmp site.def
sed "s+^LIBDIR = .*+LIBDIR = $LIBDIR+" <site-slib.def >site.tmp
mv site.tmp site-slib.def
xlibdir=`echo "$LIBDIR" | sed 's+$(WFDBROOT)+'"$DIR"+`
MANTMP=`grep "MANDIR =" site.def |sed 's+$(WFDBROOT)/++' |cut -d " " -f 3`
MANDEF=$DIR/$MANTMP
if [ x$MANDIR = xunknown ]
then
MANDIR=$MANDEF
fi
if [ x$MANDIR = x ]
then
echo
echo "Where do you wish to install the manual pages?"
echo "They will be installed in subdirectories of MANDIR (by default,"
echo "MANDIR is '$MANDEF'). If you install them in a non-standard"
echo "directory, you will need to add that directory to your MANPATH."
echo "The value of MANDIR must be a full pathname (beginning with '/',"
echo "but without a '/' at the end). If the subdirectories (man1, man3,"
echo "man5, ...) of MANDIR don't exist, they will be created as necessary."
echo
MANDIR=
while [ x$MANDIR = x ]
do
./prompt "Choose a location, or press <Enter> to install in $MANDEF:"
read MANDIR
case x$MANDIR in
x/usr) ;;
x) MANDIR=$MANDEF ;;
x*/) MANDIR=
echo "Please type the path again, omitting the '/' at the end." ;;
x/*) ;;
x*) MANDIR=
echo "Please enter an absolute pathname, beginning with '/'." ;;
esac
done
fi
if [ "$MANDIR" != "$MANDEF" ]
then
sed "s+^MANDIR = $MANDEF+MANDIR = $MANDIR+" <site.def >site.tmp
mv site.tmp site.def
fi
echo "The manual pages will be installed in '$MANDIR'."
echo
# Search for NETLIB if not specified on the command line
if [ x$NETLIB = xunknown ]
then
./prompt "Looking for libcurl ..."
WHICH=`which curl-config 2>&1`
if [ "x$WHICH" = "x" ]
then
WHICH="no curl-config"
fi
if ( echo $WHICH | egrep "no |not |unknown " >which.t1 )
then
echo "not found"
echo "The WFDB software will be compiled without NETFILES"
echo "access, because libcurl does not appear to be"
echo "installed on this system. To add NETFILES access,"
echo "install libcurl and run ./configure again."
NETLIB=none
else
echo "found"
echo "The WFDB software will be compiled with NETFILES access"
echo "using libcurl."
NETLIB=libcurl
fi
rm -f which.t1 which.t2
fi
case $NETLIB in
libcurl) LC="\`curl-config --cflags\`"
LL="\`curl-config --libs\`"
NETFILES=1
NETFILES_LIBCURL=1
VIANF=" via libcurl"
WITHNF=with
;;
none) LC=""
LL=""
NETFILES=0
NETFILES_LIBCURL=0
VIANF=""
WITHNF=without
;;
esac
echo "NETFILES=$NETFILES" >../config.cache
echo "NETFILES_LIBCURL=$NETFILES_LIBCURL" >>../config.cache
sed "s/WFDB_NETFILES 1/WFDB_NETFILES $NETFILES/" < ../lib/wfdb.h0 | \
sed "s/WFDBMAJOR/$MAJOR/" | \
sed "s/WFDBMINOR/$MINOR/" | \
sed "s/WFDBRELEASE/$RELEASE/" | \
sed "s/WFDB_NETFILES_LIBCURL 1/WFDB_NETFILES_LIBCURL $NETFILES_LIBCURL/" \
>../lib/wfdb.h
if [ $NETLIB != "none" ]
then
sed "s/LC =/LC = $LC/" <site.def | sed "s/LL =/LL = $LL/" >site.tmp
mv site.tmp site.def
fi
sed "s/LC =/LC = $LC/" <site-slib.def | sed "s/LL =/LL = $LL/" >site.tmp
mv site.tmp site-slib.def
cd ..
echo
echo "Creating Makefile in lib ..."
if [ -s conf/site-slib.def ]
then
cat lib/Makefile.top conf/site-slib.def lib/Makefile.tpl >lib/Makefile
else
cat lib/Makefile.top conf/site.def lib/Makefile.tpl >lib/Makefile
fi
for D in app checkpkg convert data doc doc/wag-src doc/wpg-src doc/wug-src \
examples fortran psd wave waverc xml .
do
if [ -s $D/Makefile.top ]
then
echo "Creating Makefile in $D ..."
cat $D/Makefile.top conf/site.def $D/Makefile.tpl >$D/Makefile
fi
done
# Create output directories for documentation
for D in doc/wag doc/wpg doc/wug
do
[ -d $D ] || mkdir $D
done
echo rm conf/site.def conf/site-slib.def
if [ "x$WAVE" = "xunknown" ]
then
echo
conf/prompt "Looking for the XView libraries ..."
TEXTEDIT=`which textedit 2>&1`
if [ "x$TEXTEDIT" = "x" ]
then
TEXTEDIT="no textedit"
fi
if [ -d $OWHOME ]
then
WAVE=1;
elif [ -d /usr/local/openwin ]
then
WAVE=1;
OWHOME=/usr/local/openwin
elif [ -d /opt/openwin ]
then
WAVE=1;
OWHOME=/opt/openwin
elif [ -d /usr/include/xview ]
then
WAVE=1;
OWHOME=/usr
elif ( echo $TEXTEDIT | egrep "no |not |unknown " >textedit.t1 )
then
WAVE=0;
else
WAVE=1;
TEDIR=`dirname $TEXTEDIT`;
OWHOME=`dirname $TEDIR`;
fi
rm -f textedit.t1
if [ $WAVE = 0 ]
then
echo "not found"
echo "WAVE will not be compiled, because the XView libraries do not"
echo "appear to be installed on this system."
echo "To compile WAVE, install XView, add the directory containing the"
echo "XView textedit application to your PATH, and run ./configure again."
else
echo "found"
fi
fi
if [ "x$WAVE" = "x1" ]
then
sed "s+/usr/openwin+$OWHOME+" <wave/Makefile >tmp.$$
mv tmp.$$ wave/Makefile
WAVECOMP="WAVE will be compiled and installed in '$DIR/bin'."
echo "WAVE=1" >>config.cache
else
cp -p wave/nomake wave/Makefile
cp -p wave/nomake waverc/Makefile
echo "WAVE=0" >>config.cache
WAVECOMP="WAVE will not be compiled."
fi
# Clean up old *.o files in lib, to avoid possibly using binaries intended
# for a shared library in a static library or vice versa.
rm -f lib/*.o
if [ $DIR != "/usr" -a $LIBTYPE = dynamic ]
then
cat <<EOF
IMPORTANT: You have chosen to build a dynamic (shared) WFDB library in
a directory, $DIR/$LIB, that is not normally searched for such
libraries. In order to use the applications that will be compiled
with this library, it may be necessary to add this directory to your
LD_LIBRARY_PATH. If your shell is csh or a variant, do this by
typing:
EOF
if [ "x$LD_LIBRARY_PATH" = x ]
then
echo " setenv LD_LIBRARY_PATH $DIR/$LIB"
echo "Otherwise, do this by typing:"
echo " LD_LIBRARY_PATH=$DIR/$LIB"
echo " export LD_LIBRARY_PATH"
else
echo " setenv LD_LIBRARY_PATH \${LD_LIBRARY_PATH}:$DIR/$LIB"
echo "Otherwise, do this by typing:"
echo " LD_LIBRARY_PATH=\${LD_LIBRARY_PATH}:$DIR/$LIB"
echo " export LD_LIBRARY_PATH"
fi
fi
if [ $OS = generic ]
then
cat <<EOF
No specific configuration information is available for your operating
system. Please try compiling using the generic Makefiles that have
been generated by this configuration utility. If there are problems,
it may be possible to solve them by customizing conf/generic.def (and
conf/generic-slib.def if you are attempting to compile a shared WFDB
library). Run ./configure again after making any necessary changes to
these files. Please send reports of success or failure, together with
the output of the command 'uname -a', and copies of any files you have
changed, to:
EOF
fi
if [ "x$MFLAGS" != x ]
then
CC="$CC $MFLAGS"
fi
cat <<EOF
Summary:
$PACKAGE-$OS is now ready to be compiled using '$CC'.
The WFDB library will be compiled as a $LIBTYPE library $WITHNF NETFILES
access${VIANF}, and it will be installed in '$xlibdir'.
The WFDB library .h files will be installed in '$DIR/include/wfdb'.
The WFDB applications will be linked to $SYSLIBS system libraries, and
they will be installed in '$DIR/bin'.
$WAVECOMP
Manual pages will be installed in subdirectories of '$MANDIR'.
Sample data files will be installed in '$DIR/database', which
will be included in the default WFDB path.
If you need to compile a different WFDB library type, or install into different
directories, rerun this script with its "-i" (interactive) option:
./configure -i
Other options can be viewed by rerunning this script with its "-h" option:
./configure -h
WFDB software configuration is complete.
Now run 'make' to compile and test, followed by 'make install' to recompile
and install the software, man pages, and example data. Finally, run
'make check' to verify that the installation is complete and successful.
EOF