+1999-04-11 Thomas Tanner <tanner@gmx.de>
+
+ * libltdl/configure.in: check for shl_load in libdld
+ * libltdl/ltdl.c (shl_close, shl_sym): use (shl_t *) instead of shl_t
+ * ltconfig.in (check for gcc): removed a bogus line,
+ check for shl_load in libdld
+ * ltmain.in: added a warning to the header of the .la file
+ to warn users against deleting the file.
+
1999-04-10 Alexandre Oliva <oliva@dcc.unicamp.br>
* libtool.m4 (AC_PROG_LD, AC_PROG_NM): When looking for programs,
test_dlerror=no
LIBADD_DL=
AC_CHECK_FUNCS(dlopen, [AC_DEFINE(HAVE_LIBDL, 1,
- [Define if you have the libdl library or equivalent. ]) test_dlerror=yes],
+ [Define if you have the libdl library or equivalent. ]) dnl
+ test_dlerror=yes],
[AC_CHECK_LIB(dl, dlopen, [AC_DEFINE(HAVE_LIBDL, 1,
- [Define if you have the libdl library. ]) dnl
+ [Define if you have the libdl library. ]) dnl
LIBADD_DL="-ldl" test_dlerror=yes],
[AC_CHECK_LIB(dld, dld_link, [AC_DEFINE(HAVE_DLD, 1,
- [Define if you have the GNU dld library. ]) dnl
+ [Define if you have the GNU dld library. ]) dnl
LIBADD_DL="-ldld"],
[AC_CHECK_FUNCS(shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1,
- [Define if you have the shl_load function. ])])]
+ [Define if you have the shl_load function. ])],
+ [AC_CHECK_LIB(dld, shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1,
+ [Define if you have the shl_load function. ]) dnl
+ LIBADD_DL="-ldld"])]
+ )]
)]
)]
)
shl_close (handle)
lt_dlhandle handle;
{
- if (shl_unload((shl_t) (handle->handle)) != 0) {
+ if (shl_unload((shl_t*) (handle->handle)) != 0) {
last_error = cannot_close_error;
return 1;
}
{
lt_ptr_t address;
- if (shl_findsym((shl_t) (handle->handle), symbol, TYPE_UNDEFINED,
- &address) != 0 || !(handle->handle) || !address) {
- last_error = symbol_error;
- return 0;
- }
- return address;
+ if (handle->handle && shl_findsym((shl_t*) (handle->handle),
+ symbol, TYPE_UNDEFINED, &address) == 0)
+ if (address)
+ return address;
+ last_error = symbol_error;
+ return 0;
}
static
echo $ac_n "checking for gcc... $ac_c" 1>&6
IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
for dir in $PATH; do
- IFS="$save_ifs"
test -z "$dir" && dir=.
if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then
CC="gcc"
lt_cv_dlopen="shl_load"
else
echo "$ac_t""no" 1>&6
+echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
+echo "$progname:@LINENO@: checking for shl_load in -ldld" >&5
+ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-ldld $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line @LINENO@ "ltconfig"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load();
+
+int main() {
+shl_load()
+; return 0; }
+EOF
+if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
fi
fi
$rm $output
$echo > $output "\
-# $output - a libtool library file
+# $outputname.la - a libtool library file
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname='$dlname'