dnl Check to see if dlopen is in default libraries (like Solaris, which
dnl has it in libc), or if libdl is needed to get it.
-AC_CHECK_FUNC([dlopen], [DEFINES="$DEFINES -DHAVE_DLOPEN"],
+AC_CHECK_FUNC([dlopen], [],
[AC_CHECK_LIB([dl], [dlopen],
- [DEFINES="$DEFINES -DHAVE_DLOPEN"; DLOPEN_LIBS="-ldl"])])
+ [DLOPEN_LIBS="-ldl"])])
AC_SUBST([DLOPEN_LIBS])
dnl Check if that library also has dladdr
else
dep_dl = cc.find_library('dl')
endif
-pre_args += '-DHAVE_DLOPEN'
if not cc.has_function('dladdr', dependencies : dep_dl)
error('dl library doesn\'t have dladdr')
if not env['gles']:
# prevent _glapi_* from being declared __declspec(dllimport)
env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS'])
-else:
- env.Append(CPPDEFINES = [
- ('HAVE_DLOPEN', '1'),
- ])
# parse Makefile.sources
source_lists = env.ParseSourceList('Makefile.sources')