summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-03-04 12:49:48 -0800
committerJeremy Huddleston <jeremyhu@apple.com>2011-03-04 12:49:48 -0800
commitc0a233895cc8270ec0ff0bd2abb88d3f6dd524c3 (patch)
tree32dea4bb7c87054ec95817c081a8a9f756fcf61c
parentabf6062715c7d1390e516261a31abde4ed7ea64e (diff)
darwin: Don't use poll() when expected to run on darwin10 and prior
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r--configure.ac22
1 files changed, 18 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 77ce341..2c35ea4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,11 +67,25 @@ AC_SUBST(LDFLAGS_FOR_BUILD)
# Map function checks to old Imake #defines
case $host_os in
- # darwin has poll() but can't be used to poll character devices (atleast through SnowLeopard)
- darwin*) ;;
+ # darwin through Snow Leopard has poll() but can't be used to poll character devices.
+ darwin@<:@789@:>@*|darwin10*) ;;
+ darwin*)
+ _ac_xorg_macosx_version_min=""
+ if echo $CPPFLAGS $CFLAGS | grep -q mmacosx-version-min ; then
+ _ac_xorg_macosx_version_min=`echo $CPPFLAGS $CFLAGS | sed 's/^.*-mmacosx-version-min=\(@<:@^ @:>@*\).*$/\1/'`
+ else
+ _ac_xorg_macosx_version_min=$MACOSX_DEPLOYMENT_TARGET
+ fi
+ case $_ac_xorg_macosx_version_min in
+ 10.@<:@0123456@:>@|10.@<:@0123456@:>@.*) ;;
+ *)
+ AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], )
+ ;;
+ esac
+ unset _ac_xorg_macosx_version_min
+ ;;
*)
- AC_CHECK_FUNC(poll, AC_DEFINE(USE_POLL,1,
- [Define to 1 if you have the "poll" function.]))
+ AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], )
;;
esac