summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorM Joonas Pihlaja <jpihlaja@cc.helsinki.fi>2009-09-13 17:35:29 -0600
committerM Joonas Pihlaja <jpihlaja@cc.helsinki.fi>2009-09-14 13:32:18 +0300
commitcf0fed2191c2b5ebce8855def1dd302ccf8e039a (patch)
tree9df818069ca795df41ec28c252b60e8e76811e2c /configure.ac
parent1c7ac6c47addd6825c4f49f514fe3ffb708e3813 (diff)
[build] Check for dlsym in both libdl and libc.
The BSDs have dlsym() in libc rather than libdl.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 7 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index d2c1231a..c38d2c49 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,10 +37,12 @@ AC_CHECK_LIB(z, compress,
[have_libz="no (requires zlib http://www.gzip.org/zlib/)"])
AC_CHECK_LIB(dl, dlsym,
- [AC_CHECK_HEADER(dlfcn.h, [
- have_dl=yes
- AC_DEFINE(HAVE_DL, 1, [Define to 1 if you have dl available])
- ], [have_dl=no])], [have_dl=no])
+ [have_dlsym=yes; have_dl=yes],
+ [have_dlsym=no; have_dl=no])
+if test "x$have_dlsym" = "xno"; then
+ AC_CHECK_FUNC(dlsym, [have_dlsym=yes], [have_dlsym=no])
+fi
+AC_CHECK_HEADERS(dlfcn.h, [have_dlsym=yes], [have_dlsym=no])
AM_CONDITIONAL(CAIRO_HAS_DL, test "x$have_dl" = "xyes")
dnl ===========================================================================
@@ -659,7 +661,7 @@ esac
CAIRO_ENABLE(trace, cairo-trace, auto, [
if test "x$have_ld_preload" != "xyes" -o \
"x$have_libz" != "xyes" -o \
- "x$have_dl" != "xyes"; then
+ "x$have_dlsym" != "xyes"; then
use_trace="no (requires dynamic linker and zlib)"
fi
])