configure.ac: Add an additional checks for dladdr and dlopen on dld.

2006-04-28  Andreas Tobler  <a.tobler@schweiz.ch>

	* configure.ac: Add an additional checks for dladdr and dlopen on dld.
	* configure: Rebuilt.

From-SVN: r113323
This commit is contained in:
Andreas Tobler 2006-04-28 00:20:03 +02:00 committed by Andreas Tobler
parent 6c00f606c1
commit 2a67186a24
3 changed files with 176 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2006-04-28 Andreas Tobler <a.tobler@schweiz.ch>
* configure.ac: Add an additional checks for dladdr and dlopen on dld.
* configure: Rebuilt.
2006-04-25 Tom Tromey <tromey@redhat.com>
* gnu/gcj/runtime/natSharedLibLoader.cc: Include gc.h later.

163
libjava/configure vendored
View File

@ -10036,6 +10036,7 @@ fi
done
# Do an additional check on dld, HP-UX for example has dladdr in libdld.sl
echo "$as_me:$LINENO: checking for dladdr in -ldl" >&5
echo $ECHO_N "checking for dladdr in -ldl... $ECHO_C" >&6
if test "${ac_cv_lib_dl_dladdr+set}" = set; then
@ -10112,6 +10113,86 @@ cat >>confdefs.h <<\_ACEOF
#define HAVE_DLADDR 1
_ACEOF
else
echo "$as_me:$LINENO: checking for dladdr in -ldld" >&5
echo $ECHO_N "checking for dladdr in -ldld... $ECHO_C" >&6
if test "${ac_cv_lib_dld_dladdr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
if test x$gcc_no_link = xyes; then
{ { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
{ (exit 1); exit 1; }; }
fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dladdr ();
int
main ()
{
dladdr ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dld_dladdr=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_dld_dladdr=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dladdr" >&5
echo "${ECHO_T}$ac_cv_lib_dld_dladdr" >&6
if test $ac_cv_lib_dld_dladdr = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_DLADDR 1
_ACEOF
fi
fi
@ -12949,7 +13030,7 @@ done
echo "$as_me: error: memcpy is required" >&2;}
{ (exit 1); exit 1; }; }
fi
# Do an additional check on dld, HP-UX for example has dlopen in libdld.sl
echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
@ -13026,6 +13107,86 @@ cat >>confdefs.h <<\_ACEOF
#define HAVE_DLOPEN 1
_ACEOF
else
echo "$as_me:$LINENO: checking for dlopen in -ldld" >&5
echo $ECHO_N "checking for dlopen in -ldld... $ECHO_C" >&6
if test "${ac_cv_lib_dld_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
if test x$gcc_no_link = xyes; then
{ { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
{ (exit 1); exit 1; }; }
fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dlopen ();
int
main ()
{
dlopen ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dld_dlopen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_dld_dlopen=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dlopen" >&5
echo "${ECHO_T}$ac_cv_lib_dld_dlopen" >&6
if test $ac_cv_lib_dld_dlopen = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_DLOPEN 1
_ACEOF
fi
fi

View File

@ -897,9 +897,12 @@ else
inet_pton uname inet_ntoa \
fork execvp pipe sigaction ftruncate])
AC_CHECK_FUNCS(inet_aton inet_addr, break)
AC_CHECK_HEADERS(execinfo.h unistd.h dlfcn.h)
AC_CHECK_HEADERS(execinfo.h unistd.h dlfcn.h)
# Do an additional check on dld, HP-UX for example has dladdr in libdld.sl
AC_CHECK_LIB(dl, dladdr, [
AC_DEFINE(HAVE_DLADDR, 1, [Define if you have dladdr()])])
AC_DEFINE(HAVE_DLADDR, 1, [Define if you have dladdr()])], [
AC_CHECK_LIB(dld, dladdr, [
AC_DEFINE(HAVE_DLADDR, 1, [Define if you have dladdr()])])])
if test x"$build" = x"$host"; then
AC_CHECK_FILES(/proc/self/exe, [
@ -1053,9 +1056,11 @@ else
if test "$memcpy_found" = no; then
AC_MSG_ERROR([memcpy is required])
fi
# Do an additional check on dld, HP-UX for example has dlopen in libdld.sl
AC_CHECK_LIB(dl, dlopen, [
AC_DEFINE(HAVE_DLOPEN, 1, [Define if dlopen is available])])
AC_DEFINE(HAVE_DLOPEN, 1, [Define if dlopen is available])], [
AC_CHECK_LIB(dld, dlopen, [
AC_DEFINE(HAVE_DLOPEN, 1, [Define if dlopen is available])])])
# Some library-finding code we stole from Tcl.
#--------------------------------------------------------------------