aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-07-15 19:43:01 +0000
committerGuy Harris <guy@alum.mit.edu>2010-07-15 19:43:01 +0000
commitd7e9136268ff24681a51a6f0f20c0143f7075ceb (patch)
tree900adfbb329e9006fc47a1e41ba86c6c8ea1985d
parent31a8e4498ac386dfc957b66bbd9d84d361ee3fc6 (diff)
Only link programs that call stuff in Application Services or Core
Foundation with those frameworks. svn path=/trunk/; revision=33541
-rw-r--r--Makefile.am9
-rw-r--r--configure.in11
2 files changed, 12 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am
index da95c6d72d..14a0d1a492 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -322,7 +322,8 @@ wireshark_LDADD = \
@C_ARES_LIBS@ \
@ADNS_LIBS@ \
@KRB5_LIBS@ \
- @FRAMEWORKS@ \
+ @LAUNCHSERVICES_FRAMEWORKS@ \
+ @CORESERVICES_FRAMEWORKS@ \
@LIBGCRYPT_LIBS@ \
@LIBGNUTLS_LIBS@ \
@LIBSMI_LDFLAGS@ \
@@ -350,7 +351,7 @@ tshark_LDADD = \
@C_ARES_LIBS@ \
@ADNS_LIBS@ \
@KRB5_LIBS@ \
- @FRAMEWORKS@ \
+ @CORESERVICES_FRAMEWORKS@ \
@LIBGCRYPT_LIBS@ \
@LIBGNUTLS_LIBS@ \
@LIBSMI_LDFLAGS@
@@ -377,7 +378,7 @@ rawshark_LDADD = \
@C_ARES_LIBS@ \
@ADNS_LIBS@ \
@KRB5_LIBS@ \
- @FRAMEWORKS@ \
+ @CORESERVICES_FRAMEWORKS@ \
@LIBGCRYPT_LIBS@ \
@LIBGNUTLS_LIBS@ \
@LIBSMI_LDFLAGS@
@@ -456,7 +457,7 @@ dumpcap_LDADD = \
@PCAP_LIBS@ \
@SOCKET_LIBS@ \
@NSL_LIBS@ \
- @FRAMEWORKS@ \
+ @CORESERVICES_FRAMEWORKS@ \
@LIBCAP_LIBS@
dumpcap_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
diff --git a/configure.in b/configure.in
index 9eee446638..75f7d9a6d7 100644
--- a/configure.in
+++ b/configure.in
@@ -463,8 +463,9 @@ case "$host_os" in
darwin*)
AC_MSG_CHECKING([whether we can build with Core Foundation, Launch Services, and Core Services])
ac_save_LIBS="$LIBS"
- ac_frameworks="-framework ApplicationServices -framework CoreFoundation -framework CoreServices"
- LIBS="$LIBS $ac_frameworks"
+ 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>
@@ -490,7 +491,8 @@ darwin*)
[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])
- FRAMEWORKS="$ac_frameworks"
+ CORESERVICES_FRAMEWORKS="$ac_coreservices_frameworks"
+ LAUNCHSERVICES_FRAMEWORKS="$ac_launchservices_frameworks"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
@@ -498,7 +500,8 @@ darwin*)
LIBS="$ac_save_LIBS"
;;
esac
-AC_SUBST(FRAMEWORKS)
+AC_SUBST(CORESERVICES_FRAMEWORKS)
+AC_SUBST(LAUNCHSERVICES_FRAMEWORKS)
#
# If using $prefix we add "$prefix/include" to the include search path