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 Compilers

The AC_PROG_CC macro ensures that the user's system has a working C-language compiler. Here's the prototype for this macro:

AC_PROG_CC([compiler-search-list])

If your code requires a particular flavor or brand of C compiler, you can pass a whitespace-separated list of program names in this argument. For example, if you use AC_PROG_CC([cc cl gcc]), the macro expands into shell code that searches for cc, cl, and gcc, in that order. Usually, the argument is omitted, allowing the macro to find the best compiler option available on the user's system.

You'll recall from An Even Quicker Start with autoscan in An Even Quicker Start with autoscan that when autoscan noticed C source files in the directory tree, it inserted a no-argument ...

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