aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-06-22 00:40:03 +0000
committerGuy Harris <guy@alum.mit.edu>2004-06-22 00:40:03 +0000
commit9bb3e4cf9ea1753a97f48702cc1f48517a37cb34 (patch)
tree4640ebd49343a1f861d2681a2d84a5f0bfec7337 /configure.in
parent388af2fccbae91e4e676f58fbaddb8a2077f3f8d (diff)
On Mac OS X, use Launch Services to start a Web browser with a given URL.
svn path=/trunk/; revision=11208
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in31
1 files changed, 30 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index eb5ea4477d..7fddf462a2 100644
--- a/configure.in
+++ b/configure.in
@@ -1,4 +1,4 @@
-# $Id: configure.in,v 1.268 2004/06/19 04:12:56 guy Exp $
+# $Id: configure.in,v 1.269 2004/06/22 00:40:02 guy Exp $
#
AC_INIT(etypes.h)
@@ -152,6 +152,35 @@ else
esac
fi
+#
+# On OS X, if we find the headers for Core Foundation and Launch Services,
+# add -framework options to link with Application Services (of which
+# Launch Services is a subframework) and Core Foundation (required by
+# the Launch Services APIs), so we can use that to launch a Web browser
+# from the Help menu.
+#
+# (Do those headers exist on pure Darwin? If so, does the CoreFoundation
+# *and* Launch Services code exist there, or are those headers just stubs?
+# If the frameworks aren't present on Darwin, how *should* we check for
+# their existence?)
+#
+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_DEFINE(HAVE_OS_X_FRAMEWORKS, 1, [Define to 1 if you have OS X frameworks])
+ FRAMEWORKS="-framework ApplicationServices -framework CoreFoundation"
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
+ ;;
+esac
+AC_SUBST(FRAMEWORKS)
+
dnl Look in /usr/local for header files and libraries ?
dnl XXX FIXME don't include /usr/local if it is already in the system
dnl search path as this causes gcc 3.2 on Linux to complain about a change