]> git.pld-linux.org Git - packages/net-snmp.git/blob - net-snmp-acfix.patch
- like for ucd-snmp
[packages/net-snmp.git] / net-snmp-acfix.patch
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
3 @@ -7,8 +7,8 @@
4  dnl
5  dnl save the configure arguments
6  dnl
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)
12  
13  dnl
14 @@ -555,9 +555,7 @@
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./;'`
18 -changequote(, )
19 -RELEASEVERSION=`echo $VERSION | sed 's/^\([0-9]\)\.\([0-9]\)/\1:\2:0/'`
20 -changequote([, ])
21 +RELEASEVERSION=`echo $VERSION | sed ['s/^\([0-9]\)\.\([0-9]\)/\1:\2:0/']`
22  AC_SUBST(VERSION)
23  AC_SUBST(RELEASEVERSION)
24  AC_MSG_RESULT($VERSION)
25 @@ -575,10 +573,8 @@
26  
27  dnl system check
28  AC_CANONICAL_SYSTEM
29 -changequote(, )
30 -PARTIALTARGETOS=`echo $target_os | sed 's/[-._].*//'`
31 +PARTIALTARGETOS=`echo $target_os | sed ['s/[-._].*//']`
32  CFLAGS="$CFLAGS -D$PARTIALTARGETOS"
33 -changequote([, ])
34  AC_MSG_CACHE_ADD(Building for:               $PARTIALTARGETOS)
35  
36  dnl
37 @@ -586,7 +582,6 @@
38  dnl
39  
40  AC_MSG_CHECKING(for system include file)
41 -changequote(, )
42  filebase=$target_os
43  dnl ignore binary format indication
44  filebase=`echo $filebase | sed 's/elf//'`
45 @@ -596,9 +591,9 @@
46  while test "x$filebase" != "x$last" -a ! -f $srcdir/include/net-snmp/system/$filebase.h
47  do
48      last=$filebase
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]*$//']`
54      fi
55  done
56  
57 @@ -607,19 +602,17 @@
58  fi
59  ac_cv_SYSTEM_INCLUDE_FILE="net-snmp/system/$filebase.h"
60  
61 -changequote([, ])
62  AC_MSG_RESULT($ac_cv_SYSTEM_INCLUDE_FILE)
63  AC_DEFINE_UNQUOTED(SYSTEM_INCLUDE_FILE, "$ac_cv_SYSTEM_INCLUDE_FILE")
64  
65  dnl second part, the CPU type.
66  
67  AC_MSG_CHECKING(for machine-type include file)
68 -changequote(, )
69  filebase=$target_cpu
70  while test "x$filebase" != "x$last" -a ! -f $srcdir/include/net-snmp/machine/$filebase.h
71  do
72      last=$filebase
73 -    filebase=`echo $filebase | sed 's/[-._][^-._]*$//'`
74 +    filebase=`echo $filebase | sed ['s/[-._][^-._]*$//']`
75  done
76  
77  if test "x$filebase" = "x$last"; then
78 @@ -628,7 +621,6 @@
79  ac_cv_MACHINE_INCLUDE_FILE="net-snmp/machine/$filebase.h"
80  AC_MSG_RESULT($ac_cv_MACHINE_INCLUDE_FILE)
81  
82 -changequote([, ])
83  AC_DEFINE_UNQUOTED(MACHINE_INCLUDE_FILE, "$ac_cv_MACHINE_INCLUDE_FILE")
84  
85  AC_PATH_PROG(CCPATH,$CC)
86 @@ -738,7 +730,7 @@
87         for i in v6d toshiba kame inria zeta linux-glibc linux-inet6; do
88                 case $i in
89                 v6d)
90 -                       AC_EGREP_CPP(yes, [dnl
91 +                       AC_EGREP_CPP(yes, [
92  #include </usr/local/v6/include/sys/types.h>
93  #ifdef __V6D__
94  yes
95 @@ -748,7 +740,7 @@
96                                 CFLAGS="-I/usr/local/v6/include $CFLAGS"])
97                         ;;
98                 toshiba)
99 -                       AC_EGREP_CPP(yes, [dnl
100 +                       AC_EGREP_CPP(yes, [
101  #include <sys/param.h>
102  #ifdef _TOSHIBA_INET6
103  yes
104 @@ -758,7 +750,7 @@
105                                 CFLAGS="-DINET6 $CFLAGS"])
106                         ;;
107                 kame)
108 -                       AC_EGREP_CPP(yes, [dnl
109 +                       AC_EGREP_CPP(yes, [
110  #include <netinet/in.h>
111  #ifdef __KAME__
112  yes
113 @@ -769,7 +761,7 @@
114                                 CFLAGS="-DINET6 $CFLAGS"])
115                         ;;
116                 inria)
117 -                       AC_EGREP_CPP(yes, [dnl
118 +                       AC_EGREP_CPP(yes, [
119  #include <netinet/in.h>
120  #ifdef IPV6_INRIA_VERSION
121  yes
122 @@ -781,7 +773,7 @@
123                                 CFLAGS="-DINET6 $CFLAGS"])
124                         ;;
125                 zeta)
126 -                       AC_EGREP_CPP(yes, [dnl
127 +                       AC_EGREP_CPP(yes, [
128  #include <sys/param.h>
129  #ifdef _ZETA_MINAMI_INET6
130  A
131 @@ -792,7 +784,7 @@
132                                 CFLAGS="-DINET6 $CFLAGS"])
133                         ;;
134                 linux-glibc)
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))
139  yes
140 @@ -841,7 +833,6 @@
141  
142  if test "x$with_res_locks" = "xyes"; then
143    AC_DEFINE(NS_REENTRANT)
144 -EOF
145  
146      case $target_os in
147  
148 @@ -1049,7 +1040,6 @@
149  dnl
150  dnl Do hairy agent module processing.
151  dnl
152 -changequote(, )
153  AC_MSG_CHECKING(for and configuring mib modules to use)
154  
155  mibdir="agent/mibgroup"
156 @@ -1098,9 +1088,7 @@
157  done
158  
159  AC_MSG_RESULT($new_module_list.)
160 -changequote([, ])
161  AC_MSG_CACHE_ADD(Agent MIB code:            $new_module_list)
162 -changequote(, )
163  
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 @@
167         fi
168        fi
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"
174         fi
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.)
178        fi
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"
188    new_list_two=""
189  done
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'`
195 -changequote([, ])
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 @@
205      fi
206  
207      _libs=${LIBS}
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.)])
212  
213      LIBS="$LIBS -lwrap"
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)],[
220  
221             AC_MSG_RESULT(yes)
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"],[
226  
227             AC_MSG_RESULT(no)
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)],[
239  
240                         AC_MSG_RESULT(yes)
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"],[
245  
246                         AC_MSG_RESULT(no)
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}])
251      LDFLAGS=${_ldflags}
252      LIBS=${_libs}
253    fi
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,
258 -[AC_EGREP_CPP(dnl
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>
264  #if STDC_HEADERS
265  #include <stdlib.h>
266  #include <stddef.h>
267  #endif
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])])
272  
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,
279 -[AC_EGREP_CPP(dnl
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>
285  #if STDC_HEADERS
286  #include <stdlib.h>
287  #include <stddef.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
290 @@ -49,9 +49,11 @@
291  #undef _REENTRANT
292  
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 */
302  
303  /* reverse encoding BER packets is both faster and more efficient in space. */
This page took 0.0936090000000001 seconds and 4 git commands to generate.