File: config_project_with_enable

package info (click to toggle)
net-snmp 5.9+dfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 36,760 kB
  • sloc: ansic: 283,039; perl: 17,712; sh: 11,887; makefile: 2,705; xml: 663; python: 623; pascal: 62; sql: 47
file content (1199 lines) | stat: -rw-r--r-- 43,713 bytes parent folder | download
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
# -*- autoconf -*-
#########################################
##
#   Command-line processing - --with/--enable
##
#########################################

##
#   System: Compiler settings
##

AC_ARG_WITH(cc, [
Compiler Options:
  --with-cc=CC                    use CC to compile (default=gcc).],
    [CC=$with_cc;export CC])

AC_ARG_WITH(linkcc, [
  --with-linkcc=CC                use CC to link (default=gcc).],
    [LINKCC=$with_linkcc;export LINKCC])

AC_ARG_WITH(ar,
[  --with-ar=AR                    use AR as the archiver.],
    [AR=$with_ar; export AR])

AC_ARG_WITH(endianness,
[  --with-endianness=big|little    define endianness of target platform when
                                  cross-compiling.],
    [if test $with_endianness != "big" -a $with_endianness != "little" ; then
       AC_MSG_ERROR([Endianness must be big or little, not "$with_endianness".]);
     else
       AC_MSG_WARN([--with-endianness is obsolete])
     fi
])

AC_ARG_WITH(cflags,
[  --with-cflags=CFLAGS            use CFLAGS as compile time arguments.],
    [CFLAGS=$with_cflags; export CFLAGS])

AC_ARG_WITH(ldflags,
[  --with-ldflags=LDFLAGS          use LDFLAGS as link time arguments to ld.],
    [LDFLAGS=$with_ldflags; export LDFLAGS])

