Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1376 Wrong assumption about dlopen(3) in configure script on FreeBSD

None
open
nobody
None
1
2013-07-22
2012-12-16
pawelbsd
No

configure fails on my system (FreeBSD 10.0-CURRENT) with error:

checking for XSetErrorHandler in -lX11... yes
checking for gzopen in -lz... yes
checking for dlopen in -ldl... no
configure: error: Failed to find required dl library
===> Script "configure" failed unexpectedly.

This is due wrong assumption that dlopen(3) function is located in dl library. On FreeBSD (other BSDs probably too) systems dlopen(3) is part of libc as documented here:

http://www.freebsd.org/cgi/man.cgi?query=dlopen

Attached patch fixes issue for me.

1 Attachments

Discussion

  • AC_CHECK_LIB() seems to be deprecated.
    Would be something like AC_SEARCH_LIBS(dlopen, [dl], [LIBS="$LIBS -ldl"]) in configure.ac ok on BSD?