Package: autoconf
Version: 2.61-6
Severity: important

Hello,
Please consider a minimal configure.ac containing:
----8<-[cut here]-8<---------------------------------------8<-[cut here]-8<----
AC_INIT([IMMS],[3.0.2],[EMAIL PROTECTED])

AC_PREREQ([2.52g])

AC_REVISION($Id: configure.ac,v 1.30 2003/10/23 23:53:20 mag Exp $)

AC_PROG_CC

AC_MSG_CHECKING([for usability of initstate_r])

AC_TRY_RUN([#include <stdlib.h>
int main()
{
  static struct random_data rand_data;
  static char rand_state[256];
  initstate_r(0, rand_state, sizeof(rand_state), &rand_data);
  exit(0);
}], initstate_r_works=yes,, ])
----8<-[cut here]-8<---------------------------------------8<-[cut here]-8<----

then run autoconf on it and then run ./configure. There result is:

[EMAIL PROTECTED]:/tmp/c$ ./configure 
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for usability of initstate_r... ./configure: line 2573: syntax error 
near unexpected token `else'
./configure: line 2573: `else'

Around the line 2573 there is code:

2571 if test "$cross_compiling" = yes; then
2572 
2573 else
2574   { { echo "$as_me:$LINENO: error: cannot run test program while cross 
comp     iling
2575 See \`config.log' for more details." >&5
2576 echo "$as_me: error: cannot run test program while cross compiling
2577 See \`config.log' for more details." >&2;}
2578    { (exit 1); exit 1; }; }
2579 fi
2580 ]])

which is invalid. Please consider following shell script:
----8<-[cut here]-8<---------------------------------------8<-[cut here]-8<----
#!/bin/sh
if test "$1" = "foo"; then

else
echo There is no foo
fi
----8<-[cut here]-8<---------------------------------------8<-[cut here]-8<----

It always run with an error:
./foo: line 4: syntax error near unexpected token `else'
./foo: line 4: `else'

/bin/sh is a symlink to /bin/bash on my box.

Replacing the shebang line with #!/bin/dash doesn't help too:
./foo: 4: Syntax error: "else" unexpected

Valid script is:
----8<-[cut here]-8<---------------------------------------8<-[cut here]-8<----
#!/bin/sh
if test "$1" = "foo"; then
:;
else
echo There is no foo
fi
----8<-[cut here]-8<---------------------------------------8<-[cut here]-8<----

It runs correctly with bash and with dash.

My bash and dash versions:
||/ Name           Version        Description
+++-==============-==============-============================================
ii  bash           3.1dfsg-9      The GNU Bourne Again SHell
ii  dash           0.5.4-7        POSIX-compliant shell

I kindly ask to fix the bug ASAP, it makes me impossible (well, hard) to fix
http://bugs.debian.org/456686, which is serious.

Best regards
        Artur

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24-1-amd64 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=pl_PL (charmap=ISO-8859-2)
Shell: /bin/sh linked to /bin/bash

Versions of packages autoconf depends on:
ii  debianutils                   2.28.4     Miscellaneous utilities specific t
ii  m4                            1.4.10-1   a macro processing language
ii  perl                          5.8.8-12   Larry Wall's Practical Extraction 

Versions of packages autoconf recommends:
ii  automake [automaken]          1:1.10.1-3 A tool for generating GNU Standard

-- no debconf information

-- 
windows jest jak Odie - głupi jak but, cały czas się uśmiecha, a linux jak
Garfield - może i by coś zrobił, ale trzeba go najpierw do tego zmusić.
                                                        /yacoob/



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to