Autotools help

Ryan Schmidt ryandesign at macports.org
Sat Oct 22 09:41:36 PDT 2016


On Oct 22, 2016, at 10:35, Craig Treleaven <ctreleaven at macports.org> wrote:
> 
> I’m working on an update to Lirc and the build system has changed to Autotools--which I know very little about.
> 
> It seems that Lirc will now opportunistically link with Alsa and there is no configure flag to disable such behaviour.  I want to make Alsa support a non-default variant.  Is my best option to patch the configure.ac file?
> 
> I believe the relevant portion of configure.ac is:
> 
> dnl audio_alsa driver requires ALSA library installed and some linker flags
> have_alsa=no
> AC_CHECK_HEADERS(alsa/asoundlib.h,[
>  AC_CHECK_LIB(asound, snd_pcm_open,[
>    AM_CONDITIONAL([BUILD_LIBALSA],[true])
>    AC_DEFINE(HAVE_LIBALSA)
>    have_alsa=yes
>    ],[
>    AM_CONDITIONAL([BUILD_LIBALSA],[false])],
>    )
>    ],[
>    AM_CONDITIONAL([BUILD_LIBALSA],[false])]
> )
> 
> From:
> https://sourceforge.net/p/lirc/git/ci/lirc-0_9_4c/tree/configure.ac
> 
> What exactly would I patch in to ignore Alsa?

Usually, after running configure, you can find ac_cv_ variables in the config.log or config.h file representing the feature you're interested in. You can then supply a name=value configure argument to override it with whatever value you want. 


More information about the macports-dev mailing list