Lines 35-41
Link Here
|
35 |
AM_CPPFLAGS = -DBINDIR='"$(bindir)"' |
35 |
AM_CPPFLAGS = -DBINDIR='"$(bindir)"' |
36 |
if PLUGINS |
36 |
if PLUGINS |
37 |
bfdinclude_HEADERS += $(INCDIR)/plugin-api.h |
37 |
bfdinclude_HEADERS += $(INCDIR)/plugin-api.h |
38 |
LIBDL = -ldl |
38 |
LIBDL = @lt_cv_dlopen_libs@ |
39 |
endif |
39 |
endif |
40 |
|
40 |
|
41 |
# bfd.h goes here, for now |
41 |
# bfd.h goes here, for now |
Lines 1100-1105
Link Here
|
1100 |
supports_plugins=0 |
1100 |
supports_plugins=0 |
1101 |
fi |
1101 |
fi |
1102 |
AC_SUBST(supports_plugins) |
1102 |
AC_SUBST(supports_plugins) |
|
|
1103 |
AC_SUBST(lt_cv_dlopen_libs) |
1103 |
|
1104 |
|
1104 |
# Determine the host dependant file_ptr a.k.a. off_t type. In order |
1105 |
# Determine the host dependant file_ptr a.k.a. off_t type. In order |
1105 |
# prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and |
1106 |
# prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and |
Lines 293-298
Link Here
|
293 |
libexecdir = @libexecdir@ |
293 |
libexecdir = @libexecdir@ |
294 |
localedir = @localedir@ |
294 |
localedir = @localedir@ |
295 |
localstatedir = @localstatedir@ |
295 |
localstatedir = @localstatedir@ |
|
|
296 |
lt_cv_dlopen_libs = @lt_cv_dlopen_libs@ |
296 |
mandir = @mandir@ |
297 |
mandir = @mandir@ |
297 |
mkdir_p = @mkdir_p@ |
298 |
mkdir_p = @mkdir_p@ |
298 |
oldincludedir = @oldincludedir@ |
299 |
oldincludedir = @oldincludedir@ |
Lines 336-342
Link Here
|
336 |
@INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libbfd.la |
337 |
@INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libbfd.la |
337 |
AM_CFLAGS = $(WARN_CFLAGS) |
338 |
AM_CFLAGS = $(WARN_CFLAGS) |
338 |
AM_CPPFLAGS = -DBINDIR='"$(bindir)"' |
339 |
AM_CPPFLAGS = -DBINDIR='"$(bindir)"' |
339 |
@PLUGINS_TRUE@LIBDL = -ldl |
340 |
@PLUGINS_TRUE@LIBDL = @lt_cv_dlopen_libs@ |
340 |
|
341 |
|
341 |
# bfd.h goes here, for now |
342 |
# bfd.h goes here, for now |
342 |
BFD_H = bfd.h |
343 |
BFD_H = bfd.h |
Lines 606-611
Link Here
|
606 |
tdefaults |
606 |
tdefaults |
607 |
bfd_ufile_ptr |
607 |
bfd_ufile_ptr |
608 |
bfd_file_ptr |
608 |
bfd_file_ptr |
|
|
609 |
lt_cv_dlopen_libs |
609 |
supports_plugins |
610 |
supports_plugins |
610 |
bfd_default_target_size |
611 |
bfd_default_target_size |
611 |
bfd_machines |
612 |
bfd_machines |
Lines 15633-15638
Link Here
|
15633 |
fi |
15634 |
fi |
15634 |
|
15635 |
|
15635 |
|
15636 |
|
|
|
15637 |
|
15636 |
# Determine the host dependant file_ptr a.k.a. off_t type. In order |
15638 |
# Determine the host dependant file_ptr a.k.a. off_t type. In order |
15637 |
# prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and |
15639 |
# prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and |
15638 |
# fseeko, long. This assumes that sizeof off_t is .ge. sizeof long. |
15640 |
# fseeko, long. This assumes that sizeof off_t is .ge. sizeof long. |
Lines 37-43
Link Here
|
37 |
LIBIBERTY = ../libiberty/libiberty.a |
38 |
LIBIBERTY = ../libiberty/libiberty.a |
38 |
|
39 |
|
39 |
if PLUGINS |
40 |
if PLUGINS |
40 |
LIBDL = -ldl |
41 |
LIBDL = @DLOPEN_LIBS@ |
41 |
endif |
42 |
endif |
42 |
|
43 |
|
43 |
if THREADS |
44 |
if THREADS |
Lines 505-510
Link Here
|
505 |
AC_CHECK_HEADERS(tr1/unordered_set tr1/unordered_map) |
506 |
AC_CHECK_HEADERS(tr1/unordered_set tr1/unordered_map) |
506 |
AC_CHECK_HEADERS(ext/hash_map ext/hash_set) |
507 |
AC_CHECK_HEADERS(ext/hash_map ext/hash_set) |
507 |
AC_CHECK_HEADERS(byteswap.h) |
508 |
AC_CHECK_HEADERS(byteswap.h) |
|
|
509 |
|
510 |
dnl When plugins enabled dynamic loader interface is required. Check headers |
511 |
dnl which may provide this interface. In case of dlfcn.h add libdl to link. |
512 |
AC_CHECK_HEADERS(windows.h) |
513 |
AC_CHECK_HEADERS(dlfcn.h, [DLOPEN_LIBS="-ldl"], [DLOPEN_LIBS=""]) |
514 |
AC_SUBST(DLOPEN_LIBS) |
515 |
|
508 |
AC_CHECK_FUNCS(mallinfo posix_fallocate fallocate readv sysconf times) |
516 |
AC_CHECK_FUNCS(mallinfo posix_fallocate fallocate readv sysconf times) |
509 |
AC_CHECK_DECLS([basename, ffs, asprintf, vasprintf, snprintf, vsnprintf, strverscmp, strndup, memmem]) |
517 |
AC_CHECK_DECLS([basename, ffs, asprintf, vasprintf, snprintf, vsnprintf, strverscmp, strndup, memmem]) |
510 |
|
518 |
|
Lines 29-37
Link Here
|
29 |
#include <vector> |
29 |
#include <vector> |
30 |
|
30 |
|
31 |
#ifdef ENABLE_PLUGINS |
31 |
#ifdef ENABLE_PLUGINS |
|
|
32 |
#ifdef HAVE_DLFCN_H |
32 |
#include <dlfcn.h> |
33 |
#include <dlfcn.h> |
|
|
34 |
#elif defined (HAVE_WINDOWS_H) |
35 |
#include <windows.h> |
36 |
#else |
37 |
#error Unknown how to handle dynamic-load-libraries. |
33 |
#endif |
38 |
#endif |
34 |
|
39 |
|
|
|
40 |
#if !defined (HAVE_DLFCN_H) && defined (HAVE_WINDOWS_H) |
41 |
|
42 |
#define RTLD_NOW 0 /* Dummy value. */ |
43 |
static void * |
44 |
dlopen(const char *file, int mode ATTRIBUTE_UNUSED) |
45 |
{ |
46 |
return LoadLibrary(file); |
47 |
} |
48 |
|
49 |
static void * |
50 |
dlsym(void *handle, const char *name) |
51 |
{ |
52 |
return reinterpret_cast<void *>( |
53 |
GetProcAddress(static_cast<HMODULE>(handle),name)); |
54 |
} |
55 |
|
56 |
static const char * |
57 |
dlerror(void) |
58 |
{ |
59 |
return "unable to load dll"; |
60 |
} |
61 |
|
62 |
#endif /* !defined (HAVE_DLFCN_H) && defined (HAVE_WINDOWS_H) */ |
63 |
#endif /* ENABLE_PLUGINS */ |
64 |
|
35 |
#include "parameters.h" |
65 |
#include "parameters.h" |
36 |
#include "errors.h" |
66 |
#include "errors.h" |
37 |
#include "fileread.h" |
67 |
#include "fileread.h" |
Lines 272-277
Link Here
|
272 |
DATADIRNAME = @DATADIRNAME@ |
273 |
DATADIRNAME = @DATADIRNAME@ |
273 |
DEFS = @DEFS@ |
274 |
DEFS = @DEFS@ |
274 |
DEPDIR = @DEPDIR@ |
275 |
DEPDIR = @DEPDIR@ |
|
|
276 |
DLOPEN_LIBS = @DLOPEN_LIBS@ |
275 |
ECHO_C = @ECHO_C@ |
277 |
ECHO_C = @ECHO_C@ |
276 |
ECHO_N = @ECHO_N@ |
278 |
ECHO_N = @ECHO_N@ |
277 |
ECHO_T = @ECHO_T@ |
279 |
ECHO_T = @ECHO_T@ |
Lines 398-404
Link Here
|
398 |
-DTOOLLIBDIR="\"$(tooldir)/lib\"" @INCINTL@ |
400 |
-DTOOLLIBDIR="\"$(tooldir)/lib\"" @INCINTL@ |
399 |
|
401 |
|
400 |
LIBIBERTY = ../libiberty/libiberty.a |
402 |
LIBIBERTY = ../libiberty/libiberty.a |
401 |
@PLUGINS_TRUE@LIBDL = -ldl |
403 |
@PLUGINS_TRUE@LIBDL = @DLOPEN_LIBS@ |
402 |
@THREADS_TRUE@THREADSLIB = -lpthread |
404 |
@THREADS_TRUE@THREADSLIB = -lpthread |
403 |
AM_YFLAGS = -d |
405 |
AM_YFLAGS = -d |
Lines 73-78
Link Here
|
73 |
don't. */ |
73 |
don't. */ |
74 |
#undef HAVE_DECL_VSNPRINTF |
74 |
#undef HAVE_DECL_VSNPRINTF |
75 |
|
75 |
|
|
|
76 |
/* Define to 1 if you have the <dlfcn.h> header file. */ |
77 |
#undef HAVE_DLFCN_H |
78 |
|
76 |
/* Define to 1 if you have the <ext/hash_map> header file. */ |
79 |
/* Define to 1 if you have the <ext/hash_map> header file. */ |
77 |
#undef HAVE_EXT_HASH_MAP |
80 |
#undef HAVE_EXT_HASH_MAP |
78 |
|
81 |
|
Lines 184-189
Link Here
|
184 |
/* Define to 1 if you have the <unistd.h> header file. */ |
187 |
/* Define to 1 if you have the <unistd.h> header file. */ |
185 |
#undef HAVE_UNISTD_H |
188 |
#undef HAVE_UNISTD_H |
186 |
|
189 |
|
|
|
190 |
/* Define to 1 if you have the <windows.h> header file. */ |
191 |
#undef HAVE_WINDOWS_H |
192 |
|
187 |
/* Define to 1 if you have the <zlib.h> header file. */ |
193 |
/* Define to 1 if you have the <zlib.h> header file. */ |
188 |
#undef HAVE_ZLIB_H |
194 |
#undef HAVE_ZLIB_H |
189 |
|
195 |
|
Lines 596-601
Link Here
|
596 |
MAINTAINER_MODE_TRUE |
596 |
MAINTAINER_MODE_TRUE |
597 |
HAVE_PUBNAMES_FALSE |
597 |
HAVE_PUBNAMES_FALSE |
598 |
HAVE_PUBNAMES_TRUE |
598 |
HAVE_PUBNAMES_TRUE |
|
|
599 |
DLOPEN_LIBS |
599 |
CXXCPP |
600 |
CXXCPP |
600 |
HAVE_ZLIB_FALSE |
601 |
HAVE_ZLIB_FALSE |
601 |
HAVE_ZLIB_TRUE |
602 |
HAVE_ZLIB_TRUE |
Lines 7139-7144
Link Here
|
7139 |
|
7140 |
|
7140 |
done |
7141 |
done |
7141 |
|
7142 |
|
|
|
7143 |
|
7144 |
for ac_header in windows.h |
7145 |
do : |
7146 |
ac_fn_cxx_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" |
7147 |
if test "x$ac_cv_header_windows_h" = x""yes; then : |
7148 |
cat >>confdefs.h <<_ACEOF |
7149 |
#define HAVE_WINDOWS_H 1 |
7150 |
_ACEOF |
7151 |
|
7152 |
fi |
7153 |
|
7154 |
done |
7155 |
|
7156 |
for ac_header in dlfcn.h |
7157 |
do : |
7158 |
ac_fn_cxx_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" |
7159 |
if test "x$ac_cv_header_dlfcn_h" = x""yes; then : |
7160 |
cat >>confdefs.h <<_ACEOF |
7161 |
#define HAVE_DLFCN_H 1 |
7162 |
_ACEOF |
7163 |
DLOPEN_LIBS="-ldl" |
7164 |
else |
7165 |
DLOPEN_LIBS="" |
7166 |
fi |
7167 |
|
7168 |
done |
7169 |
|
7170 |
|
7171 |
|
7142 |
for ac_func in mallinfo posix_fallocate fallocate readv sysconf times |
7172 |
for ac_func in mallinfo posix_fallocate fallocate readv sysconf times |
7143 |
do : |
7173 |
do : |
7144 |
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
7174 |
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
Lines 1878-1883
Link Here
|
1878 |
DATADIRNAME = @DATADIRNAME@ |
1878 |
DATADIRNAME = @DATADIRNAME@ |
1879 |
DEFS = @DEFS@ |
1879 |
DEFS = @DEFS@ |
1880 |
DEPDIR = @DEPDIR@ |
1880 |
DEPDIR = @DEPDIR@ |
|
|
1881 |
DLOPEN_LIBS = @DLOPEN_LIBS@ |
1881 |
ECHO_C = @ECHO_C@ |
1882 |
ECHO_C = @ECHO_C@ |
1882 |
ECHO_N = @ECHO_N@ |
1883 |
ECHO_N = @ECHO_N@ |
1883 |
ECHO_T = @ECHO_T@ |
1884 |
ECHO_T = @ECHO_T@ |