$NetBSD: patch-aa,v 1.13 2001/01/26 04:38:04 hubertf Exp $

--- configure.in.orig	Fri May  5 12:46:26 2000
+++ configure.in	Thu Jan 25 21:55:51 2001
@@ -459,7 +459,8 @@
     else
       SHLIB_CFLAGS="-KPIC"
     fi
-    SHLIB_EXTENSION="so"
+#   SHLIB_EXTENSION="so"
+    SHLIB_EXTENSION="la"
     SHLIB_VERSION=
     SHLIB_LD_CMD="ld -r -o"
     SHLIB_LDCONFIG_CMD=
@@ -1042,15 +1043,15 @@
   CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags})
 fi
 
-dnl
-dnl now check for rpm using the appropriate db library
-dnl
-AC_CHECK_LIB(rpm, rpmdbOpen,[
-  AC_DEFINE(HAVE_LIBRPM)
-  LIBS="-lrpm $LIBS"
-  CFLAGS="$CFLAGS -I/usr/include/rpm"
-],,-lz)
-
+#dnl
+#dnl now check for rpm using the appropriate db library
+#dnl
+#AC_CHECK_HEADERS(rpm/rpmlib.h rpm/header.h,
+#  AC_CHECK_LIB(rpm, rpmdbOpen,[
+#    AC_DEFINE(HAVE_LIBRPM)
+#    LIBS="-lrpm $LIBS"
+#], CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
+#CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags})
 
 dnl Replace `main' with a function in -lkstat:
 AC_CHECK_LIB(kstat, kstat_lookup)
@@ -1067,7 +1068,7 @@
 AC_HEADER_STDC
 AC_HEADER_DIRENT
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(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 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)
+AC_CHECK_HEADERS(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 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 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)
 dnl FreeBSD required headers
 AC_CHECK_HEADERS(malloc.h sys/param.h net/if_dl.h sys/sysctl.h stdlib.h net/if_mib.h net/if_types.h net/if_var.h sys/queue.h osreldate.h sys/disklabel.h machine/types.h sys/socketvar.h)
 dnl Linux
@@ -1075,7 +1076,7 @@
 dnl NetBSD required headers
 AC_CHECK_HEADERS(arpa/inet.h kvm.h sys/pool.h)
 dnl BSDi2 headers
-AC_CHECK_HEADERS(sys/mount.h vm/swap_pager.h ufs/ufs/dinode.h)
+AC_CHECK_HEADERS(sys/mount.h ufs/ufs/dinode.h)
 dnl BSDi3 headers
 AC_CHECK_HEADERS(sys/stat.h sys/vnode.h ufs/ufs/quota.h ufs/ufs/inode.h)
 dnl irix headers
@@ -1274,11 +1275,7 @@
 
 AC_CHECK_STRUCT_FOR([
 #include <sys/types.h>
-#define KERNEL
-#define _KERNEL
 #include <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
 #include <net/route.h>
 ], rtentry, rt_dst, no)
 
@@ -1289,11 +1286,7 @@
 dnl 4.4 compat
 AC_TRY_COMPILE([
 #include <sys/types.h>
-#define KERNEL
-#define _KERNEL
 #include <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
 #include <net/route.h>
 ],[
 
@@ -1310,11 +1303,7 @@
 if test "x$ac_cv_RTENTRY_TYPE" = "x"; then
 AC_TRY_COMPILE([
 #include <sys/types.h>
-#define KERNEL
-#define _KERNEL
 #include <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
 #include <net/route.h>
 ],[
 struct rtentry rt; 
@@ -1364,11 +1353,7 @@
 [
 AC_TRY_COMPILE([
 #include <sys/types.h>
-#define KERNEL
-#define _KERNEL
 #include <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
 #include <net/route.h>
 ],[
 struct rtentry rt; 
@@ -1385,41 +1370,25 @@
 dnl Check struct rtentry for various things.
 AC_CHECK_STRUCT_FOR([
 #include <sys/types.h>
-#define KERNEL
-#define _KERNEL
 #include <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
 #include <net/route.h>
 ], rtentry, rt_unit)
 
 AC_CHECK_STRUCT_FOR([
 #include <sys/types.h>
-#define KERNEL
-#define _KERNEL
 #include <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
 #include <net/route.h>
 ], rtentry, rt_refcnt)
 
 AC_CHECK_STRUCT_FOR([
 #include <sys/types.h>
-#define KERNEL
-#define _KERNEL
 #include <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
 #include <net/route.h>
 ], rtentry, rt_hash)
 
 AC_CHECK_STRUCT_FOR([
 #include <sys/types.h>
-#define KERNEL
-#define _KERNEL
 #include <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
 #include <net/route.h>
 ], rtentry, rt_use)
 
