This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdb/configure: Replace hardcoded -ldl with check based on dlfcn.h availability
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: tromey at redhat dot com
- Cc: pavel dot v dot chupin at gmail dot com, mark dot kettenis at xs4all dot nl, gdb-patches at sourceware dot org
- Date: Tue, 14 May 2013 21:23:57 +0200 (CEST)
- Subject: Re: [PATCH] gdb/configure: Replace hardcoded -ldl with check based on dlfcn.h availability
- References: <CANwJu1-LGhEaeA3Mmi37UkLZOAqEFpzFpKaKzL3MVA2WORdR7Q at mail dot gmail dot com> <CANwJu18MP86hi3etqskPSR3Pt6tPEZCSndzW2No_9ZHEig0AHQ at mail dot gmail dot com> <201305061230 dot r46CU0P4006086 at glazunov dot sibelius dot xs4all dot nl> <CANwJu1_HerKDCXB4gWAXMQY5TBe++X1A2bFSPcj+xg+MGnYQtA at mail dot gmail dot com> <87a9nx5qv9 dot fsf at fleche dot redhat dot com>
> From: Tom Tromey <tromey@redhat.com>
> Date: Tue, 14 May 2013 13:00:10 -0600
>
> Mark> The fix isn't quite right. OpenBSD for example has <dlfcn.h> but no
> Mark> libdl; dlopen(3) and friends live in libc.
>
> Pavel> Hi Mark,
> Pavel> Thanks for your comments. Please see new patch attached.
>
> Pavel> - LIBS="-ldl $LIBS"
> Pavel> + AC_CHECK_LIB(dl, dlopen)
>
> I think it is probably better to use AC_SEARCH_LIBS.
That's indeed what the autoconf manual suggests.