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
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
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_INIT
     AC_CHECK_HEADERS(foo.h, ,
       AC_MSG_ERROR(cannot find foo.h, bailing out))
     AC_OUTPUT

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])])
     AC_OUTPUT

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

     $ cat configure.in
     AC_DEFUN([AC_PROG_INSTALL],
     [# My own much better version
     ])
     AC_INIT
     AC_PROG_INSTALL
     AC_OUTPUT
     $ autoconf-2.13
     autoconf: Undefined macros:
     ***BUG in Autoconf--please report*** AC_FD_MSG
     ***BUG in Autoconf--please report*** AC_EPI
     configure.in:1:AC_DEFUN([AC_PROG_INSTALL],
     configure.in:5:AC_PROG_INSTALL
     $ autoconf-2.50
     $

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