[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug#389558: autoconf: AC_PROG_GCC_TRADITIONAL throws error in comparisio
From: |
Ralf Wildenhues |
Subject: |
Bug#389558: autoconf: AC_PROG_GCC_TRADITIONAL throws error in comparision |
Date: |
Thu, 12 Oct 2006 08:54:01 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
[ apologies for the resend ]
[ this is http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=389558 ]
Hello,
* IOhannes m zmoelnig wrote on Wed, Sep 27, 2006 at 12:14:01PM CEST:
> Ralf Wildenhues wrote:
>
> >Could you show the package, configure invocation and output where you
> >are experiencing this with, so we can decide which of the above is the
> >case?
> i just noticed that the actual line throwing the error is:
>
> if test $ac_cv_c_compiler_gnu = yes; then
>
> after that it was simple to find the real source of troubles:
> i use autoconf/configure to configure a c++-application, so i only use
> AC_PROG_CXX (and not AC_PROG_CC !) before calling
> AC_PROG_GCC_TRADITIONAL (which i do for historical reasons...)
Well, then you can just remove that call of AC_PROG_GCC_TRADITIONAL.
First, with Autoconf-2.60, this macro is obsoleted anyway, then it was
ever only needed for dysfunctional `ioctl', see the manual:
| -- Macro: AC_PROG_GCC_TRADITIONAL
| Add `-traditional' to output variable `CC' if using the GNU C
| compiler and `ioctl' does not work properly without
| `-traditional'. That usually happens when the fixed header files
| have not been installed on an old system.
|
| This macro is obsolescent, since current versions of the GNU C
| compiler fix the header files automatically when installed.
and I bet you're not going to need that anyway in your C++-only code.
> since ac_cv_c_compiler_gnu is obviously not set by AC_PROG_CXX (but only
> by AC_PROG_CC), i get the following error (which was missing in the
> initial report):
>
> ./configure: line 3177: test: =: unary operator expected
But lastly, you may have a point, however small the relevance should be:
AC_PROG_GCC_TRADITIONAL should require AC_PROG_CC. The error may be
reproduced with this configure.ac script:
AC_INIT
AC_PROG_CXX
AC_LANG(C++)
AC_PROG_GCC_TRADITIONAL
Autoconf folks: OK to apply? Alternatively, how about if we just tag
the macro with a AC_DIAGNOSE([obsolete], ...)?
Cheers,
Ralf
* lib/autoconf/c.m4 (AC_PROG_GCC_TRADITIONAL): Require
AC_PROG_CC.
Report by IOhannes m zmoelnig <address@hidden>.
Index: lib/autoconf/c.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/c.m4,v
retrieving revision 1.236
diff -u -r1.236 c.m4
--- lib/autoconf/c.m4 6 Oct 2006 17:43:55 -0000 1.236
+++ lib/autoconf/c.m4 11 Oct 2006 19:56:45 -0000
@@ -611,7 +611,8 @@
# -----------------------
AN_FUNCTION([ioctl], [AC_PROG_GCC_TRADITIONAL])
AC_DEFUN([AC_PROG_GCC_TRADITIONAL],
-[if test $ac_cv_c_compiler_gnu = yes; then
+[AC_REQUIRE([AC_PROG_CC])dnl
+if test $ac_cv_c_compiler_gnu = yes; then
AC_CACHE_CHECK(whether $CC needs -traditional,
ac_cv_prog_gcc_traditional,
[ ac_pattern="Autoconf.*'x'"
- Bug#389558: autoconf: AC_PROG_GCC_TRADITIONAL throws error in comparision,
Ralf Wildenhues <=