public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] additional dladdr check in configure.ac
@ 2006-04-25 21:25 Andreas Tobler
  2006-04-25 22:16 ` Andreas Tobler
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Tobler @ 2006-04-25 21:25 UTC (permalink / raw)
  To: Java Patches

Hello,
the attached patch to configure.ac looks for dladdr in libdld.sl on 
HP-UX. If the OS has the right version and patches the check succeeds.

Ok for main?

Andreas

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

	* configure.ac: Add an additional check for dladdr on dld.
	* configure: Rebuilt.

Index: configure.ac
===================================================================
--- configure.ac        (revision 113256)
+++ configure.ac        (working copy)
@@ -897,9 +897,12 @@
                    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, [

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] additional dladdr check in configure.ac
  2006-04-25 21:25 [patch] additional dladdr check in configure.ac Andreas Tobler
@ 2006-04-25 22:16 ` Andreas Tobler
  2006-04-25 22:34   ` Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Tobler @ 2006-04-25 22:16 UTC (permalink / raw)
  To: Java Patches

ok,
as it seems there are other functions waiting.

I had to add dlopen. Since it is there too in libdld.sl.

Ok, for main??

Andreas

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

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


Index: configure.ac
===================================================================
--- configure.ac        (revision 113256)
+++ configure.ac        (working copy)
@@ -897,9 +897,12 @@
                    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 @@
     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.
     #--------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] additional dladdr check in configure.ac
  2006-04-25 22:16 ` Andreas Tobler
@ 2006-04-25 22:34   ` Tom Tromey
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2006-04-25 22:34 UTC (permalink / raw)
  To: Andreas Tobler; +Cc: Java Patches

>>>>> "Andreas" == Andreas Tobler <toa@pop.agri.ch> writes:

Andreas> 2006-04-25  Andreas Tobler  <a.tobler@schweiz.ch>
Andreas> * configure.ac: Add an additional check for dladdr and dlopen on dld.
Andreas> * configure: Rebuilt.

Ok.  Thanks.

You might want to see if you need to add -ldld to SYSTEMSPEC.  Look a
bit later:

   # On Solaris, and maybe other architectures, the Boehm collector
   # requires -ldl.
   if test "$GC" = boehm; then
      AC_CHECK_LIB(dl, main, SYSTEMSPEC="$SYSTEMSPEC -ldl")
   fi

I don't mind if that is a separate patch though, up to you.

Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-04-25 22:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-25 21:25 [patch] additional dladdr check in configure.ac Andreas Tobler
2006-04-25 22:16 ` Andreas Tobler
2006-04-25 22:34   ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).