-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
2897 lines (2891 loc) · 95.7 KB
/
configure.in
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
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
AC_PREREQ(2.50)
AC_INIT(lmain.c)
AC_MSG_CHECKING([OS])
BITS=`(getconf LONG_BIT)`
AC_SUBST(BITS)
ANYTHING_OK="0"
SCREEN32_OK="0"
SOUND32_OK="0"
SCREEN64_OK="0"
SOUND64_OK="0"
OS=`uname`
AC_SUBST(OS, "${OS}")
MACHINE=$(uname -m)
CPU="CPU_INTEL"
if test "$MACHINE" = "armv5l"; then
CPU="CPU_ARM"
fi
if test "$MACHINE" = "armv6l"; then
CPU="CPU_ARM"
fi
if test "$MACHINE" = "armv7l"; then
CPU="CPU_ARM"
fi
if test "$MACHINE" = "armv8l"; then
echo "The architecture is armv8l which should support 64 bit code."
echo "Please send a mail to me: <leif at sm5bsz.com>"
echo "I will send some test packages to figure out how to"
echo "add whatever might be needed to compile Linrad"
exit
CPU="CPU_ARM"
fi
AC_SUBST(CPU)
if test "$CPU" = "CPU_INTEL"; then
ASMLIB32='fftasm.ol getiq.ol fft2mmxa.ol fft2mmxb.ol fft2mmxc.ol simdasm.ol hware.ol split.ol'
ASMLIB64='fftasm.om getiq.om fft2mmxa.om fft2mmxb.om fft2mmxc.om simdasm.om split.om'
else
ASMLIB32="csplit.ol"
ASMLIB64="csplit.om"
fi
AC_SUBST(ASMLIB32)
AC_SUBST(ASMLIB64)
# *******************************************************************
if test "$BITS" = "32"; then
TXT32=""
else
TXT32="(32bit)"
fi
ELF32=""
ELF64=""
if test ${OS} != "Darwin"; then
ldconfig /lib32 /lib64 /usr/lib32 /usr/lib64 /usr/lib32/lib /usr/local/lib \
/usr/local32/lib /emul/ia32-linux/lib /emul/ia32-linux/usr/lib /usr/X11/lib \
/usr/PCBSD/local/lib /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu \
/usr/X11R6/lib /opt/local/lib /usr/lib/arm-linux-gnueabihf \
/usr/local/lib64
ELF64="-felf64"
LIBEXT="so"
S_OS_TYPE="OS_LINUX"
DARWIN="-DDARWIN=0"
if test "$BITS" = "32"; then
ELF32=-felf
else
ELF32=-felf32
fi
else
S_OS_TYPE="OS_WINDOWS"
LIBEXT="dylib"
DARWIN="-DDARWIN=1 -D__STDC_VERSION__=0L"
fi
AC_SUBST(S_OS_TYPE)
# Find out whether we have gcc
CC=gcc
AC_PATH_PROG(HAVE_GCC, ${CC} )
if test "$HAVE_GCC" = ""; then
echo -------------------------------------------------------
echo Can not find ${CC} , the GNU C compiler.
echo Install gcc and development libraries. Then run configure again.
echo Debian, Ubuntu: apt-get install gcc
echo old Fedora: yum install gcc
echo Fedora 22 and later: dnf install gcc
echo Mandriva, Mageia: urpmi gcc
echo SuSE: zypper install gcc
echo Sabayon: Use Rigo application browser to install gcc
exit
fi
${CC} $DARWIN libfind1.c -c -o libfind1.ol 2> x.x
chmod 777 x.x
Y=`cat x.x`
if test "$Y" != ""; then
DARWIN="-DDARWIN=1"
${CC} $DARWIN libfind1.c -c -o libfind1.ol 2> x.x
chmod 777 x.x
Y=`cat x.x`
if test "$Y" != ""; then
echo -------------------------------------------------------
echo $Y
echo -------------------------------------------------------
echo The gcc compiler is installed but does not work.
echo The reason is probably missing header files.
echo Debian, Ubuntu: apt-get install libc6-dev
echo old Fedora: yum install gcc
echo Fedora 22 and later: dnf install gcc
echo SuSE: zypper install gcc
echo -------------------------------------------------------
exit
fi
fi
AC_SUBST(DARWIN)
# ***********************************************************************
# Make the libfind files that we use to figure out whether libraries
# are 32 bit ELF or 64 bit ELF.
${CC} $DARWIN -o libfind1 libfind1.ol -lm 2>x.x
Y=`cat x.x`
chmod 777 x.x
if test "$Y" != ""; then
echo -------------------------------------------------------
echo $Y
echo -------------------------------------------------------
echo The gcc compiler is installed and works, but the linker does not work.
echo a symbolic limk may help:
echo ln /lib/libgcc_s.${LIBEXT}.1 /lib/libgcc_s.${LIBEXT}
echo -------------------------------------------------------
exit
fi
${CC} libfind2.c -c -o libfind2.ol 2> x.x
chmod 777 x.x
Y=`cat x.x`
if test "$Y" != ""; then
echo -------------------------------------------------------
echo $Y
echo -------------------------------------------------------
exit
fi
${CC} -o libfind2 libfind2.ol -lm 2>x.x
chmod 777 x.x
Y=`cat x.x`
if test "$Y" != ""; then
echo -------------------------------------------------------
echo $Y
echo -------------------------------------------------------
exit
fi
# *******************************************************************
# Find out whether we have nasm
if test "$CPU" = "CPU_INTEL"; then
AC_PATH_PROG(NASM, nasm)
if test "$NASM" = ""; then
echo -------------------------------------------------------
echo Can not find NASM, the Netwide Assembler.
echo Install nasm and run configure again.
echo Debian, Ubuntu,: apt-get install nasm
echo PClinuxOS: apt-get install nasm
echo old Fedora: yum install nasm
echo Fedora 22 and later: dnf install nasm
echo SuSE: zypper install nasm
echo Mandriva,Mageia: urpmi nasm
echo Gentoo,Sabayon: emerge nasm
echo You may also get it from the NASM Internet site.
echo -------------------------------------------------------
exit
fi
else
ELF32="UNUSED"
ELF64="UNUSED"
fi
if test "$LIBEXT" = "dylib"; then
ELF32=""
nasm -w-orphan-labels -felf -s -D OS_WINDOWS getiq.s -o getiq.ol 2> x.x
chmod 777 x.x
Y=`cat x.x`
if test "$Y" = ""; then
ELF32=-felf
fi
nasm -w-orphan-labels -fmacho -s -D OS_WINDOWS getiq.s -o getiq.ol 2> x.x
chmod 777 x.x
Y=`cat x.x`
if test "$Y" = ""; then
ELF32=-fmacho
fi
nasm -w-orphan-labels -fmacho32 -s -D OS_WINDOWS getiq.s -o getiq.ol 2> x.x
chmod 777 x.x
Y=`cat x.x`
if test "$Y" = ""; then
ELF32=-fmacho32
fi
ELF64=""
nasm -w-orphan-labels -fmacho64 -s -D OS_WINDOWS getiq64.s -o getiq64.om 2> x.x
chmod 777 x.x
Y=`cat x.x`
if test "$Y" = ""; then
ELF64=-fmacho64
fi
fi
AC_SUBST(ELF32)
AC_SUBST(ELF64)
# *******************************************************************
# Find out whether we have make
AC_PATH_PROG(MAKE, make)
if test "$MAKE" = ""; then
echo -------------------------------------------------------
echo Can not find make which will be needed to build Linrad.
echo Install make and run configure again.
echo Debian, Ubuntu: apt-get install make
echo oldFedora: yum install make
echo Fedora 22 and later: dnf install make
echo Mandriva: urpmi make.
echo SuSE: zypper install make
echo -------------------------------------------------------
exit
fi
AC_PATH_PROG(HAVE_WGET, wget)
AC_PATH_PROG(HAVE_PKG_CONFIG, pkg-config)
AC_PATH_PROG(HAVE_LIBTOOL, libtoolize)
AC_PATH_PROG(HAVE_AUTOMAKE, automake)
AC_PATH_PROG(HAVE_CMAKE, cmake)
AC_PATH_PROG(HAVE_GIT, git)
AC_PATH_PROG(HAVE_ALIEN, alien)
AC_PATH_PROG(HAVE_SUBVERSION, svn)
AC_PATH_PROG(HAVE_XXD, xxd)
AC_PATH_PROG(HAVE_CPP, g++)
HELP="0"
AC_ARG_WITH(help,,HELP="1")
MAKE_SERVER=0
AC_ARG_WITH(server,,MAKE_SERVER="1")
AC_SUBST(MAKE_SERVER)
LLINRAD_EXE="linrad.exe"
AC_SUBST(LLINRAD_EXE)
WLINRAD_EXE="for_Windows"
AC_SUBST(WLINRAD_EXE)
rm -f Makefile
rm -f conf.h
rm -f lconf.h
rm -f rusage.h
rm -f config.cache
SDEVPATH="unkn"
OSSN="0"
if test ${OS} = "Linux"; then
# ************************************************************
# Find out where 4Front OSS is installed and set path to the
# device files for OSS and legacy sound.
AC_CHECK_FILE( /usr/lib/oss/soundcard.h, OSSN="1")
AC_CHECK_FILE( /usr/lib/oss/include/sys/soundcard.h, OSSN="2")
AC_CHECK_FILE( /usr/local/lib/oss/soundcard.h, OSSN="3")
AC_CHECK_FILE( /usr/local/lib/oss/include/sys/soundcard.h, OSSN="4")
AC_CHECK_FILE( /lib/oss/soundcard.h, OSSN="5")
AC_CHECK_FILE( /lib/oss/include/sys/soundcard.h, OSSN="6")
AC_CHECK_FILE( /var/lib/oss/soundcard.h, OSSN="7")
AC_CHECK_FILE( /var/lib/oss/include/sys/soundcard.h, OSSN="8")
AC_CHECK_FILE( /opt/oss/soundcard.h, OSSN="9")
AC_CHECK_FILE( /opt/oss/include/sys/soundcard.h, OSSN="10")
AC_CHECK_FILE( /root/oss/soundcard.h, OSSN="11")
AC_CHECK_FILE( /root/oss/include/sys/soundcard.h, OSSN="12")
AC_SUBST(OSSN)
AC_CHECK_FILE( /dev/dsp, SDEVPATH="/dev/dsp")
AC_CHECK_FILE( /dev/sound/dsp, SDEVPATH="/dev/sound/dsp")
# ********************************************************************
# Find out where to list the init scripts to use when booting Linux
# These will be used to install svgalib_helper, the SDR-14 driver
# and possibly other hardware related drivers to be added.
INIT="/etc/rc.d"
AC_CHECK_FILE( /etc/rc3.d/., INIT="/etc")
AC_CHECK_FILE( /etc/init.d/rc3.d/., INIT="/etc/init.d")
AC_CHECK_FILE( /etc/rc.d/rc3.d/., INIT="/etc/rc.d")
AC_SUBST(INIT)
fi
# ***********************************************************************
# Find out if the user has any files of his own that we should include.
AC_CHECK_FILE( ./users_hwaredriver.c, LUSERHWDR="1")
AC_SUBST(LUSERHWDR)
AC_CHECK_FILE( ./users_hwaredriver.c, LDEPS1="users_hwaredriver.c")
AC_SUBST(LDEPS1)
AC_CHECK_FILE( ./wusers_hwaredriver.c, WUSERHWDR="1")
AC_SUBST(WUSERHWDR)
AC_CHECK_FILE( ./wusers_hwaredriver.c, WDEPS1="wusers_hwaredriver.c")
AC_SUBST(WDEPS1)
AC_CHECK_FILE( ./users_hwaredef.h, LUSERHWDEF="1")
AC_SUBST(LUSERHWDEF)
AC_CHECK_FILE( ./users_hwaredef.h, DEPS2="users_hwaredef.h")
AC_SUBST(DEPS2)
AC_CHECK_FILE( ./wusers_hwaredef.h, WUSERHWDEF="1")
AC_SUBST(WUSERHWDEF)
AC_CHECK_FILE( ./wusers_hwaredef.h, WDEPS4="wusers_hwaredef.h")
AC_SUBST(WDEPS4)
AC_CHECK_FILE( ./users_extra.c, USEREXTRA="1")
AC_SUBST(USEREXTRA)
AC_CHECK_FILE( ./users_extra.c, DEPS3="users_extra.c")
AC_SUBST(DEPS3)
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# Things we need to cross compile for 32 bit Windows under Linux.
WLIN_OK="1"
MINGWPATH=" "
MINGWBIN="mingw32"
#*********************************************************************
#********************************************************************
# Check whether we have mingw32, or at least some of it.
MINGW32_OK="0"
AC_CHECK_FILE(/usr/bin/i686-w64-mingw32-gcc,MINGW32_DEB="1" , MINGW32_DEB="0")
if test "$MINGW32_DEB" = "1"; then
AC_CHECK_FILE(/usr/i686-w64-mingw32/include/math.h,DI="1",DI="0")
fi
if test "$DI" = "1"; then
MINGWBIN="/usr/bin/i686-w64-mingw32-gcc"
MINGWPATH="/usr/i686-w64-mingw32/"
MINGW32_OK="1"
fi
AC_CHECK_FILE(/usr/bin/i586-mingw32msvc-gcc,MINGW32_DEB="1" , MINGW32_DEB="0")
if test "$MINGW32_DEB" = "1"; then
AC_CHECK_FILE(/usr/i586-mingw32msvc/include/math.h,DI="1",DI="0")
fi
if test "$DI" = "1"; then
MINGWBIN="/usr/bin/i586-mingw32msvc-gcc"
MINGWPATH="/usr/i586-mingw32msvc/"
MINGW32_OK="1"
fi
AC_CHECK_FILE(/usr/bin/i586-pc-mingw32-gcc,MINGW32_MDV="1" , MINGW32_MDV="0")
if test "$MINGW32_MDV" = "1"; then
AC_CHECK_FILE(/usr/i586-pc-mingw32/sys-root/mingw/include/math.h,MI="1",MI="0")
fi
if test "$MI" = "1"; then
MINGWBIN="/usr/bin/i586-pc-mingw32-gcc"
MINGWPATH="/usr/i586-pc-mingw32/sys-root/mingw/"
MINGW32_OK="1"
fi
AC_CHECK_FILE(/usr/bin/i686-pc-mingw32-gcc,MINGW32_FD1="1" , MINGW32_FD1="0")
if test "$MINGW32_FD1" = "1"; then
AC_CHECK_FILE(/usr/i686-pc-mingw32/sys-root/mingw/include/math.h,FI1="1",FI1="0")
fi
if test "$FI1" = "1"; then
MINGWBIN="/usr/bin/i686-pc-mingw32-gcc"
MINGWPATH="/usr/i686-pc-mingw32/sys-root/mingw/"
MINGW32_OK="1"
fi
AC_CHECK_FILE(/usr/bin/i686-w64-mingw32-gcc,MINGW32_FD2="1" , MINGW32_FD2="0")
if test "$MINGW32_FD2" = "1"; then
AC_CHECK_FILE(/usr/i686-w64-mingw32/sys-root/mingw/include/math.h,FI2="1",FI2="0")
fi
if test "$FI2" = "1"; then
MINGWBIN=/usr/bin/i686-w64-mingw32-gcc;
MINGWPATH="/usr/i686-w64-mingw32/sys-root/mingw/"
MINGW32_OK="1"
fi
if test "$MINGW32_OK" = "0"; then
# Everything failed.
WLIN_OK="0"
fi
#*********************************************************************
if test "$WLIN_OK" = "1"; then
ANYTHING_OK="1"
fi
AC_SUBST(MINGWPATH)
AC_SUBST(MINGWBIN)
AC_SUBST(WLIN_OK)
AC_SUBST(MINGW32_OK)
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# The remaining tests are for Linux and/or FreeBSD
# *************************************************************************
# Linrad is backwards compatible under Linux back to kernel 2.2.12
# This section sets defines we need to maintain compatibility.
XFLUSH_OK=1
LIBRT=""
if test ${OS} = "Linux"; then
LIBRT=-lrt
kerntot=`(uname -r) | cut -d- -f-1`
kernver=`(echo $kerntot) | cut -d. -f-3`
case `(uname -r) | cut -d. -f-2` in
"2.2")
RUSAGE=1
SDR1422=sdr14
SDR1424=no_use
SDR1426=no_use2
SDR1430=no_use3
MODEXT=o
;;
"2.4")
SDR1422=no_use2
SDR1424=sdr14
SDR1426=no_use
SDR1430=no_use3
RUSAGE=1
MODEXT=o
OSVER=1
;;
"2.6")
RUSAGE=0
SDR1426=sdr14
SDR1424=no_use
SDR1422=no_use2
SDR1430=no_use3
MODEXT=ko
case `(echo $kerntot) | cut -d. -f-3` in
"2.6.1")
FT245PGM=ERROR
RUSAGE=1
KERNEL_SUBDIRS=SUBDIRS
;;
"2.6.2")
FT245PGM=ERROR
RUSAGE=1
KERNEL_SUBDIRS=SUBDIRS
;;
"2.6.3")
FT245PGM=ERROR
RUSAGE=1
KERNEL_SUBDIRS=SUBDIRS
;;
"2.6.4")
OSVER=2
RUSAGE=1
KERNEL_SUBDIRS=SUBDIRS
;;
"2.6.5")
OSVER=2
RUSAGE=1
KERNEL_SUBDIRS=SUBDIRS
;;
"2.6.6")
OSVER=4
RUSAGE=1
KERNEL_SUBDIRS=SUBDIRS
;;
"2.6.7")
OSVER=4
RUSAGE=1
KERNEL_SUBDIRS=SUBDIRS
;;
"2.6.8")
RUSAGE=0
KERNEL_SUBDIRS=SUBDIRS
case `(uname -r)` in
"2.6.8-24-default")
OSVER=4
;;
*)
OSVER=2
;;
esac
;;
"2.6.9")
OSVER=4
RUSAGE=0
KERNEL_SUBDIRS=SUBDIRS
;;
"2.6.10")
OSVER=4
RUSAGE=0
KERNEL_SUBDIRS=SUBDIRS
;;
"2.6.11")
OSVER=4
RUSAGE=0
KERNEL_SUBDIRS=SUBDIRS
;;
"2.6.12")
OSVER=4
RUSAGE=0
KERNEL_SUBDIRS=M
;;
"2.6.13")
OSVER=4
RUSAGE=0
KERNEL_SUBDIRS=M
;;
"2.6.14")
OSVER=4
RUSAGE=0
KERNEL_SUBDIRS=M
;;
"2.6.15")
OSVER=4
RUSAGE=0
KERNEL_SUBDIRS=M
;;
"2.6.16")
OSVER=8
RUSAGE=0
KERNEL_SUBDIRS=M
;;
"2.6.17")
OSVER=8
RUSAGE=0
KERNEL_SUBDIRS=M
;;
"2.6.18")
OSVER=8
RUSAGE=0
KERNEL_SUBDIRS=M
;;
"2.6.19")
OSVER=8
RUSAGE=0
KERNEL_SUBDIRS=M
;;
"2.6.20")
OSVER=8
RUSAGE=0
KERNEL_SUBDIRS=M
;;
"2.6.21")
OSVER=8
RUSAGE=0
KERNEL_SUBDIRS=M
;;
"2.6.22")
OSVER=8
RUSAGE=0
KERNEL_SUBDIRS=M
;;
"2.6.23")
OSVER=8
RUSAGE=0
KERNEL_SUBDIRS=M
;;
"2.6.24")
OSVER=8
RUSAGE=0
KERNEL_SUBDIRS=M
;;
"2.6.25")
OSVER=8
RUSAGE=0
KERNEL_SUBDIRS=M
;;
"2.6.26")
OSVER=8
RUSAGE=0
KERNEL_SUBDIRS=M
;;
"2.6.27")
OSVER=8
RUSAGE=0
KERNEL_SUBDIRS=M
;;
"2.6.28")
OSVER=8
RUSAGE=0
KERNEL_SUBDIRS=M
XFLUSH_OK=0
LIBRT=""
;;
"2.6.29")
OSVER=8
RUSAGE=0
KERNEL_SUBDIRS=M
XFLUSH_OK=0
LIBRT=""
;;
"2.6.30")
OSVER=8
RUSAGE=0
KERNEL_SUBDIRS=M
XFLUSH_OK=0
LIBRT=""
;;
"2.6.31")
OSVER=8
RUSAGE=0
KERNEL_SUBDIRS=M
XFLUSH_OK=0
LIBRT=""
;;
"2.6.32")
OSVER=8
RUSAGE=0
KERNEL_SUBDIRS=M
XFLUSH_OK=0
LIBRT=""
;;
*)
OSVER=9
RUSAGE=0
KERNEL_SUBDIRS=M
XFLUSH_OK=0
LIBRT=""
;;
esac
;;
*)
RUSAGE=0
LIBRT=""
SDR1426=no_use3
SDR1424=no_use
SDR1422=no_use2
SDR1430=sdr14
;;
esac
AC_SUBST(SDR1430)
AC_SUBST(SDR1426)
AC_SUBST(SDR1424)
AC_SUBST(SDR1422)
AC_SUBST(MODEXT)
AC_SUBST(KERNEL_SUBDIRS)
AC_CHECK_FILE( /usr/src/linux, LINDIR="linux")
AC_CHECK_FILE( /usr/src/linux-2.4, LINDIR="linux-2.4")
AC_SUBST(LINDIR)
AC_SUBST(FT245PGM)
AC_SUBST(OSVER)
else
AC_CHECK_FILE( /dev/dsp, SDEVPATH="/dev/dsp")
RUSAGE=0
LIBRT=""
fi
AC_SUBST(XFLUSH_OK)
AC_SUBST(SDEVPATH)
AC_SUBST(RUSAGE)
if test "$RUSAGE" = "1"; then
M32=""
else
M32="-m32"
fi
if test "$CPU" = "CPU_ARM" ; then
M32=""
fi
AC_SUBST(M32)
AC_SUBST(LIBRT)
# *******************************************************************
# Symbol tables make the executable about 3 times bigger.
# There is an option in options.h to disable them.
# That is the option -s to the gcc linker.
# The -s option is obsolete in Mac OSX and generates a warning
# message which is avoided by not setting the -s option under Darwin
if test "$DARWIN" = "-DDARWIN=0"; then
grep SYMBOL_TABLES options.h > x.x
X=`grep TRUE x.x | cut -dd -f-1`
if test "$X" = "#"; then
ST=""
else
ST="Wl-s "
fi
else
ST="-Wl,-no_pie"
fi
AC_SUBST(ST)
# ********************************************************************
# Check if we have svgalib
SVGALIB32_OK="0"
SVGALIB64_OK="0"
SVGA32_LD="libvga.${LIBEXT}"
SVGA64_LD="libvga.${LIBEXT}"
X=`./libfind1 libvga.${LIBEXT}`
SVGA32_INC=`./libfind2 [1] ["$X"]`
SVGA64_INC=`./libfind2 [2] ["$X"]`
Y=`./libfind2 [0] ["$X"]`
if test "$Y" = "1"; then
SVGALIB32_OK="1"
SVGA32_LD=`./libfind2 [3] ["$X"]`
fi
if test "$Y" = "2"; then
SVGALIB64_OK="1"
SVGA64_LD=`./libfind2 [4] ["$X"]`
fi
if test "$Y" = "3"; then
SVGALIB32_OK="1"
SVGA32_LD=`./libfind2 [3] ["$X"]`
SVGALIB64_OK="1"
SVGA64_LD=`./libfind2 [4] ["$X"]`
fi
SVGAGL32_LD="libvgagl.${LIBEXT}"
SVGAGL64_LD="libvgagl.${LIBEXT}"
X=`./libfind1 libvgagl.${LIBEXT}`
SVGAGL32_INC=`./libfind2 [1] ["$X"]`
SVGAGL64_INC=`./libfind2 [2] ["$X"]`
Y=`./libfind2 [0] ["$X"]`
if test "$Y" = "1"; then
SVGAGL32_LD=`./libfind2 [3] ["$X"]`
fi
if test "$Y" = "2"; then
SVGAGL64_LD=`./libfind2 [4] ["$X"]`
fi
if test "$Y" = "3"; then
SVGAGL32_LD=`./libfind2 [3] ["$X"]`
SVGAGL64_LD=`./libfind2 [4] ["$X"]`
fi
SVGALIB32_H="0"
SVGALIB64_H="0"
if test "$SVGALIB32_OK" = "1"; then
${CC} ${M32} verify_svgalib.c "$SVGA32_INC" "$SVGAGL32_INC" "$SVGA32_LD" \
"$SVGAGL32_LD" -o verify_svgalib.ol 2> x.x
chmod 777 x.x
Y=`cat x.x`
if test "$Y" = ""; then
SVGALIB32_H="1"
else
SVGALIB32_OK="0"
SVGAGL32_LD=""
SVGA32_LD=""
fi
fi
if test "$SVGALIB64_OK" = "1"; then
${CC} -m64 verify_svgalib.c "$SVGA64_INC" "$SVGAGL64_INC" "$SVGA64_LD" \
"$SVGAGL64_LD" -o verify_svgalib.ol 2> x.x
chmod 777 x.x
Y=`cat x.x`
if test "$Y" = ""; then
SVGALIB64_H="1"
else
SVGALIB64_H="0"
SVGAGL64_LD=""
SVGA64_LD=""
fi
fi
AC_SUBST(SVGA32_LD)
AC_SUBST(SVGA64_LD)
AC_SUBST(SVGAGL32_LD)
AC_SUBST(SVGAGL64_LD)
AC_SUBST(SVGA32_INC)
AC_SUBST(SVGA64_INC)
AC_SUBST(SVGAGL32_INC)
AC_SUBST(SVGAGL64_INC)
# *********************************************************************
# Set variables that will create verbose error messages from Makefile.
CONSOLE32_OK="$SVGALIB32_OK"
CONSOLE64_OK="$SVGALIB64_OK"
# here we can set CONSOLExx_OK to zero when something is missing.
AC_SUBST(CONSOLE32_OK)
AC_SUBST(CONSOLE64_OK)
# ********************************************************************
# Check if we have X11
X11_32_OK="0"
X11_64_OK="0"
X11_32_LD="libX11.${LIBEXT}"
X11_64_LD="libX11.${LIBEXT}"
X=`./libfind1 libX11.${LIBEXT}`
X11_32_INC=`./libfind2 [1] ["$X"]`
X11_64_INC=`./libfind2 [2] ["$X"]`
Y=`./libfind2 [0] ["$X"]`
if test "$Y" = "1"; then
X11_32_OK="1"
X11_32_LD=`./libfind2 [3] ["$X"]`
fi
if test "$Y" = "2"; then
X11_64_OK="1"
X11_64_LD=`./libfind2 [4] ["$X"]`
fi
if test "$Y" = "3"; then
X11_32_OK="1"
X11_64_OK="1"
X11_32_LD=`./libfind2 [3] ["$X"]`
X11_64_LD=`./libfind2 [4] ["$X"]`
fi
X11_32_H="0"
X11_64_H="0"
XKBLIB_32_OK="0"
XKBLIB_64_OK="0"
if test "$X11_32_OK" = "1"; then
${CC} ${M32} verify_x11.c $X11_32_INC $X11_32_LD -o verify_x11.ol 2> x.x
chmod 777 x.x
Y=`cat x.x`
if test "$Y" = ""; then
X11_32_H="1"
${CC} ${M32} verify_xkblib.c $X11_32_INC $X11_32_LD -o verify_xkblib.ol 2> x.x
chmod 777 x.x
Y=`cat x.x`
if test "$Y" = ""; then
XKBLIB_32_OK="1"
fi
else
X11_32_OK="0"
X11_32_LD=""
echo $Y
fi
fi
if test "$X11_64_OK" = "1"; then
${CC} -m64 verify_x11.c $X11_64_INC $X11_64_LD -o verify_x11.om 2> x.x
chmod 777 x.x
Y=`cat x.x`
if test "$Y" = ""; then
X11_64_H="1"
${CC} -m64 verify_xkblib.c $X11_64_INC $X11_64_LD -o verify_xkblib.om 2> x.x
chmod 777 x.x
Y=`cat x.x`
if test "$Y" = ""; then
XKBLIB_64_OK="1"
fi
else
X11_64_H="0"
X11_64_LD=""
fi
fi
X11_32_ALL_OK="$X11_32_H"
X11_64_ALL_OK="$X11_64_H"
if test "$X11_32_OK" = "0"; then
X11_32_ALL_OK="0"
fi
if test "$X11_64_OK" = "0"; then
X11_64_ALL_OK="0"
fi
AC_SUBST(SVGALIB32_OK)
AC_SUBST(SVGALIB64_OK)
AC_SUBST(X11_32_INC)
AC_SUBST(X11_64_INC)
AC_SUBST(X11_32_OK)
AC_SUBST(X11_64_OK)
AC_SUBST(X11_32_LD)
AC_SUBST(X11_64_LD)
AC_SUBST(X11_32_ALL_OK)
AC_SUBST(X11_64_ALL_OK)
AC_SUBST(XKBLIB_32_OK)
AC_SUBST(XKBLIB_64_OK)
# ********************************************************************
# Check if we can use MIT-SHM, the shared memory fast graphics for X11.
LIBXEXT32_OK="0"
LIBXEXT64_OK="0"
LIBXEXT32_LD="libXext.${LIBEXT}"
LIBXEXT64_LD="libXext.${LIBEXT}"
X=`./libfind1 libXext.${LIBEXT}`
Y=`./libfind2 [0] ["$X"]`
if test "$Y" = "1"; then
LIBXEXT32_OK="1"
LIBXEXT32_LD=`./libfind2 [3] ["$X"]`
fi
if test "$Y" = "2"; then
LIBXEXT64_OK="1"
LIBXEXT64_LD=`./libfind2 [4] ["$X"]`
fi
if test "$Y" = "3"; then
LIBXEXT32_OK="1"
LIBXEXT32_LD=`./libfind2 [3] ["$X"]`
LIBXEXT64_OK="1"
LIBXEXT64_LD=`./libfind2 [4] ["$X"]`
fi
LIBXEXT32_H="0"
LIBXEXT64_H="0"
${CC} ${M32} verify_xext.c $X11_32_INC $X11_32_LD -o verify_xext.ol 2> x.x
chmod 777 x.x
Y=`cat x.x`
if test "$Y" = ""; then
LIBXEXT32_H="1"
else
LIBXEXT32_OK="0"
LIBXEXT32_LD=""
fi
if test "$BITS" = "64"; then
${CC} -m64 verify_xext.c $X11_64_INC $X11_64_LD -o verify_xext.ol 2> x.x
chmod 777 x.x
Y=`cat x.x`
if test "$Y" = ""; then
LIBXEXT64_H="1"
else
LIBXEXT64_OK="0"
LIBXEXT64_LD=""
fi
fi
AC_SUBST(LIBXEXT32_LD)
AC_SUBST(LIBXEXT64_LD)
AC_SUBST(LIBXEXT32_OK)
AC_SUBST(LIBXEXT64_OK)
#********************************************************************
# Look for the Perseus libraries that we need to compile for Linux.
PERSEUS32_OK="0"
PERSEUS64_OK="0"
PERSEUS32_LD=libperseus-sdr.${LIBEXT}
PERSEUS64_LD=libperseus-sdr.${LIBEXT}
X=`./libfind1 libperseus-sdr.${LIBEXT}`
PERSEUS32_INC=`./libfind2 [1] ["$X"]`
PERSEUS64_INC=`./libfind2 [2] ["$X"]`
Y=`./libfind2 [0] ["$X"]`
if test "$Y" = "1"; then
PERSEUS32_OK="1"
PERSEUS32_LD=`./libfind2 [3] ["$X"]`
fi
if test "$Y" = "2"; then
PERSEUS64_OK="1"
PERSEUS64_LD=`./libfind2 [4] ["$X"]`
fi
if test "$Y" = "3"; then
PERSEUS32_OK="1"
PERSEUS32_LD=`./libfind2 [3] ["$X"]`
PERSEUS64_OK="1"
PERSEUS64_LD=`./libfind2 [4] ["$X"]`
fi
#********************************************************************
# Look for the libusb-1.0 package that we need for Perseus.
LIBUSB1_32_OK="0"
LIBUSB1_64_OK="0"
LIBUSB1_32_LD="libusb-1.0.${LIBEXT}"
LIBUSB1_64_LD="libusb-1.0.${LIBEXT}"
X=`./libfind1 libusb-1.0.${LIBEXT}`
Y=`./libfind2 [0] ["$X"]`
if test "$Y" = "1"; then
LIBUSB1_32_OK="1"
LIBUSB1_32_LD=`./libfind2 [3] ["$X"]`
fi
if test "$Y" = "2"; then
LIBUSB1_64_OK="1"
LIBUSB1_64_LD=`./libfind2 [4] ["$X"]`
fi
if test "$Y" = "3"; then
LIBUSB1_32_OK="1"
LIBUSB1_32_LD=`./libfind2 [3] ["$X"]`
LIBUSB1_64_OK="1"
LIBUSB1_64_LD=`./libfind2 [4] ["$X"]`
fi
AC_SUBST(PERSEUS32_LD)
AC_SUBST(PERSEUS64_LD)
AC_SUBST(LIBUSB1_32_LD)
AC_SUBST(LIBUSB1_64_LD)
# ********************************************************************
# Look for (the old) libusb package that we need for si570 and for
# USB2LPT (usb2lpt.c) to use a parallel port on USB.
LIBUSB32_OK="0"
LIBUSB64_OK="0"
LIBUSB32_LD="libusb.${LIBEXT}"
LIBUSB64_LD="libusb.${LIBEXT}"
X=`./libfind1 libusb.${LIBEXT}`
Y=`./libfind2 [0] ["$X"]`
if test "$Y" = "1"; then
LIBUSB32_OK="1"
LIBUSB32_LD=`./libfind2 [3] ["$X"]`
fi
if test "$Y" = "2"; then
LIBUSB64_OK="1"
LIBUSB64_LD=`./libfind2 [4] ["$X"]`
fi
if test "$Y" = "3"; then
LIBUSB32_OK="1"
LIBUSB32_LD=`./libfind2 [3] ["$X"]`
LIBUSB64_OK="1"
LIBUSB64_LD=`./libfind2 [4] ["$X"]`
fi
AC_SUBST(LIBUSB32_LD)
AC_SUBST(LIBUSB64_LD)
# ********************************************************************
# Look for the libftdi package that we need for Soft66 and Elektor
LIBFTDI32_OK="0"
LIBFTDI64_OK="0"
LIBFTDI32_LD="libftdi.${LIBEXT}"
LIBFTDI64_LD="libftdi.${LIBEXT}"
X=`./libfind1 libftdi.${LIBEXT}`
Y=`./libfind2 [0] ["$X"]`
if test "$Y" = "1"; then
LIBFTDI32_OK="1"
LIBFTDI32_LD=`./libfind2 [3] ["$X"]`
fi
if test "$Y" = "2"; then
LIBFTDI64_OK="1"
LIBFTDI64_LD=`./libfind2 [4] ["$X"]`
fi
if test "$Y" = "3"; then
LIBFTDI32_OK="1"
LIBFTDI32_LD=`./libfind2 [3] ["$X"]`
LIBFTDI64_OK="1"
LIBFTDI64_LD=`./libfind2 [4] ["$X"]`
fi
AC_SUBST(LIBFTDI32_LD)
AC_SUBST(LIBFTDI64_LD)
# Look for the soft66 package that we need for Soft66 receiver support
SOFT66_32_OK="0"
SOFT66_64_OK="0"
X=`./libfind1 libsoft66.${LIBEXT}`
Y=`./libfind2 [0] ["$X"]`
if test "$Y" = "1"; then
SOFT66_32_OK="1"
SOFT66_32_LD=`./libfind2 [3] ["$X"]`
fi
if test "$Y" = "2"; then
SOFT66_64_OK="1"
SOFT66_64_LD=`./libfind2 [4] ["$X"]`
fi
if test "$Y" = "3"; then
SOFT66_32_OK="1"
SOFT66_32_LD=`./libfind2 [3] ["$X"]`
SOFT66_64_OK="1"
SOFT66_64_LD=`./libfind2 [4] ["$X"]`
fi
AC_SUBST(SOFT66_32_LD)
AC_SUBST(SOFT66_64_LD)
# ********************************************************************
# Look for the librtlsdr package that we need for Realtek RTL2832 support
LIBRTLSDR32_OK="0"
LIBRTLSDR64_OK="0"
LIBRTLSDR32_LD="librtlsdr.${LIBEXT}"
LIBRTLSDR64_LD="librtlsdr.${LIBEXT}"
X=`./libfind1 librtlsdr.${LIBEXT}`
Y=`./libfind2 [0] ["$X"]`
if test "$Y" = "1"; then
LIBRTLSDR32_OK="1"
LIBRTLSDR32_LD=`./libfind2 [3] ["$X"]`
fi
if test "$Y" = "2"; then
LIBRTLSDR64_OK="1"
LIBRTLSDR64_LD=`./libfind2 [4] ["$X"]`
fi
if test "$Y" = "3"; then
LIBRTLSDR32_OK="1"
LIBRTLSDR32_LD=`./libfind2 [3] ["$X"]`
LIBRTLSDR64_OK="1"
LIBRTLSDR64_LD=`./libfind2 [4] ["$X"]`
fi
AC_SUBST(LIBRTLSDR32_LD)
AC_SUBST(LIBRTLSDR64_LD)
# Look for libwd_dask.so that we need for PCIe-9842
LIBWD_DASK_32_OK="0"
LIBWD_DASK_64_OK="0"
LIBWD_DASK_32_LD="libwd_dask.${LIBEXT}"
LIBWD_DASK_64_LD="libwd_dask64.${LIBEXT}"
X=`./libfind1 libwd_dask.${LIBEXT}`
Y=`./libfind2 [0] ["$X"]`
if test "$Y" = "1"; then
LIBWD_DASK_32_OK="1"
LIBWD_DASK_32_LD=`./libfind2 [3] ["$X"]`