summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNathan Hjelm <hjelmn@mac.com>2009-02-16 21:39:29 -0300
committerDaniel Drake <dsd@gentoo.org>2009-02-16 21:40:45 -0300
commitb49f6bf5c910d0fd694ecf165d7927673707bff9 (patch)
treead2a648eeef9ce04567f5717f3d9831f3ccdb0e9 /configure.ac
parentd859158581e9a3250f36cdeeb8ea67cda04053bd (diff)
downloadlibusb-b49f6bf5c910d0fd694ecf165d7927673707bff9.tar.gz
Darwin backend
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 2e344f7..0b586bc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,12 +18,21 @@ case $host in
AC_MSG_RESULT([Linux])
backend="linux"
AC_CHECK_LIB(rt, clock_gettime)
+ AM_LDFLAGS=""
+ ;;
+*-darwin*)
+ AC_DEFINE(OS_DARWIN, [], [Darwin backend])
+ AC_SUBST(OS_DARWIN)
+ AC_MSG_RESULT([Darwin/MacOS X])
+ backend="darwin"
+ AM_LDFLAGS="-Wl,-framework -Wl,IOKit -Wl,-framework -Wl,CoreFoundation -Wl,-prebind -no-undefined"
;;
*)
AC_MSG_ERROR([unsupported operating system])
esac
AM_CONDITIONAL([OS_LINUX], [test "x$backend" == "xlinux"])
+AM_CONDITIONAL([OS_DARWIN], [test "x$backend" == "xdarwin"])
# Library versioning
lt_major="0"
@@ -64,7 +73,9 @@ CFLAGS="$saved_cflags"
AC_DEFINE([API_EXPORTED], [__attribute__((visibility("default")))], [Default visibility])
AM_CFLAGS="-std=gnu99 $inline_cflags -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wno-pointer-sign -Wshadow"
+
AC_SUBST(AM_CFLAGS)
+AC_SUBST(AM_LDFLAGS)
AC_CONFIG_FILES([libusb-1.0.pc] [Makefile] [libusb/Makefile] [examples/Makefile] [doc/Makefile] [doc/doxygen.cfg])
AC_OUTPUT