Re: [PATCH] Have sndio check use the pkg-config file
Brad Smith <[email protected]> Sun, 27 Feb 2022 17:41:23 -0500
| Newsgroups | gmane.comp.video.mplayer.devel |
|---|---|
| Message-ID | <[email protected]> |
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"