Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Next: , Up: Autoconf 2.13

17.6.1 Changed Quotation

The most important changes are invisible to you: the implementation of most macros have completely changed. This allowed more factorization of the code, better error messages, a higher uniformity of the user's interface etc. Unfortunately, as a side effect, some construct which used to (miraculously) work might break starting with Autoconf 2.50. The most common culprit is bad quotation.

For instance, in the following example, the message is not properly quoted:

     AC_CHECK_HEADERS(foo.h, ,
       AC_MSG_ERROR(cannot find foo.h, bailing out))

Autoconf 2.13 simply ignores it:

     $ autoconf-2.13; ./configure --silent
     creating cache ./config.cache
     configure: error: cannot find foo.h

while Autoconf 2.50 produces a broken configure:

     $ autoconf-2.50; ./configure --silent
     configure: error: cannot find foo.h
     ./configure: exit: bad non-numeric arg `bailing'
     ./configure: exit: bad non-numeric arg `bailing'

The message needs to be quoted, and the AC_MSG_ERROR invocation too!

     AC_INIT([Example], [1.0], [[email protected]])
     AC_CHECK_HEADERS([foo.h], [],
       [AC_MSG_ERROR([cannot find foo.h, bailing out])])

Many many (and many more) Autoconf macros were lacking proper quotation, including no less than... AC_DEFUN itself!

     $ cat
     [# My own much better version
     $ autoconf-2.13
     autoconf: Undefined macros:
     ***BUG in Autoconf--please report*** AC_FD_MSG
     ***BUG in Autoconf--please report*** AC_EPI[AC_PROG_INSTALL],
     $ autoconf-2.50

  Published under the terms of the GNU General Public License Design by Interspire