[DVDnav-discuss] libdvdread uses internal dlfcn on W32, unconditionally

Roger Pack rogerdpack2 at gmail.com
Wed Apr 18 15:45:40 CEST 2012


On Tue, Apr 17, 2012 at 12:44 PM, Erik Hovland <erik at hovland.org> wrote:
>> On W32 libdvdread unconditionally uses msvc/contrib/dlfcn.c
>> While this allows libdvdread to be compiled out of the box, it
>> prevents it from linking to any other dlfcn implementation. Namely -
>> to dlfcn-win32 [1] (which is somewhat more POSIX-compliant).
>>
>> The attached patch is very simplistic (i.e. it unconditionally
>> requires a working libdl somewhere), but it works for me. For trunk i
>> would suggest re-writing it like this:
>> check for dlopen in -lc
>>  if that fails, check for dlopen in -ld
>>    if that fails AND host is mingw, modify CFLAGS to use internal dlfcn
>>
>> Note that LDFLAGS modification should go AFTER (!) all AC_CHECK_LIB
>> calls, because -no-undefined is no longer valid as a compiler option.
>>
>> [1] http://code.google.com/p/dlfcn-win32/
>
> I have put this patch into my tree. It would be helpful if someone who
> develops or builds on Windows tried out this patch, but it is highly likely
> that I will push this patch as is into svn.

with mingw @60fd12cd6a854 :

microe-libdvdread $ ./configure
...
configure: error: dynamic linker needed
make: *** [config.status] Error 1
$


More information about the DVDnav-discuss mailing list