-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
1011 lines (856 loc) · 20.9 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.
FULL-PACKAGE-NAME=netperf
VERSION=2.5.0
BUG-REPORT-ADDRESS=netperf-feedback@netperf.org
AC_PREREQ(2.59)
AC_INIT(netperf, 2.5.0)
# Inherit compiler flags from the environment...
CFLAGS="${CFLAGS:=}"
CXXFLAGS="${CXXFLAGS:=}"
# use the target version rather than host - one day we may want cross-compile
AC_CANONICAL_TARGET
AC_CONFIG_SRCDIR([src/hist.h])
AM_INIT_AUTOMAKE([dist-zip])
AM_CONFIG_HEADER(config.h)
# AC_CONFIG_HEADER(config.h)
AC_CONFIG_LIBOBJ_DIR(src/missing)
# make sure we build netperf_version.h
touch ${ac_top_srcdir}src/netperf_version.h.in
# Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB
AC_C_CONST
# Checks for libraries.
AC_HAVE_LIBRARY(m)
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
# lets keep this in some semblence of alphabetical order
AC_CHECK_HEADERS([arpa/inet.h endian.h errno.h fcntl.h ifaddrs.h limits.h linux/tcp.h malloc.h netdb.h netinet/in.h netinet/sctp.h signal.h stdlib.h string.h strings.h syscall.h sys/ioctl.h sys/mman.h sys/param.h sys/socket.h sys/stat.h sys/time.h sys/wait.h sys/ipc.h sys/sockio.h sys/sysinfo.h sys/wait.h stdlib.h unistd.h])
# Some platforms require these. There may be a better way.
AC_HAVE_LIBRARY(socket)
if test "$ac_cv_lib_socket_main" = yes ; then
AC_HAVE_LIBRARY(nsl)
AC_HAVE_LIBRARY(sendfile)
AC_SYS_LARGEFILE
fi
# this one is for Tru64 and bind_to_cpu_id
AC_HAVE_LIBRARY(mach)
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
# AC_TYPE_SOCKLEN_T
OLD_TYPE_SOCKLEN_T
# AC_TYPE_IN_PORT_T
AC_DECL_H_ERRNO
AC_STRUCT_SOCKADDR_STORAGE
AC_HEADER_TIME
AC_HEADER_STDBOOL
AC_CHECK_SA_LEN(ac_cv_sockaddr_has_sa_len)
# Checks for library functions.
# AC_FUNC_ERROR_AT_LINE
AC_FUNC_FORK
# AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_FUNC_SELECT_ARGTYPES
AC_FUNC_SETPGRP
AC_TYPE_SIGNAL
# AC_FUNC_STAT
# remove pstat_getdynamic (at least for now) since we don't do
# anything conditional with the check anyway...
AC_CHECK_FUNCS([alarm bzero daemon gethostbyname gethrtime gettimeofday inet_ntoa memset memcpy munmap select setsid socket sqrt strcasecmp strchr strstr strtoul uname toupper])
#AC_CONFIG_SUBDIRS(src/missing)
# does this platform need the replacement getaddrinfo
AC_CHECK_FUNCS([getnameinfo getaddrinfo inet_ntop getifaddrs])
# AC_REPLACE_FUNCS([getaddrinfo])
if test "$ac_cv_func_getaddrinfo$ac_cv_func_getnameinfo" != yesyes ; then
AC_MSG_NOTICE([Requesting replacement getaddrinfo/getnameinfo])
AC_LIBOBJ(getaddrinfo)
HAVE_MISSING=yes
fi
if test "$ac_cv_func_inet_ntop" != yes ; then
AC_MSG_NOTICE([Requesting replacement inet_ntop])
AC_LIBOBJ(inet_ntop)
HAVE_MISSING=yes
fi
AM_CONDITIONAL(NEED_LIBCOMPAT, test "$HAVE_MISSING" = "yes")
AC_CHECK_FUNCS(sendfile)
AC_CHECK_FUNCS(uname)
# check for the various CPU binding calls
AC_CHECK_FUNCS(mpctl processor_bind sched_setaffinity bind_to_cpu_id bindprocessor)
# see if we should be enabling histogram support
AC_MSG_CHECKING(whether to include histogram support)
AC_ARG_ENABLE(histogram,
[AS_HELP_STRING([--enable-histogram],[include individual op timing, may affect result]) ])
case "$enable_histogram" in
yes)
use_histogram=true
;;
no)
use_histogram=false
;;
'')
# whatever
use_histogram=false
;;
*)
AC_MSG_ERROR([--enable-histogram takes yes or no])
;;
esac
if $use_histogram
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
if $use_histogram
then
AC_DEFINE([WANT_HISTOGRAM],,[Define to one to enable histogram support. May affect results.])
fi
# see if we should be enabling histogram support
AC_MSG_CHECKING(whether to include dirty support)
AC_ARG_ENABLE(dirty,
[AS_HELP_STRING([--enable-dirty],[write to buffers each time, may affect result]) ])
case "$enable_dirty" in
yes)
use_dirty=true
;;
no)
use_dirty=false
;;
'')
# whatever
use_dirty=false
;;
*)
AC_MSG_ERROR([--enable-dirty takes yes or no])
;;
esac
if $use_dirty
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
if $use_dirty
then
AC_DEFINE([DIRTY],,[Define to one to enable dirty buffer support. May affect results.])
fi
# see if we should be enabling demo support
AC_MSG_CHECKING(whether to include demo support)
AC_ARG_ENABLE(demo,
[AS_HELP_STRING([--enable-demo],[emit interim results during the run. May affect results.])])
case "$enable_demo" in
yes)
use_demo=true
;;
no)
use_demo=false
;;
'')
# whatever
use_demo=false
;;
*)
AC_MSG_ERROR([--enable-demo takes yes or no])
;;
esac
if $use_demo
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
if $use_demo
then
AC_DEFINE([WANT_DEMO],,[Define to one to enable demo support. May affect results.])
fi
# see if we should be including the AF_UNIX tests
AC_MSG_CHECKING(whether to include Unix-domain socket tests)
AC_ARG_ENABLE(unixdomain,
[AS_HELP_STRING([--enable-unixdomain],[include Unix Domain socket tests])])
case "$enable_unixdomain" in
yes)
use_unixdomain=true
;;
no)
use_unixdomain=false
;;
'')
use_unixdomain=false
;;
*)
AC_MSG_ERROR([--enable-unixdomain takes yes or no])
;;
esac
if $use_unixdomain
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
if $use_unixdomain
then
AC_DEFINE([WANT_UNIX],,[Define to one to include Unix Domain socket tests.])
fi
# see if we should be including the DLPI tests
AC_MSG_CHECKING(whether to include DLPI tests)
AC_ARG_ENABLE(dlpi,
[AS_HELP_STRING([--enable-dlpi],[include DLPI (link-layer) tests])])
case "$enable_dlpi" in
yes)
use_dlpi=true
;;
no)
use_dlpi=false
;;
'')
use_dlpi=false
;;
*)
AC_MSG_ERROR([--enable-dlpi takes yes or no])
;;
esac
if $use_dlpi
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
if $use_dlpi
then
AC_DEFINE([WANT_DLPI],,[Define to one to include DLPI tests.])
fi
# see if we should be including the DCCP tests
AC_MSG_CHECKING(whether to include DCCP tests)
AC_ARG_ENABLE(dccp,
[AS_HELP_STRING([--enable-dccp],[include DCCP tests])])
case "$enable_dccp" in
yes)
use_dccp=true
;;
no)
use_dccp=false
;;
'')
use_dccp=false
;;
*)
AC_MSG_ERROR([--enable-dccp takes yes or no])
;;
esac
if $use_dccp
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
if $use_dccp
then
AC_DEFINE([WANT_DCCP],,[Define to one to include DCCP tests.])
fi
# see if we should be including the OMNI tests
AC_MSG_CHECKING(whether to include OMNI tests)
AC_ARG_ENABLE(omni,
[AS_HELP_STRING([--enable-omni],[include OMNI tests])])
case "$enable_omni" in
yes)
use_omni=true
;;
no)
use_omni=false
;;
'')
use_omni=true
;;
*)
AC_MSG_ERROR([--enable-omni takes yes or no])
;;
esac
if $use_omni
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
if $use_omni
then
AC_DEFINE([WANT_OMNI],,[Define to one to include OMNI tests.])
AC_DEFINE([WANT_MIGRATION],,[Define to one to migrate classic to OMNI tests.])
fi
# see if we should be including the XTI tests
AC_MSG_CHECKING(whether to include XTI tests)
AC_ARG_ENABLE(xti,
[AS_HELP_STRING([--enable-xti],[include XTI socket tests])])
case "$enable_xti" in
yes)
use_xti=true
;;
no)
use_xti=false
;;
'')
use_xti=false
;;
*)
AC_MSG_ERROR([--enable-xti takes yes or no])
;;
esac
if $use_xti
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
if $use_xti
then
AC_DEFINE([WANT_XTI],,[Define to one to include XTI tests.])
fi
# see if we should be including the SDP tests
AC_MSG_CHECKING(whether to include SDP tests)
AC_ARG_ENABLE(sdp,
[AS_HELP_STRING([--enable-sdp],[include SDP socket tests])])
case "$enable_sdp" in
yes)
# probably need to be a bit more sophisticated here
AC_CHECK_LIB(sdp,t_open)
use_sdp=true
;;
no)
use_sdp=false
;;
'')
use_sdp=false
;;
*)
AC_MSG_ERROR([--enable-sdp takes yes or no])
;;
esac
if $use_sdp
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
if $use_sdp
then
AC_DEFINE([WANT_SDP],,[Define to one to include SDP tests.])
fi
# see if we should be including the ICSC-EXS tests
AC_MSG_CHECKING(whether to include ICSC-EXS tests)
AC_ARG_ENABLE(exs,
[AS_HELP_STRING([--enable-exs],[include ICSC async sockets tests])])
case "$enable_exs" in
yes)
use_exs=true
AC_CHECK_HEADER(sys/exs.h,,[use_exs=false])
AC_CHECK_LIB(exs,exs_init,,[use_exs=false])
;;
no)
use_exs=false
;;
'')
use_exs=false
;;
*)
AC_MSG_ERROR([--enable-exs takes yes or no])
;;
esac
if $use_exs
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
if $use_exs
then
AC_DEFINE([HAVE_ICSC_EXS],,[Define to one to include ICSC-EXS tests.])
fi
# see if we should be enabling SCTP support
AC_ARG_ENABLE(sctp,
[AS_HELP_STRING([--enable-sctp],[include tests to measure SCTP performance ])])
case "$enable_sctp" in
yes)
use_sctp=true
AC_CHECK_HEADERS(netinet/sctp.h,,use_sctp=false,
[[
#include <sys/socket.h>
]])
case "$host" in
*-*-freebsd[78].*)
# FreeBSD 7.x and later SCTP support doesn't need -lsctp.
;;
*)
AC_HAVE_LIBRARY(sctp,,use_sctp=false)
;;
esac
AC_CHECK_MEMBER(struct sctp_event_subscribe.sctp_adaptation_layer_event,
, , [#include <netinet/sctp.h>])
if test "$ac_cv_member_struct_sctp_event_subscribe_sctp_adaptation_layer_event" = "yes"; then
AC_DEFINE([HAVE_SCTP_ADAPTATION_LAYER_EVENT], 1,
[Define to 1 if `struct sctp_event_subscribe' has a `sctp_adaptation_layer_event' member])
fi
;;
no)
use_sctp=false
;;
'')
# whatever
use_sctp=false
;;
*)
AC_MSG_ERROR([--enable-sctp takes yes or no])
;;
esac
AC_MSG_CHECKING(whether to include SCTP tests)
if $use_sctp
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
if $use_sctp
then
AC_DEFINE([WANT_SCTP],,[Define to one to include SCTP tests.])
fi
# see if we should be enabling paced sends
AC_MSG_CHECKING([whether to include paced send (intervals) support])
AC_ARG_ENABLE(intervals,
[AS_HELP_STRING([--enable-intervals],[include ability to pace operations, may affect result])])
case "$enable_intervals" in
yes)
use_intervals=true
;;
no)
use_intervals=false
;;
'')
use_intervals=false
;;
*)
AC_MSG_ERROR([--enable-intervals takes yes or no])
;;
esac
if $use_intervals
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
if $use_intervals
then
AC_DEFINE([WANT_INTERVALS],,[Define to one to enable paced operation support. May affect results.])
fi
# see if paced sends should wait and spin
AC_MSG_CHECKING([whether paced sends should spin])
AC_ARG_ENABLE(spin,
[AS_HELP_STRING([--enable-spin],[paced operations (--enable-intervals) should sit and spin - WILL affect result])])
case "$enable_spin" in
yes)
use_spin=true
;;
no)
use_spin=false
;;
'')
use_spin=false
;;
*)
AC_MSG_ERROR([--enable-spin takes yes or no])
;;
esac
if $use_spin
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
if $use_spin
then
AC_DEFINE([WANT_INTERVALS],,[Define to one to enable paced operation support. May affect results.])
AC_DEFINE([WANT_SPIN],,[Define to one to spin waiting on paced operation. WILL AFFEFCT CPU UTILIZATION])
fi
# see if we should be enabling initial request bursts
AC_MSG_CHECKING([whether to include initial burst support in _RR tests])
AC_ARG_ENABLE(burst,
[AS_HELP_STRING([--enable-burst],[include intial request burst ability in _RR tests, may affect result])])
case "$enable_burst" in
yes)
use_burst=true
;;
no)
use_burst=false
;;
'')
use_burst=true
;;
*)
AC_MSG_ERROR([--enable-burst takes yes or no])
;;
esac
if $use_burst
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
if $use_burst
then
AC_DEFINE([WANT_FIRST_BURST],,[Define to one to enable initial _RR burst support. May affect results.])
fi
# time to see about CPU utilization measurements
AC_MSG_CHECKING([which CPU utilization measurement type to use])
AC_ARG_ENABLE(cpuutil,
[AS_HELP_STRING([--enable-cpuutil],[include code to measure CPU utilization using specified mechanism])])
NETCPU_SOURCE="$enable_cpuutil"
case "$enable_cpuutil" in
pstat)
use_cpuutil=true
AC_DEFINE([USE_PSTAT],,[Use HP-UX's pstat interface to measure CPU util.])
;;
pstatnew)
use_cpuutil=true
AC_DEFINE([USE_PSTAT],,[Use HP-UX's pstat interface to measure CPU util.])
;;
perfstat)
use_cpuutil=true
AC_DEFINE([USE_PERFSTAT],,[Use AIX's perfstat interface to measure CPU util.])
AC_HAVE_LIBRARY(perfstat)
;;
looper)
use_cpuutil=true
AC_DEFINE([USE_LOOPER],,[Use looper/soaker processes to measure CPU util.])
;;
procstat)
use_cpuutil=true
AC_DEFINE([USE_PROC_STAT],,[Use Linux's procstat interface to measure CPU util.])
;;
kstat)
use_cpuutil=true
AC_DEFINE([USE_KSTAT],,[Use Solaris's kstat interface to measure CPU util.])
AC_HAVE_LIBRARY(kstat)
;;
kstat10)
use_cpuutil=true
AC_DEFINE([USE_KSTAT],,[Use Solaris's kstat interface to measure CPU util.])
AC_HAVE_LIBRARY(kstat)
;;
osx)
use_cpuutil=true
AC_DEFINE([USE_OSX],,[Use MacOS X's host_info interface to measure CPU util.])
;;
'')
# ia64-hp-hpux11.23
# i386-pc-solaris2.10
# guess it automagically in a nice big case statement
case $target in
*-*-linux*)
use_cpuutil=true
AC_DEFINE([USE_PROC_STAT],,[Use Linux's procstat interface to measure CPU util.])
enable_cpuutil="procstat - auto"
NETCPU_SOURCE="procstat"
;;
*-*-hpux11.23 | *-*-hpux11.31)
use_cpuutil=true
AC_DEFINE([USE_PSTAT],,[Use HP-UX's pstat interface to measure CPU util.])
enable_cpuutil="pstatnew - auto"
NETCPU_SOURCE="pstatnew"
;;
*-*-hpux11* | *-*-hpux10*)
use_cpuutil=true
AC_DEFINE([USE_PSTAT],,[Use HP-UX's pstat interface to measure CPU util.])
enable_cpuutil="pstat - auto"
NETCPU_SOURCE="pstat"
;;
*-*-aix5.*)
use_puutil=true
AC_DEFINE([USE_PERFSTAT],,[Use AIX's perfstat interface to measure CPU util.])
AC_HAVE_LIBRARY(perfstat)
enable_cpuutil="perfstat - auto"
NETCPU_SOURCE="perfstat"
;;
*-*-solaris2.1*)
use_cpuutil=true
AC_DEFINE([USE_KSTAT],,[Use Solaris's kstat interface to measure CPU util.])
AC_HAVE_LIBRARY(kstat)
enable_cpuutil="kstat10 - auto"
NETCPU_SOURCE="kstat10"
;;
*-*-solaris2.*)
use_cpuutil=true
AC_DEFINE([USE_KSTAT],,[Use Solaris's kstat interface to measure CPU util.])
AC_HAVE_LIBRARY(kstat)
enable_cpuutil="kstat - auto"
NETCPU_SOURCE="kstat"
;;
*-*-freebsd[[4-7]].* | *-*-netbsd[[1-9]].* )
use_cpuutil=true
AC_DEFINE([USE_SYSCTL],,[Use MumbleBSD's sysctl interface to measure CPU util.])
enable_cpuutil="sysctl - auto"
NETCPU_SOURCE="sysctl"
;;
*-*-darwin*)
use_cpuutil=true
AC_DEFINE([USE_OSX],,[Use MacOS X's host_info interface to measure CPU util.])
enable_cpuutil="osx - auto"
NETCPU_SOURCE="osx"
;;
*)
use_cpuutil=false
NETCPU_SOURCE="none"
enable_cpuutil="none. Consider teaching configure about your platform."
;;
esac
;;
none)
use_cpuutil=false
;;
*)
AC_MSG_ERROR([--enable-cpuutil takes kstat, kstat10, looper, osx, perfstat, procstat, pstat, pstatnew, sysctl or none])
;;
esac
AC_MSG_RESULT("$enable_cpuutil")
AC_SUBST(NETCPU_SOURCE)
# time to see about route lookup mechanisms
AC_MSG_CHECKING([which route lookup type to use])
AC_ARG_ENABLE(rtlookup,
[AS_HELP_STRING([--enable-rtlookup],[include code to find the probable egress interface using specified mechanism])])
NETRTLKUP_SOURCE="$enable_rtlookup"
case "$enable_rtlookup" in
rtmget)
use_rtlookup=true
;;
rtnetlink)
use_rtlookup=true
;;
'')
# guess it automagically in a nice big case statement
case $target in
*-*-linux*)
use_rtlookup=true
enable_rtlookup="rtnetlink - auto"
NETRTLKUP_SOURCE="rtnetlink"
;;
*-*-hpux11.31 | *-*-solaris* | *-*-aix5*)
use_rtlookup=true
enable_rtlookup="rtmget - auto"
NETRTLKUP_SOURCE="rtmget"
;;
*-*-freebsd[[4-7]].* | *-*-darwin*)
use_rtlookup=true
enable_rtlookup="rtmget - auto"
NETRTLKUP_SOURCE="rtmget"
;;
*)
use_rtlookup=false
NETRTLKUP_SOURCE="none"
enable_rtlookup="none. Consider teaching configure about your platform."
;;
esac
;;
none)
use_rtlookup=false
;;
*)
AC_MSG_ERROR([--enable-rtlookup takes rtmget, rtnetlink or none])
;;
esac
AC_MSG_RESULT("$enable_rtlookup")
AC_SUBST(NETRTLKUP_SOURCE)
# time to see about slot lookup mechanisms
AC_MSG_CHECKING([which slot lookup type to use])
AC_ARG_ENABLE(slotlookup,
[AS_HELP_STRING([--enable-slotlookup],[include code to find the probable egress interface using specified mechanism])])
NETSLOTLKUP_SOURCE="$enable_slotlookup"
case "$enable_slotlookup" in
linux)
use_slotlookup=true
;;
solaris)
use_slotlookup=true
;;
hpux)
use_slotlookup=true
;;
'')
# guess it automagically in a nice big case statement
case $target in
*-*-linux*)
use_slotlookup=true
enable_slotlookup="linux - auto"
NETSLOTLKUP_SOURCE="linux"
;;
*-*-solaris*)
use_slotlookup=true
enable_slotlookup="solaris - auto"
NETSLOTLKUP_SOURCE="solaris"
AC_HAVE_LIBRARY(devinfo)
;;
*-*-hpux11.31*)
use_slotlookup=true
enable_slotlookup="hpux 11.31 - auto"
NETSLOTLKUP_SOURCE="ux1131"
AC_HAVE_LIBRARY(IO)
AC_HAVE_LIBRARY(olrad)
;;
*)
use_slotlookup=false
NETSLOTLKUP_SOURCE="none"
enable_slotlookup="none. Consider teaching configure about your platform."
;;
esac
;;
none)
use_slotlookup=false
;;
*)
AC_MSG_ERROR([--enable-slotlookup takes linux or none])
;;
esac
AC_MSG_RESULT("$enable_slotlookup")
AC_SUBST(NETSLOTLKUP_SOURCE)
# time to see about sec lookup mechanisms
AC_MSG_CHECKING([which sec lookup type to use])
AC_ARG_ENABLE(seclookup,
[AS_HELP_STRING([--enable-seclookup],[include code to find the system security mechanism and its state])])
NETSECLKUP_SOURCE="$enable_seclookup"
case "$enable_seclookup" in
linux)
use_seclookup=true
;;
'')
# guess it automagically in a nice big case statement
case $target in
*-*-linux*)
AC_HAVE_LIBRARY(dl)
use_seclookup=true
enable_seclookup="linux - auto"
NETSECLKUP_SOURCE="linux"
;;
*)
use_seclookup=false
NETSECLKUP_SOURCE="none"
enable_seclookup="none. Consider teaching configure about your platform."
;;
esac
;;
none)
use_seclookup=false
;;
*)
AC_MSG_ERROR([--enable-seclookup takes linux or none])
;;
esac
AC_MSG_RESULT("$enable_seclookup")
AC_SUBST(NETSECLKUP_SOURCE)
# time to see about driver lookup mechanisms
AC_MSG_CHECKING([which driver info lookup type to use])
AC_ARG_ENABLE(drvlookup,
[AS_HELP_STRING([--enable-drvlookup],[include code to find the driver information for the probable egress interface])])
NETDRVLKUP_SOURCE="$enable_drvlookup"
case "$enable_drvlookup" in
ethtool)
use_drvlookup=true
;;
solaris)
use_drvlookup=true
;;
'')
# guess it automagically in a nice big case statement
case $target in
*-*-linux*)
use_drvlookup=true
enable_drvlookup="ethtool - auto"
NETDRVLKUP_SOURCE="ethtool"
;;
*-*-solaris*)
use_drvlookup=true
enable_drvlookup="solaris - auto"
NETDRVLKUP_SOURCE="solaris"
;;
*)
use_drvlookup=false
NETDRVLKUP_SOURCE="none"
enable_drvlookup="none. Consider teaching configure about your platform."
;;
esac
;;
none)
use_drvlookup=false
;;
*)
AC_MSG_ERROR([--enable-drvlookup takes ethtool or none])
;;
esac
AC_MSG_RESULT("$enable_drvlookup")
AC_SUBST(NETDRVLKUP_SOURCE)
# time to see about system lookup mechanisms
AC_MSG_CHECKING([which system info lookup type to use])
AC_ARG_ENABLE(syslookup,
[AS_HELP_STRING([--enable-syslookup],[include code to find some rudimentary system information])])
NETSYSLKUP_SOURCE="$enable_syslookup"
case "$enable_syslookup" in
hpux11i)
use_syslookup=true
;;
linux)
use_syslookup=true;
AC_CHECK_HEADERS([smbios/SystemInfo.h])
AC_HAVE_LIBRARY(smbios)
;;
solaris)
use_syslookup=true;
# this will basically tell us if we can use libsmbios
AC_CHECK_HEADERS([sys/sbmios.h])
AC_HAVE_LIBRARY(smbios)
;;
'')
# guess it automagically in a nice big case statement
case $target in
*-*-hpux11*)
use_syslookup=true
enable_syslookup="hpux11i - auto"
NETSYSLKUP_SOURCE="hpux11i"
;;
*-*-linux*)
use_syslookup=true
enable_syslookup="linux - auto"
AC_CHECK_HEADERS([smbios/SystemInfo.h])
AC_HAVE_LIBRARY(smbios)
NETSYSLKUP_SOURCE="linux"
;;
*-*-solaris*)
use_syslookup=true
enable_syslookup="solaris - auto"
NETSYSLKUP_SOURCE="solaris"
AC_CHECK_HEADERS([sys/smbios.h])
AC_HAVE_LIBRARY(smbios)
;;
*)
use_syslookup=false
NETSYSLKUP_SOURCE="none"
enable_syslookup="none. Consider teaching configure about your platform."
;;
esac
;;
none)
use_syslookup=false
;;
*)
AC_MSG_ERROR([--enable-syslookup takes hpux11i, linux or none])
;;
esac
AC_MSG_RESULT("$enable_syslookup")
AC_SUBST(NETSYSLKUP_SOURCE)