Skip to Main Content
Autotools
book

Autotools

by John Calcote
July 2010
Intermediate to advanced content levelIntermediate to advanced
360 pages
11h 12m
English
No Starch Press
Content preview from Autotools

Checking for Other Programs

Immediately following the call to AC_PROG_CC (see Example 4-1) is a call to AC_PROG_INSTALL. All of the AC_PROG_* macros set (and then substitute, using AC_SUBST) various environment variables that point to the located utilities. AC_PROG_INSTALL does the same thing for the install utility. To use this check, you need to use the associated Autoconf substitution variables in your Makefile.in templates, just as we did above with @CC@, @CFLAGS@, and @CPPFLAGS@. Example 4-3 illustrates these changes.

Example 4-3. src/Makefile.in: Substituting the install utility in your Makefile.in templates

...
# Tool-specific substitution variables
CC              = @CC@
CFLAGS          = @CFLAGS@
CPPFLAGS        = @CPPFLAGS@
INSTALL         = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@ ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

GNU Autoconf, Automake, and Libtool

GNU Autoconf, Automake, and Libtool

Gary V. Vaughan, Ben Elliston, Tom Tromey, Ian Lance Taylor
Red Hat® Linux® 7 Unleashed

Red Hat® Linux® 7 Unleashed

Bill Ball, David Pitts

Publisher Resources

ISBN: 9781593272067Errata