[comp.mail.elm] Configure Glitch

mark@drd.UUCP (Mark Lawrence) (11/16/88)

Novice Alert.

I'm bringing up 2.1 on a Sun 3/50 running 3.5 for the first time.  After
specifiying 'bsd' and taking all the defaults, the Configure script 
barfs with:

	Configure: test: argument expected

right after I specify the place where pathaliases data is.  Running
sh with -v shows that the error occurs farther on down in or just after
the case statement:

		case "$OS_FLAG" in 
		XENIX286)
		    echo "Assuming that your crypt library is loaded with '-lcrypt'."
		    osdefine="-DXENIX"
		    libs="$libs -lcrypt"
		    large="-LARGE"
		    cflags="-Ml2et32"
		    lflags="-Ml2t32 -F 4000 -SEG 512"
		    ;;
		XENIX386)
		    echo "Assuming that your crypt library is loaded with '-lcrypt'."
		    osdefine="-DXENIX"
		    libs="-l$termlib -lcrypt"
		    ;;
		BSD)
		    osdefine="-DBSD"
		    lib2="-lcurses"
		    if [ $sequent != 1 ] ; then
			getopt=""
		    fi
		    ;;
		PYRAMID)
		    osdefine="-DBSD -DNO_VAR_ARGS"
		    lib2="-lcurses"
		    ;;
		UTS)
		    osdefine="-DUTS"
		    lib2="-la -lq"
		    libs="-lcurses"
		    ;;
		esac
		
		if [ $use_dbm = 1 ] ; then
		     libs="$libs -ldbm"
		fi

Would some kind soul e-mail me what I must do to the script to make it
run on Suns?
--
           ...sun!tulsun\           
         ...uunet!apctrc!drd!mark   mlawrence@jarsun1.ZONE1.COM
...rutgers!okstate!romed/           (918)743-3013

pae@cos.com (Paul A. Ebersman) (11/16/88)

> 		BSD)
> 		    osdefine="-DBSD"
> 		    lib2="-lcurses"
> 		    if [ $sequent != 1 ] ; then
> 			getopt=""

This is a bug in Configure that I believe was in patch01 for elm2.1.
The problem is that $sequent is null, and if it is not in double
quotes, the test statement thinks it is missing an argument. If this
is not in patch01, just put double qoutes around all variables that
don't have them.
-- 
               Paul A. Ebersman @ Corporation for Open Systems
  pae@cos.COM or pae%cos.com@uunet.uu.net or {uunet, sundc, hadron}!cos!pae
     ( The difference between practice and theory in practice is always
      greater than the difference between practice and theory in theory. )

chip@vector.UUCP (Chip Rosenthal) (11/18/88)

In article <312@drd.UUCP> mark@drd.UUCP (Le Noueveau Eaukee) writes:
>I'm bringing up 2.1 on a Sun 3/50 running 3.5 for the first time.  After
>specifiying 'bsd' and taking all the defaults, the Configure script 
>barfs with:
>
>	Configure: test: argument expected

Not a surprise.  Configure is really ugly.  I'll take the blame for this
foul-up.  I mucked with this particular section to add XENIX support, and
I probably introduced this bug.  I believe your problem is occuring in
the test command below:

>		BSD)
>		    osdefine="-DBSD"
>		    lib2="-lcurses"
>		    if [ $sequent != 1 ] ; then
>			getopt=""
>		    fi
>		    ;;

Simply add a couple of quotation marks, as follows:

>		    if [ "$sequent" != 1 ] ; then

Hopefully this will fix it.  I'm not involved in the development of the
next Elm release, but I'm told that Configure is going to be chucked and
Larry Wall's "dist" package will be used.  This will be a !big! improvement.
-- 
Chip Rosenthal     chip@vector.UUCP    |      Choke me in the shallow water
Dallas Semiconductor   214-450-5337    |         before I get too deep.