Lines 115-268
Link Here
|
115 |
modexecdir=${libdir}/${PACKAGE} |
115 |
modexecdir=${libdir}/${PACKAGE} |
116 |
AC_SUBST(modexecdir) |
116 |
AC_SUBST(modexecdir) |
117 |
|
117 |
|
118 |
|
118 |
LT_PREREQ([2.2.6]) |
119 |
# ----------------------------------------------------------------------------- |
119 |
LT_INIT([dlopen win32-dll disable-static]) |
120 |
# |
|
|
121 |
# AC_LIBTOOL_DLOPEN |
122 |
# |
123 |
# Enable checking for dlopen support. This macro should be used if the |
124 |
# package makes use of the '-dlopen' and '-dlpreopen' flags, otherwise |
125 |
# libtool will assume that the system does not support dlopening. The |
126 |
# macro must be called before AC_PROG_LIBTOOL. |
127 |
# |
128 |
# ----------------------------------------------------------------------------- |
129 |
|
130 |
AC_LIBTOOL_DLOPEN() # (we need libtool's dlopen support) |
131 |
|
132 |
|
133 |
# ----------------------------------------------------------------------------- |
134 |
# |
135 |
# AC_LIBTOOL_WIN32_DLL |
136 |
# |
137 |
# This macro should be used if the package has been ported to build |
138 |
# clean dlls on win32 platforms. Usually this means that any library |
139 |
# data items are exported with __declspec(dllexport) and imported with |
140 |
# __declspec(dllimport). If this macro is not used, libtool will assume |
141 |
# that the package libraries are not dll clean and will build only static |
142 |
# libraries on win32 hosts. |
143 |
# |
144 |
# This macro must be called before AC_PROG_LIBTOOL, and provision must |
145 |
# be made to pass '-no-undefined' to libtool in link mode from the package |
146 |
# Makefile. Naturally, if you pass '-no-undefined', you must ensure that |
147 |
# all the library symbols really are defined at link time! |
148 |
# |
149 |
# ----------------------------------------------------------------------------- |
150 |
|
151 |
AC_LIBTOOL_WIN32_DLL() # (we need Win32 support in libtool) |
152 |
|
153 |
|
154 |
# ----------------------------------------------------------------------------- |
155 |
# See: 'AC_PROG_LIBTOOL' below. |
156 |
# ----------------------------------------------------------------------------- |
157 |
|
158 |
AC_DISABLE_STATIC() # (forces libtool to build shared |
159 |
|
160 |
# libraries instead of static ones) |
161 |
# ----------------------------------------------------------------------------- |
162 |
# AC_PROG_LIBTOOL |
163 |
# |
164 |
# Add support for the '--enable-shared' and '--disable-shared' |
165 |
# configure flags. By default, this macro turns on shared libraries |
166 |
# if they are available, and also enables static libraries if they |
167 |
# don't conflict with the shared libraries. You can modify these |
168 |
# defaults by calling either the AC_DISABLE_SHARED or AC_DISABLE_STATIC |
169 |
# macros. |
170 |
# |
171 |
# Hercules REQUIRES shared libraries (i.e. DLLs), so we do indeed use |
172 |
# the AC_DISABLE_STATIC macro above. |
173 |
# |
174 |
# ----------------------------------------------------------------------------- |
175 |
|
176 |
AC_PROG_LIBTOOL() # (we build libtool for ourselves) |
177 |
|
178 |
|
179 |
# ----------------------------------------------------------------------------- |
180 |
# |
181 |
# AC_LIB_LTDL |
182 |
# |
183 |
# Even though libltdl is installed together with libtool, you may wish |
184 |
# to include libltdl in the distribution of your package, for the convenience |
185 |
# of users of your package that don't have libtool or libltdl installed. |
186 |
# |
187 |
# The most simplistic way to add libltdl to your package is to copy the |
188 |
# source files, 'ltdl.c' and 'ltdl.h', to a source directory withing your |
189 |
# package and to build and link them along with the rest of your sources. |
190 |
# |
191 |
# To do this, you must add a call to the 'AC_LIB_LTDL' macro to your package's |
192 |
# 'configure.in' to perform the required configure time checks in order that |
193 |
# 'ltdl.o' is built correctly. |
194 |
# |
195 |
# This method does have its problems though: if you try to link the package |
196 |
# binaries with an installed libltdl, or a library which depends on libltdl, |
197 |
# you may have problems with duplicate symbol definitions. |
198 |
# |
199 |
# In order to enable this flavor of libltdl, you should add the line |
200 |
# 'AC_LIBLTDL_CONVENIENCE' to your `configure.in', before 'AC_PROG_LIBTOOL'. |
201 |
# |
202 |
# In order to select the installable version of libltdl, you should add a |
203 |
# call of the macro 'AC_LIBLTDL_INSTALLABLE' to your 'configure.in' before |
204 |
# 'AC_PROG_LIBTOOL'. This macro will check whether libltdl is already |
205 |
# installed and, if not, request the libltdl embedded in your package to be |
206 |
# built and installed. |
207 |
# |
208 |
# Whatever macro you use, it is up to you to ensure that your 'configure.in' |
209 |
# will configure libltdl, using 'AC_CONFIG_SUBDIRS', and that your 'Makefile's |
210 |
# will start sub-makes within libltdl's directory, using automake's SUBDIRS, |
211 |
# for example. Both macros define the shell variables LIBLTDL, to the link flag |
212 |
# that you should use to link with libltdl, and LTDLINCL, to the preprocessor |
213 |
# flag that you should use to compile with programs that include 'ltdl.h'. It |
214 |
# is up to you to use 'AC_SUBST' to ensure that this variable will be available |
215 |
# in 'Makefile's, or add them to variables that are 'AC_SUBST'ed by default, |
216 |
# such as LIBS and CPPFLAGS. |
217 |
# |
218 |
# So, when you want to link a program with libltdl, be it a convenience, |
219 |
# installed or installable library, just compile with '$(LTDLINCL)' and link |
220 |
# it with '$(LIBLTDL)', using libtool. |
221 |
# |
222 |
# You should probably also add 'AC_LIBTOOL_DLOPEN' to your 'configure.in' before |
223 |
# 'AC_PROG_LIBTOOL', otherwise libtool will assume no dlopening mechanism is |
224 |
# supported, and revert to dlpreopening, which is probably not what you want. |
225 |
# |
226 |
# The following example shows you how to embed the convenience libltdl |
227 |
# in your package. In order to use the installable variant just replace |
228 |
# 'AC_LIBLTDL_CONVENIENCE' with 'AC_LIBLTDL_INSTALLABLE'. We assume that libltdl |
229 |
# was embedded using 'libtoolize --ltdl': |
230 |
# |
231 |
# configure.in: |
232 |
# |
233 |
# ... |
234 |
# dnl Enable building of the convenience library |
235 |
# dnl and set LIBLTDL accordingly |
236 |
# AC_LIBLTDL_CONVENIENCE |
237 |
# dnl Substitute LTDLINCL and LIBLTDL in the Makefiles |
238 |
# AC_SUBST(LTDLINCL) |
239 |
# AC_SUBST(LIBLTDL) |
240 |
# dnl Check for dlopen support |
241 |
# AC_LIBTOOL_DLOPEN |
242 |
# dnl Configure libtool |
243 |
# AC_PROG_LIBTOOL |
244 |
# dnl Configure libltdl |
245 |
# AC_CONFIG_SUBDIRS(libltdl) |
246 |
# ... |
247 |
# |
248 |
# Makefile.am: |
249 |
# |
250 |
# ... |
251 |
# SUBDIRS = libltdl |
252 |
# |
253 |
# INCLUDES = $(LTDLINCL) |
254 |
# |
255 |
# myprog_LDFLAGS = -export-dynamic |
256 |
# # The quotes around -dlopen below fool automake <= 1.4 into accepting it |
257 |
# myprog_LDADD = $(LIBLTDL) "-dlopen" self "-dlopen" foo1.la |
258 |
# myprog_DEPENDENCIES = $(LIBLTDL) foo1.la |
259 |
# ... |
260 |
# |
261 |
# ----------------------------------------------------------------------------- |
262 |
|
263 |
AC_LIB_LTDL() # (we need the ltdl libtool library) |
264 |
AC_SUBST([LIBTOOL_DEPS]) # (see PROGRAMMING NOTE above) |
265 |
|
266 |
|
120 |
|
267 |
# ----------------------------------------------------------------------------- |
121 |
# ----------------------------------------------------------------------------- |
268 |
# (See comments in the 'AC_CHECK_LIB' Libraries section further below) |
122 |
# (See comments in the 'AC_CHECK_LIB' Libraries section further below) |