I’m trying to use the GNU autoconf/automake toolchain for the first time, so the answer to my question might be trivial.
The program needs OpenGL/GLUT where the headers and libraries are installed in a non standard location. I found these macros that should do all the checking for me. I’m simply calling it with AX_CHECK_GLUT. How do I make the macro find the libraries? I’m looking for something like
./configure –with-glut-dir=/home/hanno/glut
More generally: What is the normal way of dealing with non-standard library locations in an autoconf script? Of course, I can play around with CPPFLAGS and LIBS variables, but I have the feeling that I’m missing something.
The way the Autotools are designed, a package author doesn’t have to do anything to support prerequisite installed in non-standard locations. The output of
./configure --helpincludes the following lines:Therefore, if the installer has a prerequisite installed in a non standard location, he will have to issue
Because
CPPFLAGSandLDFLAGSare used byconfigurechecks andMakefilerules, everything should work.Some package authors like to offer a
--with-package=locationoption as a shorthand for the above, but this normally is not the purpose of--with-package options. These options are better used to specify whether an optional package should be used, or how a prerequisite should be fulfilled.