OSX 10.9 Mavericks
Arran Cudbard-Bell
a.cudbardb at freeradius.org
Thu Oct 24 00:35:31 CEST 2013
Now builds, despite Apple gutting /usr/include and /usr/lib.
It’ll default to the version of the SDK appropriate for your OS, and should work OK with 3rd party clang and gcc (after the hacks that just went in).
case "$host" in
*-darwin*)
dnl #
dnl # The version of GCC apple ships with Mavericks works out of the
dnl # box, and presumably selects the highest version SDK for OSX.
dnl #
AC_MSG_CHECKING([if cc is apple llvm])
if ! $CC --version 2>&1 | grep -I 'Apple LLVM' > /dev/null; then
AC_MSG_RESULT(no)
AC_CHECK_PROG(SW_VERS, sw_vers, yes, no)
AC_CHECK_PROG(XCODEBUILD, xcodebuild, yes, no)
if test "x$SW_VERS" = "xyes" && test "x$XCODEBUILD" = "xyes"; then
AC_MSG_NOTICE([determining OSX SDK path])
osx_sdk_path=$(xcodebuild -version -sdk macosx$(sw_vers -productVersion) Path)
AC_MSG_RESULT([$osx_sdk_path])
dnl #
dnl # We need to export these, else the child configure scripts all fail
dnl # their compiler checks.
dnl #
export CFLAGS="--sysroot=$osx_sdk_path $CFLAGS"
export CPPFLAGS="--sysroot=$osx_sdk_path $CPPFLAGS"
export LDFLAGS="-L$osx_sdk_path/usr/lib/ $LDFLAGS"
fi
else
AC_MSG_RESULT(yes)
fi
;;
Mmm crunchy. Let me know if this breaks older OSX versions.
Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS Development Team
More information about the Freeradius-Devel
mailing list