Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 252716
Collapse All | Expand All

(-)hercules-3.06.orig/bootstrap.c (-1 / +1 lines)
Lines 23-29 Link Here
23
#include "hstdinc.h"
23
#include "hstdinc.h"
24
#include "hercules.h"
24
#include "hercules.h"
25
#if defined(HDL_USE_LIBTOOL)
25
#if defined(HDL_USE_LIBTOOL)
26
#include "ltdl.h"
26
#include <ltdl.h>
27
#endif
27
#endif
28
28
29
///////////////////////////////////////////////////////////////////////////////
29
///////////////////////////////////////////////////////////////////////////////
(-)hercules-3.06.orig/configure.ac (-148 / +2 lines)
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)
(-)hercules-3.06.orig/crypto/Makefile.am (-3 / +1 lines)
Lines 26-32 Link Here
26
26
27
if OPTION_DYNAMIC_LOAD
27
if OPTION_DYNAMIC_LOAD
28
  DYNSRC         =
28
  DYNSRC         =
29
  LTDL           = ../ltdl.c
30
29
31
  DYNMOD_LD_FLAGS = -module         \
30
  DYNMOD_LD_FLAGS = -module         \
32
                   -no-undefined   \
31
                   -no-undefined   \
Lines 34-40 Link Here
34
                   -export-dynamic \
33
                   -export-dynamic \
35
                   -avoid-version
34
                   -avoid-version
36
35
37
  DYNMOD_LD_ADD   = $(LDADD)
36
  DYNMOD_LD_ADD   = $(LDADD) -lltdl
38
37
39
  LIB_LD_FLAGS    = -export-dynamic  \
38
  LIB_LD_FLAGS    = -export-dynamic  \
40
                   $(XSTATIC)       \
39
                   $(XSTATIC)       \
Lines 42-48 Link Here
42
                   -avoid-version
41
                   -avoid-version
43
else
42
else
44
  DYNSRC         = $(dyndev_SRC)
43
  DYNSRC         = $(dyndev_SRC)
45
  LTDL           =
46
  DYNMOD_LD_FLAGS =
44
  DYNMOD_LD_FLAGS =
47
  DYNMOD_LD_ADD =
45
  DYNMOD_LD_ADD =
48
  LIB_LD_FLAGS    = $(XSTATIC)    \
46
  LIB_LD_FLAGS    = $(XSTATIC)    \
(-)hercules-3.06.orig/decNumber/Makefile.am (-3 / +3 lines)
Lines 40-52 Link Here
40
endif
40
endif
41
41
42
if OPTION_DYNAMIC_LOAD
42
if OPTION_DYNAMIC_LOAD
43
  LTDL  	 = ../ltdl.c
43
  LIB_LD_ADD      = -lltdl
44
  LIB_LD_FLAGS    = -export-dynamic  \
44
  LIB_LD_FLAGS    = -export-dynamic  \
45
		   $(XSTATIC)       \
45
		   $(XSTATIC)       \
46
		   -no-undefined    \
46
		   -no-undefined    \
47
		   -avoid-version
47
		   -avoid-version
48
else
48
else
49
  LTDL  	 =
49
  LIB_LD_ADD      =
50
  LIB_LD_FLAGS    = $(XSTATIC)    \
50
  LIB_LD_FLAGS    = $(XSTATIC)    \
51
		   -no-undefined \
51
		   -no-undefined \
52
		   -avoid-version
52
		   -avoid-version
Lines 59-65 Link Here
59
59
60
  libdecNumber_la_SOURCES = $(decNumber_SRC)
60
  libdecNumber_la_SOURCES = $(decNumber_SRC)
61
  libdecNumber_la_LDFLAGS = $(LIB_LD_FLAGS)
61
  libdecNumber_la_LDFLAGS = $(LIB_LD_FLAGS)
62
  libdecNumber_la_LIBADD  = $(LDADD)
62
  libdecNumber_la_LIBADD  = $(LDADD) $(LIB_LD_ADD)
63
63
64
noinst_HEADERS = decContext.h      \
64
noinst_HEADERS = decContext.h      \
65
		 decDPD.h          \
65
		 decDPD.h          \
