diff options
Diffstat (limited to 'm4/ltdl.m4')
-rw-r--r-- | m4/ltdl.m4 | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/m4/ltdl.m4 b/m4/ltdl.m4 index 46535e2e1..eb8db0cd1 100644 --- a/m4/ltdl.m4 +++ b/m4/ltdl.m4 | |||
@@ -7,7 +7,7 @@ | |||
7 | # unlimited permission to copy and/or distribute it, with or without | 7 | # unlimited permission to copy and/or distribute it, with or without |
8 | # modifications, as long as this notice is preserved. | 8 | # modifications, as long as this notice is preserved. |
9 | 9 | ||
10 | # serial 17 LTDL_INIT | 10 | # serial 15 LTDL_INIT |
11 | 11 | ||
12 | # LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE]) | 12 | # LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE]) |
13 | # ------------------------------------------ | 13 | # ------------------------------------------ |
@@ -212,10 +212,26 @@ m4_define([$0], []) | |||
212 | # of into LIBOBJS. | 212 | # of into LIBOBJS. |
213 | AC_DEFUN([_LT_LIBOBJ], [ | 213 | AC_DEFUN([_LT_LIBOBJ], [ |
214 | m4_pattern_allow([^_LT_LIBOBJS$]) | 214 | m4_pattern_allow([^_LT_LIBOBJS$]) |
215 | AS_LITERAL_IF([$1], [_LT_LIBSOURCES([$1.c])])dnl | ||
215 | _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext" | 216 | _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext" |
216 | ])# _LT_LIBOBJS | 217 | ])# _LT_LIBOBJS |
217 | 218 | ||
218 | 219 | ||
220 | # _LT_LIBSOURCES(MODULE_NAMES) | ||
221 | # ---------------------------- | ||
222 | # Like AC_LIBSOURCES, except the directory where the libltdl source files | ||
223 | # are expected is distinct from the user LIBOBJ directory. | ||
224 | AC_DEFUN([_LT_LIBSOURCES], [ | ||
225 | m4_foreach([_LTNAME], [$1], [ | ||
226 | m4_syscmd([test -r "$lt_libobj_prefix]_LTNAME[" || | ||
227 | test -z "$lt_libobj_prefix" || | ||
228 | test ! -d "$lt_libobj_prefix"])dnl | ||
229 | m4_if(m4_sysval, [0], [], | ||
230 | [AC_FATAL([missing $lt_libobj_prefix/]_LTNAME)]) | ||
231 | ]) | ||
232 | ])# _LT_LIBSOURCES | ||
233 | |||
234 | |||
219 | # LTDL_INIT([OPTIONS]) | 235 | # LTDL_INIT([OPTIONS]) |
220 | # -------------------- | 236 | # -------------------- |
221 | # Clients of libltdl can use this macro to allow the installer to | 237 | # Clients of libltdl can use this macro to allow the installer to |
@@ -229,9 +245,9 @@ _LT_SET_OPTIONS([$0], [$1]) | |||
229 | 245 | ||
230 | dnl We need to keep our own list of libobjs separate from our parent project, | 246 | dnl We need to keep our own list of libobjs separate from our parent project, |
231 | dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while | 247 | dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while |
232 | dnl we look for our own LIBOBJs. | 248 | dnl we look for our own LIBOBJs. Definitions in ltdl-libobj.m4. |
233 | m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ])) | 249 | m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ])) |
234 | m4_pushdef([AC_LIBSOURCES]) | 250 | m4_pushdef([AC_LIBSOURCES], m4_defn([_LT_LIBSOURCES])) |
235 | 251 | ||
236 | dnl If not otherwise defined, default to the 1.5.x compatible subproject mode: | 252 | dnl If not otherwise defined, default to the 1.5.x compatible subproject mode: |
237 | m4_if(_LTDL_MODE, [], | 253 | m4_if(_LTDL_MODE, [], |
@@ -248,7 +264,7 @@ if test "x$with_included_ltdl" != xyes; then | |||
248 | # decide whether there is a useful installed version we can use. | 264 | # decide whether there is a useful installed version we can use. |
249 | AC_CHECK_HEADER([ltdl.h], | 265 | AC_CHECK_HEADER([ltdl.h], |
250 | [AC_CHECK_DECL([lt_dlinterface_register], | 266 | [AC_CHECK_DECL([lt_dlinterface_register], |
251 | [AC_CHECK_LIB([ltdl], [lt_dladvise_preload], | 267 | [AC_CHECK_LIB([ltdl], [lt_dlinterface_register], |
252 | [with_included_ltdl=no], | 268 | [with_included_ltdl=no], |
253 | [with_included_ltdl=yes])], | 269 | [with_included_ltdl=yes])], |
254 | [with_included_ltdl=yes], | 270 | [with_included_ltdl=yes], |
@@ -380,6 +396,12 @@ m4_require([_LT_HEADER_DLFCN])dnl | |||
380 | m4_require([_LT_CHECK_DLPREOPEN])dnl | 396 | m4_require([_LT_CHECK_DLPREOPEN])dnl |
381 | m4_require([_LT_DECL_SED])dnl | 397 | m4_require([_LT_DECL_SED])dnl |
382 | 398 | ||
399 | # lt_cv_dlopen_self gets defined by LT_SYS_DLOPEN_SELF, called by LT_INIT | ||
400 | if test "$lt_cv_dlopen_self" = yes; then | ||
401 | AC_DEFINE([LTDL_DLOPEN_SELF_WORKS], [1], | ||
402 | [Define if dlopen(NULL) is able to resolve symbols from the main program.]) | ||
403 | fi | ||
404 | |||
383 | dnl Don't require this, or it will be expanded earlier than the code | 405 | dnl Don't require this, or it will be expanded earlier than the code |
384 | dnl that sets the variables it relies on: | 406 | dnl that sets the variables it relies on: |
385 | _LT_ENABLE_INSTALL | 407 | _LT_ENABLE_INSTALL |
@@ -407,8 +429,6 @@ AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h], | |||
407 | AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])]) | 429 | AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])]) |
408 | AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])]) | 430 | AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])]) |
409 | 431 | ||
410 | AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension]) | ||
411 | |||
412 | name=ltdl | 432 | name=ltdl |
413 | LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""` | 433 | LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""` |
414 | AC_SUBST([LTDLOPEN]) | 434 | AC_SUBST([LTDLOPEN]) |