$NetBSD: patch-na,v 1.4 2009/01/03 01:28:34 obache Exp $

--- configure.in.orig	2008-05-07 23:24:31.000000000 +0000
+++ configure.in
@@ -448,7 +448,7 @@ AM_CONDITIONAL([HAVE_LIBPCI], [test "x$U
 
 AC_ARG_WITH([backend],
 	    AS_HELP_STRING([--with-backend=<name>],
-	                   [backend to use (linux/solaris/freebsd/dummy)]),
+	                   [backend to use (linux/solaris/netbsd/freebsd/dummy)]),
 	    [backend=$withval])
 if ! test -z "$with_backend" ; then
     HALD_BACKEND="$with_backend"
@@ -457,6 +457,9 @@ else
         *-*-solaris*)
 		   HALD_BACKEND="solaris"
 		   ;;
+        *-*-netbsd*)
+                   HALD_BACKEND="netbsd"
+		   ;;
         *-*-freebsd*)
                    HALD_BACKEND="freebsd"
                    ;;
@@ -472,6 +475,7 @@ AM_CONDITIONAL(HALD_COMPILE_DUMMY, [test
 AM_CONDITIONAL(HALD_COMPILE_LINUX, [test x$HALD_BACKEND = xlinux], [Compiling for Linux])
 AM_CONDITIONAL(HALD_COMPILE_FREEBSD, [test x$HALD_BACKEND = xfreebsd], [Compiling for FreeBSD])
 AM_CONDITIONAL(HALD_COMPILE_SOLARIS, [test x$HALD_BACKEND = xsolaris], [Compiling for Solaris])
+AM_CONDITIONAL(HALD_COMPILE_NETBSD, [test x$HALD_BACKEND = xnetbsd], [Compiling for NetBSD])
 AC_SUBST(HALD_BACKEND)
 
 dnl DBUS API is subject to changes
@@ -641,13 +645,14 @@ fi
 AC_MSG_RESULT($have_glib_2_14)
 
 # volume_id
-case "$host" in
-*-*-solaris*)
-	;;
-*)
+case "$HALD_BACKEND" in
+linux|freebsd|netbsd)
 	PKG_CHECK_MODULES(VOLUME_ID, [$volume_id_module])
 	AC_SUBST(VOLUME_ID_CFLAGS)
 	AC_SUBST(VOLUME_ID_LIBS)
+	;;
+*)
+	;;
 esac
 
 # OS specific libs
@@ -1004,6 +1009,9 @@ hald/linux/addons/Makefile
 hald/solaris/Makefile
 hald/solaris/probing/Makefile
 hald/solaris/addons/Makefile
+hald/netbsd/Makefile
+hald/netbsd/probing/Makefile
+hald/netbsd/addons/Makefile
 hald/freebsd/Makefile
 hald/freebsd/probing/Makefile
 hald/freebsd/libprobe/Makefile
@@ -1014,6 +1022,7 @@ libhal-storage/Makefile
 tools/Makefile
 tools/freebsd/Makefile
 tools/linux/Makefile
+tools/netbsd/Makefile
 partutil/Makefile
 policy/Makefile
 fdi/Makefile
