autotoolsautoconfautomakeinclude-pathfestival

Finding custom includes directories with autoconf


I'm trying to compile a program which uses the festival library.

Basically, the requirements are that you include the festival and estools header directories in the include path, and you include both their library paths.

In a normal installation, they simply stay in their own folders, so you have

/some/path/festival/src/include 
/some/other/path/estools/include

as the required search path, and

/some/path/festival/src/lib
/some/other/path/estools/lib

as the library path.

I think that the proper way to handle this is with a "--with-estools" and a "--with-festival" configure option.

However, there's a different setup when it is installed on a debian/ubuntu system. I'd like to be able to handle this setup, where the search paths are

/usr/include/festival
/usr/include/estools

and the search path is just

/usr/lib

I'd like to detect the second case, and handle it automatically, while still requiring the user to specify the first two directories if the second case is not satisfied. How would I do this?


Solution

  • Is there something that would preclude setting options like so?

    1. --festival-includes with a default value (if unset) to /usr/include/festival

    2. --festival-libs with a default value (if unset) to /usr/lib/libfestival.XXX

    The same goes for estools.