forked from hiddeate2m/rtnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
1620 lines (1398 loc) · 59.4 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([RTnet],[m4_normalize(m4_include(config/autoconf/.version))],[[email protected]])
AC_CONFIG_HEADERS([config/rtnet_config_pre.h])
AC_CONFIG_AUX_DIR([config/autoconf])
AC_CONFIG_MACRO_DIR([config/m4])
AC_CONFIG_SRCDIR([stack/rtskb.c])
AC_PREFIX_DEFAULT([/usr/local/rtnet])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_PROG_INSTALL
CFLAGS=${CFLAGS:--s}
# Checks for programs.
AC_ARG_WITH(CC,
AS_HELP_STRING([--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"])
AC_PROG_CC
AC_DEFINE_UNQUOTED(CONFIG_RTNET_BUILD_STRING, "$build", [Build system alias])
RTNET_BUILD_STRING="$build"
AC_DEFINE_UNQUOTED(CONFIG_RTNET_HOST_STRING, "$host", [Host system alias])
RTNET_HOST_STRING="$host"
AC_SUBST(RTNET_HOST_STRING)
AC_DEFINE_UNQUOTED(CONFIG_RTNET_COMPILER, "`$CC -v 2>&1 | tail -n 1`" , [Compiler])
AM_INIT_AUTOMAKE([foreign no-exeext dist-bzip2 no-dist-gzip])
AM_MAINTAINER_MODE
LT_INIT
AM_PROG_AS
AC_SUBST(LD)
dnl ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
dnl ++++++++++++ copied from rtai 3.0 +++ start ++++++++++++++++++++++++++
dnl ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
case "$host" in
i*86*-*)
RTNET_TARGET_ARCH=i386
wanted_kernel_arch=CONFIG_X86
;;
x86_64-*)
RTNET_TARGET_ARCH=x86_64
wanted_kernel_arch=CONFIG_X86_64
;;
arm*-*)
RTNET_TARGET_ARCH=arm
wanted_kernel_arch=CONFIG_ARM
;;
powerpc-*|ppc-*)
RTNET_TARGET_ARCH=powerpc
wanted_kernel_arch=CONFIG_PPC
;;
# mips-*|mipsel-*)
# RTNET_TARGET_ARCH=mips
# wanted_kernel_arch=CONFIG_MIPS
# ;;
# cris-*)
# RTNET_TARGET_ARCH=cris
# dnl There is no non-ambiguous CONFIG_ETRAX|CRIS symbol
# dnl so use the root device definition.
# wanted_kernel_arch=CONFIG_ETRAX_ROOT_DEVICE
# ;;
*)
AC_MSG_ERROR([*** Sorry - Unsupported architecture])
;;
esac
dnl ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
dnl ++++++++++++ copied from rtai-3.0 +++ end ++++++++++++++++++++++++++++
dnl ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
# define helper function
#
AC_DEFUN([AC_CHECK_LIBRARY],
[ac_save_LIBS="$LIBS"
LIBS="$$3 $ac_save_LIBS"
AC_CHECK_LIB($1,$2)
$3=`echo "$LIBS" | sed "s% $ac_save_LIBS$%%"`
LIBS="$ac_save_LIBS"])
# Checks for libraries.
# FIXME: Replace `main' with a function in `-lncurses':
AC_CHECK_LIBRARY(ncurses, main, NCURSES_LIBS)
AM_CONDITIONAL(CONFIG_NCURSES,[test x"${NCURSES_LIBS}" != x""])
AC_SUBST(NCURSES_LIBS)
dnl ======================================================================
dnl Load the RTnet configuration.
dnl ======================================================================
RTNET_KCONFIG_FILE=$srcdir/defconfig
kconfig_type=default
AC_ARG_WITH(kconfig-file,
AS_HELP_STRING([--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
RTNET_KCONFIG_FILE="$withval"
kconfig_type=supplied
])
AC_MSG_CHECKING([for RTnet Kconfig file])
if test \! -f $RTNET_KCONFIG_FILE; then
AC_MSG_ERROR([Kconfig-file $RTNET_KCONFIG_FILE not found -- --with-kconfig-file sets Kconfig file])
fi
PATH=$PATH:. . $RTNET_KCONFIG_FILE
AC_MSG_RESULT([$RTNET_KCONFIG_FILE ($kconfig_type)])
dnl ======================================================================
dnl RT-extension installation
dnl ======================================================================
AC_ARG_WITH(rtext,
AS_HELP_STRING([--with-rtext=RT-EXTENSION], [installation path of RTAI or Xenomai 2.0.x]),
[case "${withval}" in
"" | y | ye | yes | n | no)
AC_MSG_ERROR([You must supply an argument to --with-rtext.]) ;;
*)
CONFIG_RTNET_RTEXT_DIR=${withval}
CONFIG_RTNET_RTEXT_CLASSIC=y
;;
esac])
dnl ======================================================================
dnl RT-FireWire installation
dnl ======================================================================
AC_ARG_WITH(rtfw,
AS_HELP_STRING([--with-rtfw=RTFW], [installation path of RT-FireWire]),
[case "${withval}" in
"" | y | ye | yes | n | no)
AC_MSG_ERROR([You must supply an argument to --with-rtfw.]) ;;
*)
CONFIG_RTNET_RTFIREWIRE_DIR=${withval} ;;
esac])
dnl ======================================================================
dnl try to find RT-extension / RT-extended kernel
dnl ======================================================================
AC_MSG_CHECKING([for RT-extension])
if test "${CONFIG_RTNET_RTEXT_CLASSIC}" = "y"; then
RTAI_CONFIG="${CONFIG_RTNET_RTEXT_DIR}/bin/rtai-config"
if test -x "${RTAI_CONFIG}"; then
RTAI_DIR="`cd ${CONFIG_RTNET_RTEXT_DIR} && pwd`" # let the shell normalize the path
XENO_DIR=""
AC_MSG_RESULT([${RTAI_DIR} (RTAI)])
else
XENO_CONFIG="${CONFIG_RTNET_RTEXT_DIR}/bin/xeno-config"
if test -x "${XENO_CONFIG}"; then
RTAI_DIR=""
XENO_DIR="`cd ${CONFIG_RTNET_RTEXT_DIR} && pwd`" # let the shell normalize the path
AC_MSG_RESULT([${XENO_DIR} (Xenomai 2.0.x)])
else
AC_MSG_ERROR([*** No RT-extension found in $CONFIG_RTNET_RTEXT_DIR])
fi
fi
else
RTAI_DIR=""
XENO_DIR=""
AC_ARG_WITH(linux,
AS_HELP_STRING([--with-linux=LINUX], [real-time extended Linux kernel]),
[case "${withval}" in
"" | y | ye | yes | n | no)
AC_MSG_ERROR([You must supply an argument to --with-linux.]) ;;
*)
CONFIG_RTNET_LINUX_DIR="`cd ${withval} && pwd`" ;; # let the shell normalize the path
esac])
# get linux kernel tree and version
RTEXT_LINUX_DIR="${CONFIG_RTNET_LINUX_DIR}"
if test -L ${RTEXT_LINUX_DIR}/source; then
RTEXT_LINUX_SRC_DIR="`cd ${RTEXT_LINUX_DIR}/source && pwd`"
else
RTEXT_LINUX_SRC_DIR=${RTEXT_LINUX_DIR}
fi
LINUX_RELEASE_FILE=${RTEXT_LINUX_DIR}/include/generated/utsrelease.h
if test \! -f $LINUX_RELEASE_FILE; then
LINUX_RELEASE_FILE=${RTEXT_LINUX_DIR}/include/linux/utsrelease.h
if test \! -f $LINUX_RELEASE_FILE; then
LINUX_RELEASE_FILE=${RTEXT_LINUX_DIR}/include/linux/version.h
fi
fi
RTEXT_LINUX_VERSION=`grep "#define UTS_RELEASE" $LINUX_RELEASE_FILE 2>/dev/null | sed -e 's/[^\"]*\"\([^\"]*\)\"/\1/'`
if test \! -f ${RTEXT_LINUX_SRC_DIR}/include/xenomai/nucleus/version.h; then
AC_MSG_ERROR([*** RT-extended kernel not found in $RTEXT_LINUX_DIR])
fi
AC_ARG_WITH(rtext-config,
AS_HELP_STRING([--with-rtext-config=CONFIG-PATH], [path of the RT-extension's config tool]),
[case "${withval}" in
"" | y | ye | yes | n | no)
AC_MSG_ERROR([You must supply an argument to --with-rtext-config.]) ;;
*)
CONFIG_RTNET_RTEXT_CONFIG_PATH=${withval} ;;
esac])
XENO_CONFIG=${CONFIG_RTNET_RTEXT_CONFIG_PATH}
if test "${XENO_CONFIG}" = ""; then
XENO_CONFIG=`which xeno-config 2>/dev/null`
if test "${XENO_CONFIG}" = "" && test "${CONFIG_RTNET_EXAMPLES}" \!= "y"; then
XENO_CONFIG="/bin/true"
fi
fi
if test "${XENO_CONFIG}" = "" || test \! -x ${XENO_CONFIG} || test \! -f ${XENO_CONFIG}; then
AC_MSG_ERROR([*** Xenomai configuration tool not found: ${XENO_CONFIG}])
fi
AC_MSG_RESULT([$RTEXT_LINUX_DIR (kernel ${RTEXT_LINUX_VERSION}${CONFIG_SMP:+-SMP} + Xenomai)])
fi
# Fixup real arch for powerpc
if test "${RTNET_TARGET_ARCH}" = "powerpc" ; then
AC_MSG_CHECKING([for real PowerPC arch])
readlink ${CONFIG_RTNET_LINUX_DIR}/include/asm | grep -q ppc && RTNET_TARGET_ARCH="ppc"
AC_MSG_RESULT([$RTNET_TARGET_ARCH])
fi
#
# from now we think we've found some RT-extension, so if we got an error
# it will be fatal, thus exit with AC_MSG_ERROR
#
XENO_VERSION=""
RTAI_VERSION=""
if test "$RTAI_DIR" \!= ""; then
AC_MSG_CHECKING([for RTAI version])
RTAI_VERSION="`${RTAI_CONFIG} --version`"
case "$RTAI_VERSION" in
magma | 3.[[3-9]]*)
CONFIG_RTNET_RTEXT_VERSION=rtai-3x
AC_DEFINE(CONFIG_RTAI_3x, 1, [We build for RTAI 3.x])
;;
*)
AC_MSG_ERROR([*** Unsupported RTAI version $RTAI_VERSION in $RTAI_DIR])
;;
esac
AC_MSG_RESULT([${RTAI_VERSION}])
AC_MSG_CHECKING([for RTAI config file])
RTAI_CONFIG_FILE="${RTAI_DIR}/share/rtai/config-rtai-${RTAI_VERSION}"
if test \! -f ${RTAI_CONFIG_FILE}; then
RTAI_CONFIG_FILE="`${RTAI_CONFIG} --config`"
if test \! -f $RTAI_CONFIG_FILE; then
AC_MSG_ERROR([*** RTAI configuration file not found])
fi
fi
AC_MSG_RESULT([${RTAI_CONFIG_FILE}])
# source (load) the rtai configuration
. ${RTAI_CONFIG_FILE}
# get linux kernel tree and version
AC_MSG_CHECKING([for Linux source tree])
RTEXT_LINUX_DIR="`${RTAI_CONFIG} --linux-dir`"
RTEXT_LINUX_VERSION="`${RTAI_CONFIG} --linux-version`"
AC_MSG_RESULT([$RTEXT_LINUX_DIR (kernel ${RTEXT_LINUX_VERSION}${CONFIG_SMP:+-SMP})])
elif test "$XENO_DIR" \!= ""; then
AC_MSG_CHECKING([for Xenomai version])
XENO_VERSION="`${XENO_CONFIG} --version`"
case "$XENO_VERSION" in
1.9.9 | 2.0*)
CONFIG_RTNET_RTEXT_VERSION=xeno-20x
AC_DEFINE(CONFIG_XENO_2_0x, 1, [We build for Xenomai 2.x])
AC_MSG_RESULT([${XENO_VERSION}])
;;
*)
AC_MSG_ERROR([*** Unsupported Xenomai version $XENO_VERSION in $XENO_DIR])
;;
esac
AC_MSG_CHECKING([for Xenomai config file])
XENO_CONFIG_FILE="`${XENO_CONFIG} --config`"
if test \! -f $XENO_CONFIG_FILE; then
AC_MSG_ERROR([*** Xenomai configuration file not found])
fi
AC_MSG_RESULT([${XENO_CONFIG_FILE}])
# source (load) the Xenomai configuration
. ${XENO_CONFIG_FILE}
# get linux kernel tree and version
AC_MSG_CHECKING([for Linux source tree])
RTEXT_LINUX_DIR="`${XENO_CONFIG} --linux-dir`"
RTEXT_LINUX_VERSION="`${XENO_CONFIG} --linux-version`"
AC_MSG_RESULT([$RTEXT_LINUX_DIR (kernel ${RTEXT_LINUX_VERSION}${CONFIG_SMP:+-SMP})])
else
AC_MSG_CHECKING([for Xenomai version])
XENO_VERSION=`grep "#define XENO_VERSION_STRING" ${RTEXT_LINUX_SRC_DIR}/include/xenomai/nucleus/version.h | sed -e 's/[^\"]*\"\([^\"]*\)\"/\1/'`
case "$XENO_VERSION" in
2.[[1-4]]*|2.5.[[01]])
CONFIG_RTNET_RTEXT_VERSION=xeno-21x
AC_DEFINE(CONFIG_XENO_2_1x, 1, [We build for Xenomai 2.x])
AC_MSG_RESULT([${XENO_VERSION}])
;;
2.5.[[2-9]]*|2.6*)
CONFIG_RTNET_RTEXT_VERSION=xeno-252
AC_DEFINE(CONFIG_XENO_2_1x, 1, [We build for Xenomai 2.x])
AC_MSG_RESULT([${XENO_VERSION}])
;;
*)
AC_MSG_ERROR([*** Unsupported Xenomai version $XENO_VERSION in $RTEXT_LINUX_DIR])
;;
esac
fi
#source (load) the kernel configuration
. ${RTEXT_LINUX_DIR}/.config
AM_CONDITIONAL(CONFIG_RTAI,[test "$RTAI_VERSION" \!= ""])
AM_CONDITIONAL(CONFIG_XENO,[test "$XENO_VERSION" \!= ""])
case "$CONFIG_RTNET_RTEXT_VERSION" in
rtai-3x) # ---> RTAI 3.x <---
# check for RTDM skin, needed by RTnet
AC_MSG_CHECKING([for RTDM skin])
case "${CONFIG_RTAI_RTDM}" in
y | m) AC_MSG_RESULT([${CONFIG_RTAI_RTDM}]) ;;
*) AC_MSG_ERROR([*** Please enable RTDM skin]) ;;
esac
# check for fifos, needed by rtnet-examples
# AC_MSG_CHECKING([for RTAI fifos])
# case "${CONFIG_RTAI_FIFOS}" in
# y | m) AC_MSG_RESULT([${CONFIG_RTAI_FIFOS}]) ;;
# *) AC_MSG_ERROR([*** Please enable fifos in RTAI]) ;;
# esac
;;
xeno-20x | xeno-21x | xeno-252) # ---> Xenomai 2.x <---
# check for RTDM skin, needed by RTnet
AC_MSG_CHECKING([for RTDM skin])
case "${CONFIG_XENO_SKIN_RTDM}" in
y | m) AC_MSG_RESULT([${CONFIG_XENO_SKIN_RTDM}]) ;;
*) AC_MSG_ERROR([*** Please enable RTDM skin]) ;;
esac
# check for pipes, needed by rtnet
# AC_MSG_CHECKING([for RTAI pipes])
# case "${CONFIG_RTAI_OPT_NATIVE_PIPE}" in
# y) AC_MSG_RESULT([${CONFIG_RTAI_OPT_NATIVE_PIPE}]) ;;
# *) AC_MSG_ERROR([*** Please enable pipes in RTAI]) ;;
# esac
;;
*) # ---> oops <----
AC_MSG_ERROR([*** internal error])
;;
esac
dnl =========== end of RT-extension detection ============================
dnl ======================================================================
dnl =========== try to find rt-firewire ==================================
dnl ======================================================================
#
# the presence of the symbols directory is a good indication for RT-FireWire
#
AC_MSG_CHECKING([for RT-FireWire installation])
RTFW_SYMBOLS="${CONFIG_RTNET_RTFIREWIRE_DIR}/symbols"
if test -d ${RTFW_SYMBOLS}; then
RTNET_RTFW_PREFIX="`echo ${CONFIG_RTNET_RTFIREWIRE_DIR} | sed -e s,[/]*$,,`" # strip trailing slashes
AC_MSG_RESULT([${RTNET_RTFW_PREFIX}])
else
AC_MSG_RESULT([none])
fi
dnl ======================================================================
dnl check linux version
dnl ======================================================================
case "${RTEXT_LINUX_VERSION}" in
2.4.*)
RTEXT_LINUX_VERSION_SUBLEVEL="`echo ${RTEXT_LINUX_VERSION}|sed -e 's/[[[:digit:]]]*\.[[[:digit:]]]*\.\([[[:digit:]]]*\).*/\1/'`"
if test ${RTEXT_LINUX_VERSION_SUBLEVEL} -le 18; then
AC_MSG_ERROR([*** Unsupported kernel version $RTEXT_LINUX_VERSION - please upgrade at least to 2.4.19])
fi
;;
2.6.* | 3.*)
;;
*)
AC_MSG_ERROR([*** Unsupported kernel version $RTEXT_LINUX_VERSION])
;;
esac
dnl ======================================================================
dnl import settings from RT-extensions
dnl ======================================================================
# kbuild (linux 2.6) or not
case "${RTEXT_LINUX_VERSION}" in
2.4.*)
unset CONFIG_KBUILD
;;
2.6.[[[:digit:]]] | 2.6.[[[:digit:]]].* | 2.6.1[[0123456]] | 2.6.1[[0123456]].*)
CONFIG_KBUILD=y
CONFIG_KBUILD_LEGACY=y
;;
2.6.17 | 2.6.17.*)
CONFIG_KBUILD=y
unset CONFIG_KBUILD_LEGACY
MODULE_SYMVERS=Modules.symvers
;;
2.6.* | 3.*)
CONFIG_KBUILD=y
unset CONFIG_KBUILD_LEGACY
MODULE_SYMVERS=Module.symvers
;;
*)
AC_MSG_ERROR([*** internal error])
;;
esac
AM_CONDITIONAL(CONFIG_KBUILD,[test "$CONFIG_KBUILD" = y])
RTNET_INTERNAL_USER_CFLAGS="-Wall -pipe -O2 -fstrict-aliasing"
# common stuff
case "${CONFIG_RTNET_RTEXT_VERSION}" in
rtai-3x)
RTEXT_USER_CFLAGS="`${RTAI_CONFIG} --lxrt-cflags`"
CONFIG_RTNET_RTEXT_ARCH="`${RTAI_CONFIG} --arch`"
RTEXT_LIBRARIES="`${RTAI_CONFIG} --library-dir`"
;;
xeno-20x)
RTEXT_USER_CFLAGS="`${XENO_CONFIG} --xeno-cflags`"
RTEXT_LIBRARIES="`${XENO_CONFIG} --library-dir`"
XNPOSIX_USER_CFLAGS="`${XENO_CONFIG} --posix-cflags`"
XNPOSIX_USER_LDFLAGS="`${XENO_CONFIG} --posix-ldflags`"
CONFIG_RTNET_RTEXT_ARCH="`${XENO_CONFIG} --arch`"
RTEXT_SYMBOLS="`${XENO_CONFIG} --symbol-dir`"
;;
xeno-21x)
RTEXT_USER_CFLAGS="`${XENO_CONFIG} --xeno-cflags` $RTNET_INTERNAL_USER_CFLAGS"
RTEXT_LIBRARIES="`${XENO_CONFIG} --library-dir`"
XNPOSIX_USER_CFLAGS="`${XENO_CONFIG} --posix-cflags` $RTNET_INTERNAL_USER_CFLAGS"
XNPOSIX_USER_LDFLAGS="`${XENO_CONFIG} --posix-ldflags`"
if test "`eval echo \\$$wanted_kernel_arch`" \!= ""; then
CONFIG_RTNET_RTEXT_ARCH="${RTNET_TARGET_ARCH}"
else
CONFIG_RTNET_RTEXT_ARCH="<something else>"
fi
;;
xeno-252)
RTEXT_USER_CFLAGS="`${XENO_CONFIG} --skin=native --cflags` $RTNET_INTERNAL_USER_CFLAGS"
RTEXT_LIBRARIES="`${XENO_CONFIG} --library-dir` -lxenomai"
XNPOSIX_USER_CFLAGS="`${XENO_CONFIG} --skin=posix --cflags` $RTNET_INTERNAL_USER_CFLAGS"
XNPOSIX_USER_LDFLAGS="`${XENO_CONFIG} --skin=posix --ldflags`"
if test "`eval echo \\$$wanted_kernel_arch`" \!= ""; then
CONFIG_RTNET_RTEXT_ARCH="${RTNET_TARGET_ARCH}"
else
CONFIG_RTNET_RTEXT_ARCH="<something else>"
fi
;;
*)
AC_MSG_ERROR([*** internal error])
;;
esac
if test "$CONFIG_KBUILD" = "y"; then
case "${CONFIG_RTNET_RTEXT_VERSION}" in
rtai-3x)
RTEXT_KMOD_CFLAGS="`${RTAI_CONFIG} --module-cflags`"
;;
xeno-20x)
RTEXT_KMOD_CFLAGS="`${XENO_CONFIG} --module-cflags`"
;;
xeno-21x | xeno-252)
RTEXT_KMOD_CFLAGS="-I${RTEXT_LINUX_SRC_DIR}/include/xenomai"
;;
*)
AC_MSG_ERROR([*** internal error])
;;
esac
else
case "${CONFIG_RTNET_RTEXT_VERSION}" in
rtai-3x)
RTEXT_KMOD_CFLAGS="`${RTAI_CONFIG} --module-cflags`"
;;
xeno-21x | xeno-252)
# Kernel cflags capturing trick from RTAI
kmod_cflags=`cd $srcdir/config/modules && make -s RTEXT_LINUX_DIR=$RTEXT_LINUX_DIR ARCH=$RTNET_TARGET_ARCH "CC=\"$CC\"" | grep '^RTEXT_KMOD_CFLAGS='`
eval $kmod_cflags
if test "$RTEXT_KMOD_CFLAGS" = ""; then
AC_MSG_ERROR([Unable to retrieve compilation flags for kernel modules out of $RTEXT_LINUX_DIR/Makefile])
fi
RTEXT_KMOD_CFLAGS="$RTEXT_KMOD_CFLAGS -DEXPORT_SYMTAB -I${RTEXT_LINUX_DIR}/include/xenomai -I${RTEXT_LINUX_DIR}/include/xenomai/compat"
;;
*)
AC_MSG_ERROR([*** internal error])
;;
esac
fi
dnl ======================================================================
dnl import RT-FireWire includes
dnl ======================================================================
RTFW_KMOD_CFLAGS="-I${RTNET_RTFW_PREFIX}/include"
dnl ======================================================================
dnl architecture tests....
dnl ======================================================================
AC_MSG_CHECKING([for RT-extension target arch])
AC_MSG_RESULT([${CONFIG_RTNET_RTEXT_ARCH}])
AC_MSG_CHECKING([for RTnet target arch])
AC_MSG_RESULT([${RTNET_TARGET_ARCH}])
if test x"${RTNET_TARGET_ARCH}" != x"${CONFIG_RTNET_RTEXT_ARCH}"; then
AC_MSG_ERROR([*** RT-extension and RTnet target architectures are not the same])
fi
AC_SUBST(RTNET_TARGET_ARCH)
dnl ======================================================================
dnl crosscompiling
dnl ======================================================================
AC_MSG_CHECKING([for CROSS_COMPILE])
if test "${CROSS_COMPILE}" = ""; then
CROSS_COMPILE="`echo ${CC} | sed s/gcc//`"
if test "${CROSS_COMPILE}gcc" \!= "${CC}"; then
CROSS_COMPILE=""
AC_MSG_RESULT([Cannot identify CROSS_COMPILE - assuming none - set manually if needed])
else
if test "${CROSS_COMPILE}" = ""; then
AC_MSG_RESULT([none])
else
AC_MSG_RESULT([${CROSS_COMPILE}])
fi
fi
else
AC_MSG_RESULT([${CROSS_COMPILE}])
fi
AC_SUBST(CROSS_COMPILE)
dnl ======================================================================
dnl decide to build for 2.4 or 2.6 kernel
dnl ======================================================================
if test x$CONFIG_KBUILD = x; then
RTNET_MODULE_EXT=.o
RTNET_KBUILD_ENV=
RTNET_KBUILD_CMD=
RTNET_KBUILD_CLEAN=
RTNET_KBUILD_DISTCLEAN=
else
RTNET_MODULE_EXT=.ko
RTNET_KBUILD_ENV='src2obj = $(patsubst %.$(1),%.o,$(filter %.$(1),$(call notdir,$(2))))'
RTNET_KBUILD_CMD="+@"
if test x$CONFIG_KBUILD_LEGACY = x; then
RTNET_KBUILD_CMD="$RTNET_KBUILD_CMD \
if test \\! -r $MODULE_SYMVERS; then \
\$(LN_S) \"\`cd \$(top_builddir) && pwd\`/$MODULE_SYMVERS\" .; \
fi; \
"
fi
RTNET_KBUILD_CMD="$RTNET_KBUILD_CMD \
for src in \$(filter-out FORCE, \$^); do \
if test \\! -r \`basename \$\$src\`; then \
\$(LN_S) \$\$src; \
fi; \
done; \
\$(MAKE) -C $RTEXT_LINUX_DIR \
CROSS_COMPILE=\"\$(CROSS_COMPILE)\" \
ARCH=\$(RTNET_TARGET_ARCH) \
M=\"\`pwd\`\" \
V=\$(V) \
rtext_kmod_cflags=\"\$(RTEXT_KMOD_CFLAGS)\" \
top_srcdir=\"\`cd \$(top_srcdir) && pwd\`\" \
top_builddir=\"\`cd \$(top_builddir) && pwd\`\" \
srcdir=\"\`cd \$(srcdir) && pwd\`\" \
build_objs='\$(call src2obj,c,\$^)' \
build_targets=\"\`for tgt in \${OBJS}; do basename \$\$tgt \
| sed -e's/\.ko/\.o /' | tr -d '\n'; done\`\" \
modules \
"
if test x$CONFIG_KBUILD_LEGACY = xy; then
RTNET_KBUILD_CMD="$RTNET_KBUILD_CMD \
MODVERDIR=\"\`cd \$(top_builddir) && pwd\`/symbols\" \
"
fi
RTNET_KBUILD_CLEAN=" \
\$(MAKE) -C $RTEXT_LINUX_DIR M=\"\`pwd\`\" clean; \
for src in \$^; do \
if test -h \`basename \$\$src\`; then \
rm -f \`basename \$\$src\`; \
fi; \
done; \
"
if test x$CONFIG_KBUILD_LEGACY = xy; then
RTNET_KBUILD_DISTCLEAN=" \
@for mod in \${OBJS}; do \
rm -f \`cd \$(top_builddir) && pwd\`/symbols/\`echo \$\$mod \
| sed -e's/${RTNET_MODULE_EXT}//'\`.mod; \
done; \
"
else
RTNET_KBUILD_DISTCLEAN=
fi
case "${CONFIG_RTNET_RTEXT_VERSION}" in
rtai-3x)
RTAI_MOD_SYMVER="`${RTAI_CONFIG} --module-dir`/Module.symvers"
if test -e ${RTAI_MOD_SYMVER} ; then
cp ${RTAI_MOD_SYMVER} ./
fi
;;
esac
fi
AC_MSG_CHECKING([for kernel module extension])
AC_MSG_RESULT([$RTNET_MODULE_EXT])
AC_SUBST(RTNET_MODULE_EXT)
AC_SUBST(RTNET_KBUILD_ENV)
AC_SUBST(RTNET_KBUILD_CMD)
AC_SUBST(RTNET_KBUILD_CLEAN)
AC_SUBST(RTNET_KBUILD_DISTCLEAN)
bs_kmodext=$RTNET_MODULE_EXT
bs_kcompile="make -C $RTEXT_LINUX_DIR ARCH=$RTNET_TARGET_ARCH CROSS_COMPILE=\"$CROSS_COMPILE\" V=1 M=`pwd` SUBDIRS=`pwd` modules"
dnl ======================================================================
dnl header checks
dnl ======================================================================
ac_save_CPPFLAGS="${CPPFLAGS}"
CPPFLAGS="${ac_save_CPPFLAGS} -D__KERNEL__ -I${RTEXT_LINUX_DIR}/include ${RTEXT_KMOD_CFLAGS}"
# Working around some Autoconf ugliness here: names of variables
# stored into the cache are canonicalized, turning /'s into _'s. So if
# you need to match X_Y.h and X/Y.h as different filenames, you are
# toast. Whichever comes first will be cached as "X_Y_h" and the
# second one will never get checked in the fs, but simply
# uncached. This applies to rtai_sem.h and rtai/sem.h for instance.
# To prevent this, we must only check a single set of non-conflicting
# headers, depending on the RTAI version which has been
# identified. (rpm)
if test "${CONFIG_KBUILD}" = "y"; then # building against linux-2.6
BS_CHECK_KHEADERS([rtdm/rtdm_driver.h],
[],
[AC_MSG_ERROR([*** header not found or working, please check RT-extension installation])],
[
#include <linux/kernel.h>
])
else # building against linux-2.4
CPPFLAGS="${CPPFLAGS} -D__KERNEL__ -I${RTEXT_LINUX_DIR}/include -I${RTEXT_LINUX_DIR}/include/xenomai/compat"
AC_CHECK_HEADERS([rtdm/rtdm_driver.h],
[],
[AC_MSG_ERROR([*** header not found or working, please check RT-extension installation])],
[
#include <linux/kernel.h>
])
fi
CPPFLAGS="${ac_save_CFLAGS}"
dnl ======================================================================
dnl Installation directory for modules
dnl ======================================================================
AC_MSG_CHECKING([for module installation directory])
AC_ARG_WITH(module-dir,
AS_HELP_STRING([--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],
with_module_dir='${exec_prefix}/modules')
RTNET_MODULE_DIR="$with_module_dir"
AC_MSG_RESULT([$RTNET_MODULE_DIR])
AC_SUBST(RTNET_MODULE_DIR)
dnl ======================================================================
dnl check for LXRT
dnl ======================================================================
case "${CONFIG_RTNET_RTEXT_VERSION}" in
rtai-3x)
AC_MSG_CHECKING([for RTAI 3.x LXRT enabled])
case "${CONFIG_RTAI_SCHED_LXRT}" in
y | m) CONFIG_RTNET_LXRT=y ;;
*) CONFIG_RTNET_LXRT=n ;;
esac
AC_MSG_RESULT([${CONFIG_RTNET_LXRT}])
AC_MSG_CHECKING([for CONFIG_REGPARM activated in Linux Kernel])
if test "${CONFIG_RTNET_LXRT}" = "y" -a "${CONFIG_REGPARM}" = "y"; then
AC_MSG_WARN([
*** LXRT interface for RTnet disabled ***
Please unset CONFIG_RTNET_LXRT for
${RTEXT_LINUX_DIR}
and rebuild your kernel in order to build LXRT interface for RTNET
])
CONFIG_RTNET_LXRT=n
else
AC_MSG_RESULT([${CONFIG_REGPARM:-n}])
fi
;;
xeno-20x | xeno-21x | xeno-252) CONFIG_RTNET_LXRT=n
;;
*)
AC_MSG_ERROR([*** internal error])
;;
esac
AM_CONDITIONAL(CONFIG_RTNET_LXRT,[test "$CONFIG_RTNET_LXRT" = "y"])
if test "$CONFIG_RTNET_LXRT" = "y"; then
AC_DEFINE(CONFIG_RTNET_LXRT, 1, [RTAI LXRT])
fi
dnl ======================================================================
dnl determine select support
dnl ======================================================================
AC_MSG_CHECKING([whether to enable select-like support])
case "${CONFIG_RTNET_RTEXT_VERSION}" in
rtai-3x)
CONFIG_RTDM_SELECT=$CONFIG_RTAI_RTDM_SELECT
;;
xeno-*)
CONFIG_RTDM_SELECT=$CONFIG_XENO_OPT_RTDM_SELECT
;;
esac
if test "$CONFIG_RTDM_SELECT" = "y"; then
AC_DEFINE(CONFIG_RTNET_SELECT_SUPPORT, 1, [Select support])
fi
AC_MSG_RESULT([${CONFIG_RTDM_SELECT:-n}])
dnl ======================================================================
dnl network interface card driver
dnl ======================================================================
AC_MSG_CHECKING([whether to build Realtek 8139 driver])
AC_ARG_ENABLE(8139,
AS_HELP_STRING([--enable-8139], [build Realtek 8139 driver]),
[case "$enableval" in
y | yes) CONFIG_RTNET_DRV_8139=y ;;
*) CONFIG_RTNET_DRV_8139=n ;;
esac])
AC_MSG_RESULT([${CONFIG_RTNET_DRV_8139:-n}])
AM_CONDITIONAL(CONFIG_RTNET_DRV_8139,[test "$CONFIG_RTNET_DRV_8139" = "y"])
AC_MSG_CHECKING([whether to build Intel EtherExpressPro/100 driver])
AC_ARG_ENABLE(eepro100,
AS_HELP_STRING([--enable-eepro100], [build Intel EtherExpressPro/100 driver]),
[case "$enableval" in
y | yes) CONFIG_RTNET_DRV_EEPRO100=y ;;
*) CONFIG_RTNET_DRV_EEPRO100=n ;;
esac])
AC_MSG_RESULT([${CONFIG_RTNET_DRV_EEPRO100:-n}])
AM_CONDITIONAL(CONFIG_RTNET_DRV_EEPRO100,[test "$CONFIG_RTNET_DRV_EEPRO100" = "y"])
AC_MSG_CHECKING([for EEPRO/100 Command Timeout])
AC_ARG_ENABLE(eepro100-cmdtimeout,
AS_HELP_STRING([--enable-eepro100-cmdtimeout], [Set EEPRO/100 command timeout]),
[case "$enableval" in
[[[:digit:]]]*) CONFIG_RTNET_DRV_EEPRO100_CMDTIMEOUT=$enableval ;;
*) AC_MSG_ERROR([Bad argument to option: --enable-eepro100-cmdtimeout=<microseconds>]) ;;
esac])
if test x$CONFIG_RTNET_DRV_EEPRO100_CMDTIMEOUT = x ; then
CONFIG_RTNET_DRV_EEPRO100_CMDTIMEOUT=20
fi
AC_MSG_RESULT($CONFIG_RTNET_DRV_EEPRO100_CMDTIMEOUT us)
AC_DEFINE_UNQUOTED(CONFIG_RTNET_DRV_EEPRO100_CMDTIMEOUT,
$CONFIG_RTNET_DRV_EEPRO100_CMDTIMEOUT, [EEPRO/100 command timeout])
AC_MSG_CHECKING([whether to enble EEPRO/100 debugging])
AC_ARG_ENABLE(eepro100-dbg,
AS_HELP_STRING([--enable-eepro100-dbg], [enable EEPRO/100 debugging]),
[case "$enableval" in
y | yes) CONFIG_RTNET_DRV_EEPRO100_DBG=y ;;
*) CONFIG_RTNET_DRV_EEPRO100_DBG=n ;;
esac])
AC_MSG_RESULT([${CONFIG_RTNET_DRV_EEPRO100_DBG:-n}])
if test "$CONFIG_RTNET_DRV_EEPRO100_DBG" = "y"; then
AC_DEFINE(CONFIG_RTNET_DRV_EEPRO100_DBG, 1, [EEPRO/100 debugging])
fi
AC_MSG_CHECKING([whether to build AMD PCnet32 driver])
AC_ARG_ENABLE(pcnet32,
AS_HELP_STRING([--enable-pcnet32], [build AMD PCnet32 driver]),
[case "$enableval" in
y | yes) CONFIG_RTNET_DRV_PCNET32=y ;;
*) CONFIG_RTNET_DRV_PCNET32=n ;;
esac])
AC_MSG_RESULT([${CONFIG_RTNET_DRV_PCNET32:-n}])
AM_CONDITIONAL(CONFIG_RTNET_DRV_PCNET32,[test "$CONFIG_RTNET_DRV_PCNET32" = "y"])
AC_MSG_CHECKING([whether to build VIA Rhine driver])
AC_ARG_ENABLE(via-rhine,
AS_HELP_STRING([--enable-via-rhine], [build VIA Rhine driver]),
[case "$enableval" in
y | yes) CONFIG_RTNET_DRV_VIA_RHINE=y ;;
*) CONFIG_RTNET_DRV_VIA_RHINE=n ;;
esac])
AC_MSG_RESULT([${CONFIG_RTNET_DRV_VIA_RHINE:-n}])
AM_CONDITIONAL(CONFIG_RTNET_DRV_VIA_RHINE,[test "$CONFIG_RTNET_DRV_VIA_RHINE" = "y"])
AC_MSG_CHECKING([whether to build NatSemi driver])
AC_ARG_ENABLE(natsemi,
AS_HELP_STRING([--enable-natsemi], [build NatSemi driver]),
[case "$enableval" in
y | yes) CONFIG_RTNET_DRV_NATSEMI=y ;;
*) CONFIG_RTNET_DRV_NATSEMI=n ;;
esac])
AC_MSG_RESULT([${CONFIG_RTNET_DRV_NATSEMI:-n}])
AM_CONDITIONAL(CONFIG_RTNET_DRV_NATSEMI,[test "$CONFIG_RTNET_DRV_NATSEMI" = "y"])
AC_MSG_CHECKING([whether to build tulip driver])
AC_ARG_ENABLE(tulip,
AS_HELP_STRING([--enable-tulip], [build tulip driver]),
[case "$enableval" in
y | yes) CONFIG_RTNET_DRV_TULIP=y ;;
*) CONFIG_RTNET_DRV_TULIP=n ;;
esac])
AC_MSG_RESULT([${CONFIG_RTNET_DRV_TULIP:-n}])
AM_CONDITIONAL(CONFIG_RTNET_DRV_TULIP,[test "$CONFIG_RTNET_DRV_TULIP" = "y"])
AC_MSG_CHECKING([whether to build fcc enet driver])
AC_ARG_ENABLE(fcc-enet,
AS_HELP_STRING([--enable-fcc-enet], [build fcc enet driver]),
[case "$enableval" in
y | yes) CONFIG_RTNET_DRV_FCC_ENET=y ;;
*) CONFIG_RTNET_DRV_FCC_ENET=n ;;
esac])
AC_MSG_RESULT([${CONFIG_RTNET_DRV_FCC_ENET:-n}])
AM_CONDITIONAL(CONFIG_RTNET_DRV_FCC_ENET,[test "$CONFIG_RTNET_DRV_FCC_ENET" = "y"])
AC_MSG_CHECKING([whether to build scc enet driver])
AC_ARG_ENABLE(scc-enet,
AS_HELP_STRING([--enable-scc-enet], [build scc enet driver]),
[case "$enableval" in
y | yes) CONFIG_RTNET_DRV_SCC_ENET=y ;;
*) CONFIG_RTNET_DRV_SCC_ENET=n ;;
esac])
AC_MSG_RESULT([${CONFIG_RTNET_DRV_SCC_ENET:-n}])
AM_CONDITIONAL(CONFIG_RTNET_DRV_SCC_ENET,[test "$CONFIG_RTNET_DRV_SCC_ENET" = "y"])
AC_MSG_CHECKING([whether to build fec enet driver])
AC_ARG_ENABLE(fec-enet,
AS_HELP_STRING([--enable-fec-enet], [build fec enet driver]),
[case "$enableval" in
y | yes) CONFIG_RTNET_DRV_FEC_ENET=y ;;
*) CONFIG_RTNET_DRV_FEC_ENET=n ;;
esac])
AC_MSG_RESULT([${CONFIG_RTNET_DRV_FEC_ENET:-n}])
AM_CONDITIONAL(CONFIG_RTNET_DRV_FEC_ENET,[test "$CONFIG_RTNET_DRV_FEC_ENET" = "y"])
AC_MSG_CHECKING([whether to build MPC52xx fec driver])
AC_ARG_ENABLE(mpc52xx-fec,
AS_HELP_STRING([--enable-mpc52xx-fec], [build MPC52xx fec driver]),
[case "$enableval" in
y | yes) CONFIG_RTNET_DRV_MPC52XX_FEC=y ;;
*) CONFIG_RTNET_DRV_MPC52XX_FEC=n ;;
esac])
AC_MSG_RESULT([${CONFIG_RTNET_DRV_MPC52XX_FEC:-n}])
AM_CONDITIONAL(CONFIG_RTNET_DRV_MPC52XX_FEC,[test "$CONFIG_RTNET_DRV_MPC52XX_FEC" = "y"])
AC_MSG_CHECKING([whether to build fec enet driver])
AC_ARG_ENABLE(fec,
AS_HELP_STRING([--enable-fec], [build fec driver]),
[case "$enableval" in
y | yes) CONFIG_RTNET_DRV_FEC=y ;;
*) CONFIG_RTNET_DRV_FEC=n ;;
esac])
AC_MSG_RESULT([${CONFIG_RTNET_DRV_FEC:-n}])
AM_CONDITIONAL(CONFIG_RTNET_DRV_FEC,[test "$CONFIG_RTNET_DRV_FEC" = "y"])
AC_MSG_CHECKING([whether to build SMSC LAN91C111 driver])
AC_ARG_ENABLE(smc91111,
AS_HELP_STRING([--enable-smc91111], [build SMSC LAN91C111 driver]),
[case "$enableval" in
y | yes) CONFIG_RTNET_DRV_SMC91111=y ;;
*) CONFIG_RTNET_DRV_SMC91111=n ;;
esac])
AC_MSG_RESULT([${CONFIG_RTNET_DRV_SMC91111:-n}])
AM_CONDITIONAL(CONFIG_RTNET_DRV_SMC91111,[test "$CONFIG_RTNET_DRV_SMC91111" = "y"])
AC_MSG_CHECKING([whether to build MACB driver])
AC_ARG_ENABLE(macb,
AS_HELP_STRING([--enable-macb], [build MACB driver]),
[case "$enableval" in
y | yes) CONFIG_RTNET_DRV_MACB=y ;;
*) CONFIG_RTNET_DRV_MACB=n ;;
esac])
AC_MSG_RESULT([${CONFIG_RTNET_DRV_MACB:-n}])
AM_CONDITIONAL(CONFIG_RTNET_DRV_MACB,[test "$CONFIG_RTNET_DRV_MACB" = "y"])
AC_MSG_CHECKING([whether to build Eth1394 driver])
AC_ARG_ENABLE(eth1394,
AS_HELP_STRING([--enable-eth1394], [build Eth1394 driver]),
[case "$enableval" in
y | yes) CONFIG_RTNET_DRV_ETH1394=y ;;
*) CONFIG_RTNET_DRV_ETH1394=n ;;
esac])
AC_MSG_RESULT([${CONFIG_RTNET_DRV_ETH1394:-n}])
AM_CONDITIONAL(CONFIG_RTNET_DRV_ETH1394,[test "$CONFIG_RTNET_DRV_ETH1394" = "y"])
AC_MSG_CHECKING([whether to build loopback driver])
AC_ARG_ENABLE(loopback,
AS_HELP_STRING([--enable-loopback], [build loopback driver @<:@default=yes@:>@]),
[case "$enableval" in
y | yes) CONFIG_RTNET_DRV_LOOPBACK=y ;;
*) CONFIG_RTNET_DRV_LOOPBACK=n ;;
esac])
AC_MSG_RESULT([${CONFIG_RTNET_DRV_LOOPBACK:-n}])
AM_CONDITIONAL(CONFIG_RTNET_DRV_LOOPBACK,[test "$CONFIG_RTNET_DRV_LOOPBACK" = "y"])
if test "$CONFIG_RTNET_DRV_LOOPBACK" = "y"; then
AC_DEFINE(CONFIG_RTNET_DRV_LOOPBACK,1,[loopback driver])
fi
AC_MSG_CHECKING([whether to build 3Com 59x driver])
AC_ARG_ENABLE(3c59x,
AS_HELP_STRING([--enable-3c59x], [build 3Com 59x driver]),
[case "$enableval" in
y | yes) CONFIG_RTNET_DRV_3C59X=y ;;
*) CONFIG_RTNET_DRV_3C59X=n ;;
esac])
AC_MSG_RESULT([${CONFIG_RTNET_DRV_3C59X:-n}])
AM_CONDITIONAL(CONFIG_RTNET_DRV_3C59X,[test "$CONFIG_RTNET_DRV_3C59X" = "y"])
AC_MSG_CHECKING([whether to build Realtek 8169 (Gigabit) driver])
AC_ARG_ENABLE(r8169,
AS_HELP_STRING([--enable-r8169], [build Realtek 8169 (Gigabit) driver]),
[case "$enableval" in
y | yes) CONFIG_RTNET_DRV_R8169=y ;;
*) CONFIG_RTNET_DRV_R8169=n ;;
esac])
AC_MSG_RESULT([${CONFIG_RTNET_DRV_R8169:-n}])
AM_CONDITIONAL(CONFIG_RTNET_DRV_R8169,[test "$CONFIG_RTNET_DRV_R8169" = "y"])