gcl-devel
[Top][All Lists]
Advanced

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

Re: [Gcl-devel] Patch for configure.in


From: Gregory Wright
Subject: Re: [Gcl-devel] Patch for configure.in
Date: 19 Jun 2002 19:08:21 -0400

On Wed, 2002-06-19 at 17:02, Camm Maguire wrote:
> Greetings!  First of all, thank you for working on getting ilisp
> working! 
> 
> Gregory Wright <address@hidden> writes:
> 
> > --=-PbhhzNvdDj+5BROuZtgX
> > Content-Type: text/plain
> > Content-Transfer-Encoding: 7bit
> > 
> > 
> > Hi,
> > 
> > The attached patch adds the option to build without readline support.
> > Just say ./configure --without-readline. Building with readline support
> > remains the default, if it is available.
> > 
> 
> OK, I've committed a slight modification, as we seem to be using the
> enable/disable versions elsewhere.  You can ./configure --disable
> readline. 
>

I would suggest keeping the --with/--without, since (from the
autoconf-2.5 manual)

        Some packages require, or can optionally use, other software
        packages already installed. The user can give configure command
        line options to specify which such external software to use.
        The options have one of these forms:

                --with-package=[arg]
                --without-package

        ....

whereas

        If a software package has optional compile time features, the
        user can give configure command line options to specify whether
        to compile them. The options have one of these forms:

                --enable-feature=[arg]
                --disable-feature

        These allow the users to choose which optional features to build
        and install. `--enable-feature' options should never make a
        feature behave differently or cause one feature to replace
        another. They should only cause parts of the program to be
        built rather than left out.

Since we probably want to keep the build gnu-ishly correct, we should
look at the --enable/--disable options to see what category they fall
into. With your consent, I'll look at this for the configure.in buff-up
I mentioned.

Personally, I could live with either way.

 
> As Vadim had pointed out, this can be disabled at runtime, which is in
> general more flexible.  What I'd like to add to the gcl shell script
> is some basic checking of the TERM and/or TERMCAP environment
> variables, and conditionally initializing readline accordingly.  My
> question -- is there a portable way of doing this?  Or are TERM names
> too variable?  (i.e. vt100, vt102, xterm,....)  What about with Mingw?
> 
> > Suppressing readline support is required to use gcl under ilisp, the
> > emacs/xemacs inferior lisp mode.

The right way to do this is not in the shell script wrapper, but in the
initialization code for the front end itself. We want to call isatty to
test whether the standard input is a terminal or not. isatty should be
supported on any platform gcl builds on. If it indicates a terminal,
initialize readline, otherwise leave it off.

This is the approach taken by guile, IIRC.

Unfortunately, testing whether the shell was invoked interactively (by
checking whether the variable $- contains 'i') doesn't work. For a
script, $- always indicates a non-interactive shell.

> 
> OK, Are you sure?

Well, I think I've found a way to configure ilisp to work around the
readline issue, at least for ilisp + xemacs. I'm still beating on it to
be certain. We should probably retain the option to build without
readline, as problems like this happen whenever interactive applications
with line editing read from other processes via sockets or pipes. And
I'm always leery of shell script wrappers because of portability issues.


> > ilisp needs to be buffed up just a bit for gcl; I'm working on it.
> > 
> 
> Thanks!
> 
> > The other change is to add some m4 quoting ('[ ]'), which is required by
> > recent autoconfs. I use autoconf-2.5 and the gcl's old configure.in
> > generates a broken configure file under this version.
> > 
> 
> autoconf 2.5 is significantly incompatibile with 2.4 and earlier.  I
> applaud your efforts at making our configure.in (optimally) usable
> with both.  If you have to make many changes, I would suggest working
> with a copy, say configure2.5.in.  This way we won't jeopardize the
> current, quite important configure setup while we get 2.5 support
> working, and then can figure out whether we want to require 2.5, have
> it as an option, or whatever. 


configure.ac is the new orthodoxy. The old file can remain configure.in.
Yes, there are a many incompatible changes, but autoconf 2.5+ is a good
deal smarter and safer.

I agree that the configure.ac file should be made to work with both
autoconf 2.5x and (say) 2.13.

> 
> > configure.in needs a bit more help to make it bulletproof; I'll see when
> > I can get to it.
> > 
> 
> Agreed. Great!  
> 
> > Best Wishes,
> > Greg
> > 
> 
> Take care,
> 
> > 
> > -- 
> > 
> > Gregory Wright
> > Chief Technical Officer
> > PacketStorm Communications, Inc.
> > 20 Meridian Road
> > Eatontown, New Jersey 07724
> > 
> > 1 732 544-2434 ext. 206
> > 1 732 544-2437 [fax]
> > address@hidden
> > 
> > 
> > --=-PbhhzNvdDj+5BROuZtgX
> > Content-Disposition: attachment; filename=configure.in.diff
> > Content-Transfer-Encoding: quoted-printable
> > Content-Type: text/plain; charset=ISO-8859-1
> > 
> > --- gcl-2.5.0/configure.in  Mon Jun 17 08:52:31 2002
> > +++ gcl/configure.in        Mon Jun 17 17:30:23 2002
> > @@ -182,13 +182,18 @@
> >  #     declare it.
> >  #--------------------------------------------------------------------
> > =20
> > -AC_CHECK_FUNC(BSDgettimeofday, AC_DEFINE(HAVE_BSDGETTIMEOFDAY),
> > -   AC_CHECK_FUNC(gettimeofday, , AC_DEFINE(NO_GETTOD)))
> > +AC_CHECK_FUNC([BSDgettimeofday],
> > +              [AC_DEFINE(HAVE_BSDGETTIMEOFDAY)],
> > +         [AC_CHECK_FUNC([gettimeofday], ,
> > +                        [AC_DEFINE([NO_GETTOD])])])
> > +
> >  AC_MSG_CHECKING([for gettimeofday declaration])
> > -AC_EGREP_HEADER(gettimeofday, sys/time.h, AC_MSG_RESULT(present), [
> > -    AC_MSG_RESULT(missing)
> > -    AC_DEFINE(GETTOD_NOT_DECLARED)
> > -])
> > +
> > +AC_EGREP_HEADER([gettimeofday],
> > +                [sys/time.h],
> > +           [AC_MSG_RESULT([present])],
> > +           [AC_MSG_RESULT([missing])
> > +                    AC_DEFINE(GETTOD_NOT_DECLARED)])
> > =20
> > =20
> >  AC_CHECK_LIB(m,sin,LIBS=3D"${LIBS} -lm",true)
> > @@ -256,11 +261,19 @@
> >  fi
> >  AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS=3D"$LIBS -lns=
> > l"]))
> > =20
> > -AC_CHECK_LIB(readline,main,
> > -   AC_DEFINE(HAVE_READLINE)=20
> > -   LIBS=3D"$LIBS -lreadline -lncurses"
> > -   RL_OBJS=3Dreadline.o
> > -   RL_LIB=3Dlsp/readline.o,,-lncurses)
> > +AC_ARG_WITH([readline],
> > +       [--with-readline        enables readline support [[yes]]], ,
> > +       [ with_readline=3D"yes" ])
> > +    =20
> > +if test "$with_readline" =3D "yes" ; then
> > +   AC_CHECK_LIB([readline],
> > +                [main],
> > +                [AC_DEFINE(HAVE_READLINE)=20
> > +                 LIBS=3D"$LIBS -lreadline -lncurses"
> > +                 RL_OBJS=3Dreadline.o
> > +                 RL_LIB=3Dlsp/readline.o],,
> > +                [-lncurses])
> > +fi
> > =20
> >  if test "$enable_bfd" =3D "yes" ; then
> >     AC_CHECK_HEADER(bfd.h,
> > 
> > --=-PbhhzNvdDj+5BROuZtgX--
> > 
> > 
> > _______________________________________________
> > Gcl-devel mailing list
> > address@hidden
> > http://mail.gnu.org/mailman/listinfo/gcl-devel
> > 
> > 
> 
> -- 
> Camm Maguire                                          address@hidden
> ==========================================================================
> "The earth is but one country, and mankind its citizens."  --  Baha'u'llah
-- 

Gregory Wright
Chief Technical Officer
PacketStorm Communications, Inc.
20 Meridian Road
Eatontown, New Jersey 07724

1 732 544-2434 ext. 206
1 732 544-2437 [fax]
address@hidden





reply via email to

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