diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-06-22 21:15:41 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-06-22 21:15:41 +0000 |
commit | 9f64b7b9be85d8117e34eb855f365e2c7597d2e7 (patch) | |
tree | 5b3dc7b4966de85fc20da0bfc2a91fa215aafec7 /configure.in | |
parent | 0ba732a3d0cc4d181d42f08cc2faecfb4a172971 (diff) |
To test whether we can build with OS X frameworks, try building with
those frameworks.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11214 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/configure.in b/configure.in index 3a72fee21a..0d517ea29b 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.270 2004/06/22 15:18:45 gerald Exp $ +# $Id: configure.in,v 1.271 2004/06/22 21:15:41 guy Exp $ # AC_INIT(etypes.h) @@ -167,16 +167,37 @@ fi case "$host_os" in darwin*) - AC_MSG_CHECKING(whether to build with Core Foundation and Launch Services) - if test -f /System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h -a \ - -f /System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Headers/LSOpen.h - then + AC_MSG_CHECKING(whether we can build with Core Foundation and Launch Services) + ac_save_LIBS="$LIBS" + ac_frameworks="-framework ApplicationServices -framework CoreFoundation" + LIBS="$LIBS $ac_frameworks" + AC_TRY_LINK( + [ +# include <CoreFoundation/CFBase.h> +# include <CoreFoundation/CFString.h> +# include <CoreFoundation/CFURL.h> +# include <ApplicationServices/ApplicationServices.h> + ], + [ + CFStringRef url_CFString; + CFURLRef url_CFURL; + OSStatus status; + + url_CFString = CFStringCreateWithCString(NULL, "", kCFStringEncodingASCII); + url_CFURL = CFURLCreateWithString(NULL, url_CFString, NULL); + status = LSOpenCFURLRef(url_CFURL, NULL); + ], + ac_cv_can_use_cf_and_ls=yes, + ac_cv_can_use_cf_and_ls=no, + [echo $ac_n "cross compiling; assumed OK... $ac_c"]) + if test "$ac_cv_can_use_cf_and_ls" = yes ; then AC_DEFINE(HAVE_OS_X_FRAMEWORKS, 1, [Define to 1 if you have OS X frameworks]) - FRAMEWORKS="-framework ApplicationServices -framework CoreFoundation" + FRAMEWORKS="$ac_frameworks" AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi + LIBS="$ac_save_LIBS" ;; esac AC_SUBST(FRAMEWORKS) |