diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-01-05 22:52:57 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-01-05 22:52:57 +0100 |
commit | 6dfb1ee27e031528891696c83230d4513c55b554 (patch) | |
tree | d17bcdf21366097589a024b6f46b33164f832448 /configure.ac | |
parent | 937c587e7720ee27b36fe736a2aa1cfd233270ec (diff) | |
parent | f452c6cdd9e5717340807478d759ef5a03b55f1f (diff) |
Merge remote branch 'zonque/topic/osx'
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index af60fff8..6b540e4a 100644 --- a/configure.ac +++ b/configure.ac @@ -172,6 +172,10 @@ case $host in AC_MSG_RESULT([linux]) pulse_target_os=linux ;; + *-*-darwin*) + AC_MSG_RESULT([darwin]) + pulse_target_os=darwin + ;; *) AC_MSG_RESULT([unknown]) pulse_target_os=unknown @@ -291,15 +295,21 @@ AC_SUBST([LIBLTDL]) #### Determine build environment #### os_is_win32=0 +os_is_darwin=0 case "$host_os" in mingw*) AC_DEFINE([OS_IS_WIN32], 1, [Build target is Windows.]) os_is_win32=1 ;; + darwin*) + AC_DEFINE([OS_IS_DARWIN], 1, [Build target is Darwin.]) + os_is_darwin=1 + ;; esac AM_CONDITIONAL(OS_IS_WIN32, test "x$os_is_win32" = "x1") +AM_CONDITIONAL(OS_IS_DARWIN, test "x$os_is_darwin" = "x1") ################################### # Basic environment checks # @@ -403,6 +413,22 @@ AC_SEARCH_LIBS([backtrace], [execinfo]) # build, disabling its ability to make dlls. AC_CHECK_FUNCS([getopt_long], [], [AC_CHECK_LIB([iberty], [getopt_long])]) +# Darwin/OS X +if test "x$os_is_darwin" = "x1" ; then + AC_MSG_CHECKING([looking for Apple CoreService Framework]) + # How do I check a framework "library" - AC_CHECK_LIB prob. won't work??, just assign LIBS & hope + AC_CHECK_HEADER([/Developer/Headers/FlatCarbon/CoreServices.h], + [LIBS="$LIBS -framework CoreServices"], + [AC_MSG_ERROR([CoreServices.h header file not found]) ]) + + AC_MSG_RESULT([ok]) + AC_DEFINE([HAVE_CLOCK_GETTIME], 1, [Using clock_gettime() replacement]) + HAVE_BONJOUR=1 +fi + +AC_SUBST(HAVE_BONJOUR) +AM_CONDITIONAL([HAVE_BONJOUR], [test "x$HAVE_BONJOUR" = x1]) + #### Check for functions #### # ISO |