diff options
author | Pali Rohár <[email protected]> | 2014-08-08 18:31:07 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2014-08-08 19:26:39 +0100 |
commit | 39a4cc45a417bea3bb1cfbe20ea5045200f76c25 (patch) | |
tree | d6f9449d1e831f95e2774d12018fb328534541dd /configure.ac | |
parent | 16826a36efcae53b1eb606efd2ce9d05b84cac4c (diff) |
configure: check for dladdr via AC_CHECK_FUNC/AC_CHECK_LIB
Use both macros as in some cases using AC_CHECK_FUNCS alone may fail.
Thus HAVE_DLADDR will not be defined, and as a result most of the code
in megadriver_stub.c will not be compiled. Breaking the backwards
compatibility between older libGL/xserver(s) and DRI megadrivers.
Cc: Jon TURNEY <[email protected]>
Cc: "10.2" <[email protected]>
[Emil Velikov] Commit message.
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index f311419d892..1f84f167e86 100644 --- a/configure.ac +++ b/configure.ac @@ -535,10 +535,9 @@ AC_CHECK_FUNC([dlopen], [DEFINES="$DEFINES -DHAVE_DLOPEN"], AC_SUBST([DLOPEN_LIBS]) dnl Check if that library also has dladdr -save_LDFLAGS="$LDFLAGS" -LDFLAGS="$LDFLAGS $DLOPEN_LIBS" -AC_CHECK_FUNCS([dladdr]) -LDFLAGS="$save_LDFLAGS" +AC_CHECK_FUNC([dladdr], [DEFINES="$DEFINES -DHAVE_DLADDR"], + [AC_CHECK_LIB([dl], [dladdr], + [DEFINES="$DEFINES -DHAVE_DLADDR"])]) case "$host_os" in darwin*|mingw*) |