AC_ARG_ENABLE(as-needed,
[  --disable-as-needed             Link libperl against applications rather
                                  than Net-SNMP libraries. Use only if the other
                                  way doesn't work.])

AC_ARG_WITH(libs,
[  --with-libs=LIBS                use LIBS as link time arguments to ld.],
    [LIBS=$with_libs; export LIBS])

AC_ARG_ENABLE(silent-libtool,
[  --enable-silent-libtool         Pass --silent to libtool.],
	LIBTOOLFLAGS=--silent)
AC_SUBST(LIBTOOLFLAGS)


##
#   System: Library settings
##

tryrsaref=no
NETSNMP_ARG_WITH(rsaref,
[  --with-rsaref=PATH              Look for librsaref in PATH/lib.],
    if test "x$withval" = "xyes"; then
      tryrsaref=yes
    elif test "x$withval" = "xno"; then
      tryrsaref=no
    elif test -d "$withval"; then
      AC_ADD_SEARCH_PATH($withval)
      tryrsaref=yes
    fi,
)

tryopenssl=defaultyes
askedopenssl=no
aes_capable=no
NETSNMP_ARG_WITH(openssl,
[  --with-openssl=PATH             Look for openssl in PATH/lib,
                                  or PATH may be "internal" to build with
                                  minimal copied OpenSSL code for USM only.],
    if test "x$withval" = "xyes"; then
      tryopenssl=yes
      askedopenssl=yes
    elif test "x$withval" = "xinternal"; then
      tryopenssl=internal
      askedopenssl=internal
    elif test "x$withval" = "xno"; then
      tryopenssl=no
    elif test -d "$withval"; then
      if test -d "$withval/lib/MinGW"; then
        LDFLAGS="-L$withval/lib/MinGW $LDFLAGS"
        CPPFLAGS="-I$withval/include $CPPFLAGS"
      else
        AC_ADD_SEARCH_PATH($withval)
      fi
      tryopenssl=yes
      askedopenssl=yes
    fi,
)
if test "x$tryopenssl" = "xdefaultyes"; then
      AC_ADD_SEARCH_PATH(/usr/local/ssl)
      tryopenssl=yes
fi
if test "x$tryopenssl" = "xyes"; then
    AC_CHECK_HEADERS(
        [openssl/aes.h openssl/evp.h],
        [aes_capable=yes],
        []
    )
fi

AC_ARG_WITH([ssl],,NETSNMP_INVALID_WITH([openssl]))
AC_ARG_ENABLE([ssl],,NETSNMP_INVALID_WITH([openssl]))

askedpkcs=no
NETSNMP_ARG_WITH(pkcs,
[  --with-pkcs=PATH                Look for pkcs11 in PATH/lib.],
    if test "x$withval" = "xyes"; then
      askedpkcs=yes
    elif test "x$withval" = "xno"; then
      askedpkcs=no
    elif test -d "$withval"; then
      AC_ADD_SEARCH_PATH($withval)
      askedpkcs=yes
    fi,
)

trykrb5=defaultyes
askedkrb5=no
NETSNMP_ARG_WITH(krb5,
[  --with-krb5=PATH                Look for krb5 in PATH/lib.],
    if test "x$withval" = "xyes"; then
      trykrb5=yes
      askedkrb5=yes
      krb5path=undef
    elif test "x$withval" = "xno"; then
      trykrb5=no
      krb5path=undef
    elif test -d "$withval"; then
      trykrb5=yes
      askedkrb5=yes
      krb5path=$withval
    fi,
)
if test "x$trykrb5" = "xdefaultyes"; then
      trykrb5=yes
      krb5path=/usr/kerberos
fi

AC_ARG_WITH(dnssec-local-validation,
        [  --with-dnssec-local-validation Enable local DNSSEC validation using libval (no)], want_dnssec=$withval, want_dnssec=no)
AC_ARG_ENABLE([dnssec-local-validation],,
              NETSNMP_INVALID_WITH([dnssec-local-validation]))
AC_ARG_WITH([dnssec],,NETSNMP_INVALID_WITH([dnssec-local-validation]))
AC_ARG_ENABLE([dnssec],,NETSNMP_INVALID_WITH([dnssec-local-validation]))

NETSNMP_ARG_WITH(rpm,
[  --without-rpm                   Don't include support for the RPM package
                                  management system when building the host MIB
                                  module.])


NETSNMP_ARG_WITH(pcre,
[  --without-pcre                  Don't include pcre process searching
                                  support in the agent.],
      with_pcre="$withval", with_pcre="maybe")

##
#   Project: Build configuration settings
##

#       Install prefix
#
AC_ARG_WITH(install-prefix,
[  --with-install-prefix=PATH      Just for installing, prefix all 
                                  directories with PATH.  This is known not
                                  to work on some systems with shared
                                  libraries (eg, HPUX)],
      INSTALL_PREFIX="$withval")

if test "x$INSTALL_PREFIX" = "xyes" ; then
  AC_MSG_ERROR([--with-install-prefix requires an argument])
fi
if test "x$INSTALL_PREFIX" = "xno" ; then
  INSTALL_PREFIX=""
fi
AC_SUBST(INSTALL_PREFIX)


#
#   Subsystems to build:
#       Library
#
FEATUREHEADERS="library/features.h"
FTMAINSUBS=""

#
#       Agent
#
NETSNMP_ARG_ENABLE(agent,
[  --disable-agent                 Do not build the agent (snmpd).])
if test "x$enable_agent" != "xno"; then
   SNMPD='snmpd$(EXEEXT)'
   MAINSUBS="$MAINSUBS agent"
   FEATUREHEADERS="$FEATUREHEADERS agent/features-mibgroups.h agent/features.h"
   FTMAINSUBS="agent $FTMAINSUBS"
   TRAPLIBS='$(TRAPDWITHAGENT)'
   USETRAPLIBS='$(USEAGENTLIBS)'
else
   SNMPD=""
   # we still need/want the agentlibs (for subagents, e.g. snmptrapd)
   MAINSUBS="$MAINSUBS agent"
   # building snmptrapd w/o agentlibs doesn't work atm
   #TRAPLIBS='$(TRAPDWITHOUTAGENT)'
   #USETRAPLIBS='$(USELIBS)'
   TRAPLIBS='$(TRAPDWITHAGENT)'
   USETRAPLIBS='$(USEAGENTLIBS)'
   AC_DEFINE([NETSNMP_DISABLE_AGENT], 1, [Define if no agent is built])
fi

AC_SUBST(SNMPD)
AC_SUBST(TRAPLIBS)
AC_SUBST(USETRAPLIBS)

#       Applications
#
NETSNMP_ARG_ENABLE(applications,
[  --disable-applications          Do not build the apps (snmpget, ...).])
if test "x$enable_applications" != "xno"; then
   MAINSUBS="$MAINSUBS apps"
   FEATUREHEADERS="$FEATUREHEADERS features-snmpnetstat.h features-apps.h"
   FTMAINSUBS="apps $FTMAINSUBS"
else
   AC_DEFINE([NETSNMP_DISABLE_APPS], 1, [Define if no apps are built])
fi

#       Manual pages
#
NETSNMP_ARG_ENABLE(manuals,
[  --disable-manuals               Do not install the manuals.])
if test "x$enable_manuals" != "xno"; then
   MAINSUBS="$MAINSUBS man"
fi

#       Supporting scripts
#
NETSNMP_ARG_ENABLE(scripts,
[  --disable-scripts               Do not install the scripts (mib2c, ...).])
if test "x$enable_scripts" != "xno"; then
   MAINSUBS="$MAINSUBS local"
fi

#       MIB files
#
AC_ARG_ENABLE(mibs,
[  --disable-mibs                  Do not install the mib files.])
if test "x$enable_mibs" != "xno"; then
   MAINSUBS="$MAINSUBS mibs"
fi
# with-mibs is valid too, but means something else

AC_SUBST(MAINSUBS)
AC_SUBST(FTMAINSUBS)
AC_MSG_CHECKING([what to build and install])
AC_MSG_RESULT([$MAINSUBS])


#       MIB module validation (during "configure")
#
NETSNMP_ARG_ENABLE(mib-config-checking,
[  --enable-mib-config-checking    Turns on extra checks during configuration
                                  of mib modules. Any conflicts will cause
                                  configure to abort (default is to issue a
                                  warning and continue.)],
  [if test "$enableval" = yes -o "$enableval" = no ; then
     with_mib_cfg_checks="$enableval"
   else
     AC_MSG_ERROR([Please use --enable/--disable-mib-config-checking])
   fi],
  [with_mib_cfg_checks="no"])

NETSNMP_ARG_ENABLE(mib-config-debug,
[  --enable-mib-config-debug       Turns on verbose output during mib module
                                  configure processing.],
  [if test "$enableval" = yes -o "$enableval" = no ; then
     with_mib_cfg_debug="$enableval"
   else
     AC_MSG_ERROR([Please use --enable/--disable-mib-config-debug])
   fi],
  [with_mib_cfg_debug="no"])


#       Version-specific features
#
AC_ARG_ENABLE([new-features],
        [AS_HELP_STRING([--enable-new-features],
                [Compile in new MIB modules and other experimental features
                 which are due to be included in future releases.])])

AC_ARG_ENABLE([old-features],
        [AS_HELP_STRING([--enable-old-features],
                [Compile in old MIB modules and other deprecated features
                 which were replaced in the default build of this release.])])

AC_ARG_WITH([features-of],
        [AS_HELP_STRING([--with-features-of=version],
                [Compile in MIB modules and other features as if this was
                 release "version" (default is ]AC_PACKAGE_VERSION[).])],,
        [with_features_of=$PACKAGE_VERSION])
   

#       Manual prompting during "configure"
#
NETSNMP_ARG_WITH(defaults,
[
Miscellaneous:
  --with-defaults         Use defaults for prompted values.],
  [if test "$withval" = yes -o "$withval" = no ; then
     defaults="$withval"
   else
     AC_MSG_ERROR([Please use --with/--without-defaults])
   fi],
  [defaults="no"])


#       UCD compatability
#
NETSNMP_ARG_ENABLE(ucd-snmp-compatibility,
[  --enable-ucd-snmp-compatibility Install ucd-snmp look-alike headers and libs.
])

if test "x$enable_ucd_snmp_compatibility" = "xyes" ; then	
  installucdheaders=installucdheaders
  installucdlibs=installucdlibs
  AC_MSG_CACHE_ADD(UCD-SNMP compatability:     enabled)
fi
AC_SUBST(installucdheaders)
AC_SUBST(installucdlibs)


##
#   Project: Library: MIB configuration settings
##

NETSNMP_ARG_ENABLE(mib-loading,
[  --disable-mib-loading           Do not include code that parses and 
                                  manipulates the mib files.])
if test "x$enable_mib_loading" = "xno"; then
  AC_DEFINE([NETSNMP_DISABLE_MIB_LOADING], 1, 
            [Define if mib loading and parsing code should not be included])
fi

NETSNMP_ARG_WITH(mibdirs,
[  --with-mibdirs="dir1:dir2:"   Default directories to look for mibs.
                                  (Default: \$HOME/.snmp/mibs:DATADIR/snmp/mibs)],
    [NETSNMP_DEFAULT_MIBDIRS="$with_mibdirs"
    AC_DEFINE_UNQUOTED(NETSNMP_DEFAULT_MIBDIRS,"$with_mibdirs",
        [default location to look for mibs to load using the above tokens
         and/or those in the MIBS envrionment variable])])

AC_ARG_WITH(mibs,
[  --with-mibs="item1:item2:"    Default mib IDs to read.
                                  (The default list is
                                   "SNMPv2-MIB:IF-MIB:IP-MIB:TCP-MIB:UDP-MIB"
                                  with the addition of any mibs used
                                  by the mib modules the agent is
                                  configured with)],
    NETSNMP_DEFAULT_MIBS="$with_mibs")
# enable-mibs is valid too, but means something else

NETSNMP_ARG_WITH(mibfiles,
[  --with-mibfiles="file1:file2" Default mib files to load.
                                  (Default:  none.  uses IDs above instead.)],
    AC_DEFINE_UNQUOTED(NETSNMP_DEFAULT_MIBFILES,"$with_mibfiles",
        [default mib files to load, specified by path.]))


##
#   Project: Library: Security configuration
##

NETSNMP_ARG_ENABLE(des,
[  --disable-des                   Do not support DES encryption.])
if test "x$enable_des" = "xno"; then
  AC_DEFINE([NETSNMP_DISABLE_DES], 1, 
            [Define if DES encryption should not be supported])
fi

NETSNMP_ARG_ENABLE(privacy,
[  --disable-privacy               Don't compile in support for privacy (encryption).])
if test "x$enable_privacy" != "xno"; then
  AC_DEFINE(NETSNMP_ENABLE_SCAPI_AUTHPRIV, 1,
    [define if you want to compile support for both authentication and
     privacy support.])
fi

NETSNMP_ARG_ENABLE(md5,
[  --disable-md5                   Do not support MD5 authentication.])
if test "x$enable_md5" = "xno"; then
  AC_DEFINE([NETSNMP_DISABLE_MD5], 1, 
            [Define if MD5 authentication should not be supported])
fi

NETSNMP_ARG_ENABLE(internal-md5,
[  --enable-internal-md5           Use the internal MD5 support.])
if test "x$enable_internal_md5" = "xyes"; then
  if test "x$enable_md5" = "xno"; then
    AC_MSG_ERROR(You can not specify both --enable-internal-md5 and --disable-md5)
  else
    AC_DEFINE(NETSNMP_USE_INTERNAL_MD5, 1,
      [define if you are using the MD5 code ...])
  fi
fi

NETSNMP_ARG_ENABLE(blumenthal-aes,
[  --enable-blumenthal-aes         Enable AES-192/AES-256 (Blumenthal draft)])
if test "x$enable_blumenthal_aes" = "xyes"; then
    if test "x$aes_capable" = "xyes"; then
        AC_DEFINE([NETSNMP_DRAFT_BLUMENTHAL_AES_04], 1,
            [Define if AES-192/AES-256 encryption should be supported])
    else
        AC_MSG_ERROR([Blumenthal draft requires OpenSSL with AES functions enabled])
    fi
fi


##
#   Project: Library: Misc configuration
##

NETSNMP_ARG_WITH(opaque-special-types,
[  --without-opaque-special-types  Don't use special opaque encodings.
                                  SNMP normally cannot handle
                                  floating numbers, nor large 64 bit
                                  integers well.  By default, the
                                  net-snmp package compiles in
                                  support for these extra datatypes
                                  (in a legal way)])
# Only define if specifically chosen as --without (i.e., default to true).
if test "x$with_opaque_special_types" != "xno"; then
  AC_DEFINE(NETSNMP_WITH_OPAQUE_SPECIAL_TYPES, 1,
    [Should we compile to use special opaque types: float, double, counter64,
     i64, ui64, union?])
fi

NETSNMP_ARG_ENABLE(ipv6,
[  --disable-ipv6                  Disable IPv6 support.],
    [],dnl default to "yes"
    [enable_ipv6="yes"])
if test "x$enable_ipv6" != "xno"; then
  AC_DEFINE(NETSNMP_ENABLE_IPV6, 1,
      [define if you want to enable IPv6 support])
fi

NETSNMP_ARG_WITH(logfile,
[  --with-logfile="location"       Default log file location for snmpd.],
    ac_cv_user_prompt_NETSNMP_LOGFILE="$with_logfile")
if test "$ac_cv_user_prompt_NETSNMP_LOGFILE" = "no"; then
    ac_cv_user_prompt_NETSNMP_LOGFILE="none"
fi

NETSNMP_ARG_ENABLE(usmUser-uses-default-auth-priv,
[  --enable-usmUser-uses-default-auth-priv Use default auth/priv protocols; createUser
                                          only needs auth/priv passphrases.],
    [if test "x$enable_usmUser_uses_default_auth_priv" = "xyes"; then
      AC_DEFINE(NETSNMP_FORCE_SYSTEM_V3_AUTHPRIV, 1,
        [if defined always use default auth/priv protocol when creating usmUsers])
    fi])

NETSNMP_ARG_ENABLE(daemons-syslog-as-default,
[  --enable-daemons-syslog-as-default Use syslog when no other log destination defined.],
    [if test "x$enable_daemons_syslog_as_default" = "xyes"; then
      AC_DEFINE(NETSNMP_DAEMONS_DEFAULT_LOG_SYSLOG, 1,
        [if defined daemons will use syslog when no log destination is defined])
    fi])

NETSNMP_ARG_WITH(persistent-directory,
[  --with-persistent-directory="directory"
                                  Default directory for persistent data storage.],ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY="$with_persistent_directory")

NETSNMP_ARG_WITH(persistent-mask,
[  --with-persistent-mask="mask"  Default mask for persistent data storage.
                                  (Default: 077)],
  [if test [`expr "X$withval" : 'X[0-7]*$'`] -eq 4 ; then
     AC_MSG_RESULT([using persistent mask $withval])
     withval="0$withval"
   else
     AC_MSG_ERROR([Please provide a three digit octal persistent mask value])
   fi],
  [withval=077
   AC_MSG_RESULT([using default persistent mask $withval])])
AC_DEFINE_UNQUOTED(NETSNMP_PERSISTENT_MASK,$withval,
   [umask permissions to set up persistent files with])

NETSNMP_ARG_WITH(copy_persistent_files,
[  --with-copy-persistent-files="no" Don't copy persistent files
                                     (or use "yes" to copy them).
                                     (Default: yes)],
    ac_cv_user_prompt_COPY_PERSISTENT_FILES="$with_copy_persistent_files")

default_temp_file_pattern="/tmp/snmpdXXXXXX"
NETSNMP_ARG_WITH(temp-file-pattern,
[  --with-temp-file-pattern=PATTERN  Pattern of temporary files (Default: /tmp/snmpdXXXXXX)],
  [if test `expr "X$withval" : ".*XXXXXX$"` -ne 0 ; then
     AC_MSG_RESULT(using temporary file pattern $withval)
   else
     AC_MSG_ERROR([temporary file pattens must end with 6 X's])
   fi],
  [withval="$default_temp_file_pattern"
   AC_MSG_RESULT(using default temporary file pattern $withval)])
AC_DEFINE_UNQUOTED(NETSNMP_TEMP_FILE_PATTERN,"$withval",
  [Pattern of temporary files])


##
#   Project: Library: Version configuration
##

SNMP_VERSIONS=""
NETSNMP_ARG_ENABLE(snmpv1,
[  --disable-snmpv1                Do not include code that implements SNMPv1.])
if test "x$enable_snmpv1" = "xno"; then
  AC_DEFINE([NETSNMP_DISABLE_SNMPV1], 1, 
            [Define if SNMPv1 code should not be included])
else
  SNMP_VERSIONS="$SNMP_VERSIONS 1"
fi

NETSNMP_ARG_ENABLE(snmpv2c,
[  --disable-snmpv2c               Do not include code that implements SNMPv2c.])
if test "x$enable_snmpv2c" = "xno"; then
  AC_DEFINE([NETSNMP_DISABLE_SNMPV2C], 1, 
            [Define if SNMPv2c code should not be included])
else
  SNMP_VERSIONS="$SNMP_VERSIONS 2c"
fi

SNMP_VERSIONS="$SNMP_VERSIONS 3"
AC_MSG_CACHE_ADD(SNMP Versions Supported:   $SNMP_VERSIONS)

NETSNMP_ARG_WITH(default-snmp-version,
[  --with-default-snmp-version="3" Default version of SNMP to use.
                                    (Default: 3)
                                    Legal values: 1, 2 (for SNMPv2c) or 3.],
    ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION="$with_default_snmp_version")

# we test this now and later as well.  we test it now so configure can die
# early on with an error rather than waiting till the end of the script.
case "${ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION-3}" in
  [[123]]) ;;
  2c) ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION=2 ;;
  *)
    AC_MSG_ERROR([Illegal version number.  Only 1, 2 (for SNMPv2c) and 3 are supported.])
    ;;
esac


##
#   Project: Library: Transport modules
##

AC_ARG_WITH(transports,
[  --with-transports="t1 t2 ..."   Compile in the given SNMP transport
                                    modules (space or comma separated list).])
AC_ARG_WITH(out_transports,
[  --with-out-transports="t1 ..."  Exclude listed SNMP transports
                                    (space or comma separated list).

  Available SNMP transport modules are:

    UDP         support for SNMP over UDP/IP.
                This transport is always compiled in.
    UDPIPv6     support for SNMP over UDP/IPv6.
                This transport is available for Linux, Solaris and
                FreeBSD at least.
                This transport is compiled in by default if IPv6 support is enabled.
    UDPshared   Allows a UDP port to be shared with multiple transports. It
                enables multiple notification destinations to share a single
                source address/port.
    TCPIPv6     support for SNMP over UDP/IPv6.
                This transport is available for Linux, Solaris and
                FreeBSD at least.
                This transport is compiled in by default if IPv6 support is enabled.
    TCP         support for SNMP over TCP/IP.
                This transport is compiled in by default, but may be omitted.
    Unix        support for SNMP over Unix domain protocols.
                This transport is compiled in by default except on Win32
                platforms, and may be omitted.
    Callback    support for SNMP over an internal locally connected pair
                of snmp_sessions.
    Alias       The alias transport simply lets you define more complex
                transport strings and alias them to simple names in
                the snmp.conf file.
    AAL5PVC     support for SNMP over AAL5 PVCs.
                This transport is presently only available for Linux,
                is never compiled in by default and may be omitted.
    IPX         support for SNMP over IPX per RFC 1420.
                This transport is presently only available for Linux,
                is never compiled in by default and may be omitted.
    DTLSUDP     support for tunneling SNMP over DTLS/UDP
    TLSTCP      support for tunneling SNMP over TLS/TCP
    SSH         (alpha) support for tunneling SNMP over SSH
])

#
# Catch common mistakes in transport options
#
AC_ARG_WITH(transport,, NETSNMP_INVALID_WITH([transports]))
AC_ARG_WITH(out-transport,, NETSNMP_INVALID_WITH([out-transports]))


##
#   Project: Library: Security modules
##

NETSNMP_ARG_WITH(security-modules,
[  --with-security-modules="s1 s2 ..."   Compile in the given SNMP security
                                    module services (space separated list).

  Available SNMP security services:

        usm                support for user based SNMP security
        ksm                support for kerberos based SNMP security
        tsm                support for the Transport-based security
                           (for use with the SSH, DTLSUDP and TLSTCP transports)
])

NETSNMP_ARG_WITH(out-security-modules,
[  --with-out-security-modules="s1 s2 ..."   Removes the given SNMP security
                                    module services from the default list.
])


##
#   Project: Library: Developer-related settings
##

NETSNMP_ARG_ENABLE(debugging,
[  --enable-debugging              Outputs extra debugging information at all
                                  times.  Normally, you should not enable this,
                                  but instead use the -D flag of the commands,
                                  which toggles debuging output at runtime.
  --disable-debugging             Disallows debugging code to be built in.
                                  This might provide some speed benefits.],
    AC_DEFINE(NETSNMP_ALWAYS_DEBUG))
if test "x$enable_debugging" = "xno"; then
    AC_DEFINE(NETSNMP_NO_DEBUGGING)
fi

NETSNMP_ARG_ENABLE(developer,
[  --enable-developer              Turns on super-duper-extra-compile-warnings
                                  when using gcc.],
  [if test "$enableval" = yes ; then
     developer="yes"
   elif test "$enableval" != no ; then
     AC_MSG_ERROR([Please use --enable/--disable-developer])
   else
     developer="no"
   fi])

NETSNMP_ARG_ENABLE(testing-code,
[  --enable-testing-code           Enables some code sections that should 
                                  only be used for testing of certain
                                  SNMP functionalities.  This should *not* 
                                  be turned on for production use.  Ever.],
  [if test "$enableval" = yes ; then
     AC_DEFINE(NETSNMP_ENABLE_TESTING_CODE, 1, [testing code sections.])
   elif test "$enableval" != no ; then
     AC_MSG_ERROR([Please use --enable/--disable-testing-code])
   fi])

NETSNMP_ARG_ENABLE(reentrant,
[  --enable-reentrant              Enables locking functions that protect
                                  library resources in some multi-threading
                                  environments.  This does not guarantee
                                  thread-safe operation.
                                  Currently an experimental setting.],
  [if test "$enableval" = yes -o "$enableval" = no ; then
     with_res_locks="$enableval"
   else
     AC_MSG_ERROR([Please use --enable/--disable-reentrant])
   fi],
  [with_res_locks="no"])

NETSNMP_ARG_ENABLE(deprecated,
[  --disable-deprecated            Don't compile in deprecated functions.])
if test "$enable_deprecated" = no ; then
   AC_DEFINE([NETSNMP_NO_DEPRECATED_FUNCTIONS], 1,
             [Define to suppress inclusion of deprecated functions])
fi



##
#   Project: Agent configuration settings
##

NETSNMP_ARG_WITH(root-access,
[
Configuring the agent:
  --without-root-access           The snmpd agent won't require root access to
                                  run it.  The information it returns in the
                                  mib-II tree may not be correct, however.])
# Only define if specifically chosen as --without (i.e., default to true).
if test "x$with_root_access" = "xno"; then
  AC_DEFINE(NETSNMP_NO_ROOT_ACCESS, 1,
    [If you don't have root access don't exit upon kmem errors])
fi

NETSNMP_ARG_WITH(kmem-usage,
[  --without-kmem-usage            Do not include any code related to the use
                                  of kmem.])
# Only define if specifically chosen as --without (i.e., default to true).
if test "x$with_kmem_usage" = "xno"; then
  AC_DEFINE(NETSNMP_NO_KMEM_USAGE, 1, [If we don't want to use kmem.])
fi

NETSNMP_ARG_WITH(dummy-values,
[  --with-dummy-values             Provide 'placeholder' dummy values where
                                  the necessary information is not available.
                                  This is technically not compliant with the
                                  SNMP specifications, but was how the agent
                                  operated for versions < 4.0.])
# Define unless specifically suppressed (i.e., option defaults to false).
if test "x$with_dummy_values" != "xyes"; then
  AC_DEFINE(NETSNMP_NO_DUMMY_VALUES, 1,
    [If you don't want the agent to report on variables it doesn't have
     data for])
fi

NETSNMP_ARG_WITH(systemd,
[  --with-systemd                 Provide systemd support. See README.systemd
                                  for details.])
# Define unless specifically suppressed (i.e., option defaults to false).
if test "x$with_systemd" != "xyes"; then
  AC_DEFINE(NETSNMP_NO_SYSTEMD, 1,
    [If you don't want to integrate with systemd.])
fi

NETSNMP_ARG_ENABLE(set-support,
[  --disable-set-support           Do not allow SNMP set requests.])
if test "x$enable_set_support" = "xno"; then
  AC_DEFINE([NETSNMP_DISABLE_SET_SUPPORT], 1, 
            [Define if SNMP SET support should be disabled])
fi


NETSNMP_ARG_WITH(sys_contact,
[  --with-sys-contact="who@where"  Default system contact.
                                    (Default: LOGIN@DOMAINNAME)],
    ac_cv_user_prompt_NETSNMP_SYS_CONTACT="$with_sys_contact")

NETSNMP_ARG_WITH(sys_location,
[  --with-sys-location="location"  Default system location.
                                    (Default: Unknown)],
    ac_cv_user_prompt_NETSNMP_SYS_LOC="$with_sys_location")



##
#   Project: Agent: Extensibility configuration
##

NETSNMP_ARG_ENABLE(local-smux,
[  --enable-local-smux             Restrict SMUX connections to localhost (by default).],
    [if test "x$enable_local_smux" = "xyes"; then
      AC_DEFINE(NETSNMP_ENABLE_LOCAL_SMUX, 1,
          [define if you want to restrict SMUX connections to localhost
           by default])
    fi])

NETSNMP_ARG_ENABLE(agentx-dom-sock-only,
[  --enable-agentx-dom-sock-only   Disable UDP/TCP transports for agentx.],
AC_DEFINE(NETSNMP_AGENTX_DOM_SOCK_ONLY, 1,
    [define if agentx transport is to use domain sockets only]))

NETSNMP_ARG_ENABLE(snmptrapd-subagent,
[  --disable-snmptrapd-subagent    Disable agentx subagent code in snmptrapd.])
if test "x$enable_snmptrapd_subagent" = "xno"; then
  AC_DEFINE(NETSNMP_SNMPTRAPD_DISABLE_AGENTX, 1,
    [define if you do not want snmptrapd to register as an AgentX subagent])
fi

default_agentx_socket="/var/agentx/master"
NETSNMP_ARG_WITH(agentx-socket,
[  --with-agentx-socket=FILE         AgentX socket (Default: /var/agentx/master as specified in RFC2741)],[
  if test "$withval" = yes; then
    AC_MSG_ERROR([ Please provide a full path ]);
  fi
  AC_MSG_RESULT(using AgentX socket $withval)
],[
  withval=$default_agentx_socket
  AC_MSG_RESULT(using default AgentX socket $default_agentx_socket)
])
AC_DEFINE_UNQUOTED(NETSNMP_AGENTX_SOCKET,"$withval",
        [Unix domain socket for AgentX master-subagent communication])

#
# feature addition/removal and minimialist support
#
FEATURE_ADD_FLAGS=""
NETSNMP_ARG_WITH(features,
[  --with-features="feat1 feat2"   Request extra features to be turned on.
                                   (only useful with --enable-minimalist)],[
  if test "$withval" = yes; then
    AC_MSG_ERROR([ Please provide a list of features ]);
  fi
  FEATURE_ADD_FLAGS="--add $withval"
  AC_MSG_RESULT(adding in features: $withval)
])
AC_SUBST(FEATURE_ADD_FLAGS)


FEATURE_REMOVE_FLAGS=""
NETSNMP_ARG_WITH(out-features,
[  --with-out-features="feat1..."  Remove specific features.
                                   (implies --enable-minimalist)],[
  if test "$withval" = yes; then
    AC_MSG_ERROR([ Please provide a list of features ]);
  fi
  FEATURE_REMOVE_FLAGS="--remove $withval"
  FEATURETARGS="features"
  AC_DEFINE(NETSNMP_MINIMAL_CODE, 1,
    [Define if you want to remove all non-essential code features.])
  AC_MSG_RESULT(removing features: $withval)
])
AC_SUBST(FEATURE_REMOVE_FLAGS)


# Catch common mistakes
AC_ARG_WITH(feature,, NETSNMP_INVALID_WITH([features]))
AC_ARG_WITH(out-feature,, NETSNMP_INVALID_WITH([out-features]))

FEATURETARGS=""
NETSNMP_ARG_ENABLE(minimalist,
[  --enable-minimalist             Remove all non-essential code features.])
if test "x$enable_minimalist" = "xyes"; then
   # we'll assume the mini agent is desired here as well
   mini_agent="yes"
   FEATURETARGS="features"

   # needed to bootstrap later checks
   echo "" > include/net-snmp/feature-details.h
   AC_DEFINE(NETSNMP_MINIMAL_CODE, 1,
     [Define if you want to remove all non-essential code features.])
else
   FEATUREHEADERS=""
fi
AC_ARG_WITH([minimalist],,NETSNMP_INVALID_ENABLE([minimalist]))
AC_SUBST(FEATURETARGS)
AC_SUBST(FEATUREHEADERS)

NETSNMP_ARG_ENABLE(notify-only,
[  --enable-notify-only            Build tools that can only send notifications.])
if test "x$enable_notify_only" = "xyes"; then
   AC_DEFINE(NETSNMP_NOTIFY_ONLY, 1,
     [Define if you want to only support sending notifications])
fi
AC_ARG_WITH([notify-only],,NETSNMP_INVALID_ENABLE([notify-only]))
AC_ARG_ENABLE([notifyonly],,NETSNMP_INVALID_ENABLE([notify-only]))

NETSNMP_ARG_ENABLE(no-listen,
[  --enable-no-listen              Build tools that can't listen to ports.])
if test "x$enable_no_listen" = "xyes" -o "x$enable_notify_only" = "xyes"; then
   enable_no_listen="yes"
   AC_DEFINE(NETSNMP_NO_LISTEN_SUPPORT, 1,
     [Define if you want to remove all listening support from the code])
fi
AC_ARG_WITH([no-listen],,NETSNMP_INVALID_ENABLE([no-listen]))
AC_ARG_ENABLE([nolisten],,NETSNMP_INVALID_ENABLE([no-listen]))

NETSNMP_ARG_ENABLE(read-only,
[  --enable-read-only              Remove all SET support from the code.])
if test "x$enable_read_only" = "xyes" -o "x$enable_notify_only" = "xyes" ; then
   enable_read_only="yes"
   AC_DEFINE(NETSNMP_NO_WRITE_SUPPORT, 1,
     [Define if you want to remove all SET/write access from the code])
fi
AC_ARG_WITH([read-only],,NETSNMP_INVALID_ENABLE([read-only]))
AC_ARG_ENABLE([readonly],,NETSNMP_INVALID_ENABLE([read-only]))


##
#   Project: Agent: MIB module configuration
##

NETSNMP_ARG_ENABLE(mini_agent,
[  --enable-mini-agent             Build a minimal agent.])
if test "x$enable_mini_agent" = "xyes"; then
    mini_agent="yes"
else
    mini_agent="no"
fi
AC_ARG_WITH([miniagent],,NETSNMP_INVALID_ENABLE([mini-agent]))
AC_ARG_ENABLE([miniagent],,NETSNMP_INVALID_ENABLE([mini-agent]))




NETSNMP_ARG_ENABLE(mfd-rewrites,
[  --enable-mfd-rewrites           Use new MFD rewrites of mib modules,
                                  where available. (default is to use
                                  original mib module code).])
if test "x$enable_mfd_rewrites" = "xyes"; then
   AC_DEFINE(NETSNMP_ENABLE_MFD_REWRITES, 1,
     [Define if you want to build MFD module rewrites])
fi


NETSNMP_ARG_WITH(mib_modules,
[  --with-mib-modules="item1 ..."  Compile with additional mib modules
                                    (Space separated list).])

NETSNMP_ARG_WITH(out_mib_modules,
[  --with-out-mib-modules="list"   Compile without these mib modules.

  Default mib modules compiled into the agent (which can be removed):
  
    mibII                  support for the mib-II tree.
    snmpv3mibs             support for the snmpv3 mib modules.
    ucd_snmp               UCD-SNMP-MIB specific extensions.
    agent_mibs             NET-SNMP-AGENT-MIB extensions
    agentx                 AgentX support (see below)
    notification           mibs supporting specification of trap destinations.
    target                 Support for the SNMP WGs TARGET-MIB.
    utilities              general agent configuration utilities.
    disman/event           support for the DISMAN-EVENT-MIB
                             (supports self monitoring and notification 
                              delivery when error conditions are found)
    disman/schedule        support for the DISMAN-SCHEDULE-MIB
                             (trigger SET requests at specified times)
    host                   host resources mib support.
                             (only on major supported platforms)

  Optional mib modules that can be built into the agent include:
    smux                   smux support to allow subagents to attach to snmpd.
    mibII/mta_sendmail     Sendmail statistics monitoring (MTA-MIB)
    ucd-snmp/diskio        Table of io-devices and how much data they have
                           read/written.  (only tested on Solaris, Linux)
    disman/old-event-mib   previous implementation of the DISMAN-EVENT-MIB

  Optional modules for specific platforms
    Linux
      ucd-snmp/lmSensors   hardware monitoring (LM-SENSORS-MIB)
      ip-mib/ipv4InterfaceTable  (experimental)
      ip-mib/ipv6InterfaceTable  (experimental)
      tunnel               Linux TUNNEL-MIB support (ifTable extension)
      mibII/interfaces     (old ifTable implementation)
      misc/ipfwacc         accounting rules IP firewall information
      ipfwchains/ipfwchains  firewall chains under ipfw
                             (See agent/mibgroup/ipfwchains/README)
      sctp-mib             support for the SCTP-MIB
      etherlike-mib        support for the EtherLike-MIB

    Solaris
      ucd-snmp/lmSensors   hardware monitoring (LM-SENSORS-MIB)
      if-mib               IF-MIB rewrite (add --enable-mfd-rewrites)
      tcp-mib              TCP-MIB rewrite (tcpConnectionTable and
                             tcpListenerTable; add --enable-mfd-rewrites)
      udp-mib              UDP-MIB rewrite (udpEndpointTable;
                             add --enable-mfd-rewrites)

    FreeBSD/OpenBSD
      if-mib               IF-MIB rewrite (add --enable-mfd-rewrites)

  AgentX support:
    agentx/subagent        allows the agent to run as either a snmp agent
                           or as an agentX sub-agent.
    agentx/master          makes the agent run as an agentX master agent
                           as well as a normal snmp agent.
    agentx                 includes both agentx/master and agentx/client.

  Optional modules for C coders to look at and/or include as extension examples:
  
    examples/ucdDemoPublic  SNMPv3 interoperability testing mib.
    examples/example        example C code extension.])


#
# Catch common mistakes in configure options
#
AC_ARG_WITH(mib-module,, NETSNMP_INVALID_WITH([mib-modules]))
AC_ARG_WITH(module,, NETSNMP_INVALID_WITH([mib-modules]))
AC_ARG_WITH(modules,, NETSNMP_INVALID_WITH([mib-modules]))

AC_ARG_WITH(out-mib-module,, NETSNMP_INVALID_WITH([out-mib-modules]))
AC_ARG_WITH(out-module,, NETSNMP_INVALID_WITH([out-mib-modules]))
AC_ARG_WITH(out-modules,, NETSNMP_INVALID_WITH([out-mib-modules]))


##
#   Project: Enterprise settings	(? Agent/Library/Both?)
##

NETSNMP_ARG_WITH(enterprise-oid,
[Enterprise OIDs:  (warning: this should be used with caution.)

  --with-enterprise-oid              The enterprise number assigned to the
                                     vendor by IANA.  See
                                     http://www.iana.org/cgi-bin/enterprise.pl
                                     to get one, though using the default is
                                     probably the right choice is most cases.
                                     (default 8072 = "enterprise.net-snmp")],[
  if test "$withval" = yes; then
    AC_MSG_ERROR([ Please provide a value for the enterprise number ]);
  fi
  AC_DEFINE_UNQUOTED(NETSNMP_ENTERPRISE_OID, $withval)
  ent_oid="1,3,6,1,4,1,$withval"
  AC_DEFINE_UNQUOTED(NETSNMP_ENTERPRISE_MIB, $ent_oid)
  ent_dot_oid="1.3.6.1.4.1.$withval"
  AC_DEFINE_UNQUOTED(NETSNMP_ENTERPRISE_DOT_MIB, $ent_dot_oid)
  AC_MSG_RESULT(using enterprise number $withval)
],[
  AC_MSG_RESULT(using default "enterprise.net-snmp")
])

NETSNMP_ARG_WITH(enterprise-sysoid,
[
  --with-enterprise-sysoid           The base OID for the sysObjectID
                                     of the system group
                                     (default .1.3.6.1.4.1.8072.3.2... = 
                                      "netSnmpAgentOIDs...")],[
  if test "$withval" = yes; then
    AC_MSG_ERROR([ Please provide a base OID value ]);
  fi
  sys_oid=`echo "$withval" | sed 's/^\.//' | sed 's/\./\,/g'`
  AC_DEFINE_UNQUOTED(NETSNMP_SYSTEM_MIB, $sys_oid)
  sys_dot_oid=`echo "$withval" | sed 's/^\.//'`
  AC_DEFINE_UNQUOTED(NETSNMP_SYSTEM_DOT_MIB, $sys_dot_oid)
  sysoid_len=`echo "$withval" | sed 's/[^\.]//g' | awk -F\. '{ print NF }'`
  AC_DEFINE_UNQUOTED(NETSNMP_SYSTEM_DOT_MIB_LENGTH, $sysoid_len)
  AC_MSG_RESULT(using enterprise sysOID $withval ....)
],[
  AC_MSG_RESULT(using default enterprise sysOID "NET-SNMP-MIB::netSnmpAgentOIDs...")
])

NETSNMP_ARG_WITH(enterprise-notification-oid,
[
  --with-enterprise-notification-oid The OID used for the root of
				     enterprise specific notifications.
                                     (default .1.3.6.1.4.1.8072.4 = 
                                      "netSnmpNotificationPrefix")],[
  if test "$withval" = yes; then
    AC_MSG_ERROR([ Please provide a base OID value ]);
  fi
  notification_oid=`echo "$withval" | sed 's/^\.//' | sed 's/\./\,/g'`
  AC_DEFINE_UNQUOTED(NETSNMP_NOTIFICATION_MIB, $notification_oid)
  notification_dot_oid=`echo "$withval" | sed 's/^\.//'`
  AC_DEFINE_UNQUOTED(NETSNMP_NOTIFICATION_DOT_MIB, $notification_dot_oid)
  notificationoid_len=`echo "$withval" | sed 's/[^\.]//g' | awk -F\. '{ print NF }'`
  AC_DEFINE_UNQUOTED(NETSNMP_NOTIFICATION_DOT_MIB_LENGTH, $notificationoid_len)
  AC_MSG_RESULT(using enterprise notifications $withval)
],[
  AC_MSG_RESULT(using default notifications "NET-SNMP-MIB::netSnmpNotifications")
])


##
#   Project: Perl settings
##

NETSNMP_ARG_WITH(perl-modules,
[
Perl:
  --with-perl-modules[=ARGS]      Install the Perl modules along with the rest
                                  of the net-snmp toolkit. If ARGS is specified,
                                  they're passed to the Makefile.PL script. Use
                                  --with-perl-modules=verbose while debugging
                                  the Makefile.PL files],[
    if test "$withval" = "no"; then
      install_perl="no"
    else
      install_perl="yes"
      if test "$withval" != "yes"; then
        PERLARGS="$withval"
      fi
    fi
], install_perl="try")

NETSNMP_ARG_ENABLE(embedded-perl,
[  --disable-embedded-perl         Disable embedded Perl in the SNMP agent and
                                  snmptrapd. [enabled by default]],
    embed_perl="$enableval", embed_perl="try")

NETSNMP_ARG_ENABLE(perl-cc-checks,
[  --disable-perl-cc-checks        Disable configure checks for whether Perl's
                                  C Compiler is compatible with ours when
                                  embedded Perl is enabled.])


##
#   Project: Python settings
##

AC_ARG_WITH(python-modules,
[
Python:
  --with-python-modules[=ARGS]    Install the python bindings along with the
                                  rest of the net-snmp toolkit.  If ARGS is
                                  specified, they're passed to the
                                  setup.py script as arguments.],[
    install_python="yes"
    if test "$withval" = "yes"; then
      PYTHONARGS=""
    elif test "$withval" = "no"; then
      PYTHONARGS=""
      install_python="no"
    else
      PYTHONARGS="$withval"
    fi
], install_python="no")


##
#   Project: Library settings
##

NETSNMP_ARG_WITH(server-send-buf,
[
Network Buffers:
  --with-server-send-buf[=ARG]    Use ARG for the default UDP/TCP send buffer instead
                                  of the OS buffer for server sockets that are
                                  created (snmpd, snmptrapd).  
                                  This default can be overridden in the runtime 
                                  configuration files.
                                  The ARG should be the size in bytes],[
   if test "$withval" = yes; then
    AC_MSG_ERROR([ Please provide a positive number for the server send buffer ])
   fi
   AC_DEFINE_UNQUOTED(NETSNMP_DEFAULT_SERVER_SEND_BUF, $withval)],
   AC_MSG_RESULT([using OS default send buffer size for server sockets]) )

NETSNMP_ARG_WITH(server-recv-buf,
[  --with-server-recv-buf[=ARG]    Similar as previous option, but for receive buffer],[
  if test "$withval" = yes; then
    AC_MSG_ERROR([ Please provide a positive number for the server recv buffer ])
  fi
  AC_DEFINE_UNQUOTED(NETSNMP_DEFAULT_SERVER_RECV_BUF, $withval)],
  AC_MSG_RESULT([using OS default recv buffer size for server sockets]) )

NETSNMP_ARG_WITH(client-send-buf,
[  --with-client-send-buf[=ARG]    Similar as previous options, but for the
                                  receive buffer of client sockets],[
  if test "$withval" = yes; then
    AC_MSG_ERROR([ Please provide a positive number for the client send buffer ])
  fi
  AC_DEFINE_UNQUOTED(NETSNMP_DEFAULT_CLIENT_SEND_BUF, $withval)],
  AC_MSG_RESULT([using OS default send buffer size for client sockets]) )

NETSNMP_ARG_WITH(client-recv-buf,
[  --with-client-recv-buf[=ARG]    Similar as previous options, but for the send buffer],[
  if test "$withval" = yes; then
    AC_MSG_ERROR([ Please provide a positive number for the client recv buffer ])
  fi
  AC_DEFINE_UNQUOTED(NETSNMP_DEFAULT_CLIENT_RECV_BUF, $withval)],
  AC_MSG_RESULT([using OS default recv buffer size for client sockets]) )

##
#   System: library settings  (more)
##

NETSNMP_ARG_WITH(elf,
  [AS_HELP_STRING([--without-elf],[use elf libraries])])

NETSNMP_ARG_WITH(nl,
  [AS_HELP_STRING([--with-nl],[use libnl to get netlink data (linux only).])])

NETSNMP_ARG_WITH(libwrap,
  [  --with-libwrap[=LIBPATH]  Compile in libwrap (tcp_wrappers) support.],
  [],
  [with_libwrap="no"])

NETSNMP_ARG_WITH(zlib,
  [  --with-zlib[=DIR]         use libz in DIR],
  [],
  [with_zlib="no"])

AC_ARG_WITH(bzip2,
  [  --with-bzip2[=DIR]        use libbz2 in DIR],
  [],
  [with_bzip2="no"])

NETSNMP_ARG_WITH(
 [mnttab],
 AS_HELP_STRING(
   [--with-mnttab="/etc/mnttab"],
   [Mount table location. The default is to autodetect this.]))

##
#   Project: mysql
##

NETSNMP_ARG_WITH(mysql,
  [  --with-mysql            Include support for MySQL.])
if test "x$with_mysql" = "xyes"; then
  AC_DEFINE(NETSNMP_USE_MYSQL, 1,
    [define if you are using the mysql code for snmptrapd ...])
fi