(-)hercules-3.06.orig/herclin.c (-1 / +1 lines)
Lines 33-39 Link Here
33
/* This must be included if HDL uses the   */
33
/* This must be included if HDL uses the   */
34
/* libtool ltdl convenience library        */
34
/* libtool ltdl convenience library        */
35
35
36
#include "ltdl.h"
36
#include <ltdl.h>
37
#endif
37
#endif
38
38
39
39
(-)hercules-3.06.orig/Makefile.am (-10 / +7 lines)
Lines 171-177 Link Here
171
171
172
if OPTION_DYNAMIC_LOAD
172
if OPTION_DYNAMIC_LOAD
173
  DYNSRC         =
173
  DYNSRC         =
174
  LTDL           = ltdl.c
175
174
176
  DYNMOD_LD_FLAGS = -module         \
175
  DYNMOD_LD_FLAGS = -module         \
177
                   -no-undefined    \
176
                   -no-undefined    \
Lines 182-188 Link Here
182
  DYNMOD_LD_ADD   = libherc.la    \
181
  DYNMOD_LD_ADD   = libherc.la    \
183
                   libhercs.la    \
182
                   libhercs.la    \
184
                   libhercu.la    \
183
                   libhercu.la    \
185
                   $(LDADD)
184
                   $(LDADD)       \
185
		   -lltdl
186
186
187
  LIB_LD_FLAGS    = -export-dynamic  \
187
  LIB_LD_FLAGS    = -export-dynamic  \
188
                   $(XSTATIC)        \
188
                   $(XSTATIC)        \
Lines 190-196 Link Here
190
                   -avoid-version
190
                   -avoid-version
191
else
191
else
192
  DYNSRC         = $(dyndev_SRC)
192
  DYNSRC         = $(dyndev_SRC)
193
  LTDL           =
194
  DYNMOD_LD_FLAGS =
193
  DYNMOD_LD_FLAGS =
195
  DYNMOD_LD_ADD =
194
  DYNMOD_LD_ADD =
196
  LIB_LD_FLAGS    = $(XSTATIC)    \
195
  LIB_LD_FLAGS    = $(XSTATIC)    \
Lines 364-375 Link Here
364
                        parser.c     \
363
                        parser.c     \
365
                        pttrace.c    \
364
                        pttrace.c    \
366
                        $(FTHREADS)  \
365
                        $(FTHREADS)  \
367
                        $(FISHHANG)  \
366
                        $(FISHHANG)
368
                        $(LTDL)
369
367
370
  libhercu_la_LDFLAGS = $(LIB_LD_FLAGS)
368
  libhercu_la_LDFLAGS = $(LIB_LD_FLAGS)
371
369
372
  libhercu_la_LIBADD  = $(LDADD) libhercs.la
370
  libhercu_la_LIBADD  = $(LDADD) libhercs.la $(DYNMOD_LD_ADD)
373
371
374
#
372
#
375
# Core Hercules (shared) library
373
# Core Hercules (shared) library
Lines 440-447 Link Here
440
                             memrchr.c        \
438
                             memrchr.c        \
441
                             $(dynamic_SRC)   \
439
                             $(dynamic_SRC)   \
442
                             $(extra_SRC)     \
440
                             $(extra_SRC)     \
443
                             $(dyndev_SRC)    \
441
                             $(dyndev_SRC)
444
                             ltdl.c
445
442
446
  libherc_la_LDFLAGS = $(LIB_LD_FLAGS)
443
  libherc_la_LDFLAGS = $(LIB_LD_FLAGS)
447
444
Lines 450-456 Link Here
450
                      libherct.la     \
447
                      libherct.la     \
451
                      libhercd.la     \
448
                      libhercd.la     \
452
                      decNumber/libdecNumber.la \
449
                      decNumber/libdecNumber.la \
453
                      $(LDADD)
450
                      $(LDADD)        \
451
		      $(DYNMOD_LD_ADD)
454
452
455
#
453
#
456
# THIS is the hercules executable.
454
# THIS is the hercules executable.
Lines 728-734 Link Here
728
                 hdl.h          \
726
                 hdl.h          \
729
                 crypto.h       \
727
                 crypto.h       \
730
                 sockdev.h      \
728
                 sockdev.h      \
731
                 ltdl.h         \
732
                 herc_getopt.h  \
729
                 herc_getopt.h  \
733
                 service.h      \
730
                 service.h      \
734
                 chsc.h         \
731
                 chsc.h         \

Return to bug 252716