autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: conditionally compiling C++ code


From: Peter Eisentraut
Subject: Re: conditionally compiling C++ code
Date: Mon, 28 Apr 2003 23:00:47 +0200 (CEST)

Steve M. Robbins writes:

> But this third way doesn't work!  AC_PROG_CXX fails if there is no C++
> compiler and configure aborts.
> The lack of a nonfatal check for C++ is the cause of my complaint,
> too.

I would advise against writing configure scripts that check whether some
library or program exists, and if not, automatically disable some feature
of the package altogether.  This leads to tons of problems downstream.

Example: For years, we shipped a configure script with the logic that if
readline wasn't installed, fancy command-line editing was automatically
disabled.  Since readline is often installed in locations that are not
searched by default, it was omitted, and we received weekly complaints
about "the cursor keys don't work".  That was the less serious version.
The serious version was that a major Linux distributor apparently missed
some minor detail in his RPM specs, and so the whole package was shipped
without readline support to the world.

I suggest that you add an option to your configure script
--enable-stuff-that-requires-c++.  Choose the default sense as you wish.
But then users always get exactly what they ask for and never have to read
the build output flying by or have to wait until the program is installed
to see what happened.

-- 
Peter Eisentraut   address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]