Commit cc5e9f23 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵
Browse files

gmodule – Check for RTLD_LAZY and others in configure

They are no #defines on Android but enum values, and on 64 bit Android
they have different values than what we would otherwise fall-back to.

https://bugzilla.gnome.org/show_bug.cgi?id=776876
parent 83c1b881
......@@ -1489,6 +1489,16 @@ dnl *** check whether we need preceeding underscores
G_MODULE_NEED_USCORE=0
fi
AC_CHECK_DECL([RTLD_LAZY],
[AC_DEFINE(HAVE_RTLD_LAZY, 1, [Define to 1 if RTLD_LAZY is available])],
[], [[#include <dlfcn.h>]])
AC_CHECK_DECL([RTLD_NOW],
[AC_DEFINE(HAVE_RTLD_NOW, 1, [Define to 1 if RTLD_NOW is available])],
[], [[#include <dlfcn.h>]])
AC_CHECK_DECL([RTLD_GLOBAL],
[AC_DEFINE(HAVE_RTLD_GLOBAL, 1, [Define to 1 if RTLD_GLOBAL is available])],
[], [[#include <dlfcn.h>]])
LDFLAGS="$LDFLAGS_orig"
dnl *** check for having dlerror()
AC_CHECK_FUNC(dlerror,
......
......@@ -57,17 +57,18 @@
* RTLD_GLOBAL - the external symbols defined in the library will be made
* available to subsequently loaded libraries.
*/
#ifndef RTLD_LAZY
#ifndef HAVE_RTLD_LAZY
#define RTLD_LAZY 1
#endif /* RTLD_LAZY */
#ifndef RTLD_NOW
#ifndef HAVE_RTLD_NOW
#define RTLD_NOW 0
#endif /* RTLD_NOW */
/* some systems (OSF1 V5.0) have broken RTLD_GLOBAL linkage */
#ifdef G_MODULE_BROKEN_RTLD_GLOBAL
#undef RTLD_GLOBAL
#undef HAVE_RTLD_GLOBAL
#endif /* G_MODULE_BROKEN_RTLD_GLOBAL */
#ifndef RTLD_GLOBAL
#ifndef HAVE_RTLD_GLOBAL
#define RTLD_GLOBAL 0
#endif /* RTLD_GLOBAL */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment