summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2010-01-02 14:03:05 -0500
committerRichard Hughes <richard@hughsie.com>2010-01-03 08:54:30 +0000
commit131bc12a81855a30cc300dff237ac78f803e595f (patch)
tree2b5a1536f64f845c18e5cf78903874060f14c059 /configure.ac
parent725acd4d354c27eb5828e8d6e388ecf34a7c6303 (diff)
import the FreeBSD backend
Add a backend for FreeBSD supporting AC power lines, batteries, and lid state.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 38a5ba8..438e18d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -149,11 +149,14 @@ dnl - Compile time default choice of backend
dnl ---------------------------------------------------------------------------
AC_ARG_WITH([backend],
AS_HELP_STRING([--with-backend=<option>],
- [Default backend to use linux, dummy (dummy)]))
+ [Default backend to use linux, freebsd, dummy (dummy)]))
+UDEV_RULES=
# default to a sane option
if test x$with_backend = x; then
if test -e /usr/include/gudev-1.0/gudev/gudev.h ; then
with_backend=linux
+ elif test -e /usr/include/dev/acpica/acpiio.h ; then
+ with_backend=freebsd
else
with_backend=dummy
fi
@@ -170,11 +173,14 @@ if test x$with_backend = xlinux; then
dnl Check libusb also
AC_CHECK_HEADERS(usb.h, , [AC_MSG_ERROR([Can't find usb.h. Please install libusb.])])
AC_CHECK_LIB([usb], [usb_find_devices], [], [AC_MSG_ERROR([Can't use libusb.])])
+ UDEV_RULES="rules"
fi
+AC_SUBST(UDEV_RULES)
# export to Makefile.am
AM_CONDITIONAL(BACKEND_TYPE_DUMMY, [test x$with_backend = xdummy])
AM_CONDITIONAL(BACKEND_TYPE_LINUX, [test x$with_backend = xlinux])
+AM_CONDITIONAL(BACKEND_TYPE_FREEBSD, [test x$with_backend = xfreebsd])
dnl ---------------------------------------------------------------------------
dnl - Build self tests
@@ -201,6 +207,7 @@ Makefile
devkit-power-gobject.pc
src/Makefile
src/dummy/Makefile
+src/freebsd/Makefile
src/linux/Makefile
tools/Makefile
doc/Makefile