Subject: Re: New vesion 1.56

From: Zheng Gengbing <[email-masked]>
Date: Wed, 29 May 1996 11:19:49 +0800 (EAT)

On Tue, 28 May 1996, Guansong Zhang wrote:

> I forget one thing, on some systems, ranlib is needed.
> 

	Since it's difficult for me to access that machine and test , you'd
better deal with something yourself .

---

From: Zheng Gengbing <[email-masked]>
Date: Wed, 29 May 1996 15:46:15 +0800 (EAT)

On Tue, 28 May 1996, Guansong Zhang wrote:

> Do you know any good method to test on make to see if VPATH is supported,
> Please?
> 

	Sorry , I don't know . What I only know is that Gun make support
VPATH . But I never use that .

	Another thing , since it's near final exam , I will spend more
time on my courses and lab homework , so I cannot be here often.
hope you can excuse me .

Zheng

---

From: Zheng Gengbing <[email-masked]>
Date: Thu, 30 May 1996 08:23:47 +0800 (EAT)

On Wed, 29 May 1996, Guansong Zhang wrote:

> On May 29,  4:14pm, Zheng Gengbing wrote:
> > > I don't understand the following code in configure.in:
> > >
> > > lex ./config/conftest.l 1>conftest.$1 2>conftest.$2
> > > mv  lex.yy.c  conftestlex.c
> > > AC_EGREP_CPP(unsigned.*yytext..;$,
> > >   [
> > >    #include "conftestlex.c"
> > >   ] , AC_DEFINE(IS_UNSIGNED_CHAR)  \
> > >       echo set yytext--unsigned char
> > >     , echo set yytext--char )
> > >
> > > What are conftest.$1 and conftest.$2? How were they used?
> > >
> >
> > 	They are used as redirection files. In fact conftest* will be removed
> > automatically in configure .
> >
> 
> Please tell me where this is addressed, so I can look up. This is something too
> new to me.
>

	I don't know what you want to know ? AC_EGREP_CPP ? it is addressed
on the autoconf.ps . As to redirection , I have changed that to
   > /dev/null instead of a tmp file . 
 
> 
> > > It seems not all machine can generate this conftestlex.c file. I don't know
> its
> > > usage.
> > >
> > > And I also have a question about the regular expression you used, why you
> > > assume there are only two char after yytext and before ";"? A bug?
> > >
> >
> > 	To autoconf , [ & ] have special use ,so I use '.' to replace them .
> > I find a solution now .
> >
> 
> I still don't understand this. Why you mention &?
> 

	It's defficult to explain , try yourself .

> If I write the regular expression it will be:
> 
> unsigned.*yytext.*;$
>

	Well , you'll grep such thing as well :
	unsigned char yytextarr[];  

> instead of
> unsigned.*yytext..;$
> So I am lost again.

> Another thing, I think to add a special test for unsigned of signed char may
> not worth the effort. If we mixed the unsigned char or signed char, to the
> worst will only be a warning. (And I noticed, some machine don't care about
> this.) But to test this, an extra file has to be added, this is somewhat
> complicating the project, I think.
>

	You always give me difficult problem . I will use other means 
then .
 
> Comparatively speaking, array or pointer is more important. But I don't know
> what do you think about it. Please comment on this.
>

	I have write my test to test pointer instead of use autoconf's .
It seems effective now .

> Guansong

***************************************************************************
*     Zheng Gengbin                 *                                     *
*                                   *                                     *
*  Dept. of Computer Science        *  Phone:  86-10-2585088              *
*         & Technology              *  Email:                             *
*                                   *      [email-masked]   *
*  Peking University P.R.China      *  Mail:                              *
*                                   *      Room 1077 ,Building 47,        *
*                                   *      Peking University, P.R.China   *
***************************************************************************

---

From: Zheng Gengbing <[email-masked]>
Date: Fri, 31 May 1996 09:33:12 +0800 (EAT)

On Thu, 30 May 1996, Guansong Zhang wrote:

> On May 30,  8:23am, Zheng Gengbing wrote:
> > Subject: Re: New vesion 1.56
> I want to know how you can have a temp file, and after shell script execution,
> it is automatically removed. In fact, I want to know this feature for another
> project. So please give some hint.
>

	It's nothing mysterious , configure remove conftest* automatically
after every macro command .

> Well, just tell me where I can look up this.
>

	Maybe I made myself misunderstood . & is just and , which have no
other meaning .

> No, I just want to suggest the simplest solution. In fact, I don't know why you
> insist on writting our own test program. My idea is if something already in
> autoconf, use it, even if it is not power enough. Don't you agree?
>

	AC_YYTEXT_DECL is not effective as I tried . When I read the configure,
I found it use another way to check yytext which is not suit to our project.

> Well, if you think this is a good one, ...
>

---

From: Zheng Gengbing <[email-masked]>
Date: Fri, 31 May 1996 09:56:13 +0800 (EAT)

On Thu, 30 May 1996, Guansong Zhang wrote:

> 
> I think you new changing on configure.in so far is quite successful!
> 
> Still, I want ask questions, I am just learning shell programming from you.
> 
> 1. since we have AC_DECL_YYTEXT which will produce:
> 
> checking for -lfl... (cached) no
> checking lex output file root... (cached) lex.yy
> 
> when type configure, I think we did not need
> 
> LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
> 
> explicitly, right?
>

	You seem  not quite understand how configure works . 
LEX_OUTPUT_ROOT is just a temp shell variable . Using such variable instead
of $ac_cv_prog_lex_root is more clear , don't you think ? in fact when
configure run at this point , $ac_cv_prog_lex_root contains the value
of  lex.yy or others . 

> And I don't understand what it means by -lfl? Is it stand for array or pointer?
> Any relation between this checking and the check you write?
> 

	-lfl is to check if the lib -lfl is needed to link to the executable.

> It seems you checking not only can detect on whether yytext is a pointer or an
> array, but also can see if it is an unsigned one, right?
>

	Yes. I call AC_YYTEXT_DECL also , you can find sometimes autoconf
and my test get a diiferent vaule on if yytext is a pointer .
 
> How to decide to cach our own testing result?
>

	Yes, cache the value is a easy thing. 

> 2. conftest.l
> 
> Again, this is a tempary file which only exist when shell is executed, right? I
> guess I really need a good book on shell programming. I also don't understand
> things like <<, why this is need, what does it mean? And one more, who change
> EOF to ^D ?
> 

	This is called here file . You can refer to any book about shell
programming . EOF act as a flag to indicate the end of file .

> 3. changequote(,)dnl
> 
> I think you use this to deal with autoconf package' methods on dealing with [
> and ], but where the command come from, a shell command? I think if this is
> something inside autoconf, we'd better use your old method with two ".".
>

	This command is provied by autoconf .

> 4. rm -f "$LEX_OUTPUT_ROOT.c"
> 
> Why this time the lex.yy.c can not be a file like conftest.l removed
> automatically?
>

	You can see I use the lex.yy.c twice , so I don't want to delete
it after the first use .