Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ./configure fail if dependencies are missing for --with options #87

Open
acajaja opened this issue Jun 9, 2017 · 2 comments
Open

Comments

@acajaja
Copy link

acajaja commented Jun 9, 2017

Expected behavior

To build from source with ALSA & JACK support.

Actual behavior

Using the --with-alsa & --with-jack options for the ./configure command still will not actually enable the support. The output of ./configure ... says "With ALSA|JACK ... no"

Information

  • Which version of amsynth are you using?
    1.7.1
  • Which build of amsynth are you using? (stand-alone application, LV2, DSSI, VST)
    Stand-alone
  • If using amsynth as a plugin, which host application are you using?
  • Which operating system & version are you using?
    Raspbian Jessie - current version as of this post.

Steps to reproduce the behavior

  1. Download the source code
  2. Ran ./configure --with-alsa --with-jack
  3. Observed output saying that support for ALSA & JACK is not enabled.
@nickdowell
Copy link
Member

If you see the following lines in the output of ./configure, it means that you do not have the alsa and jack development libraries installed.

checking for alsa... no
checking for jack... no

The ./configure script uses pkg-config to detect whether the libraries are installed. Try running pkg-config --list-all to see if the alsa and jack packages are installed. You may need to adjust PKG_CONFIG_PATH if the libraries are installed in a non-standard location.

Note that amsynth's ./configure --with-package will currently simply ignore any package that cannot be found. It would be better to make ./configure fail if a package explicitly requested by the user has not been found.

@nickdowell nickdowell changed the title Cannot build with ALSA or JACK support Make ./configure fail if dependencies are missing for --with options Sep 26, 2020
@nickdowell
Copy link
Member

Options should be processed as suggested in https://autotools.io/autoconf/arguments.html

3.2. Automatic Dependencies with AC_ARG_WITH

Sometimes, the external dependencies of a project can be a hassle, especially if they enable optional features that not every operating system supports or that some users don't really care about. For this reason, they are often made optional, non-mandatory.

When the option is non-mandatory, but it's desirable if certain software is present in the system, it's usual to make the dependency automatic. Automatic dependencies are enabled only if the needed libraries are found, and “soft-fail” in disabling the features if they are not. Distributions further specialise this class in automatic and automagic dependencies; this latter name is used for those dependencies that don't allow being overridden, and thus will always enable the features if the libraries are found, and always soft-fail when they are not found. For distributions like Gentoo Linux that build on users' systems, this situation is actually problematic and has to be resolved to properly package the software ([GentooAutomagic]).

To avoid this kind of problem, the best thing is to implement a --with parameter that allows overriding automatic detection: forcing it to yes would make the code fail entirely when the library is not detected, and forcing it to no would make the code skip over the check entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants