* Added a check for Darwin's dyld API, that we'll prefer over dlopen.
git-svn-id: svn://svn.zoy.org/elk/trunk@124 55e467fa-43c5-0310-a8a2-de718669efc6
This commit is contained in:
parent
d96c52c6ad
commit
9b0193fa91
20
configure.ac
20
configure.ac
|
@ -154,11 +154,25 @@ fi
|
||||||
|
|
||||||
# Which mechanism should be used to dynamically load object files?
|
# Which mechanism should be used to dynamically load object files?
|
||||||
ac_cv_my_can_load_lib=no
|
ac_cv_my_can_load_lib=no
|
||||||
AC_CHECK_HEADERS(dlfcn.h, ac_cv_my_can_load_lib=yes)
|
|
||||||
|
AC_CHECK_HEADERS(mach-o/dyld.h,
|
||||||
|
[AC_CHECK_FUNCS(NSLinkModule,
|
||||||
|
[AC_DEFINE(HAVE_DL_DYLD, 1, [Define if you have the Darwin dyld API])
|
||||||
|
ac_cv_my_can_load_lib=yes])])
|
||||||
|
|
||||||
AC_CHECK_HEADERS(a.out.h, ac_cv_my_can_load_lib=yes)
|
AC_CHECK_HEADERS(a.out.h, ac_cv_my_can_load_lib=yes)
|
||||||
|
|
||||||
|
# Only test for dlopen() if the others didn't work
|
||||||
|
if test "${ac_cv_my_can_load_lib}" = "no"; then
|
||||||
|
AC_CHECK_HEADERS(dlfcn.h,
|
||||||
|
[AC_CHECK_LIB(dl, dlopen,
|
||||||
|
[AC_DEFINE(HAVE_DL_DLOPEN, 1, [Define if you have the dlopen API])
|
||||||
|
ELK_LIBS="${ELK_LIBS} -ldl"
|
||||||
|
ac_cv_my_can_load_lib=yes])])
|
||||||
|
fi
|
||||||
|
|
||||||
if test "${ac_cv_my_can_load_lib}" = "yes"; then
|
if test "${ac_cv_my_can_load_lib}" = "yes"; then
|
||||||
AC_DEFINE(CAN_LOAD_LIB, 1, [FIXME HARD])
|
AC_DEFINE(CAN_LOAD_LIB, 1, [Define if dynamic loading is supported])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Systems with "aout_format=ecoff" may require a call to the cacheflush
|
# Systems with "aout_format=ecoff" may require a call to the cacheflush
|
||||||
|
@ -422,7 +436,7 @@ AC_SUBST(MOTIF_LIBS)
|
||||||
|
|
||||||
dnl Export variables
|
dnl Export variables
|
||||||
INCLUDES="${INCLUDES} -I\$(top_srcdir)/include"
|
INCLUDES="${INCLUDES} -I\$(top_srcdir)/include"
|
||||||
ELK_LIBS="${ELK_LIBS} -lm -ldl"
|
ELK_LIBS="${ELK_LIBS} -lm"
|
||||||
AC_SUBST(INCLUDES)
|
AC_SUBST(INCLUDES)
|
||||||
AC_SUBST(ELK_LIBS)
|
AC_SUBST(ELK_LIBS)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue