forked from ShabbyX/RTAI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
2067 lines (1822 loc) · 69.5 KB
/
configure.ac
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
dnl Process this file with autoconf to create configure
AC_PREREQ(2.68)
AC_INIT([RTAI], [UNOFFICIAL], [https://github.com/ShabbyX/RTAI/issues])
CONFIG_RTAI_VERSION_MAJOR=4
CONFIG_RTAI_VERSION_MINOR=0
CONFIG_RTAI_REVISION_LEVEL=0
AC_CONFIG_HEADERS(rtai_config.h)
AC_CONFIG_AUX_DIR([bin])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR(base/sched/sched.c)
AC_PREFIX_DEFAULT(/usr/realtime)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_PROG_INSTALL
AC_ARG_WITH(CC,
[ --with-cc=compiler use specific C compiler],
[
case "$withval" in
"" | y | ye | yes | n | no)
AC_MSG_ERROR([You must supply an argument to --with-cc.])
;;
esac
CC="$withval"
])
dnl set only if undefined
if test x"$CROSS_COMPILE" = x ; then
CROSS_COMPILE=
using_crosscompile=n
else
using_crosscompile=y
fi
AC_MSG_CHECKING([for CROSS_COMPILE])
AC_MSG_RESULT([$CROSS_COMPILE])
AC_PROG_CC
CFLAGS=""
AC_ARG_WITH(CXX,
[ --with-cxx=compiler use specific C++ compiler],
[ case "$withval" in
"" | y | ye | yes | n | no)
AC_MSG_ERROR([You must supply an argument to --with-cxx.])
;;
esac
CXX="$withval" ])
AC_PROG_CXX
CXXFLAGS=""
dnl If we're using GCC, make sure that it is at least version 3.3.0. Older
dnl versions are explictly not supported.
AC_MSG_CHECKING([whether gcc version is sufficient])
major=0
minor=0
GCC_VERSION=`$CC -dumpversion`
if test $? -eq 0; then
GCC_VERSION_MAJOR=`echo $GCC_VERSION | cut -d. -f1`
GCC_VERSION_MINOR=`echo $GCC_VERSION | cut -d. -f2`
fi
if test $GCC_VERSION_MAJOR -lt 3 -o $GCC_VERSION_MAJOR -eq 3 -a $GCC_VERSION_MINOR -lt 3 ; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([If using GCC, version 3.3.0 or later is required.])
else
AC_MSG_RESULT([yes])
fi
AC_DEFINE_UNQUOTED(CONFIG_RTAI_BUILD_STRING,"$build",[Build system alias])
RTAI_BUILD_STRING="$build"
AC_DEFINE_UNQUOTED(CONFIG_RTAI_HOST_STRING,"$host",[Host system alias])
RTAI_HOST_STRING="$host"
AC_DEFINE_UNQUOTED(CONFIG_RTAI_COMPILER,"`$CC -v 2>&1 | tail -n 1`",[Compiler])
AM_INIT_AUTOMAKE([foreign no-exeext dist-bzip2])
AM_MAINTAINER_MODE
LT_INIT
AM_PROG_AS
dnl Find arch-specific requirements and supports. Features which
dnl are not supported by all archs must be listed here, so that a
dnl an Autoconf flag can later be defined/undefined in rtai_config.h.
arch_supports_lxrt=
arch_supports_leds=
arch_supports_sim=
arch_supports_rtailab=
arch_has_mmu=y
case "$host" in
i*86*-*)
RTAI_TARGET_ARCH=x86
RTAI_TARGET_SUBARCH=32
arch_has_mmu=y
arch_supports_lxrt=y
arch_supports_leds=y
arch_supports_sim=y
arch_supports_rtailab=y
wanted_kernel_arch=CONFIG_X86_32
;;
x86_64*-*)
RTAI_TARGET_ARCH=x86
RTAI_TARGET_SUBARCH=64
arch_has_mmu=y
arch_supports_lxrt=y
arch_supports_leds=n
arch_supports_sim=n
arch_supports_rtailab=n
wanted_kernel_arch=CONFIG_X86_64
;;
arm-*)
RTAI_TARGET_ARCH=arm
wanted_kernel_arch=CONFIG_ARM
;;
powerpc-*|ppc-*)
RTAI_TARGET_ARCH=ppc
wanted_kernel_arch=CONFIG_PPC
;;
m68k-*)
RTAI_TARGET_ARCH=m68k
wanted_kernel_arch=CONFIG_M68K
;;
*) echo ""
echo "*******************************************"
echo "Still unsupported host: $host -- Sorry."
echo "*******************************************"
echo ""
exit 1;;
esac
dnl
dnl Load the RTAI configuration.
dnl
RTAI_KCONFIG_FILE=$srcdir/base/arch/$RTAI_TARGET_ARCH/defconfig
kconfig_type=default
AC_ARG_WITH(kconfig-file,
[ --with-kconfig-file=<kconfig-file> KConfig parameter file],
[
case "$withval" in
"" | y | ye | yes | n | no)
AC_MSG_ERROR([You must supply an argument to --with-kconfig-file.])
;;
esac
RTAI_KCONFIG_FILE="$withval"
kconfig_type=supplied
])
AC_MSG_CHECKING([for RTAI Kconfig file])
if test \! -f $RTAI_KCONFIG_FILE; then
AC_MSG_ERROR([Kconfig-file $RTAI_KCONFIG_FILE not found -- --with-kconfig-file sets Kconfig file])
fi
. $RTAI_KCONFIG_FILE
AC_MSG_RESULT([$RTAI_KCONFIG_FILE ($kconfig_type)])
dnl
dnl Installation directory for modules
dnl
AC_MSG_CHECKING([for module installation directory])
AC_ARG_WITH(module-dir,
[ --with-module-dir=<module-dir> Installation directory for modules],
[
case "$withval" in
"" | y | ye | yes | n | no)
AC_MSG_ERROR([You must supply an argument to --with-module-dir.])
;;
esac
RTAI_MODULE_DIR="$withval"
])
dnl Are we building into the source tree?
if test "$srcdir" = `pwd`; then
CONFIG_RTAI_OLD_FASHIONED_BUILD=y
else
CONFIG_RTAI_OLD_FASHIONED_BUILD=
fi
dnl Set a default module dir if unspecified
if test "x" = "x$RTAI_MODULE_DIR"
then
RTAI_MODULE_DIR='${exec_prefix}/modules'
fi
AC_MSG_RESULT([$RTAI_MODULE_DIR])
CONFIG_RTAI_MODULE_DIR=$RTAI_MODULE_DIR
dnl
dnl Process the Linux kernel configuration
dnl
AC_MSG_CHECKING([for Linux source tree])
dnl CONFIG_MODULES has been forcibly set in RTAI's configuration
dnl file, therefore we must unset it before later checking if the kernel
dnl actually defined it as required too.
unset CONFIG_MODULES
dnl safe default
if test x$CONFIG_RTAI_LINUXDIR != x ; then
RTAI_LINUX_DIR=$CONFIG_RTAI_LINUXDIR
else
RTAI_LINUX_DIR="/usr/src/linux"
fi
AC_ARG_WITH(linux-dir,
[ --with-linux-dir=<linux-dir> RTAI-enabled Linux kernel tree],
[
case "$withval" in
"" | y | ye | yes | n | no)
if test x${CONFIG_RTAI_LINUXDIR} = x; then
AC_MSG_ERROR([You must supply an argument to --with-linux-dir.])
else
withval=${CONFIG_RTAI_LINUXDIR}
fi
;;
esac
RTAI_LINUX_DIR="$withval"
])
if test x${RTAI_LINUX_DIR} = x; then
echo
AC_MSG_ERROR([Linux kernel tree not specified -- use --with-linux-dir])
fi
if test \! -r ${RTAI_LINUX_DIR}/Makefile; then
echo
AC_MSG_ERROR([No Linux kernel tree in ${RTAI_LINUX_DIR}])
fi
if grep KERNELSRC $RTAI_LINUX_DIR/Makefile > /dev/null; then
eval LINUX_`grep '^KERNELSRC' $RTAI_LINUX_DIR/Makefile | sed -e 's, ,,g'|sed -e 's,:,,g'`
eval LINUX_`grep '^KERNELOUTPUT' $RTAI_LINUX_DIR/Makefile | sed -e 's, ,,g'|sed -e 's,:,,g'`
elif grep '^MAKEARGS *:= *-C' $RTAI_LINUX_DIR/Makefile > /dev/null; then
LINUX_KERNELSRC=`sed -n -e 's,^MAKEARGS *:= *-C *\(@<:@^@<:@:space:@:>@@:>@*\),\1,p' $RTAI_LINUX_DIR/Makefile`
LINUX_KERNELOUTPUT=$RTAI_LINUX_DIR
else
LINUX_KERNELOUTPUT=$RTAI_LINUX_DIR
LINUX_KERNELSRC=$RTAI_LINUX_DIR
fi
eval linux_`grep '^EXTRAVERSION =' $LINUX_KERNELSRC/Makefile | sed -e 's, ,,g'`
eval linux_`grep '^PATCHLEVEL =' $LINUX_KERNELSRC/Makefile | sed -e 's, ,,g'`
eval linux_`grep '^SUBLEVEL =' $LINUX_KERNELSRC/Makefile | sed -e 's, ,,g'`
eval linux_`grep '^VERSION =' $LINUX_KERNELSRC/Makefile | sed -e 's, ,,g'`
dnl Load Linux kernel configuration now, before config symbols are tested.
if test \! -r ${LINUX_KERNELOUTPUT}/.config; then
AC_MSG_RESULT([invalid])
AC_MSG_ERROR([$LINUX_KERNELOUTPUT is not configured -- --with-linux-dir sets linux-dir])
fi
. $LINUX_KERNELOUTPUT/.config
RTAI_LINUX_VERSION="$linux_VERSION.$linux_PATCHLEVEL.$linux_SUBLEVEL"
AC_MSG_RESULT([$RTAI_LINUX_DIR (kernel ${RTAI_LINUX_VERSION}${CONFIG_SMP:+-SMP})])
if test x${CONFIG_RTAI_LINUXDIR} = x; then
CONFIG_RTAI_LINUXDIR=$RTAI_LINUX_DIR
fi
dnl
dnl define the name of the target arch (only matters for powerpc so far)
dnl
case $RTAI_TARGET_ARCH in
ppc|powerpc)
dnl $linux_VERSION.$linux_PATCHLEVEL.$linux_SUBLEVEL
if test $linux_VERSION -gt 2 ; then
ARCH_SUBDIR=powerpc
elif test $linux_VERSION -eq 2 -a $linux_PATCHLEVEL -lt 6 ; then
ARCH_SUBDIR=ppc
elif test "$linux_VERSION.$linux_PATCHLEVEL" = "2.6" \
-a $linux_SUBLEVEL -gt 28 ; then
ARCH_SUBDIR=powerpc
else
ARCH_SUBDIR=ppc
fi
RTAI_TARGET_ARCH_NAME=$ARCH_SUBDIR
;;
m68k)
RTAI_TARGET_ARCH_NAME=$RTAI_TARGET_ARCH
;;
*)
RTAI_TARGET_ARCH_NAME=$RTAI_TARGET_ARCH
;;
esac
dnl
dnl Identify the base technology used.
dnl
unset CONFIG_RTAI_ADEOS
unset CONFIG_RTAI_IPIPE
AC_MSG_CHECKING([for RTAI base technology])
dnl we simply check for {adeos,ipipe}.h; whatever is available
dnl is used, regardless of the version of the Linux sources.
if test -r $LINUX_KERNELSRC/include/linux/adeos.h; then
AC_DEFINE(CONFIG_RTAI_ADEOS,1,[Use RTAI Adeos-oldgen HAL])
AC_MSG_RESULT([RTAI Adeos-oldgen HAL])
CONFIG_RTAI_ADEOS=y
elif test -r $LINUX_KERNELSRC/include/linux/ipipe.h; then
AC_DEFINE(CONFIG_RTAI_IPIPE,1,[Use RTAI Adeos-newgen HAL])
AC_MSG_RESULT([RTAI Adeos-newgen HAL])
CONFIG_RTAI_IPIPE=y
else
echo
AC_MSG_ERROR([HAL patch not applied/enabled in $LINUX_KERNELSRC])
fi
dnl Only 3.x kernels are supported so default to newgen
CONFIG_KBUILD=y
dnl
dnl Perform a few sanity checks.
dnl
AC_MSG_CHECKING([for kernel architecture])
arch_select=`eval echo \\$$wanted_kernel_arch`
if test x$arch_select = x; then
AC_MSG_RESULT([FAIL])
echo
echo "************************************************************"
echo " The target RTAI architecture ($RTAI_TARGET_ARCH) does not match"
echo " the kernel architecture selected in $RTAI_LINUX_DIR"
echo " (i.e. $wanted_kernel_arch is undefined)"
echo "************************************************************"
exit 1
fi
AC_MSG_RESULT([$wanted_kernel_arch])
case "${RTAI_LINUX_VERSION}" in
2.4.*)
dnl MMU not supported in 2.4
;;
*)
AC_MSG_CHECKING([for MMU support])
mmu_select=`eval echo \\$CONFIG_MMU`
if test x$mmu_select != x$arch_has_mmu; then
echo
echo "************************************************************"
echo " The target RTAI architecture MMU check failed:"
if test x$mmu_select = x; then
echo " MMU is unsupported by Linux architecure, but it must."
else
echo " MMU is supported by Linux architecure, but it must not."
fi
echo "************************************************************"
exit 1
fi
if test x$mmu_select != x; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
;;
esac
if test x${CONFIG_MODULES} = x ; then
AC_MSG_ERROR([Please set CONFIG_MODULES for $RTAI_LINUX_DIR and rebuild your kernel])
fi
dnl No longer used.
dnl if test x${CONFIG_REGPARM} = xy ; then
dnl AC_MSG_ERROR([Please unset CONFIG_REGPARM for $RTAI_LINUX_DIR and
dnl rebuild your kernel])
dnl fi
if test x${CONFIG_MODVERSIONS} = xy ; then
case "${RTAI_LINUX_VERSION}" in
2.4.*)
AC_MSG_ERROR([Please unset CONFIG_MODVERSIONS for $RTAI_LINUX_DIR and rebuild your kernel])
;;
*)
dnl reported to be harmless in 2.6
;;
esac
fi
if test x${CONFIG_RTAI_ADEOS} = xy -a x${CONFIG_ADEOS_CORE} = x; then
AC_MSG_ERROR([Please activate the Adeos support in $RTAI_LINUX_DIR and rebuild your kernel])
fi
dnl
dnl Process the build options, possibly overriding the loaded
dnl configuration.
dnl
RTAI_BUILTIN_MODLIST=""
AC_MSG_CHECKING(for trace support)
AC_ARG_ENABLE(trace,
[ --enable-trace Enable trace support],
[case "$enableval" in
y | yes) CONFIG_RTAI_TRACE=y ;;
*) unset CONFIG_RTAI_TRACE ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_TRACE:-no})
dnl Built-in math support has been broken since the 2.6 kernel releases.
dnl If math support is set to yes (Y) then we override it here and make it a module.
if test x$CONFIG_RTAI_MATH = xy ; then
CONFIG_RTAI_MATH=m
fi
AC_MSG_CHECKING(for math support)
AC_ARG_ENABLE(math,
[ --enable-math Enable math support],
[case "$enableval" in
y | yes | b | builtin | built-in) CONFIG_RTAI_MATH=y ;;
m | mod | module) CONFIG_RTAI_MATH=m ;;
*) unset CONFIG_RTAI_MATH ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_MATH:-no})
RTAI_MATH_LIBM=
if test x$CONFIG_RTAI_MATH = xy ; then
RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST math"
fi
if test x$CONFIG_RTAI_MATH != x ; then
AC_MSG_CHECKING(for libm dir/file for math support)
AC_ARG_WITH(math-libm-dir,
[ --with-math-libm-dir libm dir/file for math support])
if test x"$CONFIG_RTAI_MATH_LIBM_DIR" = x ; then
dnl "safe" default?
RTAI_MATH_LIBM="/usr/lib/libm.a"
elif test -f "$CONFIG_RTAI_MATH_LIBM_DIR" ; then
RTAI_MATH_LIBM="$CONFIG_RTAI_MATH_LIBM_DIR"
elif test -d "$CONFIG_RTAI_MATH_LIBM_DIR" ; then
RTAI_MATH_LIBM="$CONFIG_RTAI_MATH_LIBM_DIR/libm.a"
else
AC_MSG_ERROR([Bad argument $withvar to --with-math-libm-dir])
fi
AC_MSG_RESULT([libm: $RTAI_MATH_LIBM])
fi
AC_MSG_CHECKING(for bits IPC support)
AC_ARG_ENABLE(bits,
[ --enable-bits Enable bits IPC support],
[case "$enableval" in
y | yes | b | builtin | built-in) CONFIG_RTAI_BITS=y ;;
m | mod | module) CONFIG_RTAI_BITS=m ;;
*) unset CONFIG_RTAI_BITS ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_BITS:-no})
if test x$CONFIG_RTAI_BITS = xy ; then
RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST ipc/bits"
fi
AC_MSG_CHECKING(for real-time fifos support)
AC_ARG_ENABLE(fifos,
[ --enable-fifos Enable fifo IPC support],
[case "$enableval" in
y | yes | b | builtin | built-in) CONFIG_RTAI_FIFOS=y ;;
m | mod | module) CONFIG_RTAI_FIFOS=m ;;
*) unset CONFIG_RTAI_FIFOS ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_FIFOS:-no})
if test x$CONFIG_RTAI_FIFOS = xy ; then
RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST ipc/fifos"
fi
AC_MSG_CHECKING(for netrpc support)
AC_ARG_ENABLE(netrpc,
[ --enable-netrpc Enable netrpc support],
[case "$enableval" in
y | yes | b | builtin | built-in) CONFIG_RTAI_NETRPC=y ;;
m | mod | module) CONFIG_RTAI_NETRPC=m ;;
*) unset CONFIG_RTAI_NETRPC ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_NETRPC:-no})
if test x$CONFIG_RTAI_NETRPC = xy ; then
RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST ipc/netrpc"
fi
AC_MSG_CHECKING(for netrpc emulation of RTNet)
AC_ARG_ENABLE(netrpc-rtnet,
[ --enable-netrpc-rtnet Enable netrpc emulation of RTNet],
[case "$enableval" in
y | yes) CONFIG_RTAI_NETRPC_RTNET=y ;;
*) unset CONFIG_RTAI_NETRPC_RTNET ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_NETRPC_RTNET:-no})
AC_MSG_CHECKING(for semaphore support)
AC_ARG_ENABLE(sem,
[ --enable-sem Enable semaphore support],
[case "$enableval" in
y | yes | b | builtin | built-in) CONFIG_RTAI_SEM=y ;;
m | mod | module) CONFIG_RTAI_SEM=m ;;
*) unset CONFIG_RTAI_SEM ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_SEM:-no})
if test x$CONFIG_RTAI_SEM = xy ; then
RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST ipc/sem"
fi
AC_MSG_CHECKING(for RT POLL support)
AC_ARG_ENABLE(rt-poll,
[ --enable-rt-poll enable polling support of RTAI IPCs],
[case "$enableval" in
y | yes) CONFIG_RTAI_RT_POLL=y ;;
*) unset CONFIG_RTAI_RT_POLL ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_RT_POLL:-no})
AC_MSG_CHECKING(for RT POLL on stack)
AC_ARG_ENABLE(rt-poll-on-stack,
[ --enable-rt-poll-on-stack Use the stack for rt_poll dynamic arrays],
[case "$enableval" in
y | yes) CONFIG_RTAI_RT_POLL_ON_STACK=y ;;
*) unset CONFIG_RTAI_RT_POLL_ON_STACK ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_RT_POLL_ON_STACK:-no})
AC_MSG_CHECKING(for messaging support)
AC_ARG_ENABLE(msg,
[ --enable-msg Enable messaging support],
[case "$enableval" in
y | yes | b | builtin | built-in) CONFIG_RTAI_MSG=y ;;
m | mod | module) CONFIG_RTAI_MSG=m ;;
*) unset CONFIG_RTAI_MSG ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_MSG:-no})
if test x$CONFIG_RTAI_MSG = xy ; then
RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST ipc/msg"
fi
AC_MSG_CHECKING(for mailbox support)
AC_ARG_ENABLE(mbx,
[ --enable-mbx Enable mailbox support],
[case "$enableval" in
y | yes | b | builtin | built-in) CONFIG_RTAI_MBX=y ;;
m | mod | module) CONFIG_RTAI_MBX=m ;;
*) unset CONFIG_RTAI_MBX ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_MBX:-no})
if test x$CONFIG_RTAI_MBX = xy ; then
RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST ipc/mbx"
fi
AC_MSG_CHECKING(for typed mailbox support)
AC_ARG_ENABLE(tbx,
[ --enable-tbx Enable typed mailbox support],
[case "$enableval" in
y | yes | b | builtin | built-in) CONFIG_RTAI_TBX=y ;;
m | mod | module) CONFIG_RTAI_TBX=m ;;
*) unset CONFIG_RTAI_TBX ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_TBX:-no})
if test x$CONFIG_RTAI_TBX = xy ; then
RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST ipc/tbx"
fi
AC_MSG_CHECKING(for POSIX-like message queue support)
AC_ARG_ENABLE(mq,
[ --enable-mq Enable POSIX-like message queue support],
[case "$enableval" in
y | yes | b | builtin | built-in) CONFIG_RTAI_MQ=y ;;
m | mod | module) CONFIG_RTAI_MQ=m ;;
*) unset CONFIG_RTAI_MQ ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_MQ:-no})
if test x$CONFIG_RTAI_MQ = xy ; then
RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST ipc/mq"
fi
AC_MSG_CHECKING(for shared memory support)
AC_ARG_ENABLE(shm,
[ --enable-shm Enable shared memory support],
[case "$enableval" in
y | yes | b | builtin | built-in) CONFIG_RTAI_SHM=y ;;
m | mod | module) CONFIG_RTAI_SHM=m ;;
*) unset CONFIG_RTAI_SHM ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_SHM:-no})
if test x$CONFIG_RTAI_SHM = xy ; then
RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST ipc/shm"
fi
AC_MSG_CHECKING(for real-time malloc support)
AC_ARG_ENABLE(malloc,
[ --enable-malloc Enable real-time malloc support],
[case "$enableval" in
y | yes | b | builtin | built-in) CONFIG_RTAI_MALLOC=y ;;
m | mod | module) CONFIG_RTAI_MALLOC=m ;;
*) unset CONFIG_RTAI_MALLOC ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_MALLOC:-no})
if test x$CONFIG_RTAI_MALLOC = xy ; then
RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST malloc"
fi
AC_MSG_CHECKING(for tasklets support)
AC_ARG_ENABLE(tasklets,
[ --enable-tasklets Enable tasklets support],
[case "$enableval" in
y | yes | b | builtin | built-in) CONFIG_RTAI_TASKLETS=y ;;
m | mod | module) CONFIG_RTAI_TASKLETS=m ;;
*) unset CONFIG_RTAI_TASKLETS ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_TASKLETS:-no})
if test x$CONFIG_RTAI_TASKLETS = xy ; then
RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST tasklets"
fi
AC_MSG_CHECKING(for user-space interrupt support)
AC_ARG_ENABLE(usi,
[ --enable-usi Enable user-space interrupt support],
[case "$enableval" in
y | yes | b | builtin | built-in) CONFIG_RTAI_USI=y ;;
*) unset CONFIG_RTAI_USI ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_USI:-no})
AC_MSG_CHECKING(for watchdog support)
AC_ARG_ENABLE(watchdog,
[ --enable-watchdog Enable watchdog support],
[case "$enableval" in
y | yes | m | mod | module) CONFIG_RTAI_WD=m ;;
*) unset CONFIG_RTAI_WD ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_WD:-no})
AC_MSG_CHECKING(for leds-based debugging support)
AC_ARG_ENABLE(leds,
[ --enable-leds Enable leds-based debugging support],
[case "$enableval" in
y | yes | b | builtin | built-in) CONFIG_RTAI_LEDS=y ;;
m | mod | module) CONFIG_RTAI_LEDS=m ;;
*) unset CONFIG_RTAI_LEDS ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_LEDS:-no})
if test x$CONFIG_RTAI_LEDS = xy ; then
RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST leds"
fi
AC_MSG_CHECKING(whether LXRT wraps service calls through Linux syscalls)
AC_ARG_ENABLE(lxrt-use-linux-syscall,
[ --enable-lxrt-use-linux-syscall Wrap LXRT service calls throug Linux syscall mechanism],
[case "$enableval" in
y | yes) CONFIG_RTAI_LXRT_USE_LINUX_SYSCALL=y ;;
*) unset CONFIG_RTAI_LXRT_USE_LINUX_SYSCALL ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_LXRT_USE_LINUX_SYSCALL:-no})
dnl CONFIG_RTAI_KTASKS_SCHED_LXRT has to be forced
AC_ARG_ENABLE(ktasks-sched-lxrt,
[ --enable-ktasks-sched-lxrt Enable LXRT scheduler with kernel tasks support],
[case "$enableval" in
y | yes | m | mod | module) CONFIG_RTAI_KTASKS_SCHED_LXRT_=y ;;
*) echo "--enable-ktasks-sched-lxrt forced to \"yes\"" ; CONFIG_RTAI_KTASKS_SCHED_LXRT_=y ;;
esac])
AC_MSG_CHECKING(for scheduler lock in ISRs)
AC_ARG_ENABLE(sched-lock-isr,
[ --enable-sched-lock-isr Enable scheduler lock in ISRs],
[case "$enableval" in
y | yes) CONFIG_RTAI_SCHED_ISR_LOCK=y ;;
*) unset CONFIG_RTAI_SCHED_ISR_LOCK ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_SCHED_ISR_LOCK:-no})
AC_MSG_CHECKING(for RTC freq)
AC_ARG_ENABLE(rtc-freq,
[ --enable-rtc-freq Enable RTC freq],
[case "$enableval" in
changequote(,)dnl add a test for 0 or power of 2, <2-8192>
[0-9]*) CONFIG_RTAI_RTC_FREQ=$enableval ;;
changequote([,])dnl
*) AC_MSG_ERROR([Bad argument to option: --enable-rtc-freq=<power of 2>]) ;;
esac])
if test x$CONFIG_RTAI_RTC_FREQ = x ; then
# Use a reasonable default if unset
CONFIG_RTAI_RTC_FREQ=0
fi
AC_MSG_RESULT($CONFIG_RTAI_RTC_FREQ)
AC_MSG_CHECKING(for long timed lists)
AC_ARG_ENABLE(long-timed-lists,
[ --enable-long-timed-lists Enable long timed lists],
[case "$enableval" in
y | yes) CONFIG_RTAI_LONG_TIMED_LIST=y ;;
*) unset CONFIG_RTAI_LONG_TIMED_LIST;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_LONG_TIMED_LIST:-no})
AC_MSG_CHECKING(for 8254 tuning latency)
AC_ARG_ENABLE(sched-8254-latency,
[ --enable-sched-8254-latency Set 8254 tuning latency],
[case "$enableval" in
changequote(,)dnl
[0-9]*) CONFIG_RTAI_SCHED_8254_LATENCY=$enableval ;;
changequote([,])dnl
*) AC_MSG_ERROR([Bad argument to option: --enable-8254-latency=<nanoseconds>]) ;;
esac])
if test x$CONFIG_RTAI_SCHED_8254_LATENCY = x ; then
# Use a reasonable default if unset
CONFIG_RTAI_SCHED_8254_LATENCY=4700
fi
AC_MSG_RESULT($CONFIG_RTAI_SCHED_8254_LATENCY)
AC_MSG_CHECKING(for APIC tuning latency)
AC_ARG_ENABLE(sched-apic-latency,
[ --enable-sched-apic-latency Set APIC tuning latency],
[case "$enableval" in
changequote(,)dnl
[0-9]*) CONFIG_RTAI_SCHED_APIC_LATENCY=$enableval ;;
changequote([,])dnl
*) AC_MSG_ERROR([Bad argument to option: --enable-sched-apic-latency=<nanoseconds>]) ;;
esac])
if test x$CONFIG_RTAI_SCHED_APIC_LATENCY = x ; then
# Use a reasonable default if unset
CONFIG_RTAI_SCHED_APIC_LATENCY=3944
fi
AC_MSG_RESULT($CONFIG_RTAI_SCHED_APIC_LATENCY)
AC_MSG_CHECKING(for user busy align ret delay)
AC_ARG_ENABLE(user-busy-align-ret-delay,
[ --user-busy-align-ret-delay Set user busy align ret delay],
[case "$enableval" in
changequote(,)dnl
[0-9]*) CONFIG_RTAI_USER_BUSY_ALIGN_RET_DELAY=$enableval ;;
changequote([,])dnl
*) AC_MSG_ERROR([Bad argument to option: --user-busy-align-ret-delay=<nanoseconds>]) ;;
esac])
if test x$CONFIG_RTAI_USER_BUSY_ALIGN_RET_DELAY = x ; then
# Use a reasonable default if unset
CONFIG_RTAI_USER_BUSY_ALIGN_RET_DELAY=0
fi
AC_MSG_RESULT($CONFIG_RTAI_USER_BUSY_ALIGN_RET_DELAY)
AC_MSG_CHECKING(for kernel busy align ret delay)
AC_ARG_ENABLE(kernel-busy-align-ret-delay,
[ --kernel-busy-align-ret-delay Set kernel busy align ret delay],
[case "$enableval" in
changequote(,)dnl
[0-9]*) CONFIG_RTAI_KERN_BUSY_ALIGN_RET_DELAY=$enableval ;;
changequote([,])dnl
*) AC_MSG_ERROR([Bad argument to option: --kernel-busy-align-ret-delay=<nanoseconds>]) ;;
esac])
if test x$CONFIG_RTAI_KERN_BUSY_ALIGN_RET_DELAY = x ; then
# Use a reasonable default if unset
CONFIG_RTAI_KERN_BUSY_ALIGN_RET_DELAY=0
fi
AC_MSG_RESULT($CONFIG_RTAI_KERN_BUSY_ALIGN_RET_DELAY)
AC_MSG_CHECKING(for maximum number of LXRT slots)
AC_ARG_ENABLE(sched-lxrt-numslots,
[ --enable-sched-lxrt-numslots Set maximum number of LXRT slots],
[case "$enableval" in
changequote(,)dnl
[0-9]*) CONFIG_RTAI_SCHED_LXRT_NUMSLOTS=$enableval ;;
changequote([,])dnl
*) AC_MSG_ERROR([Bad argument to option: --enable-sched-lxrt-numslots=<number>]) ;;
esac])
if test x$CONFIG_RTAI_SCHED_LXRT_NUMSLOTS = x ; then
# Use a reasonable default if unset
CONFIG_RTAI_SCHED_LXRT_NUMSLOTS=150
fi
AC_MSG_RESULT($CONFIG_RTAI_SCHED_LXRT_NUMSLOTS)
AC_MSG_CHECKING(for RTDM support)
AC_ARG_ENABLE(rtdm,
[ --enable-rtdm Enable RTDM support],
[case "$enableval" in
y | yes | b | builtin | built-in) CONFIG_RTAI_RTDM=y ;;
m | mod | module) CONFIG_RTAI_RTDM=m ;;
*) unset CONFIG_RTAI_RTDM ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_RTDM:-no})
AC_MSG_CHECKING(for maximum file descriptors in RTDM)
AC_ARG_ENABLE(rtdm-fd-max,
[ --enable-rtdm-fd-max Set maximum number of RTDM file descriptor slots],
[case "$enableval" in
changequote(,)dnl
[1-9][0-9]*) CONFIG_RTAI_RTDM_FD_MAX=$enableval ;;
changequote([,])dnl
*) AC_MSG_ERROR([Bad argument to option: --enable-rtdm-fd-max=<number>]) ;;
esac])
if test x$CONFIG_RTAI_RTDM_FD_MAX = x ; then
# Use a reasonable default if unset
CONFIG_RTAI_RTDM_FD_MAX=128
else
case $CONFIG_RTAI_RTDM_FD_MAX in
changequote(,)dnl
[1-9][0-9]*) ;;
changequote([,])dnl
*) AC_MSG_ERROR([Bad value $CONFIG_RTAI_RTDM_FD_MAX for RTAI_RTDM_FD_MAX]) ;;
esac
fi
AC_MSG_RESULT($CONFIG_RTAI_RTDM_FD_MAX)
AC_MSG_CHECKING(for shared interrupts in RTDM)
AC_ARG_ENABLE(rtdm-shirq,
[ --enable-rtdm-shirq Enable shared interrupts in RTDM],
[case "$enableval" in
y | yes) CONFIG_RTAI_RTDM_SHIRQ=y ;;
*) unset CONFIG_RTAI_RTDM_SHIRQ ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_RTDM_SHIRQ:-no})
AC_MSG_CHECKING(for select(2) support in RTDM)
AC_ARG_ENABLE(rtdm-select,
[ --enable-rtdm-select Enable select support in RTDM],
[case "$enableval" in
y | yes) CONFIG_RTAI_RTDM_SELECT=y ;;
*) unset CONFIG_RTAI_RTDM_SELECT ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_RTDM_SELECT:-no})
AC_MSG_CHECKING(for RTDM debug)
AC_ARG_ENABLE(debug-rtdm,
[ --enable-debug-rtdm Enable RTDM debug],
[case "$enableval" in
y | yes) CONFIG_RTAI_DEBUG_RTDM=y ;;
*) unset CONFIG_RTAI_DEBUG_RTDM ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_DEBUG_RTDM:-no})
AC_MSG_CHECKING(for task switch signal)
AC_ARG_ENABLE(task-switch-signal,
[ --enable-task-switch-signal Enable RTAI task switch signal],
[case "$enableval" in
y | yes) CONFIG_RTAI_TASK_SWITCH_SIGNAL=y ;;
*) unset CONFIG_RTAI_TASK_SWITCH_SIGNAL ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_TASK_SWITCH_SIGNAL:-no})
AC_MSG_CHECKING(for hard-soft toggler)
AC_ARG_ENABLE(hard-soft-toggler,
[ --enable-hard-soft-toggler Enable RTAI hard-soft toggler],
[case "$enableval" in
y | yes) CONFIG_RTAI_HARD_SOFT_TOGGLER=y ;;
*) unset CONFIG_RTAI_HARD_SOFT_TOGGLER ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_HARD_SOFT_TOGGLER:-no})
AC_MSG_CHECKING(for Linux task priority alignment to RTAI)
AC_ARG_ENABLE(align-priority,
[ --enable-align-priority Keep Linux task priority aligned to RTAI],
[case "$enableval" in
y | yes) CONFIG_RTAI_ALIGN_LINUX_PRIORITY=y ;;
*) unset CONFIG_RTAI_ALIGN_LINUX_PRIORITY ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_ALIGN_LINUX_PRIORITY:-no})
AC_MSG_CHECKING(for calibration frequency factor)
AC_ARG_ENABLE(cal-freq-fact,
[ --enable-cal-freq-fact Set calibration frequency factor],
[case "$enableval" in
changequote(,)dnl
[0-9]*) CONFIG_RTAI_CAL_FREQS_FACT=$enableval ;;
changequote([,])dnl
*) AC_MSG_ERROR([Bad argument to option: --enable-cal-freq-fact=<number>]) ;;
esac])
if test x$CONFIG_RTAI_CAL_FREQS_FACT = x ; then
# Use a reasonable default if unset
CONFIG_RTAI_CAL_FREQS_FACT=0
fi
AC_MSG_RESULT($CONFIG_RTAI_CAL_FREQS_FACT)
dnl -fno-use-cxa-atexit should be supported by all modern systems
CXXFLAGS="-fno-use-cxa-atexit -Werror"
AC_MSG_CHECKING(for comedi support over LXRT)
AC_ARG_ENABLE(comedi-lxrt,
[ --enable-comedi-lxrt Enable comedi/LXRT support],
[case "$enableval" in
y | yes) CONFIG_RTAI_COMEDI_LXRT=y ;;
*) unset CONFIG_RTAI_COMEDI_LXRT ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_COMEDI_LXRT:-no})
CONFIG_RTAI_USE_LINUX_COMEDI=n
if test x$CONFIG_RTAI_COMEDI_LXRT = xy; then
SC_PATH_COMEDI($CONFIG_RTAI_COMEDI_DIR)
if test "${RTAI_LINUX_DIR}" = "${CONFIG_RTAI_COMEDI_DIR:0:${#RTAI_LINUX_DIR}}" ; then
CONFIG_RTAI_USE_LINUX_COMEDI=y
fi
fi
AC_MSG_CHECKING(for comedi lock)
AC_ARG_ENABLE(comedi-lock,
[ --enable-comedi-lock Enable comedi lock ],
[case "$enableval" in
y | yes) CONFIG_RTAI_USE_COMEDI_LOCK=y ;;
*) unset CONFIG_RTAI_USE_COMEDI_LOCK ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_USE_COMEDI_LOCK:-no})
AC_MSG_CHECKING(for real-time serial driver)
AC_ARG_ENABLE(serial,
[ --enable-serial Build real-time serial driver],
[case "$enableval" in
y | yes) CONFIG_RTAI_DRIVERS_SERIAL=y ;;
*) unset CONFIG_RTAI_DRIVERS_SERIAL ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_DRIVERS_SERIAL:-no})
AC_MSG_CHECKING(for real-time serial driver)
AC_ARG_ENABLE(16550a,
[ --enable-16550a Build real-time serial driver],
[case "$enableval" in
y | yes) CONFIG_RTAI_DRIVERS_16550A=y ;;
*) unset CONFIG_RTAI_DRIVERS_16550A;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_DRIVERS_16550A:-no})
dnl Set default inline mode for LXRT as specified from
dnl Kconfig. Defaults to conditional inlining.
if test x$CONFIG_RTAI_16550A_PIO = xy; then
CONFIG_RTAI_16550A_HAM=1
elif test x$CONFIG_RTAI_16550A_MMIO = xy; then
CONFIG_RTAI_16550A_HAM=2
elif test x$CONFIG_RTAI_16550A_ANY = xy; then
CONFIG_RTAI_16550A_HAM=3
fi
AC_MSG_CHECKING(for real-time serial driver hardware access mode)
AC_ARG_WITH(16550a-ham,
[ --with-16550a-ham Set real-time serial driver hardware access mode (pio|mmio|any)],
[case "$withval" in
pio) CONFIG_RTAI_16550A_HAM=1 ;;
mmio) CONFIG_RTAI_16550A_HAM=2 ;;
any) CONFIG_RTAI_16550A_HAM=3 ;;
*) AC_MSG_ERROR([Bad argument to option: --with-16550a-ham=<pio|mmio|any>]) ;;
esac])
case "$CONFIG_RTAI_" in
1) ham_type=pio ;;
2) ham_type=mmio ;;
3) ham_type=any ;;
esac
AC_MSG_RESULT([$ham_type])
AC_MSG_CHECKING(for testsuite)
AC_ARG_ENABLE(testsuite,
[ --enable-testsuite Build RTAI testsuite],
[case "$enableval" in
y | yes) CONFIG_RTAI_TESTSUITE=y ;;
*) unset CONFIG_RTAI_TESTSUITE ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_TESTSUITE:-no})
AC_MSG_CHECKING(for RTAI-Lab)
AC_ARG_ENABLE(rtailab,
[ --enable-rtailab Build RTAI-Lab],
[case "$enableval" in
y | yes) CONFIG_RTAI_LAB=y ;;
*) unset CONFIG_RTAI_LAB ;;
esac])
if test x$arch_supports_rtailab = x; then
unset CONFIG_RTAI_LAB
fi
AC_MSG_RESULT(${CONFIG_RTAI_LAB:-no})
if test x$CONFIG_RTAI_LAB = xy; then
MDL_HAVE_OPENGL
SC_PATH_EFLTK($CONFIG_RTAI_EFLTK_DIR)
fi
AC_MSG_CHECKING(for FPU support)
AC_ARG_ENABLE(fpu,
[ --enable-fpu Enable FPU support],
[case "$enableval" in
y | yes) CONFIG_RTAI_FPU_SUPPORT=y ;;
*) unset CONFIG_RTAI_FPU_SUPPORT ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_FPU_SUPPORT:-no})
AC_MSG_CHECKING(for math C99 support)
AC_ARG_ENABLE(math-c99,
[ --enable-math-c99 Enable math C99 support],
[case "$enableval" in
y | yes) CONFIG_RTAI_MATH_C99=y ;;
*) unset CONFIG_RTAI_MATH_C99 ;;
esac])
AC_MSG_RESULT(${CONFIG_RTAI_MATH_C99:-no})