You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Charles Randall <cr...@matchlogic.com> on 2001/05/23 00:13:34 UTC

Apache 2.0's config.status vs FreeBSD 4.2-R sh

While trying to build a fresh copy of Apache 2.0 from Apache's anonymous CVS
repository on FreeBSD 4.2-R (after building and installing GNU m4, libtool,
and autoconf), I ran into the following error,

% ./buildconf
% ./configure
...
./config.status: 715: Syntax error: "done" unexpected (expecting ")")

A syntax check confirms this,

% sh -n config.status
config.status: 715: Syntax error: "done" unexpected (expecting ")")

The offending section of config.status looks like,

     709 # CONFIG_COMMANDS section.
     710 #
     711 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: &&
continue
     712   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
     713   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
     714 
     715   case $ac_dest in
     716   esac
     717 done

FreeBSD 4.2-R's sh manual page says,

     The syntax of the case command is
           case word in
           pattern) list ;;
           ...
           esac

     The pattern can actually be one or more patterns (see Shell
                                 ^^^^^^^^^^^^^^^^^^^^
     Patterns described later), separated by ``|'' characters.

So, this is failing because there are no patterns between the case and esac
in lines 715 and 716.

To confirm this, I changed config.status manually as shown here

--- config.status       Tue May 22 15:16:37 2001
+++ backup/config.status        Tue May 22 15:15:40 2001
@@ -713,8 +713,6 @@
   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
 
   case $ac_dest in
-    *)
-    ;;
   esac
 done

and config.status runs to completion (when run by hand, of course).

This makes me ask a few questions,

1) Is FreeBSD 4.2-R's sh implementation conformant? At first glance, it
doesn't appear that the Single Unix Spec V2 covers this detail but I'm sure
that I could have missed it.

Search for the second occurrence of "esac" in this document,

http://www.opengroup.org/onlinepubs/007908799/xcu/chap2.html

2) Is configure emitting conformant sh code for this example?

3) Is there a workaround?

Charles

Re: Apache 2.0's config.status vs FreeBSD 4.2-R sh

Posted by "Roy T. Fielding" <fi...@ebuilt.com>.
On Tue, May 22, 2001 at 04:13:34PM -0600, Charles Randall wrote:
> 2) Is configure emitting conformant sh code for this example?

Probably not.

> 3) Is there a workaround?

Use ./config.nice instead.  I don't bother with config.status myself.

....Roy


Re: Apache 2.0's config.status vs FreeBSD 4.2-R sh

Posted by Sascha Schumann <sa...@schumann.cx>.
On Tue, 22 May 2001, Charles Randall wrote:

> While trying to build a fresh copy of Apache 2.0 from Apache's anonymous CVS
> repository on FreeBSD 4.2-R (after building and installing GNU m4, libtool,
> and autoconf), I ran into the following error,

    You might want to use autoconf-2.13 for now; autoconf-2.50
    incorporates some drastic changes and might need some
    improvements before becoming as portable as 2.13 is right
    now.

> 1) Is FreeBSD 4.2-R's sh implementation conformant? At first glance, it
> doesn't appear that the Single Unix Spec V2 covers this detail but I'm sure
> that I could have missed it.

    FreeBSD's implementation is aligned with IEEE 1003.1.

> 2) Is configure emitting conformant sh code for this example?

    No.  It is caused by acgeneral.m4, around line 4420:

  case $ac_dest in
AC_LIST_COMMANDS_COMMANDS()dnl
  esac

> 3) Is there a workaround?

    Yes (see above).

    - Sascha                                     Experience IRCG
      http://schumann.cx/                http://schumann.cx/ircg