Tom Tromey wrote:

"Archie" == Archie Cobbs <[EMAIL PROTECTED]> writes:

Archie> Great! What O/S are you using? Do you know a good ./configure test
Archie> for whether "-ldl" is required?

The usual thing is to pick whatever symbol is used by the package and
do a series of AC_CHECK_LIB calls.  The original poster didn't say how
the link failed, but for instance if dlopen was missing you would look
for that.  There's an example of this for dlopen and friends in
libltdl (part of libtool).

There's no hard and fast rule for knowing what functions to check for.

I'd say to look at APR before spending a lot of time on configury
though.
The following patch helps for most unix like machine:
+++
[EMAIL PROTECTED]:~/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm> svn diff configure.in
Index: configure.in
===================================================================
--- configure.in        (revision 345091)
+++ configure.in        (working copy)
@@ -80,6 +80,7 @@
       [AC_MSG_ERROR([required library crypto missing])])
AC_CHECK_LIB(popt, poptGetContext,,
       [AC_MSG_ERROR([required library libpopt missing])])
+AC_CHECK_LIB(dl, dlopen,,,)

# Check for pthread library, linking either via -pthread or -lpthread
AC_MSG_CHECKING([whether -pthread gets us the pthread library])

+++

Tom


Reply via email to