autoconf
[Top][All Lists]
Advanced

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

Warning on OpenBSD 2.7


From: Pavel Roskin
Subject: Warning on OpenBSD 2.7
Date: Tue, 22 May 2001 20:36:23 -0400 (EDT)

Hello!

First of all, I apologize for not having tested Autoconf on OpenBSD 2.7
immediately before the release. I had tested it few days before that, and
it worked. I didn't check the latest CPP changes. I accept full
responsibility for letting this problem go into 2.50 :-(

The "configure" script created by Autoconf-2.50 from the following file:

AC_INIT
AC_PROG_CPP
AC_OUTPUT

emits a warning when it's run by the native shell on OpenBSD 2.7:

./configure[1668]: break: can only break 1 level(s)

Indeed, "break 2" is inside one loop only. The comment in AC_PROG_CPP
says: "break 2 since there is a loop in there". But it's not true -
_AC_PROG_PREPROC_WORKS_IFELSE expands $1 after the loop.

Unfortunately, the warning in /bin/sh on OpenBSD causes several tests to
fail. I don't think there may be any real problems, since AC_PROG_CPP is
highly unlikely to be called in a loop.

Here's the fix. ChangeLog:

        * aclang.m4 (AC_PROG_CPP): Use `break' instead of `break 2' since
        _AC_PROG_PREPROC_WORKS_IFELSE expands arguments outside the loop.
        (AC_PROG_CXXCPP): Likewise.

____________________________________
--- aclang.m4
+++ aclang.m4
@@ -881,8 +881,7 @@
     # Double quotes because CPP needs to be expanded
     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
     do
-      # break 2 since there is a loop in there.
-      _AC_PROG_PREPROC_WORKS_IFELSE([break 2])
+      _AC_PROG_PREPROC_WORKS_IFELSE([break])
     done
     ac_cv_prog_CPP=$CPP
   ])dnl
@@ -1089,8 +1088,7 @@
     # Double quotes because CXXCPP needs to be expanded
     for CXXCPP in "$CXX -E" "/lib/cpp"
     do
-      # break 2 since there is a loop in there.
-      _AC_PROG_PREPROC_WORKS_IFELSE([break 2])
+      _AC_PROG_PREPROC_WORKS_IFELSE([break])
     done
     ac_cv_prog_CXXCPP=$CXXCPP
   ])dnl
____________________________________

Regards,
Pavel Roskin




reply via email to

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