Revert changes in libltdl to avoid problems on future updates. (Back to revision 893)
git-svn-id: svn://localhost/gambas/trunk@916 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
72aabf1920
commit
16fb7c8eb2
@ -7,7 +7,7 @@
|
||||
## unlimited permission to copy and/or distribute it, with or without
|
||||
## modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 48 AC_PROG_LIBTOOL
|
||||
## serial 48 AC_PROG_LIBTOOL
|
||||
|
||||
|
||||
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
|
||||
@ -1572,10 +1572,27 @@ linux*)
|
||||
# before this can be enabled.
|
||||
hardcode_into_libs=yes
|
||||
|
||||
# find out which ABI we are using
|
||||
libsuff=
|
||||
case "$host_cpu" in
|
||||
x86_64*|s390x*|powerpc64*)
|
||||
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
*64-bit*)
|
||||
libsuff=64
|
||||
sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -rf conftest*
|
||||
;;
|
||||
esac
|
||||
|
||||
# Append ld.so.conf contents to the search path
|
||||
if test -f /etc/ld.so.conf; then
|
||||
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
|
||||
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
||||
sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
|
||||
fi
|
||||
|
||||
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
||||
@ -3391,20 +3408,16 @@ case $host_os in
|
||||
_LT_AC_TAGVAR(ld_shlibs, $1)=no
|
||||
;;
|
||||
openbsd*)
|
||||
if test -f /usr/libexec/ld.so; then
|
||||
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
|
||||
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
|
||||
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
|
||||
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
|
||||
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
|
||||
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
|
||||
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
|
||||
fi
|
||||
output_verbose_link_cmd='echo'
|
||||
else
|
||||
_LT_AC_TAGVAR(ld_shlibs, $1)=no
|
||||
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
|
||||
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
|
||||
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
|
||||
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
|
||||
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
|
||||
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
|
||||
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
|
||||
fi
|
||||
output_verbose_link_cmd='echo'
|
||||
;;
|
||||
osf3*)
|
||||
case $cc_basename in
|
||||
@ -4031,6 +4044,7 @@ CC=${GCJ-"gcj"}
|
||||
compiler=$CC
|
||||
_LT_AC_TAGVAR(compiler, $1)=$CC
|
||||
_LT_CC_BASENAME([$compiler])
|
||||
_LT_AC_TAGVAR(LD, $1)="$LD"
|
||||
|
||||
# GCJ did not exist at the time GCC didn't implicitly link libc in.
|
||||
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
|
||||
@ -4298,6 +4312,9 @@ CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
|
||||
# Is the compiler the GNU C compiler?
|
||||
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
|
||||
|
||||
gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
|
||||
gcc_ver=\`gcc -dumpversion\`
|
||||
|
||||
# An ERE matcher.
|
||||
EGREP=$lt_EGREP
|
||||
|
||||
@ -4431,11 +4448,11 @@ striplib=$lt_striplib
|
||||
|
||||
# Dependencies to place before the objects being linked to create a
|
||||
# shared library.
|
||||
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
|
||||
predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
|
||||
|
||||
# Dependencies to place after the objects being linked to create a
|
||||
# shared library.
|
||||
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
|
||||
postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
|
||||
|
||||
# Dependencies to place before the objects being linked to create a
|
||||
# shared library.
|
||||
@ -4447,7 +4464,7 @@ postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
|
||||
|
||||
# The library search path used internally by the compiler when linking
|
||||
# a shared library.
|
||||
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
|
||||
compiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
|
||||
|
||||
# Method to check whether dependent libraries are shared objects.
|
||||
deplibs_check_method=$lt_deplibs_check_method
|
||||
@ -4527,7 +4544,7 @@ variables_saved_for_relink="$variables_saved_for_relink"
|
||||
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
|
||||
|
||||
# Compile-time system search path for libraries
|
||||
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
|
||||
sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
|
||||
|
||||
# Run-time system search path for libraries
|
||||
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
|
||||
@ -6016,28 +6033,24 @@ _LT_EOF
|
||||
;;
|
||||
|
||||
openbsd*)
|
||||
if test -f /usr/libexec/ld.so; then
|
||||
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
|
||||
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
|
||||
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
|
||||
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
|
||||
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
|
||||
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
|
||||
else
|
||||
case $host_os in
|
||||
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
|
||||
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
|
||||
;;
|
||||
*)
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
|
||||
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
|
||||
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
|
||||
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
|
||||
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
|
||||
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
|
||||
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
|
||||
else
|
||||
_LT_AC_TAGVAR(ld_shlibs, $1)=no
|
||||
case $host_os in
|
||||
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
|
||||
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
|
||||
;;
|
||||
*)
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
|
||||
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
|
||||
@ -6410,7 +6423,7 @@ AC_MSG_RESULT([$SED])
|
||||
## unlimited permission to copy and/or distribute it, with or without
|
||||
## modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 7 AC_LIB_LTDL
|
||||
## serial 7 AC_LIB_LTDL
|
||||
|
||||
# AC_WITH_LTDL
|
||||
# ------------
|
||||
|
@ -164,9 +164,6 @@
|
||||
/* Define if dlsym() requires a leading underscore in symbol names. */
|
||||
#undef NEED_USCORE
|
||||
|
||||
/* Target system is OpenBSD */
|
||||
#undef OS_OPENBSD
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
|
@ -71,19 +71,6 @@ AC_SUBST([LIBTOOL_DEPS])
|
||||
|
||||
AC_LIB_LTDL
|
||||
|
||||
## ----------------- ##
|
||||
## Check for OpenBSD ##
|
||||
## ----------------- ##
|
||||
AC_MSG_CHECKING(if target system is OpenBSD)
|
||||
case "${host}" in
|
||||
*-*-openbsd* )
|
||||
AC_DEFINE(OS_OPENBSD, 1, [Target system is OpenBSD])
|
||||
AC_MSG_RESULT(Yes)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(No)
|
||||
;;
|
||||
esac
|
||||
|
||||
## -------- ##
|
||||
## Outputs. ##
|
||||
|
@ -272,11 +272,7 @@ strdup(str)
|
||||
tmp = LT_DLMALLOC (char, 1+ strlen (str));
|
||||
if (tmp)
|
||||
{
|
||||
#ifdef OS_OPENBSD
|
||||
strlcpy(tmp, str, strlen(str)+1);
|
||||
#else
|
||||
strcpy(tmp, str);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -898,7 +894,7 @@ static const char sys_search_path[] = LTDL_SYSSEARCHPATH;
|
||||
(*lt_dlmutex_seterror_func) (errormsg); \
|
||||
else lt_dllast_error = (errormsg); } LT_STMT_END
|
||||
#define LT_DLMUTEX_GETERROR(errormsg) LT_STMT_START { \
|
||||
if (lt_dlmutex_geterror_func) \
|
||||
if (lt_dlmutex_seterror_func) \
|
||||
(errormsg) = (*lt_dlmutex_geterror_func) (); \
|
||||
else (errormsg) = lt_dllast_error; } LT_STMT_END
|
||||
|
||||
@ -2710,21 +2706,13 @@ foreach_dirinpath (search_path, base_name, func, data1, data2)
|
||||
}
|
||||
|
||||
assert (filenamesize > lendir);
|
||||
#ifdef OS_OPENBSD
|
||||
strlcpy (filename, dir_name, filenamesize);
|
||||
#else
|
||||
strcpy (filename, dir_name);
|
||||
#endif
|
||||
|
||||
if (base_name && *base_name)
|
||||
{
|
||||
if (filename[lendir -1] != '/')
|
||||
filename[lendir++] = '/';
|
||||
#ifdef OS_OPENBSD
|
||||
strlcpy (filename, base_name, filenamesize-lendir);
|
||||
#else
|
||||
strcpy (filename +lendir, base_name);
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((result = (*func) (filename, data1, data2)))
|
||||
@ -3505,11 +3493,7 @@ lt_dlopenext (filename)
|
||||
if (!tmp)
|
||||
return 0;
|
||||
|
||||
#ifdef OS_OPENBSD
|
||||
strlcpy (tmp, filename, len+LT_STRLEN(archive_ext)+1);
|
||||
#else
|
||||
strcpy (tmp, filename);
|
||||
#endif
|
||||
strcat (tmp, archive_ext);
|
||||
errors = try_dlopen (&handle, tmp);
|
||||
|
||||
@ -3533,11 +3517,7 @@ lt_dlopenext (filename)
|
||||
if (!tmp)
|
||||
return 0;
|
||||
|
||||
#ifdef OS_OPENBSD
|
||||
strlcpy (tmp, filename, len+LT_STRLEN(shlib_ext)+1);
|
||||
#else
|
||||
strcpy (tmp, filename);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3673,11 +3653,7 @@ lt_argz_insertdir (pargz, pargz_len, dirnam, dp)
|
||||
|
||||
assert (buf);
|
||||
|
||||
#ifdef OS_OPENBSD
|
||||
strlcpy (buf, dirnam, buf_len+1);
|
||||
#else
|
||||
strcpy (buf, dirnam);
|
||||
#endif
|
||||
strcat (buf, "/");
|
||||
strncat (buf, dp->d_name, end_offset);
|
||||
buf[buf_len] = LT_EOS_CHAR;
|
||||
@ -3930,20 +3906,12 @@ lt_dlsym (handle, symbol)
|
||||
/* this is a libtool module */
|
||||
if (handle->loader->sym_prefix)
|
||||
{
|
||||
#ifdef OS_OPENBSD
|
||||
strlcpy(sym, handle->loader->sym_prefix, lensym + LT_SYMBOL_OVERHEAD + 1);
|
||||
#else
|
||||
strcpy(sym, handle->loader->sym_prefix);
|
||||
#endif
|
||||
strcat(sym, handle->info.name);
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef OS_OPENBSD
|
||||
strlcpy(sym, handle->info.name, lensym + LT_SYMBOL_OVERHEAD + 1);
|
||||
#else
|
||||
strcpy(sym, handle->info.name);
|
||||
#endif
|
||||
}
|
||||
|
||||
strcat(sym, "_LTX_");
|
||||
@ -3965,20 +3933,12 @@ lt_dlsym (handle, symbol)
|
||||
/* otherwise try "symbol" */
|
||||
if (handle->loader->sym_prefix)
|
||||
{
|
||||
#ifdef OS_OPENBSD
|
||||
strlcpy(sym, handle->loader->sym_prefix, lensym + LT_SYMBOL_OVERHEAD + 1);
|
||||
#else
|
||||
strcpy(sym, handle->loader->sym_prefix);
|
||||
#endif
|
||||
strcat(sym, symbol);
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef OS_OPENBSD
|
||||
strlcpy(sym, symbol, lensym + LT_SYMBOL_OVERHEAD + 1);
|
||||
#else
|
||||
strcpy(sym, symbol);
|
||||
#endif
|
||||
}
|
||||
|
||||
address = handle->loader->find_sym (data, handle->module, sym);
|
||||
|
Loading…
x
Reference in New Issue
Block a user