Re: [PATCH] Have sndio check use the pkg-config file
Brad Smith <[email protected]> Sun, 27 Mar 2022 01:28:54 -0400
| Newsgroups | gmane.comp.video.mplayer.devel |
|---|---|
| Message-ID | <[email protected]> |
ping. On 2/27/2022 5:41 PM, Brad Smith wrote: > On Sat, Feb 26, 2022 at 04:49:18PM -0500, Brad Smith wrote: >> Have the sndio check use the pkg-config file. >> >> BTW, looking at other examples to take inspiration for this I noticed the Pulse >> and JACK bits use libs_mplayer vs extra_ldflags and echores is higher up. Little >> inconsistencies are kind of annoying when looking at code to get an idea of how >> to do things. > Switch back to using statement_check. > > > Index: configure > =================================================================== > --- configure (revision 38350) > +++ configure (working copy) > @@ -6358,12 +6358,16 @@ > echocheck "sndio audio" > if test "$_sndio" = auto ; then > _sndio=no > - statement_check sndio.h 'sio_open(SIO_DEVANY, SIO_PLAY, 0)' -lsndio && _sndio=yes > + if $_pkg_config --exists 'sndio' ; then > + statement_check sndio.h 'sio_open(SIO_DEVANY, SIO_PLAY, 0)' $($_pkg_config --libs --cflags sndio) && > + _sndio=yes > + fi > fi > if test "$_sndio" = yes ; then > def_sndio='#define CONFIG_SNDIO_AUDIO 1' > aomodules="sndio $aomodules" > - extra_ldflags="$extra_ldflags -lsndio" > + extra_ldflags="$extra_ldflags $($_pkg_config --libs sndio)" > + extra_cflags="$extra_cflags $($_pkg_config --cflags sndio)" > else > def_sndio='#undef CONFIG_SNDIO_AUDIO' > noaomodules="sndio $noaomodules" > _______________________________________________ > MPlayer-dev-eng mailing list > [email protected] > https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng