if WITH_MODULES
MagickCore_libMagickCore_la_SOURCES = $(MAGICKCORE_BASE_SRCS) $(MAGICKCORE_PLATFORM_SRCS)
-MagickCore_libMagickCore_la_LIBADD = $(MAGICK_DEP_LIBS) $(MAGICK_LIBLTDL)
+MagickCore_libMagickCore_la_LIBADD = $(MAGICK_DEP_LIBS)
else
MagickCore_libMagickCore_la_SOURCES = $(MAGICKCORE_BASE_SRCS) $(MAGICKCORE_PLATFORM_SRCS) $(MAGICKCORE_CODER_SRCS) $(MAGICKCORE_FILTER_SRCS)
-MagickCore_libMagickCore_la_LIBADD = $(MAGICK_DEP_LIBS) $(MAGICK_LIBLTDL)
+MagickCore_libMagickCore_la_LIBADD = $(MAGICK_DEP_LIBS)
endif # WITH_MODULES
MagickCore_libMagickCore_la_CPPFLAGS = -I$(top_builddir)/ltdl -I$(top_srcdir)/ltdl $(LIBRARY_EXTRA_CPPFLAGS)
MagickCore_libMagickCore_la_LDFLAGS = -no-undefined -export-symbols-regex ".*" \
$(OSX_GCOV_LDFLAG) $(MAGICK_LT_RELEASE_OPTS) -version-info \
$(MAGICK_LIBRARY_CURRENT):$(MAGICK_LIBRARY_REVISION):$(MAGICK_LIBRARY_AGE)
-MagickCore_libMagickCore_la_DEPENDENCIES = $(MAGICK_LTDLDEPS)
+MagickCore_libMagickCore_la_DEPENDENCIES =
# Library base sources
MAGICKCORE_BASE_SRCS = \
/* #undef AUTOTRACE_DELEGATE */
/* Define if coders and filters are to be built as modules. */
-/* #undef BUILD_MODULES */
+#ifndef MAGICKCORE_BUILD_MODULES
+#define MAGICKCORE_BUILD_MODULES 1
+#endif
/* Define if you have the bzip2 library */
#ifndef MAGICKCORE_BZLIB_DELEGATE
#define MAGICKCORE_HAVE_ACOSH 1
#endif
-/* Define to 1 if you have the `argz_add' function. */
-#ifndef MAGICKCORE_HAVE_ARGZ_ADD
-#define MAGICKCORE_HAVE_ARGZ_ADD 1
-#endif
-
-/* Define to 1 if you have the `argz_append' function. */
-#ifndef MAGICKCORE_HAVE_ARGZ_APPEND
-#define MAGICKCORE_HAVE_ARGZ_APPEND 1
-#endif
-
-/* Define to 1 if you have the `argz_count' function. */
-#ifndef MAGICKCORE_HAVE_ARGZ_COUNT
-#define MAGICKCORE_HAVE_ARGZ_COUNT 1
-#endif
-
-/* Define to 1 if you have the `argz_create_sep' function. */
-#ifndef MAGICKCORE_HAVE_ARGZ_CREATE_SEP
-#define MAGICKCORE_HAVE_ARGZ_CREATE_SEP 1
-#endif
-
-/* Define to 1 if you have the <argz.h> header file. */
-#ifndef MAGICKCORE_HAVE_ARGZ_H
-#define MAGICKCORE_HAVE_ARGZ_H 1
-#endif
-
-/* Define to 1 if you have the `argz_insert' function. */
-#ifndef MAGICKCORE_HAVE_ARGZ_INSERT
-#define MAGICKCORE_HAVE_ARGZ_INSERT 1
-#endif
-
-/* Define to 1 if you have the `argz_next' function. */
-#ifndef MAGICKCORE_HAVE_ARGZ_NEXT
-#define MAGICKCORE_HAVE_ARGZ_NEXT 1
-#endif
-
-/* Define to 1 if you have the `argz_stringify' function. */
-#ifndef MAGICKCORE_HAVE_ARGZ_STRINGIFY
-#define MAGICKCORE_HAVE_ARGZ_STRINGIFY 1
-#endif
-
/* Define to 1 if you have the <arm/limits.h> header file. */
/* #undef HAVE_ARM_LIMITS_H */
#define MAGICKCORE_HAVE_CLOCK_REALTIME 1
#endif
-/* Define to 1 if you have the `closedir' function. */
-#ifndef MAGICKCORE_HAVE_CLOSEDIR
-#define MAGICKCORE_HAVE_CLOSEDIR 1
-#endif
-
/* Define to 1 if you have the <CL/cl.h> header file. */
/* #undef HAVE_CL_CL_H */
#define MAGICKCORE_HAVE_CTIME_R 1
#endif
-/* Define to 1 if you have the declaration of `cygwin_conv_path', and to 0 if
- you don't. */
-/* #undef HAVE_DECL_CYGWIN_CONV_PATH */
-
/* Define to 1 if you have the declaration of `pread', and to 0 if you don't.
*/
#ifndef MAGICKCORE_HAVE_DECL_PREAD
#define MAGICKCORE_HAVE_DIRENT_H 1
#endif
-/* Define if you have the GNU dld library. */
-/* #undef HAVE_DLD */
-
-/* Define to 1 if you have the <dld.h> header file. */
-/* #undef HAVE_DLD_H */
-
-/* Define to 1 if you have the `dlerror' function. */
-#ifndef MAGICKCORE_HAVE_DLERROR
-#define MAGICKCORE_HAVE_DLERROR 1
-#endif
-
/* Define to 1 if you have the <dlfcn.h> header file. */
#ifndef MAGICKCORE_HAVE_DLFCN_H
#define MAGICKCORE_HAVE_DLFCN_H 1
#endif
-/* Define to 1 if you have the <dl.h> header file. */
-/* #undef HAVE_DL_H */
-
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
/* #undef HAVE_DOPRNT */
-/* Define if you have the _dyld_func_lookup function. */
-/* #undef HAVE_DYLD */
-
/* Define to 1 if you have the <errno.h> header file. */
#ifndef MAGICKCORE_HAVE_ERRNO_H
#define MAGICKCORE_HAVE_ERRNO_H 1
#endif
-/* Define to 1 if the system has the type `error_t'. */
-#ifndef MAGICKCORE_HAVE_ERROR_T
-#define MAGICKCORE_HAVE_ERROR_T 1
-#endif
-
/* Define to 1 if you have the `execvp' function. */
#ifndef MAGICKCORE_HAVE_EXECVP
#define MAGICKCORE_HAVE_EXECVP 1
/* Define if you have the <lcms/lcms.h> header file. */
/* #undef HAVE_LCMS_LCMS_H */
-/* Define if you have the libdl library or equivalent. */
-#ifndef MAGICKCORE_HAVE_LIBDL
-#define MAGICKCORE_HAVE_LIBDL 1
-#endif
-
-/* Define if libdlloader will be built on this platform */
-#ifndef MAGICKCORE_HAVE_LIBDLLOADER
-#define MAGICKCORE_HAVE_LIBDLLOADER 1
-#endif
-
/* Define to 1 if you have the `gcov' library (-lgcov). */
/* #undef HAVE_LIBGCOV */
#define MAGICKCORE_HAVE_LSTAT 1
#endif
-/* Define this if a modern libltdl is already installed */
-#ifndef MAGICKCORE_HAVE_LTDL
-#define MAGICKCORE_HAVE_LTDL 1
-#endif
-
/* Define to 1 if you have the <machine/param.h> header file. */
/* #undef HAVE_MACHINE_PARAM_H */
/* Define to 1 if you have the <OpenCL/cl.h> header file. */
/* #undef HAVE_OPENCL_CL_H */
-/* Define to 1 if you have the `opendir' function. */
-#ifndef MAGICKCORE_HAVE_OPENDIR
-#define MAGICKCORE_HAVE_OPENDIR 1
-#endif
-
/* Define to 1 if you have the <OS.h> header file. */
/* #undef HAVE_OS_H */
#define MAGICKCORE_HAVE_PREAD 1
#endif
-/* Define if libtool can extract symbol lists from object files. */
-#ifndef MAGICKCORE_HAVE_PRELOADED_SYMBOLS
-#define MAGICKCORE_HAVE_PRELOADED_SYMBOLS 1
-#endif
-
/* Define to 1 if you have the <process.h> header file. */
/* #undef HAVE_PROCESS_H */
#define MAGICKCORE_HAVE_RAND_R 1
#endif
-/* Define to 1 if you have the `readdir' function. */
-#ifndef MAGICKCORE_HAVE_READDIR
-#define MAGICKCORE_HAVE_READDIR 1
-#endif
-
/* Define to 1 if you have the `readdir_r' function. */
#ifndef MAGICKCORE_HAVE_READDIR_R
#define MAGICKCORE_HAVE_READDIR_R 1
#define MAGICKCORE_HAVE_SHARED_MEMORY 1
#endif
-/* Define if you have the shl_load function. */
-/* #undef HAVE_SHL_LOAD */
-
/* Define to 1 if you have the `sigaction' function. */
#ifndef MAGICKCORE_HAVE_SIGACTION
#define MAGICKCORE_HAVE_SIGACTION 1
*/
/* #undef HAVE_SYS_DIR_H */
-/* Define to 1 if you have the <sys/dl.h> header file. */
-/* #undef HAVE_SYS_DL_H */
-
/* Define to 1 if you have the <sys/ipc.h> header file. */
#ifndef MAGICKCORE_HAVE_SYS_IPC_H
#define MAGICKCORE_HAVE_SYS_IPC_H 1
/* Define to 1 if you have the <windows.h> header file. */
/* #undef HAVE_WINDOWS_H */
-/* This value is set to 1 to indicate that the system argz facility works */
-#ifndef MAGICKCORE_HAVE_WORKING_ARGZ
-#define MAGICKCORE_HAVE_WORKING_ARGZ 1
-#endif
-
/* Define to 1 if `fork' works. */
#ifndef MAGICKCORE_HAVE_WORKING_FORK
#define MAGICKCORE_HAVE_WORKING_FORK 1
/* #undef LQR_DELEGATE */
/* Define if using libltdl to support dynamically loadable modules */
-/* #undef LTDL_DELEGATE */
-
-/* Define if the OS needs help to load dependent libraries for dlopen(). */
-/* #undef LTDL_DLOPEN_DEPLIBS */
-
-/* Define to the system default library search path. */
-#ifndef MAGICKCORE_LT_DLSEARCH_PATH
-#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/atlas:/usr/lib64/freetype-freeworld:/usr/lib/llvm:/usr/lib64/llvm:/usr/local/lib:/usr/lib64/mysql:/usr/lib64/nvidia:/usr/lib64/qt-3.3/lib:/usr/lib64/tcl8.5/tclx8.4:/usr/lib64/tcl8.5:/usr/lib64/tracker-0.14:/usr/lib/wine/:/usr/lib64/wine/:/usr/lib64/xulrunner"
-#endif
-
-/* The archive extension */
-#ifndef MAGICKCORE_LT_LIBEXT
-#define MAGICKCORE_LT_LIBEXT "a"
-#endif
-
-/* The archive prefix */
-#ifndef MAGICKCORE_LT_LIBPREFIX
-#define MAGICKCORE_LT_LIBPREFIX "lib"
-#endif
-
-/* Define to the extension used for runtime loadable modules, say, ".so". */
-#ifndef MAGICKCORE_LT_MODULE_EXT
-#define MAGICKCORE_LT_MODULE_EXT ".so"
-#endif
-
-/* Define to the name of the environment variable that determines the run-time
- module search path. */
-#ifndef MAGICKCORE_LT_MODULE_PATH_VAR
-#define MAGICKCORE_LT_MODULE_PATH_VAR "LD_LIBRARY_PATH"
+#ifndef MAGICKCORE_LTDL_DELEGATE
+#define MAGICKCORE_LTDL_DELEGATE 1
#endif
/* Define to the sub-directory in which libtool stores uninstalled libraries.
#define MAGICKCORE_LT_OBJDIR ".libs/"
#endif
-/* Define to the shared library suffix, say, ".dylib". */
-/* #undef LT_SHARED_EXT */
-
/* Define if you have LZMA library */
#ifndef MAGICKCORE_LZMA_DELEGATE
#define MAGICKCORE_LZMA_DELEGATE 1
/* Define to 1 if assertions should be disabled. */
/* #undef NDEBUG */
-/* Define if dlsym() requires a leading underscore in symbol names. */
-/* #undef NEED_USCORE */
-
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
/* #undef NO_MINUS_C_MINUS_O */
/* # undef __CHAR_UNSIGNED__ */
#endif
-/* Define so that glibc/gnulib argp.h does not typedef error_t. */
-/* #undef __error_t_defined */
-
/* Define to appropriate substitue if compiler does not have __func__ */
/* #undef __func__ */
-/* Define to a type to use for `error_t' if it is not otherwise available. */
-/* #undef error_t */
-
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef gid_t */
*/
#define MagickPackageName "ImageMagick"
#define MagickCopyright "Copyright (C) 1999-2012 ImageMagick Studio LLC"
-#define MagickSVNRevision "9625:9634M"
+#define MagickSVNRevision "9640M"
#define MagickLibVersion 0x700
#define MagickLibVersionText "7.0.0"
#define MagickLibVersionNumber 7,0,0
#define MagickLibAddendum "-0"
#define MagickLibInterface 7
#define MagickLibMinInterface 7
-#define MagickReleaseDate "2012-10-15"
+#define MagickReleaseDate "2012-10-16"
#define MagickChangeDate "20121005"
#define MagickAuthoritativeURL "http://www.imagemagick.org"
#if defined(MAGICKCORE_OPENMP_SUPPORT)
## Make sure these will be cleaned even when they're not built by default.
CLEANFILES = \
- $(LTDL_CLEANFILES) \
$(MAGICKWAND_CLEANFILES) \
$(MAGICKPP_CLEANFILES) \
$(UTILITIES_CLEANFILES) \
$(MAGICKWAND_BIN_SCRPTS) \
$(MAGICKPP_SCRPTS)
-include_HEADERS = \
- $(LTDL_INSTALLHEADERS)
+include_HEADERS =
# Headers which are not installed but which are distributed
noinst_HEADERS = \
- $(LIBLTDL_NOINST_HDRS) \
$(MAGICKCORE_NOINST_HDRS)
if WIN32_NATIVE_BUILD
include m4/Makefile.am
include config/Makefile.am
-include ltdl/Makefile.inc
include coders/Makefile.am
include MagickCore/Makefile.am
include MagickWand/Makefile.am
#
# Makefile for Magick ImageMagick configuration files.
-#####
-
# Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization
# dedicated to making software imaging solutions freely available.
#
XFAIL_TESTS = $(am__EXEEXT_6) $(am__EXEEXT_6)
check_PROGRAMS = $(am__EXEEXT_2) $(am__EXEEXT_4)
DIST_COMMON = $(MagickCoreinc_HEADERS) $(MagickWandinc_HEADERS) \
- $(am__configure_deps) $(am__include_HEADERS_DIST) \
- $(am__ltdlinclude_HEADERS_DIST) \
- $(am__magickppinc_HEADERS_DIST) \
- $(am__magickpptopinc_HEADERS_DIST) $(noinst_HEADERS) \
- $(srcdir)/ImageMagick.spec.in $(srcdir)/Magick++/Makefile.am \
+ $(am__configure_deps) $(am__magickppinc_HEADERS_DIST) \
+ $(am__magickpptopinc_HEADERS_DIST) $(include_HEADERS) \
+ $(noinst_HEADERS) $(srcdir)/ImageMagick.spec.in \
+ $(srcdir)/Magick++/Makefile.am \
$(srcdir)/MagickCore/Makefile.am \
$(srcdir)/MagickWand/Makefile.am $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/PerlMagick/Makefile.am \
$(srcdir)/coders/Makefile.am $(srcdir)/common.shi.in \
$(srcdir)/config/Makefile.am $(srcdir)/filters/Makefile.am \
- $(srcdir)/ltdl/Makefile.inc $(srcdir)/m4/Makefile.am \
- $(srcdir)/magick.sh.in $(srcdir)/tests/Makefile.am \
- $(srcdir)/utilities/Makefile.am \
+ $(srcdir)/m4/Makefile.am $(srcdir)/magick.sh.in \
+ $(srcdir)/tests/Makefile.am $(srcdir)/utilities/Makefile.am \
$(top_srcdir)/Magick++/bin/Magick++-config.in \
$(top_srcdir)/Magick++/lib/ImageMagick++.pc.in \
$(top_srcdir)/Magick++/lib/Magick++.pc.in \
config/config.guess config/config.sub config/depcomp \
config/install-sh config/ltmain.sh config/missing \
config/mkinstalldirs
-@INSTALL_LTDL_TRUE@am__append_1 = ltdl/ltdl.h
-@INSTALL_LTDL_TRUE@am__append_2 = ltdl/libltdl.la
-@CONVENIENCE_LTDL_TRUE@am__append_3 = ltdl/libltdlc.la
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ac_func_fseeko.m4 \
- $(top_srcdir)/m4/argz.m4 \
$(top_srcdir)/m4/ax_c___attribute__.m4 \
$(top_srcdir)/m4/ax_cflags_warn_all.m4 \
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
$(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/cxx_have_std_libs.m4 \
$(top_srcdir)/m4/framework.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
- $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/magick_check_pthread_lib.m4 \
$(top_srcdir)/m4/magick_func_mmap_fileio.m4 \
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
"$(DESTDIR)$(configsharearchdir)" "$(DESTDIR)$(docdir)" \
"$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(MagickCoreincdir)" \
"$(DESTDIR)$(MagickWandincdir)" "$(DESTDIR)$(includedir)" \
- "$(DESTDIR)$(ltdlincludedir)" "$(DESTDIR)$(magickppincdir)" \
- "$(DESTDIR)$(magickpptopincdir)"
+ "$(DESTDIR)$(magickppincdir)" "$(DESTDIR)$(magickpptopincdir)"
LTLIBRARIES = $(coders_LTLIBRARIES) $(filters_LTLIBRARIES) \
$(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
Magick___lib_libMagick___la_DEPENDENCIES = $(MAGICKCORE_LIBS) \
$(AM_CFLAGS) $(CFLAGS) $(filters_analyze_la_LDFLAGS) \
$(LDFLAGS) -o $@
@WITH_MODULES_TRUE@am_filters_analyze_la_rpath = -rpath $(filtersdir)
-ltdl_dld_link_la_DEPENDENCIES =
-am_ltdl_dld_link_la_OBJECTS = ltdl/loaders/dld_link.lo
-ltdl_dld_link_la_OBJECTS = $(am_ltdl_dld_link_la_OBJECTS)
-ltdl_dld_link_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(AM_CFLAGS) $(CFLAGS) $(ltdl_dld_link_la_LDFLAGS) $(LDFLAGS) \
- -o $@
-ltdl_dlopen_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am_ltdl_dlopen_la_OBJECTS = ltdl/loaders/dlopen.lo
-ltdl_dlopen_la_OBJECTS = $(am_ltdl_dlopen_la_OBJECTS)
-ltdl_dlopen_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(AM_CFLAGS) $(CFLAGS) $(ltdl_dlopen_la_LDFLAGS) $(LDFLAGS) -o \
- $@
-ltdl_dyld_la_LIBADD =
-am_ltdl_dyld_la_OBJECTS = ltdl/loaders/dyld.lo
-ltdl_dyld_la_OBJECTS = $(am_ltdl_dyld_la_OBJECTS)
-ltdl_dyld_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(ltdl_dyld_la_LDFLAGS) $(LDFLAGS) -o $@
-am_ltdl_libltdl_la_OBJECTS = ltdl/loaders/ltdl_libltdl_la-preopen.lo \
- ltdl/ltdl_libltdl_la-lt__alloc.lo \
- ltdl/ltdl_libltdl_la-lt_dlloader.lo \
- ltdl/ltdl_libltdl_la-lt_error.lo ltdl/ltdl_libltdl_la-ltdl.lo \
- ltdl/ltdl_libltdl_la-slist.lo
-ltdl_libltdl_la_OBJECTS = $(am_ltdl_libltdl_la_OBJECTS)
-ltdl_libltdl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(AM_CFLAGS) $(CFLAGS) $(ltdl_libltdl_la_LDFLAGS) $(LDFLAGS) \
- -o $@
-@INSTALL_LTDL_TRUE@am_ltdl_libltdl_la_rpath = -rpath $(libdir)
-am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
-am__objects_19 = ltdl/loaders/ltdl_libltdlc_la-preopen.lo \
- ltdl/ltdl_libltdlc_la-lt__alloc.lo \
- ltdl/ltdl_libltdlc_la-lt_dlloader.lo \
- ltdl/ltdl_libltdlc_la-lt_error.lo \
- ltdl/ltdl_libltdlc_la-ltdl.lo ltdl/ltdl_libltdlc_la-slist.lo
-am_ltdl_libltdlc_la_OBJECTS = $(am__objects_19)
-ltdl_libltdlc_la_OBJECTS = $(am_ltdl_libltdlc_la_OBJECTS)
-ltdl_libltdlc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(AM_CFLAGS) $(CFLAGS) $(ltdl_libltdlc_la_LDFLAGS) $(LDFLAGS) \
- -o $@
-@CONVENIENCE_LTDL_TRUE@am_ltdl_libltdlc_la_rpath =
-ltdl_load_add_on_la_LIBADD =
-am_ltdl_load_add_on_la_OBJECTS = ltdl/loaders/load_add_on.lo
-ltdl_load_add_on_la_OBJECTS = $(am_ltdl_load_add_on_la_OBJECTS)
-ltdl_load_add_on_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(AM_CFLAGS) $(CFLAGS) $(ltdl_load_add_on_la_LDFLAGS) \
- $(LDFLAGS) -o $@
-ltdl_loadlibrary_la_LIBADD =
-am_ltdl_loadlibrary_la_OBJECTS = ltdl/loaders/loadlibrary.lo
-ltdl_loadlibrary_la_OBJECTS = $(am_ltdl_loadlibrary_la_OBJECTS)
-ltdl_loadlibrary_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(AM_CFLAGS) $(CFLAGS) $(ltdl_loadlibrary_la_LDFLAGS) \
- $(LDFLAGS) -o $@
-ltdl_shl_load_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am_ltdl_shl_load_la_OBJECTS = ltdl/loaders/shl_load.lo
-ltdl_shl_load_la_OBJECTS = $(am_ltdl_shl_load_la_OBJECTS)
-ltdl_shl_load_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(AM_CFLAGS) $(CFLAGS) $(ltdl_shl_load_la_LDFLAGS) $(LDFLAGS) \
- -o $@
am__EXEEXT_1 = utilities/animate$(EXEEXT) utilities/compare$(EXEEXT) \
utilities/composite$(EXEEXT) utilities/conjure$(EXEEXT) \
utilities/display$(EXEEXT) utilities/identify$(EXEEXT) \
PROGRAMS = $(bin_PROGRAMS)
am_Magick___demo_analyze_OBJECTS = Magick++/demo/analyze.$(OBJEXT)
Magick___demo_analyze_OBJECTS = $(am_Magick___demo_analyze_OBJECTS)
-@WITH_MAGICK_PLUS_PLUS_TRUE@am__DEPENDENCIES_3 = \
+@WITH_MAGICK_PLUS_PLUS_TRUE@am__DEPENDENCIES_2 = \
@WITH_MAGICK_PLUS_PLUS_TRUE@ Magick++/lib/libMagick++.la
-@WITH_MAGICK_PLUS_PLUS_TRUE@am__DEPENDENCIES_4 = \
-@WITH_MAGICK_PLUS_PLUS_TRUE@ $(am__DEPENDENCIES_3) \
+@WITH_MAGICK_PLUS_PLUS_TRUE@am__DEPENDENCIES_3 = \
+@WITH_MAGICK_PLUS_PLUS_TRUE@ $(am__DEPENDENCIES_2) \
@WITH_MAGICK_PLUS_PLUS_TRUE@ $(top_builddir)/MagickCore/libMagickCore.la
-Magick___demo_analyze_DEPENDENCIES = $(am__DEPENDENCIES_4)
+Magick___demo_analyze_DEPENDENCIES = $(am__DEPENDENCIES_3)
am_Magick___demo_button_OBJECTS = Magick++/demo/button.$(OBJEXT)
Magick___demo_button_OBJECTS = $(am_Magick___demo_button_OBJECTS)
-Magick___demo_button_DEPENDENCIES = $(am__DEPENDENCIES_4)
+Magick___demo_button_DEPENDENCIES = $(am__DEPENDENCIES_3)
am_Magick___demo_demo_OBJECTS = Magick++/demo/demo.$(OBJEXT)
Magick___demo_demo_OBJECTS = $(am_Magick___demo_demo_OBJECTS)
-Magick___demo_demo_DEPENDENCIES = $(am__DEPENDENCIES_4)
+Magick___demo_demo_DEPENDENCIES = $(am__DEPENDENCIES_3)
am_Magick___demo_detrans_OBJECTS = Magick++/demo/detrans.$(OBJEXT)
Magick___demo_detrans_OBJECTS = $(am_Magick___demo_detrans_OBJECTS)
-Magick___demo_detrans_DEPENDENCIES = $(am__DEPENDENCIES_4)
+Magick___demo_detrans_DEPENDENCIES = $(am__DEPENDENCIES_3)
am_Magick___demo_flip_OBJECTS = Magick++/demo/flip.$(OBJEXT)
Magick___demo_flip_OBJECTS = $(am_Magick___demo_flip_OBJECTS)
-Magick___demo_flip_DEPENDENCIES = $(am__DEPENDENCIES_4)
+Magick___demo_flip_DEPENDENCIES = $(am__DEPENDENCIES_3)
am_Magick___demo_gravity_OBJECTS = Magick++/demo/gravity.$(OBJEXT)
Magick___demo_gravity_OBJECTS = $(am_Magick___demo_gravity_OBJECTS)
-Magick___demo_gravity_DEPENDENCIES = $(am__DEPENDENCIES_4)
+Magick___demo_gravity_DEPENDENCIES = $(am__DEPENDENCIES_3)
am_Magick___demo_piddle_OBJECTS = Magick++/demo/piddle.$(OBJEXT)
Magick___demo_piddle_OBJECTS = $(am_Magick___demo_piddle_OBJECTS)
-Magick___demo_piddle_DEPENDENCIES = $(am__DEPENDENCIES_4)
+Magick___demo_piddle_DEPENDENCIES = $(am__DEPENDENCIES_3)
am_Magick___demo_shapes_OBJECTS = Magick++/demo/shapes.$(OBJEXT)
Magick___demo_shapes_OBJECTS = $(am_Magick___demo_shapes_OBJECTS)
-Magick___demo_shapes_DEPENDENCIES = $(am__DEPENDENCIES_4)
+Magick___demo_shapes_DEPENDENCIES = $(am__DEPENDENCIES_3)
am_Magick___demo_zoom_OBJECTS = Magick++/demo/zoom.$(OBJEXT)
Magick___demo_zoom_OBJECTS = $(am_Magick___demo_zoom_OBJECTS)
-Magick___demo_zoom_DEPENDENCIES = $(am__DEPENDENCIES_4)
+Magick___demo_zoom_DEPENDENCIES = $(am__DEPENDENCIES_3)
am_Magick___tests_appendImages_OBJECTS = \
Magick++/tests/appendImages.$(OBJEXT)
Magick___tests_appendImages_OBJECTS = \
$(am_Magick___tests_appendImages_OBJECTS)
-Magick___tests_appendImages_DEPENDENCIES = $(am__DEPENDENCIES_4)
+Magick___tests_appendImages_DEPENDENCIES = $(am__DEPENDENCIES_3)
am_Magick___tests_attributes_OBJECTS = \
Magick++/tests/attributes.$(OBJEXT)
Magick___tests_attributes_OBJECTS = \
$(am_Magick___tests_attributes_OBJECTS)
-Magick___tests_attributes_DEPENDENCIES = $(am__DEPENDENCIES_4)
+Magick___tests_attributes_DEPENDENCIES = $(am__DEPENDENCIES_3)
am_Magick___tests_averageImages_OBJECTS = \
Magick++/tests/averageImages.$(OBJEXT)
Magick___tests_averageImages_OBJECTS = \
$(am_Magick___tests_averageImages_OBJECTS)
-Magick___tests_averageImages_DEPENDENCIES = $(am__DEPENDENCIES_4)
+Magick___tests_averageImages_DEPENDENCIES = $(am__DEPENDENCIES_3)
am_Magick___tests_coalesceImages_OBJECTS = \
Magick++/tests/coalesceImages.$(OBJEXT)
Magick___tests_coalesceImages_OBJECTS = \
$(am_Magick___tests_coalesceImages_OBJECTS)
-Magick___tests_coalesceImages_DEPENDENCIES = $(am__DEPENDENCIES_4)
+Magick___tests_coalesceImages_DEPENDENCIES = $(am__DEPENDENCIES_3)
am_Magick___tests_coderInfo_OBJECTS = \
Magick++/tests/coderInfo.$(OBJEXT)
Magick___tests_coderInfo_OBJECTS = \
$(am_Magick___tests_coderInfo_OBJECTS)
-Magick___tests_coderInfo_DEPENDENCIES = $(am__DEPENDENCIES_4)
+Magick___tests_coderInfo_DEPENDENCIES = $(am__DEPENDENCIES_3)
am_Magick___tests_color_OBJECTS = Magick++/tests/color.$(OBJEXT)
Magick___tests_color_OBJECTS = $(am_Magick___tests_color_OBJECTS)
-Magick___tests_color_DEPENDENCIES = $(am__DEPENDENCIES_4)
+Magick___tests_color_DEPENDENCIES = $(am__DEPENDENCIES_3)
am_Magick___tests_colorHistogram_OBJECTS = \
Magick++/tests/colorHistogram.$(OBJEXT)
Magick___tests_colorHistogram_OBJECTS = \
$(am_Magick___tests_colorHistogram_OBJECTS)
-Magick___tests_colorHistogram_DEPENDENCIES = $(am__DEPENDENCIES_4)
+Magick___tests_colorHistogram_DEPENDENCIES = $(am__DEPENDENCIES_3)
am_Magick___tests_exceptions_OBJECTS = \
Magick++/tests/exceptions.$(OBJEXT)
Magick___tests_exceptions_OBJECTS = \
$(am_Magick___tests_exceptions_OBJECTS)
-Magick___tests_exceptions_DEPENDENCIES = $(am__DEPENDENCIES_4)
+Magick___tests_exceptions_DEPENDENCIES = $(am__DEPENDENCIES_3)
am_Magick___tests_montageImages_OBJECTS = \
Magick++/tests/montageImages.$(OBJEXT)
Magick___tests_montageImages_OBJECTS = \
$(am_Magick___tests_montageImages_OBJECTS)
-Magick___tests_montageImages_DEPENDENCIES = $(am__DEPENDENCIES_4)
+Magick___tests_montageImages_DEPENDENCIES = $(am__DEPENDENCIES_3)
am_Magick___tests_morphImages_OBJECTS = \
Magick++/tests/morphImages.$(OBJEXT)
Magick___tests_morphImages_OBJECTS = \
$(am_Magick___tests_morphImages_OBJECTS)
-Magick___tests_morphImages_DEPENDENCIES = $(am__DEPENDENCIES_4)
+Magick___tests_morphImages_DEPENDENCIES = $(am__DEPENDENCIES_3)
am_Magick___tests_readWriteBlob_OBJECTS = \
Magick++/tests/readWriteBlob.$(OBJEXT)
Magick___tests_readWriteBlob_OBJECTS = \
$(am_Magick___tests_readWriteBlob_OBJECTS)
-Magick___tests_readWriteBlob_DEPENDENCIES = $(am__DEPENDENCIES_4)
+Magick___tests_readWriteBlob_DEPENDENCIES = $(am__DEPENDENCIES_3)
am_Magick___tests_readWriteImages_OBJECTS = \
Magick++/tests/readWriteImages.$(OBJEXT)
Magick___tests_readWriteImages_OBJECTS = \
$(am_Magick___tests_readWriteImages_OBJECTS)
-Magick___tests_readWriteImages_DEPENDENCIES = $(am__DEPENDENCIES_4)
+Magick___tests_readWriteImages_DEPENDENCIES = $(am__DEPENDENCIES_3)
am_tests_drawtest_OBJECTS = tests/drawtest.$(OBJEXT)
tests_drawtest_OBJECTS = $(am_tests_drawtest_OBJECTS)
tests_drawtest_DEPENDENCIES = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS)
$(coders_xcf_la_SOURCES) $(coders_xpm_la_SOURCES) \
$(coders_xps_la_SOURCES) $(coders_xwd_la_SOURCES) \
$(coders_ycbcr_la_SOURCES) $(coders_yuv_la_SOURCES) \
- $(filters_analyze_la_SOURCES) $(ltdl_dld_link_la_SOURCES) \
- $(ltdl_dlopen_la_SOURCES) $(ltdl_dyld_la_SOURCES) \
- $(ltdl_libltdl_la_SOURCES) $(ltdl_libltdlc_la_SOURCES) \
- $(ltdl_load_add_on_la_SOURCES) $(ltdl_loadlibrary_la_SOURCES) \
- $(ltdl_shl_load_la_SOURCES) $(Magick___demo_analyze_SOURCES) \
+ $(filters_analyze_la_SOURCES) $(Magick___demo_analyze_SOURCES) \
$(Magick___demo_button_SOURCES) $(Magick___demo_demo_SOURCES) \
$(Magick___demo_detrans_SOURCES) $(Magick___demo_flip_SOURCES) \
$(Magick___demo_gravity_SOURCES) \
$(coders_xcf_la_SOURCES) $(coders_xpm_la_SOURCES) \
$(coders_xps_la_SOURCES) $(coders_xwd_la_SOURCES) \
$(coders_ycbcr_la_SOURCES) $(coders_yuv_la_SOURCES) \
- $(filters_analyze_la_SOURCES) $(ltdl_dld_link_la_SOURCES) \
- $(ltdl_dlopen_la_SOURCES) $(ltdl_dyld_la_SOURCES) \
- $(ltdl_libltdl_la_SOURCES) $(ltdl_libltdlc_la_SOURCES) \
- $(ltdl_load_add_on_la_SOURCES) $(ltdl_loadlibrary_la_SOURCES) \
- $(ltdl_shl_load_la_SOURCES) $(Magick___demo_analyze_SOURCES) \
+ $(filters_analyze_la_SOURCES) $(Magick___demo_analyze_SOURCES) \
$(Magick___demo_button_SOURCES) $(Magick___demo_demo_SOURCES) \
$(Magick___demo_detrans_SOURCES) $(Magick___demo_flip_SOURCES) \
$(Magick___demo_gravity_SOURCES) \
MANS = $(man_MANS)
DATA = $(configlib_DATA) $(configshare_DATA) $(configsharearch_DATA) \
$(doc_DATA) $(pkgconfig_DATA)
-am__include_HEADERS_DIST = ltdl/ltdl.h
-am__ltdlinclude_HEADERS_DIST = ltdl/libltdl/lt_system.h \
- ltdl/libltdl/lt_error.h ltdl/libltdl/lt_dlloader.h
am__magickppinc_HEADERS_DIST = Magick++/lib/Magick++/Blob.h \
Magick++/lib/Magick++/CoderInfo.h \
Magick++/lib/Magick++/Color.h Magick++/lib/Magick++/Drawable.h \
Magick++/lib/Magick++/STL.h Magick++/lib/Magick++/TypeMetric.h
am__magickpptopinc_HEADERS_DIST = Magick++/lib/Magick++.h
HEADERS = $(MagickCoreinc_HEADERS) $(MagickWandinc_HEADERS) \
- $(include_HEADERS) $(ltdlinclude_HEADERS) \
- $(magickppinc_HEADERS) $(magickpptopinc_HEADERS) \
- $(noinst_HEADERS)
+ $(include_HEADERS) $(magickppinc_HEADERS) \
+ $(magickpptopinc_HEADERS) $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
-ARGZ_H = @ARGZ_H@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
HTMLDecodeDelegate = @HTMLDecodeDelegate@
ILBMDecodeDelegate = @ILBMDecodeDelegate@
ILBMEncodeDelegate = @ILBMEncodeDelegate@
-INCLTDL = @INCLTDL@
INCLUDEARCH_DIR = @INCLUDEARCH_DIR@
INCLUDE_DIR = @INCLUDE_DIR@
INCLUDE_PATH = @INCLUDE_PATH@
LD = @LD@
LDFLAGS = @LDFLAGS@
LFS_CPPFLAGS = @LFS_CPPFLAGS@
-LIBADD_DL = @LIBADD_DL@
-LIBADD_DLD_LINK = @LIBADD_DLD_LINK@
-LIBADD_DLOPEN = @LIBADD_DLOPEN@
-LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
LIBEXEC_DIR = @LIBEXEC_DIR@
-LIBLTDL = @LIBLTDL@
LIBOBJS = @LIBOBJS@
LIBRARY_EXTRA_CPPFLAGS = @LIBRARY_EXTRA_CPPFLAGS@
LIBRARY_PATH = @LIBRARY_PATH@
LPRDelegate = @LPRDelegate@
LQR_CFLAGS = @LQR_CFLAGS@
LQR_LIBS = @LQR_LIBS@
-LTDLDEPS = @LTDLDEPS@
-LTDLINCL = @LTDLINCL@
-LTDLOPEN = @LTDLOPEN@
LTLIBOBJS = @LTLIBOBJS@
-LT_CONFIG_H = @LT_CONFIG_H@
-LT_DLLOADERS = @LT_DLLOADERS@
-LT_DLPREOPEN = @LT_DLPREOPEN@
LZMA_CFLAGS = @LZMA_CFLAGS@
LZMA_LIBS = @LZMA_LIBS@
LaunchDelegate = @LaunchDelegate@
MAGICK_FILTER_MODULE_PATH = @MAGICK_FILTER_MODULE_PATH@
MAGICK_HDRI = @MAGICK_HDRI@
MAGICK_LDFLAGS = @MAGICK_LDFLAGS@
-MAGICK_LIBLTDL = @MAGICK_LIBLTDL@
MAGICK_LIBRARY_AGE = @MAGICK_LIBRARY_AGE@
MAGICK_LIBRARY_CURRENT = @MAGICK_LIBRARY_CURRENT@
MAGICK_LIBRARY_CURRENT_MIN = @MAGICK_LIBRARY_CURRENT_MIN@
MAGICK_LIB_VERSION = @MAGICK_LIB_VERSION@
MAGICK_LIB_VERSION_NUMBER = @MAGICK_LIB_VERSION_NUMBER@
MAGICK_LIB_VERSION_TEXT = @MAGICK_LIB_VERSION_TEXT@
-MAGICK_LTDLDEPS = @MAGICK_LTDLDEPS@
MAGICK_LT_RELEASE_OPTS = @MAGICK_LT_RELEASE_OPTS@
MAGICK_PCFLAGS = @MAGICK_PCFLAGS@
MAGICK_SVN_REVISION = @MAGICK_SVN_REVISION@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
-ltdl_LIBOBJS = @ltdl_LIBOBJS@
-ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
-sys_symbol_underscore = @sys_symbol_underscore@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
type_include_files = @type_include_files@
windows_font_dir = @windows_font_dir@
xml2_config = @xml2_config@
-
-# -I$(srcdir) is needed for user that built libltdl with a sub-Automake
-# (not as a sub-package!) using 'nostdinc':
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
- -DLT_CONFIG_H='<$(LT_CONFIG_H)>' -DLTDL -I. -I$(srcdir) -Iltdl \
- -I$(srcdir)/ltdl -I$(srcdir)/ltdl/libltdl \
-I$(top_srcdir)/Magick++/lib
ACLOCAL_AMFLAGS = -I m4
MODULECOMMONFLAGS = -no-undefined -export-symbols-regex ".*" -shared -module -avoid-version
# compiler, headers, and libraries are used as for a normal build.
DISTCHECK_CONFIGURE_FLAGS = $(DISTCHECK_CONFIG_FLAGS)
DISTCLEANFILES = _configs.sed MagickCore/magick-config.h
-CLEANFILES = $(LTDL_CLEANFILES) $(MAGICKWAND_CLEANFILES) \
- $(MAGICKPP_CLEANFILES) $(UTILITIES_CLEANFILES) \
- $(TESTS_CLEANFILES) ltdl/libltdl.la ltdl/libltdlc.la \
- ltdl/libdlloader.la $(ltdl_LIBOBJS) $(ltdl_LTLIBOBJS)
+CLEANFILES = \
+ $(MAGICKWAND_CLEANFILES) \
+ $(MAGICKPP_CLEANFILES) \
+ $(UTILITIES_CLEANFILES) \
+ $(TESTS_CLEANFILES)
+
# Binary scripts
bin_SCRIPTS = \
$(MAGICKWAND_BIN_SCRPTS) \
$(MAGICKPP_SCRPTS)
-include_HEADERS = $(LTDL_INSTALLHEADERS) $(am__append_1)
+include_HEADERS =
# Headers which are not installed but which are distributed
noinst_HEADERS = \
- $(LIBLTDL_NOINST_HDRS) \
$(MAGICKCORE_NOINST_HDRS)
@WIN32_NATIVE_BUILD_FALSE@SRCDIR = "$(srcdir)/"
# Additional files to distribute
-EXTRA_DIST = $(TOP_EXTRA_DIST) $(CONFIG_EXTRA_DIST) \
- $(MAGICKCORE_EXTRA_DIST) $(MAGICKWAND_EXTRA_DIST) \
- $(MAGICKPP_EXTRA_DIST) $(UTILITIES_EXTRA_DIST) \
- $(TESTS_EXTRA_DIST) ltdl/lt__dirent.c ltdl/lt__strl.c \
- ltdl/README ltdl/README ltdl/argz_.h ltdl/argz.c
-lib_LTLIBRARIES = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) \
- $(MAGICKPP_LIBS) $(am__append_2)
-AM_LDFLAGS = -no-undefined
-noinst_LTLIBRARIES = $(LT_DLLOADERS) $(am__append_3)
-EXTRA_LTLIBRARIES = ltdl/dlopen.la ltdl/dld_link.la ltdl/dyld.la \
- ltdl/load_add_on.la ltdl/loadlibrary.la ltdl/shl_load.la
-BUILT_SOURCES = ltdl/$(ARGZ_H)
-MOSTLYCLEANFILES = ltdl/argz.h ltdl/argz.h-t
+EXTRA_DIST = \
+ $(TOP_EXTRA_DIST) \
+ $(CONFIG_EXTRA_DIST) \
+ $(MAGICKCORE_EXTRA_DIST) \
+ $(MAGICKWAND_EXTRA_DIST) \
+ $(MAGICKPP_EXTRA_DIST) \
+ $(UTILITIES_EXTRA_DIST) \
+ $(TESTS_EXTRA_DIST)
+
+lib_LTLIBRARIES = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) $(MAGICKPP_LIBS)
+AM_LDFLAGS =
+noinst_LTLIBRARIES =
+EXTRA_LTLIBRARIES =
+BUILT_SOURCES =
+MOSTLYCLEANFILES =
M4_EXTRA_DIST = \
ac_func_fseeko.m4 \
argz.m4 \
config/type-windows.xml.in \
config/type.xml.in
-LTDL_VERSION_INFO = -version-info 10:0:3
-@INSTALL_LTDL_TRUE@ltdlincludedir = $(includedir)/libltdl
-@INSTALL_LTDL_TRUE@ltdlinclude_HEADERS = ltdl/libltdl/lt_system.h \
-@INSTALL_LTDL_TRUE@ ltdl/libltdl/lt_error.h \
-@INSTALL_LTDL_TRUE@ ltdl/libltdl/lt_dlloader.h
-
-ltdl_libltdl_la_SOURCES = ltdl/libltdl/lt__alloc.h \
- ltdl/libltdl/lt__dirent.h \
- ltdl/libltdl/lt__glibc.h \
- ltdl/libltdl/lt__private.h \
- ltdl/libltdl/lt__strl.h \
- ltdl/libltdl/lt_dlloader.h \
- ltdl/libltdl/lt_error.h \
- ltdl/libltdl/lt_system.h \
- ltdl/libltdl/slist.h \
- ltdl/loaders/preopen.c \
- ltdl/lt__alloc.c \
- ltdl/lt_dlloader.c \
- ltdl/lt_error.c \
- ltdl/ltdl.c \
- ltdl/ltdl.h \
- ltdl/slist.c
-
-ltdl_libltdl_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN) $(AM_CPPFLAGS)
-ltdl_libltdl_la_LDFLAGS = $(AM_LDFLAGS) $(LTDL_VERSION_INFO) $(LT_DLPREOPEN)
-ltdl_libltdl_la_LIBADD = $(ltdl_LTLIBOBJS)
-ltdl_libltdl_la_DEPENDENCIES = $(LT_DLLOADERS) $(ltdl_LTLIBOBJS)
-ltdl_libltdlc_la_SOURCES = $(ltdl_libltdl_la_SOURCES)
-ltdl_libltdlc_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN)c $(AM_CPPFLAGS)
-ltdl_libltdlc_la_LDFLAGS = $(AM_LDFLAGS) $(LT_DLPREOPEN)
-ltdl_libltdlc_la_LIBADD = $(ltdl_libltdl_la_LIBADD)
-ltdl_libltdlc_la_DEPENDENCIES = $(ltdl_libltdl_la_DEPENDENCIES)
-ltdl_dlopen_la_SOURCES = ltdl/loaders/dlopen.c
-ltdl_dlopen_la_LDFLAGS = -module -avoid-version
-ltdl_dlopen_la_LIBADD = $(LIBADD_DLOPEN)
-ltdl_dld_link_la_SOURCES = ltdl/loaders/dld_link.c
-ltdl_dld_link_la_LDFLAGS = -module -avoid-version
-ltdl_dld_link_la_LIBADD = -ldld
-ltdl_dyld_la_SOURCES = ltdl/loaders/dyld.c
-ltdl_dyld_la_LDFLAGS = -module -avoid-version
-ltdl_load_add_on_la_SOURCES = ltdl/loaders/load_add_on.c
-ltdl_load_add_on_la_LDFLAGS = -module -avoid-version
-ltdl_loadlibrary_la_SOURCES = ltdl/loaders/loadlibrary.c
-ltdl_loadlibrary_la_LDFLAGS = -module -avoid-version
-ltdl_shl_load_la_SOURCES = ltdl/loaders/shl_load.c
-ltdl_shl_load_la_LDFLAGS = -module -avoid-version
-ltdl_shl_load_la_LIBADD = $(LIBADD_SHL_LOAD)
# Where coder modules get installed
codersdir = $(CODER_PATH)
MAGICKCORE_LIBS = MagickCore/libMagickCore.la
@WITH_MODULES_FALSE@MagickCore_libMagickCore_la_SOURCES = $(MAGICKCORE_BASE_SRCS) $(MAGICKCORE_PLATFORM_SRCS) $(MAGICKCORE_CODER_SRCS) $(MAGICKCORE_FILTER_SRCS)
@WITH_MODULES_TRUE@MagickCore_libMagickCore_la_SOURCES = $(MAGICKCORE_BASE_SRCS) $(MAGICKCORE_PLATFORM_SRCS)
-@WITH_MODULES_FALSE@MagickCore_libMagickCore_la_LIBADD = $(MAGICK_DEP_LIBS) $(MAGICK_LIBLTDL)
-@WITH_MODULES_TRUE@MagickCore_libMagickCore_la_LIBADD = $(MAGICK_DEP_LIBS) $(MAGICK_LIBLTDL)
+@WITH_MODULES_FALSE@MagickCore_libMagickCore_la_LIBADD = $(MAGICK_DEP_LIBS)
+@WITH_MODULES_TRUE@MagickCore_libMagickCore_la_LIBADD = $(MAGICK_DEP_LIBS)
MagickCore_libMagickCore_la_CPPFLAGS = -I$(top_builddir)/ltdl -I$(top_srcdir)/ltdl $(LIBRARY_EXTRA_CPPFLAGS)
MagickCore_libMagickCore_la_LDFLAGS = -no-undefined -export-symbols-regex ".*" \
$(OSX_GCOV_LDFLAG) $(MAGICK_LT_RELEASE_OPTS) -version-info \
$(MAGICK_LIBRARY_CURRENT):$(MAGICK_LIBRARY_REVISION):$(MAGICK_LIBRARY_AGE)
-MagickCore_libMagickCore_la_DEPENDENCIES = $(MAGICK_LTDLDEPS)
+MagickCore_libMagickCore_la_DEPENDENCIES =
# Library base sources
MAGICKCORE_BASE_SRCS = \
.SUFFIXES: .c .cpp .lo .log .o .obj .sh .sh$(EXEEXT) .tap .tap$(EXEEXT) .trs
am--refresh: Makefile
@:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/m4/Makefile.am $(srcdir)/config/Makefile.am $(srcdir)/ltdl/Makefile.inc $(srcdir)/coders/Makefile.am $(srcdir)/MagickCore/Makefile.am $(srcdir)/MagickWand/Makefile.am $(srcdir)/Magick++/Makefile.am $(srcdir)/filters/Makefile.am $(srcdir)/utilities/Makefile.am $(srcdir)/tests/Makefile.am $(srcdir)/PerlMagick/Makefile.am $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/m4/Makefile.am $(srcdir)/config/Makefile.am $(srcdir)/coders/Makefile.am $(srcdir)/MagickCore/Makefile.am $(srcdir)/MagickWand/Makefile.am $(srcdir)/Magick++/Makefile.am $(srcdir)/filters/Makefile.am $(srcdir)/utilities/Makefile.am $(srcdir)/tests/Makefile.am $(srcdir)/PerlMagick/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
-$(srcdir)/m4/Makefile.am $(srcdir)/config/Makefile.am $(srcdir)/ltdl/Makefile.inc $(srcdir)/coders/Makefile.am $(srcdir)/MagickCore/Makefile.am $(srcdir)/MagickWand/Makefile.am $(srcdir)/Magick++/Makefile.am $(srcdir)/filters/Makefile.am $(srcdir)/utilities/Makefile.am $(srcdir)/tests/Makefile.am $(srcdir)/PerlMagick/Makefile.am:
+$(srcdir)/m4/Makefile.am $(srcdir)/config/Makefile.am $(srcdir)/coders/Makefile.am $(srcdir)/MagickCore/Makefile.am $(srcdir)/MagickWand/Makefile.am $(srcdir)/Magick++/Makefile.am $(srcdir)/filters/Makefile.am $(srcdir)/utilities/Makefile.am $(srcdir)/tests/Makefile.am $(srcdir)/PerlMagick/Makefile.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
filters/$(DEPDIR)/$(am__dirstamp)
filters/analyze.la: $(filters_analyze_la_OBJECTS) $(filters_analyze_la_DEPENDENCIES) $(EXTRA_filters_analyze_la_DEPENDENCIES) filters/$(am__dirstamp)
$(AM_V_CCLD)$(filters_analyze_la_LINK) $(am_filters_analyze_la_rpath) $(filters_analyze_la_OBJECTS) $(filters_analyze_la_LIBADD) $(LIBS)
-ltdl/loaders/$(am__dirstamp):
- @$(MKDIR_P) ltdl/loaders
- @: > ltdl/loaders/$(am__dirstamp)
-ltdl/loaders/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) ltdl/loaders/$(DEPDIR)
- @: > ltdl/loaders/$(DEPDIR)/$(am__dirstamp)
-ltdl/loaders/dld_link.lo: ltdl/loaders/$(am__dirstamp) \
- ltdl/loaders/$(DEPDIR)/$(am__dirstamp)
-ltdl/$(am__dirstamp):
- @$(MKDIR_P) ltdl
- @: > ltdl/$(am__dirstamp)
-ltdl/dld_link.la: $(ltdl_dld_link_la_OBJECTS) $(ltdl_dld_link_la_DEPENDENCIES) $(EXTRA_ltdl_dld_link_la_DEPENDENCIES) ltdl/$(am__dirstamp)
- $(AM_V_CCLD)$(ltdl_dld_link_la_LINK) $(ltdl_dld_link_la_OBJECTS) $(ltdl_dld_link_la_LIBADD) $(LIBS)
-ltdl/loaders/dlopen.lo: ltdl/loaders/$(am__dirstamp) \
- ltdl/loaders/$(DEPDIR)/$(am__dirstamp)
-ltdl/dlopen.la: $(ltdl_dlopen_la_OBJECTS) $(ltdl_dlopen_la_DEPENDENCIES) $(EXTRA_ltdl_dlopen_la_DEPENDENCIES) ltdl/$(am__dirstamp)
- $(AM_V_CCLD)$(ltdl_dlopen_la_LINK) $(ltdl_dlopen_la_OBJECTS) $(ltdl_dlopen_la_LIBADD) $(LIBS)
-ltdl/loaders/dyld.lo: ltdl/loaders/$(am__dirstamp) \
- ltdl/loaders/$(DEPDIR)/$(am__dirstamp)
-ltdl/dyld.la: $(ltdl_dyld_la_OBJECTS) $(ltdl_dyld_la_DEPENDENCIES) $(EXTRA_ltdl_dyld_la_DEPENDENCIES) ltdl/$(am__dirstamp)
- $(AM_V_CCLD)$(ltdl_dyld_la_LINK) $(ltdl_dyld_la_OBJECTS) $(ltdl_dyld_la_LIBADD) $(LIBS)
-ltdl/loaders/ltdl_libltdl_la-preopen.lo: ltdl/loaders/$(am__dirstamp) \
- ltdl/loaders/$(DEPDIR)/$(am__dirstamp)
-ltdl/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) ltdl/$(DEPDIR)
- @: > ltdl/$(DEPDIR)/$(am__dirstamp)
-ltdl/ltdl_libltdl_la-lt__alloc.lo: ltdl/$(am__dirstamp) \
- ltdl/$(DEPDIR)/$(am__dirstamp)
-ltdl/ltdl_libltdl_la-lt_dlloader.lo: ltdl/$(am__dirstamp) \
- ltdl/$(DEPDIR)/$(am__dirstamp)
-ltdl/ltdl_libltdl_la-lt_error.lo: ltdl/$(am__dirstamp) \
- ltdl/$(DEPDIR)/$(am__dirstamp)
-ltdl/ltdl_libltdl_la-ltdl.lo: ltdl/$(am__dirstamp) \
- ltdl/$(DEPDIR)/$(am__dirstamp)
-ltdl/ltdl_libltdl_la-slist.lo: ltdl/$(am__dirstamp) \
- ltdl/$(DEPDIR)/$(am__dirstamp)
-ltdl/libltdl.la: $(ltdl_libltdl_la_OBJECTS) $(ltdl_libltdl_la_DEPENDENCIES) $(EXTRA_ltdl_libltdl_la_DEPENDENCIES) ltdl/$(am__dirstamp)
- $(AM_V_CCLD)$(ltdl_libltdl_la_LINK) $(am_ltdl_libltdl_la_rpath) $(ltdl_libltdl_la_OBJECTS) $(ltdl_libltdl_la_LIBADD) $(LIBS)
-ltdl/loaders/ltdl_libltdlc_la-preopen.lo: \
- ltdl/loaders/$(am__dirstamp) \
- ltdl/loaders/$(DEPDIR)/$(am__dirstamp)
-ltdl/ltdl_libltdlc_la-lt__alloc.lo: ltdl/$(am__dirstamp) \
- ltdl/$(DEPDIR)/$(am__dirstamp)
-ltdl/ltdl_libltdlc_la-lt_dlloader.lo: ltdl/$(am__dirstamp) \
- ltdl/$(DEPDIR)/$(am__dirstamp)
-ltdl/ltdl_libltdlc_la-lt_error.lo: ltdl/$(am__dirstamp) \
- ltdl/$(DEPDIR)/$(am__dirstamp)
-ltdl/ltdl_libltdlc_la-ltdl.lo: ltdl/$(am__dirstamp) \
- ltdl/$(DEPDIR)/$(am__dirstamp)
-ltdl/ltdl_libltdlc_la-slist.lo: ltdl/$(am__dirstamp) \
- ltdl/$(DEPDIR)/$(am__dirstamp)
-ltdl/libltdlc.la: $(ltdl_libltdlc_la_OBJECTS) $(ltdl_libltdlc_la_DEPENDENCIES) $(EXTRA_ltdl_libltdlc_la_DEPENDENCIES) ltdl/$(am__dirstamp)
- $(AM_V_CCLD)$(ltdl_libltdlc_la_LINK) $(am_ltdl_libltdlc_la_rpath) $(ltdl_libltdlc_la_OBJECTS) $(ltdl_libltdlc_la_LIBADD) $(LIBS)
-ltdl/loaders/load_add_on.lo: ltdl/loaders/$(am__dirstamp) \
- ltdl/loaders/$(DEPDIR)/$(am__dirstamp)
-ltdl/load_add_on.la: $(ltdl_load_add_on_la_OBJECTS) $(ltdl_load_add_on_la_DEPENDENCIES) $(EXTRA_ltdl_load_add_on_la_DEPENDENCIES) ltdl/$(am__dirstamp)
- $(AM_V_CCLD)$(ltdl_load_add_on_la_LINK) $(ltdl_load_add_on_la_OBJECTS) $(ltdl_load_add_on_la_LIBADD) $(LIBS)
-ltdl/loaders/loadlibrary.lo: ltdl/loaders/$(am__dirstamp) \
- ltdl/loaders/$(DEPDIR)/$(am__dirstamp)
-ltdl/loadlibrary.la: $(ltdl_loadlibrary_la_OBJECTS) $(ltdl_loadlibrary_la_DEPENDENCIES) $(EXTRA_ltdl_loadlibrary_la_DEPENDENCIES) ltdl/$(am__dirstamp)
- $(AM_V_CCLD)$(ltdl_loadlibrary_la_LINK) $(ltdl_loadlibrary_la_OBJECTS) $(ltdl_loadlibrary_la_LIBADD) $(LIBS)
-ltdl/loaders/shl_load.lo: ltdl/loaders/$(am__dirstamp) \
- ltdl/loaders/$(DEPDIR)/$(am__dirstamp)
-ltdl/shl_load.la: $(ltdl_shl_load_la_OBJECTS) $(ltdl_shl_load_la_DEPENDENCIES) $(EXTRA_ltdl_shl_load_la_DEPENDENCIES) ltdl/$(am__dirstamp)
- $(AM_V_CCLD)$(ltdl_shl_load_la_LINK) $(ltdl_shl_load_la_OBJECTS) $(ltdl_shl_load_la_LIBADD) $(LIBS)
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-rm -f coders/*.lo
-rm -f filters/*.$(OBJEXT)
-rm -f filters/*.lo
- -rm -f ltdl/*.$(OBJEXT)
- -rm -f ltdl/*.lo
- -rm -f ltdl/loaders/*.$(OBJEXT)
- -rm -f ltdl/loaders/*.lo
-rm -f tests/*.$(OBJEXT)
-rm -f utilities/*.$(OBJEXT)
@AMDEP_TRUE@@am__include@ @am__quote@coders/$(DEPDIR)/coders_yuv_la-yuv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@filters/$(DEPDIR)/MagickCore_libMagickCore_la-analyze.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@filters/$(DEPDIR)/filters_analyze_la-analyze.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ltdl/$(DEPDIR)/ltdl_libltdl_la-lt__alloc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ltdl/$(DEPDIR)/ltdl_libltdl_la-lt_dlloader.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ltdl/$(DEPDIR)/ltdl_libltdl_la-lt_error.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ltdl/$(DEPDIR)/ltdl_libltdl_la-ltdl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ltdl/$(DEPDIR)/ltdl_libltdl_la-slist.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt__alloc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt_dlloader.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt_error.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ltdl/$(DEPDIR)/ltdl_libltdlc_la-ltdl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ltdl/$(DEPDIR)/ltdl_libltdlc_la-slist.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ltdl/loaders/$(DEPDIR)/dld_link.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ltdl/loaders/$(DEPDIR)/dlopen.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ltdl/loaders/$(DEPDIR)/dyld.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ltdl/loaders/$(DEPDIR)/load_add_on.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ltdl/loaders/$(DEPDIR)/loadlibrary.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ltdl/loaders/$(DEPDIR)/ltdl_libltdl_la-preopen.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ltdl/loaders/$(DEPDIR)/ltdl_libltdlc_la-preopen.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ltdl/loaders/$(DEPDIR)/shl_load.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/drawtest.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_validate-validate.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/wandtest.Po@am__quote@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(filters_analyze_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o filters/filters_analyze_la-analyze.lo `test -f 'filters/analyze.c' || echo '$(srcdir)/'`filters/analyze.c
-ltdl/loaders/ltdl_libltdl_la-preopen.lo: ltdl/loaders/preopen.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/loaders/ltdl_libltdl_la-preopen.lo -MD -MP -MF ltdl/loaders/$(DEPDIR)/ltdl_libltdl_la-preopen.Tpo -c -o ltdl/loaders/ltdl_libltdl_la-preopen.lo `test -f 'ltdl/loaders/preopen.c' || echo '$(srcdir)/'`ltdl/loaders/preopen.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/loaders/$(DEPDIR)/ltdl_libltdl_la-preopen.Tpo ltdl/loaders/$(DEPDIR)/ltdl_libltdl_la-preopen.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ltdl/loaders/preopen.c' object='ltdl/loaders/ltdl_libltdl_la-preopen.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/loaders/ltdl_libltdl_la-preopen.lo `test -f 'ltdl/loaders/preopen.c' || echo '$(srcdir)/'`ltdl/loaders/preopen.c
-
-ltdl/ltdl_libltdl_la-lt__alloc.lo: ltdl/lt__alloc.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/ltdl_libltdl_la-lt__alloc.lo -MD -MP -MF ltdl/$(DEPDIR)/ltdl_libltdl_la-lt__alloc.Tpo -c -o ltdl/ltdl_libltdl_la-lt__alloc.lo `test -f 'ltdl/lt__alloc.c' || echo '$(srcdir)/'`ltdl/lt__alloc.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/$(DEPDIR)/ltdl_libltdl_la-lt__alloc.Tpo ltdl/$(DEPDIR)/ltdl_libltdl_la-lt__alloc.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ltdl/lt__alloc.c' object='ltdl/ltdl_libltdl_la-lt__alloc.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/ltdl_libltdl_la-lt__alloc.lo `test -f 'ltdl/lt__alloc.c' || echo '$(srcdir)/'`ltdl/lt__alloc.c
-
-ltdl/ltdl_libltdl_la-lt_dlloader.lo: ltdl/lt_dlloader.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/ltdl_libltdl_la-lt_dlloader.lo -MD -MP -MF ltdl/$(DEPDIR)/ltdl_libltdl_la-lt_dlloader.Tpo -c -o ltdl/ltdl_libltdl_la-lt_dlloader.lo `test -f 'ltdl/lt_dlloader.c' || echo '$(srcdir)/'`ltdl/lt_dlloader.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/$(DEPDIR)/ltdl_libltdl_la-lt_dlloader.Tpo ltdl/$(DEPDIR)/ltdl_libltdl_la-lt_dlloader.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ltdl/lt_dlloader.c' object='ltdl/ltdl_libltdl_la-lt_dlloader.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/ltdl_libltdl_la-lt_dlloader.lo `test -f 'ltdl/lt_dlloader.c' || echo '$(srcdir)/'`ltdl/lt_dlloader.c
-
-ltdl/ltdl_libltdl_la-lt_error.lo: ltdl/lt_error.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/ltdl_libltdl_la-lt_error.lo -MD -MP -MF ltdl/$(DEPDIR)/ltdl_libltdl_la-lt_error.Tpo -c -o ltdl/ltdl_libltdl_la-lt_error.lo `test -f 'ltdl/lt_error.c' || echo '$(srcdir)/'`ltdl/lt_error.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/$(DEPDIR)/ltdl_libltdl_la-lt_error.Tpo ltdl/$(DEPDIR)/ltdl_libltdl_la-lt_error.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ltdl/lt_error.c' object='ltdl/ltdl_libltdl_la-lt_error.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/ltdl_libltdl_la-lt_error.lo `test -f 'ltdl/lt_error.c' || echo '$(srcdir)/'`ltdl/lt_error.c
-
-ltdl/ltdl_libltdl_la-ltdl.lo: ltdl/ltdl.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/ltdl_libltdl_la-ltdl.lo -MD -MP -MF ltdl/$(DEPDIR)/ltdl_libltdl_la-ltdl.Tpo -c -o ltdl/ltdl_libltdl_la-ltdl.lo `test -f 'ltdl/ltdl.c' || echo '$(srcdir)/'`ltdl/ltdl.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/$(DEPDIR)/ltdl_libltdl_la-ltdl.Tpo ltdl/$(DEPDIR)/ltdl_libltdl_la-ltdl.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ltdl/ltdl.c' object='ltdl/ltdl_libltdl_la-ltdl.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/ltdl_libltdl_la-ltdl.lo `test -f 'ltdl/ltdl.c' || echo '$(srcdir)/'`ltdl/ltdl.c
-
-ltdl/ltdl_libltdl_la-slist.lo: ltdl/slist.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/ltdl_libltdl_la-slist.lo -MD -MP -MF ltdl/$(DEPDIR)/ltdl_libltdl_la-slist.Tpo -c -o ltdl/ltdl_libltdl_la-slist.lo `test -f 'ltdl/slist.c' || echo '$(srcdir)/'`ltdl/slist.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/$(DEPDIR)/ltdl_libltdl_la-slist.Tpo ltdl/$(DEPDIR)/ltdl_libltdl_la-slist.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ltdl/slist.c' object='ltdl/ltdl_libltdl_la-slist.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/ltdl_libltdl_la-slist.lo `test -f 'ltdl/slist.c' || echo '$(srcdir)/'`ltdl/slist.c
-
-ltdl/loaders/ltdl_libltdlc_la-preopen.lo: ltdl/loaders/preopen.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/loaders/ltdl_libltdlc_la-preopen.lo -MD -MP -MF ltdl/loaders/$(DEPDIR)/ltdl_libltdlc_la-preopen.Tpo -c -o ltdl/loaders/ltdl_libltdlc_la-preopen.lo `test -f 'ltdl/loaders/preopen.c' || echo '$(srcdir)/'`ltdl/loaders/preopen.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/loaders/$(DEPDIR)/ltdl_libltdlc_la-preopen.Tpo ltdl/loaders/$(DEPDIR)/ltdl_libltdlc_la-preopen.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ltdl/loaders/preopen.c' object='ltdl/loaders/ltdl_libltdlc_la-preopen.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/loaders/ltdl_libltdlc_la-preopen.lo `test -f 'ltdl/loaders/preopen.c' || echo '$(srcdir)/'`ltdl/loaders/preopen.c
-
-ltdl/ltdl_libltdlc_la-lt__alloc.lo: ltdl/lt__alloc.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/ltdl_libltdlc_la-lt__alloc.lo -MD -MP -MF ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt__alloc.Tpo -c -o ltdl/ltdl_libltdlc_la-lt__alloc.lo `test -f 'ltdl/lt__alloc.c' || echo '$(srcdir)/'`ltdl/lt__alloc.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt__alloc.Tpo ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt__alloc.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ltdl/lt__alloc.c' object='ltdl/ltdl_libltdlc_la-lt__alloc.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/ltdl_libltdlc_la-lt__alloc.lo `test -f 'ltdl/lt__alloc.c' || echo '$(srcdir)/'`ltdl/lt__alloc.c
-
-ltdl/ltdl_libltdlc_la-lt_dlloader.lo: ltdl/lt_dlloader.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/ltdl_libltdlc_la-lt_dlloader.lo -MD -MP -MF ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt_dlloader.Tpo -c -o ltdl/ltdl_libltdlc_la-lt_dlloader.lo `test -f 'ltdl/lt_dlloader.c' || echo '$(srcdir)/'`ltdl/lt_dlloader.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt_dlloader.Tpo ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt_dlloader.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ltdl/lt_dlloader.c' object='ltdl/ltdl_libltdlc_la-lt_dlloader.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/ltdl_libltdlc_la-lt_dlloader.lo `test -f 'ltdl/lt_dlloader.c' || echo '$(srcdir)/'`ltdl/lt_dlloader.c
-
-ltdl/ltdl_libltdlc_la-lt_error.lo: ltdl/lt_error.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/ltdl_libltdlc_la-lt_error.lo -MD -MP -MF ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt_error.Tpo -c -o ltdl/ltdl_libltdlc_la-lt_error.lo `test -f 'ltdl/lt_error.c' || echo '$(srcdir)/'`ltdl/lt_error.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt_error.Tpo ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt_error.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ltdl/lt_error.c' object='ltdl/ltdl_libltdlc_la-lt_error.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/ltdl_libltdlc_la-lt_error.lo `test -f 'ltdl/lt_error.c' || echo '$(srcdir)/'`ltdl/lt_error.c
-
-ltdl/ltdl_libltdlc_la-ltdl.lo: ltdl/ltdl.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/ltdl_libltdlc_la-ltdl.lo -MD -MP -MF ltdl/$(DEPDIR)/ltdl_libltdlc_la-ltdl.Tpo -c -o ltdl/ltdl_libltdlc_la-ltdl.lo `test -f 'ltdl/ltdl.c' || echo '$(srcdir)/'`ltdl/ltdl.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/$(DEPDIR)/ltdl_libltdlc_la-ltdl.Tpo ltdl/$(DEPDIR)/ltdl_libltdlc_la-ltdl.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ltdl/ltdl.c' object='ltdl/ltdl_libltdlc_la-ltdl.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/ltdl_libltdlc_la-ltdl.lo `test -f 'ltdl/ltdl.c' || echo '$(srcdir)/'`ltdl/ltdl.c
-
-ltdl/ltdl_libltdlc_la-slist.lo: ltdl/slist.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/ltdl_libltdlc_la-slist.lo -MD -MP -MF ltdl/$(DEPDIR)/ltdl_libltdlc_la-slist.Tpo -c -o ltdl/ltdl_libltdlc_la-slist.lo `test -f 'ltdl/slist.c' || echo '$(srcdir)/'`ltdl/slist.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/$(DEPDIR)/ltdl_libltdlc_la-slist.Tpo ltdl/$(DEPDIR)/ltdl_libltdlc_la-slist.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ltdl/slist.c' object='ltdl/ltdl_libltdlc_la-slist.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/ltdl_libltdlc_la-slist.lo `test -f 'ltdl/slist.c' || echo '$(srcdir)/'`ltdl/slist.c
-
tests/tests_validate-validate.o: tests/validate.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_validate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/tests_validate-validate.o -MD -MP -MF tests/$(DEPDIR)/tests_validate-validate.Tpo -c -o tests/tests_validate-validate.o `test -f 'tests/validate.c' || echo '$(srcdir)/'`tests/validate.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_validate-validate.Tpo tests/$(DEPDIR)/tests_validate-validate.Po
-rm -rf MagickWand/.libs MagickWand/_libs
-rm -rf coders/.libs coders/_libs
-rm -rf filters/.libs filters/_libs
- -rm -rf ltdl/.libs ltdl/_libs
- -rm -rf ltdl/loaders/.libs ltdl/loaders/_libs
-rm -rf tests/.libs tests/_libs
-rm -rf utilities/.libs utilities/_libs
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
-install-ltdlincludeHEADERS: $(ltdlinclude_HEADERS)
- @$(NORMAL_INSTALL)
- @list='$(ltdlinclude_HEADERS)'; test -n "$(ltdlincludedir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(ltdlincludedir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(ltdlincludedir)" || exit 1; \
- fi; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(ltdlincludedir)'"; \
- $(INSTALL_HEADER) $$files "$(DESTDIR)$(ltdlincludedir)" || exit $$?; \
- done
-
-uninstall-ltdlincludeHEADERS:
- @$(NORMAL_UNINSTALL)
- @list='$(ltdlinclude_HEADERS)'; test -n "$(ltdlincludedir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- dir='$(DESTDIR)$(ltdlincludedir)'; $(am__uninstall_files_from_dir)
install-magickppincHEADERS: $(magickppinc_HEADERS)
@$(NORMAL_INSTALL)
@list='$(magickppinc_HEADERS)'; test -n "$(magickppincdir)" || list=; \
install-binPROGRAMS: install-libLTLIBRARIES
installdirs:
- for dir in "$(DESTDIR)$(codersdir)" "$(DESTDIR)$(filtersdir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(configlibdir)" "$(DESTDIR)$(configsharedir)" "$(DESTDIR)$(configsharearchdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(MagickCoreincdir)" "$(DESTDIR)$(MagickWandincdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(ltdlincludedir)" "$(DESTDIR)$(magickppincdir)" "$(DESTDIR)$(magickpptopincdir)"; do \
+ for dir in "$(DESTDIR)$(codersdir)" "$(DESTDIR)$(filtersdir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(configlibdir)" "$(DESTDIR)$(configsharedir)" "$(DESTDIR)$(configsharearchdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(MagickCoreincdir)" "$(DESTDIR)$(MagickWandincdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(magickppincdir)" "$(DESTDIR)$(magickpptopincdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: $(BUILT_SOURCES)
-rm -f coders/$(am__dirstamp)
-rm -f filters/$(DEPDIR)/$(am__dirstamp)
-rm -f filters/$(am__dirstamp)
- -rm -f ltdl/$(DEPDIR)/$(am__dirstamp)
- -rm -f ltdl/$(am__dirstamp)
- -rm -f ltdl/loaders/$(DEPDIR)/$(am__dirstamp)
- -rm -f ltdl/loaders/$(am__dirstamp)
-rm -f tests/$(DEPDIR)/$(am__dirstamp)
-rm -f tests/$(am__dirstamp)
-rm -f utilities/$(DEPDIR)/$(am__dirstamp)
distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf Magick++/demo/$(DEPDIR) Magick++/lib/$(DEPDIR) Magick++/tests/$(DEPDIR) MagickCore/$(DEPDIR) MagickWand/$(DEPDIR) coders/$(DEPDIR) filters/$(DEPDIR) ltdl/$(DEPDIR) ltdl/loaders/$(DEPDIR) tests/$(DEPDIR) utilities/$(DEPDIR)
+ -rm -rf Magick++/demo/$(DEPDIR) Magick++/lib/$(DEPDIR) Magick++/tests/$(DEPDIR) MagickCore/$(DEPDIR) MagickWand/$(DEPDIR) coders/$(DEPDIR) filters/$(DEPDIR) tests/$(DEPDIR) utilities/$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-libtool distclean-local distclean-tags
install-configlibDATA install-configshareDATA \
install-configsharearchDATA install-data-local install-docDATA \
install-filtersLTLIBRARIES install-includeHEADERS \
- install-ltdlincludeHEADERS install-magickppincHEADERS \
- install-magickpptopincHEADERS install-man \
- install-pkgconfigDATA
+ install-magickppincHEADERS install-magickpptopincHEADERS \
+ install-man install-pkgconfigDATA
install-dvi: install-dvi-am
maintainer-clean: maintainer-clean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
- -rm -rf Magick++/demo/$(DEPDIR) Magick++/lib/$(DEPDIR) Magick++/tests/$(DEPDIR) MagickCore/$(DEPDIR) MagickWand/$(DEPDIR) coders/$(DEPDIR) filters/$(DEPDIR) ltdl/$(DEPDIR) ltdl/loaders/$(DEPDIR) tests/$(DEPDIR) utilities/$(DEPDIR)
+ -rm -rf Magick++/demo/$(DEPDIR) Magick++/lib/$(DEPDIR) Magick++/tests/$(DEPDIR) MagickCore/$(DEPDIR) MagickWand/$(DEPDIR) coders/$(DEPDIR) filters/$(DEPDIR) tests/$(DEPDIR) utilities/$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic \
maintainer-clean-local
uninstall-configsharearchDATA uninstall-docDATA \
uninstall-filtersLTLIBRARIES uninstall-includeHEADERS \
uninstall-libLTLIBRARIES uninstall-local \
- uninstall-ltdlincludeHEADERS uninstall-magickppincHEADERS \
- uninstall-magickpptopincHEADERS uninstall-man \
- uninstall-pkgconfigDATA
+ uninstall-magickppincHEADERS uninstall-magickpptopincHEADERS \
+ uninstall-man uninstall-pkgconfigDATA
uninstall-man: uninstall-man1
install-exec install-exec-am install-exec-local \
install-filtersLTLIBRARIES install-html install-html-am \
install-includeHEADERS install-info install-info-am \
- install-libLTLIBRARIES install-ltdlincludeHEADERS \
- install-magickppincHEADERS install-magickpptopincHEADERS \
- install-man install-man1 install-pdf install-pdf-am \
- install-pkgconfigDATA install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic maintainer-clean-local mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am recheck tags uninstall \
- uninstall-MagickCoreincHEADERS uninstall-MagickWandincHEADERS \
- uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \
+ install-libLTLIBRARIES install-magickppincHEADERS \
+ install-magickpptopincHEADERS install-man install-man1 \
+ install-pdf install-pdf-am install-pkgconfigDATA install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ maintainer-clean-local mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ recheck tags uninstall uninstall-MagickCoreincHEADERS \
+ uninstall-MagickWandincHEADERS uninstall-am \
+ uninstall-binPROGRAMS uninstall-binSCRIPTS \
uninstall-codersLTLIBRARIES uninstall-configlibDATA \
uninstall-configshareDATA uninstall-configsharearchDATA \
uninstall-docDATA uninstall-filtersLTLIBRARIES \
uninstall-includeHEADERS uninstall-libLTLIBRARIES \
- uninstall-local uninstall-ltdlincludeHEADERS \
- uninstall-magickppincHEADERS uninstall-magickpptopincHEADERS \
- uninstall-man uninstall-man1 uninstall-pkgconfigDATA
-
+ uninstall-local uninstall-magickppincHEADERS \
+ uninstall-magickpptopincHEADERS uninstall-man uninstall-man1 \
+ uninstall-pkgconfigDATA
-# We need the following in order to create an <argz.h> when the system
-# doesn't have one that works with the given compiler.
-all-local $(lib_OBJECTS): ltdl/$(ARGZ_H)
-ltdl/argz.h: ltdl/argz_.h
- $(mkinstalldirs) . ltdl/
- cp $(srcdir)/ltdl/argz_.h $@-t
- mv $@-t $@
MagickCore-install-data-local:
$(mkinstalldirs) $(DESTDIR)$(MagickCoreincdir)
$(INSTALL_HEADER) MagickCore/magick-config.h $(DESTDIR)$(MagickCoreincdir)/magick-config.h
}
# defaults for LIBS & INC & CCFLAGS params that we later pass to Writemakefile
-my $INC_magick = '-I../ -I.. -pthread -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/freetype2 -I/usr/include/libxml2 -I"' . $Config{'usrinc'} . '/ImageMagick"';
+my $INC_magick = '-I../ -I.. -I/usr/include/freetype2 -I/usr/include/libxml2 -I"' . $Config{'usrinc'} . '/ImageMagick"';
my $LIBS_magick = '-L../MagickCore/.libs -lMagickCore -lperl -lm';
-my $CCFLAGS_magick = "$Config{'ccflags'} -pthread -I/usr/include/OpenEXR -fopenmp -g -O2 -Wall -pthread";
+my $CCFLAGS_magick = "$Config{'ccflags'} -fopenmp -g -O2 -Wall -pthread";
my $LDFLAGS_magick = "-L../MagickCore/.libs -lMagickCore $Config{'ldflags'} -L/usr/lib";
my $LDDLFLAGS_magick = "-L../MagickCore/.libs -lMagickCore $Config{'lddlflags'} -L/usr/lib";
#'CC' => 'gcc -std=gnu99 -std=gnu99',
# C pre-processor flags (e.g. -I & -D options)
- # 'CPPFLAGS' => "$Config{'cppflags'} -pthread -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/freetype2 -I/usr/include/libxml2",
+ # 'CPPFLAGS' => "$Config{'cppflags'} -I/usr/include/freetype2 -I/usr/include/libxml2",
# C compiler flags (e.g. -O -g)
'CCFLAGS' => $CCFLAGS_magick,
]) # _AM_PROG_TAR
m4_include([m4/ac_func_fseeko.m4])
-m4_include([m4/argz.m4])
m4_include([m4/ax_c___attribute__.m4])
m4_include([m4/ax_cflags_warn_all.m4])
m4_include([m4/ax_check_compile_flag.m4])
m4_include([m4/cxx_have_std_libs.m4])
m4_include([m4/framework.m4])
m4_include([m4/libtool.m4])
-m4_include([m4/ltdl.m4])
m4_include([m4/ltoptions.m4])
m4_include([m4/ltsugar.m4])
m4_include([m4/ltversion.m4])
/* Define to 1 if you have the `acosh' function. */
#undef HAVE_ACOSH
-/* Define to 1 if you have the `argz_add' function. */
-#undef HAVE_ARGZ_ADD
-
-/* Define to 1 if you have the `argz_append' function. */
-#undef HAVE_ARGZ_APPEND
-
-/* Define to 1 if you have the `argz_count' function. */
-#undef HAVE_ARGZ_COUNT
-
-/* Define to 1 if you have the `argz_create_sep' function. */
-#undef HAVE_ARGZ_CREATE_SEP
-
-/* Define to 1 if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
-
-/* Define to 1 if you have the `argz_insert' function. */
-#undef HAVE_ARGZ_INSERT
-
-/* Define to 1 if you have the `argz_next' function. */
-#undef HAVE_ARGZ_NEXT
-
-/* Define to 1 if you have the `argz_stringify' function. */
-#undef HAVE_ARGZ_STRINGIFY
-
/* Define to 1 if you have the <arm/limits.h> header file. */
#undef HAVE_ARM_LIMITS_H
/* Define to 1 if clock_gettime supports CLOCK_REALTIME. */
#undef HAVE_CLOCK_REALTIME
-/* Define to 1 if you have the `closedir' function. */
-#undef HAVE_CLOSEDIR
-
/* Define to 1 if you have the <CL/cl.h> header file. */
#undef HAVE_CL_CL_H
/* Define to 1 if you have the `ctime_r' function. */
#undef HAVE_CTIME_R
-/* Define to 1 if you have the declaration of `cygwin_conv_path', and to 0 if
- you don't. */
-#undef HAVE_DECL_CYGWIN_CONV_PATH
-
/* Define to 1 if you have the declaration of `pread', and to 0 if you don't.
*/
#undef HAVE_DECL_PREAD
*/
#undef HAVE_DIRENT_H
-/* Define if you have the GNU dld library. */
-#undef HAVE_DLD
-
-/* Define to 1 if you have the <dld.h> header file. */
-#undef HAVE_DLD_H
-
-/* Define to 1 if you have the `dlerror' function. */
-#undef HAVE_DLERROR
-
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
-/* Define to 1 if you have the <dl.h> header file. */
-#undef HAVE_DL_H
-
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
#undef HAVE_DOPRNT
-/* Define if you have the _dyld_func_lookup function. */
-#undef HAVE_DYLD
-
/* Define to 1 if you have the <errno.h> header file. */
#undef HAVE_ERRNO_H
-/* Define to 1 if the system has the type `error_t'. */
-#undef HAVE_ERROR_T
-
/* Define to 1 if you have the `execvp' function. */
#undef HAVE_EXECVP
/* Define if you have the <lcms/lcms.h> header file. */
#undef HAVE_LCMS_LCMS_H
-/* Define if you have the libdl library or equivalent. */
-#undef HAVE_LIBDL
-
-/* Define if libdlloader will be built on this platform */
-#undef HAVE_LIBDLLOADER
-
/* Define to 1 if you have the `gcov' library (-lgcov). */
#undef HAVE_LIBGCOV
/* Define to 1 if you have the `lstat' function. */
#undef HAVE_LSTAT
-/* Define this if a modern libltdl is already installed */
-#undef HAVE_LTDL
-
/* Define to 1 if you have the <machine/param.h> header file. */
#undef HAVE_MACHINE_PARAM_H
/* Define to 1 if you have the <OpenCL/cl.h> header file. */
#undef HAVE_OPENCL_CL_H
-/* Define to 1 if you have the `opendir' function. */
-#undef HAVE_OPENDIR
-
/* Define to 1 if you have the <OS.h> header file. */
#undef HAVE_OS_H
/* Define to 1 if you have the `pread' function. */
#undef HAVE_PREAD
-/* Define if libtool can extract symbol lists from object files. */
-#undef HAVE_PRELOADED_SYMBOLS
-
/* Define to 1 if you have the <process.h> header file. */
#undef HAVE_PROCESS_H
/* Define to 1 if you have the `rand_r' function. */
#undef HAVE_RAND_R
-/* Define to 1 if you have the `readdir' function. */
-#undef HAVE_READDIR
-
/* Define to 1 if you have the `readdir_r' function. */
#undef HAVE_READDIR_R
/* X11 server supports shared memory extension */
#undef HAVE_SHARED_MEMORY
-/* Define if you have the shl_load function. */
-#undef HAVE_SHL_LOAD
-
/* Define to 1 if you have the `sigaction' function. */
#undef HAVE_SIGACTION
*/
#undef HAVE_SYS_DIR_H
-/* Define to 1 if you have the <sys/dl.h> header file. */
-#undef HAVE_SYS_DL_H
-
/* Define to 1 if you have the <sys/ipc.h> header file. */
#undef HAVE_SYS_IPC_H
/* Define to 1 if you have the <windows.h> header file. */
#undef HAVE_WINDOWS_H
-/* This value is set to 1 to indicate that the system argz facility works */
-#undef HAVE_WORKING_ARGZ
-
/* Define to 1 if `fork' works. */
#undef HAVE_WORKING_FORK
/* Define if using libltdl to support dynamically loadable modules */
#undef LTDL_DELEGATE
-/* Define if the OS needs help to load dependent libraries for dlopen(). */
-#undef LTDL_DLOPEN_DEPLIBS
-
-/* Define to the system default library search path. */
-#undef LT_DLSEARCH_PATH
-
-/* The archive extension */
-#undef LT_LIBEXT
-
-/* The archive prefix */
-#undef LT_LIBPREFIX
-
-/* Define to the extension used for runtime loadable modules, say, ".so". */
-#undef LT_MODULE_EXT
-
-/* Define to the name of the environment variable that determines the run-time
- module search path. */
-#undef LT_MODULE_PATH_VAR
-
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
-/* Define to the shared library suffix, say, ".dylib". */
-#undef LT_SHARED_EXT
-
/* Define if you have LZMA library */
#undef LZMA_DELEGATE
/* Define to 1 if assertions should be disabled. */
#undef NDEBUG
-/* Define if dlsym() requires a leading underscore in symbol names. */
-#undef NEED_USCORE
-
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
# undef __CHAR_UNSIGNED__
#endif
-/* Define so that glibc/gnulib argp.h does not typedef error_t. */
-#undef __error_t_defined
-
/* Define to appropriate substitue if compiler does not have __func__ */
#undef __func__
-/* Define to a type to use for `error_t' if it is not otherwise available. */
-#undef error_t
-
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
SHELL=${CONFIG_SHELL-/bin/sh}
-lt_ltdl_dir='ltdl'
-
-lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"
-
test -n "$DJDIR" || exec 7<&0 </dev/null
exec 6>&1
PACKAGE_URL=''
ac_unique_file="MagickCore/MagickCore.h"
-ac_config_libobj_dir=ltdl
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#endif"
ac_header_list=
-ac_subst_vars='ltdl_LTLIBOBJS
-ltdl_LIBOBJS
-am__EXEEXT_FALSE
+ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
MAGICK_FEATURES
MAGICK_CXXFLAGS
MAGICK_CFLAGS
MAGICK_DEP_LIBS
-MAGICK_LTDLDEPS
-MAGICK_LIBLTDL
OSX_GCOV_LDFLAG
DELEGATES
MAGICKCORE_PATH
AUTOTRACE_LIBS
AUTOTRACE_CFLAGS
LIB_DL
+WITH_LTDL_FALSE
+WITH_LTDL_TRUE
ZLIB_LIBS
ZLIB_DELEGATE_FALSE
ZLIB_DELEGATE_TRUE
MAINTAINER_MODE_FALSE
MAINTAINER_MODE_TRUE
MAGICK_HDRI
-WITH_LTDL_FALSE
-WITH_LTDL_TRUE
WITH_MODULES_FALSE
WITH_MODULES_TRUE
WITH_SHARED_LIBS_FALSE
WITH_SHARED_LIBS_TRUE
-LTDLOPEN
-LT_CONFIG_H
-CONVENIENCE_LTDL_FALSE
-CONVENIENCE_LTDL_TRUE
-INSTALL_LTDL_FALSE
-INSTALL_LTDL_TRUE
-ARGZ_H
-sys_symbol_underscore
-LIBADD_DL
-LT_DLPREOPEN
-LIBADD_DLD_LINK
-LIBADD_SHL_LOAD
-LIBADD_DLOPEN
-LT_DLLOADERS
-INCLTDL
-LTDLINCL
-LTDLDEPS
-LIBLTDL
LIBTOOL_DEPS
CXXCPP
OTOOL64
enable_fast_install
with_sysroot
enable_libtool_lock
-with_included_ltdl
-with_ltdl_include
-with_ltdl_lib
-enable_ltdl_install
with_modules
enable_delegate_build
enable_deprecated
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
- --enable-ltdl-install install libltdl
--enable-delegate-build look for delegate libraries in build directory
--disable-deprecated exclude deprecated methods in MagickCore and
MagickWand APIs
both]
--with-sysroot=DIR Search for dependent libraries within DIR
(or the compiler's sysroot if not specified).
- --with-included-ltdl use the GNU ltdl sources included here
- --with-ltdl-include=DIR use the ltdl headers installed in DIR
- --with-ltdl-lib=DIR use the libltdl.la installed in DIR
--with-modules enable building dynamically loadable modules
--with-method-prefix=PREFIX
prefix MagickCore API methods
} # ac_fn_cxx_try_link
-# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
-# ---------------------------------------------
-# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
-# accordingly.
-ac_fn_c_check_decl ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- as_decl_name=`echo $2|sed 's/ *(.*//'`
- as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
-$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-#ifndef $as_decl_name
-#ifdef __cplusplus
- (void) $as_decl_use;
-#else
- (void) $as_decl_name;
-#endif
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_decl
-
# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
# -------------------------------------------
# Tests whether TYPE exists after having included INCLUDES, setting cache
} # ac_fn_c_check_member
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ as_decl_name=`echo $2|sed 's/ *(.*//'`
+ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+ (void) $as_decl_use;
+#else
+ (void) $as_decl_name;
+#endif
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_decl
+
# ac_fn_c_find_intX_t LINENO BITS VAR
# -----------------------------------
# Finds a signed integer type with width BITS, setting cache variable VAR
-
ac_config_headers="$ac_config_headers config/config.h"
MAGICK_LIBRARY_VERSION_INFO=$MAGICK_LIBRARY_CURRENT:$MAGICK_LIBRARY_REVISION:$MAGICK_LIBRARY_AGE
-MAGICK_SVN_REVISION=9625:9634M
+MAGICK_SVN_REVISION=9640M
-# Configure libltdl
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which extension is used for runtime loadable modules" >&5
-$as_echo_n "checking which extension is used for runtime loadable modules... " >&6; }
-if ${libltdl_cv_shlibext+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
-module=yes
-eval libltdl_cv_shlibext=$shrext_cmds
-module=no
-eval libltdl_cv_shrext=$shrext_cmds
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libltdl_cv_shlibext" >&5
-$as_echo "$libltdl_cv_shlibext" >&6; }
-if test -n "$libltdl_cv_shlibext"; then
-
-cat >>confdefs.h <<_ACEOF
-#define LT_MODULE_EXT "$libltdl_cv_shlibext"
-_ACEOF
-
-fi
-if test "$libltdl_cv_shrext" != "$libltdl_cv_shlibext"; then
-
-cat >>confdefs.h <<_ACEOF
-#define LT_SHARED_EXT "$libltdl_cv_shrext"
-_ACEOF
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variable specifies run-time module search path" >&5
-$as_echo_n "checking which variable specifies run-time module search path... " >&6; }
-if ${lt_cv_module_path_var+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_module_path_var="$shlibpath_var"
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_module_path_var" >&5
-$as_echo "$lt_cv_module_path_var" >&6; }
-if test -n "$lt_cv_module_path_var"; then
-
-cat >>confdefs.h <<_ACEOF
-#define LT_MODULE_PATH_VAR "$lt_cv_module_path_var"
-_ACEOF
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the default library search path" >&5
-$as_echo_n "checking for the default library search path... " >&6; }
-if ${lt_cv_sys_dlsearch_path+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_dlsearch_path" >&5
-$as_echo "$lt_cv_sys_dlsearch_path" >&6; }
-if test -n "$lt_cv_sys_dlsearch_path"; then
- sys_dlsearch_path=
- for dir in $lt_cv_sys_dlsearch_path; do
- if test -z "$sys_dlsearch_path"; then
- sys_dlsearch_path="$dir"
- else
- sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
- fi
- done
-
-cat >>confdefs.h <<_ACEOF
-#define LT_DLSEARCH_PATH "$sys_dlsearch_path"
-_ACEOF
-
-fi
-
-
-LT_DLLOADERS=
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-LIBADD_DLOPEN=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
-$as_echo_n "checking for library containing dlopen... " >&6; }
-if ${ac_cv_search_dlopen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
- ;
- return 0;
-}
-_ACEOF
-for ac_lib in '' dl; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_dlopen=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_dlopen+:} false; then :
- break
-fi
-done
-if ${ac_cv_search_dlopen+:} false; then :
-
-else
- ac_cv_search_dlopen=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
-$as_echo "$ac_cv_search_dlopen" >&6; }
-ac_res=$ac_cv_search_dlopen
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-$as_echo "#define HAVE_LIBDL 1" >>confdefs.h
-
- if test "$ac_cv_search_dlopen" != "none required" ; then
- LIBADD_DLOPEN="-ldl"
- fi
- libltdl_cv_lib_dl_dlopen="yes"
- LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#if HAVE_DLFCN_H
-# include <dlfcn.h>
-#endif
-
-int
-main ()
-{
-dlopen(0, 0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-$as_echo "#define HAVE_LIBDL 1" >>confdefs.h
-
- libltdl_cv_func_dlopen="yes"
- LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
-$as_echo_n "checking for dlopen in -lsvld... " >&6; }
-if ${ac_cv_lib_svld_dlopen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsvld $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_svld_dlopen=yes
-else
- ac_cv_lib_svld_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
-$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
-if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
-
-$as_echo "#define HAVE_LIBDL 1" >>confdefs.h
-
- LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
- LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"
-fi
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-
-if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
-then
- lt_save_LIBS="$LIBS"
- LIBS="$LIBS $LIBADD_DLOPEN"
- for ac_func in dlerror
-do :
- ac_fn_c_check_func "$LINENO" "dlerror" "ac_cv_func_dlerror"
-if test "x$ac_cv_func_dlerror" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DLERROR 1
-_ACEOF
-
-fi
-done
-
- LIBS="$lt_save_LIBS"
-fi
-
-
-LIBADD_SHL_LOAD=
-ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
-if test "x$ac_cv_func_shl_load" = xyes; then :
-
-$as_echo "#define HAVE_SHL_LOAD 1" >>confdefs.h
-
- LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
-$as_echo_n "checking for shl_load in -ldld... " >&6; }
-if ${ac_cv_lib_dld_shl_load+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load ();
-int
-main ()
-{
-return shl_load ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dld_shl_load=yes
-else
- ac_cv_lib_dld_shl_load=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
-$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
-
-$as_echo "#define HAVE_SHL_LOAD 1" >>confdefs.h
-
- LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
- LIBADD_SHL_LOAD="-ldld"
-fi
-
-fi
-
-
-
-case $host_os in
-darwin[1567].*)
-# We only want this for pre-Mac OS X 10.4.
- ac_fn_c_check_func "$LINENO" "_dyld_func_lookup" "ac_cv_func__dyld_func_lookup"
-if test "x$ac_cv_func__dyld_func_lookup" = xyes; then :
-
-$as_echo "#define HAVE_DYLD 1" >>confdefs.h
-
- LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"
-fi
-
- ;;
-beos*)
- LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
- ;;
-cygwin* | mingw* | os2* | pw32*)
- ac_fn_c_check_decl "$LINENO" "cygwin_conv_path" "ac_cv_have_decl_cygwin_conv_path" "#include <sys/cygwin.h>
-"
-if test "x$ac_cv_have_decl_cygwin_conv_path" = xyes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_CYGWIN_CONV_PATH $ac_have_decl
-_ACEOF
-
- LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
- ;;
-esac
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
-$as_echo_n "checking for dld_link in -ldld... " >&6; }
-if ${ac_cv_lib_dld_dld_link+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dld_link ();
-int
-main ()
-{
-return dld_link ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dld_dld_link=yes
-else
- ac_cv_lib_dld_dld_link=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
-$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
-if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
-
-$as_echo "#define HAVE_DLD 1" >>confdefs.h
-
- LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"
-fi
-
-
-
-
-LT_DLPREOPEN=
-if test -n "$LT_DLLOADERS"
-then
- for lt_loader in $LT_DLLOADERS; do
- LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
- done
-
-$as_echo "#define HAVE_LIBDLLOADER 1" >>confdefs.h
-
-fi
-
-
-LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _ prefix in compiled symbols" >&5
-$as_echo_n "checking for _ prefix in compiled symbols... " >&6; }
-if ${lt_cv_sys_symbol_underscore+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_sys_symbol_underscore=no
- cat > conftest.$ac_ext <<_LT_EOF
-void nm_test_func(){}
-int main(){nm_test_func;return 0;}
-_LT_EOF
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- # Now try to grab the symbols.
- ac_nlist=conftest.nm
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist\""; } >&5
- (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s "$ac_nlist"; then
- # See whether the symbols have a leading underscore.
- if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
- lt_cv_sys_symbol_underscore=yes
- else
- if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
- :
- else
- echo "configure: cannot find nm_test_func in $ac_nlist" >&5
- fi
- fi
- else
- echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&5
- fi
- else
- echo "configure: failed program was:" >&5
- cat conftest.c >&5
- fi
- rm -rf conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_symbol_underscore" >&5
-$as_echo "$lt_cv_sys_symbol_underscore" >&6; }
- sys_symbol_underscore=$lt_cv_sys_symbol_underscore
-
-
-if test x"$lt_cv_sys_symbol_underscore" = xyes; then
- if test x"$libltdl_cv_func_dlopen" = xyes ||
- test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have to add an underscore for dlsym" >&5
-$as_echo_n "checking whether we have to add an underscore for dlsym... " >&6; }
-if ${libltdl_cv_need_uscore+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- libltdl_cv_need_uscore=unknown
- save_LIBS="$LIBS"
- LIBS="$LIBS $LIBADD_DLOPEN"
- if test "$cross_compiling" = yes; then :
- libltdl_cv_need_uscore=cross
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-/* When -fvisbility=hidden is used, assume the code has been annotated
- correspondingly for the symbols needed. */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
-int fnord () __attribute__((visibility("default")));
-#endif
-
-int fnord () { return 42; }
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else
- {
- if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- else puts (dlerror ());
- }
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- return status;
-}
-_LT_EOF
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) >&5 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) libltdl_cv_need_uscore=no ;;
- x$lt_dlneed_uscore) libltdl_cv_need_uscore=yes ;;
- x$lt_dlunknown|x*) ;;
- esac
- else :
- # compilation failed
-
- fi
-fi
-rm -fr conftest*
-
- LIBS="$save_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libltdl_cv_need_uscore" >&5
-$as_echo "$libltdl_cv_need_uscore" >&6; }
- fi
-fi
-
-if test x"$libltdl_cv_need_uscore" = xyes; then
-
-$as_echo "#define NEED_USCORE 1" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether deplibs are loaded by dlopen" >&5
-$as_echo_n "checking whether deplibs are loaded by dlopen... " >&6; }
-if ${lt_cv_sys_dlopen_deplibs+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- # PORTME does your system automatically load deplibs for dlopen?
- # or its logical equivalent (e.g. shl_load for HP-UX < 11)
- # For now, we just catch OSes we know something about -- in the
- # future, we'll try test this programmatically.
- lt_cv_sys_dlopen_deplibs=unknown
- case $host_os in
- aix3*|aix4.1.*|aix4.2.*)
- # Unknown whether this is true for these versions of AIX, but
- # we want this `case' here to explicitly catch those versions.
- lt_cv_sys_dlopen_deplibs=unknown
- ;;
- aix[4-9]*)
- lt_cv_sys_dlopen_deplibs=yes
- ;;
- amigaos*)
- case $host_cpu in
- powerpc)
- lt_cv_sys_dlopen_deplibs=no
- ;;
- esac
- ;;
- darwin*)
- # Assuming the user has installed a libdl from somewhere, this is true
- # If you are looking for one http://www.opendarwin.org/projects/dlcompat
- lt_cv_sys_dlopen_deplibs=yes
- ;;
- freebsd* | dragonfly*)
- lt_cv_sys_dlopen_deplibs=yes
- ;;
- gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
- # GNU and its variants, using gnu ld.so (Glibc)
- lt_cv_sys_dlopen_deplibs=yes
- ;;
- hpux10*|hpux11*)
- lt_cv_sys_dlopen_deplibs=yes
- ;;
- interix*)
- lt_cv_sys_dlopen_deplibs=yes
- ;;
- irix[12345]*|irix6.[01]*)
- # Catch all versions of IRIX before 6.2, and indicate that we don't
- # know how it worked for any of those versions.
- lt_cv_sys_dlopen_deplibs=unknown
- ;;
- irix*)
- # The case above catches anything before 6.2, and it's known that
- # at 6.2 and later dlopen does load deplibs.
- lt_cv_sys_dlopen_deplibs=yes
- ;;
- netbsd*)
- lt_cv_sys_dlopen_deplibs=yes
- ;;
- openbsd*)
- lt_cv_sys_dlopen_deplibs=yes
- ;;
- osf[1234]*)
- # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
- # it did *not* use an RPATH in a shared library to find objects the
- # library depends on, so we explicitly say `no'.
- lt_cv_sys_dlopen_deplibs=no
- ;;
- osf5.0|osf5.0a|osf5.1)
- # dlopen *does* load deplibs and with the right loader patch applied
- # it even uses RPATH in a shared library to search for shared objects
- # that the library depends on, but there's no easy way to know if that
- # patch is installed. Since this is the case, all we can really
- # say is unknown -- it depends on the patch being installed. If
- # it is, this changes to `yes'. Without it, it would be `no'.
- lt_cv_sys_dlopen_deplibs=unknown
- ;;
- osf*)
- # the two cases above should catch all versions of osf <= 5.1. Read
- # the comments above for what we know about them.
- # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
- # is used to find them so we can finally say `yes'.
- lt_cv_sys_dlopen_deplibs=yes
- ;;
- qnx*)
- lt_cv_sys_dlopen_deplibs=yes
- ;;
- solaris*)
- lt_cv_sys_dlopen_deplibs=yes
- ;;
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- libltdl_cv_sys_dlopen_deplibs=yes
- ;;
- esac
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_dlopen_deplibs" >&5
-$as_echo "$lt_cv_sys_dlopen_deplibs" >&6; }
-if test "$lt_cv_sys_dlopen_deplibs" != yes; then
-
-$as_echo "#define LTDL_DLOPEN_DEPLIBS 1" >>confdefs.h
-
-fi
-
-:
-
-for ac_header in argz.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "argz.h" "ac_cv_header_argz_h" "$ac_includes_default
-"
-if test "x$ac_cv_header_argz_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_ARGZ_H 1
-_ACEOF
-
-fi
-
-done
-
-
-ac_fn_c_check_type "$LINENO" "error_t" "ac_cv_type_error_t" "#if defined(HAVE_ARGZ_H)
-# include <argz.h>
-#endif
-"
-if test "x$ac_cv_type_error_t" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_ERROR_T 1
-_ACEOF
-
-
-else
-
-$as_echo "#define error_t int" >>confdefs.h
-
-
-$as_echo "#define __error_t_defined 1" >>confdefs.h
-
-fi
-
-
-ARGZ_H=
-for ac_func in argz_add argz_append argz_count argz_create_sep argz_insert \
- argz_next argz_stringify
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ARGZ_H=argz.h;
-
- _LT_LIBOBJS="$_LT_LIBOBJS argz.$ac_objext"
-
-fi
-done
-
-
-if test -z "$ARGZ_H"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if argz actually works" >&5
-$as_echo_n "checking if argz actually works... " >&6; }
-if ${lt_cv_sys_argz_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $host_os in #(
- *cygwin*)
- lt_cv_sys_argz_works=no
- if test "$cross_compiling" != no; then
- lt_cv_sys_argz_works="guessing no"
- else
- lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/'
- save_IFS=$IFS
- IFS=-.
- set x `uname -r | sed -e "$lt_sed_extract_leading_digits"`
- IFS=$save_IFS
- lt_os_major=${2-0}
- lt_os_minor=${3-0}
- lt_os_micro=${4-0}
- if test "$lt_os_major" -gt 1 \
- || { test "$lt_os_major" -eq 1 \
- && { test "$lt_os_minor" -gt 5 \
- || { test "$lt_os_minor" -eq 5 \
- && test "$lt_os_micro" -gt 24; }; }; }; then
- lt_cv_sys_argz_works=yes
- fi
- fi
- ;; #(
- *) lt_cv_sys_argz_works=yes ;;
- esac
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_argz_works" >&5
-$as_echo "$lt_cv_sys_argz_works" >&6; }
- if test "$lt_cv_sys_argz_works" = yes; then :
-
-$as_echo "#define HAVE_WORKING_ARGZ 1" >>confdefs.h
-
-else
- ARGZ_H=argz.h
-
-
- _LT_LIBOBJS="$_LT_LIBOBJS argz.$ac_objext"
-
-fi
-fi
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libtool supports -dlopen/-dlpreopen" >&5
-$as_echo_n "checking whether libtool supports -dlopen/-dlpreopen... " >&6; }
-if ${libltdl_cv_preloaded_symbols+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$lt_cv_sys_global_symbol_pipe"; then
- libltdl_cv_preloaded_symbols=yes
- else
- libltdl_cv_preloaded_symbols=no
- fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libltdl_cv_preloaded_symbols" >&5
-$as_echo "$libltdl_cv_preloaded_symbols" >&6; }
-if test x"$libltdl_cv_preloaded_symbols" = xyes; then
-
-$as_echo "#define HAVE_PRELOADED_SYMBOLS 1" >>confdefs.h
-
-fi
-
-# Set options
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-included_ltdl was given.
-if test "${with_included_ltdl+set}" = set; then :
- withval=$with_included_ltdl;
-fi
-
-
-if test "x$with_included_ltdl" != xyes; then
- # We are not being forced to use the included libltdl sources, so
- # decide whether there is a useful installed version we can use.
- ac_fn_c_check_header_compile "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default
-
-"
-if test "x$ac_cv_header_ltdl_h" = xyes; then :
- ac_fn_c_check_decl "$LINENO" "lt_dlinterface_register" "ac_cv_have_decl_lt_dlinterface_register" "$ac_includes_default
- #include <ltdl.h>
-"
-if test "x$ac_cv_have_decl_lt_dlinterface_register" = xyes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dladvise_preload in -lltdl" >&5
-$as_echo_n "checking for lt_dladvise_preload in -lltdl... " >&6; }
-if ${ac_cv_lib_ltdl_lt_dladvise_preload+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lltdl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char lt_dladvise_preload ();
-int
-main ()
-{
-return lt_dladvise_preload ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_ltdl_lt_dladvise_preload=yes
-else
- ac_cv_lib_ltdl_lt_dladvise_preload=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dladvise_preload" >&5
-$as_echo "$ac_cv_lib_ltdl_lt_dladvise_preload" >&6; }
-if test "x$ac_cv_lib_ltdl_lt_dladvise_preload" = xyes; then :
- with_included_ltdl=no
-else
- with_included_ltdl=yes
-fi
-
-else
- with_included_ltdl=yes
-fi
-
-else
- with_included_ltdl=yes
-fi
-
-
-fi
-
-
-
-
-# Check whether --with-ltdl_include was given.
-if test "${with_ltdl_include+set}" = set; then :
- withval=$with_ltdl_include;
-fi
-
-
-if test -n "$with_ltdl_include"; then
- if test -f "$with_ltdl_include/ltdl.h"; then :
- else
- as_fn_error $? "invalid ltdl include directory: \`$with_ltdl_include'" "$LINENO" 5
- fi
-else
- with_ltdl_include=no
-fi
-
-
-# Check whether --with-ltdl_lib was given.
-if test "${with_ltdl_lib+set}" = set; then :
- withval=$with_ltdl_lib;
-fi
-
-
-if test -n "$with_ltdl_lib"; then
- if test -f "$with_ltdl_lib/libltdl.la"; then :
- else
- as_fn_error $? "invalid ltdl library directory: \`$with_ltdl_lib'" "$LINENO" 5
- fi
-else
- with_ltdl_lib=no
-fi
-
-case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
- ,yes,no,no,)
- case $enable_ltdl_convenience in
- no) as_fn_error $? "this package needs a convenience libltdl" "$LINENO" 5 ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
-esac
-LIBLTDL='${top_build_prefix}'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
-LTDLDEPS=$LIBLTDL
-LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
-
-
-
-
-
-# For backwards non-gettext consistent compatibility...
-INCLTDL="$LTDLINCL"
-
-
- ;;
- ,no,no,no,)
- # If the included ltdl is not to be used, then use the
- # preinstalled libltdl we found.
-
-$as_echo "#define HAVE_LTDL 1" >>confdefs.h
-
- LIBLTDL=-lltdl
- LTDLDEPS=
- LTDLINCL=
- ;;
- ,no*,no,*)
- as_fn_error $? "\`--with-ltdl-include' and \`--with-ltdl-lib' options must be used together" "$LINENO" 5
- ;;
- *) with_included_ltdl=no
- LIBLTDL="-L$with_ltdl_lib -lltdl"
- LTDLDEPS=
- LTDLINCL="-I$with_ltdl_include"
- ;;
-esac
-INCLTDL="$LTDLINCL"
-
-# Report our decision...
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find libltdl headers" >&5
-$as_echo_n "checking where to find libltdl headers... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LTDLINCL" >&5
-$as_echo "$LTDLINCL" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find libltdl library" >&5
-$as_echo_n "checking where to find libltdl library... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLTDL" >&5
-$as_echo "$LIBLTDL" >&6; }
-
-
-
-# Check whether --enable-ltdl-install was given.
-if test "${enable_ltdl_install+set}" = set; then :
- enableval=$enable_ltdl_install;
-fi
-
-
-case ,${enable_ltdl_install},${enable_ltdl_convenience} in
- *yes*) ;;
- *) enable_ltdl_convenience=yes ;;
-esac
-
- if test x"${enable_ltdl_install-no}" != xno; then
- INSTALL_LTDL_TRUE=
- INSTALL_LTDL_FALSE='#'
-else
- INSTALL_LTDL_TRUE='#'
- INSTALL_LTDL_FALSE=
-fi
-
- if test x"${enable_ltdl_convenience-no}" != xno; then
- CONVENIENCE_LTDL_TRUE=
- CONVENIENCE_LTDL_FALSE='#'
-else
- CONVENIENCE_LTDL_TRUE='#'
- CONVENIENCE_LTDL_FALSE=
-fi
-
-
-
-
-
-
-# In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
-# the user used. This is so that ltdl.h can pick up the parent projects
-# config.h file, The first file in AC_CONFIG_HEADERS must contain the
-# definitions required by ltdl.c.
-# FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
-
-
-
-for ac_header in unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-for ac_func in closedir opendir readdir
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
-
-
- _LT_LIBOBJS="$_LT_LIBOBJS lt__dirent.$ac_objext"
-
-fi
-done
-
-for ac_func in strlcat strlcpy
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
-
-
- _LT_LIBOBJS="$_LT_LIBOBJS lt__strl.$ac_objext"
-
-fi
-done
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define LT_LIBEXT "$libext"
-_ACEOF
-
-
-name=
-eval "lt_libprefix=\"$libname_spec\""
-
-cat >>confdefs.h <<_ACEOF
-#define LT_LIBPREFIX "$lt_libprefix"
-_ACEOF
-
-
-name=ltdl
-eval "LTDLOPEN=\"$libname_spec\""
-
-
-
-
-
-
-
-
-# Only expand once:
-
-
-
# Check to see if building shared libraries
libtool_build_shared_libs='no'
if test "$enable_shared" = 'yes'; then
#
# Enable support for building loadable modules
#
-build_modules='no'
+build_modules='yes'
# Check whether --with-modules was given.
if test "${with_modules+set}" = set; then :
fi
-# Only use/depend on libtdl if we are building modules.
-with_ltdl='no'
-if test "$build_modules" != 'no' ; then
- with_ltdl='yes'
-fi
-
- if test "$with_ltdl" != 'no'; then
- WITH_LTDL_TRUE=
- WITH_LTDL_FALSE='#'
-else
- WITH_LTDL_TRUE='#'
- WITH_LTDL_FALSE=
-fi
-
-if test "$with_ltdl" != 'no'; then
-
-$as_echo "#define LTDL_DELEGATE 1" >>confdefs.h
-
-fi
-
# Enable build using delegate libraries built in subdirectories rather than installed
# delegate libraries (bzlib fftw fpx gslib jp2 jbig jpeg lcms lzma png tiff ttf wmf xml zlib)
# Check whether --enable-delegate-build was given.
+# whether modules are built or not.
+with_ltdl='yes'
+have_ltdl='no'
+LTDL_LIBS=''
+if test "$build_modules" != 'no' ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: -------------------------------------------------------------" >&5
+$as_echo "$as_me: -------------------------------------------------------------" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libltdl" >&5
+$as_echo_n "checking for libltdl... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: " >&5
+$as_echo "$as_me: " >&6;}
+ failed=0
+ passed=0
+ ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default"
+if test "x$ac_cv_header_ltdl_h" = xyes; then :
+ passed=`expr $passed + 1`
+else
+ failed=`expr $failed + 1`
+fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5
+$as_echo_n "checking for lt_dlinit in -lltdl... " >&6; }
+if ${ac_cv_lib_ltdl_lt_dlinit+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lltdl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char lt_dlinit ();
+int
+main ()
+{
+return lt_dlinit ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_ltdl_lt_dlinit=yes
+else
+ ac_cv_lib_ltdl_lt_dlinit=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
+$as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; }
+if test "x$ac_cv_lib_ltdl_lt_dlinit" = xyes; then :
+ passed=`expr $passed + 1`
+else
+ failed=`expr $failed + 1`
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libltdl package is complete" >&5
+$as_echo_n "checking if libltdl package is complete... " >&6; }
+ if test $passed -gt 0 ; then
+ if test $failed -gt 0 ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no -- some components failed test" >&5
+$as_echo "no -- some components failed test" >&6; }
+ have_ltdl='no (failed tests)'
+ else
+ LTDL_LIBS='-lltdl'
+ LIBS="$LTDL_LIBS $LIBS"
+
+$as_echo "#define LTDL_DELEGATE 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_ltdl='yes'
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+fi
+ if test "$have_ltdl" != 'no'; then
+ WITH_LTDL_TRUE=
+ WITH_LTDL_FALSE='#'
+else
+ WITH_LTDL_TRUE='#'
+ WITH_LTDL_FALSE=
+fi
+
+
#
# If profiling, then check for -ldl and dlopen (required for Solaris & gcc)
#
# Build library dependency list for libMagickCore
#
-MAGICK_LIBLTDL='' # Libltdl for build
-MAGICK_API_LIBLTDL='' # libltdl for dependent application (API) build
-MAGICK_LTDLDEPS='' # extra libltdl dependencies
-if test "$with_ltdl" != 'no' ; then
- MAGICK_API_LIBLTDL='-lltdl'
- MAGICK_LIBLTDL=${LIBLTDL}
- MAGICK_LTDLDEPS=${LTDLDEPS}
-fi
-
-
-
if test "$build_modules" != 'no'; then
- MAGICK_DEP_LIBS="$LCMS_LIBS $FREETYPE_LIBS $LQR_LIBS $FFTW_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $THREAD_LIBS"
+ MAGICK_DEP_LIBS="$LCMS_LIBS $FREETYPE_LIBS $LQR_LIBS $FFTW_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $LTDL_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $THREAD_LIBS"
else
MAGICK_DEP_LIBS="$JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $JP2_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FPX_LIBS $FONTCONFIG_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $PANGO_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $THREAD_LIBS"
fi
as_fn_error $? "conditional \"USING_CL\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${INSTALL_LTDL_TRUE}" && test -z "${INSTALL_LTDL_FALSE}"; then
- as_fn_error $? "conditional \"INSTALL_LTDL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${CONVENIENCE_LTDL_TRUE}" && test -z "${CONVENIENCE_LTDL_FALSE}"; then
- as_fn_error $? "conditional \"CONVENIENCE_LTDL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-LT_CONFIG_H=config/config.h
-
- _ltdl_libobjs=
- _ltdl_ltlibobjs=
- if test -n "$_LT_LIBOBJS"; then
- # Remove the extension.
- _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
- for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
- _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
- _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
- done
- fi
- ltdl_LIBOBJS=$_ltdl_libobjs
-
- ltdl_LTLIBOBJS=$_ltdl_ltlibobjs
-
-
if test -z "${WITH_SHARED_LIBS_TRUE}" && test -z "${WITH_SHARED_LIBS_FALSE}"; then
as_fn_error $? "conditional \"WITH_SHARED_LIBS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
as_fn_error $? "conditional \"WITH_MODULES\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${WITH_LTDL_TRUE}" && test -z "${WITH_LTDL_FALSE}"; then
- as_fn_error $? "conditional \"WITH_LTDL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
as_fn_error $? "conditional \"ZLIB_DELEGATE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${WITH_LTDL_TRUE}" && test -z "${WITH_LTDL_FALSE}"; then
+ as_fn_error $? "conditional \"WITH_LTDL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${AUTOTRACE_DELEGATE_TRUE}" && test -z "${AUTOTRACE_DELEGATE_FALSE}"; then
as_fn_error $? "conditional \"AUTOTRACE_DELEGATE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
LCMS v1 --with-lcms=$with_lcms $have_lcms
LCMS v2 --with-lcms2=$with_lcms2 $have_lcms2
LQR --with-lqr=$with_lqr $have_lqr
+LTDL --with-ltdl=$with_ltdl $have_ltdl
LZMA --with-lzma=$with_lzma $have_lzma
Magick++ --with-magick-plus-plus=$with_magick_plus_plus $have_magick_plus_plus
OpenEXR --with-openexr=$with_openexr $have_openexr
TIFF --with-tiff=$with_tiff $have_tiff
WEBP --with-webp=$with_webp $have_webp
Windows fonts --with-windows-font-dir=$with_windows_font_dir $result_windows_font_dir
-WMF --with-wmf=$with_wmf $have_wmf
+WMF --with-wmf=$with_wmf $have_wmf
X11 --with-x=$with_x $have_x
XML --with-xml=$with_xml $have_xml
ZLIB --with-zlib=$with_zlib $have_zlib
LCMS v1 --with-lcms=$with_lcms $have_lcms
LCMS v2 --with-lcms2=$with_lcms2 $have_lcms2
LQR --with-lqr=$with_lqr $have_lqr
+LTDL --with-ltdl=$with_ltdl $have_ltdl
LZMA --with-lzma=$with_lzma $have_lzma
Magick++ --with-magick-plus-plus=$with_magick_plus_plus $have_magick_plus_plus
OpenEXR --with-openexr=$with_openexr $have_openexr
TIFF --with-tiff=$with_tiff $have_tiff
WEBP --with-webp=$with_webp $have_webp
Windows fonts --with-windows-font-dir=$with_windows_font_dir $result_windows_font_dir
-WMF --with-wmf=$with_wmf $have_wmf
+WMF --with-wmf=$with_wmf $have_wmf
X11 --with-x=$with_x $have_x
XML --with-xml=$with_xml $have_xml
ZLIB --with-zlib=$with_zlib $have_zlib
AC_CONFIG_AUX_DIR([config])
AC_REQUIRE_AUX_FILE([tap-driver.sh])
AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_LIBOBJ_DIR([ltdl])
AC_CONFIG_HEADERS([config/config.h])
AX_PREFIX_CONFIG_H([MagickCore/magick-config.h],[MagickCore])
AC_CONFIG_FILES([\
LT_LANG([C++])
AC_SUBST(LIBTOOL_DEPS)
-# Configure libltdl
-LT_CONFIG_LTDL_DIR([ltdl])
-LTDL_INIT([nonrecursive convenience])
-
# Check to see if building shared libraries
libtool_build_shared_libs='no'
if test "$enable_shared" = 'yes'; then
#
# Enable support for building loadable modules
#
-build_modules='no'
+build_modules='yes'
AC_ARG_WITH([modules],
[AC_HELP_STRING([--with-modules],
[enable building dynamically loadable modules])],
fi
AM_CONDITIONAL(WITH_MODULES, test "$build_modules" != 'no')
-# Only use/depend on libtdl if we are building modules.
-with_ltdl='no'
-if test "$build_modules" != 'no' ; then
- with_ltdl='yes'
-fi
-
-AM_CONDITIONAL(WITH_LTDL, test "$with_ltdl" != 'no')
-if test "$with_ltdl" != 'no'; then
- AC_DEFINE(LTDL_DELEGATE,1,Define if using libltdl to support dynamically loadable modules)
-fi
-
# Enable build using delegate libraries built in subdirectories rather than installed
# delegate libraries (bzlib fftw fpx gslib jp2 jbig jpeg lcms lzma png tiff ttf wmf xml zlib)
AC_ARG_ENABLE([delegate-build],
AM_CONDITIONAL(ZLIB_DELEGATE, test "$have_zlib" = 'yes')
AC_SUBST(ZLIB_LIBS)
+# whether modules are built or not.
+with_ltdl='yes'
+have_ltdl='no'
+LTDL_LIBS=''
+if test "$build_modules" != 'no' ; then
+ AC_MSG_NOTICE([-------------------------------------------------------------])
+ AC_MSG_CHECKING([for libltdl])
+ AC_MSG_NOTICE([])
+ failed=0
+ passed=0
+ AC_CHECK_HEADER(ltdl.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
+ AC_CHECK_LIB([ltdl],[lt_dlinit],passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
+ AC_MSG_CHECKING(if libltdl package is complete)
+ if test $passed -gt 0 ; then
+ if test $failed -gt 0 ; then
+ AC_MSG_RESULT(no -- some components failed test)
+ have_ltdl='no (failed tests)'
+ else
+ LTDL_LIBS='-lltdl'
+ LIBS="$LTDL_LIBS $LIBS"
+ AC_DEFINE(LTDL_DELEGATE,1,Define if using libltdl to support dynamically loadable modules)
+ AC_MSG_RESULT(yes)
+ have_ltdl='yes'
+ fi
+ else
+ AC_MSG_RESULT(no)
+ fi
+fi
+AM_CONDITIONAL(WITH_LTDL, test "$have_ltdl" != 'no')
+
#
# If profiling, then check for -ldl and dlopen (required for Solaris & gcc)
#
# Build library dependency list for libMagickCore
#
-MAGICK_LIBLTDL='' # Libltdl for build
-MAGICK_API_LIBLTDL='' # libltdl for dependent application (API) build
-MAGICK_LTDLDEPS='' # extra libltdl dependencies
-if test "$with_ltdl" != 'no' ; then
- MAGICK_API_LIBLTDL='-lltdl'
- MAGICK_LIBLTDL=${LIBLTDL}
- MAGICK_LTDLDEPS=${LTDLDEPS}
-fi
-AC_SUBST(MAGICK_LIBLTDL)
-AC_SUBST(MAGICK_LTDLDEPS)
-
if test "$build_modules" != 'no'; then
- MAGICK_DEP_LIBS="$LCMS_LIBS $FREETYPE_LIBS $LQR_LIBS $FFTW_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $THREAD_LIBS"
+ MAGICK_DEP_LIBS="$LCMS_LIBS $FREETYPE_LIBS $LQR_LIBS $FFTW_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $LTDL_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $THREAD_LIBS"
else
MAGICK_DEP_LIBS="$JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $JP2_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FPX_LIBS $FONTCONFIG_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $PANGO_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $THREAD_LIBS"
fi
LCMS v1 --with-lcms=$with_lcms $have_lcms
LCMS v2 --with-lcms2=$with_lcms2 $have_lcms2
LQR --with-lqr=$with_lqr $have_lqr
+LTDL --with-ltdl=$with_ltdl $have_ltdl
LZMA --with-lzma=$with_lzma $have_lzma
Magick++ --with-magick-plus-plus=$with_magick_plus_plus $have_magick_plus_plus
OpenEXR --with-openexr=$with_openexr $have_openexr
TIFF --with-tiff=$with_tiff $have_tiff
WEBP --with-webp=$with_webp $have_webp
Windows fonts --with-windows-font-dir=$with_windows_font_dir $result_windows_font_dir
-WMF --with-wmf=$with_wmf $have_wmf
+WMF --with-wmf=$with_wmf $have_wmf
X11 --with-x=$with_x $have_x
XML --with-xml=$with_xml $have_xml
ZLIB --with-zlib=$with_zlib $have_zlib
+++ /dev/null
-## Makefile.inc -- includable Makefile.am snippet
-##
-## Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
-## Written by Gary V. Vaughan, 2003
-##
-## NOTE: The canonical source of this file is maintained with the
-## GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-##
-## GNU Libltdl is free software; you can redistribute it and/or
-## modify it under the terms of the GNU Lesser General Public
-## License as published by the Free Software Foundation; either
-## version 2 of the License, or (at your option) any later version.
-##
-## As a special exception to the GNU Lesser General Public License,
-## if you distribute this file as part of a program or library that
-## is built using GNU libtool, you may include this file under the
-## same distribution terms that you use for the rest of that program.
-##
-## GNU Libltdl is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU Lesser General Public License for more details.
-##
-## You should have received a copy of the GNU LesserGeneral Public
-## License along with GNU Libltdl; see the file README. If not, a
-## copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-## or obtained by writing to the Free Software Foundation, Inc.,
-## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#####
-
-## DO NOT REMOVE THIS LINE -- make depends on it
-
-# -I$(srcdir) is needed for user that built libltdl with a sub-Automake
-# (not as a sub-package!) using 'nostdinc':
-AM_CPPFLAGS += -DLT_CONFIG_H='<$(LT_CONFIG_H)>' \
- -DLTDL -I. -I$(srcdir) -Iltdl \
- -I$(srcdir)/ltdl -I$(srcdir)/ltdl/libltdl
-AM_LDFLAGS += -no-undefined
-LTDL_VERSION_INFO = -version-info 10:0:3
-
-noinst_LTLIBRARIES += $(LT_DLLOADERS)
-
-if INSTALL_LTDL
-ltdlincludedir = $(includedir)/libltdl
-ltdlinclude_HEADERS = ltdl/libltdl/lt_system.h \
- ltdl/libltdl/lt_error.h \
- ltdl/libltdl/lt_dlloader.h
-include_HEADERS += ltdl/ltdl.h
-lib_LTLIBRARIES += ltdl/libltdl.la
-endif
-
-if CONVENIENCE_LTDL
-noinst_LTLIBRARIES += ltdl/libltdlc.la
-endif
-
-ltdl_libltdl_la_SOURCES = ltdl/libltdl/lt__alloc.h \
- ltdl/libltdl/lt__dirent.h \
- ltdl/libltdl/lt__glibc.h \
- ltdl/libltdl/lt__private.h \
- ltdl/libltdl/lt__strl.h \
- ltdl/libltdl/lt_dlloader.h \
- ltdl/libltdl/lt_error.h \
- ltdl/libltdl/lt_system.h \
- ltdl/libltdl/slist.h \
- ltdl/loaders/preopen.c \
- ltdl/lt__alloc.c \
- ltdl/lt_dlloader.c \
- ltdl/lt_error.c \
- ltdl/ltdl.c \
- ltdl/ltdl.h \
- ltdl/slist.c
-
-EXTRA_DIST += ltdl/lt__dirent.c \
- ltdl/lt__strl.c
-
-ltdl_libltdl_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN) $(AM_CPPFLAGS)
-ltdl_libltdl_la_LDFLAGS = $(AM_LDFLAGS) $(LTDL_VERSION_INFO) $(LT_DLPREOPEN)
-ltdl_libltdl_la_LIBADD = $(ltdl_LTLIBOBJS)
-ltdl_libltdl_la_DEPENDENCIES = $(LT_DLLOADERS) $(ltdl_LTLIBOBJS)
-
-ltdl_libltdlc_la_SOURCES = $(ltdl_libltdl_la_SOURCES)
-ltdl_libltdlc_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN)c $(AM_CPPFLAGS)
-ltdl_libltdlc_la_LDFLAGS = $(AM_LDFLAGS) $(LT_DLPREOPEN)
-ltdl_libltdlc_la_LIBADD = $(ltdl_libltdl_la_LIBADD)
-ltdl_libltdlc_la_DEPENDENCIES= $(ltdl_libltdl_la_DEPENDENCIES)
-
-## The loaders are preopened by libltdl, itself always built from
-## pic-objects (either as a shared library, or a convenience library),
-## so the loaders themselves must be made from pic-objects too. We
-## use convenience libraries for that purpose:
-EXTRA_LTLIBRARIES += ltdl/dlopen.la \
- ltdl/dld_link.la \
- ltdl/dyld.la \
- ltdl/load_add_on.la \
- ltdl/loadlibrary.la \
- ltdl/shl_load.la
-
-ltdl_dlopen_la_SOURCES = ltdl/loaders/dlopen.c
-ltdl_dlopen_la_LDFLAGS = -module -avoid-version
-ltdl_dlopen_la_LIBADD = $(LIBADD_DLOPEN)
-
-ltdl_dld_link_la_SOURCES = ltdl/loaders/dld_link.c
-ltdl_dld_link_la_LDFLAGS = -module -avoid-version
-ltdl_dld_link_la_LIBADD = -ldld
-
-ltdl_dyld_la_SOURCES = ltdl/loaders/dyld.c
-ltdl_dyld_la_LDFLAGS = -module -avoid-version
-
-ltdl_load_add_on_la_SOURCES = ltdl/loaders/load_add_on.c
-ltdl_load_add_on_la_LDFLAGS = -module -avoid-version
-
-ltdl_loadlibrary_la_SOURCES = ltdl/loaders/loadlibrary.c
-ltdl_loadlibrary_la_LDFLAGS = -module -avoid-version
-
-ltdl_shl_load_la_SOURCES = ltdl/loaders/shl_load.c
-ltdl_shl_load_la_LDFLAGS = -module -avoid-version
-ltdl_shl_load_la_LIBADD = $(LIBADD_SHL_LOAD)
-
-## Make sure these will be cleaned even when they're not built by default:
-CLEANFILES += ltdl/libltdl.la \
- ltdl/libltdlc.la \
- ltdl/libdlloader.la
-
-## Automake-1.9.6 doesn't clean subdir AC_LIBOBJ compiled objects
-## automatically:
-CLEANFILES += $(ltdl_LIBOBJS) $(ltdl_LTLIBOBJS)
-
-EXTRA_DIST += ltdl/README \
- ltdl/README
-
-## --------------------------- ##
-## Gnulib Makefile.am snippets ##
-## --------------------------- ##
-
-BUILT_SOURCES += ltdl/$(ARGZ_H)
-EXTRA_DIST += ltdl/argz_.h \
- ltdl/argz.c
-
-# We need the following in order to create an <argz.h> when the system
-# doesn't have one that works with the given compiler.
-all-local $(lib_OBJECTS): ltdl/$(ARGZ_H)
-ltdl/argz.h: ltdl/argz_.h
- $(mkinstalldirs) . ltdl/
- cp $(srcdir)/ltdl/argz_.h $@-t
- mv $@-t $@
-MOSTLYCLEANFILES += ltdl/argz.h \
- ltdl/argz.h-t
+++ /dev/null
-This is GNU libltdl, a system independent dlopen wrapper for GNU libtool.
-
-It supports the following dlopen interfaces:
-* dlopen (POSIX)
-* shl_load (HP-UX)
-* LoadLibrary (Win16 and Win32)
-* load_add_on (BeOS)
-* GNU DLD (emulates dynamic linking for static libraries)
-* dyld (darwin/Mac OS X)
-* libtool's dlpreopen
---
- Copyright (C) 1999, 2003, 2011 Free Software Foundation, Inc.
- Written by Thomas Tanner, 1999
-
- This file is part of GNU Libtool.
-
-Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved. This file is offered as-is,
-without warranty of any kind.
+++ /dev/null
-/* argz.c -- argz implementation for non-glibc systems
-
- Copyright (C) 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
- Written by Gary V. Vaughan, 2004
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#if defined(LTDL) && defined LT_CONFIG_H
-# include LT_CONFIG_H
-#else
-# include <config.h>
-#endif
-
-#include <argz.h>
-
-#include <assert.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <errno.h>
-#include <string.h>
-
-#define EOS_CHAR '\0'
-
-error_t
-argz_append (char **pargz, size_t *pargz_len, const char *buf, size_t buf_len)
-{
- size_t argz_len;
- char *argz;
-
- assert (pargz);
- assert (pargz_len);
- assert ((*pargz && *pargz_len) || (!*pargz && !*pargz_len));
-
- /* If nothing needs to be appended, no more work is required. */
- if (buf_len == 0)
- return 0;
-
- /* Ensure there is enough room to append BUF_LEN. */
- argz_len = *pargz_len + buf_len;
- argz = (char *) realloc (*pargz, argz_len);
- if (!argz)
- return ENOMEM;
-
- /* Copy characters from BUF after terminating '\0' in ARGZ. */
- memcpy (argz + *pargz_len, buf, buf_len);
-
- /* Assign new values. */
- *pargz = argz;
- *pargz_len = argz_len;
-
- return 0;
-}
-
-
-error_t
-argz_create_sep (const char *str, int delim, char **pargz, size_t *pargz_len)
-{
- size_t argz_len;
- char *argz = 0;
-
- assert (str);
- assert (pargz);
- assert (pargz_len);
-
- /* Make a copy of STR, but replacing each occurrence of
- DELIM with '\0'. */
- argz_len = 1+ strlen (str);
- if (argz_len)
- {
- const char *p;
- char *q;
-
- argz = (char *) malloc (argz_len);
- if (!argz)
- return ENOMEM;
-
- for (p = str, q = argz; *p != EOS_CHAR; ++p)
- {
- if (*p == delim)
- {
- /* Ignore leading delimiters, and fold consecutive
- delimiters in STR into a single '\0' in ARGZ. */
- if ((q > argz) && (q[-1] != EOS_CHAR))
- *q++ = EOS_CHAR;
- else
- --argz_len;
- }
- else
- *q++ = *p;
- }
- /* Copy terminating EOS_CHAR. */
- *q = *p;
- }
-
- /* If ARGZ_LEN has shrunk to nothing, release ARGZ's memory. */
- if (!argz_len)
- argz = (free (argz), (char *) 0);
-
- /* Assign new values. */
- *pargz = argz;
- *pargz_len = argz_len;
-
- return 0;
-}
-
-
-error_t
-argz_insert (char **pargz, size_t *pargz_len, char *before, const char *entry)
-{
- assert (pargz);
- assert (pargz_len);
- assert (entry && *entry);
-
- /* No BEFORE address indicates ENTRY should be inserted after the
- current last element. */
- if (!before)
- return argz_append (pargz, pargz_len, entry, 1+ strlen (entry));
-
- /* This probably indicates a programmer error, but to preserve
- semantics, scan back to the start of an entry if BEFORE points
- into the middle of it. */
- while ((before > *pargz) && (before[-1] != EOS_CHAR))
- --before;
-
- {
- size_t entry_len = 1+ strlen (entry);
- size_t argz_len = *pargz_len + entry_len;
- size_t offset = before - *pargz;
- char *argz = (char *) realloc (*pargz, argz_len);
-
- if (!argz)
- return ENOMEM;
-
- /* Make BEFORE point to the equivalent offset in ARGZ that it
- used to have in *PARGZ incase realloc() moved the block. */
- before = argz + offset;
-
- /* Move the ARGZ entries starting at BEFORE up into the new
- space at the end -- making room to copy ENTRY into the
- resulting gap. */
- memmove (before + entry_len, before, *pargz_len - offset);
- memcpy (before, entry, entry_len);
-
- /* Assign new values. */
- *pargz = argz;
- *pargz_len = argz_len;
- }
-
- return 0;
-}
-
-
-char *
-argz_next (char *argz, size_t argz_len, const char *entry)
-{
- assert ((argz && argz_len) || (!argz && !argz_len));
-
- if (entry)
- {
- /* Either ARGZ/ARGZ_LEN is empty, or ENTRY points into an address
- within the ARGZ vector. */
- assert ((!argz && !argz_len)
- || ((argz <= entry) && (entry < (argz + argz_len))));
-
- /* Move to the char immediately after the terminating
- '\0' of ENTRY. */
- entry = 1+ strchr (entry, EOS_CHAR);
-
- /* Return either the new ENTRY, or else NULL if ARGZ is
- exhausted. */
- return (entry >= argz + argz_len) ? 0 : (char *) entry;
- }
- else
- {
- /* This should probably be flagged as a programmer error,
- since starting an argz_next loop with the iterator set
- to ARGZ is safer. To preserve semantics, handle the NULL
- case by returning the start of ARGZ (if any). */
- if (argz_len > 0)
- return argz;
- else
- return 0;
- }
-}
-
-
-void
-argz_stringify (char *argz, size_t argz_len, int sep)
-{
- assert ((argz && argz_len) || (!argz && !argz_len));
-
- if (sep)
- {
- --argz_len; /* don't stringify the terminating EOS */
- while (--argz_len > 0)
- {
- if (argz[argz_len] == EOS_CHAR)
- argz[argz_len] = sep;
- }
- }
-}
-
+++ /dev/null
-/* lt__argz.h -- internal argz interface for non-glibc systems
-
- Copyright (C) 2004, 2007, 2008 Free Software Foundation, Inc.
- Written by Gary V. Vaughan, 2004
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#if !defined(LT__ARGZ_H)
-#define LT__ARGZ_H 1
-
-#include <stdlib.h>
-#define __need_error_t
-#include <errno.h>
-#include <sys/types.h>
-
-#if defined(LTDL)
-# include "lt__glibc.h"
-# include "lt_system.h"
-#else
-# define LT_SCOPE
-#endif
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-LT_SCOPE error_t argz_append (char **pargz, size_t *pargz_len,
- const char *buf, size_t buf_len);
-LT_SCOPE error_t argz_create_sep(const char *str, int delim,
- char **pargz, size_t *pargz_len);
-LT_SCOPE error_t argz_insert (char **pargz, size_t *pargz_len,
- char *before, const char *entry);
-LT_SCOPE char * argz_next (char *argz, size_t argz_len,
- const char *entry);
-LT_SCOPE void argz_stringify (char *argz, size_t argz_len, int sep);
-
-#if defined(__cplusplus)
-}
-#endif
-
-#if !defined(LTDL)
-# undef LT_SCOPE
-#endif
-
-#endif /*!defined(LT__ARGZ_H)*/
+++ /dev/null
-/* lt__alloc.h -- internal memory management interface
-
- Copyright (C) 2004 Free Software Foundation, Inc.
- Written by Gary V. Vaughan, 2004
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#if !defined(LT__ALLOC_H)
-#define LT__ALLOC_H 1
-
-#include "lt_system.h"
-
-LT_BEGIN_C_DECLS
-
-#define MALLOC(tp, n) (tp*) lt__malloc((n) * sizeof(tp))
-#define REALLOC(tp, mem, n) (tp*) lt__realloc((mem), (n) * sizeof(tp))
-#define FREE(mem) LT_STMT_START { \
- if (mem) { free ((void *)mem); mem = NULL; } } LT_STMT_END
-#define MEMREASSIGN(p, q) LT_STMT_START { \
- if ((p) != (q)) { if (p) free (p); (p) = (q); (q) = 0; } \
- } LT_STMT_END
-
-/* If set, this function is called when memory allocation has failed. */
-LT_SCOPE void (*lt__alloc_die) (void);
-
-LT_SCOPE void *lt__malloc (size_t n);
-LT_SCOPE void *lt__zalloc (size_t n);
-LT_SCOPE void *lt__realloc (void *mem, size_t n);
-LT_SCOPE void *lt__memdup (void const *mem, size_t n);
-
-LT_SCOPE char *lt__strdup (const char *string);
-
-LT_END_C_DECLS
-
-#endif /*!defined(LT__ALLOC_H)*/
+++ /dev/null
-/* lt__dirent.h -- internal directory entry scanning interface
-
- Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc.
- Written by Bob Friesenhahn, 2001
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#if !defined(LT__DIRENT_H)
-#define LT__DIRENT_H 1
-
-#if defined(LT_CONFIG_H)
-# include LT_CONFIG_H
-#else
-# include <config.h>
-#endif
-
-#include "lt_system.h"
-
-#ifdef HAVE_DIRENT_H
-/* We have a fully operational dirent subsystem. */
-# include <dirent.h>
-# define D_NAMLEN(dirent) (strlen((dirent)->d_name))
-
-#elif defined __WINDOWS__
-/* Use some wrapper code to emulate dirent on windows.. */
-# define WINDOWS_DIRENT_EMULATION 1
-
-# include <windows.h>
-
-# define D_NAMLEN(dirent) (strlen((dirent)->d_name))
-# define dirent lt__dirent
-# define DIR lt__DIR
-# define opendir lt__opendir
-# define readdir lt__readdir
-# define closedir lt__closedir
-
-LT_BEGIN_C_DECLS
-
-struct dirent
-{
- char d_name[LT_FILENAME_MAX];
- int d_namlen;
-};
-
-typedef struct
-{
- HANDLE hSearch;
- WIN32_FIND_DATA Win32FindData;
- BOOL firsttime;
- struct dirent file_info;
-} DIR;
-
-
-LT_SCOPE DIR * opendir (const char *path);
-LT_SCOPE struct dirent *readdir (DIR *entry);
-LT_SCOPE void closedir (DIR *entry);
-
-LT_END_C_DECLS
-
-#else /* !defined(__WINDOWS__)*/
-ERROR - cannot find dirent
-#endif /*!defined(__WINDOWS__)*/
-
-#endif /*!defined(LT__DIRENT_H)*/
+++ /dev/null
-/* lt__glibc.h -- support for non glibc environments
-
- Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
- Written by Gary V. Vaughan, 2004
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#if !defined(LT__GLIBC_H)
-#define LT__GLIBC_H 1
-
-#if defined(LT_CONFIG_H)
-# include LT_CONFIG_H
-#else
-# include <config.h>
-#endif
-
-#if !defined(HAVE_ARGZ_H) || !defined(HAVE_WORKING_ARGZ)
-/* Redefine any glibc symbols we reimplement to import the
- implementations into our lt__ namespace so we don't ever
- clash with the system library if our clients use argz_*
- from there in addition to libltdl. */
-# undef argz_append
-# define argz_append lt__argz_append
-# undef argz_create_sep
-# define argz_create_sep lt__argz_create_sep
-# undef argz_insert
-# define argz_insert lt__argz_insert
-# undef argz_next
-# define argz_next lt__argz_next
-# undef argz_stringify
-# define argz_stringify lt__argz_stringify
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <argz.h>
-
-#ifdef __cplusplus
-}
-#endif
-
-# define slist_concat lt__slist_concat
-# define slist_cons lt__slist_cons
-# define slist_delete lt__slist_delete
-# define slist_remove lt__slist_remove
-# define slist_reverse lt__slist_reverse
-# define slist_sort lt__slist_sort
-# define slist_tail lt__slist_tail
-# define slist_nth lt__slist_nth
-# define slist_find lt__slist_find
-# define slist_length lt__slist_length
-# define slist_foreach lt__slist_foreach
-# define slist_box lt__slist_box
-# define slist_unbox lt__slist_unbox
-
-#include <slist.h>
-
-#endif /*!defined(LT__GLIBC_H)*/
+++ /dev/null
-/* lt__private.h -- internal apis for libltdl
-
- Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
- Written by Gary V. Vaughan, 2004
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy con be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#if !defined(LT__PRIVATE_H)
-#define LT__PRIVATE_H 1
-
-#if defined(LT_CONFIG_H)
-# include LT_CONFIG_H
-#else
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include <ctype.h>
-#include <assert.h>
-#include <errno.h>
-#include <string.h>
-
-#if defined(HAVE_UNISTD_H)
-# include <unistd.h>
-#endif
-
-/* Import internal interfaces... */
-#include "lt__alloc.h"
-#include "lt__dirent.h"
-#include "lt__strl.h"
-#include "lt__glibc.h"
-
-/* ...and all exported interfaces. */
-#include "ltdl.h"
-
-#if defined(WITH_DMALLOC)
-# include <dmalloc.h>
-#endif
-
-/* DLL building support on win32 hosts; mostly to workaround their
- ridiculous implementation of data symbol exporting. */
-#ifndef LT_GLOBAL_DATA
-# if defined(__WINDOWS__) || defined(__CYGWIN__)
-# if defined(DLL_EXPORT) /* defined by libtool (if required) */
-# define LT_GLOBAL_DATA __declspec(dllexport)
-# endif
-# endif
-# ifndef LT_GLOBAL_DATA
-# define LT_GLOBAL_DATA /* static linking or !__WINDOWS__ */
-# endif
-#endif
-
-#ifndef __attribute__
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
-# define __attribute__(x)
-# endif
-#endif
-
-#ifndef LT__UNUSED
-# define LT__UNUSED __attribute__ ((__unused__))
-#endif
-
-
-LT_BEGIN_C_DECLS
-
-#if !defined(errno)
-extern int errno;
-#endif
-
-LT_SCOPE void lt__alloc_die_callback (void);
-
-
-/* For readability: */
-#define strneq(s1, s2) (strcmp((s1), (s2)) != 0)
-#define streq(s1, s2) (!strcmp((s1), (s2)))
-
-
-
-/* --- OPAQUE STRUCTURES DECLARED IN LTDL.H --- */
-
-/* This type is used for the array of interface data sets in each handler. */
-typedef struct {
- lt_dlinterface_id key;
- void * data;
-} lt_interface_data;
-
-struct lt__handle {
- lt_dlhandle next;
- const lt_dlvtable * vtable; /* dlopening interface */
- lt_dlinfo info; /* user visible fields */
- int depcount; /* number of dependencies */
- lt_dlhandle * deplibs; /* dependencies */
- lt_module module; /* system module handle */
- void * system; /* system specific data */
- lt_interface_data * interface_data; /* per caller associated data */
- int flags; /* various boolean stats */
-};
-
-struct lt__advise {
- unsigned int try_ext:1; /* try system library extensions. */
- unsigned int is_resident:1; /* module can't be unloaded. */
- unsigned int is_symglobal:1; /* module symbols can satisfy
- subsequently loaded modules. */
- unsigned int is_symlocal:1; /* module symbols are only available
- locally. */
- unsigned int try_preload_only:1;/* only preloaded modules will be tried. */
-};
-
-/* --- ERROR HANDLING --- */
-
-/* Extract the diagnostic strings from the error table macro in the same
- order as the enumerated indices in lt_error.h. */
-
-#define LT__STRERROR(name) lt__error_string(LT_CONC(LT_ERROR_,name))
-
-#define LT__GETERROR(lvalue) (lvalue) = lt__get_last_error()
-#define LT__SETERRORSTR(errormsg) lt__set_last_error(errormsg)
-#define LT__SETERROR(errorcode) LT__SETERRORSTR(LT__STRERROR(errorcode))
-
-LT_SCOPE const char *lt__error_string (int errorcode);
-LT_SCOPE const char *lt__get_last_error (void);
-LT_SCOPE const char *lt__set_last_error (const char *errormsg);
-
-LT_END_C_DECLS
-
-#endif /*!defined(LT__PRIVATE_H)*/
+++ /dev/null
-/* lt__strl.h -- size-bounded string copying and concatenation
-
- Copyright (C) 2004, 2006 Free Software Foundation, Inc.
- Written by Bob Friesenhahn, 2004
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#if !defined(LT__STRL_H)
-#define LT__STRL_H 1
-
-#if defined(LT_CONFIG_H)
-# include LT_CONFIG_H
-#else
-# include <config.h>
-#endif
-
-#include <string.h>
-#include "lt_system.h"
-
-#if !defined(HAVE_STRLCAT)
-# define strlcat(dst,src,dstsize) lt_strlcat(dst,src,dstsize)
-LT_SCOPE size_t lt_strlcat(char *dst, const char *src, const size_t dstsize);
-#endif /* !defined(HAVE_STRLCAT) */
-
-#if !defined(HAVE_STRLCPY)
-# define strlcpy(dst,src,dstsize) lt_strlcpy(dst,src,dstsize)
-LT_SCOPE size_t lt_strlcpy(char *dst, const char *src, const size_t dstsize);
-#endif /* !defined(HAVE_STRLCPY) */
-
-#endif /*!defined(LT__STRL_H)*/
+++ /dev/null
-/* lt_dlloader.h -- dynamic library loader interface
-
- Copyright (C) 2004, 2007, 2008 Free Software Foundation, Inc.
- Written by Gary V. Vaughan, 2004
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#if !defined(LT_DLLOADER_H)
-#define LT_DLLOADER_H 1
-
-#include <libltdl/lt_system.h>
-
-LT_BEGIN_C_DECLS
-
-typedef void * lt_dlloader;
-typedef void * lt_module;
-typedef void * lt_user_data;
-typedef struct lt__advise * lt_dladvise;
-
-/* Function pointer types for module loader vtable entries: */
-typedef lt_module lt_module_open (lt_user_data data,
- const char *filename,
- lt_dladvise advise);
-typedef int lt_module_close (lt_user_data data,
- lt_module module);
-typedef void * lt_find_sym (lt_user_data data, lt_module module,
- const char *symbolname);
-typedef int lt_dlloader_init (lt_user_data data);
-typedef int lt_dlloader_exit (lt_user_data data);
-
-/* Default priority is LT_DLLOADER_PREPEND if none is explicitly given. */
-typedef enum {
- LT_DLLOADER_PREPEND = 0, LT_DLLOADER_APPEND
-} lt_dlloader_priority;
-
-/* This structure defines a module loader, as populated by the get_vtable
- entry point of each loader. */
-typedef struct {
- const char * name;
- const char * sym_prefix;
- lt_module_open * module_open;
- lt_module_close * module_close;
- lt_find_sym * find_sym;
- lt_dlloader_init * dlloader_init;
- lt_dlloader_exit * dlloader_exit;
- lt_user_data dlloader_data;
- lt_dlloader_priority priority;
-} lt_dlvtable;
-
-LT_SCOPE int lt_dlloader_add (const lt_dlvtable *vtable);
-LT_SCOPE lt_dlloader lt_dlloader_next (const lt_dlloader loader);
-
-LT_SCOPE lt_dlvtable * lt_dlloader_remove (const char *name);
-LT_SCOPE const lt_dlvtable *lt_dlloader_find (const char *name);
-LT_SCOPE const lt_dlvtable *lt_dlloader_get (lt_dlloader loader);
-
-
-/* Type of a function to get a loader's vtable: */
-typedef const lt_dlvtable *lt_get_vtable (lt_user_data data);
-
-#ifdef LT_DEBUG_LOADERS
-LT_SCOPE void lt_dlloader_dump (void);
-#endif
-
-LT_END_C_DECLS
-
-#endif /*!defined(LT_DLLOADER_H)*/
+++ /dev/null
-/* lt_error.h -- error propogation interface
-
- Copyright (C) 1999, 2000, 2001, 2004, 2007 Free Software Foundation, Inc.
- Written by Thomas Tanner, 1999
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-/* Only include this header file once. */
-#if !defined(LT_ERROR_H)
-#define LT_ERROR_H 1
-
-#include <libltdl/lt_system.h>
-
-LT_BEGIN_C_DECLS
-
-/* Defining error strings alongside their symbolic names in a macro in
- this way allows us to expand the macro in different contexts with
- confidence that the enumeration of symbolic names will map correctly
- onto the table of error strings. \0 is appended to the strings to
- expilicitely initialize the string terminator. */
-#define lt_dlerror_table \
- LT_ERROR(UNKNOWN, "unknown error\0") \
- LT_ERROR(DLOPEN_NOT_SUPPORTED, "dlopen support not available\0") \
- LT_ERROR(INVALID_LOADER, "invalid loader\0") \
- LT_ERROR(INIT_LOADER, "loader initialization failed\0") \
- LT_ERROR(REMOVE_LOADER, "loader removal failed\0") \
- LT_ERROR(FILE_NOT_FOUND, "file not found\0") \
- LT_ERROR(DEPLIB_NOT_FOUND, "dependency library not found\0") \
- LT_ERROR(NO_SYMBOLS, "no symbols defined\0") \
- LT_ERROR(CANNOT_OPEN, "can't open the module\0") \
- LT_ERROR(CANNOT_CLOSE, "can't close the module\0") \
- LT_ERROR(SYMBOL_NOT_FOUND, "symbol not found\0") \
- LT_ERROR(NO_MEMORY, "not enough memory\0") \
- LT_ERROR(INVALID_HANDLE, "invalid module handle\0") \
- LT_ERROR(BUFFER_OVERFLOW, "internal buffer overflow\0") \
- LT_ERROR(INVALID_ERRORCODE, "invalid errorcode\0") \
- LT_ERROR(SHUTDOWN, "library already shutdown\0") \
- LT_ERROR(CLOSE_RESIDENT_MODULE, "can't close resident module\0") \
- LT_ERROR(INVALID_MUTEX_ARGS, "internal error (code withdrawn)\0")\
- LT_ERROR(INVALID_POSITION, "invalid search path insert position\0")\
- LT_ERROR(CONFLICTING_FLAGS, "symbol visibility can be global or local\0")
-
-/* Enumerate the symbolic error names. */
-enum {
-#define LT_ERROR(name, diagnostic) LT_CONC(LT_ERROR_, name),
- lt_dlerror_table
-#undef LT_ERROR
-
- LT_ERROR_MAX
-};
-
-/* Should be max of the error string lengths above (plus one for C++) */
-#define LT_ERROR_LEN_MAX (41)
-
-/* These functions are only useful from inside custom module loaders. */
-LT_SCOPE int lt_dladderror (const char *diagnostic);
-LT_SCOPE int lt_dlseterror (int errorcode);
-
-
-LT_END_C_DECLS
-
-#endif /*!defined(LT_ERROR_H)*/
+++ /dev/null
-/* lt_system.h -- system portability abstraction layer
-
- Copyright (C) 2004, 2007, 2010 Free Software Foundation, Inc.
- Written by Gary V. Vaughan, 2004
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#if !defined(LT_SYSTEM_H)
-#define LT_SYSTEM_H 1
-
-#include <stddef.h>
-#include <stdlib.h>
-#include <sys/types.h>
-
-/* Some systems do not define EXIT_*, even with STDC_HEADERS. */
-#if !defined(EXIT_SUCCESS)
-# define EXIT_SUCCESS 0
-#endif
-#if !defined(EXIT_FAILURE)
-# define EXIT_FAILURE 1
-#endif
-
-/* Just pick a big number... */
-#define LT_FILENAME_MAX 2048
-
-
-/* Saves on those hard to debug '\0' typos.... */
-#define LT_EOS_CHAR '\0'
-
-/* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations,
- so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at
- the end of C declarations. */
-#if defined(__cplusplus)
-# define LT_BEGIN_C_DECLS extern "C" {
-# define LT_END_C_DECLS }
-#else
-# define LT_BEGIN_C_DECLS /* empty */
-# define LT_END_C_DECLS /* empty */
-#endif
-
-/* LT_STMT_START/END are used to create macros which expand to a
- a single compound statement in a portable way. */
-#if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus)
-# define LT_STMT_START (void)(
-# define LT_STMT_END )
-#else
-# if (defined (sun) || defined (__sun__))
-# define LT_STMT_START if (1)
-# define LT_STMT_END else (void)0
-# else
-# define LT_STMT_START do
-# define LT_STMT_END while (0)
-# endif
-#endif
-
-/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
-/* DATA imports from DLLs on WIN32 con't be const, because runtime
- relocations are performed -- see ld's documentation on pseudo-relocs. */
-# define LT_DLSYM_CONST
-#elif defined(__osf__)
-/* This system does not cope well with relocations in const data. */
-# define LT_DLSYM_CONST
-#else
-# define LT_DLSYM_CONST const
-#endif
-
-/* Canonicalise Windows and Cygwin recognition macros.
- To match the values set by recent Cygwin compilers, make sure that if
- __CYGWIN__ is defined (after canonicalisation), __WINDOWS__ is NOT! */
-#if defined(__CYGWIN32__) && !defined(__CYGWIN__)
-# define __CYGWIN__ __CYGWIN32__
-#endif
-#if defined(__CYGWIN__)
-# if defined(__WINDOWS__)
-# undef __WINDOWS__
-# endif
-#elif defined(_WIN32)
-# define __WINDOWS__ _WIN32
-#elif defined(WIN32)
-# define __WINDOWS__ WIN32
-#endif
-#if defined(__CYGWIN__) && defined(__WINDOWS__)
-# undef __WINDOWS__
-#endif
-
-
-/* DLL building support on win32 hosts; mostly to workaround their
- ridiculous implementation of data symbol exporting. */
-#if !defined(LT_SCOPE)
-# if defined(__WINDOWS__) || defined(__CYGWIN__)
-# if defined(DLL_EXPORT) /* defined by libtool (if required) */
-# define LT_SCOPE extern __declspec(dllexport)
-# endif
-# if defined(LIBLTDL_DLL_IMPORT) /* define if linking with this dll */
- /* note: cygwin/mingw compilers can rely instead on auto-import */
-# define LT_SCOPE extern __declspec(dllimport)
-# endif
-# endif
-# if !defined(LT_SCOPE) /* static linking or !__WINDOWS__ */
-# define LT_SCOPE extern
-# endif
-#endif
-
-#if defined(__WINDOWS__)
-/* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory
- separator when it is set. */
-# define LT_DIRSEP_CHAR '\\'
-# define LT_PATHSEP_CHAR ';'
-#else
-# define LT_PATHSEP_CHAR ':'
-#endif
-
-#if defined(_MSC_VER) /* Visual Studio */
-# define R_OK 4
-#endif
-
-/* fopen() mode flags for reading a text file */
-#undef LT_READTEXT_MODE
-#if defined(__WINDOWS__) || defined(__CYGWIN__)
-# define LT_READTEXT_MODE "rt"
-#else
-# define LT_READTEXT_MODE "r"
-#endif
-
-/* The extra indirection to the LT__STR and LT__CONC macros is required so
- that if the arguments to LT_STR() (or LT_CONC()) are themselves macros,
- they will be expanded before being quoted. */
-#ifndef LT_STR
-# define LT__STR(arg) #arg
-# define LT_STR(arg) LT__STR(arg)
-#endif
-
-#ifndef LT_CONC
-# define LT__CONC(a, b) a##b
-# define LT_CONC(a, b) LT__CONC(a, b)
-#endif
-#ifndef LT_CONC3
-# define LT__CONC3(a, b, c) a##b##c
-# define LT_CONC3(a, b, c) LT__CONC3(a, b, c)
-#endif
-
-#endif /*!defined(LT_SYSTEM_H)*/
+++ /dev/null
-/* slist.h -- generalised singly linked lists
-
- Copyright (C) 2000, 2004, 2009 Free Software Foundation, Inc.
- Written by Gary V. Vaughan, 2000
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-/* A generalised list. This is deliberately transparent so that you
- can make the NEXT field of all your chained data structures first,
- and then cast them to `(SList *)' so that they can be manipulated
- by this API.
-
- Alternatively, you can generate raw SList elements using slist_new(),
- and put the element data in the USERDATA field. Either way you
- get to manage the memory involved by yourself.
-*/
-
-#if !defined(SLIST_H)
-#define SLIST_H 1
-
-#if defined(LTDL)
-# include <libltdl/lt__glibc.h>
-# include <libltdl/lt_system.h>
-#else
-# define LT_SCOPE
-#endif
-
-#include <stddef.h>
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-typedef struct slist {
- struct slist *next; /* chain forward pointer*/
- const void *userdata; /* for boxed `SList' item */
-} SList;
-
-typedef void * SListCallback (SList *item, void *userdata);
-typedef int SListCompare (const SList *item1, const SList *item2,
- void *userdata);
-
-LT_SCOPE SList *slist_concat (SList *head, SList *tail);
-LT_SCOPE SList *slist_cons (SList *item, SList *slist);
-
-LT_SCOPE SList *slist_delete (SList *slist, void (*delete_fct) (void *item));
-LT_SCOPE SList *slist_remove (SList **phead, SListCallback *find,
- void *matchdata);
-LT_SCOPE SList *slist_reverse (SList *slist);
-LT_SCOPE SList *slist_sort (SList *slist, SListCompare *compare,
- void *userdata);
-
-LT_SCOPE SList *slist_tail (SList *slist);
-LT_SCOPE SList *slist_nth (SList *slist, size_t n);
-LT_SCOPE void * slist_find (SList *slist, SListCallback *find,
- void *matchdata);
-LT_SCOPE size_t slist_length (SList *slist);
-
-LT_SCOPE void * slist_foreach (SList *slist, SListCallback *foreach,
- void *userdata);
-
-LT_SCOPE SList *slist_box (const void *userdata);
-LT_SCOPE void * slist_unbox (SList *item);
-
-#if defined(__cplusplus)
-}
-#endif
-
-#if !defined(LTDL)
-# undef LT_SCOPE
-#endif
-
-#endif /*!defined(SLIST_H)*/
+++ /dev/null
-/* loader-dld_link.c -- dynamic linking with dld
-
- Copyright (C) 1998, 1999, 2000, 2004, 2006,
- 2007, 2008 Free Software Foundation, Inc.
- Written by Thomas Tanner, 1998
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#include "lt__private.h"
-#include "lt_dlloader.h"
-
-/* Use the preprocessor to rename non-static symbols to avoid namespace
- collisions when the loader code is statically linked into libltdl.
- Use the "<module_name>_LTX_" prefix so that the symbol addresses can
- be fetched from the preloaded symbol list by lt_dlsym(): */
-#define get_vtable dld_link_LTX_get_vtable
-
-LT_BEGIN_C_DECLS
-LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data);
-LT_END_C_DECLS
-
-
-/* Boilerplate code to set up the vtable for hooking this loader into
- libltdl's loader list: */
-static int vl_exit (lt_user_data loader_data);
-static lt_module vm_open (lt_user_data loader_data, const char *filename,
- lt_dladvise advise);
-static int vm_close (lt_user_data loader_data, lt_module module);
-static void * vm_sym (lt_user_data loader_data, lt_module module,
- const char *symbolname);
-
-static lt_dlvtable *vtable = 0;
-
-/* Return the vtable for this loader, only the name and sym_prefix
- attributes (plus the virtual function implementations, obviously)
- change between loaders. */
-lt_dlvtable *
-get_vtable (lt_user_data loader_data)
-{
- if (!vtable)
- {
- vtable = lt__zalloc (sizeof *vtable);
- }
-
- if (vtable && !vtable->name)
- {
- vtable->name = "lt_dld_link";
- vtable->module_open = vm_open;
- vtable->module_close = vm_close;
- vtable->find_sym = vm_sym;
- vtable->dlloader_exit = vl_exit;
- vtable->dlloader_data = loader_data;
- vtable->priority = LT_DLLOADER_APPEND;
- }
-
- if (vtable && (vtable->dlloader_data != loader_data))
- {
- LT__SETERROR (INIT_LOADER);
- return 0;
- }
-
- return vtable;
-}
-
-
-
-/* --- IMPLEMENTATION --- */
-
-
-#if defined(HAVE_DLD_H)
-# include <dld.h>
-#endif
-
-/* A function called through the vtable when this loader is no
- longer needed by the application. */
-static int
-vl_exit (lt_user_data LT__UNUSED loader_data)
-{
- vtable = NULL;
- return 0;
-}
-
-/* A function called through the vtable to open a module with this
- loader. Returns an opaque representation of the newly opened
- module for processing with this loader's other vtable functions. */
-static lt_module
-vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
- lt_dladvise LT__UNUSED advise)
-{
- lt_module module = lt__strdup (filename);
-
- if (dld_link (filename) != 0)
- {
- LT__SETERROR (CANNOT_OPEN);
- FREE (module);
- }
-
- return module;
-}
-
-/* A function called through the vtable when a particular module
- should be unloaded. */
-static int
-vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
-{
- int errors = 0;
-
- if (dld_unlink_by_file ((char*)(module), 1) != 0)
- {
- LT__SETERROR (CANNOT_CLOSE);
- ++errors;
- }
- else
- {
- FREE (module);
- }
-
- return errors;
-}
-
-/* A function called through the vtable to get the address of
- a symbol loaded from a particular module. */
-static void *
-vm_sym (lt_user_data LT__UNUSED loader_data, lt_module LT__UNUSED module,
- const char *name)
-{
- void *address = dld_get_func (name);
-
- if (!address)
- {
- LT__SETERROR (SYMBOL_NOT_FOUND);
- }
-
- return address;
-}
+++ /dev/null
-/* loader-dlopen.c -- dynamic linking with dlopen/dlsym
-
- Copyright (C) 1998, 1999, 2000, 2004, 2006,
- 2007, 2008 Free Software Foundation, Inc.
- Written by Thomas Tanner, 1998
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#include "lt__private.h"
-#include "lt_dlloader.h"
-
-/* Use the preprocessor to rename non-static symbols to avoid namespace
- collisions when the loader code is statically linked into libltdl.
- Use the "<module_name>_LTX_" prefix so that the symbol addresses can
- be fetched from the preloaded symbol list by lt_dlsym(): */
-#define get_vtable dlopen_LTX_get_vtable
-
-LT_BEGIN_C_DECLS
-LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data);
-LT_END_C_DECLS
-
-
-/* Boilerplate code to set up the vtable for hooking this loader into
- libltdl's loader list: */
-static int vl_exit (lt_user_data loader_data);
-static lt_module vm_open (lt_user_data loader_data, const char *filename,
- lt_dladvise advise);
-static int vm_close (lt_user_data loader_data, lt_module module);
-static void * vm_sym (lt_user_data loader_data, lt_module module,
- const char *symbolname);
-
-static lt_dlvtable *vtable = 0;
-
-/* Return the vtable for this loader, only the name and sym_prefix
- attributes (plus the virtual function implementations, obviously)
- change between loaders. */
-lt_dlvtable *
-get_vtable (lt_user_data loader_data)
-{
- if (!vtable)
- {
- vtable = (lt_dlvtable *) lt__zalloc (sizeof *vtable);
- }
-
- if (vtable && !vtable->name)
- {
- vtable->name = "lt_dlopen";
-#if defined(DLSYM_USCORE)
- vtable->sym_prefix = "_";
-#endif
- vtable->module_open = vm_open;
- vtable->module_close = vm_close;
- vtable->find_sym = vm_sym;
- vtable->dlloader_exit = vl_exit;
- vtable->dlloader_data = loader_data;
- vtable->priority = LT_DLLOADER_PREPEND;
- }
-
- if (vtable && (vtable->dlloader_data != loader_data))
- {
- LT__SETERROR (INIT_LOADER);
- return 0;
- }
-
- return vtable;
-}
-
-
-
-/* --- IMPLEMENTATION --- */
-
-
-#if defined(HAVE_DLFCN_H)
-# include <dlfcn.h>
-#endif
-
-#if defined(HAVE_SYS_DL_H)
-# include <sys/dl.h>
-#endif
-
-
-/* We may have to define LT_LAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#if !defined(LT_LAZY_OR_NOW)
-# if defined(RTLD_LAZY)
-# define LT_LAZY_OR_NOW RTLD_LAZY
-# else
-# if defined(DL_LAZY)
-# define LT_LAZY_OR_NOW DL_LAZY
-# endif
-# endif /* !RTLD_LAZY */
-#endif
-#if !defined(LT_LAZY_OR_NOW)
-# if defined(RTLD_NOW)
-# define LT_LAZY_OR_NOW RTLD_NOW
-# else
-# if defined(DL_NOW)
-# define LT_LAZY_OR_NOW DL_NOW
-# endif
-# endif /* !RTLD_NOW */
-#endif
-#if !defined(LT_LAZY_OR_NOW)
-# define LT_LAZY_OR_NOW 0
-#endif /* !LT_LAZY_OR_NOW */
-
-/* We only support local and global symbols from modules for loaders
- that provide such a thing, otherwise the system default is used. */
-#if !defined(RTLD_GLOBAL)
-# if defined(DL_GLOBAL)
-# define RTLD_GLOBAL DL_GLOBAL
-# endif
-#endif /* !RTLD_GLOBAL */
-#if !defined(RTLD_LOCAL)
-# if defined(DL_LOCAL)
-# define RTLD_LOCAL DL_LOCAL
-# endif
-#endif /* !RTLD_LOCAL */
-
-#if defined(HAVE_DLERROR)
-# define DLERROR(arg) dlerror ()
-#else
-# define DLERROR(arg) LT__STRERROR (arg)
-#endif
-
-#define DL__SETERROR(errorcode) \
- LT__SETERRORSTR (DLERROR (errorcode))
-
-
-/* A function called through the vtable when this loader is no
- longer needed by the application. */
-static int
-vl_exit (lt_user_data LT__UNUSED loader_data)
-{
- vtable = NULL;
- return 0;
-}
-
-
-/* A function called through the vtable to open a module with this
- loader. Returns an opaque representation of the newly opened
- module for processing with this loader's other vtable functions. */
-static lt_module
-vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
- lt_dladvise advise)
-{
- int module_flags = LT_LAZY_OR_NOW;
- lt_module module;
-
- if (advise)
- {
-#ifdef RTLD_GLOBAL
- /* If there is some means of asking for global symbol resolution,
- do so. */
- if (advise->is_symglobal)
- module_flags |= RTLD_GLOBAL;
-#else
- /* Otherwise, reset that bit so the caller can tell it wasn't
- acted on. */
- advise->is_symglobal = 0;
-#endif
-
-/* And similarly for local only symbol resolution. */
-#ifdef RTLD_LOCAL
- if (advise->is_symlocal)
- module_flags |= RTLD_LOCAL;
-#else
- advise->is_symlocal = 0;
-#endif
- }
-
- module = dlopen (filename, module_flags);
-
- if (!module)
- {
- DL__SETERROR (CANNOT_OPEN);
- }
-
- return module;
-}
-
-
-/* A function called through the vtable when a particular module
- should be unloaded. */
-static int
-vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
-{
- int errors = 0;
-
- if (dlclose (module) != 0)
- {
- DL__SETERROR (CANNOT_CLOSE);
- ++errors;
- }
-
- return errors;
-}
-
-
-/* A function called through the vtable to get the address of
- a symbol loaded from a particular module. */
-static void *
-vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name)
-{
- void *address = dlsym (module, name);
-
- if (!address)
- {
- DL__SETERROR (SYMBOL_NOT_FOUND);
- }
-
- return address;
-}
+++ /dev/null
-/* loader-dyld.c -- dynamic linking on darwin and OS X
-
- Copyright (C) 1998, 1999, 2000, 2004, 2006,
- 2007, 2008 Free Software Foundation, Inc.
- Written by Peter O'Gorman, 1998
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#include "lt__private.h"
-#include "lt_dlloader.h"
-
-/* Use the preprocessor to rename non-static symbols to avoid namespace
- collisions when the loader code is statically linked into libltdl.
- Use the "<module_name>_LTX_" prefix so that the symbol addresses can
- be fetched from the preloaded symbol list by lt_dlsym(): */
-#define get_vtable dyld_LTX_get_vtable
-
-LT_BEGIN_C_DECLS
-LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data);
-LT_END_C_DECLS
-
-
-/* Boilerplate code to set up the vtable for hooking this loader into
- libltdl's loader list: */
-static int vl_init (lt_user_data loader_data);
-static int vl_exit (lt_user_data loader_data);
-static lt_module vm_open (lt_user_data loader_data, const char *filename,
- lt_dladvise advise);
-static int vm_close (lt_user_data loader_data, lt_module module);
-static void * vm_sym (lt_user_data loader_data, lt_module module,
- const char *symbolname);
-
-static lt_dlvtable *vtable = 0;
-
-/* Return the vtable for this loader, only the name and sym_prefix
- attributes (plus the virtual function implementations, obviously)
- change between loaders. */
-lt_dlvtable *
-get_vtable (lt_user_data loader_data)
-{
- if (!vtable)
- {
- vtable = lt__zalloc (sizeof *vtable);
- }
-
- if (vtable && !vtable->name)
- {
- vtable->name = "lt_dyld";
- vtable->sym_prefix = "_";
- vtable->dlloader_init = vl_init;
- vtable->module_open = vm_open;
- vtable->module_close = vm_close;
- vtable->find_sym = vm_sym;
- vtable->dlloader_exit = vl_exit;
- vtable->dlloader_data = loader_data;
- vtable->priority = LT_DLLOADER_APPEND;
- }
-
- if (vtable && (vtable->dlloader_data != loader_data))
- {
- LT__SETERROR (INIT_LOADER);
- return 0;
- }
-
- return vtable;
-}
-
-
-
-/* --- IMPLEMENTATION --- */
-
-
-#if defined(HAVE_MACH_O_DYLD_H)
-# if !defined(__APPLE_CC__) && !defined(__MWERKS__) && !defined(__private_extern__)
- /* Is this correct? Does it still function properly? */
-# define __private_extern__ extern
-# endif
-# include <mach-o/dyld.h>
-#endif
-
-#include <mach-o/getsect.h>
-
-/* We have to put some stuff here that isn't in older dyld.h files */
-#if !defined(ENUM_DYLD_BOOL)
-# define ENUM_DYLD_BOOL
-# undef FALSE
-# undef TRUE
- enum DYLD_BOOL {
- FALSE,
- TRUE
- };
-#endif
-#if !defined(LC_REQ_DYLD)
-# define LC_REQ_DYLD 0x80000000
-#endif
-#if !defined(LC_LOAD_WEAK_DYLIB)
-# define LC_LOAD_WEAK_DYLIB (0x18 | LC_REQ_DYLD)
-#endif
-
-#if !defined(NSADDIMAGE_OPTION_NONE)
-# define NSADDIMAGE_OPTION_NONE 0x0
-#endif
-#if !defined(NSADDIMAGE_OPTION_RETURN_ON_ERROR)
-# define NSADDIMAGE_OPTION_RETURN_ON_ERROR 0x1
-#endif
-#if !defined(NSADDIMAGE_OPTION_WITH_SEARCHING)
-# define NSADDIMAGE_OPTION_WITH_SEARCHING 0x2
-#endif
-#if !defined(NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED)
-# define NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED 0x4
-#endif
-#if !defined(NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME)
-# define NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME 0x8
-#endif
-
-#if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_BIND)
-# define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND 0x0
-#endif
-#if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW)
-# define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW 0x1
-#endif
-#if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY)
-# define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY 0x2
-#endif
-#if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR)
-# define NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR 0x4
-#endif
-
-#define LT__SYMLOOKUP_OPTS (NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW \
- | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR)
-
-#if defined(__BIG_ENDIAN__)
-# define LT__MAGIC MH_MAGIC
-#else
-# define LT__MAGIC MH_CIGAM
-#endif
-
-#define DYLD__SETMYERROR(errmsg) LT__SETERRORSTR (dylderror (errmsg))
-#define DYLD__SETERROR(errcode) DYLD__SETMYERROR (LT__STRERROR (errcode))
-
-typedef struct mach_header mach_header;
-typedef struct dylib_command dylib_command;
-
-static const char *dylderror (const char *errmsg);
-static const mach_header *lt__nsmodule_get_header (NSModule module);
-static const char *lt__header_get_instnam (const mach_header *mh);
-static const mach_header *lt__match_loadedlib (const char *name);
-static NSSymbol lt__linkedlib_symbol (const char *symname, const mach_header *mh);
-
-static const mach_header *(*lt__addimage) (const char *image_name,
- unsigned long options) = 0;
-static NSSymbol (*lt__image_symbol) (const mach_header *image,
- const char *symbolName,
- unsigned long options) = 0;
-static enum DYLD_BOOL (*lt__image_symbol_p) (const mach_header *image,
- const char *symbolName) = 0;
-static enum DYLD_BOOL (*lt__module_export) (NSModule module) = 0;
-
-static int dyld_cannot_close = 0;
-
-
-/* A function called through the vtable when this loader is no
- longer needed by the application. */
-static int
-vl_exit (lt_user_data LT__UNUSED loader_data)
-{
- vtable = NULL;
- return 0;
-}
-
-/* A function called through the vtable to initialise this loader. */
-static int
-vl_init (lt_user_data loader_data)
-{
- int errors = 0;
-
- if (! dyld_cannot_close)
- {
- if (!_dyld_present ())
- {
- ++errors;
- }
- else
- {
- (void) _dyld_func_lookup ("__dyld_NSAddImage",
- (unsigned long*) <__addimage);
- (void) _dyld_func_lookup ("__dyld_NSLookupSymbolInImage",
- (unsigned long*)<__image_symbol);
- (void) _dyld_func_lookup ("__dyld_NSIsSymbolNameDefinedInImage",
- (unsigned long*) <__image_symbol_p);
- (void) _dyld_func_lookup ("__dyld_NSMakePrivateModulePublic",
- (unsigned long*) <__module_export);
- dyld_cannot_close = lt_dladderror ("can't close a dylib");
- }
- }
-
- return errors;
-}
-
-
-/* A function called through the vtable to open a module with this
- loader. Returns an opaque representation of the newly opened
- module for processing with this loader's other vtable functions. */
-static lt_module
-vm_open (lt_user_data loader_data, const char *filename,
- lt_dladvise LT__UNUSED advise)
-{
- lt_module module = 0;
- NSObjectFileImage ofi = 0;
-
- if (!filename)
- {
- return (lt_module) -1;
- }
-
- switch (NSCreateObjectFileImageFromFile (filename, &ofi))
- {
- case NSObjectFileImageSuccess:
- module = NSLinkModule (ofi, filename, NSLINKMODULE_OPTION_RETURN_ON_ERROR
- | NSLINKMODULE_OPTION_PRIVATE
- | NSLINKMODULE_OPTION_BINDNOW);
- NSDestroyObjectFileImage (ofi);
-
- if (module)
- {
- lt__module_export (module);
- }
- break;
-
- case NSObjectFileImageInappropriateFile:
- if (lt__image_symbol_p && lt__image_symbol)
- {
- module = (lt_module) lt__addimage(filename,
- NSADDIMAGE_OPTION_RETURN_ON_ERROR);
- }
- break;
-
- case NSObjectFileImageFailure:
- case NSObjectFileImageArch:
- case NSObjectFileImageFormat:
- case NSObjectFileImageAccess:
- /*NOWORK*/
- break;
- }
-
- if (!module)
- {
- DYLD__SETERROR (CANNOT_OPEN);
- }
-
- return module;
-}
-
-
-/* A function called through the vtable when a particular module
- should be unloaded. */
-static int
-vm_close (lt_user_data loader_data, lt_module module)
-{
- int errors = 0;
-
- if (module != (lt_module) -1)
- {
- const mach_header *mh = (const mach_header *) module;
- int flags = 0;
- if (mh->magic == LT__MAGIC)
- {
- lt_dlseterror (dyld_cannot_close);
- ++errors;
- }
- else
- {
- /* Currently, if a module contains c++ static destructors and it
- is unloaded, we get a segfault in atexit(), due to compiler and
- dynamic loader differences of opinion, this works around that. */
- if ((const struct section *) NULL !=
- getsectbynamefromheader (lt__nsmodule_get_header (module),
- "__DATA", "__mod_term_func"))
- {
- flags |= NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED;
- }
-#if defined(__ppc__)
- flags |= NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES;
-#endif
- if (!NSUnLinkModule (module, flags))
- {
- DYLD__SETERROR (CANNOT_CLOSE);
- ++errors;
- }
- }
- }
-
- return errors;
-}
-
-/* A function called through the vtable to get the address of
- a symbol loaded from a particular module. */
-static void *
-vm_sym (lt_user_data loader_data, lt_module module, const char *name)
-{
- NSSymbol *nssym = 0;
- const mach_header *mh = (const mach_header *) module;
- char saveError[256] = "Symbol not found";
-
- if (module == (lt_module) -1)
- {
- void *address, *unused;
- _dyld_lookup_and_bind (name, (unsigned long*) &address, &unused);
- return address;
- }
-
- if (mh->magic == LT__MAGIC)
- {
- if (lt__image_symbol_p && lt__image_symbol)
- {
- if (lt__image_symbol_p (mh, name))
- {
- nssym = lt__image_symbol (mh, name, LT__SYMLOOKUP_OPTS);
- }
- }
-
- }
- else
- {
- nssym = NSLookupSymbolInModule (module, name);
- }
-
- if (!nssym)
- {
- strncpy (saveError, dylderror (LT__STRERROR (SYMBOL_NOT_FOUND)), 255);
- saveError[255] = 0;
- if (!mh)
- {
- mh = (mach_header *)lt__nsmodule_get_header (module);
- }
- nssym = lt__linkedlib_symbol (name, mh);
- }
-
- if (!nssym)
- {
- LT__SETERRORSTR (saveError);
- }
-
- return nssym ? NSAddressOfSymbol (nssym) : 0;
-}
-
-
-
-
-/* --- HELPER FUNCTIONS --- */
-
-
-/* Return the dyld error string, or the passed in error string if none. */
-static const char *
-dylderror (const char *errmsg)
-{
- NSLinkEditErrors ler;
- int lerno;
- const char *file;
- const char *errstr;
-
- NSLinkEditError (&ler, &lerno, &file, &errstr);
-
- if (! (errstr && *errstr))
- {
- errstr = errmsg;
- }
-
- return errstr;
-}
-
-/* There should probably be an apple dyld api for this. */
-static const mach_header *
-lt__nsmodule_get_header (NSModule module)
-{
- int i = _dyld_image_count();
- const char *modname = NSNameOfModule (module);
- const mach_header *mh = 0;
-
- if (!modname)
- return NULL;
-
- while (i > 0)
- {
- --i;
- if (strneq (_dyld_get_image_name (i), modname))
- {
- mh = _dyld_get_image_header (i);
- break;
- }
- }
-
- return mh;
-}
-
-/* NSAddImage is also used to get the loaded image, but it only works if
- the lib is installed, for uninstalled libs we need to check the
- install_names against each other. Note that this is still broken if
- DYLD_IMAGE_SUFFIX is set and a different lib was loaded as a result. */
-static const char *
-lt__header_get_instnam (const mach_header *mh)
-{
- unsigned long offset = sizeof(mach_header);
- const char* result = 0;
- int j;
-
- for (j = 0; j < mh->ncmds; j++)
- {
- struct load_command *lc;
-
- lc = (struct load_command*) (((unsigned long) mh) + offset);
- if (LC_ID_DYLIB == lc->cmd)
- {
- result=(char*)(((dylib_command*) lc)->dylib.name.offset +
- (unsigned long) lc);
- }
- offset += lc->cmdsize;
- }
-
- return result;
-}
-
-static const mach_header *
-lt__match_loadedlib (const char *name)
-{
- const mach_header *mh = 0;
- int i = _dyld_image_count();
-
- while (i > 0)
- {
- const char *id;
-
- --i;
- id = lt__header_get_instnam (_dyld_get_image_header (i));
- if (id && strneq (id, name))
- {
- mh = _dyld_get_image_header (i);
- break;
- }
- }
-
- return mh;
-}
-
-/* Safe to assume our mh is good. */
-static NSSymbol
-lt__linkedlib_symbol (const char *symname, const mach_header *mh)
-{
- NSSymbol symbol = 0;
-
- if (lt__image_symbol && NSIsSymbolNameDefined (symname))
- {
- unsigned long offset = sizeof(mach_header);
- struct load_command *lc;
- int j;
-
- for (j = 0; j < mh->ncmds; j++)
- {
- lc = (struct load_command*) (((unsigned long) mh) + offset);
- if ((LC_LOAD_DYLIB == lc->cmd) || (LC_LOAD_WEAK_DYLIB == lc->cmd))
- {
- unsigned long base = ((dylib_command *) lc)->dylib.name.offset;
- char *name = (char *) (base + (unsigned long) lc);
- const mach_header *mh1 = lt__match_loadedlib (name);
-
- if (!mh1)
- {
- /* Maybe NSAddImage can find it */
- mh1 = lt__addimage (name,
- NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED
- | NSADDIMAGE_OPTION_WITH_SEARCHING
- | NSADDIMAGE_OPTION_RETURN_ON_ERROR);
- }
-
- if (mh1)
- {
- symbol = lt__image_symbol (mh1, symname, LT__SYMLOOKUP_OPTS);
- if (symbol)
- break;
- }
- }
-
- offset += lc->cmdsize;
- }
- }
-
- return symbol;
-}
+++ /dev/null
-/* loader-load_add_on.c -- dynamic linking for BeOS
-
- Copyright (C) 1998, 1999, 2000, 2004, 2006,
- 2007, 2008 Free Software Foundation, Inc.
- Written by Thomas Tanner, 1998
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#include "lt__private.h"
-#include "lt_dlloader.h"
-
-/* Use the preprocessor to rename non-static symbols to avoid namespace
- collisions when the loader code is statically linked into libltdl.
- Use the "<module_name>_LTX_" prefix so that the symbol addresses can
- be fetched from the preloaded symbol list by lt_dlsym(): */
-#define get_vtable load_add_on_LTX_get_vtable
-
-LT_BEGIN_C_DECLS
-LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data);
-LT_END_C_DECLS
-
-
-/* Boilerplate code to set up the vtable for hooking this loader into
- libltdl's loader list: */
-static int vl_exit (lt_user_data loader_data);
-static lt_module vm_open (lt_user_data loader_data, const char *filename,
- lt_dladvise advise);
-static int vm_close (lt_user_data loader_data, lt_module module);
-static void * vm_sym (lt_user_data loader_data, lt_module module,
- const char *symbolname);
-
-static lt_dlvtable *vtable = 0;
-
-/* Return the vtable for this loader, only the name and sym_prefix
- attributes (plus the virtual function implementations, obviously)
- change between loaders. */
-lt_dlvtable *
-get_vtable (lt_user_data loader_data)
-{
- if (!vtable)
- {
- vtable = lt__zalloc (sizeof *vtable);
- }
-
- if (vtable && !vtable->name)
- {
- vtable->name = "lt_load_add_on";
- vtable->module_open = vm_open;
- vtable->module_close = vm_close;
- vtable->find_sym = vm_sym;
- vtable->dlloader_exit = vl_exit;
- vtable->dlloader_data = loader_data;
- vtable->priority = LT_DLLOADER_APPEND;
- }
-
- if (vtable && (vtable->dlloader_data != loader_data))
- {
- LT__SETERROR (INIT_LOADER);
- return 0;
- }
-
- return vtable;
-}
-
-
-
-/* --- IMPLEMENTATION --- */
-
-
-#include <kernel/image.h>
-
-/* A function called through the vtable when this loader is no
- longer needed by the application. */
-static int
-vl_exit (lt_user_data LT__UNUSED loader_data)
-{
- vtable = NULL;
- return 0;
-}
-
-/* A function called through the vtable to open a module with this
- loader. Returns an opaque representation of the newly opened
- module for processing with this loader's other vtable functions. */
-static lt_module
-vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
- lt_dladvise LT__UNUSED advise)
-{
- image_id image = 0;
-
- if (filename)
- {
- image = load_add_on (filename);
- }
- else
- {
- image_info info;
- int32 cookie = 0;
- if (get_next_image_info (0, &cookie, &info) == B_OK)
- image = load_add_on (info.name);
- }
-
- if (image <= 0)
- {
- LT__SETERROR (CANNOT_OPEN);
- image = 0;
- }
-
- return (lt_module) image;
-}
-
-
-/* A function called through the vtable when a particular module
- should be unloaded. */
-static int
-vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
-{
- int errors = 0;
-
- if (unload_add_on ((image_id) module) != B_OK)
- {
- LT__SETERROR (CANNOT_CLOSE);
- ++errors;
- }
-
- return errors;
-}
-
-
-/* A function called through the vtable to get the address of
- a symbol loaded from a particular module. */
-static void *
-vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name)
-{
- void *address = 0;
- image_id image = (image_id) module;
-
- if (get_image_symbol (image, name, B_SYMBOL_TYPE_ANY, address) != B_OK)
- {
- LT__SETERROR (SYMBOL_NOT_FOUND);
- address = 0;
- }
-
- return address;
-}
+++ /dev/null
-/* loader-loadlibrary.c -- dynamic linking for Win32
-
- Copyright (C) 1998, 1999, 2000, 2004, 2005, 2006,
- 2007, 2008, 2010 Free Software Foundation, Inc.
- Written by Thomas Tanner, 1998
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#include "lt__private.h"
-#include "lt_dlloader.h"
-
-#if defined(__CYGWIN__)
-# include <sys/cygwin.h>
-#endif
-
-/* Use the preprocessor to rename non-static symbols to avoid namespace
- collisions when the loader code is statically linked into libltdl.
- Use the "<module_name>_LTX_" prefix so that the symbol addresses can
- be fetched from the preloaded symbol list by lt_dlsym(): */
-#define get_vtable loadlibrary_LTX_get_vtable
-
-LT_BEGIN_C_DECLS
-LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data);
-LT_END_C_DECLS
-
-
-/* Boilerplate code to set up the vtable for hooking this loader into
- libltdl's loader list: */
-static int vl_exit (lt_user_data loader_data);
-static lt_module vm_open (lt_user_data loader_data, const char *filename,
- lt_dladvise advise);
-static int vm_close (lt_user_data loader_data, lt_module module);
-static void * vm_sym (lt_user_data loader_data, lt_module module,
- const char *symbolname);
-
-static lt_dlinterface_id iface_id = 0;
-static lt_dlvtable *vtable = 0;
-
-/* Return the vtable for this loader, only the name and sym_prefix
- attributes (plus the virtual function implementations, obviously)
- change between loaders. */
-lt_dlvtable *
-get_vtable (lt_user_data loader_data)
-{
- if (!vtable)
- {
- vtable = (lt_dlvtable *) lt__zalloc (sizeof *vtable);
- iface_id = lt_dlinterface_register ("ltdl loadlibrary", NULL);
- }
-
- if (vtable && !vtable->name)
- {
- vtable->name = "lt_loadlibrary";
- vtable->module_open = vm_open;
- vtable->module_close = vm_close;
- vtable->find_sym = vm_sym;
- vtable->dlloader_exit = vl_exit;
- vtable->dlloader_data = loader_data;
- vtable->priority = LT_DLLOADER_APPEND;
- }
-
- if (vtable && (vtable->dlloader_data != loader_data))
- {
- LT__SETERROR (INIT_LOADER);
- return 0;
- }
-
- return vtable;
-}
-
-
-
-/* --- IMPLEMENTATION --- */
-
-
-#include <windows.h>
-
-#define LOCALFREE(mem) LT_STMT_START { \
- if (mem) { LocalFree ((void *)mem); mem = NULL; } } LT_STMT_END
-#define LOADLIB__SETERROR(errmsg) LT__SETERRORSTR (loadlibraryerror (errmsg))
-#define LOADLIB_SETERROR(errcode) LOADLIB__SETERROR (LT__STRERROR (errcode))
-
-static const char *loadlibraryerror (const char *default_errmsg);
-static DWORD WINAPI wrap_getthreaderrormode (void);
-static DWORD WINAPI fallback_getthreaderrormode (void);
-static BOOL WINAPI wrap_setthreaderrormode (DWORD mode, DWORD *oldmode);
-static BOOL WINAPI fallback_setthreaderrormode (DWORD mode, DWORD *oldmode);
-
-typedef DWORD (WINAPI getthreaderrormode_type) (void);
-typedef BOOL (WINAPI setthreaderrormode_type) (DWORD, DWORD *);
-
-static getthreaderrormode_type *getthreaderrormode = wrap_getthreaderrormode;
-static setthreaderrormode_type *setthreaderrormode = wrap_setthreaderrormode;
-static char *error_message = 0;
-
-
-/* A function called through the vtable when this loader is no
- longer needed by the application. */
-static int
-vl_exit (lt_user_data LT__UNUSED loader_data)
-{
- vtable = NULL;
- LOCALFREE (error_message);
- return 0;
-}
-
-/* A function called through the vtable to open a module with this
- loader. Returns an opaque representation of the newly opened
- module for processing with this loader's other vtable functions. */
-static lt_module
-vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
- lt_dladvise LT__UNUSED advise)
-{
- lt_module module = 0;
- char *ext;
- char wpath[MAX_PATH];
- size_t len;
-
- if (!filename)
- {
- /* Get the name of main module */
- *wpath = 0;
- GetModuleFileName (NULL, wpath, sizeof (wpath));
- filename = wpath;
- }
- else
- {
- len = LT_STRLEN (filename);
-
- if (len >= MAX_PATH)
- {
- LT__SETERROR (CANNOT_OPEN);
- return 0;
- }
-
-#if HAVE_DECL_CYGWIN_CONV_PATH
- if (cygwin_conv_path (CCP_POSIX_TO_WIN_A, filename, wpath, MAX_PATH))
- {
- LT__SETERROR (CANNOT_OPEN);
- return 0;
- }
- len = 0;
-#elif defined(__CYGWIN__)
- cygwin_conv_to_full_win32_path (filename, wpath);
- len = 0;
-#else
- strcpy(wpath, filename);
-#endif
-
- ext = strrchr (wpath, '.');
- if (!ext)
- {
- /* Append a `.' to stop Windows from adding an
- implicit `.dll' extension. */
- if (!len)
- len = strlen (wpath);
-
- if (len + 1 >= MAX_PATH)
- {
- LT__SETERROR (CANNOT_OPEN);
- return 0;
- }
-
- wpath[len] = '.';
- wpath[len+1] = '\0';
- }
- }
-
- {
- /* Silence dialog from LoadLibrary on some failures. */
- DWORD errormode = getthreaderrormode ();
- DWORD last_error;
-
- setthreaderrormode (errormode | SEM_FAILCRITICALERRORS, NULL);
-
- module = LoadLibrary (wpath);
-
- /* Restore the error mode. */
- last_error = GetLastError ();
- setthreaderrormode (errormode, NULL);
- SetLastError (last_error);
- }
-
- /* libltdl expects this function to fail if it is unable
- to physically load the library. Sadly, LoadLibrary
- will search the loaded libraries for a match and return
- one of them if the path search load fails.
-
- We check whether LoadLibrary is returning a handle to
- an already loaded module, and simulate failure if we
- find one. */
- {
- lt_dlhandle cur = 0;
-
- while ((cur = lt_dlhandle_iterate (iface_id, cur)))
- {
- if (!cur->module)
- {
- cur = 0;
- break;
- }
-
- if (cur->module == module)
- {
- break;
- }
- }
-
- if (!module)
- LOADLIB_SETERROR (CANNOT_OPEN);
- else if (cur)
- {
- LT__SETERROR (CANNOT_OPEN);
- module = 0;
- }
- }
-
- return module;
-}
-
-
-/* A function called through the vtable when a particular module
- should be unloaded. */
-static int
-vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
-{
- int errors = 0;
-
- if (FreeLibrary ((HMODULE) module) == 0)
- {
- LOADLIB_SETERROR (CANNOT_CLOSE);
- ++errors;
- }
-
- return errors;
-}
-
-
-/* A function called through the vtable to get the address of
- a symbol loaded from a particular module. */
-static void *
-vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name)
-{
- void *address = (void *) GetProcAddress ((HMODULE) module, name);
-
- if (!address)
- {
- LOADLIB_SETERROR (SYMBOL_NOT_FOUND);
- }
-
- return address;
-}
-
-
-
-/* --- HELPER FUNCTIONS --- */
-
-
-/* Return the windows error message, or the passed in error message on
- failure. */
-static const char *
-loadlibraryerror (const char *default_errmsg)
-{
- size_t len;
- LOCALFREE (error_message);
-
- FormatMessageA (FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL,
- GetLastError (),
- 0,
- (char *) &error_message,
- 0, NULL);
-
- /* Remove trailing CRNL */
- len = LT_STRLEN (error_message);
- if (len && error_message[len - 1] == '\n')
- error_message[--len] = LT_EOS_CHAR;
- if (len && error_message[len - 1] == '\r')
- error_message[--len] = LT_EOS_CHAR;
-
- return len ? error_message : default_errmsg;
-}
-
-/* A function called through the getthreaderrormode variable which checks
- if the system supports GetThreadErrorMode (or GetErrorMode) and arranges
- for it or a fallback implementation to be called directly in the future.
- The selected version is then called. */
-static DWORD WINAPI
-wrap_getthreaderrormode (void)
-{
- HMODULE kernel32 = GetModuleHandleA ("kernel32.dll");
- getthreaderrormode
- = (getthreaderrormode_type *) GetProcAddress (kernel32,
- "GetThreadErrorMode");
- if (!getthreaderrormode)
- getthreaderrormode
- = (getthreaderrormode_type *) GetProcAddress (kernel32,
- "GetErrorMode");
- if (!getthreaderrormode)
- getthreaderrormode = fallback_getthreaderrormode;
- return getthreaderrormode ();
-}
-
-/* A function called through the getthreaderrormode variable for cases
- where the system does not support GetThreadErrorMode or GetErrorMode */
-static DWORD WINAPI
-fallback_getthreaderrormode (void)
-{
- /* Prior to Windows Vista, the only way to get the current error
- mode was to set a new one. In our case, we are setting a new
- error mode right after "getting" it while ignoring the error
- mode in effect when setting the new error mode, so that's
- fairly ok. */
- return (DWORD) SetErrorMode (SEM_FAILCRITICALERRORS);
-}
-
-/* A function called through the setthreaderrormode variable which checks
- if the system supports SetThreadErrorMode and arranges for it or a
- fallback implementation to be called directly in the future.
- The selected version is then called. */
-static BOOL WINAPI
-wrap_setthreaderrormode (DWORD mode, DWORD *oldmode)
-{
- HMODULE kernel32 = GetModuleHandleA ("kernel32.dll");
- setthreaderrormode
- = (setthreaderrormode_type *) GetProcAddress (kernel32,
- "SetThreadErrorMode");
- if (!setthreaderrormode)
- setthreaderrormode = fallback_setthreaderrormode;
- return setthreaderrormode (mode, oldmode);
-}
-
-/* A function called through the setthreaderrormode variable for cases
- where the system does not support SetThreadErrorMode. */
-static BOOL WINAPI
-fallback_setthreaderrormode (DWORD mode, DWORD *oldmode)
-{
- /* Prior to Windows 7, there was no way to set the thread local error
- mode, so set the process global error mode instead. */
- DWORD old = (DWORD) SetErrorMode (mode);
- if (oldmode)
- *oldmode = old;
- return TRUE;
-}
+++ /dev/null
-/* loader-preopen.c -- emulate dynamic linking using preloaded_symbols
-
- Copyright (C) 1998, 1999, 2000, 2004, 2006,
- 2007, 2008 Free Software Foundation, Inc.
- Written by Thomas Tanner, 1998
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#include "lt__private.h"
-#include "lt_dlloader.h"
-
-/* Use the preprocessor to rename non-static symbols to avoid namespace
- collisions when the loader code is statically linked into libltdl.
- Use the "<module_name>_LTX_" prefix so that the symbol addresses can
- be fetched from the preloaded symbol list by lt_dlsym(): */
-#define get_vtable preopen_LTX_get_vtable
-
-LT_BEGIN_C_DECLS
-LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data);
-LT_END_C_DECLS
-
-
-/* Boilerplate code to set up the vtable for hooking this loader into
- libltdl's loader list: */
-static int vl_init (lt_user_data loader_data);
-static int vl_exit (lt_user_data loader_data);
-static lt_module vm_open (lt_user_data loader_data, const char *filename,
- lt_dladvise advise);
-static int vm_close (lt_user_data loader_data, lt_module module);
-static void * vm_sym (lt_user_data loader_data, lt_module module,
- const char *symbolname);
-
-static lt_dlvtable *vtable = 0;
-
-/* Return the vtable for this loader, only the name and sym_prefix
- attributes (plus the virtual function implementations, obviously)
- change between loaders. */
-lt_dlvtable *
-get_vtable (lt_user_data loader_data)
-{
- if (!vtable)
- {
- vtable = (lt_dlvtable *) lt__zalloc (sizeof *vtable);
- }
-
- if (vtable && !vtable->name)
- {
- vtable->name = "lt_preopen";
- vtable->sym_prefix = 0;
- vtable->module_open = vm_open;
- vtable->module_close = vm_close;
- vtable->find_sym = vm_sym;
- vtable->dlloader_init = vl_init;
- vtable->dlloader_exit = vl_exit;
- vtable->dlloader_data = loader_data;
- vtable->priority = LT_DLLOADER_PREPEND;
- }
-
- if (vtable && (vtable->dlloader_data != loader_data))
- {
- LT__SETERROR (INIT_LOADER);
- return 0;
- }
-
- return vtable;
-}
-
-
-
-/* --- IMPLEMENTATION --- */
-
-
-/* Wrapper type to chain together symbol lists of various origins. */
-typedef struct symlist_chain
-{
- struct symlist_chain *next;
- const lt_dlsymlist *symlist;
-} symlist_chain;
-
-
-static int add_symlist (const lt_dlsymlist *symlist);
-static int free_symlists (void);
-
-/* The start of the symbol lists chain. */
-static symlist_chain *preloaded_symlists = 0;
-
-/* A symbol list preloaded before lt_init() was called. */
-static const lt_dlsymlist *default_preloaded_symbols = 0;
-
-
-/* A function called through the vtable to initialise this loader. */
-static int
-vl_init (lt_user_data LT__UNUSED loader_data)
-{
- int errors = 0;
-
- preloaded_symlists = 0;
- if (default_preloaded_symbols)
- {
- errors = lt_dlpreload (default_preloaded_symbols);
- }
-
- return errors;
-}
-
-
-/* A function called through the vtable when this loader is no
- longer needed by the application. */
-static int
-vl_exit (lt_user_data LT__UNUSED loader_data)
-{
- vtable = NULL;
- free_symlists ();
- return 0;
-}
-
-
-/* A function called through the vtable to open a module with this
- loader. Returns an opaque representation of the newly opened
- module for processing with this loader's other vtable functions. */
-static lt_module
-vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
- lt_dladvise LT__UNUSED advise)
-{
- symlist_chain *lists;
- lt_module module = 0;
-
- if (!preloaded_symlists)
- {
- LT__SETERROR (NO_SYMBOLS);
- goto done;
- }
-
- /* Can't use NULL as the reflective symbol header, as NULL is
- used to mark the end of the entire symbol list. Self-dlpreopened
- symbols follow this magic number, chosen to be an unlikely
- clash with a real module name. */
- if (!filename)
- {
- filename = "@PROGRAM@";
- }
-
- for (lists = preloaded_symlists; lists; lists = lists->next)
- {
- const lt_dlsymlist *symbol;
- for (symbol= lists->symlist; symbol->name; ++symbol)
- {
- if (!symbol->address && streq (symbol->name, filename))
- {
- /* If the next symbol's name and address is 0, it means
- the module just contains the originator and no symbols.
- In this case we pretend that we never saw the module and
- hope that some other loader will be able to load the module
- and have access to its symbols */
- const lt_dlsymlist *next_symbol = symbol +1;
- if (next_symbol->address && next_symbol->name)
- {
- module = (lt_module) lists->symlist;
- goto done;
- }
- }
- }
- }
-
- LT__SETERROR (FILE_NOT_FOUND);
-
- done:
- return module;
-}
-
-
-/* A function called through the vtable when a particular module
- should be unloaded. */
-static int
-vm_close (lt_user_data LT__UNUSED loader_data, lt_module LT__UNUSED module)
-{
- /* Just to silence gcc -Wall */
- module = 0;
- return 0;
-}
-
-
-/* A function called through the vtable to get the address of
- a symbol loaded from a particular module. */
-static void *
-vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name)
-{
- lt_dlsymlist *symbol = (lt_dlsymlist*) module;
-
- symbol +=2; /* Skip header (originator then libname). */
-
- while (symbol->name)
- {
- if (streq (symbol->name, name))
- {
- return symbol->address;
- }
-
- ++symbol;
- }
-
- LT__SETERROR (SYMBOL_NOT_FOUND);
-
- return 0;
-}
-
-
-
-/* --- HELPER FUNCTIONS --- */
-
-
-/* The symbol lists themselves are not allocated from the heap, but
- we can unhook them and free up the chain of links between them. */
-static int
-free_symlists (void)
-{
- symlist_chain *lists;
-
- lists = preloaded_symlists;
- while (lists)
- {
- symlist_chain *next = lists->next;
- FREE (lists);
- lists = next;
- }
- preloaded_symlists = 0;
-
- return 0;
-}
-
-/* Add a new symbol list to the global chain. */
-static int
-add_symlist (const lt_dlsymlist *symlist)
-{
- symlist_chain *lists;
- int errors = 0;
-
- /* Search for duplicate entries: */
- for (lists = preloaded_symlists;
- lists && lists->symlist != symlist; lists = lists->next)
- /*NOWORK*/;
-
- /* Don't add the same list twice: */
- if (!lists)
- {
- symlist_chain *tmp = (symlist_chain *) lt__zalloc (sizeof *tmp);
-
- if (tmp)
- {
- tmp->symlist = symlist;
- tmp->next = preloaded_symlists;
- preloaded_symlists = tmp;
- }
- else
- {
- ++errors;
- }
- }
-
- return errors;
-}
-
-
-
-/* --- PRELOADING API CALL IMPLEMENTATIONS --- */
-
-
-/* Save a default symbol list for later. */
-int
-lt_dlpreload_default (const lt_dlsymlist *preloaded)
-{
- default_preloaded_symbols = preloaded;
- return 0;
-}
-
-
-/* Add a symbol list to the global chain, or with a NULL argument,
- revert to just the default list. */
-int
-lt_dlpreload (const lt_dlsymlist *preloaded)
-{
- int errors = 0;
-
- if (preloaded)
- {
- errors = add_symlist (preloaded);
- }
- else
- {
- free_symlists();
-
- if (default_preloaded_symbols)
- {
- errors = lt_dlpreload (default_preloaded_symbols);
- }
- }
-
- return errors;
-}
-
-
-/* Open all the preloaded modules from the named originator, executing
- a callback for each one. If ORIGINATOR is NULL, then call FUNC for
- each preloaded module from the program itself. */
-int
-lt_dlpreload_open (const char *originator, lt_dlpreload_callback_func *func)
-{
- symlist_chain *list;
- int errors = 0;
- int found = 0;
-
- /* For each symlist in the chain... */
- for (list = preloaded_symlists; list; list = list->next)
- {
- /* ...that was preloaded by the requesting ORIGINATOR... */
- if ((originator && streq (list->symlist->name, originator))
- || (!originator && streq (list->symlist->name, "@PROGRAM@")))
- {
- const lt_dlsymlist *symbol;
- unsigned int idx = 0;
-
- ++found;
-
- /* ...load the symbols per source compilation unit:
- (we preincrement the index to skip over the originator entry) */
- while ((symbol = &list->symlist[++idx])->name != 0)
- {
- if ((symbol->address == 0)
- && (strneq (symbol->name, "@PROGRAM@")))
- {
- lt_dlhandle handle = lt_dlopen (symbol->name);
- if (handle == 0)
- {
- ++errors;
- }
- else
- {
- errors += (*func) (handle);
- }
- }
- }
- }
- }
-
- if (!found)
- {
- LT__SETERROR(CANNOT_OPEN);
- ++errors;
- }
-
- return errors;
-}
+++ /dev/null
-/* loader-shl_load.c -- dynamic linking with shl_load (HP-UX)
-
- Copyright (C) 1998, 1999, 2000, 2004, 2006,
- 2007, 2008 Free Software Foundation, Inc.
- Written by Thomas Tanner, 1998
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#include "lt__private.h"
-#include "lt_dlloader.h"
-
-/* Use the preprocessor to rename non-static symbols to avoid namespace
- collisions when the loader code is statically linked into libltdl.
- Use the "<module_name>_LTX_" prefix so that the symbol addresses can
- be fetched from the preloaded symbol list by lt_dlsym(): */
-#define get_vtable shl_load_LTX_get_vtable
-
-LT_BEGIN_C_DECLS
-LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data);
-LT_END_C_DECLS
-
-
-/* Boilerplate code to set up the vtable for hooking this loader into
- libltdl's loader list: */
-static int vl_exit (lt_user_data loader_data);
-static lt_module vm_open (lt_user_data loader_data, const char *filename,
- lt_dladvise advise);
-static int vm_close (lt_user_data loader_data, lt_module module);
-static void * vm_sym (lt_user_data loader_data, lt_module module,
- const char *symbolname);
-
-static lt_dlvtable *vtable = 0;
-
-/* Return the vtable for this loader, only the name and sym_prefix
- attributes (plus the virtual function implementations, obviously)
- change between loaders. */
-lt_dlvtable *
-get_vtable (lt_user_data loader_data)
-{
- if (!vtable)
- {
- vtable = lt__zalloc (sizeof *vtable);
- }
-
- if (vtable && !vtable->name)
- {
- vtable->name = "lt_shl_load";
- vtable->module_open = vm_open;
- vtable->module_close = vm_close;
- vtable->find_sym = vm_sym;
- vtable->dlloader_exit = vl_exit;
- vtable->dlloader_data = loader_data;
- vtable->priority = LT_DLLOADER_APPEND;
- }
-
- if (vtable && (vtable->dlloader_data != loader_data))
- {
- LT__SETERROR (INIT_LOADER);
- return 0;
- }
-
- return vtable;
-}
-
-
-
-/* --- IMPLEMENTATION --- */
-
-
-#if defined(HAVE_DL_H)
-# include <dl.h>
-#endif
-
-/* some flags are missing on some systems, so we provide
- * harmless defaults.
- *
- * Mandatory:
- * BIND_IMMEDIATE - Resolve symbol references when the library is loaded.
- * BIND_DEFERRED - Delay code symbol resolution until actual reference.
- *
- * Optionally:
- * BIND_FIRST - Place the library at the head of the symbol search
- * order.
- * BIND_NONFATAL - The default BIND_IMMEDIATE behavior is to treat all
- * unsatisfied symbols as fatal. This flag allows
- * binding of unsatisfied code symbols to be deferred
- * until use.
- * [Perl: For certain libraries, like DCE, deferred
- * binding often causes run time problems. Adding
- * BIND_NONFATAL to BIND_IMMEDIATE still allows
- * unresolved references in situations like this.]
- * BIND_NOSTART - Do not call the initializer for the shared library
- * when the library is loaded, nor on a future call to
- * shl_unload().
- * BIND_VERBOSE - Print verbose messages concerning possible
- * unsatisfied symbols.
- *
- * hp9000s700/hp9000s800:
- * BIND_RESTRICTED - Restrict symbols visible by the library to those
- * present at library load time.
- * DYNAMIC_PATH - Allow the loader to dynamically search for the
- * library specified by the path argument.
- */
-
-#if !defined(DYNAMIC_PATH)
-# define DYNAMIC_PATH 0
-#endif
-#if !defined(BIND_RESTRICTED)
-# define BIND_RESTRICTED 0
-#endif
-
-#define LT_BIND_FLAGS (BIND_IMMEDIATE | BIND_NONFATAL | DYNAMIC_PATH)
-
-
-/* A function called through the vtable when this loader is no
- longer needed by the application. */
-static int
-vl_exit (lt_user_data LT__UNUSED loader_data)
-{
- vtable = NULL;
- return 0;
-}
-
-/* A function called through the vtable to open a module with this
- loader. Returns an opaque representation of the newly opened
- module for processing with this loader's other vtable functions. */
-static lt_module
-vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
- lt_dladvise LT__UNUSED advise)
-{
- static shl_t self = (shl_t) 0;
- lt_module module = shl_load (filename, LT_BIND_FLAGS, 0L);
-
- /* Since searching for a symbol against a NULL module handle will also
- look in everything else that was already loaded and exported with
- the -E compiler flag, we always cache a handle saved before any
- modules are loaded. */
- if (!self)
- {
- void *address;
- shl_findsym (&self, "main", TYPE_UNDEFINED, &address);
- }
-
- if (!filename)
- {
- module = self;
- }
- else
- {
- module = shl_load (filename, LT_BIND_FLAGS, 0L);
-
- if (!module)
- {
- LT__SETERROR (CANNOT_OPEN);
- }
- }
-
- return module;
-}
-
-/* A function called through the vtable when a particular module
- should be unloaded. */
-static int
-vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
-{
- int errors = 0;
-
- if (module && (shl_unload ((shl_t) (module)) != 0))
- {
- LT__SETERROR (CANNOT_CLOSE);
- ++errors;
- }
-
- return errors;
-}
-
-
-/* A function called through the vtable to get the address of
- a symbol loaded from a particular module. */
-static void *
-vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name)
-{
- void *address = 0;
-
- /* sys_shl_open should never return a NULL module handle */
- if (module == (lt_module) 0)
- {
- LT__SETERROR (INVALID_HANDLE);
- }
- else if (!shl_findsym((shl_t*) &module, name, TYPE_UNDEFINED, &address))
- {
- if (!address)
- {
- LT__SETERROR (SYMBOL_NOT_FOUND);
- }
- }
-
- return address;
-}
+++ /dev/null
-/* lt__alloc.c -- internal memory management interface
-
- Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
- Written by Gary V. Vaughan, 2004
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#include "lt__private.h"
-
-#include <stdio.h>
-
-#include "lt__alloc.h"
-
-static void alloc_die_default (void);
-
-void (*lt__alloc_die) (void) = alloc_die_default;
-
-/* Unless overridden, exit on memory failure. */
-static void
-alloc_die_default (void)
-{
- fprintf (stderr, "Out of memory.\n");
- exit (EXIT_FAILURE);
-}
-
-void *
-lt__malloc (size_t n)
-{
- void *mem;
-
- if (! (mem = malloc (n)))
- (*lt__alloc_die) ();
-
- return mem;
-}
-
-void *
-lt__zalloc (size_t n)
-{
- void *mem;
-
- if ((mem = lt__malloc (n)))
- memset (mem, 0, n);
-
- return mem;
-}
-
-void *
-lt__realloc (void *mem, size_t n)
-{
- if (! (mem = realloc (mem, n)))
- (*lt__alloc_die) ();
-
- return mem;
-}
-
-void *
-lt__memdup (void const *mem, size_t n)
-{
- void *newmem;
-
- if ((newmem = lt__malloc (n)))
- return memcpy (newmem, mem, n);
-
- return 0;
-}
-
-char *
-lt__strdup (const char *string)
-{
- return (char *) lt__memdup (string, strlen (string) +1);
-}
+++ /dev/null
-/* lt__dirent.c -- internal directory entry scanning interface
-
- Copyright (C) 2001, 2004 Free Software Foundation, Inc.
- Written by Bob Friesenhahn, 2001
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#include "lt__private.h"
-
-#include <assert.h>
-#include <stddef.h>
-
-#include "lt__dirent.h"
-
-#if defined(__WINDOWS__)
-
-void
-closedir (DIR *entry)
-{
- assert (entry != (DIR *) NULL);
- FindClose (entry->hSearch);
- free ((void *) entry);
-}
-
-
-DIR *
-opendir (const char *path)
-{
- char file_spec[LT_FILENAME_MAX];
- DIR *entry;
-
- assert (path != (char *) 0);
- if (lt_strlcpy (file_spec, path, sizeof file_spec) >= sizeof file_spec
- || lt_strlcat (file_spec, "\\", sizeof file_spec) >= sizeof file_spec)
- return (DIR *) 0;
- entry = (DIR *) malloc (sizeof(DIR));
- if (entry != (DIR *) 0)
- {
- entry->firsttime = TRUE;
- entry->hSearch = FindFirstFile (file_spec, &entry->Win32FindData);
-
- if (entry->hSearch == INVALID_HANDLE_VALUE)
- {
- if (lt_strlcat (file_spec, "\\*.*", sizeof file_spec) < sizeof file_spec)
- {
- entry->hSearch = FindFirstFile (file_spec, &entry->Win32FindData);
- }
-
- if (entry->hSearch == INVALID_HANDLE_VALUE)
- {
- entry = (free (entry), (DIR *) 0);
- }
- }
- }
-
- return entry;
-}
-
-
-struct dirent *
-readdir (DIR *entry)
-{
- int status;
-
- if (entry == (DIR *) 0)
- return (struct dirent *) 0;
-
- if (!entry->firsttime)
- {
- status = FindNextFile (entry->hSearch, &entry->Win32FindData);
- if (status == 0)
- return (struct dirent *) 0;
- }
-
- entry->firsttime = FALSE;
- if (lt_strlcpy (entry->file_info.d_name, entry->Win32FindData.cFileName,
- sizeof entry->file_info.d_name) >= sizeof entry->file_info.d_name)
- return (struct dirent *) 0;
- entry->file_info.d_namlen = strlen (entry->file_info.d_name);
-
- return &entry->file_info;
-}
-
-#endif /*defined(__WINDOWS__)*/
+++ /dev/null
-/* lt__strl.c -- size-bounded string copying and concatenation
-
- Copyright (C) 2004 Free Software Foundation, Inc.
- Written by Bob Friesenhahn, 2004
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#include <assert.h>
-#include <string.h>
-
-#include "lt__strl.h"
-
-/*
- lt_strlcat appends the NULL-terminated string src to the end of dst.
- It will append at most dstsize - strlen(dst) - 1 bytes,
- NULL-terminating the result. The total length of the string which
- would have been created given sufficient buffer size (may be longer
- than dstsize) is returned. This function substitutes for strlcat()
- which is available under NetBSD, FreeBSD and Solaris 9.
-
- Buffer overflow can be checked as follows:
-
- if (lt_strlcat(dst, src, dstsize) >= dstsize)
- return -1;
-*/
-#if !defined(HAVE_STRLCAT)
-size_t
-lt_strlcat(char *dst, const char *src, const size_t dstsize)
-{
- size_t length;
- char *p;
- const char *q;
-
- assert(dst != NULL);
- assert(src != (const char *) NULL);
- assert(dstsize >= 1);
-
- length=strlen(dst);
-
- /*
- Copy remaining characters from src while constraining length to
- size - 1.
- */
- for ( p = dst + length, q = src;
- (*q != 0) && (length < dstsize - 1) ;
- length++, p++, q++ )
- *p = *q;
-
- dst[length]='\0';
-
- /*
- Add remaining length of src to length.
- */
- while (*q++)
- length++;
-
- return length;
-}
-#endif /* !defined(HAVE_STRLCAT) */
-
-/*
- lt_strlcpy copies up to dstsize - 1 characters from the NULL-terminated
- string src to dst, NULL-terminating the result. The total length of
- the string which would have been created given sufficient buffer
- size (may be longer than dstsize) is returned. This function
- substitutes for strlcpy() which is available under OpenBSD, FreeBSD
- and Solaris 9.
-
- Buffer overflow can be checked as follows:
-
- if (lt_strlcpy(dst, src, dstsize) >= dstsize)
- return -1;
-*/
-#if !defined(HAVE_STRLCPY)
-size_t
-lt_strlcpy(char *dst, const char *src, const size_t dstsize)
-{
- size_t length=0;
- char *p;
- const char *q;
-
- assert(dst != NULL);
- assert(src != (const char *) NULL);
- assert(dstsize >= 1);
-
- /*
- Copy src to dst within bounds of size-1.
- */
- for ( p=dst, q=src, length=0 ;
- (*q != 0) && (length < dstsize-1) ;
- length++, p++, q++ )
- *p = *q;
-
- dst[length]='\0';
-
- /*
- Add remaining length of src to length.
- */
- while (*q++)
- length++;
-
- return length;
-}
-#endif /* !defined(HAVE_STRLCPY) */
+++ /dev/null
-/* lt_dlloader.c -- dynamic library loader interface
-
- Copyright (C) 2004, 2007, 2008 Free Software Foundation, Inc.
- Written by Gary V. Vaughan, 2004
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#include "lt__private.h"
-#include "lt_dlloader.h"
-
-#define RETURN_SUCCESS 0
-#define RETURN_FAILURE 1
-
-static void * loader_callback (SList *item, void *userdata);
-
-/* A list of all the dlloaders we know about, each stored as a boxed
- SList item: */
-static SList *loaders = 0;
-
-
-/* Return NULL, unless the loader in this ITEM has a matching name,
- in which case we return the matching item so that its address is
- passed back out (for possible freeing) by slist_remove. */
-static void *
-loader_callback (SList *item, void *userdata)
-{
- const lt_dlvtable *vtable = (const lt_dlvtable *) item->userdata;
- const char * name = (const char *) userdata;
-
- assert (vtable);
-
- return streq (vtable->name, name) ? (void *) item : NULL;
-}
-
-
-/* Hook VTABLE into our global LOADERS list according to its own
- PRIORITY field value. */
-int
-lt_dlloader_add (const lt_dlvtable *vtable)
-{
- SList *item;
-
- if ((vtable == 0) /* diagnose invalid vtable fields */
- || (vtable->module_open == 0)
- || (vtable->module_close == 0)
- || (vtable->find_sym == 0)
- || ((vtable->priority != LT_DLLOADER_PREPEND) &&
- (vtable->priority != LT_DLLOADER_APPEND)))
- {
- LT__SETERROR (INVALID_LOADER);
- return RETURN_FAILURE;
- }
-
- item = slist_box (vtable);
- if (!item)
- {
- (*lt__alloc_die) ();
-
- /* Let the caller know something went wrong if lt__alloc_die
- doesn't abort. */
- return RETURN_FAILURE;
- }
-
- if (vtable->priority == LT_DLLOADER_PREPEND)
- {
- loaders = slist_cons (item, loaders);
- }
- else
- {
- assert (vtable->priority == LT_DLLOADER_APPEND);
- loaders = slist_concat (loaders, item);
- }
-
- return RETURN_SUCCESS;
-}
-
-#ifdef LT_DEBUG_LOADERS
-static void *
-loader_dump_callback (SList *item, void *userdata)
-{
- const lt_dlvtable *vtable = (const lt_dlvtable *) item->userdata;
- fprintf (stderr, ", %s", (vtable && vtable->name) ? vtable->name : "(null)");
- return 0;
-}
-
-void
-lt_dlloader_dump (void)
-{
- fprintf (stderr, "loaders: ");
- if (!loaders)
- {
- fprintf (stderr, "(empty)");
- }
- else
- {
- const lt_dlvtable *head = (const lt_dlvtable *) loaders->userdata;
- fprintf (stderr, "%s", (head && head->name) ? head->name : "(null)");
- if (slist_tail (loaders))
- slist_foreach (slist_tail (loaders), loader_dump_callback, NULL);
- }
- fprintf (stderr, "\n");
-}
-#endif
-
-/* An iterator for the global loader list: if LOADER is NULL, then
- return the first element, otherwise the following element. */
-lt_dlloader
-lt_dlloader_next (lt_dlloader loader)
-{
- SList *item = (SList *) loader;
- return (lt_dlloader) (item ? item->next : loaders);
-}
-
-
-/* Non-destructive unboxing of a loader. */
-const lt_dlvtable *
-lt_dlloader_get (lt_dlloader loader)
-{
- return (const lt_dlvtable *) (loader ? ((SList *) loader)->userdata : NULL);
-}
-
-
-/* Return the contents of the first item in the global loader list
- with a matching NAME after removing it from that list. If there
- was no match, return NULL; if there is an error, return NULL and
- set an error for lt_dlerror; do not set an error if only resident
- modules need this loader; in either case, the loader list is not
- changed if NULL is returned. */
-lt_dlvtable *
-lt_dlloader_remove (const char *name)
-{
- const lt_dlvtable * vtable = lt_dlloader_find (name);
- static const char id_string[] = "lt_dlloader_remove";
- lt_dlinterface_id iface;
- lt_dlhandle handle = 0;
- int in_use = 0;
- int in_use_by_resident = 0;
-
- if (!vtable)
- {
- LT__SETERROR (INVALID_LOADER);
- return 0;
- }
-
- /* Fail if there are any open modules which use this loader. */
- iface = lt_dlinterface_register (id_string, NULL);
- while ((handle = lt_dlhandle_iterate (iface, handle)))
- {
- lt_dlhandle cur = handle;
- if (cur->vtable == vtable)
- {
- in_use = 1;
- if (lt_dlisresident (handle))
- in_use_by_resident = 1;
- }
- }
- lt_dlinterface_free (iface);
- if (in_use)
- {
- if (!in_use_by_resident)
- LT__SETERROR (REMOVE_LOADER);
- return 0;
- }
-
- /* Call the loader finalisation function. */
- if (vtable && vtable->dlloader_exit)
- {
- if ((*vtable->dlloader_exit) (vtable->dlloader_data) != 0)
- {
- /* If there is an exit function, and it returns non-zero
- then it must set an error, and we will not remove it
- from the list. */
- return 0;
- }
- }
-
- /* If we got this far, remove the loader from our global list. */
- return (lt_dlvtable *)
- slist_unbox ((SList *) slist_remove (&loaders, loader_callback, (void *) name));
-}
-
-
-const lt_dlvtable *
-lt_dlloader_find (const char *name)
-{
- return lt_dlloader_get (slist_find (loaders, loader_callback, (void *) name));
-}
+++ /dev/null
-/* lt_error.c -- error propogation interface
-
- Copyright (C) 1999, 2000, 2001, 2004, 2005, 2007 Free Software Foundation, Inc.
- Written by Thomas Tanner, 1999
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#include "lt__private.h"
-#include "lt_error.h"
-
-static const char *last_error = 0;
-static const char error_strings[LT_ERROR_MAX][LT_ERROR_LEN_MAX + 1] =
- {
-#define LT_ERROR(name, diagnostic) diagnostic,
- lt_dlerror_table
-#undef LT_ERROR
- };
-
-static const char **user_error_strings = 0;
-static int errorcount = LT_ERROR_MAX;
-
-int
-lt_dladderror (const char *diagnostic)
-{
- int errindex = 0;
- int result = -1;
- const char **temp = (const char **) 0;
-
- assert (diagnostic);
-
- errindex = errorcount - LT_ERROR_MAX;
- temp = REALLOC (const char *, user_error_strings, 1 + errindex);
- if (temp)
- {
- user_error_strings = temp;
- user_error_strings[errindex] = diagnostic;
- result = errorcount++;
- }
-
- return result;
-}
-
-int
-lt_dlseterror (int errindex)
-{
- int errors = 0;
-
- if (errindex >= errorcount || errindex < 0)
- {
- /* Ack! Error setting the error message! */
- LT__SETERROR (INVALID_ERRORCODE);
- ++errors;
- }
- else if (errindex < LT_ERROR_MAX)
- {
- /* No error setting the error message! */
- LT__SETERRORSTR (error_strings[errindex]);
- }
- else
- {
- /* No error setting the error message! */
- LT__SETERRORSTR (user_error_strings[errindex - LT_ERROR_MAX]);
- }
-
- return errors;
-}
-
-const char *
-lt__error_string (int errorcode)
-{
- assert (errorcode >= 0);
- assert (errorcode < LT_ERROR_MAX);
-
- return error_strings[errorcode];
-}
-
-const char *
-lt__get_last_error (void)
-{
- return last_error;
-}
-
-const char *
-lt__set_last_error (const char *errormsg)
-{
- return last_error = errormsg;
-}
+++ /dev/null
-/* ltdl.c -- system independent dlopen wrapper
-
- Copyright (C) 1998, 1999, 2000, 2004, 2005, 2006,
- 2007, 2008, 2011 Free Software Foundation, Inc.
- Written by Thomas Tanner, 1998
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#include "lt__private.h"
-#include "lt_system.h"
-#include "lt_dlloader.h"
-
-
-/* --- MANIFEST CONSTANTS --- */
-
-
-/* Standard libltdl search path environment variable name */
-#undef LTDL_SEARCHPATH_VAR
-#define LTDL_SEARCHPATH_VAR "LTDL_LIBRARY_PATH"
-
-/* Standard libtool archive file extension. */
-#undef LT_ARCHIVE_EXT
-#define LT_ARCHIVE_EXT ".la"
-
-/* max. filename length */
-#if !defined(LT_FILENAME_MAX)
-# define LT_FILENAME_MAX 1024
-#endif
-
-#if !defined(LT_LIBEXT)
-# define LT_LIBEXT "a"
-#endif
-
-#if !defined(LT_LIBPREFIX)
-# define LT_LIBPREFIX "lib"
-#endif
-
-/* This is the maximum symbol size that won't require malloc/free */
-#undef LT_SYMBOL_LENGTH
-#define LT_SYMBOL_LENGTH 128
-
-/* This accounts for the _LTX_ separator */
-#undef LT_SYMBOL_OVERHEAD
-#define LT_SYMBOL_OVERHEAD 5
-
-/* Various boolean flags can be stored in the flags field of an
- lt_dlhandle... */
-#define LT_DLIS_RESIDENT(handle) ((handle)->info.is_resident)
-#define LT_DLIS_SYMGLOBAL(handle) ((handle)->info.is_symglobal)
-#define LT_DLIS_SYMLOCAL(handle) ((handle)->info.is_symlocal)
-
-
-static const char objdir[] = LT_OBJDIR;
-static const char archive_ext[] = LT_ARCHIVE_EXT;
-static const char libext[] = LT_LIBEXT;
-static const char libprefix[] = LT_LIBPREFIX;
-#if defined(LT_MODULE_EXT)
-static const char shlib_ext[] = LT_MODULE_EXT;
-#endif
-/* If the loadable module suffix is not the same as the linkable
- * shared library suffix, this will be defined. */
-#if defined(LT_SHARED_EXT)
-static const char shared_ext[] = LT_SHARED_EXT;
-#endif
-#if defined(LT_DLSEARCH_PATH)
-static const char sys_dlsearch_path[] = LT_DLSEARCH_PATH;
-#endif
-
-
-
-\f
-/* --- DYNAMIC MODULE LOADING --- */
-
-
-/* The type of a function used at each iteration of foreach_dirinpath(). */
-typedef int foreach_callback_func (char *filename, void *data1,
- void *data2);
-/* foreachfile_callback itself calls a function of this type: */
-typedef int file_worker_func (const char *filename, void *data);
-
-
-static int foreach_dirinpath (const char *search_path,
- const char *base_name,
- foreach_callback_func *func,
- void *data1, void *data2);
-static int find_file_callback (char *filename, void *data1,
- void *data2);
-static int find_handle_callback (char *filename, void *data,
- void *ignored);
-static int foreachfile_callback (char *filename, void *data1,
- void *data2);
-
-
-static int canonicalize_path (const char *path, char **pcanonical);
-static int argzize_path (const char *path,
- char **pargz, size_t *pargz_len);
-static FILE *find_file (const char *search_path,
- const char *base_name, char **pdir);
-static lt_dlhandle *find_handle (const char *search_path,
- const char *base_name,
- lt_dlhandle *handle,
- lt_dladvise advise);
-static int find_module (lt_dlhandle *handle, const char *dir,
- const char *libdir, const char *dlname,
- const char *old_name, int installed,
- lt_dladvise advise);
-static int has_library_ext (const char *filename);
-static int load_deplibs (lt_dlhandle handle, char *deplibs);
-static int trim (char **dest, const char *str);
-static int try_dlopen (lt_dlhandle *handle,
- const char *filename, const char *ext,
- lt_dladvise advise);
-static int tryall_dlopen (lt_dlhandle *handle,
- const char *filename,
- lt_dladvise padvise,
- const lt_dlvtable *vtable);
-static int unload_deplibs (lt_dlhandle handle);
-static int lt_argz_insert (char **pargz, size_t *pargz_len,
- char *before, const char *entry);
-static int lt_argz_insertinorder (char **pargz, size_t *pargz_len,
- const char *entry);
-static int lt_argz_insertdir (char **pargz, size_t *pargz_len,
- const char *dirnam, struct dirent *dp);
-static int lt_dlpath_insertdir (char **ppath, char *before,
- const char *dir);
-static int list_files_by_dir (const char *dirnam,
- char **pargz, size_t *pargz_len);
-static int file_not_found (void);
-
-#ifdef HAVE_LIBDLLOADER
-static int loader_init_callback (lt_dlhandle handle);
-#endif /* HAVE_LIBDLLOADER */
-
-static int loader_init (lt_get_vtable *vtable_func,
- lt_user_data data);
-
-static char *user_search_path= 0;
-static lt_dlhandle handles = 0;
-static int initialized = 0;
-
-/* Our memory failure callback sets the error message to be passed back
- up to the client, so we must be careful to return from mallocation
- callers if allocation fails (as this callback returns!!). */
-void
-lt__alloc_die_callback (void)
-{
- LT__SETERROR (NO_MEMORY);
-}
-
-#ifdef HAVE_LIBDLLOADER
-/* This function is called to initialise each preloaded module loader,
- and hook it into the list of loaders to be used when attempting to
- dlopen an application module. */
-static int
-loader_init_callback (lt_dlhandle handle)
-{
- lt_get_vtable *vtable_func = (lt_get_vtable *) lt_dlsym (handle, "get_vtable");
- return loader_init (vtable_func, 0);
-}
-#endif /* HAVE_LIBDLLOADER */
-
-static int
-loader_init (lt_get_vtable *vtable_func, lt_user_data data)
-{
- const lt_dlvtable *vtable = 0;
- int errors = 0;
-
- if (vtable_func)
- {
- vtable = (*vtable_func) (data);
- }
-
- /* lt_dlloader_add will LT__SETERROR if it fails. */
- errors += lt_dlloader_add (vtable);
-
- assert (errors || vtable);
-
- if ((!errors) && vtable->dlloader_init)
- {
- if ((*vtable->dlloader_init) (vtable->dlloader_data))
- {
- LT__SETERROR (INIT_LOADER);
- ++errors;
- }
- }
-
- return errors;
-}
-
-/* Bootstrap the loader loading with the preopening loader. */
-#define get_vtable preopen_LTX_get_vtable
-#define preloaded_symbols LT_CONC3(lt_, LTDLOPEN, _LTX_preloaded_symbols)
-
-LT_BEGIN_C_DECLS
-LT_SCOPE const lt_dlvtable * get_vtable (lt_user_data data);
-LT_END_C_DECLS
-#ifdef HAVE_LIBDLLOADER
-extern LT_DLSYM_CONST lt_dlsymlist preloaded_symbols[];
-#endif
-
-/* Initialize libltdl. */
-int
-lt_dlinit (void)
-{
- int errors = 0;
-
- /* Initialize only at first call. */
- if (++initialized == 1)
- {
- lt__alloc_die = lt__alloc_die_callback;
- handles = 0;
- user_search_path = 0; /* empty search path */
-
- /* First set up the statically loaded preload module loader, so
- we can use it to preopen the other loaders we linked in at
- compile time. */
- errors += loader_init (get_vtable, 0);
-
- /* Now open all the preloaded module loaders, so the application
- can use _them_ to lt_dlopen its own modules. */
-#ifdef HAVE_LIBDLLOADER
- if (!errors)
- {
- errors += lt_dlpreload (preloaded_symbols);
- }
-
- if (!errors)
- {
- errors += lt_dlpreload_open (LT_STR(LTDLOPEN), loader_init_callback);
- }
-#endif /* HAVE_LIBDLLOADER */
- }
-
-#ifdef LT_DEBUG_LOADERS
- lt_dlloader_dump();
-#endif
-
- return errors;
-}
-
-int
-lt_dlexit (void)
-{
- /* shut down libltdl */
- lt_dlloader *loader = 0;
- lt_dlhandle handle = handles;
- int errors = 0;
-
- if (!initialized)
- {
- LT__SETERROR (SHUTDOWN);
- ++errors;
- goto done;
- }
-
- /* shut down only at last call. */
- if (--initialized == 0)
- {
- int level;
-
- while (handles && LT_DLIS_RESIDENT (handles))
- {
- handles = handles->next;
- }
-
- /* close all modules */
- for (level = 1; handle; ++level)
- {
- lt_dlhandle cur = handles;
- int saw_nonresident = 0;
-
- while (cur)
- {
- lt_dlhandle tmp = cur;
- cur = cur->next;
- if (!LT_DLIS_RESIDENT (tmp))
- {
- saw_nonresident = 1;
- if (tmp->info.ref_count <= level)
- {
- if (lt_dlclose (tmp))
- {
- ++errors;
- }
- /* Make sure that the handle pointed to by 'cur' still exists.
- lt_dlclose recursively closes dependent libraries which removes
- them from the linked list. One of these might be the one
- pointed to by 'cur'. */
- if (cur)
- {
- for (tmp = handles; tmp; tmp = tmp->next)
- if (tmp == cur)
- break;
- if (! tmp)
- cur = handles;
- }
- }
- }
- }
- /* done if only resident modules are left */
- if (!saw_nonresident)
- break;
- }
-
- /* When removing loaders, we can only find out failure by testing
- the error string, so avoid a spurious one from an earlier
- failed command. */
- if (!errors)
- LT__SETERRORSTR (0);
-
- /* close all loaders */
- for (loader = (lt_dlloader *) lt_dlloader_next (NULL); loader;)
- {
- lt_dlloader *next = (lt_dlloader *) lt_dlloader_next (loader);
- lt_dlvtable *vtable = (lt_dlvtable *) lt_dlloader_get (loader);
-
- if ((vtable = lt_dlloader_remove ((char *) vtable->name)))
- {
- FREE (vtable);
- }
- else
- {
- /* ignore errors due to resident modules */
- const char *err;
- LT__GETERROR (err);
- if (err)
- ++errors;
- }
-
- loader = next;
- }
-
- FREE(user_search_path);
- }
-
- done:
- return errors;
-}
-
-
-/* Try VTABLE or, if VTABLE is NULL, all available loaders for FILENAME.
- If the library is not successfully loaded, return non-zero. Otherwise,
- the dlhandle is stored at the address given in PHANDLE. */
-static int
-tryall_dlopen (lt_dlhandle *phandle, const char *filename,
- lt_dladvise advise, const lt_dlvtable *vtable)
-{
- lt_dlhandle handle = handles;
- const char * saved_error = 0;
- int errors = 0;
-
-#ifdef LT_DEBUG_LOADERS
- fprintf (stderr, "tryall_dlopen (%s, %s)\n",
- filename ? filename : "(null)",
- vtable ? vtable->name : "(ALL)");
-#endif
-
- LT__GETERROR (saved_error);
-
- /* check whether the module was already opened */
- for (;handle; handle = handle->next)
- {
- if ((handle->info.filename == filename) /* dlopen self: 0 == 0 */
- || (handle->info.filename && filename
- && streq (handle->info.filename, filename)))
- {
- break;
- }
- }
-
- if (handle)
- {
- ++handle->info.ref_count;
- *phandle = handle;
- goto done;
- }
-
- handle = *phandle;
- if (filename)
- {
- /* Comment out the check of file permissions using access.
- This call seems to always return -1 with error EACCES.
- */
- /* We need to catch missing file errors early so that
- file_not_found() can detect what happened.
- if (access (filename, R_OK) != 0)
- {
- LT__SETERROR (FILE_NOT_FOUND);
- ++errors;
- goto done;
- } */
-
- handle->info.filename = lt__strdup (filename);
- if (!handle->info.filename)
- {
- ++errors;
- goto done;
- }
- }
- else
- {
- handle->info.filename = 0;
- }
-
- {
- lt_dlloader loader = lt_dlloader_next (0);
- const lt_dlvtable *loader_vtable;
-
- do
- {
- if (vtable)
- loader_vtable = vtable;
- else
- loader_vtable = lt_dlloader_get (loader);
-
-#ifdef LT_DEBUG_LOADERS
- fprintf (stderr, "Calling %s->module_open (%s)\n",
- (loader_vtable && loader_vtable->name) ? loader_vtable->name : "(null)",
- filename ? filename : "(null)");
-#endif
- handle->module = (*loader_vtable->module_open) (loader_vtable->dlloader_data,
- filename, advise);
-#ifdef LT_DEBUG_LOADERS
- fprintf (stderr, " Result: %s\n",
- handle->module ? "Success" : "Failed");
-#endif
-
- if (handle->module != 0)
- {
- if (advise)
- {
- handle->info.is_resident = advise->is_resident;
- handle->info.is_symglobal = advise->is_symglobal;
- handle->info.is_symlocal = advise->is_symlocal;
- }
- break;
- }
- }
- while (!vtable && (loader = lt_dlloader_next (loader)));
-
- /* If VTABLE was given but couldn't open the module, or VTABLE wasn't
- given but we exhausted all loaders without opening the module, bail
- out! */
- if ((vtable && !handle->module)
- || (!vtable && !loader))
- {
- FREE (handle->info.filename);
- ++errors;
- goto done;
- }
-
- handle->vtable = loader_vtable;
- }
-
- LT__SETERRORSTR (saved_error);
-
- done:
- return errors;
-}
-
-
-static int
-tryall_dlopen_module (lt_dlhandle *handle, const char *prefix,
- const char *dirname, const char *dlname,
- lt_dladvise advise)
-{
- int error = 0;
- char *filename = 0;
- size_t filename_len = 0;
- size_t dirname_len = LT_STRLEN (dirname);
-
- assert (handle);
- assert (dirname);
- assert (dlname);
-#if defined(LT_DIRSEP_CHAR)
- /* Only canonicalized names (i.e. with DIRSEP chars already converted)
- should make it into this function: */
- assert (strchr (dirname, LT_DIRSEP_CHAR) == 0);
-#endif
-
- if (dirname_len > 0)
- if (dirname[dirname_len -1] == '/')
- --dirname_len;
- filename_len = dirname_len + 1 + LT_STRLEN (dlname);
-
- /* Allocate memory, and combine DIRNAME and MODULENAME into it.
- The PREFIX (if any) is handled below. */
- filename = MALLOC (char, filename_len + 1);
- if (!filename)
- return 1;
-
- sprintf (filename, "%.*s/%s", (int) dirname_len, dirname, dlname);
-
- /* Now that we have combined DIRNAME and MODULENAME, if there is
- also a PREFIX to contend with, simply recurse with the arguments
- shuffled. Otherwise, attempt to open FILENAME as a module. */
- if (prefix)
- {
- error += tryall_dlopen_module (handle, (const char *) 0,
- prefix, filename, advise);
- }
- else if (tryall_dlopen (handle, filename, advise, 0) != 0)
- {
- ++error;
- }
-
- FREE (filename);
- return error;
-}
-
-static int
-find_module (lt_dlhandle *handle, const char *dir, const char *libdir,
- const char *dlname, const char *old_name, int installed,
- lt_dladvise advise)
-{
- /* Try to open the old library first; if it was dlpreopened,
- we want the preopened version of it, even if a dlopenable
- module is available. */
- if (old_name && tryall_dlopen (handle, old_name,
- advise, lt_dlloader_find ("lt_preopen") ) == 0)
- {
- return 0;
- }
-
- /* Try to open the dynamic library. */
- if (dlname)
- {
- /* try to open the installed module */
- if (installed && libdir)
- {
- if (tryall_dlopen_module (handle, (const char *) 0,
- libdir, dlname, advise) == 0)
- return 0;
- }
-
- /* try to open the not-installed module */
- if (!installed)
- {
- if (tryall_dlopen_module (handle, dir, objdir,
- dlname, advise) == 0)
- return 0;
- }
-
- /* maybe it was moved to another directory */
- {
- if (dir && (tryall_dlopen_module (handle, (const char *) 0,
- dir, dlname, advise) == 0))
- return 0;
- }
- }
-
- return 1;
-}
-
-
-static int
-canonicalize_path (const char *path, char **pcanonical)
-{
- char *canonical = 0;
-
- assert (path && *path);
- assert (pcanonical);
-
- canonical = MALLOC (char, 1+ LT_STRLEN (path));
- if (!canonical)
- return 1;
-
- {
- size_t dest = 0;
- size_t src;
- for (src = 0; path[src] != LT_EOS_CHAR; ++src)
- {
- /* Path separators are not copied to the beginning or end of
- the destination, or if another separator would follow
- immediately. */
- if (path[src] == LT_PATHSEP_CHAR)
- {
- if ((dest == 0)
- || (path[1+ src] == LT_PATHSEP_CHAR)
- || (path[1+ src] == LT_EOS_CHAR))
- continue;
- }
-
- /* Anything other than a directory separator is copied verbatim. */
- if ((path[src] != '/')
-#if defined(LT_DIRSEP_CHAR)
- && (path[src] != LT_DIRSEP_CHAR)
-#endif
- )
- {
- canonical[dest++] = path[src];
- }
- /* Directory separators are converted and copied only if they are
- not at the end of a path -- i.e. before a path separator or
- NULL terminator. */
- else if ((path[1+ src] != LT_PATHSEP_CHAR)
- && (path[1+ src] != LT_EOS_CHAR)
-#if defined(LT_DIRSEP_CHAR)
- && (path[1+ src] != LT_DIRSEP_CHAR)
-#endif
- && (path[1+ src] != '/'))
- {
- canonical[dest++] = '/';
- }
- }
-
- /* Add an end-of-string marker at the end. */
- canonical[dest] = LT_EOS_CHAR;
- }
-
- /* Assign new value. */
- *pcanonical = canonical;
-
- return 0;
-}
-
-static int
-argzize_path (const char *path, char **pargz, size_t *pargz_len)
-{
- error_t error;
-
- assert (path);
- assert (pargz);
- assert (pargz_len);
-
- if ((error = argz_create_sep (path, LT_PATHSEP_CHAR, pargz, pargz_len)))
- {
- switch (error)
- {
- case ENOMEM:
- LT__SETERROR (NO_MEMORY);
- break;
- default:
- LT__SETERROR (UNKNOWN);
- break;
- }
-
- return 1;
- }
-
- return 0;
-}
-
-/* Repeatedly call FUNC with each LT_PATHSEP_CHAR delimited element
- of SEARCH_PATH and references to DATA1 and DATA2, until FUNC returns
- non-zero or all elements are exhausted. If BASE_NAME is non-NULL,
- it is appended to each SEARCH_PATH element before FUNC is called. */
-static int
-foreach_dirinpath (const char *search_path, const char *base_name,
- foreach_callback_func *func, void *data1, void *data2)
-{
- int result = 0;
- size_t filenamesize = 0;
- size_t lenbase = LT_STRLEN (base_name);
- size_t argz_len = 0;
- char *argz = 0;
- char *filename = 0;
- char *canonical = 0;
-
- if (!search_path || !*search_path)
- {
- LT__SETERROR (FILE_NOT_FOUND);
- goto cleanup;
- }
-
- if (canonicalize_path (search_path, &canonical) != 0)
- goto cleanup;
-
- if (argzize_path (canonical, &argz, &argz_len) != 0)
- goto cleanup;
-
- {
- char *dir_name = 0;
- while ((dir_name = argz_next (argz, argz_len, dir_name)))
- {
- size_t lendir = LT_STRLEN (dir_name);
-
- if (1+ lendir + lenbase >= filenamesize)
- {
- FREE (filename);
- filenamesize = 1+ lendir + 1+ lenbase; /* "/d" + '/' + "f" + '\0' */
- filename = MALLOC (char, filenamesize);
- if (!filename)
- goto cleanup;
- }
-
- assert (filenamesize > lendir);
- strcpy (filename, dir_name);
-
- if (base_name && *base_name)
- {
- if (filename[lendir -1] != '/')
- filename[lendir++] = '/';
- strcpy (filename +lendir, base_name);
- }
-
- if ((result = (*func) (filename, data1, data2)))
- {
- break;
- }
- }
- }
-
- cleanup:
- FREE (argz);
- FREE (canonical);
- FREE (filename);
-
- return result;
-}
-
-/* If FILEPATH can be opened, store the name of the directory component
- in DATA1, and the opened FILE* structure address in DATA2. Otherwise
- DATA1 is unchanged, but DATA2 is set to a pointer to NULL. */
-static int
-find_file_callback (char *filename, void *data1, void *data2)
-{
- char **pdir = (char **) data1;
- FILE **pfile = (FILE **) data2;
- int is_done = 0;
-
- assert (filename && *filename);
- assert (pdir);
- assert (pfile);
-
- if ((*pfile = fopen (filename, LT_READTEXT_MODE)))
- {
- char *dirend = strrchr (filename, '/');
-
- if (dirend > filename)
- *dirend = LT_EOS_CHAR;
-
- FREE (*pdir);
- *pdir = lt__strdup (filename);
- is_done = (*pdir == 0) ? -1 : 1;
- }
-
- return is_done;
-}
-
-static FILE *
-find_file (const char *search_path, const char *base_name, char **pdir)
-{
- FILE *file = 0;
-
- foreach_dirinpath (search_path, base_name, find_file_callback, pdir, &file);
-
- return file;
-}
-
-static int
-find_handle_callback (char *filename, void *data, void *data2)
-{
- lt_dlhandle *phandle = (lt_dlhandle *) data;
- int notfound = access (filename, R_OK);
- lt_dladvise advise = (lt_dladvise) data2;
-
- /* Bail out if file cannot be read... */
- if (notfound)
- return 0;
-
- /* Try to dlopen the file, but do not continue searching in any
- case. */
- if (tryall_dlopen (phandle, filename, advise, 0) != 0)
- *phandle = 0;
-
- return 1;
-}
-
-/* If HANDLE was found return it, otherwise return 0. If HANDLE was
- found but could not be opened, *HANDLE will be set to 0. */
-static lt_dlhandle *
-find_handle (const char *search_path, const char *base_name,
- lt_dlhandle *phandle, lt_dladvise advise)
-{
- if (!search_path)
- return 0;
-
- if (!foreach_dirinpath (search_path, base_name, find_handle_callback,
- phandle, advise))
- return 0;
-
- return phandle;
-}
-
-#if !defined(LTDL_DLOPEN_DEPLIBS)
-static int
-load_deplibs (lt_dlhandle handle, char * LT__UNUSED deplibs)
-{
- handle->depcount = 0;
- return 0;
-}
-
-#else /* defined(LTDL_DLOPEN_DEPLIBS) */
-static int
-load_deplibs (lt_dlhandle handle, char *deplibs)
-{
- char *p, *save_search_path = 0;
- int depcount = 0;
- int i;
- char **names = 0;
- int errors = 0;
-
- handle->depcount = 0;
-
- if (!deplibs)
- {
- return errors;
- }
- ++errors;
-
- if (user_search_path)
- {
- save_search_path = lt__strdup (user_search_path);
- if (!save_search_path)
- goto cleanup;
- }
-
- /* extract search paths and count deplibs */
- p = deplibs;
- while (*p)
- {
- if (!isspace ((unsigned char) *p))
- {
- char *end = p+1;
- while (*end && !isspace((unsigned char) *end))
- {
- ++end;
- }
-
- if (strncmp(p, "-L", 2) == 0 || strncmp(p, "-R", 2) == 0)
- {
- char save = *end;
- *end = 0; /* set a temporary string terminator */
- if (lt_dladdsearchdir(p+2))
- {
- goto cleanup;
- }
- *end = save;
- }
- else
- {
- ++depcount;
- }
-
- p = end;
- }
- else
- {
- ++p;
- }
- }
-
-
- if (!depcount)
- {
- errors = 0;
- goto cleanup;
- }
-
- names = MALLOC (char *, depcount);
- if (!names)
- goto cleanup;
-
- /* now only extract the actual deplibs */
- depcount = 0;
- p = deplibs;
- while (*p)
- {
- if (isspace ((unsigned char) *p))
- {
- ++p;
- }
- else
- {
- char *end = p+1;
- while (*end && !isspace ((unsigned char) *end))
- {
- ++end;
- }
-
- if (strncmp(p, "-L", 2) != 0 && strncmp(p, "-R", 2) != 0)
- {
- char *name;
- char save = *end;
- *end = 0; /* set a temporary string terminator */
- if (strncmp(p, "-l", 2) == 0)
- {
- size_t name_len = 3+ /* "lib" */ LT_STRLEN (p + 2);
- name = MALLOC (char, 1+ name_len);
- if (name)
- sprintf (name, "lib%s", p+2);
- }
- else
- name = lt__strdup(p);
-
- if (!name)
- goto cleanup_names;
-
- names[depcount++] = name;
- *end = save;
- }
- p = end;
- }
- }
-
- /* load the deplibs (in reverse order)
- At this stage, don't worry if the deplibs do not load correctly,
- they may already be statically linked into the loading application
- for instance. There will be a more enlightening error message
- later on if the loaded module cannot resolve all of its symbols. */
- if (depcount)
- {
- lt_dlhandle cur = handle;
- int j = 0;
-
- cur->deplibs = MALLOC (lt_dlhandle, depcount);
- if (!cur->deplibs)
- goto cleanup_names;
-
- for (i = 0; i < depcount; ++i)
- {
- cur->deplibs[j] = lt_dlopenext(names[depcount-1-i]);
- if (cur->deplibs[j])
- {
- ++j;
- }
- }
-
- cur->depcount = j; /* Number of successfully loaded deplibs */
- errors = 0;
- }
-
- cleanup_names:
- for (i = 0; i < depcount; ++i)
- {
- FREE (names[i]);
- }
-
- cleanup:
- FREE (names);
- /* restore the old search path */
- if (save_search_path) {
- MEMREASSIGN (user_search_path, save_search_path);
- }
-
- return errors;
-}
-#endif /* defined(LTDL_DLOPEN_DEPLIBS) */
-
-static int
-unload_deplibs (lt_dlhandle handle)
-{
- int i;
- int errors = 0;
- lt_dlhandle cur = handle;
-
- if (cur->depcount)
- {
- for (i = 0; i < cur->depcount; ++i)
- {
- if (!LT_DLIS_RESIDENT (cur->deplibs[i]))
- {
- errors += lt_dlclose (cur->deplibs[i]);
- }
- }
- FREE (cur->deplibs);
- }
-
- return errors;
-}
-
-static int
-trim (char **dest, const char *str)
-{
- /* remove the leading and trailing "'" from str
- and store the result in dest */
- const char *end = strrchr (str, '\'');
- size_t len = LT_STRLEN (str);
- char *tmp;
-
- FREE (*dest);
-
- if (!end || end == str)
- return 1;
-
- if (len > 3 && str[0] == '\'')
- {
- tmp = MALLOC (char, end - str);
- if (!tmp)
- return 1;
-
- memcpy(tmp, &str[1], (end - str) - 1);
- tmp[(end - str) - 1] = LT_EOS_CHAR;
- *dest = tmp;
- }
- else
- {
- *dest = 0;
- }
-
- return 0;
-}
-
-/* Read the .la file FILE. */
-static int
-parse_dotla_file(FILE *file, char **dlname, char **libdir, char **deplibs,
- char **old_name, int *installed)
-{
- int errors = 0;
- size_t line_len = LT_FILENAME_MAX;
- char * line = MALLOC (char, line_len);
-
- if (!line)
- {
- LT__SETERROR (FILE_NOT_FOUND);
- return 1;
- }
-
- while (!feof (file))
- {
- line[line_len-2] = '\0';
- if (!fgets (line, (int) line_len, file))
- {
- break;
- }
-
- /* Handle the case where we occasionally need to read a line
- that is longer than the initial buffer size.
- Behave even if the file contains NUL bytes due to corruption. */
- while (line[line_len-2] != '\0' && line[line_len-2] != '\n' && !feof (file))
- {
- line = REALLOC (char, line, line_len *2);
- if (!line)
- {
- ++errors;
- goto cleanup;
- }
- line[line_len * 2 - 2] = '\0';
- if (!fgets (&line[line_len -1], (int) line_len +1, file))
- {
- break;
- }
- line_len *= 2;
- }
-
- if (line[0] == '\n' || line[0] == '#')
- {
- continue;
- }
-
-#undef STR_DLNAME
-#define STR_DLNAME "dlname="
- if (strncmp (line, STR_DLNAME, sizeof (STR_DLNAME) - 1) == 0)
- {
- errors += trim (dlname, &line[sizeof (STR_DLNAME) - 1]);
- }
-
-#undef STR_OLD_LIBRARY
-#define STR_OLD_LIBRARY "old_library="
- else if (strncmp (line, STR_OLD_LIBRARY,
- sizeof (STR_OLD_LIBRARY) - 1) == 0)
- {
- errors += trim (old_name, &line[sizeof (STR_OLD_LIBRARY) - 1]);
- }
-
- /* Windows native tools do not understand the POSIX paths we store
- in libdir. */
-#undef STR_LIBDIR
-#define STR_LIBDIR "libdir="
- else if (strncmp (line, STR_LIBDIR, sizeof (STR_LIBDIR) - 1) == 0)
- {
- errors += trim (libdir, &line[sizeof(STR_LIBDIR) - 1]);
-#ifdef __WINDOWS__
- /* Disallow following unix-style paths on MinGW. */
- if (*libdir && (**libdir == '/' || **libdir == '\\'))
- **libdir = '\0';
-#endif
- }
-
-#undef STR_DL_DEPLIBS
-#define STR_DL_DEPLIBS "dependency_libs="
- else if (strncmp (line, STR_DL_DEPLIBS,
- sizeof (STR_DL_DEPLIBS) - 1) == 0)
- {
- errors += trim (deplibs, &line[sizeof (STR_DL_DEPLIBS) - 1]);
- }
- else if (streq (line, "installed=yes\n"))
- {
- *installed = 1;
- }
- else if (streq (line, "installed=no\n"))
- {
- *installed = 0;
- }
-
-#undef STR_LIBRARY_NAMES
-#define STR_LIBRARY_NAMES "library_names="
- else if (!*dlname && strncmp (line, STR_LIBRARY_NAMES,
- sizeof (STR_LIBRARY_NAMES) - 1) == 0)
- {
- char *last_libname;
- errors += trim (dlname, &line[sizeof (STR_LIBRARY_NAMES) - 1]);
- if (!errors
- && *dlname
- && (last_libname = strrchr (*dlname, ' ')) != 0)
- {
- last_libname = lt__strdup (last_libname + 1);
- if (!last_libname)
- {
- ++errors;
- goto cleanup;
- }
- MEMREASSIGN (*dlname, last_libname);
- }
- }
-
- if (errors)
- break;
- }
-cleanup:
- FREE (line);
- return errors;
-}
-
-
-/* Try to open FILENAME as a module. */
-static int
-try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext,
- lt_dladvise advise)
-{
- const char * saved_error = 0;
- char * archive_name = 0;
- char * canonical = 0;
- char * base_name = 0;
- char * dir = 0;
- char * name = 0;
- char * attempt = 0;
- int errors = 0;
- lt_dlhandle newhandle;
-
- assert (phandle);
- assert (*phandle == 0);
-
-#ifdef LT_DEBUG_LOADERS
- fprintf (stderr, "try_dlopen (%s, %s)\n",
- filename ? filename : "(null)",
- ext ? ext : "(null)");
-#endif
-
- LT__GETERROR (saved_error);
-
- /* dlopen self? */
- if (!filename)
- {
- *phandle = (lt_dlhandle) lt__zalloc (sizeof (struct lt__handle));
- if (*phandle == 0)
- return 1;
-
- newhandle = *phandle;
-
- /* lt_dlclose()ing yourself is very bad! Disallow it. */
- newhandle->info.is_resident = 1;
-
- if (tryall_dlopen (&newhandle, 0, advise, 0) != 0)
- {
- FREE (*phandle);
- return 1;
- }
-
- goto register_handle;
- }
-
- assert (filename && *filename);
-
- if (ext)
- {
- attempt = MALLOC (char, LT_STRLEN (filename) + LT_STRLEN (ext) + 1);
- if (!attempt)
- return 1;
-
- sprintf(attempt, "%s%s", filename, ext);
- }
- else
- {
- attempt = lt__strdup (filename);
- if (!attempt)
- return 1;
- }
-
- /* Doing this immediately allows internal functions to safely
- assume only canonicalized paths are passed. */
- if (canonicalize_path (attempt, &canonical) != 0)
- {
- ++errors;
- goto cleanup;
- }
-
- /* If the canonical module name is a path (relative or absolute)
- then split it into a directory part and a name part. */
- base_name = strrchr (canonical, '/');
- if (base_name)
- {
- size_t dirlen = (1+ base_name) - canonical;
-
- dir = MALLOC (char, 1+ dirlen);
- if (!dir)
- {
- ++errors;
- goto cleanup;
- }
-
- strncpy (dir, canonical, dirlen);
- dir[dirlen] = LT_EOS_CHAR;
-
- ++base_name;
- }
- else
- MEMREASSIGN (base_name, canonical);
-
- assert (base_name && *base_name);
-
- ext = strrchr (base_name, '.');
- if (!ext)
- {
- ext = base_name + LT_STRLEN (base_name);
- }
-
- /* extract the module name from the file name */
- name = MALLOC (char, ext - base_name + 1);
- if (!name)
- {
- ++errors;
- goto cleanup;
- }
-
- /* canonicalize the module name */
- {
- int i;
- for (i = 0; i < ext - base_name; ++i)
- {
- if (isalnum ((unsigned char)(base_name[i])))
- {
- name[i] = base_name[i];
- }
- else
- {
- name[i] = '_';
- }
- }
- name[ext - base_name] = LT_EOS_CHAR;
- }
-
- /* Before trawling through the filesystem in search of a module,
- check whether we are opening a preloaded module. */
- if (!dir)
- {
- const lt_dlvtable *vtable = lt_dlloader_find ("lt_preopen");
-
- if (vtable)
- {
- /* libprefix + name + "." + libext + NULL */
- archive_name = MALLOC (char, strlen (libprefix) + LT_STRLEN (name) + strlen (libext) + 2);
- *phandle = (lt_dlhandle) lt__zalloc (sizeof (struct lt__handle));
-
- if ((*phandle == NULL) || (archive_name == NULL))
- {
- ++errors;
- goto cleanup;
- }
- newhandle = *phandle;
-
- /* Preloaded modules are always named according to their old
- archive name. */
- if (strncmp(name, "lib", 3) == 0)
- {
- sprintf (archive_name, "%s%s.%s", libprefix, name + 3, libext);
- }
- else
- {
- sprintf (archive_name, "%s.%s", name, libext);
- }
-
- if (tryall_dlopen (&newhandle, archive_name, advise, vtable) == 0)
- {
- goto register_handle;
- }
-
- /* If we're still here, there was no matching preloaded module,
- so put things back as we found them, and continue searching. */
- FREE (*phandle);
- newhandle = NULL;
- }
- }
-
- /* If we are allowing only preloaded modules, and we didn't find
- anything yet, give up on the search here. */
- if (advise && advise->try_preload_only)
- {
- goto cleanup;
- }
-
- /* Check whether we are opening a libtool module (.la extension). */
- if (ext && streq (ext, archive_ext))
- {
- /* this seems to be a libtool module */
- FILE * file = 0;
- char * dlname = 0;
- char * old_name = 0;
- char * libdir = 0;
- char * deplibs = 0;
-
- /* if we can't find the installed flag, it is probably an
- installed libtool archive, produced with an old version
- of libtool */
- int installed = 1;
-
- /* Now try to open the .la file. If there is no directory name
- component, try to find it first in user_search_path and then other
- prescribed paths. Otherwise (or in any case if the module was not
- yet found) try opening just the module name as passed. */
- if (!dir)
- {
- const char *search_path = user_search_path;
-
- if (search_path)
- file = find_file (user_search_path, base_name, &dir);
-
- if (!file)
- {
- search_path = getenv (LTDL_SEARCHPATH_VAR);
- if (search_path)
- file = find_file (search_path, base_name, &dir);
- }
-
-#if defined(LT_MODULE_PATH_VAR)
- if (!file)
- {
- search_path = getenv (LT_MODULE_PATH_VAR);
- if (search_path)
- file = find_file (search_path, base_name, &dir);
- }
-#endif
-#if defined(LT_DLSEARCH_PATH)
- if (!file && *sys_dlsearch_path)
- {
- file = find_file (sys_dlsearch_path, base_name, &dir);
- }
-#endif
- }
- else
- {
- file = fopen (attempt, LT_READTEXT_MODE);
- }
-
- /* If we didn't find the file by now, it really isn't there. Set
- the status flag, and bail out. */
- if (!file)
- {
- LT__SETERROR (FILE_NOT_FOUND);
- ++errors;
- goto cleanup;
- }
-
- /* read the .la file */
- if (parse_dotla_file(file, &dlname, &libdir, &deplibs,
- &old_name, &installed) != 0)
- ++errors;
-
- fclose (file);
-
- /* allocate the handle */
- *phandle = (lt_dlhandle) lt__zalloc (sizeof (struct lt__handle));
- if (*phandle == 0)
- ++errors;
-
- if (errors)
- {
- FREE (dlname);
- FREE (old_name);
- FREE (libdir);
- FREE (deplibs);
- FREE (*phandle);
- goto cleanup;
- }
-
- assert (*phandle);
-
- if (load_deplibs (*phandle, deplibs) == 0)
- {
- newhandle = *phandle;
- /* find_module may replace newhandle */
- if (find_module (&newhandle, dir, libdir, dlname, old_name,
- installed, advise))
- {
- unload_deplibs (*phandle);
- ++errors;
- }
- }
- else
- {
- ++errors;
- }
-
- FREE (dlname);
- FREE (old_name);
- FREE (libdir);
- FREE (deplibs);
-
- if (errors)
- {
- FREE (*phandle);
- goto cleanup;
- }
-
- if (*phandle != newhandle)
- {
- unload_deplibs (*phandle);
- }
- }
- else
- {
- /* not a libtool module */
- *phandle = (lt_dlhandle) lt__zalloc (sizeof (struct lt__handle));
- if (*phandle == 0)
- {
- ++errors;
- goto cleanup;
- }
-
- newhandle = *phandle;
-
- /* If the module has no directory name component, try to find it
- first in user_search_path and then other prescribed paths.
- Otherwise (or in any case if the module was not yet found) try
- opening just the module name as passed. */
- if ((dir || (!find_handle (user_search_path, base_name,
- &newhandle, advise)
- && !find_handle (getenv (LTDL_SEARCHPATH_VAR), base_name,
- &newhandle, advise)
-#if defined(LT_MODULE_PATH_VAR)
- && !find_handle (getenv (LT_MODULE_PATH_VAR), base_name,
- &newhandle, advise)
-#endif
-#if defined(LT_DLSEARCH_PATH)
- && !find_handle (sys_dlsearch_path, base_name,
- &newhandle, advise)
-#endif
- )))
- {
- if (tryall_dlopen (&newhandle, attempt, advise, 0) != 0)
- {
- newhandle = NULL;
- }
- }
-
- if (!newhandle)
- {
- FREE (*phandle);
- ++errors;
- goto cleanup;
- }
- }
-
- register_handle:
- MEMREASSIGN (*phandle, newhandle);
-
- if ((*phandle)->info.ref_count == 0)
- {
- (*phandle)->info.ref_count = 1;
- MEMREASSIGN ((*phandle)->info.name, name);
-
- (*phandle)->next = handles;
- handles = *phandle;
- }
-
- LT__SETERRORSTR (saved_error);
-
- cleanup:
- FREE (dir);
- FREE (attempt);
- FREE (name);
- if (!canonical) /* was MEMREASSIGNed */
- FREE (base_name);
- FREE (canonical);
- FREE (archive_name);
-
- return errors;
-}
-
-
-/* If the last error message stored was `FILE_NOT_FOUND', then return
- non-zero. */
-static int
-file_not_found (void)
-{
- const char *error = 0;
-
- LT__GETERROR (error);
- if (error == LT__STRERROR (FILE_NOT_FOUND))
- return 1;
-
- return 0;
-}
-
-
-/* Unless FILENAME already bears a suitable library extension, then
- return 0. */
-static int
-has_library_ext (const char *filename)
-{
- const char * ext = 0;
-
- assert (filename);
-
- ext = strrchr (filename, '.');
-
- if (ext && ((streq (ext, archive_ext))
-#if defined(LT_MODULE_EXT)
- || (streq (ext, shlib_ext))
-#endif
-#if defined(LT_SHARED_EXT)
- || (streq (ext, shared_ext))
-#endif
- ))
- {
- return 1;
- }
-
- return 0;
-}
-
-
-/* Initialise and configure a user lt_dladvise opaque object. */
-
-int
-lt_dladvise_init (lt_dladvise *padvise)
-{
- lt_dladvise advise = (lt_dladvise) lt__zalloc (sizeof (struct lt__advise));
- *padvise = advise;
- return (advise ? 0 : 1);
-}
-
-int
-lt_dladvise_destroy (lt_dladvise *padvise)
-{
- if (padvise)
- FREE(*padvise);
- return 0;
-}
-
-int
-lt_dladvise_ext (lt_dladvise *padvise)
-{
- assert (padvise && *padvise);
- (*padvise)->try_ext = 1;
- return 0;
-}
-
-int
-lt_dladvise_resident (lt_dladvise *padvise)
-{
- assert (padvise && *padvise);
- (*padvise)->is_resident = 1;
- return 0;
-}
-
-int
-lt_dladvise_local (lt_dladvise *padvise)
-{
- assert (padvise && *padvise);
- (*padvise)->is_symlocal = 1;
- return 0;
-}
-
-int
-lt_dladvise_global (lt_dladvise *padvise)
-{
- assert (padvise && *padvise);
- (*padvise)->is_symglobal = 1;
- return 0;
-}
-
-int
-lt_dladvise_preload (lt_dladvise *padvise)
-{
- assert (padvise && *padvise);
- (*padvise)->try_preload_only = 1;
- return 0;
-}
-
-/* Libtool-1.5.x interface for loading a new module named FILENAME. */
-lt_dlhandle
-lt_dlopen (const char *filename)
-{
- return lt_dlopenadvise (filename, NULL);
-}
-
-
-/* If FILENAME has an ARCHIVE_EXT or MODULE_EXT extension, try to
- open the FILENAME as passed. Otherwise try appending ARCHIVE_EXT,
- and if a file is still not found try again with MODULE_EXT appended
- instead. */
-lt_dlhandle
-lt_dlopenext (const char *filename)
-{
- lt_dlhandle handle = 0;
- lt_dladvise advise;
-
- if (!lt_dladvise_init (&advise) && !lt_dladvise_ext (&advise))
- handle = lt_dlopenadvise (filename, advise);
-
- lt_dladvise_destroy (&advise);
- return handle;
-}
-
-
-lt_dlhandle
-lt_dlopenadvise (const char *filename, lt_dladvise advise)
-{
- lt_dlhandle handle = 0;
- int errors = 0;
- const char * saved_error = 0;
-
- LT__GETERROR (saved_error);
-
- /* Can't have symbols hidden and visible at the same time! */
- if (advise && advise->is_symlocal && advise->is_symglobal)
- {
- LT__SETERROR (CONFLICTING_FLAGS);
- return 0;
- }
-
- if (!filename
- || !advise
- || !advise->try_ext
- || has_library_ext (filename))
- {
- /* Just incase we missed a code path in try_dlopen() that reports
- an error, but forgot to reset handle... */
- if (try_dlopen (&handle, filename, NULL, advise) != 0)
- return 0;
-
- return handle;
- }
- else if (filename && *filename)
- {
-
- /* First try appending ARCHIVE_EXT. */
- errors += try_dlopen (&handle, filename, archive_ext, advise);
-
- /* If we found FILENAME, stop searching -- whether we were able to
- load the file as a module or not. If the file exists but loading
- failed, it is better to return an error message here than to
- report FILE_NOT_FOUND when the alternatives (foo.so etc) are not
- in the module search path. */
- if (handle || ((errors > 0) && !file_not_found ()))
- return handle;
-
-#if defined(LT_MODULE_EXT)
- /* Try appending SHLIB_EXT. */
- LT__SETERRORSTR (saved_error);
- errors = try_dlopen (&handle, filename, shlib_ext, advise);
-
- /* As before, if the file was found but loading failed, return now
- with the current error message. */
- if (handle || ((errors > 0) && !file_not_found ()))
- return handle;
-#endif
-
-#if defined(LT_SHARED_EXT)
- /* Try appending SHARED_EXT. */
- LT__SETERRORSTR (saved_error);
- errors = try_dlopen (&handle, filename, shared_ext, advise);
-
- /* As before, if the file was found but loading failed, return now
- with the current error message. */
- if (handle || ((errors > 0) && !file_not_found ()))
- return handle;
-#endif
- }
-
- /* Still here? Then we really did fail to locate any of the file
- names we tried. */
- LT__SETERROR (FILE_NOT_FOUND);
- return 0;
-}
-
-
-static int
-lt_argz_insert (char **pargz, size_t *pargz_len, char *before,
- const char *entry)
-{
- error_t error;
-
- /* Prior to Sep 8, 2005, newlib had a bug where argz_insert(pargz,
- pargz_len, NULL, entry) failed with EINVAL. */
- if (before)
- error = argz_insert (pargz, pargz_len, before, entry);
- else
- error = argz_append (pargz, pargz_len, entry, 1 + strlen (entry));
-
- if (error)
- {
- switch (error)
- {
- case ENOMEM:
- LT__SETERROR (NO_MEMORY);
- break;
- default:
- LT__SETERROR (UNKNOWN);
- break;
- }
- return 1;
- }
-
- return 0;
-}
-
-static int
-lt_argz_insertinorder (char **pargz, size_t *pargz_len, const char *entry)
-{
- char *before = 0;
-
- assert (pargz);
- assert (pargz_len);
- assert (entry && *entry);
-
- if (*pargz)
- while ((before = argz_next (*pargz, *pargz_len, before)))
- {
- int cmp = strcmp (entry, before);
-
- if (cmp < 0) break;
- if (cmp == 0) return 0; /* No duplicates! */
- }
-
- return lt_argz_insert (pargz, pargz_len, before, entry);
-}
-
-static int
-lt_argz_insertdir (char **pargz, size_t *pargz_len, const char *dirnam,
- struct dirent *dp)
-{
- char *buf = 0;
- size_t buf_len = 0;
- char *end = 0;
- size_t end_offset = 0;
- size_t dir_len = 0;
- int errors = 0;
-
- assert (pargz);
- assert (pargz_len);
- assert (dp);
-
- dir_len = LT_STRLEN (dirnam);
- end = dp->d_name + D_NAMLEN(dp);
-
- /* Ignore version numbers. */
- {
- char *p;
- for (p = end; p -1 > dp->d_name; --p)
- if (strchr (".0123456789", p[-1]) == 0)
- break;
-
- if (*p == '.')
- end = p;
- }
-
- /* Ignore filename extension. */
- {
- char *p;
- for (p = end -1; p > dp->d_name; --p)
- if (*p == '.')
- {
- end = p;
- break;
- }
- }
-
- /* Prepend the directory name. */
- end_offset = end - dp->d_name;
- buf_len = dir_len + 1+ end_offset;
- buf = MALLOC (char, 1+ buf_len);
- if (!buf)
- return ++errors;
-
- assert (buf);
-
- strcpy (buf, dirnam);
- strcat (buf, "/");
- strncat (buf, dp->d_name, end_offset);
- buf[buf_len] = LT_EOS_CHAR;
-
- /* Try to insert (in order) into ARGZ/ARGZ_LEN. */
- if (lt_argz_insertinorder (pargz, pargz_len, buf) != 0)
- ++errors;
-
- FREE (buf);
-
- return errors;
-}
-
-static int
-list_files_by_dir (const char *dirnam, char **pargz, size_t *pargz_len)
-{
- DIR *dirp = 0;
- int errors = 0;
-
- assert (dirnam && *dirnam);
- assert (pargz);
- assert (pargz_len);
- assert (dirnam[LT_STRLEN(dirnam) -1] != '/');
-
- dirp = opendir (dirnam);
- if (dirp)
- {
- struct dirent *dp = 0;
-
- while ((dp = readdir (dirp)))
- if (dp->d_name[0] != '.')
- if (lt_argz_insertdir (pargz, pargz_len, dirnam, dp))
- {
- ++errors;
- break;
- }
-
- closedir (dirp);
- }
- else
- ++errors;
-
- return errors;
-}
-
-
-/* If there are any files in DIRNAME, call the function passed in
- DATA1 (with the name of each file and DATA2 as arguments). */
-static int
-foreachfile_callback (char *dirname, void *data1, void *data2)
-{
- file_worker_func *func = *(file_worker_func **) data1;
-
- int is_done = 0;
- char *argz = 0;
- size_t argz_len = 0;
-
- if (list_files_by_dir (dirname, &argz, &argz_len) != 0)
- goto cleanup;
- if (!argz)
- goto cleanup;
-
- {
- char *filename = 0;
- while ((filename = argz_next (argz, argz_len, filename)))
- if ((is_done = (*func) (filename, data2)))
- break;
- }
-
- cleanup:
- FREE (argz);
-
- return is_done;
-}
-
-
-/* Call FUNC for each unique extensionless file in SEARCH_PATH, along
- with DATA. The filenames passed to FUNC would be suitable for
- passing to lt_dlopenext. The extensions are stripped so that
- individual modules do not generate several entries (e.g. libfoo.la,
- libfoo.so, libfoo.so.1, libfoo.so.1.0.0). If SEARCH_PATH is NULL,
- then the same directories that lt_dlopen would search are examined. */
-int
-lt_dlforeachfile (const char *search_path,
- int (*func) (const char *filename, void *data),
- void *data)
-{
- int is_done = 0;
- file_worker_func **fpptr = &func;
-
- if (search_path)
- {
- /* If a specific path was passed, search only the directories
- listed in it. */
- is_done = foreach_dirinpath (search_path, 0,
- foreachfile_callback, fpptr, data);
- }
- else
- {
- /* Otherwise search the default paths. */
- is_done = foreach_dirinpath (user_search_path, 0,
- foreachfile_callback, fpptr, data);
- if (!is_done)
- {
- is_done = foreach_dirinpath (getenv(LTDL_SEARCHPATH_VAR), 0,
- foreachfile_callback, fpptr, data);
- }
-
-#if defined(LT_MODULE_PATH_VAR)
- if (!is_done)
- {
- is_done = foreach_dirinpath (getenv(LT_MODULE_PATH_VAR), 0,
- foreachfile_callback, fpptr, data);
- }
-#endif
-#if defined(LT_DLSEARCH_PATH)
- if (!is_done && *sys_dlsearch_path)
- {
- is_done = foreach_dirinpath (sys_dlsearch_path, 0,
- foreachfile_callback, fpptr, data);
- }
-#endif
- }
-
- return is_done;
-}
-
-int
-lt_dlclose (lt_dlhandle handle)
-{
- lt_dlhandle cur, last;
- int errors = 0;
-
- /* check whether the handle is valid */
- last = cur = handles;
- while (cur && handle != cur)
- {
- last = cur;
- cur = cur->next;
- }
-
- if (!cur)
- {
- LT__SETERROR (INVALID_HANDLE);
- ++errors;
- goto done;
- }
-
- cur = handle;
- cur->info.ref_count--;
-
- /* Note that even with resident modules, we must track the ref_count
- correctly incase the user decides to reset the residency flag
- later (even though the API makes no provision for that at the
- moment). */
- if (cur->info.ref_count <= 0 && !LT_DLIS_RESIDENT (cur))
- {
- lt_user_data data = cur->vtable->dlloader_data;
-
- if (cur != handles)
- {
- last->next = cur->next;
- }
- else
- {
- handles = cur->next;
- }
-
- errors += cur->vtable->module_close (data, cur->module);
- errors += unload_deplibs (handle);
-
- /* It is up to the callers to free the data itself. */
- FREE (cur->interface_data);
-
- FREE (cur->info.filename);
- FREE (cur->info.name);
- FREE (cur);
-
- goto done;
- }
-
- if (LT_DLIS_RESIDENT (handle))
- {
- LT__SETERROR (CLOSE_RESIDENT_MODULE);
- ++errors;
- }
-
- done:
- return errors;
-}
-
-void *
-lt_dlsym (lt_dlhandle place, const char *symbol)
-{
- size_t lensym;
- char lsym[LT_SYMBOL_LENGTH];
- char *sym;
- void *address;
- lt_user_data data;
- lt_dlhandle handle;
-
- if (!place)
- {
- LT__SETERROR (INVALID_HANDLE);
- return 0;
- }
-
- handle = place;
-
- if (!symbol)
- {
- LT__SETERROR (SYMBOL_NOT_FOUND);
- return 0;
- }
-
- lensym = LT_STRLEN (symbol) + LT_STRLEN (handle->vtable->sym_prefix)
- + LT_STRLEN (handle->info.name);
-
- if (lensym + LT_SYMBOL_OVERHEAD < LT_SYMBOL_LENGTH)
- {
- sym = lsym;
- }
- else
- {
- sym = MALLOC (char, lensym + LT_SYMBOL_OVERHEAD + 1);
- if (!sym)
- {
- LT__SETERROR (BUFFER_OVERFLOW);
- return 0;
- }
- }
-
- data = handle->vtable->dlloader_data;
- if (handle->info.name)
- {
- const char *saved_error;
-
- LT__GETERROR (saved_error);
-
- /* this is a libtool module */
- if (handle->vtable->sym_prefix)
- {
- strcpy(sym, handle->vtable->sym_prefix);
- strcat(sym, handle->info.name);
- }
- else
- {
- strcpy(sym, handle->info.name);
- }
-
- strcat(sym, "_LTX_");
- strcat(sym, symbol);
-
- /* try "modulename_LTX_symbol" */
- address = handle->vtable->find_sym (data, handle->module, sym);
- if (address)
- {
- if (sym != lsym)
- {
- FREE (sym);
- }
- return address;
- }
- LT__SETERRORSTR (saved_error);
- }
-
- /* otherwise try "symbol" */
- if (handle->vtable->sym_prefix)
- {
- strcpy(sym, handle->vtable->sym_prefix);
- strcat(sym, symbol);
- }
- else
- {
- strcpy(sym, symbol);
- }
-
- address = handle->vtable->find_sym (data, handle->module, sym);
- if (sym != lsym)
- {
- FREE (sym);
- }
-
- return address;
-}
-
-const char *
-lt_dlerror (void)
-{
- const char *error;
-
- LT__GETERROR (error);
- LT__SETERRORSTR (0);
-
- return error;
-}
-
-static int
-lt_dlpath_insertdir (char **ppath, char *before, const char *dir)
-{
- int errors = 0;
- char *canonical = 0;
- char *argz = 0;
- size_t argz_len = 0;
-
- assert (ppath);
- assert (dir && *dir);
-
- if (canonicalize_path (dir, &canonical) != 0)
- {
- ++errors;
- goto cleanup;
- }
-
- assert (canonical && *canonical);
-
- /* If *PPATH is empty, set it to DIR. */
- if (*ppath == 0)
- {
- assert (!before); /* BEFORE cannot be set without PPATH. */
- assert (dir); /* Without DIR, don't call this function! */
-
- *ppath = lt__strdup (dir);
- if (*ppath == 0)
- ++errors;
-
- goto cleanup;
- }
-
- assert (ppath && *ppath);
-
- if (argzize_path (*ppath, &argz, &argz_len) != 0)
- {
- ++errors;
- goto cleanup;
- }
-
- /* Convert BEFORE into an equivalent offset into ARGZ. This only works
- if *PPATH is already canonicalized, and hence does not change length
- with respect to ARGZ. We canonicalize each entry as it is added to
- the search path, and don't call this function with (uncanonicalized)
- user paths, so this is a fair assumption. */
- if (before)
- {
- assert (*ppath <= before);
- assert ((int) (before - *ppath) <= (int) strlen (*ppath));
-
- before = before - *ppath + argz;
- }
-
- if (lt_argz_insert (&argz, &argz_len, before, dir) != 0)
- {
- ++errors;
- goto cleanup;
- }
-
- argz_stringify (argz, argz_len, LT_PATHSEP_CHAR);
- MEMREASSIGN(*ppath, argz);
-
- cleanup:
- FREE (argz);
- FREE (canonical);
-
- return errors;
-}
-
-int
-lt_dladdsearchdir (const char *search_dir)
-{
- int errors = 0;
-
- if (search_dir && *search_dir)
- {
- if (lt_dlpath_insertdir (&user_search_path, 0, search_dir) != 0)
- ++errors;
- }
-
- return errors;
-}
-
-int
-lt_dlinsertsearchdir (const char *before, const char *search_dir)
-{
- int errors = 0;
-
- if (before)
- {
- if ((before < user_search_path)
- || (before >= user_search_path + LT_STRLEN (user_search_path)))
- {
- LT__SETERROR (INVALID_POSITION);
- return 1;
- }
- }
-
- if (search_dir && *search_dir)
- {
- if (lt_dlpath_insertdir (&user_search_path,
- (char *) before, search_dir) != 0)
- {
- ++errors;
- }
- }
-
- return errors;
-}
-
-int
-lt_dlsetsearchpath (const char *search_path)
-{
- int errors = 0;
-
- FREE (user_search_path);
-
- if (!search_path || !LT_STRLEN (search_path))
- {
- return errors;
- }
-
- if (canonicalize_path (search_path, &user_search_path) != 0)
- ++errors;
-
- return errors;
-}
-
-const char *
-lt_dlgetsearchpath (void)
-{
- const char *saved_path;
-
- saved_path = user_search_path;
-
- return saved_path;
-}
-
-int
-lt_dlmakeresident (lt_dlhandle handle)
-{
- int errors = 0;
-
- if (!handle)
- {
- LT__SETERROR (INVALID_HANDLE);
- ++errors;
- }
- else
- {
- handle->info.is_resident = 1;
- }
-
- return errors;
-}
-
-int
-lt_dlisresident (lt_dlhandle handle)
-{
- if (!handle)
- {
- LT__SETERROR (INVALID_HANDLE);
- return -1;
- }
-
- return LT_DLIS_RESIDENT (handle);
-}
-
-
-
-/* --- MODULE INFORMATION --- */
-
-typedef struct {
- const char *id_string;
- lt_dlhandle_interface *iface;
-} lt__interface_id;
-
-lt_dlinterface_id
-lt_dlinterface_register (const char *id_string, lt_dlhandle_interface *iface)
-{
- lt__interface_id *interface_id = (lt__interface_id *) lt__malloc (sizeof *interface_id);
-
- /* If lt__malloc fails, it will LT__SETERROR (NO_MEMORY), which
- can then be detected with lt_dlerror() if we return 0. */
- if (interface_id)
- {
- interface_id->id_string = lt__strdup (id_string);
- if (!interface_id->id_string)
- FREE (interface_id);
- else
- interface_id->iface = iface;
- }
-
- return (lt_dlinterface_id) interface_id;
-}
-
-void lt_dlinterface_free (lt_dlinterface_id key)
-{
- lt__interface_id *interface_id = (lt__interface_id *)key;
- FREE (interface_id->id_string);
- FREE (interface_id);
-}
-
-void *
-lt_dlcaller_set_data (lt_dlinterface_id key, lt_dlhandle handle, void *data)
-{
- int n_elements = 0;
- void *stale = (void *) 0;
- lt_dlhandle cur = handle;
- int i;
-
- if (cur->interface_data)
- while (cur->interface_data[n_elements].key)
- ++n_elements;
-
- for (i = 0; i < n_elements; ++i)
- {
- if (cur->interface_data[i].key == key)
- {
- stale = cur->interface_data[i].data;
- break;
- }
- }
-
- /* Ensure that there is enough room in this handle's interface_data
- array to accept a new element (and an empty end marker). */
- if (i == n_elements)
- {
- lt_interface_data *temp
- = REALLOC (lt_interface_data, cur->interface_data, 2+ n_elements);
-
- if (!temp)
- {
- stale = 0;
- goto done;
- }
-
- cur->interface_data = temp;
-
- /* We only need this if we needed to allocate a new interface_data. */
- cur->interface_data[i].key = key;
- cur->interface_data[1+ i].key = 0;
- }
-
- cur->interface_data[i].data = data;
-
- done:
- return stale;
-}
-
-void *
-lt_dlcaller_get_data (lt_dlinterface_id key, lt_dlhandle handle)
-{
- void *result = (void *) 0;
- lt_dlhandle cur = handle;
-
- /* Locate the index of the element with a matching KEY. */
- if (cur->interface_data)
- {
- int i;
- for (i = 0; cur->interface_data[i].key; ++i)
- {
- if (cur->interface_data[i].key == key)
- {
- result = cur->interface_data[i].data;
- break;
- }
- }
- }
-
- return result;
-}
-
-const lt_dlinfo *
-lt_dlgetinfo (lt_dlhandle handle)
-{
- if (!handle)
- {
- LT__SETERROR (INVALID_HANDLE);
- return 0;
- }
-
- return &(handle->info);
-}
-
-
-lt_dlhandle
-lt_dlhandle_iterate (lt_dlinterface_id iface, lt_dlhandle place)
-{
- lt_dlhandle handle = place;
- lt__interface_id *iterator = (lt__interface_id *) iface;
-
- assert (iface); /* iface is a required argument */
-
- if (!handle)
- handle = handles;
- else
- handle = handle->next;
-
- /* advance while the interface check fails */
- while (handle && iterator->iface
- && ((*iterator->iface) (handle, iterator->id_string) != 0))
- {
- handle = handle->next;
- }
-
- return handle;
-}
-
-
-lt_dlhandle
-lt_dlhandle_fetch (lt_dlinterface_id iface, const char *module_name)
-{
- lt_dlhandle handle = 0;
-
- assert (iface); /* iface is a required argument */
-
- while ((handle = lt_dlhandle_iterate (iface, handle)))
- {
- lt_dlhandle cur = handle;
- if (cur && cur->info.name && streq (cur->info.name, module_name))
- break;
- }
-
- return handle;
-}
-
-
-int
-lt_dlhandle_map (lt_dlinterface_id iface,
- int (*func) (lt_dlhandle handle, void *data), void *data)
-{
- lt__interface_id *iterator = (lt__interface_id *) iface;
- lt_dlhandle cur = handles;
-
- assert (iface); /* iface is a required argument */
-
- while (cur)
- {
- int errorcode = 0;
-
- /* advance while the interface check fails */
- while (cur && iterator->iface
- && ((*iterator->iface) (cur, iterator->id_string) != 0))
- {
- cur = cur->next;
- }
-
- if ((errorcode = (*func) (cur, data)) != 0)
- return errorcode;
- }
-
- return 0;
-}
+++ /dev/null
-/* ltdl.h -- generic dlopen functions
-
- Copyright (C) 1998-2000, 2004, 2005,
- 2007, 2008 Free Software Foundation, Inc.
- Written by Thomas Tanner, 1998
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-/* Only include this header file once. */
-#if !defined(LTDL_H)
-#define LTDL_H 1
-
-#include <libltdl/lt_system.h>
-#include <libltdl/lt_error.h>
-#include <libltdl/lt_dlloader.h>
-
-LT_BEGIN_C_DECLS
-
-
-/* LT_STRLEN can be used safely on NULL pointers. */
-#define LT_STRLEN(s) (((s) && (s)[0]) ? strlen (s) : 0)
-
-\f
-/* --- DYNAMIC MODULE LOADING API --- */
-
-
-typedef struct lt__handle *lt_dlhandle; /* A loaded module. */
-
-/* Initialisation and finalisation functions for libltdl. */
-LT_SCOPE int lt_dlinit (void);
-LT_SCOPE int lt_dlexit (void);
-
-/* Module search path manipulation. */
-LT_SCOPE int lt_dladdsearchdir (const char *search_dir);
-LT_SCOPE int lt_dlinsertsearchdir (const char *before,
- const char *search_dir);
-LT_SCOPE int lt_dlsetsearchpath (const char *search_path);
-LT_SCOPE const char *lt_dlgetsearchpath (void);
-LT_SCOPE int lt_dlforeachfile (
- const char *search_path,
- int (*func) (const char *filename, void *data),
- void *data);
-
-/* User module loading advisors. */
-LT_SCOPE int lt_dladvise_init (lt_dladvise *advise);
-LT_SCOPE int lt_dladvise_destroy (lt_dladvise *advise);
-LT_SCOPE int lt_dladvise_ext (lt_dladvise *advise);
-LT_SCOPE int lt_dladvise_resident (lt_dladvise *advise);
-LT_SCOPE int lt_dladvise_local (lt_dladvise *advise);
-LT_SCOPE int lt_dladvise_global (lt_dladvise *advise);
-LT_SCOPE int lt_dladvise_preload (lt_dladvise *advise);
-
-/* Portable libltdl versions of the system dlopen() API. */
-LT_SCOPE lt_dlhandle lt_dlopen (const char *filename);
-LT_SCOPE lt_dlhandle lt_dlopenext (const char *filename);
-LT_SCOPE lt_dlhandle lt_dlopenadvise (const char *filename,
- lt_dladvise advise);
-LT_SCOPE void * lt_dlsym (lt_dlhandle handle, const char *name);
-LT_SCOPE const char *lt_dlerror (void);
-LT_SCOPE int lt_dlclose (lt_dlhandle handle);
-
-
-
-/* --- PRELOADED MODULE SUPPORT --- */
-
-
-/* A preopened symbol. Arrays of this type comprise the exported
- symbols for a dlpreopened module. */
-typedef struct {
- const char *name;
- void *address;
-} lt_dlsymlist;
-
-typedef int lt_dlpreload_callback_func (lt_dlhandle handle);
-
-LT_SCOPE int lt_dlpreload (const lt_dlsymlist *preloaded);
-LT_SCOPE int lt_dlpreload_default (const lt_dlsymlist *preloaded);
-LT_SCOPE int lt_dlpreload_open (const char *originator,
- lt_dlpreload_callback_func *func);
-
-#define lt_preloaded_symbols lt__PROGRAM__LTX_preloaded_symbols
-/* Ensure C linkage. */
-extern LT_DLSYM_CONST lt_dlsymlist lt__PROGRAM__LTX_preloaded_symbols[];
-
-#define LTDL_SET_PRELOADED_SYMBOLS() \
- lt_dlpreload_default(lt_preloaded_symbols)
-
-
-
-\f
-/* --- MODULE INFORMATION --- */
-
-
-/* Associating user data with loaded modules. */
-typedef void * lt_dlinterface_id;
-typedef int lt_dlhandle_interface (lt_dlhandle handle, const char *id_string);
-
-LT_SCOPE lt_dlinterface_id lt_dlinterface_register (const char *id_string,
- lt_dlhandle_interface *iface);
-LT_SCOPE void lt_dlinterface_free (lt_dlinterface_id key);
-LT_SCOPE void * lt_dlcaller_set_data (lt_dlinterface_id key,
- lt_dlhandle handle, void *data);
-LT_SCOPE void * lt_dlcaller_get_data (lt_dlinterface_id key,
- lt_dlhandle handle);
-
-
-/* Read only information pertaining to a loaded module. */
-typedef struct {
- char * filename; /* file name */
- char * name; /* module name */
- int ref_count; /* number of times lt_dlopened minus
- number of times lt_dlclosed. */
- unsigned int is_resident:1; /* module can't be unloaded. */
- unsigned int is_symglobal:1; /* module symbols can satisfy
- subsequently loaded modules. */
- unsigned int is_symlocal:1; /* module symbols are only available
- locally. */
-} lt_dlinfo;
-
-LT_SCOPE const lt_dlinfo *lt_dlgetinfo (lt_dlhandle handle);
-
-LT_SCOPE lt_dlhandle lt_dlhandle_iterate (lt_dlinterface_id iface,
- lt_dlhandle place);
-LT_SCOPE lt_dlhandle lt_dlhandle_fetch (lt_dlinterface_id iface,
- const char *module_name);
-LT_SCOPE int lt_dlhandle_map (lt_dlinterface_id iface,
- int (*func) (lt_dlhandle handle, void *data),
- void *data);
-
-
-
-/* Deprecated module residency management API. */
-LT_SCOPE int lt_dlmakeresident (lt_dlhandle handle);
-LT_SCOPE int lt_dlisresident (lt_dlhandle handle);
-
-#define lt_ptr void *
-
-LT_END_C_DECLS
-
-#endif /*!defined(LTDL_H)*/
+++ /dev/null
-/* slist.c -- generalised singly linked lists
-
- Copyright (C) 2000, 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
- Written by Gary V. Vaughan, 2000
-
- NOTE: The canonical source of this file is maintained with the
- GNU Libtool package. Report bugs to bug-libtool@gnu.org.
-
-GNU Libltdl is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU Libtool, you may include this file under the
-same distribution terms that you use for the rest of that program.
-
-GNU Libltdl is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with GNU Libltdl; see the file COPYING.LIB. If not, a
-copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#include <assert.h>
-
-#include "slist.h"
-#include <stddef.h>
-#include <stdlib.h>
-
-static SList * slist_sort_merge (SList *left, SList *right,
- SListCompare *compare, void *userdata);
-
-
-/* Call DELETE repeatedly on each element of HEAD.
-
- CAVEAT: If you call this when HEAD is the start of a list of boxed
- items, you must remember that each item passed back to your
- DELETE function will be a boxed item that must be slist_unbox()ed
- before operating on its contents.
-
- e.g. void boxed_delete (void *item) { item_free (slist_unbox (item)); }
- ...
- slist = slist_delete (slist, boxed_delete);
- ...
-*/
-SList *
-slist_delete (SList *head, void (*delete_fct) (void *item))
-{
- assert (delete_fct);
-
- while (head)
- {
- SList *next = head->next;
- (*delete_fct) (head);
- head = next;
- }
-
- return 0;
-}
-
-/* Call FIND repeatedly with MATCHDATA and each item of *PHEAD, until
- FIND returns non-NULL, or the list is exhausted. If a match is found
- the matching item is destructively removed from *PHEAD, and the value
- returned by the matching call to FIND is returned.
-
- CAVEAT: To avoid memory leaks, unless you already have the address of
- the stale item, you should probably return that from FIND if
- it makes a successful match. Don't forget to slist_unbox()
- every item in a boxed list before operating on its contents. */
-SList *
-slist_remove (SList **phead, SListCallback *find, void *matchdata)
-{
- SList *stale = 0;
- void *result = 0;
-
- assert (find);
-
- if (!phead || !*phead)
- return 0;
-
- /* Does the head of the passed list match? */
- result = (*find) (*phead, matchdata);
- if (result)
- {
- stale = *phead;
- *phead = stale->next;
- }
- /* what about the rest of the elements? */
- else
- {
- SList *head;
- for (head = *phead; head->next; head = head->next)
- {
- result = (*find) (head->next, matchdata);
- if (result)
- {
- stale = head->next;
- head->next = stale->next;
- break;
- }
- }
- }
-
- return (SList *) result;
-}
-
-/* Call FIND repeatedly with each element of SLIST and MATCHDATA, until
- FIND returns non-NULL, or the list is exhausted. If a match is found
- the value returned by the matching call to FIND is returned. */
-void *
-slist_find (SList *slist, SListCallback *find, void *matchdata)
-{
- void *result = 0;
-
- assert (find);
-
- for (; slist; slist = slist->next)
- {
- result = (*find) (slist, matchdata);
- if (result)
- break;
- }
-
- return result;
-}
-
-/* Return a single list, composed by destructively concatenating the
- items in HEAD and TAIL. The values of HEAD and TAIL are undefined
- after calling this function.
-
- CAVEAT: Don't mix boxed and unboxed items in a single list.
-
- e.g. slist1 = slist_concat (slist1, slist2); */
-SList *
-slist_concat (SList *head, SList *tail)
-{
- SList *last;
-
- if (!head)
- {
- return tail;
- }
-
- last = head;
- while (last->next)
- last = last->next;
-
- last->next = tail;
-
- return head;
-}
-
-/* Return a single list, composed by destructively appending all of
- the items in SLIST to ITEM. The values of ITEM and SLIST are undefined
- after calling this function.
-
- CAVEAT: Don't mix boxed and unboxed items in a single list.
-
- e.g. slist1 = slist_cons (slist_box (data), slist1); */
-SList *
-slist_cons (SList *item, SList *slist)
-{
- if (!item)
- {
- return slist;
- }
-
- assert (!item->next);
-
- item->next = slist;
- return item;
-}
-
-/* Return a list starting at the second item of SLIST. */
-SList *
-slist_tail (SList *slist)
-{
- return slist ? slist->next : NULL;
-}
-
-/* Return a list starting at the Nth item of SLIST. If SLIST is less
- than N items long, NULL is returned. Just to be confusing, list items
- are counted from 1, to get the 2nd element of slist:
-
- e.g. shared_list = slist_nth (slist, 2); */
-SList *
-slist_nth (SList *slist, size_t n)
-{
- for (;n > 1 && slist; n--)
- slist = slist->next;
-
- return slist;
-}
-
-/* Return the number of items in SLIST. We start counting from 1, so
- the length of a list with no items is 0, and so on. */
-size_t
-slist_length (SList *slist)
-{
- size_t n;
-
- for (n = 0; slist; ++n)
- slist = slist->next;
-
- return n;
-}
-
-/* Destructively reverse the order of items in SLIST. The value of SLIST
- is undefined after calling this function.
-
- CAVEAT: You must store the result of this function, or you might not
- be able to get all the items except the first one back again.
-
- e.g. slist = slist_reverse (slist); */
-SList *
-slist_reverse (SList *slist)
-{
- SList *result = 0;
- SList *next;
-
- while (slist)
- {
- next = slist->next;
- slist->next = result;
- result = slist;
- slist = next;
- }
-
- return result;
-}
-
-/* Call FOREACH once for each item in SLIST, passing both the item and
- USERDATA on each call. */
-void *
-slist_foreach (SList *slist, SListCallback *foreach, void *userdata)
-{
- void *result = 0;
-
- assert (foreach);
-
- while (slist)
- {
- SList *next = slist->next;
- result = (*foreach) (slist, userdata);
-
- if (result)
- break;
-
- slist = next;
- }
-
- return result;
-}
-
-/* Destructively merge the items of two ordered lists LEFT and RIGHT,
- returning a single sorted list containing the items of both -- Part of
- the quicksort algorithm. The values of LEFT and RIGHT are undefined
- after calling this function.
-
- At each iteration, add another item to the merged list by taking the
- lowest valued item from the head of either LEFT or RIGHT, determined
- by passing those items and USERDATA to COMPARE. COMPARE should return
- less than 0 if the head of LEFT has the lower value, greater than 0 if
- the head of RIGHT has the lower value, otherwise 0. */
-static SList *
-slist_sort_merge (SList *left, SList *right, SListCompare *compare,
- void *userdata)
-{
- SList merged, *insert;
-
- insert = &merged;
-
- while (left && right)
- {
- if ((*compare) (left, right, userdata) <= 0)
- {
- insert = insert->next = left;
- left = left->next;
- }
- else
- {
- insert = insert->next = right;
- right = right->next;
- }
- }
-
- insert->next = left ? left : right;
-
- return merged.next;
-}
-
-/* Perform a destructive quicksort on the items in SLIST, by repeatedly
- calling COMPARE with a pair of items from SLIST along with USERDATA
- at every iteration. COMPARE is a function as defined above for
- slist_sort_merge(). The value of SLIST is undefined after calling
- this function.
-
- e.g. slist = slist_sort (slist, compare, 0); */
-SList *
-slist_sort (SList *slist, SListCompare *compare, void *userdata)
-{
- SList *left, *right;
-
- if (!slist)
- return slist;
-
- /* Be sure that LEFT and RIGHT never contain the same item. */
- left = slist;
- right = slist->next;
-
- if (!right)
- return left;
-
- /* Skip two items with RIGHT and one with SLIST, until RIGHT falls off
- the end. SLIST must be about half way along. */
- while (right && (right = right->next))
- {
- if (!right || !(right = right->next))
- break;
- slist = slist->next;
- }
- right = slist->next;
- slist->next = 0;
-
- /* Sort LEFT and RIGHT, then merge the two. */
- return slist_sort_merge (slist_sort (left, compare, userdata),
- slist_sort (right, compare, userdata),
- compare, userdata);
-}
-
-
-/* Aside from using the functions above to manage chained structures of
- any type that has a NEXT pointer as its first field, SLISTs can
- be comprised of boxed items. The boxes are chained together in
- that case, so there is no need for a NEXT field in the item proper.
- Some care must be taken to slist_box and slist_unbox each item in
- a boxed list at the appropriate points to avoid leaking the memory
- used for the boxes. It us usually a very bad idea to mix boxed and
- non-boxed items in a single list. */
-
-/* Return a `boxed' freshly mallocated 1 element list containing
- USERDATA. */
-SList *
-slist_box (const void *userdata)
-{
- SList *item = (SList *) malloc (sizeof *item);
-
- if (item)
- {
- item->next = 0;
- item->userdata = userdata;
- }
-
- return item;
-}
-
-/* Return the contents of a `boxed' ITEM, recycling the box itself. */
-void *
-slist_unbox (SList *item)
-{
- void *userdata = 0;
-
- if (item)
- {
- /* Strip the const, because responsibility for this memory
- passes to the caller on return. */
- userdata = (void *) item->userdata;
- free (item);
- }
-
- return userdata;
-}