summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-08-21 16:18:39 +0200
committerHans de Goede <hdegoede@redhat.com>2013-08-21 16:18:39 +0200
commiteb4e7bee4488cefcf13929d9c4fe784650fef7c7 (patch)
treea8f7bc7bfe035c779fd76c46f1c015187aebf768 /configure.ac
parentc089900c486e94b067e4d30ef9047a80cbb6d689 (diff)
downloadlibusb-eb4e7bee4488cefcf13929d9c4fe784650fef7c7.tar.gz
openbsd: Split openbsd backend into separate openbsd and netbsd backends
Note the new netbsd_usb.c is an unmodified copy of openbsd_usb.c with s/obsd/netbsd done on it. The reason for this split is that the openbsd developers have been working on various improvements for their userspace usb support, and adding support for those means breaking netbsd support, by giving netbsd its own backend we can add support for the openbsd improvements without breaking netbsd support. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 15 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 72ed647..bb924f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,12 +59,12 @@ case $host in
;;
*-openbsd*)
AC_MSG_RESULT([OpenBSD])
- backend="bsd"
+ backend="openbsd"
threads="posix"
;;
*-netbsd*)
- AC_MSG_RESULT([NetBSD (using OpenBSD backend)])
- backend="bsd"
+ AC_MSG_RESULT([NetBSD])
+ backend="netbsd"
threads="posix"
;;
*-mingw*)
@@ -124,14 +124,22 @@ darwin)
[AC_DEFINE([POLL_NFDS_TYPE],[unsigned int],[type of second poll() argument])],
[#include <poll.h>])
;;
-bsd)
- AC_DEFINE(OS_OPENBSD, 1, [OpenBSD/NetBSD backend])
+openbsd)
+ AC_DEFINE(OS_OPENBSD, 1, [OpenBSD backend])
AC_SUBST(OS_OPENBSD)
THREAD_CFLAGS="-pthread"
LIBS="-pthread"
AC_CHECK_HEADERS([poll.h])
AC_DEFINE([POLL_NFDS_TYPE],[nfds_t],[type of second poll() argument])
;;
+netbsd)
+ AC_DEFINE(OS_NETBSD, 1, [NetBSD backend])
+ AC_SUBST(OS_NETBSD)
+ THREAD_CFLAGS="-pthread"
+ LIBS="-pthread"
+ AC_CHECK_HEADERS([poll.h])
+ AC_DEFINE([POLL_NFDS_TYPE],[nfds_t],[type of second poll() argument])
+ ;;
windows)
AC_DEFINE(OS_WINDOWS, 1, [Windows backend])
AC_SUBST(OS_WINDOWS)
@@ -145,7 +153,8 @@ AC_SUBST(LIBS)
AM_CONDITIONAL(OS_LINUX, test "x$backend" = xlinux)
AM_CONDITIONAL(OS_DARWIN, test "x$backend" = xdarwin)
-AM_CONDITIONAL(OS_OPENBSD, test "x$backend" = xbsd)
+AM_CONDITIONAL(OS_OPENBSD, test "x$backend" = xopenbsd)
+AM_CONDITIONAL(OS_NETBSD, test "x$backend" = xnetbsd)
AM_CONDITIONAL(OS_WINDOWS, test "x$backend" = xwindows)
AM_CONDITIONAL(THREADS_POSIX, test "x$threads" = xposix)
AM_CONDITIONAL(CREATE_IMPORT_LIB, test "x$create_import_lib" = "xyes")