forked from osmocom/wireshark
Assume, at least for now, that "Darwin" means "OS X"; don't bother
checking whether the relevant frameworks are available. (An iOS port's going to require a *lot* more work, and I don't know whether Darwin-the-pure-OS even builds and runs any more.) We don't need Core Services any more, as we're no longer using Gestalt(). We just need Core Foundation for getting the OS version and Application Services for firing up Web browser or file manager windows. svn path=/trunk/; revision=46129
This commit is contained in:
parent
07c4d6ef7f
commit
24d4323da6
10
Makefile.am
10
Makefile.am
|
@ -346,8 +346,8 @@ wireshark_LDADD = \
|
|||
@C_ARES_LIBS@ \
|
||||
@ADNS_LIBS@ \
|
||||
@KRB5_LIBS@ \
|
||||
@LAUNCHSERVICES_FRAMEWORKS@ \
|
||||
@CORESERVICES_FRAMEWORKS@ \
|
||||
@APPLICATIONSERVICES_FRAMEWORKS@ \
|
||||
@COREFOUNDATION_FRAMEWORKS@ \
|
||||
@PY_LIBS@ \
|
||||
@LIBGCRYPT_LIBS@ \
|
||||
@LIBGNUTLS_LIBS@ \
|
||||
|
@ -381,7 +381,7 @@ tshark_LDADD = \
|
|||
@C_ARES_LIBS@ \
|
||||
@ADNS_LIBS@ \
|
||||
@KRB5_LIBS@ \
|
||||
@CORESERVICES_FRAMEWORKS@ \
|
||||
@COREFOUNDATION_FRAMEWORKS@ \
|
||||
@PY_LIBS@ \
|
||||
@LIBGCRYPT_LIBS@ \
|
||||
@LIBGNUTLS_LIBS@ \
|
||||
|
@ -409,7 +409,7 @@ rawshark_LDADD = \
|
|||
@C_ARES_LIBS@ \
|
||||
@ADNS_LIBS@ \
|
||||
@KRB5_LIBS@ \
|
||||
@CORESERVICES_FRAMEWORKS@ \
|
||||
@COREFOUNDATION_FRAMEWORKS@ \
|
||||
@PY_LIBS@ \
|
||||
@LIBGCRYPT_LIBS@ \
|
||||
@LIBGNUTLS_LIBS@ \
|
||||
|
@ -496,7 +496,7 @@ dumpcap_LDADD = \
|
|||
@PCAP_LIBS@ \
|
||||
@SOCKET_LIBS@ \
|
||||
@NSL_LIBS@ \
|
||||
@CORESERVICES_FRAMEWORKS@ \
|
||||
@COREFOUNDATION_FRAMEWORKS@ \
|
||||
@LIBCAP_LIBS@
|
||||
dumpcap_CFLAGS = $(AM_CLEAN_CFLAGS)
|
||||
|
||||
|
|
77
configure.ac
77
configure.ac
|
@ -591,64 +591,41 @@ AC_SUBST(LDFLAGS_SHAREDLIB)
|
|||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
|
||||
|
||||
#
|
||||
# On OS X, if we find the headers for Core Foundation, Launch Services,
|
||||
# and Core Services, add -framework options to link with Application
|
||||
# Services (of which Launch Services is a subframework), Core Foundation
|
||||
# (required by the Launch Services APIs), and Core Services, so we can
|
||||
# use them to launch a Web browser from the Help menu and to use
|
||||
# Gestalt() to get the Mac OS X version number.
|
||||
# On "Darwin", which we assume to mean "OS X" rather than "iOS" or
|
||||
# "just Darwin" (as we don't currently support iOS, and as I don't
|
||||
# think you can build and run "just Darwin" as an OS for PCs), we
|
||||
# arrange to build some programs with Application Services so they
|
||||
# can launch Web browsers and Finder windows, and build any programs
|
||||
# that use either of those frameworks or that report version information
|
||||
# with Core Foundation as the frameworks in question use it and as we
|
||||
# get version information from plists and thus need Core Foundation
|
||||
# to process those plists.
|
||||
#
|
||||
case "$host_os" in
|
||||
|
||||
darwin*)
|
||||
AC_MSG_CHECKING([whether we can build with Core Foundation, Launch Services, and Core Services])
|
||||
ac_applicationservices_frameworks="-framework ApplicationServices"
|
||||
AC_DEFINE(HAVE_OS_X_FRAMEWORKS, 1, [Define to 1 if you have OS X frameworks])
|
||||
APPLICATIONSERVICES_FRAMEWORKS="-framework ApplicationServices"
|
||||
COREFOUNDATION_FRAMEWORKS="-framework CoreFoundation"
|
||||
|
||||
#
|
||||
# OK, so we have the OS X frameworks; do they include
|
||||
# CFPropertyListCreateWithStream, or do we have
|
||||
# to fall back on CFPropertyListCreateFromStream?
|
||||
# (They only differ in the error return, which we
|
||||
# don't care about. And, no, we shouldn't just
|
||||
# use CFPropertyListCreateFromStream, because it's
|
||||
# deprecated in newer releases.)
|
||||
#
|
||||
ac_save_LIBS="$LIBS"
|
||||
ac_coreservices_frameworks="-framework CoreServices"
|
||||
ac_launchservices_frameworks="-framework ApplicationServices -framework CoreFoundation $ac_coreservices_frameworks"
|
||||
LIBS="$LIBS $ac_launchservices_frameworks $ac_coreservices_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_osx_frameworks=yes,
|
||||
ac_cv_can_use_osx_frameworks=no,
|
||||
[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||
if test "$ac_cv_can_use_osx_frameworks" = yes ; then
|
||||
AC_DEFINE(HAVE_OS_X_FRAMEWORKS, 1, [Define to 1 if you have OS X frameworks])
|
||||
CORESERVICES_FRAMEWORKS="$ac_coreservices_frameworks"
|
||||
LAUNCHSERVICES_FRAMEWORKS="$ac_launchservices_frameworks"
|
||||
AC_MSG_RESULT(yes)
|
||||
|
||||
#
|
||||
# OK, so we have the OS X frameworks; do they include
|
||||
# CFPropertyListCreateWithStream, or do we have
|
||||
# to fall back on CFPropertyListCreateFromStream?
|
||||
# (They only differ in the error return, which we
|
||||
# don't care about. And, no, we shouldn't just
|
||||
# use CFPropertyListCreateFromStream, because it's
|
||||
# deprecated in newer releases.)
|
||||
#
|
||||
AC_CHECK_FUNCS(CFPropertyListCreateWithStream)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
LIBS="$LIBS $COREFOUNDATION_FRAMEWORKS"
|
||||
AC_CHECK_FUNCS(CFPropertyListCreateWithStream)
|
||||
LIBS="$ac_save_LIBS"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(CORESERVICES_FRAMEWORKS)
|
||||
AC_SUBST(LAUNCHSERVICES_FRAMEWORKS)
|
||||
AC_SUBST(APPLICATIONSERVICES_FRAMEWORKS)
|
||||
AC_SUBST(COREFOUNDATION_FRAMEWORKS)
|
||||
|
||||
#
|
||||
# If using $prefix we add "$prefix/include" to the include search path
|
||||
|
|
Loading…
Reference in New Issue