1 --- net-snmp-5.0.7/configure.in.wiget Fri Jan 10 23:38:31 2003
2 +++ net-snmp-5.0.7/configure.in Wed Feb 12 14:24:36 2003
5 dnl save the configure arguments
7 -AC_DEFINE_UNQUOTED(CONFIGURE_OPTIONS,"\"$ac_configure_args\"")
8 -CONFIGURE_OPTIONS="\"$ac_configure_args\""
9 +AC_DEFINE_UNQUOTED(CONFIGURE_OPTIONS,"$ac_configure_args")
10 +CONFIGURE_OPTIONS="$ac_configure_args"
11 AC_SUBST(CONFIGURE_OPTIONS)
15 dnl get version number.
16 AC_MSG_CHECKING(for net-snmp version number)
17 VERSION=`grep NetSnmpVersionInfo.*= $srcdir/snmplib/snmp_version.c | sed 's/";.*//;s/.*"//;s/pre/0./;'`
19 -RELEASEVERSION=`echo $VERSION | sed 's/^\([0-9]\)\.\([0-9]\)/\1:\2:0/'`
21 +RELEASEVERSION=`echo $VERSION | sed ['s/^\([0-9]\)\.\([0-9]\)/\1:\2:0/']`
23 AC_SUBST(RELEASEVERSION)
24 AC_MSG_RESULT($VERSION)
30 -PARTIALTARGETOS=`echo $target_os | sed 's/[-._].*//'`
31 +PARTIALTARGETOS=`echo $target_os | sed ['s/[-._].*//']`
32 CFLAGS="$CFLAGS -D$PARTIALTARGETOS"
34 AC_MSG_CACHE_ADD(Building for: $PARTIALTARGETOS)
40 AC_MSG_CHECKING(for system include file)
43 dnl ignore binary format indication
44 filebase=`echo $filebase | sed 's/elf//'`
46 while test "x$filebase" != "x$last" -a ! -f $srcdir/include/net-snmp/system/$filebase.h
49 - filebase=`echo $filebase | sed 's/[-._][^-._]*$//'`
50 + filebase=`echo $filebase | sed ['s/[-._][^-._]*$//']`
51 if test "x$filebase" = "x$last"; then
52 - filebase=`echo $filebase | sed 's/[0-9]*$//'`
53 + filebase=`echo $filebase | sed ['s/[0-9]*$//']`
59 ac_cv_SYSTEM_INCLUDE_FILE="net-snmp/system/$filebase.h"
62 AC_MSG_RESULT($ac_cv_SYSTEM_INCLUDE_FILE)
63 AC_DEFINE_UNQUOTED(SYSTEM_INCLUDE_FILE, "$ac_cv_SYSTEM_INCLUDE_FILE")
65 dnl second part, the CPU type.
67 AC_MSG_CHECKING(for machine-type include file)
70 while test "x$filebase" != "x$last" -a ! -f $srcdir/include/net-snmp/machine/$filebase.h
73 - filebase=`echo $filebase | sed 's/[-._][^-._]*$//'`
74 + filebase=`echo $filebase | sed ['s/[-._][^-._]*$//']`
77 if test "x$filebase" = "x$last"; then
79 ac_cv_MACHINE_INCLUDE_FILE="net-snmp/machine/$filebase.h"
80 AC_MSG_RESULT($ac_cv_MACHINE_INCLUDE_FILE)
83 AC_DEFINE_UNQUOTED(MACHINE_INCLUDE_FILE, "$ac_cv_MACHINE_INCLUDE_FILE")
85 AC_PATH_PROG(CCPATH,$CC)
87 for i in v6d toshiba kame inria zeta linux-glibc linux-inet6; do
90 - AC_EGREP_CPP(yes, [dnl
92 #include </usr/local/v6/include/sys/types.h>
96 CFLAGS="-I/usr/local/v6/include $CFLAGS"])
99 - AC_EGREP_CPP(yes, [dnl
100 + AC_EGREP_CPP(yes, [
101 #include <sys/param.h>
102 #ifdef _TOSHIBA_INET6
105 CFLAGS="-DINET6 $CFLAGS"])
108 - AC_EGREP_CPP(yes, [dnl
109 + AC_EGREP_CPP(yes, [
110 #include <netinet/in.h>
114 CFLAGS="-DINET6 $CFLAGS"])
117 - AC_EGREP_CPP(yes, [dnl
118 + AC_EGREP_CPP(yes, [
119 #include <netinet/in.h>
120 #ifdef IPV6_INRIA_VERSION
123 CFLAGS="-DINET6 $CFLAGS"])
126 - AC_EGREP_CPP(yes, [dnl
127 + AC_EGREP_CPP(yes, [
128 #include <sys/param.h>
129 #ifdef _ZETA_MINAMI_INET6
132 CFLAGS="-DINET6 $CFLAGS"])
135 - AC_EGREP_CPP(yes, [dnl
136 + AC_EGREP_CPP(yes, [
137 #include <features.h>
138 #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC_ > 2))
142 if test "x$with_res_locks" = "xyes"; then
143 AC_DEFINE(NS_REENTRANT)
148 @@ -1049,7 +1040,6 @@
150 dnl Do hairy agent module processing.
153 AC_MSG_CHECKING(for and configuring mib modules to use)
155 mibdir="agent/mibgroup"
156 @@ -1098,9 +1088,7 @@
159 AC_MSG_RESULT($new_module_list.)
161 AC_MSG_CACHE_ADD(Agent MIB code: $new_module_list)
164 AC_MSG_CHECKING(for and configuring mib modules pieces to use)
165 while test "x$new_module_list" != "x"; do
166 @@ -1170,7 +1158,7 @@
169 if test "x`echo $i | sed 's/\///g;'`" != "x$i"; then
170 - mnd=`echo $i | sed 's/\/[^/]*$//;'`
171 + mnd=`echo $i | sed ['s/\/[^/]*$//;']`
172 if test ! -d ./$mibdir/$mnd; then
173 module_directories="$module_directories ./$mibdir/$mnd"
175 @@ -1178,8 +1166,8 @@
176 if grep config_load_mib $srcdir/$mibdir/$i.h > /dev/null 2>&1; then
177 AC_MSG_WARN(mib module "$i" uses the "config_load_mib" directive, which is no longer supported. It probably won't work.)
179 - grep config_parse_dot_conf $srcdir/$mibdir/$i.h | sed 's@.*config_parse_dot_conf(\([^)]*\), *\([^),]*\), *\([^),]*\), *\([^),]*\)).*@register_config_handler("snmpd",\1, \2, \3, \4);@' >> $mibdir/mib_module_dot_conf.h
180 - sym="`echo ${i} | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`"
181 + grep config_parse_dot_conf $srcdir/$mibdir/$i.h | sed ['s@.*config_parse_dot_conf(\([^)]*\), *\([^),]*\), *\([^),]*\), *\([^),]*\)).*@register_config_handler("snmpd",\1, \2, \3, \4);@'] >> $mibdir/mib_module_dot_conf.h
182 + sym="`echo ${i} | sed ['s/[^a-zA-Z0-9_]/_/g'] | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`"
183 echo "/* Define if compiling with the ${i} module files. */" >> include/net-snmp/agent/mib_module_config.h
184 echo "#define USING_${sym}_MODULE 1" >> include/net-snmp/agent/mib_module_config.h
185 echo " " >> include/net-snmp/agent/mib_module_config.h
186 @@ -1189,12 +1177,11 @@
187 new_module_list="$new_list_two"
190 -module_list_o=`echo "$module_list_code " | sed 's/\([^ ]\) /\1.o /g'`
191 -module_list_lo=`echo "$module_list_code " | sed 's/\([^ ]\) /\1.lo /g'`
192 -module_list_c=`echo "$module_list_code " | sed 's/\([^ ]\) /\1.c /g'`
193 -mibgroup_list_o=`echo " $module_list_o " | sed 's@ \([^ ]*\)\.o@ mibgroup/\1.o @g'`
194 -mibgroup_list_lo=`echo " $module_list_lo " | sed 's@ \([^ ]*\)\.lo@ mibgroup/\1.lo @g'`
196 +module_list_o=`echo "$module_list_code " | sed ['s/\([^ ]\) /\1.o /g']`
197 +module_list_lo=`echo "$module_list_code " | sed ['s/\([^ ]\) /\1.lo /g']`
198 +module_list_c=`echo "$module_list_code " | sed ['s/\([^ ]\) /\1.c /g']`
199 +mibgroup_list_o=`echo " $module_list_o " | sed ['s@ \([^ ]*\)\.o@ mibgroup/\1.o @g']`
200 +mibgroup_list_lo=`echo " $module_list_lo " | sed ['s@ \([^ ]*\)\.lo@ mibgroup/\1.lo @g']`
201 MODULE_LIST=$module_list_code
202 AC_SUBST(MODULE_LIST)
203 AC_SUBST(module_list_c)
204 @@ -1352,39 +1339,39 @@
208 - AC_CHECK_HEADER(tcpd.h, ,
209 - AC_MSG_ERROR(Asked to use libwrap but I couldn't find tcpd.h.))
210 + AC_CHECK_HEADER(tcpd.h, ,[
211 + AC_MSG_ERROR(Asked to use libwrap but I couldn't find tcpd.h.)])
214 AC_MSG_CHECKING(for TCP wrappers library -lwrap)
215 AC_TRY_LINK([#include <tcpd.h>
216 int allow_severity = 0;
217 int deny_severity = 0;
218 - ],[hosts_access((void *)0)],
219 + ],[hosts_access((void *)0)],[
222 AC_DEFINE(USE_LIBWRAP)
223 test "$with_libwrap" != no -a "$with_libwrap" != yes && WRAPLIBS="-L$with_libwrap/lib"
224 - WRAPLIBS="$WRAPLIBS -lwrap",
225 + WRAPLIBS="$WRAPLIBS -lwrap"],[
228 dnl Linux RedHat 6.1 won't link libwrap without libnsl
229 - AC_CHECK_FUNC(yp_get_default_domain, ,
230 - AC_CHECK_LIB(nsl, yp_get_default_domain))
231 + AC_CHECK_FUNC(yp_get_default_domain, ,[
232 + AC_CHECK_LIB(nsl, yp_get_default_domain)])
233 AC_MSG_CHECKING(for TCP wrappers library -lwrap linked with -lnsl)
234 AC_TRY_LINK([#include <tcpd.h>
235 int allow_severity = 0;
236 int deny_severity = 0;
237 - ],[hosts_access((void *)0)],
238 + ],[hosts_access((void *)0)],[
241 AC_DEFINE(USE_LIBWRAP)
242 test "$with_libwrap" != no -a "$with_libwrap" != yes && WRAPLIBS="-L$with_libwrap/lib"
243 - WRAPLIBS="$WRAPLIBS -lwrap -lnsl",
244 + WRAPLIBS="$WRAPLIBS -lwrap -lnsl"],[
247 - AC_MSG_ERROR(Asked to use libwrap but I couldn't find it.))
248 - CPPFLAGS=${_cppflags})
249 + AC_MSG_ERROR(Asked to use libwrap but I couldn't find it.)])
250 + CPPFLAGS=${_cppflags}])
254 @@ -1639,17 +1626,15 @@
255 dnl so we do it by hand.
256 AC_MSG_CHECKING(for socklen_t)
257 AC_CACHE_VAL(ac_cv_type_$1,
259 -changequote(<<,>>)dnl
260 -<<socklen_t[^a-zA-Z_0-9]>>dnl
261 -changequote([,]), [#include <sys/types.h>
262 +[AC_EGREP_CPP([socklen_t[^a-zA-Z_0-9]]
263 +, [#include <sys/types.h>
268 #ifdef HAVE_SYS_SOCKET_H
269 #include <sys/socket.h>
270 -#endif], ac_cv_type_socklen_t=yes, ac_cv_type_socklen_t=no)])dnl
271 +#endif], [ac_cv_type_socklen_t=yes], [ac_cv_type_socklen_t=no])])
273 AC_MSG_RESULT($ac_cv_type_socklen_t)
274 if test $ac_cv_type_socklen_t = yes; then
275 @@ -1659,10 +1644,8 @@
276 dnl AIX keeps in_addr_t in /usr/include/netinet/in.h
277 AC_MSG_CHECKING(for in_addr_t)
278 AC_CACHE_VAL(ac_cv_type_$1,
280 -changequote(<<,>>)dnl
281 -<<in_addr_t[^a-zA-Z_0-9]>>dnl
282 -changequote([,]), [#include <sys/types.h>
283 +[AC_EGREP_CPP([in_addr_t[^a-zA-Z_0-9]]
284 +, [#include <sys/types.h>
288 --- ucd-snmp-4.2.4/acconfig.h.orig Thu Feb 7 16:39:26 2002
289 +++ ucd-snmp-4.2.4/acconfig.h Thu Apr 25 21:24:51 2002
293 /* debugging stuff */
294 -#undef SNMP_NO_DEBUGGING /* if defined, we optimize the code
295 +#undef SNMP_NO_DEBUGGING
296 + /* if defined, we optimize the code
297 to exclude all debugging calls. */
298 -#define SNMP_ALWAYS_DEBUG 0 /* Always print debugging information and
299 +#define SNMP_ALWAYS_DEBUG 0
300 + /* Always print debugging information and
301 ignore the -D flag passed to the cmds */
303 /* reverse encoding BER packets is both faster and more efficient in space. */