summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2009-11-03 22:51:29 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2009-11-09 16:59:31 +0000
commit1ce096657b2d38956e3229042f87aea42b0d0d8c (patch)
treef24ae969993d36fa128fb1134874b56a180c110a /configure.ac
parentc181f9e9aeac375eed07aaab58d177e3476d5117 (diff)
Fix compilation on MacOS X
Enable "ld_preload" (DYLD_INSERT_LIBRARIES + DYLD_FORCE_FLAT_NAMESPACE) and build cairo-trace as a library instead of a module to make it work also on MacOS X.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 16 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index ba3cbc06c..27404cd3c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -652,11 +652,26 @@ AM_CONDITIONAL(BUILD_ANY2PPM,
-o "x$any2ppm_cs" = "xyes")
dnl ===========================================================================
+dnl Some utilities need to dlopen the shared libraries, so they need to
+dnl know how libtools will name them
+
+case $host in
+*-*-darwin*)
+ SHLIB_EXT="dylib"
+ ;;
+*)
+ SHLIB_EXT="so"
+ ;;
+esac
+AC_DEFINE_UNQUOTED(SHARED_LIB_EXT, "${SHLIB_EXT}", [Shared library file extension])
+AC_SUBST(SHLIB_EXT)
+
+dnl ===========================================================================
dnl The tracing utility requires LD_PRELOAD, so only build it for systems
dnl that are known to work.
case $host in
-*-linux*|*-*bsd*|*-solaris*)
+*-linux*|*-*bsd*|*-solaris*|*-*-darwin*)
have_ld_preload="yes"
;;
*)