]> git.pld-linux.org Git - packages/mbrowse.git/blob - mbrowse-ac_fixes.patch
- more fixes for not linking with libnsl on glibc systems.
[packages/mbrowse.git] / mbrowse-ac_fixes.patch
1 diff -Nru mbrowse-0.2.3/acinclude.m4 mbrowse-0.2.3.new/acinclude.m4
2 --- mbrowse-0.2.3/acinclude.m4  Thu Jan  1 01:00:00 1970
3 +++ mbrowse-0.2.3.new/acinclude.m4      Thu Apr  4 10:44:45 2002
4 @@ -0,0 +1,178 @@
5 +# Configure paths for ucd-snmp, GPLv2
6 +# Markus Fischer <mfischer@josefine.ben.tuwien.ac.at>,  22.9.1999
7 +# URL : http://josefine.ben.tuwien.ac.at/~mfischer/m4/ucd-snmp.m4
8 +# Last Modified : Thu Sep 23 14:24:15 CEST 1999
9 +#
10 +# written from scratch with a few pieces from glib.m4
11 +
12 +dnl AM_PATH_UCDSNMP([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
13 +dnl Test for ucd-snmp and define UCDSNMP_CFLAGS, UCDSNMP_LDFLAGS and UCDSNMP_LIBS
14 +dnl
15 +
16 +AC_DEFUN(AM_PATH_UCDSNMP,
17 +[
18 +AC_ARG_WITH(ucdsnmp-prefix, [--with-ucdsnmp-prefix=PFX Prefix where ucd-snmp is installed],
19 +            ucdsnmp_prefix="$withval",
20 +            ucdsnmp_prefix="")
21 +
22 +AC_ARG_WITH(ucdsnmp-include, [--with-ucdsnmp-include=DIR Directory pointing to ucd-snmp include files],
23 +            ucdsnmp_include="$withval",
24 +            ucdsnmp_include="")
25 +
26 +AC_ARG_WITH(ucdsnmp-lib,
27 +[  --with-ucdsnmp-lib=LIB  Directory pointing to ucd-snmp library
28 +                          (Note: -include and -lib do override
29 +                           paths found with -prefix)
30 +],
31 +            ucdsnmp_lib="$withval",
32 +            ucdsnmp_lib="")
33 +
34 +    AC_MSG_CHECKING([for ucd-snmp ifelse([$1], , ,[>= v$1])])
35 +    UCDSNMP_LDFLAGS=""
36 +    UCDSNMP_CFLAGS=""
37 +    UCDSNMP_LIBS="-lsnmp"
38 +    ucdsnmp_fail=""
39 +
40 +    dnl test --with-ucdsnmp-prefix
41 +    if test "x$ucdsnmp_prefix" != "x" ; then
42 +        if test -d "$ucdsnmp_prefix" ; then
43 +            if test -d "$ucdsnmp_prefix/lib" ; then
44 +                UCDSNMP_LDFLAGS="-L$ucdsnmp_prefix/lib"
45 +            fi
46 +            if test -d "$ucdsnmp_prefix/include" ; then
47 +                UCDSNMP_CFLAGS="-I$ucdsnmp_prefix/include"
48 +            fi
49 +        fi
50 +    fi
51 +
52 +    dnl test --with-ucdsnmp-include
53 +    if test "x$ucdsnmp_include" != "x" ; then
54 +        if test -d "$ucdsnmp_include/include" ; then
55 +            UCDSNMP_CFLAGS="-I$ucdsnmp_include/include"
56 +        elif test -d "$ucdsnmp_include" ; then
57 +            UCDSNMP_CFLAGS="-I$ucdsnmp_include"
58 +        fi
59 +    fi
60 +
61 +    dnl test --with-ucdsnmp-lib
62 +    if test "x$ucdsnmp_lib" != "x" ; then
63 +        if test -d "$ucdsnmp_lib/lib" ; then
64 +            UCDSNMP_LDFLAGS="-L$ucdsnmp_lib/lib"
65 +        elif test -d "$ucdsnmp_lib" ; then
66 +            UCDSNMP_LDFLAGS="-L$ucdsnmp_lib"
67 +        fi
68 +    fi
69 +
70 +    ac_save_CFLAGS="$CFLAGS"
71 +    ac_save_LDFLAGS="$LDFLAGS"
72 +    ac_save_LIBS="$LIBS"
73 +    CFLAGS="$CFLAGS $UCDSNMP_CFLAGS"
74 +    LDFLAGS="$LDFLAGS $UCDSNMP_LDFLAGS"
75 +    LIBS="$UCDSNMP_LIBS $LIBS"
76 +    dnl if no minimum version is given, just try to compile
77 +    dnl else try to compile AND run
78 +    if test "x$1" = "x" ; then
79 +        AC_TRY_COMPILE([
80 +            #include <stdarg.h>
81 +            #include <stdio.h>
82 +            #include <string.h>
83 +            #include <sys/types.h>
84 +            #include <ucd-snmp/asn1.h>
85 +            #include <ucd-snmp/snmp_api.h>
86 +            #include <ucd-snmp/mib.h>
87 +            #include <ucd-snmp/snmp.h>
88 +        ],[
89 +            struct snmp_session s;
90 +            bzero( &s, sizeof( struct snmp_session));
91 +            snmp_open(&s);
92 +        ],[AC_MSG_RESULT(yes)
93 +           CFLAGS="$ac_save_CFLAGS"
94 +           LDFLAGS="$ac_save_LDFLAGS"
95 +           LIBS="$ac_save_LIBS"
96 +           ifelse([$2], ,:,[$2])
97 +        ],[
98 +          ucdsnmp_fail="yes"
99 +        ])
100 +    else
101 +        ucdsnmp_min_version=$1
102 +        AC_TRY_RUN([
103 +            #include <stdarg.h>
104 +            #include <stdio.h>
105 +            #include <string.h>
106 +
107 +            #include <sys/types.h>
108 +            #include <ucd-snmp/asn1.h>
109 +            #include <ucd-snmp/snmp_api.h>
110 +            #include <ucd-snmp/mib.h>
111 +            #include <ucd-snmp/snmp.h>
112 +            #include <ucd-snmp/version.h>
113 +
114 +            int main() {
115 +                int major, minor;
116 +                int ucd_major, ucd_minor;
117 +                char *version1, *version2;
118 +                struct snmp_session s;
119 +
120 +                bzero(&s, sizeof( struct snmp_session));
121 +                snmp_open(&s);
122 +
123 +                version1 = strdup( "$ucdsnmp_min_version");
124 +                if( sscanf( version1, "%d.%d", &major, &minor) != 2) {
125 +                  printf( "%s, bad supplied version string\n", "$ucdsnmp_min_version");
126 +                  exit(1);
127 +                }
128 +
129 +                version2 = strdup( VersionInfo);
130 +                if( sscanf( version2, "%d.%d", &ucd_major, &ucd_minor) != 2) {
131 +                  printf( "%s, bad ucd-snmp version string\n", VersionInfo);
132 +                  exit(1);
133 +                }
134 +
135 +                if((ucd_major > major) ||
136 +                  ((ucd_major == major) && (ucd_minor > minor)) ||
137 +                  ((ucd_major == major) && (ucd_minor == minor) )) {
138 +                  return 0;
139 +                } else {
140 +                  printf("\n***\n*** An old version of ucd-snmp (%d.%d) was found.\n",
141 +                         ucd_major, ucd_minor);
142 +                  printf("*** You need a version of ucd-snmp newer than %d.%d. The latest version of\n",
143 +                         major, minor);
144 +                  printf("*** ucd-snmp is available from ftp://net-snmp.sourceforge.net/ .\n***\n");
145 +                }
146 +                return 1;
147 +            }
148 +        ],[AC_MSG_RESULT(yes)
149 +           CFLAGS="$ac_save_CFLAGS"
150 +           LDFLAGS="$ac_save_LDFLAGS"
151 +           LIBS="$ac_save_LIBS"
152 +           ifelse([$2], ,:,[$2])
153 +        ],[
154 +          ucdsnmp_fail="yes"
155 +        ])
156 +
157 +    fi
158 +
159 +    if test "x$ucdsnmp_fail" != "x" ; then
160 +            dnl AC_MSG_RESULT(no)
161 +            echo
162 +            echo "***"
163 +            echo "*** ucd-snmp test source had problems, check your config.log ."
164 +            echo "*** Also try one of the following switches :"
165 +            echo "***   --with-ucdsnmp-prefix=PFX"
166 +            echo "***   --with-ucdsnmp-include=DIR"
167 +            echo "***   --with-ucdsnmp-lib=DIR"
168 +            echo "***"
169 +            CFLAGS="$ac_save_CFLAGS"
170 +            LDFLAGS="$ac_save_LDFLAGS"
171 +            LIBS="$ac_save_LIBS"
172 +            ifelse([$3], ,:,[$3])
173 +    fi
174 +
175 +    CFLAGS="$ac_save_CFLAGS"
176 +    LDFLAGS="$ac_save_LDFLAGS"
177 +    LIBS="$ac_save_LIBS"
178 +    AC_SUBST(UCDSNMP_LDFLAGS)
179 +    AC_SUBST(UCDSNMP_CFLAGS)
180 +    AC_SUBST(UCDSNMP_LIBS)
181 +])
182 +
183 diff -Nru mbrowse-0.2.3/aclocal.m4 mbrowse-0.2.3.new/aclocal.m4
184 --- mbrowse-0.2.3/aclocal.m4    Sat Mar  2 18:15:36 2002
185 +++ mbrowse-0.2.3.new/aclocal.m4        Thu Jan  1 01:00:00 1970
186 @@ -1,588 +0,0 @@
187 -dnl aclocal.m4 generated automatically by aclocal 1.4-p5
188 -
189 -dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
190 -dnl This file is free software; the Free Software Foundation
191 -dnl gives unlimited permission to copy and/or distribute it,
192 -dnl with or without modifications, as long as this notice is preserved.
193 -
194 -dnl This program is distributed in the hope that it will be useful,
195 -dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
196 -dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
197 -dnl PARTICULAR PURPOSE.
198 -
199 -# Do all the work for Automake.  This macro actually does too much --
200 -# some checks are only needed if your package does certain things.
201 -# But this isn't really a big deal.
202 -
203 -# serial 1
204 -
205 -dnl Usage:
206 -dnl AM_INIT_AUTOMAKE(package,version, [no-define])
207 -
208 -AC_DEFUN([AM_INIT_AUTOMAKE],
209 -[AC_REQUIRE([AC_PROG_INSTALL])
210 -PACKAGE=[$1]
211 -AC_SUBST(PACKAGE)
212 -VERSION=[$2]
213 -AC_SUBST(VERSION)
214 -dnl test to see if srcdir already configured
215 -if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
216 -  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
217 -fi
218 -ifelse([$3],,
219 -AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
220 -AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
221 -AC_REQUIRE([AM_SANITY_CHECK])
222 -AC_REQUIRE([AC_ARG_PROGRAM])
223 -dnl FIXME This is truly gross.
224 -missing_dir=`cd $ac_aux_dir && pwd`
225 -AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
226 -AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
227 -AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
228 -AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
229 -AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
230 -AC_REQUIRE([AC_PROG_MAKE_SET])])
231 -
232 -#
233 -# Check to make sure that the build environment is sane.
234 -#
235 -
236 -AC_DEFUN([AM_SANITY_CHECK],
237 -[AC_MSG_CHECKING([whether build environment is sane])
238 -# Just in case
239 -sleep 1
240 -echo timestamp > conftestfile
241 -# Do `set' in a subshell so we don't clobber the current shell's
242 -# arguments.  Must try -L first in case configure is actually a
243 -# symlink; some systems play weird games with the mod time of symlinks
244 -# (eg FreeBSD returns the mod time of the symlink's containing
245 -# directory).
246 -if (
247 -   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
248 -   if test "[$]*" = "X"; then
249 -      # -L didn't work.
250 -      set X `ls -t $srcdir/configure conftestfile`
251 -   fi
252 -   if test "[$]*" != "X $srcdir/configure conftestfile" \
253 -      && test "[$]*" != "X conftestfile $srcdir/configure"; then
254 -
255 -      # If neither matched, then we have a broken ls.  This can happen
256 -      # if, for instance, CONFIG_SHELL is bash and it inherits a
257 -      # broken ls alias from the environment.  This has actually
258 -      # happened.  Such a system could not be considered "sane".
259 -      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
260 -alias in your environment])
261 -   fi
262 -
263 -   test "[$]2" = conftestfile
264 -   )
265 -then
266 -   # Ok.
267 -   :
268 -else
269 -   AC_MSG_ERROR([newly created file is older than distributed files!
270 -Check your system clock])
271 -fi
272 -rm -f conftest*
273 -AC_MSG_RESULT(yes)])
274 -
275 -dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
276 -dnl The program must properly implement --version.
277 -AC_DEFUN([AM_MISSING_PROG],
278 -[AC_MSG_CHECKING(for working $2)
279 -# Run test in a subshell; some versions of sh will print an error if
280 -# an executable is not found, even if stderr is redirected.
281 -# Redirect stdin to placate older versions of autoconf.  Sigh.
282 -if ($2 --version) < /dev/null > /dev/null 2>&1; then
283 -   $1=$2
284 -   AC_MSG_RESULT(found)
285 -else
286 -   $1="$3/missing $2"
287 -   AC_MSG_RESULT(missing)
288 -fi
289 -AC_SUBST($1)])
290 -
291 -# Like AC_CONFIG_HEADER, but automatically create stamp file.
292 -
293 -AC_DEFUN([AM_CONFIG_HEADER],
294 -[AC_PREREQ([2.12])
295 -AC_CONFIG_HEADER([$1])
296 -dnl When config.status generates a header, we must update the stamp-h file.
297 -dnl This file resides in the same directory as the config header
298 -dnl that is generated.  We must strip everything past the first ":",
299 -dnl and everything past the last "/".
300 -AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
301 -ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
302 -<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
303 -<<am_indx=1
304 -for am_file in <<$1>>; do
305 -  case " <<$>>CONFIG_HEADERS " in
306 -  *" <<$>>am_file "*<<)>>
307 -    echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
308 -    ;;
309 -  esac
310 -  am_indx=`expr "<<$>>am_indx" + 1`
311 -done<<>>dnl>>)
312 -changequote([,]))])
313 -
314 -
315 -# serial 1
316 -
317 -# @defmac AC_PROG_CC_STDC
318 -# @maindex PROG_CC_STDC
319 -# @ovindex CC
320 -# If the C compiler in not in ANSI C mode by default, try to add an option
321 -# to output variable @code{CC} to make it so.  This macro tries various
322 -# options that select ANSI C on some system or another.  It considers the
323 -# compiler to be in ANSI C mode if it handles function prototypes correctly.
324 -#
325 -# If you use this macro, you should check after calling it whether the C
326 -# compiler has been set to accept ANSI C; if not, the shell variable
327 -# @code{am_cv_prog_cc_stdc} is set to @samp{no}.  If you wrote your source
328 -# code in ANSI C, you can make an un-ANSIfied copy of it by using the
329 -# program @code{ansi2knr}, which comes with Ghostscript.
330 -# @end defmac
331 -
332 -AC_DEFUN([AM_PROG_CC_STDC],
333 -[AC_REQUIRE([AC_PROG_CC])
334 -AC_BEFORE([$0], [AC_C_INLINE])
335 -AC_BEFORE([$0], [AC_C_CONST])
336 -dnl Force this before AC_PROG_CPP.  Some cpp's, eg on HPUX, require
337 -dnl a magic option to avoid problems with ANSI preprocessor commands
338 -dnl like #elif.
339 -dnl FIXME: can't do this because then AC_AIX won't work due to a
340 -dnl circular dependency.
341 -dnl AC_BEFORE([$0], [AC_PROG_CPP])
342 -AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
343 -AC_CACHE_VAL(am_cv_prog_cc_stdc,
344 -[am_cv_prog_cc_stdc=no
345 -ac_save_CC="$CC"
346 -# Don't try gcc -ansi; that turns off useful extensions and
347 -# breaks some systems' header files.
348 -# AIX                  -qlanglvl=ansi
349 -# Ultrix and OSF/1     -std1
350 -# HP-UX                        -Aa -D_HPUX_SOURCE
351 -# SVR4                 -Xc -D__EXTENSIONS__
352 -for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
353 -do
354 -  CC="$ac_save_CC $ac_arg"
355 -  AC_TRY_COMPILE(
356 -[#include <stdarg.h>
357 -#include <stdio.h>
358 -#include <sys/types.h>
359 -#include <sys/stat.h>
360 -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
361 -struct buf { int x; };
362 -FILE * (*rcsopen) (struct buf *, struct stat *, int);
363 -static char *e (p, i)
364 -     char **p;
365 -     int i;
366 -{
367 -  return p[i];
368 -}
369 -static char *f (char * (*g) (char **, int), char **p, ...)
370 -{
371 -  char *s;
372 -  va_list v;
373 -  va_start (v,p);
374 -  s = g (p, va_arg (v,int));
375 -  va_end (v);
376 -  return s;
377 -}
378 -int test (int i, double x);
379 -struct s1 {int (*f) (int a);};
380 -struct s2 {int (*f) (double a);};
381 -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
382 -int argc;
383 -char **argv;
384 -], [
385 -return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
386 -],
387 -[am_cv_prog_cc_stdc="$ac_arg"; break])
388 -done
389 -CC="$ac_save_CC"
390 -])
391 -if test -z "$am_cv_prog_cc_stdc"; then
392 -  AC_MSG_RESULT([none needed])
393 -else
394 -  AC_MSG_RESULT($am_cv_prog_cc_stdc)
395 -fi
396 -case "x$am_cv_prog_cc_stdc" in
397 -  x|xno) ;;
398 -  *) CC="$CC $am_cv_prog_cc_stdc" ;;
399 -esac
400 -])
401 -
402 -# Configure paths for ucd-snmp, GPLv2
403 -# Markus Fischer <mfischer@josefine.ben.tuwien.ac.at>,  22.9.1999
404 -# URL : http://josefine.ben.tuwien.ac.at/~mfischer/m4/ucd-snmp.m4
405 -# Last Modified : Thu Sep 23 14:24:15 CEST 1999
406 -#
407 -# written from scratch with a few pieces from glib.m4
408 -
409 -dnl AM_PATH_UCDSNMP([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
410 -dnl Test for ucd-snmp and define UCDSNMP_CFLAGS, UCDSNMP_LDFLAGS and UCDSNMP_LIBS
411 -dnl
412 -
413 -AC_DEFUN(AM_PATH_UCDSNMP,
414 -[
415 -AC_ARG_WITH(ucdsnmp-prefix, [--with-ucdsnmp-prefix=PFX Prefix where ucd-snmp is installed],
416 -            ucdsnmp_prefix="$withval",
417 -            ucdsnmp_prefix="")
418 -
419 -AC_ARG_WITH(ucdsnmp-include, [--with-ucdsnmp-include=DIR Directory pointing to ucd-snmp include files],
420 -            ucdsnmp_include="$withval",
421 -            ucdsnmp_include="")
422 -
423 -AC_ARG_WITH(ucdsnmp-lib,
424 -[  --with-ucdsnmp-lib=LIB  Directory pointing to ucd-snmp library
425 -                          (Note: -include and -lib do override
426 -                           paths found with -prefix)
427 -],
428 -            ucdsnmp_lib="$withval",
429 -            ucdsnmp_lib="")
430 -
431 -    AC_MSG_CHECKING([for ucd-snmp ifelse([$1], , ,[>= v$1])])
432 -    UCDSNMP_LDFLAGS=""
433 -    UCDSNMP_CFLAGS=""
434 -    UCDSNMP_LIBS="-lsnmp"
435 -    ucdsnmp_fail=""
436 -
437 -    dnl test --with-ucdsnmp-prefix
438 -    if test "x$ucdsnmp_prefix" != "x" ; then
439 -        if test -d "$ucdsnmp_prefix" ; then
440 -            if test -d "$ucdsnmp_prefix/lib" ; then
441 -                UCDSNMP_LDFLAGS="-L$ucdsnmp_prefix/lib"
442 -            fi
443 -            if test -d "$ucdsnmp_prefix/include" ; then
444 -                UCDSNMP_CFLAGS="-I$ucdsnmp_prefix/include"
445 -            fi
446 -        fi
447 -    fi
448 -
449 -    dnl test --with-ucdsnmp-include
450 -    if test "x$ucdsnmp_include" != "x" ; then
451 -        if test -d "$ucdsnmp_include/include" ; then
452 -            UCDSNMP_CFLAGS="-I$ucdsnmp_include/include"
453 -        elif test -d "$ucdsnmp_include" ; then
454 -            UCDSNMP_CFLAGS="-I$ucdsnmp_include"
455 -        fi
456 -    fi
457 -
458 -    dnl test --with-ucdsnmp-lib
459 -    if test "x$ucdsnmp_lib" != "x" ; then
460 -        if test -d "$ucdsnmp_lib/lib" ; then
461 -            UCDSNMP_LDFLAGS="-L$ucdsnmp_lib/lib"
462 -        elif test -d "$ucdsnmp_lib" ; then
463 -            UCDSNMP_LDFLAGS="-L$ucdsnmp_lib"
464 -        fi
465 -    fi
466 -
467 -    ac_save_CFLAGS="$CFLAGS"
468 -    ac_save_LDFLAGS="$LDFLAGS"
469 -    ac_save_LIBS="$LIBS"
470 -    CFLAGS="$CFLAGS $UCDSNMP_CFLAGS"
471 -    LDFLAGS="$LDFLAGS $UCDSNMP_LDFLAGS"
472 -    LIBS="$UCDSNMP_LIBS $LIBS"
473 -    dnl if no minimum version is given, just try to compile
474 -    dnl else try to compile AND run
475 -    if test "x$1" = "x" ; then
476 -        AC_TRY_COMPILE([
477 -            #include <stdarg.h>
478 -            #include <stdio.h>
479 -            #include <string.h>
480 -            #include <sys/types.h>
481 -            #include <ucd-snmp/asn1.h>
482 -            #include <ucd-snmp/snmp_api.h>
483 -            #include <ucd-snmp/mib.h>
484 -            #include <ucd-snmp/snmp.h>
485 -        ],[
486 -            struct snmp_session s;
487 -            bzero( &s, sizeof( struct snmp_session));
488 -            snmp_open(&s);
489 -        ],[AC_MSG_RESULT(yes)
490 -           CFLAGS="$ac_save_CFLAGS"
491 -           LDFLAGS="$ac_save_LDFLAGS"
492 -           LIBS="$ac_save_LIBS"
493 -           ifelse([$2], ,:,[$2])
494 -        ],[
495 -          ucdsnmp_fail="yes"
496 -        ])
497 -    else
498 -        ucdsnmp_min_version=$1
499 -        AC_TRY_RUN([
500 -            #include <stdarg.h>
501 -            #include <stdio.h>
502 -            #include <string.h>
503 -
504 -            #include <sys/types.h>
505 -            #include <ucd-snmp/asn1.h>
506 -            #include <ucd-snmp/snmp_api.h>
507 -            #include <ucd-snmp/mib.h>
508 -            #include <ucd-snmp/snmp.h>
509 -            #include <ucd-snmp/version.h>
510 -
511 -            int main() {
512 -                int major, minor;
513 -                int ucd_major, ucd_minor;
514 -                char *version1, *version2;
515 -                struct snmp_session s;
516 -
517 -                bzero(&s, sizeof( struct snmp_session));
518 -                snmp_open(&s);
519 -
520 -                version1 = strdup( "$ucdsnmp_min_version");
521 -                if( sscanf( version1, "%d.%d", &major, &minor) != 2) {
522 -                  printf( "%s, bad supplied version string\n", "$ucdsnmp_min_version");
523 -                  exit(1);
524 -                }
525 -
526 -                version2 = strdup( VersionInfo);
527 -                if( sscanf( version2, "%d.%d", &ucd_major, &ucd_minor) != 2) {
528 -                  printf( "%s, bad ucd-snmp version string\n", VersionInfo);
529 -                  exit(1);
530 -                }
531 -
532 -                if((ucd_major > major) ||
533 -                  ((ucd_major == major) && (ucd_minor > minor)) ||
534 -                  ((ucd_major == major) && (ucd_minor == minor) )) {
535 -                  return 0;
536 -                } else {
537 -                  printf("\n***\n*** An old version of ucd-snmp (%d.%d) was found.\n",
538 -                         ucd_major, ucd_minor);
539 -                  printf("*** You need a version of ucd-snmp newer than %d.%d. The latest version of\n",
540 -                         major, minor);
541 -                  printf("*** ucd-snmp is available from ftp://net-snmp.sourceforge.net/ .\n***\n");
542 -                }
543 -                return 1;
544 -            }
545 -        ],[AC_MSG_RESULT(yes)
546 -           CFLAGS="$ac_save_CFLAGS"
547 -           LDFLAGS="$ac_save_LDFLAGS"
548 -           LIBS="$ac_save_LIBS"
549 -           ifelse([$2], ,:,[$2])
550 -        ],[
551 -          ucdsnmp_fail="yes"
552 -        ])
553 -
554 -    fi
555 -
556 -    if test "x$ucdsnmp_fail" != "x" ; then
557 -            dnl AC_MSG_RESULT(no)
558 -            echo
559 -            echo "***"
560 -            echo "*** ucd-snmp test source had problems, check your config.log ."
561 -            echo "*** Also try one of the following switches :"
562 -            echo "***   --with-ucdsnmp-prefix=PFX"
563 -            echo "***   --with-ucdsnmp-include=DIR"
564 -            echo "***   --with-ucdsnmp-lib=DIR"
565 -            echo "***"
566 -            CFLAGS="$ac_save_CFLAGS"
567 -            LDFLAGS="$ac_save_LDFLAGS"
568 -            LIBS="$ac_save_LIBS"
569 -            ifelse([$3], ,:,[$3])
570 -    fi
571 -
572 -    CFLAGS="$ac_save_CFLAGS"
573 -    LDFLAGS="$ac_save_LDFLAGS"
574 -    LIBS="$ac_save_LIBS"
575 -    AC_SUBST(UCDSNMP_LDFLAGS)
576 -    AC_SUBST(UCDSNMP_CFLAGS)
577 -    AC_SUBST(UCDSNMP_LIBS)
578 -])
579 -
580 -# Configure paths for GTK+
581 -# Owen Taylor     97-11-3
582 -
583 -dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
584 -dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
585 -dnl
586 -AC_DEFUN(AM_PATH_GTK,
587 -[dnl 
588 -dnl Get the cflags and libraries from the gtk-config script
589 -dnl
590 -AC_ARG_WITH(gtk-prefix,[  --with-gtk-prefix=PFX   Prefix where GTK is installed (optional)],
591 -            gtk_config_prefix="$withval", gtk_config_prefix="")
592 -AC_ARG_WITH(gtk-exec-prefix,[  --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
593 -            gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
594 -AC_ARG_ENABLE(gtktest, [  --disable-gtktest       Do not try to compile and run a test GTK program],
595 -                   , enable_gtktest=yes)
596 -
597 -  for module in . $4
598 -  do
599 -      case "$module" in
600 -         gthread) 
601 -             gtk_config_args="$gtk_config_args gthread"
602 -         ;;
603 -      esac
604 -  done
605 -
606 -  if test x$gtk_config_exec_prefix != x ; then
607 -     gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
608 -     if test x${GTK_CONFIG+set} != xset ; then
609 -        GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
610 -     fi
611 -  fi
612 -  if test x$gtk_config_prefix != x ; then
613 -     gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
614 -     if test x${GTK_CONFIG+set} != xset ; then
615 -        GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
616 -     fi
617 -  fi
618 -
619 -  AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
620 -  min_gtk_version=ifelse([$1], ,0.99.7,$1)
621 -  AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
622 -  no_gtk=""
623 -  if test "$GTK_CONFIG" = "no" ; then
624 -    no_gtk=yes
625 -  else
626 -    GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
627 -    GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
628 -    gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
629 -           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
630 -    gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
631 -           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
632 -    gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
633 -           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
634 -    if test "x$enable_gtktest" = "xyes" ; then
635 -      ac_save_CFLAGS="$CFLAGS"
636 -      ac_save_LIBS="$LIBS"
637 -      CFLAGS="$CFLAGS $GTK_CFLAGS"
638 -      LIBS="$GTK_LIBS $LIBS"
639 -dnl
640 -dnl Now check if the installed GTK is sufficiently new. (Also sanity
641 -dnl checks the results of gtk-config to some extent
642 -dnl
643 -      rm -f conf.gtktest
644 -      AC_TRY_RUN([
645 -#include <gtk/gtk.h>
646 -#include <stdio.h>
647 -#include <stdlib.h>
648 -
649 -int 
650 -main ()
651 -{
652 -  int major, minor, micro;
653 -  char *tmp_version;
654 -
655 -  system ("touch conf.gtktest");
656 -
657 -  /* HP/UX 9 (%@#!) writes to sscanf strings */
658 -  tmp_version = g_strdup("$min_gtk_version");
659 -  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
660 -     printf("%s, bad version string\n", "$min_gtk_version");
661 -     exit(1);
662 -   }
663 -
664 -  if ((gtk_major_version != $gtk_config_major_version) ||
665 -      (gtk_minor_version != $gtk_config_minor_version) ||
666 -      (gtk_micro_version != $gtk_config_micro_version))
667 -    {
668 -      printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", 
669 -             $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
670 -             gtk_major_version, gtk_minor_version, gtk_micro_version);
671 -      printf ("*** was found! If gtk-config was correct, then it is best\n");
672 -      printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
673 -      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
674 -      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
675 -      printf("*** required on your system.\n");
676 -      printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
677 -      printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
678 -      printf("*** before re-running configure\n");
679 -    } 
680 -#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
681 -  else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
682 -          (gtk_minor_version != GTK_MINOR_VERSION) ||
683 -           (gtk_micro_version != GTK_MICRO_VERSION))
684 -    {
685 -      printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
686 -            GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
687 -      printf("*** library (version %d.%d.%d)\n",
688 -            gtk_major_version, gtk_minor_version, gtk_micro_version);
689 -    }
690 -#endif /* defined (GTK_MAJOR_VERSION) ... */
691 -  else
692 -    {
693 -      if ((gtk_major_version > major) ||
694 -        ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
695 -        ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
696 -      {
697 -        return 0;
698 -       }
699 -     else
700 -      {
701 -        printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
702 -               gtk_major_version, gtk_minor_version, gtk_micro_version);
703 -        printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
704 -              major, minor, micro);
705 -        printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
706 -        printf("***\n");
707 -        printf("*** If you have already installed a sufficiently new version, this error\n");
708 -        printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
709 -        printf("*** being found. The easiest way to fix this is to remove the old version\n");
710 -        printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
711 -        printf("*** correct copy of gtk-config. (In this case, you will have to\n");
712 -        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
713 -        printf("*** so that the correct libraries are found at run-time))\n");
714 -      }
715 -    }
716 -  return 1;
717 -}
718 -],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
719 -       CFLAGS="$ac_save_CFLAGS"
720 -       LIBS="$ac_save_LIBS"
721 -     fi
722 -  fi
723 -  if test "x$no_gtk" = x ; then
724 -     AC_MSG_RESULT(yes)
725 -     ifelse([$2], , :, [$2])     
726 -  else
727 -     AC_MSG_RESULT(no)
728 -     if test "$GTK_CONFIG" = "no" ; then
729 -       echo "*** The gtk-config script installed by GTK could not be found"
730 -       echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
731 -       echo "*** your path, or set the GTK_CONFIG environment variable to the"
732 -       echo "*** full path to gtk-config."
733 -     else
734 -       if test -f conf.gtktest ; then
735 -        :
736 -       else
737 -          echo "*** Could not run GTK test program, checking why..."
738 -          CFLAGS="$CFLAGS $GTK_CFLAGS"
739 -          LIBS="$LIBS $GTK_LIBS"
740 -          AC_TRY_LINK([
741 -#include <gtk/gtk.h>
742 -#include <stdio.h>
743 -],      [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
744 -        [ echo "*** The test program compiled, but did not run. This usually means"
745 -          echo "*** that the run-time linker is not finding GTK or finding the wrong"
746 -          echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
747 -          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
748 -          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
749 -          echo "*** is required on your system"
750 -         echo "***"
751 -          echo "*** If you have an old version installed, it is best to remove it, although"
752 -          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
753 -          echo "***"
754 -          echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
755 -          echo "*** came with the system with the command"
756 -          echo "***"
757 -          echo "***    rpm --erase --nodeps gtk gtk-devel" ],
758 -        [ echo "*** The test program failed to compile or link. See the file config.log for the"
759 -          echo "*** exact error that occured. This usually means GTK was incorrectly installed"
760 -          echo "*** or that you have moved GTK since it was installed. In the latter case, you"
761 -          echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
762 -          CFLAGS="$ac_save_CFLAGS"
763 -          LIBS="$ac_save_LIBS"
764 -       fi
765 -     fi
766 -     GTK_CFLAGS=""
767 -     GTK_LIBS=""
768 -     ifelse([$3], , :, [$3])
769 -  fi
770 -  AC_SUBST(GTK_CFLAGS)
771 -  AC_SUBST(GTK_LIBS)
772 -  rm -f conf.gtktest
773 -])
774 -
775 --- mbrowse-0.2.3/configure.in~ Thu Apr  4 10:54:52 2002
776 +++ mbrowse-0.2.3/configure.in  Thu Apr  4 10:54:52 2002
777 @@ -10,9 +10,7 @@
778  AC_HEADER_STDC
779  
780  AC_CHECK_LIB(socket,getservbyname)
781 -AC_CHECK_FUNC(gethostbyname, ,
782 -    AC_CHECK_LIB(nsl, gethostbyname))
783 -AC_CHECK_LIB(nsl,gethostbyname)
784 +AC_CHECK_FUNC(gethostbyname, [], AC_CHECK_LIB(nsl, gethostbyname))
785  AC_CHECK_LIB(crypto,EVP_md5)
786  AC_CHECK_LIB(kstat,kstat_lookup)
787  AC_CHECK_LIB(snmp,bprintf,AC_DEFINE(HAVE_BROKEN_API))
This page took 0.111997 seconds and 4 git commands to generate.