• Home
  • History
  • Annotate
  • only in this directory
NameDateSize

..21-Aug-201432

APPLE_LICENSEH A D27-Feb-200219.5 KiB

ChangeLogH A D27-Feb-2002691

dlfcn.hH A D02-Dec-20131.8 KiB

dlopen.cH A D02-Dec-201313.9 KiB

MakefileH A D02-Dec-20131.7 KiB

READMEH A D27-Feb-20022.5 KiB

README

1 dlcompat for Darwin
2=====================
3
4This is release 20010505 of dlcompat. dlcompat is a small library that
5emulates the dlopen() interface on top of Darwin's dyld API. It is
6based on a CVS snapshot of Apple's Darwin CVS repository, taken on
7Jan 16 2001 (and still current as of May 5 2001). Since it's based on
8Apple code, it is released under the terms of the Apple Public Source
9License; see the file APPLE_LICENSE for the text of the license.
10
11Changes were made to automatically search for the module in several
12directories (taken from the environment variables DYLD_LIBRARY_PATH
13and LD_LIBRARY_PATH, plus /usr/lib and /lib) when no absolute path is
14specified and the module is not found in the current directory. If you
15prefer to run unmodified Apple code, download release 20010116.
16
17
18 Installation
19--------------
20As root, type:
21
22  make install
23
24This will compile the source file, generate both a static and shared
25library called libdl and install it into /usr/local/lib. The header
26file dlfcn.h will be installed in /usr/local/include.
27
28If you want to place the files somewhere else, run
29
30  make clean
31  make install prefix=<prefix>
32
33where <prefix> is the hierarchy you want to install into, e.g. /usr
34for /usr/lib and /usr/include (_NOT_ recommended!).
35
36To enable debugging output, run
37
38  make clean
39  make DEBUG=1
40  make install
41
42Combinations of those commands are left as an excercise to the
43reader. :-)
44
45
46 Usage
47-------
48Software that uses GNU autoconf will likely check for a library called
49libdl, that's why I named it that way. For software that doesn't find
50the library on its own, you must add a '-ldl' to the appropriate
51Makefile (or environment) variable, usually LIBS.
52
53If you installed dlcompat into a directory other than /usr/local/lib,
54you must tell the compiler where to find it. Add '-L<prefix>/lib' to
55LDFLAGS (or CFLAGS) and '-I<prefix>/include' to CPPFLAGS (or CFLAGS).
56
57
58 Genesis
59---------
60The files dlfcn.h and dlopen.c are taken from the Darwin CVS,
61directory Commands/Apple/cctools/libdyld. For release 20010116, I
62removed an unneccessary include statement from dlopen.c and added the
63Makefile. For release 20010123, I added debugging output and library
64searching. The changes are clearly documented, as required by the
65Apple Public Source License. For release 20010505, I added wrappers to
66disable C++ name mangling. That allows the library to be used by C++
67code, but be aware that there are issues with C++ and bundles, like
68static initializers not being called.
69
70
71Christoph Pfisterer <cp@chrisp.de>
72