$NetBSD: patch-na,v 1.12 2021/01/17 08:14:13 wiz Exp $ * Remove gtk-doc support to fix build with autoconf 2.70. * Includes upstream patch to build on Linux systems without V4L1 support. http://cgit.freedesktop.org/hal/commit/?id=8f624253f0135ca77a893ad4e8168f51ef90d4da --- configure.in.orig 2009-08-24 12:42:29.000000000 +0000 +++ configure.in @@ -197,7 +197,7 @@ fi AC_SUBST(EJECT_PROGRAM) AC_DEFINE_UNQUOTED(EJECT_PROGRAM, "$EJECT_PROGRAM", [Eject program to use]) -GTK_DOC_CHECK([1.3]) +AM_CONDITIONAL([HAVE_GTK_DOC], false) # ACPI event source AC_ARG_ENABLE([acpi-acpid], @@ -479,12 +479,16 @@ if test "x$with_libpci" != xno ; then fi AM_CONDITIONAL([HAVE_LIBPCI], [test "x$USE_LIBPCI" = "xyes"]) +AC_CHECK_HEADERS([linux/videodev.h], [have_videodev_h=yes], []) +AM_CONDITIONAL(HAVE_V4L1, [test "x$have_videodev_h" = "xyes"]) + USE_LIBUSB20=no USE_LIBUSB=no LIBUSB20_LIBS="" +LIBUFS_LIBS="" AC_ARG_WITH([backend], AS_HELP_STRING([--with-backend=], - [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" @@ -493,6 +497,9 @@ else *-*-solaris*) HALD_BACKEND="solaris" ;; + *-*-netbsd*) + HALD_BACKEND="netbsd" + ;; *-*-freebsd* | *-*-kfreebsd*-gnu) HALD_BACKEND="freebsd" ;; @@ -508,8 +515,10 @@ 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) if test "x$HALD_BACKEND" = "xfreebsd"; then + AC_SEARCH_LIBS([ufs_disk_fillout], [ufs], [LIBUFS_LIBS="-lufs"], []) AC_CHECK_LIB([usb20], [libusb20_dev_get_info], [USE_LIBUSB20=yes], [USE_LIBUSB20=no]) fi if test "x$USE_LIBUSB20" = "xno"; then @@ -526,6 +535,8 @@ elif test "x$USE_LIBUSB" = "xyes"; then fi AC_SUBST(LIBUSB20_LIBS) +AC_SUBST(LIBUFS_LIBS) + dnl DBUS API is subject to changes AC_DEFINE_UNQUOTED(DBUS_API_SUBJECT_TO_CHANGE, [], [DBUS API is subject to change]) @@ -706,8 +717,8 @@ else fi AC_MSG_RESULT($have_glib_2_14) -case "$host" in - *-*-freebsd*) +case "$HALD_BACKEND" in + freebsd | netbsd) PKG_CHECK_MODULES(VOLUME_ID, [$volume_id_module]) AC_SUBST(VOLUME_ID_CFLAGS) AC_SUBST(VOLUME_ID_LIBS) @@ -718,14 +729,13 @@ esac # blkid (util-linux-ng) case "$host" in -*-*-freebsd*) - ;; -*-*-solaris*) - ;; -*) +*linux*) PKG_CHECK_MODULES(BLKID, [$blkid_module]) AC_SUBST(BLKID_CFLAGS) AC_SUBST(BLKID_LIBS) + ;; +*) + ;; esac # OS specific libs @@ -1086,6 +1096,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 @@ -1096,6 +1109,7 @@ libhal-storage/Makefile tools/Makefile tools/freebsd/Makefile tools/linux/Makefile +tools/netbsd/Makefile partutil/Makefile policy/Makefile fdi/Makefile