20 |
## configuration script generated by Autoconf, you may include it under |
## configuration script generated by Autoconf, you may include it under |
21 |
## the same distribution terms that you use for the rest of that program. |
## the same distribution terms that you use for the rest of that program. |
22 |
|
|
23 |
# serial 3 AC_LIB_LTDL |
# serial 4 AC_LIB_LTDL |
24 |
|
|
25 |
# AC_LIB_LTDL |
# AC_LIB_LTDL |
26 |
# ----------- |
# ----------- |
|
AC_DEFUN([AC_LIB_LTDL], |
|
|
[AC_PREREQ(2.13)dnl |
|
|
AC_REQUIRE([AC_PROG_CC])dnl |
|
|
AC_REQUIRE([AC_C_CONST])dnl |
|
|
|
|
27 |
# Perform all the checks necessary for compilation of the ltdl objects |
# Perform all the checks necessary for compilation of the ltdl objects |
28 |
# -- including compiler checks (above) and header checks (below). |
# -- including compiler checks and header checks. |
29 |
AC_REQUIRE([AC_HEADER_STDC])dnl |
AC_DEFUN([AC_LIB_LTDL], |
30 |
AC_REQUIRE([AC_HEADER_DIRENT])dnl |
[AC_PREREQ(2.50) |
31 |
AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl |
AC_REQUIRE([AC_PROG_CC]) |
32 |
|
AC_REQUIRE([AC_C_CONST]) |
33 |
AC_CHECK_HEADERS(malloc.h memory.h stdlib.h stdio.h ctype.h dl.h sys/dl.h dld.h) |
AC_REQUIRE([AC_HEADER_STDC]) |
34 |
AC_CHECK_HEADERS(string.h strings.h, break) |
AC_REQUIRE([AC_HEADER_DIRENT]) |
35 |
AC_CHECK_FUNCS(strchr index, break) |
AC_REQUIRE([_LT_AC_CHECK_DLFCN]) |
36 |
AC_CHECK_FUNCS(strrchr rindex, break) |
AC_REQUIRE([AC_LTDL_ENABLE_INSTALL]) |
37 |
AC_CHECK_FUNCS(memcpy bcopy, break) |
AC_REQUIRE([AC_LTDL_SHLIBEXT]) |
38 |
AC_CHECK_FUNCS(strcmp) |
AC_REQUIRE([AC_LTDL_SHLIBPATH]) |
39 |
|
AC_REQUIRE([AC_LTDL_SYSSEARCHPATH]) |
40 |
AC_REQUIRE([AC_LTDL_ENABLE_INSTALL])dnl |
AC_REQUIRE([AC_LTDL_OBJDIR]) |
41 |
AC_REQUIRE([AC_LTDL_SHLIBEXT])dnl |
AC_REQUIRE([AC_LTDL_DLPREOPEN]) |
42 |
AC_REQUIRE([AC_LTDL_SHLIBPATH])dnl |
AC_REQUIRE([AC_LTDL_DLLIB]) |
43 |
AC_REQUIRE([AC_LTDL_SYSSEARCHPATH])dnl |
AC_REQUIRE([AC_LTDL_SYMBOL_USCORE]) |
44 |
AC_REQUIRE([AC_LTDL_OBJDIR])dnl |
AC_REQUIRE([AC_LTDL_DLSYM_USCORE]) |
45 |
AC_REQUIRE([AC_LTDL_DLPREOPEN])dnl |
AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS]) |
46 |
AC_REQUIRE([AC_LTDL_DLLIB])dnl |
AC_REQUIRE([AC_LTDL_FUNC_ARGZ]) |
47 |
AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])dnl |
|
48 |
AC_REQUIRE([AC_LTDL_DLSYM_USCORE])dnl |
AC_CHECK_HEADERS([ctype.h errno.h malloc.h memory.h stdlib.h stdio.h]) |
49 |
AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS])dnl |
AC_CHECK_HEADERS([dl.h sys/dl.h dld.h]) |
50 |
|
AC_CHECK_HEADERS([string.h strings.h], [break]) |
51 |
|
|
52 |
|
AC_CHECK_FUNCS([strchr index], [break]) |
53 |
|
AC_CHECK_FUNCS([strrchr rindex], [break]) |
54 |
|
AC_CHECK_FUNCS([memcpy bcopy], [break]) |
55 |
|
AC_CHECK_FUNCS([memmove strcmp]) |
56 |
])# AC_LIB_LTDL |
])# AC_LIB_LTDL |
57 |
|
|
58 |
|
|
59 |
# AC_LTDL_ENABLE_INSTALL |
# AC_LTDL_ENABLE_INSTALL |
60 |
# ---------------------- |
# ---------------------- |
61 |
AC_DEFUN([AC_LTDL_ENABLE_INSTALL], |
AC_DEFUN([AC_LTDL_ENABLE_INSTALL], |
66 |
AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno) |
AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno) |
67 |
])])# AC_LTDL_ENABLE_INSTALL |
])])# AC_LTDL_ENABLE_INSTALL |
68 |
|
|
69 |
|
|
70 |
# AC_LTDL_SYS_DLOPEN_DEPLIBS |
# AC_LTDL_SYS_DLOPEN_DEPLIBS |
71 |
# -------------------------- |
# -------------------------- |
72 |
AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], |
AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], |
73 |
[AC_REQUIRE([AC_CANONICAL_HOST]) |
[AC_REQUIRE([AC_CANONICAL_HOST]) |
74 |
AC_CACHE_CHECK([whether deplibs are loaded by dlopen], |
AC_CACHE_CHECK([whether deplibs are loaded by dlopen], |
75 |
libltdl_cv_sys_dlopen_deplibs, [dnl |
[libltdl_cv_sys_dlopen_deplibs], |
76 |
# PORTME does your system automatically load deplibs for dlopen? |
[# PORTME does your system automatically load deplibs for dlopen? |
77 |
# or its logical equivalent (e.g. shl_load for HP-UX < 11) |
# or its logical equivalent (e.g. shl_load for HP-UX < 11) |
78 |
# For now, we just catch OSes we know something about -- in the |
# For now, we just catch OSes we know something about -- in the |
79 |
# future, we'll try test this programmatically. |
# future, we'll try test this programmatically. |
80 |
libltdl_cv_sys_dlopen_deplibs=unknown |
libltdl_cv_sys_dlopen_deplibs=unknown |
81 |
case "$host_os" in |
case "$host_os" in |
82 |
aix3*|aix4.1.*|aix4.2.*) |
aix3*|aix4.1.*|aix4.2.*) |
83 |
# Unknown whether this is true for these versions of AIX, but |
# Unknown whether this is true for these versions of AIX, but |
84 |
# we want this `case' here to explicitly catch those versions. |
# we want this `case' here to explicitly catch those versions. |
85 |
libltdl_cv_sys_dlopen_deplibs=unknown |
libltdl_cv_sys_dlopen_deplibs=unknown |
86 |
;; |
;; |
87 |
aix[45]*) |
aix[45]*) |
88 |
libltdl_cv_sys_dlopen_deplibs=yes |
libltdl_cv_sys_dlopen_deplibs=yes |
89 |
;; |
;; |
90 |
gnu*) |
gnu*) |
91 |
libltdl_cv_sys_dlopen_deplibs=yes |
libltdl_cv_sys_dlopen_deplibs=yes |
92 |
;; |
;; |
93 |
irix[12345]*|irix6.[01]*) |
irix[12345]*|irix6.[01]*) |
94 |
# Catch all versions of IRIX before 6.2, and indicate that we don't |
# Catch all versions of IRIX before 6.2, and indicate that we don't |
95 |
# know how it worked for any of those versions. |
# know how it worked for any of those versions. |
96 |
libltdl_cv_sys_dlopen_deplibs=unknown |
libltdl_cv_sys_dlopen_deplibs=unknown |
97 |
;; |
;; |
98 |
irix*) |
irix*) |
99 |
# The case above catches anything before 6.2, and it's known that |
# The case above catches anything before 6.2, and it's known that |
100 |
# at 6.2 and later dlopen does load deplibs. |
# at 6.2 and later dlopen does load deplibs. |
101 |
libltdl_cv_sys_dlopen_deplibs=yes |
libltdl_cv_sys_dlopen_deplibs=yes |
102 |
;; |
;; |
103 |
linux*) |
linux*) |
104 |
libltdl_cv_sys_dlopen_deplibs=yes |
libltdl_cv_sys_dlopen_deplibs=yes |
105 |
;; |
;; |
106 |
netbsd*) |
netbsd*) |
107 |
libltdl_cv_sys_dlopen_deplibs=yes |
libltdl_cv_sys_dlopen_deplibs=yes |
108 |
;; |
;; |
109 |
osf[1234]*) |
osf[1234]*) |
110 |
# dlopen did load deplibs (at least at 4.x), but until the 5.x series, |
# dlopen did load deplibs (at least at 4.x), but until the 5.x series, |
111 |
# it did *not* use an RPATH in a shared library to find objects the |
# it did *not* use an RPATH in a shared library to find objects the |
112 |
# library depends on, so we explictly say `no'. |
# library depends on, so we explictly say `no'. |
113 |
libltdl_cv_sys_dlopen_deplibs=no |
libltdl_cv_sys_dlopen_deplibs=no |
114 |
;; |
;; |
115 |
osf5.0|osf5.0a|osf5.1) |
osf5.0|osf5.0a|osf5.1) |
116 |
# dlopen *does* load deplibs and with the right loader patch applied |
# dlopen *does* load deplibs and with the right loader patch applied |
117 |
# it even uses RPATH in a shared library to search for shared objects |
# it even uses RPATH in a shared library to search for shared objects |
118 |
# that the library depends on, but there's no easy way to know if that |
# that the library depends on, but there's no easy way to know if that |
119 |
# patch is installed. Since this is the case, all we can really |
# patch is installed. Since this is the case, all we can really |
120 |
# say is unknown -- it depends on the patch being installed. If |
# say is unknown -- it depends on the patch being installed. If |
121 |
# it is, this changes to `yes'. Without it, it would be `no'. |
# it is, this changes to `yes'. Without it, it would be `no'. |
122 |
libltdl_cv_sys_dlopen_deplibs=unknown |
libltdl_cv_sys_dlopen_deplibs=unknown |
123 |
;; |
;; |
124 |
osf*) |
osf*) |
125 |
# the two cases above should catch all versions of osf <= 5.1. Read |
# the two cases above should catch all versions of osf <= 5.1. Read |
126 |
# the comments above for what we know about them. |
# the comments above for what we know about them. |
127 |
# At > 5.1, deplibs are loaded *and* any RPATH in a shared library |
# At > 5.1, deplibs are loaded *and* any RPATH in a shared library |
128 |
# is used to find them so we can finally say `yes'. |
# is used to find them so we can finally say `yes'. |
129 |
libltdl_cv_sys_dlopen_deplibs=yes |
libltdl_cv_sys_dlopen_deplibs=yes |
130 |
;; |
;; |
131 |
solaris*) |
solaris*) |
132 |
libltdl_cv_sys_dlopen_deplibs=yes |
libltdl_cv_sys_dlopen_deplibs=yes |
133 |
;; |
;; |
134 |
esac |
esac |
135 |
]) |
]) |
136 |
if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then |
if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then |
137 |
AC_DEFINE(LTDL_DLOPEN_DEPLIBS, 1, |
AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1], |
138 |
[Define if the OS needs help to load dependent libraries for dlopen(). ]) |
[Define if the OS needs help to load dependent libraries for dlopen()]) |
139 |
fi |
fi |
140 |
])# AC_LTDL_SYS_DLOPEN_DEPLIBS |
])# AC_LTDL_SYS_DLOPEN_DEPLIBS |
141 |
|
|
142 |
|
|
143 |
# AC_LTDL_SHLIBEXT |
# AC_LTDL_SHLIBEXT |
144 |
# ---------------- |
# ---------------- |
145 |
AC_DEFUN([AC_LTDL_SHLIBEXT], |
AC_DEFUN([AC_LTDL_SHLIBEXT], |
146 |
[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) |
[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) |
147 |
AC_CACHE_CHECK([which extension is used for shared libraries], |
AC_CACHE_CHECK([which extension is used for shared libraries], |
148 |
libltdl_cv_shlibext, |
[libltdl_cv_shlibext], |
149 |
[ac_last= |
[ac_last= |
150 |
for ac_spec in $library_names_spec; do |
for ac_spec in $library_names_spec; do |
151 |
ac_last="$ac_spec" |
ac_last="$ac_spec" |
152 |
done |
done |
153 |
echo "$ac_last" | [sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//'] > conftest |
echo "$ac_last" | [sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//'] > conftest |
154 |
libltdl_cv_shlibext=`cat conftest` |
libltdl_cv_shlibext=`cat conftest` |
155 |
rm -f conftest |
rm -f conftest |
156 |
]) |
]) |
157 |
if test -n "$libltdl_cv_shlibext"; then |
if test -n "$libltdl_cv_shlibext"; then |
158 |
AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext", |
AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext", |
159 |
[Define to the extension used for shared libraries, say, ".so". ]) |
[Define to the extension used for shared libraries, say, ".so". ]) |
160 |
fi |
fi |
161 |
])# AC_LTDL_SHLIBEXT |
])# AC_LTDL_SHLIBEXT |
162 |
|
|
163 |
|
|
164 |
# AC_LTDL_SHLIBPATH |
# AC_LTDL_SHLIBPATH |
165 |
# ----------------- |
# ----------------- |
166 |
AC_DEFUN([AC_LTDL_SHLIBPATH], |
AC_DEFUN([AC_LTDL_SHLIBPATH], |
167 |
[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) |
[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) |
168 |
AC_CACHE_CHECK([which variable specifies run-time library path], |
AC_CACHE_CHECK([which variable specifies run-time library path], |
169 |
libltdl_cv_shlibpath_var, [libltdl_cv_shlibpath_var="$shlibpath_var"]) |
[libltdl_cv_shlibpath_var], [libltdl_cv_shlibpath_var="$shlibpath_var"]) |
170 |
if test -n "$libltdl_cv_shlibpath_var"; then |
if test -n "$libltdl_cv_shlibpath_var"; then |
171 |
AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var", |
AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var", |
172 |
[Define to the name of the environment variable that determines the dynamic library search path. ]) |
[Define to the name of the environment variable that determines the dynamic library search path. ]) |
173 |
fi |
fi |
174 |
])# AC_LTDL_SHLIBPATH |
])# AC_LTDL_SHLIBPATH |
175 |
|
|
176 |
|
|
177 |
# AC_LTDL_SYSSEARCHPATH |
# AC_LTDL_SYSSEARCHPATH |
178 |
# --------------------- |
# --------------------- |
179 |
AC_DEFUN([AC_LTDL_SYSSEARCHPATH], |
AC_DEFUN([AC_LTDL_SYSSEARCHPATH], |
180 |
[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) |
[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) |
181 |
AC_CACHE_CHECK([for the default library search path], |
AC_CACHE_CHECK([for the default library search path], |
182 |
libltdl_cv_sys_search_path, [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"]) |
[libltdl_cv_sys_search_path], |
183 |
|
[libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"]) |
184 |
if test -n "$libltdl_cv_sys_search_path"; then |
if test -n "$libltdl_cv_sys_search_path"; then |
185 |
case "$host" in |
case "$host" in |
186 |
*-*-mingw*) pathsep=";" ;; |
*-*-mingw*) pathsep=";" ;; |
199 |
fi |
fi |
200 |
])# AC_LTDL_SYSSEARCHPATH |
])# AC_LTDL_SYSSEARCHPATH |
201 |
|
|
202 |
|
|
203 |
# AC_LTDL_OBJDIR |
# AC_LTDL_OBJDIR |
204 |
# -------------- |
# -------------- |
205 |
AC_DEFUN([AC_LTDL_OBJDIR], |
AC_DEFUN([AC_LTDL_OBJDIR], |
206 |
[AC_CACHE_CHECK([for objdir], |
[AC_CACHE_CHECK([for objdir], |
207 |
libltdl_cv_objdir, [libltdl_cv_objdir="$objdir" |
[libltdl_cv_objdir], |
208 |
if test -n "$objdir"; then |
[libltdl_cv_objdir="$objdir" |
209 |
: |
if test -n "$objdir"; then |
210 |
else |
: |
|
rm -f .libs 2>/dev/null |
|
|
mkdir .libs 2>/dev/null |
|
|
if test -d .libs; then |
|
|
libltdl_cv_objdir=.libs |
|
211 |
else |
else |
212 |
# MS-DOS does not allow filenames that begin with a dot. |
rm -f .libs 2>/dev/null |
213 |
libltdl_cv_objdir=_libs |
mkdir .libs 2>/dev/null |
214 |
|
if test -d .libs; then |
215 |
|
libltdl_cv_objdir=.libs |
216 |
|
else |
217 |
|
# MS-DOS does not allow filenames that begin with a dot. |
218 |
|
libltdl_cv_objdir=_libs |
219 |
|
fi |
220 |
|
rmdir .libs 2>/dev/null |
221 |
fi |
fi |
222 |
rmdir .libs 2>/dev/null |
]) |
|
fi]) |
|
223 |
AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/", |
AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/", |
224 |
[Define to the sub-directory in which libtool stores uninstalled libraries. ]) |
[Define to the sub-directory in which libtool stores uninstalled libraries. ]) |
225 |
])# AC_LTDL_OBJDIR |
])# AC_LTDL_OBJDIR |
226 |
|
|
227 |
|
|
228 |
# AC_LTDL_DLPREOPEN |
# AC_LTDL_DLPREOPEN |
229 |
# ----------------- |
# ----------------- |
230 |
AC_DEFUN([AC_LTDL_DLPREOPEN], |
AC_DEFUN([AC_LTDL_DLPREOPEN], |
231 |
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl |
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) |
232 |
AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen], |
AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen], |
233 |
libltdl_cv_preloaded_symbols, [dnl |
[libltdl_cv_preloaded_symbols], |
234 |
if test -n "$global_symbol_pipe"; then |
[if test -n "$global_symbol_pipe"; then |
235 |
libltdl_cv_preloaded_symbols=yes |
libltdl_cv_preloaded_symbols=yes |
236 |
else |
else |
237 |
libltdl_cv_preloaded_symbols=no |
libltdl_cv_preloaded_symbols=no |
238 |
fi |
fi |
239 |
]) |
]) |
240 |
if test x"$libltdl_cv_preloaded_symbols" = x"yes"; then |
if test x"$libltdl_cv_preloaded_symbols" = xyes; then |
241 |
AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1, |
AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1, |
242 |
[Define if libtool can extract symbol lists from object files. ]) |
[Define if libtool can extract symbol lists from object files. ]) |
243 |
fi |
fi |
244 |
])# AC_LTDL_DLPREOPEN |
])# AC_LTDL_DLPREOPEN |
245 |
|
|
246 |
|
|
247 |
# AC_LTDL_DLLIB |
# AC_LTDL_DLLIB |
248 |
# ------------- |
# ------------- |
249 |
AC_DEFUN([AC_LTDL_DLLIB], |
AC_DEFUN([AC_LTDL_DLLIB], |
250 |
[LIBADD_DL= |
[LIBADD_DL= |
251 |
AC_SUBST(LIBADD_DL) |
AC_SUBST(LIBADD_DL) |
252 |
AC_LANG_PUSH([C]) |
AC_LANG_PUSH([C]) |
253 |
AC_CHECK_LIB(dl, dlopen, |
AC_CHECK_LIB([dl], [dlopen], |
254 |
[AC_DEFINE(HAVE_LIBDL, 1, |
[AC_DEFINE([HAVE_LIBDL], [1], |
255 |
[Define if you have the libdl library or equivalent. ]) |
[Define if you have the libdl library or equivalent. ]) |
256 |
LIBADD_DL="-ldl"], |
LIBADD_DL="-ldl"], |
257 |
[AC_TRY_LINK([#if HAVE_DLFCN_H |
[AC_TRY_LINK([#if HAVE_DLFCN_H |
258 |
# include <dlfcn.h> |
# include <dlfcn.h> |
259 |
#endif |
#endif |
260 |
], [dlopen();], |
], |
261 |
[AC_DEFINE(HAVE_LIBDL, 1, |
[dlopen();], |
262 |
[Define if you have the libdl library or equivalent.])], |
[AC_DEFINE(HAVE_LIBDL, 1, |
263 |
|
[Define if you have the libdl library or equivalent. ])], |
264 |
[AC_CHECK_LIB(svld, dlopen, |
[AC_CHECK_LIB(svld, dlopen, |
265 |
[AC_DEFINE(HAVE_LIBDL, 1, |
[AC_DEFINE(HAVE_LIBDL, 1, |
266 |
[Define if you have the libdl library or equivalent.]) |
[Define if you have the libdl library or equivalent. ]) |
267 |
LIBADD_DL="-lsvld"])])]) |
LIBADD_DL="-lsvld" |
268 |
|
]) |
269 |
|
]) |
270 |
|
]) |
271 |
|
|
272 |
AC_CHECK_FUNC(shl_load, |
AC_CHECK_FUNC(shl_load, |
273 |
[AC_DEFINE(HAVE_SHL_LOAD, 1, [Define if you have the shl_load function.])], |
[AC_DEFINE([HAVE_SHL_LOAD], [1], |
274 |
[AC_CHECK_LIB(dld, shl_load, |
[Define if you have the shl_load function. ])], |
275 |
[AC_DEFINE(HAVE_SHL_LOAD, 1, [Define if you have the shl_load function.]) |
[AC_CHECK_LIB([dld], [shl_load], |
276 |
LIBADD_DL="$LIBADD_DL -ldld"])]) |
[AC_DEFINE([HAVE_SHL_LOAD], [1], |
277 |
|
[Define if you have the shl_load function. ]) |
278 |
|
LIBADD_DL="$LIBADD_DL -ldld" |
279 |
|
]) |
280 |
|
]) |
281 |
|
|
282 |
|
AC_CHECK_LIB([dld], [dld_link], |
283 |
|
[AC_DEFINE([HAVE_DLD], [1], |
284 |
|
[Define if you have the GNU dld library.]) |
285 |
|
test x"$ac_cv_lib_dld_shl_load" = xyes || LIBADD_DL="$LIBADD_DL -ldld" |
286 |
|
]) |
287 |
|
|
288 |
AC_CHECK_LIB(dld, dld_link, |
if test x"$ac_cv_func_dlopen" = xyes || test x"$ac_cv_lib_dl_dlopen" = xyes |
|
[AC_DEFINE(HAVE_DLD, 1, [Define if you have the GNU dld library.]) |
|
|
test "x$ac_cv_lib_dld_shl_load" = yes || LIBADD_DL="$LIBADD_DL -ldld"]) |
|
|
|
|
|
|
|
|
if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes |
|
289 |
then |
then |
290 |
lt_save_LIBS="$LIBS" |
lt_save_LIBS="$LIBS" |
291 |
LIBS="$LIBS $LIBADD_DL" |
LIBS="$LIBS $LIBADD_DL" |
292 |
AC_CHECK_FUNCS(dlerror) |
AC_CHECK_FUNCS([dlerror]) |
293 |
LIBS="$lt_save_LIBS" |
LIBS="$lt_save_LIBS" |
294 |
fi |
fi |
295 |
AC_LANG_POP |
AC_LANG_POP |
296 |
])# AC_LTDL_DLLIB |
])# AC_LTDL_DLLIB |
297 |
|
|
298 |
|
|
299 |
# AC_LTDL_SYMBOL_USCORE |
# AC_LTDL_SYMBOL_USCORE |
300 |
# --------------------- |
# --------------------- |
301 |
|
# does the compiler prefix global symbols with an underscore? |
302 |
AC_DEFUN([AC_LTDL_SYMBOL_USCORE], |
AC_DEFUN([AC_LTDL_SYMBOL_USCORE], |
303 |
[dnl does the compiler prefix global symbols with an underscore? |
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) |
304 |
AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl |
AC_CACHE_CHECK([for _ prefix in compiled symbols], |
305 |
AC_MSG_CHECKING([for _ prefix in compiled symbols]) |
[ac_cv_sys_symbol_underscore], |
306 |
AC_CACHE_VAL(ac_cv_sys_symbol_underscore, |
[ac_cv_sys_symbol_underscore=no |
307 |
[ac_cv_sys_symbol_underscore=no |
cat > conftest.$ac_ext <<EOF |
|
cat > conftest.$ac_ext <<EOF |
|
308 |
void nm_test_func(){} |
void nm_test_func(){} |
309 |
int main(){nm_test_func;return 0;} |
int main(){nm_test_func;return 0;} |
310 |
EOF |
EOF |
311 |
if AC_TRY_EVAL(ac_compile); then |
if AC_TRY_EVAL(ac_compile); then |
312 |
# Now try to grab the symbols. |
# Now try to grab the symbols. |
313 |
ac_nlist=conftest.nm |
ac_nlist=conftest.nm |
314 |
if AC_TRY_EVAL(NM conftest.$ac_objext \| $global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then |
if AC_TRY_EVAL(NM conftest.$ac_objext \| $global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then |
315 |
# See whether the symbols have a leading underscore. |
# See whether the symbols have a leading underscore. |
316 |
if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then |
if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then |
317 |
ac_cv_sys_symbol_underscore=yes |
ac_cv_sys_symbol_underscore=yes |
|
else |
|
|
if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then |
|
|
: |
|
318 |
else |
else |
319 |
echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC |
if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then |
320 |
|
: |
321 |
|
else |
322 |
|
echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC |
323 |
|
fi |
324 |
fi |
fi |
325 |
|
else |
326 |
|
echo "configure: cannot run $global_symbol_pipe" >&AC_FD_CC |
327 |
fi |
fi |
328 |
else |
else |
329 |
echo "configure: cannot run $global_symbol_pipe" >&AC_FD_CC |
echo "configure: failed program was:" >&AC_FD_CC |
330 |
|
cat conftest.c >&AC_FD_CC |
331 |
fi |
fi |
332 |
else |
rm -rf conftest* |
333 |
echo "configure: failed program was:" >&AC_FD_CC |
]) |
|
cat conftest.c >&AC_FD_CC |
|
|
fi |
|
|
rm -rf conftest* |
|
|
]) |
|
|
AC_MSG_RESULT($ac_cv_sys_symbol_underscore) |
|
334 |
])# AC_LTDL_SYMBOL_USCORE |
])# AC_LTDL_SYMBOL_USCORE |
335 |
|
|
336 |
|
|
337 |
# AC_LTDL_DLSYM_USCORE |
# AC_LTDL_DLSYM_USCORE |
338 |
# -------------------- |
# -------------------- |
339 |
AC_DEFUN([AC_LTDL_DLSYM_USCORE], |
AC_DEFUN([AC_LTDL_DLSYM_USCORE], |
340 |
[AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])dnl |
[AC_REQUIRE([AC_LTDL_SYMBOL_USCORE]) |
341 |
if test x"$ac_cv_sys_symbol_underscore" = xyes; then |
if test x"$ac_cv_sys_symbol_underscore" = xyes; then |
342 |
if test x"$ac_cv_func_dlopen" = xyes || |
if test x"$ac_cv_func_dlopen" = xyes || |
343 |
test x"$ac_cv_lib_dl_dlopen" = xyes ; then |
test x"$ac_cv_lib_dl_dlopen" = xyes ; then |
344 |
AC_CACHE_CHECK([whether we have to add an underscore for dlsym], |
AC_CACHE_CHECK([whether we have to add an underscore for dlsym], |
345 |
libltdl_cv_need_uscore, [dnl |
[libltdl_cv_need_uscore], |
346 |
libltdl_cv_need_uscore=unknown |
[libltdl_cv_need_uscore=unknown |
347 |
save_LIBS="$LIBS" |
save_LIBS="$LIBS" |
348 |
LIBS="$LIBS $LIBADD_DL" |
LIBS="$LIBS $LIBADD_DL" |
349 |
_LT_AC_TRY_DLOPEN_SELF( |
_LT_AC_TRY_DLOPEN_SELF( |
350 |
libltdl_cv_need_uscore=no, libltdl_cv_need_uscore=yes, |
[libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes], |
351 |
[], libltdl_cv_need_uscore=cross) |
[], [libltdl_cv_need_uscore=cross]) |
352 |
LIBS="$save_LIBS" |
LIBS="$save_LIBS" |
353 |
]) |
]) |
354 |
fi |
fi |
355 |
fi |
fi |
359 |
[Define if dlsym() requires a leading underscode in symbol names. ]) |
[Define if dlsym() requires a leading underscode in symbol names. ]) |
360 |
fi |
fi |
361 |
])# AC_LTDL_DLSYM_USCORE |
])# AC_LTDL_DLSYM_USCORE |
362 |
|
|
363 |
|
# AC_LTDL_FUNC_ARGZ |
364 |
|
# ----------------- |
365 |
|
AC_DEFUN([AC_LTDL_FUNC_ARGZ], |
366 |
|
[AC_CHECK_HEADERS([argz.h]) |
367 |
|
|
368 |
|
AC_CHECK_TYPES([error_t], |
369 |
|
[], |
370 |
|
[AC_DEFINE([error_t], [int], |
371 |
|
[Define to a type to use for `error_t' if it is not otherwise available])], |
372 |
|
[#if HAVE_ARGZ_H |
373 |
|
# include <argz.h> |
374 |
|
#endif]) |
375 |
|
|
376 |
|
AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next]) |
377 |
|
])# AC_LTDL_FUNC_ARGZ |