$NetBSD: patch-ah,v 1.6 2003/07/30 21:05:00 jmmv Exp $ --- configure.orig 2002-04-08 16:45:00.000000000 +0200 +++ configure @@ -6724,7 +6724,7 @@ EOF fi SNMPCONFPATH="" -tmpset="$sysconfdir/snmp" +tmpset="$sysconfdir" while test "x$tmpset" != "x$SNMPCONFPATH"; do SNMPCONFPATH="$tmpset" eval tmpset="$tmpset" @@ -8180,105 +8180,21 @@ else fi -echo $ac_n "checking for rpmGetFilesystemList in -lrpm""... $ac_c" 1>&6 -echo "configure:8185: checking for rpmGetFilesystemList in -lrpm" >&5 -ac_lib_var=`echo rpm'_'rpmGetFilesystemList | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lrpm $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - cat >> confdefs.h <<\EOF -#define HAVE_LIBRPM 1 -EOF - - LIBS="-lrpm $_rpmlibs $LIBS" - CFLAGS="$CFLAGS -I/usr/include/rpm" - -else - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for rpmdbOpen in -lrpmdb""... $ac_c" 1>&6 -echo "configure:8231: checking for rpmdbOpen in -lrpmdb" >&5 -ac_lib_var=`echo rpmdb'_'rpmdbOpen | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lrpmdb -lrpm $_rpmlibs $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - cat >> confdefs.h <<\EOF -#define HAVE_LIBRPM 1 -EOF - - LIBS="-lrpmdb -lrpm $_rpmlibs $LIBS" - CFLAGS="$CFLAGS -I/usr/include/rpm" - -else - echo "$ac_t""no" 1>&6 -fi - - -fi - +#AC_CHECK_LIB(rpm, rpmGetFilesystemList,[ +# AC_DEFINE(HAVE_LIBRPM) +# LIBS="-lrpm $_rpmlibs $LIBS" +# CFLAGS="$CFLAGS -I/usr/include/rpm" +#],[ +# dnl rpm-4.0.3 librpmdb actually contains what we need. +# AC_CHECK_LIB(rpmdb, rpmdbOpen,[ +# AC_DEFINE(HAVE_LIBRPM) +# LIBS="-lrpmdb -lrpm $_rpmlibs $LIBS" +# CFLAGS="$CFLAGS -I/usr/include/rpm" +# ],,-lrpm $_rpmlibs) +#]) echo $ac_n "checking for kstat_lookup in -lkstat""... $ac_c" 1>&6 -echo "configure:8282: checking for kstat_lookup in -lkstat" >&5 +echo "configure:8198: checking for kstat_lookup in -lkstat" >&5 ac_lib_var=`echo kstat'_'kstat_lookup | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8884,7 +8800,7 @@ EOF fi -for ac_hdr in stdarg.h string.h fcntl.h limits.h sys/file.h sys/ioctl.h syslog.h unistd.h netinet/tcpip.h netinet/in.h netinet/ip.h netinet/ip_icmp.h net/if.h netdb.h sys/dmap.h machine/pte.h xti.h sys/sockio.h sys/socket.h sys/un.h fstab.h sys/fs.h mtab.h ufs/fs.h ufs/ffs/fs.h sys/fixpoint.h machine/param.h sys/vm.h vm/vm.h sys/vmmeter.h sys/vmparam.h sys/vmmac.h sys/vmsystm.h sys/mbuf.h sys/time.h sys/swap.h inet/mib2.h sys/statvfs.h sys/vfs.h sys/mnttab.h sys/user.h sys/proc.h sys/select.h mntent.h sys/mntent.h kstat.h utsname.h sys/utsname.h sys/cdefs.h getopt.h locale.h pthread.h sys/loadavg.h regex.h linux/tasks.h pwd.h grp.h utmpx.h +for ac_hdr in stdarg.h string.h fcntl.h limits.h sys/file.h sys/ioctl.h syslog.h unistd.h netinet/tcpip.h netinet/in.h netinet/ip.h netinet/ip_icmp.h net/if.h netdb.h sys/dmap.h machine/pte.h xti.h sys/sockio.h sys/socket.h sys/un.h fstab.h sys/fs.h mtab.h ufs/fs.h ufs/ffs/fs.h sys/fixpoint.h machine/param.h vm/vm.h sys/vmmeter.h sys/vmparam.h sys/vmmac.h sys/vmsystm.h sys/mbuf.h sys/time.h sys/swap.h inet/mib2.h sys/statvfs.h sys/vfs.h sys/mnttab.h sys/user.h sys/proc.h sys/select.h mntent.h sys/mntent.h kstat.h utsname.h sys/utsname.h sys/cdefs.h getopt.h locale.h pthread.h sys/loadavg.h regex.h linux/tasks.h pwd.h grp.h utmpx.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 @@ -9044,7 +8960,7 @@ else fi done -for ac_hdr in sys/mount.h vm/swap_pager.h ufs/ufs/dinode.h +for ac_hdr in sys/mount.h ufs/ufs/dinode.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 @@ -12141,11 +12057,7 @@ cat > conftest.$ac_ext < #endif #include -#define KERNEL -#define _KERNEL #include -#undef KERNEL -#undef _KERNEL #include @@ -12197,11 +12109,7 @@ cat > conftest.$ac_ext < #endif #include -#define KERNEL -#define _KERNEL #include -#undef KERNEL -#undef _KERNEL #include int main() { @@ -12235,11 +12143,7 @@ cat > conftest.$ac_ext < #endif #include -#define KERNEL -#define _KERNEL #include -#undef KERNEL -#undef _KERNEL #include int main() { @@ -12340,11 +12244,7 @@ cat > conftest.$ac_ext < #endif #include -#define KERNEL -#define _KERNEL #include -#undef KERNEL -#undef _KERNEL #include int main() { @@ -12407,11 +12307,7 @@ cat > conftest.$ac_ext < #endif #include -#define KERNEL -#define _KERNEL #include -#undef KERNEL -#undef _KERNEL #include @@ -12477,11 +12373,7 @@ cat > conftest.$ac_ext < #endif #include -#define KERNEL -#define _KERNEL #include -#undef KERNEL -#undef _KERNEL #include @@ -12547,11 +12439,7 @@ cat > conftest.$ac_ext < #endif #include -#define KERNEL -#define _KERNEL #include -#undef KERNEL -#undef _KERNEL #include @@ -12617,11 +12505,7 @@ cat > conftest.$ac_ext < #endif #include -#define KERNEL -#define _KERNEL #include -#undef KERNEL -#undef _KERNEL #include