Commit 16fc5c3b authored by stolz's avatar stolz
Browse files

[project @ 2002-03-26 16:36:09 by stolz]

Add dlopen() and friends to package 'posix'.
A configure-test for RTLD_NEXT is required. Record if -ldl is
required in posix.conf.
parent 22348fd0
...@@ -369,6 +369,9 @@ ...@@ -369,6 +369,9 @@
/* Define if you need -ldl to get dlopen() */ /* Define if you need -ldl to get dlopen() */
#undef HAVE_LIBDL #undef HAVE_LIBDL
/* Define if we can see RTLD_NEXT in dlfcn.h */
#undef HAVE_RTLDNEXT
/* Define if C compiler supports long long types */ /* Define if C compiler supports long long types */
#undef HAVE_LONG_LONG #undef HAVE_LONG_LONG
......
...@@ -958,6 +958,8 @@ dnl ################################################################ ...@@ -958,6 +958,8 @@ dnl ################################################################
dnl Check for libraries dnl Check for libraries
dnl ################################################################ dnl ################################################################
dnl ** check for libdl & RTLD_NEXT
AC_CHECK_LIB(dl, dlopen, AC_CHECK_LIB(dl, dlopen,
[HaveLibDL=YES [HaveLibDL=YES
AC_DEFINE(HAVE_LIBDL) AC_DEFINE(HAVE_LIBDL)
...@@ -966,6 +968,24 @@ AC_CHECK_LIB(dl, dlopen, ...@@ -966,6 +968,24 @@ AC_CHECK_LIB(dl, dlopen,
AC_CHECK_FUNCS(dlopen) AC_CHECK_FUNCS(dlopen)
AC_SUBST(HaveLibDL) AC_SUBST(HaveLibDL)
dnl ** sometimes RTLD_NEXT is hidden in #ifdefs we really don't wan to set
AC_MSG_CHECKING(for RTLD_NEXT from dlfcn.h)
AC_EGREP_CPP(yes,
[
#include <dlfcn.h>
#ifdef RTLD_NEXT
yes
#endif
], [
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_RTLDNEXT)
HaveRtldNext=YES
], [
AC_MSG_RESULT(no)
HaveRtldNext=NO
])
AC_SUBST(HaveRtldNext)
FPTOOLS_CHECK_LIB_NOWARN(m, atan) FPTOOLS_CHECK_LIB_NOWARN(m, atan)
dnl -------------------------------------------------- dnl --------------------------------------------------
......
This diff is collapsed.
...@@ -205,6 +205,7 @@ endif ...@@ -205,6 +205,7 @@ endif
GhcWithJavaGen=NO GhcWithJavaGen=NO
HaveLibDL = @HaveLibDL@ HaveLibDL = @HaveLibDL@
HaveRtldNext = @HaveRtldNext@
# Include GHCi in the compiler. Default to NO for the time being. # Include GHCi in the compiler. Default to NO for the time being.
...@@ -233,7 +234,7 @@ BuildingGranSim=$(subst mg,YES,$(filter mg,$(WAYS))) ...@@ -233,7 +234,7 @@ BuildingGranSim=$(subst mg,YES,$(filter mg,$(WAYS)))
ifeq "$(BootingFromHc)" "YES" ifeq "$(BootingFromHc)" "YES"
GhcLibWays= GhcLibWays=
else else
GhcLibWays=p GhcLibWays=
endif endif
# Option flags to pass to GHC when it's compiling modules in # Option flags to pass to GHC when it's compiling modules in
......
Supports Markdown
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