autoconf
[Top][All Lists]
Advanced

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

MKS Bourne Shell "case" weirdness...


From: Lars J. Aas
Subject: MKS Bourne Shell "case" weirdness...
Date: Fri, 11 Jul 2003 15:11:27 +0200
User-agent: Mutt/1.3.24i

  Hi guys,

When porting our autoconf/automake/libtool setup for Coin
(www.coin3d.org) to work on MKS, I found that I had to apply the
following patch to Autoconf 2.57 to get the generated config.status
script to behave:

----------------------------------------------------------------------
--- lib/autoconf/status.m4.orig Thu Jun 12 15:46:43 2003
+++ lib/autoconf/status.m4      Fri Jun 13 16:05:01 2003
@@ -502,6 +502,7 @@
 
 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  true # MKS oddity
   case $ac_file in
   - | *:- | *:-:* ) # input from stdin
         cat >$tmp/stdin
@@ -933,6 +934,7 @@
 cat >>$CONFIG_STATUS <<\_ACEOF
 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  true # MKS oddity
   case $ac_file in
   - | *:- | *:-:* ) # input from stdin
         cat >$tmp/stdin
----------------------------------------------------------------------

and the following patch to Libtool 1.5 to make the generated libtool
script work:

----------------------------------------------------------------------
--- ltmain.in.orig      Fri Jun 13 11:59:42 2003
+++ ltmain.in   Wed Jun 18 12:19:39 2003
@@ -212,6 +212,7 @@
   fi
 
   # Have we seen a non-optional argument yet?
+  true # MKS weirdness
   case $arg in
   --help)
     show_help=yes
@@ -389,6 +390,7 @@
        ;;
 
       normal )
+       true # MKS weirdness
        # Accept any command-line options.
        case $arg in
        -o)
@@ -531,6 +531,7 @@
          if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; 
then
            # Evaluate the configuration.
            eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# 
### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
+           true # MKS weirdness
            case "$base_compile " in
            "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
              # The compiler in the base compile command matches
@@ -1635,6 +1636,7 @@
          if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; 
then
            # Evaluate the configuration.
            eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# 
### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
+           true # MKS weirdness
            case $base_compile in
            "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
              # The compiler in $compile_command matches
----------------------------------------------------------------------

Without inserting a dummy command above those "case" statements,
they would not run in certain cases, causing config.status/libtool
to mess up and break the build.  I could have used "echo" instead of
true, but using the nop/true ":" does not work.

Does anyone know anything about this bug in MKS' sh implementation?
Autoconf supports MKS so I would find it weird if noone has run into
similar problems earlier?  Is it possible that this is a local
problem for the given MKS user I am working with and that he may
have a somewhat faulty MKS installation or something?  It's
apparently the same on top of both NT4 and XP.

All ideas are appreciated...

There were BTW more problems wrt MKS porting, but I'm attacking this
one separately first...

  Lars J




reply via email to

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