• Subject: Re: python support in CVS.
  • From: Michael Madore <mmadore@xxxxxxxxxxxxxx>
  • Date: Sun, 26 Nov 2000 13:37:08 -0800
  • User-Agent: Mutt/1.2.5i

In my experience, ash is really not sufficiently bash compatible to use
automake/autoconf/libtool.


On Sun, Nov 26, 2000 at 10:04:33PM +1300, Carey Evans wrote:
> I've tried out the Python support, and I've found some problems with
> the configure.in code.  Some of this might be because my /bin/sh is
> ash, not bash.
> 
> When running configure, I get the following output:
> 
> checking for python... /usr/bin/python
> checking for python prefix... Traceback (innermost last):
>   File "<stdin>", line 3, in ?
> NameError: EOF
> /usr
> checking for python version... Traceback (innermost last):
>   File "<stdin>", line 3, in ?
> NameError: EOF
> 1.5
> 
> Part of the problem is that the <<EOF isn't being recognised by the
> shell.  There's also that standard error should be getting redirected
> to config.log.
> 
> Instead of the quite complicated code to work out the Python version,
> I'd suggest:
> 
>   PYTHON_VERSION="`$PYTHON -c 'import sys; print sys.version[[:3]]' 2>&5`"
> 
> with similar code for PYTHON_PREFIX.
> 
> Looking at the configure.in, I also wonder why the glib.m4 code that
> comes with glib isn't being used to set CFLAGS and LIBS, making it a
> lot simpler.  This patch makes both these changes.
> 
> --- configure.in.dist Sun Nov 26 21:41:45 2000
> +++ configure.in      Sun Nov 26 21:42:23 2000
> @@ -18,18 +18,9 @@
>  dnl *
>  dnl * Not using gnome, so look for glib and GTK+ instead.
>  dnl *
> -AC_PATH_PROG(GLIB_CONFIG,glib-config,no)
> -if test x$GLIB_CONFIG = xno ; then
> -     AC_MSG_ERROR(** Can't find glib-config.  Is glib installed? **)
> -fi
> -AC_MSG_CHECKING(for glib C flags)
> -GLIB_CFLAGS="`$GLIB_CONFIG --cflags glib`"
> +AM_PATH_GLIB
>  CFLAGS="$CFLAGS $GLIB_CFLAGS"
> -AC_MSG_RESULT($GLIB_CFLAGS)
> -AC_MSG_CHECKING(for glib libs)
> -GLIB_LIBS="`$GLIB_CONFIG --libs glib`"
>  LIBS="$LIBS $GLIB_LIBS"
> -AC_MSG_RESULT($GLIB_LIBS)
>  
>  dnl *
>  dnl * Check for SWIG
> @@ -44,22 +35,12 @@
>  AC_PATH_PROG(PYTHON,python,no)
>  if test x$PYTHON != xno ; then
>    AC_MSG_CHECKING(for python prefix)
> -changequote({,})dnl
> -  PYTHON_PREFIX="`$PYTHON <<EOF
> -import sys
> -print sys.exec_prefix
> -EOF`"
> -changequote([,])dnl
> +  PYTHON_PREFIX="`$PYTHON -c 'import sys; print sys.exec_prefix' 2>&5`"
>    AC_SUBST(PYTHON_PREFIX)
>    AC_MSG_RESULT($PYTHON_PREFIX)
>  
>    AC_MSG_CHECKING(for python version)
> -changequote({,})dnl
> -  PYTHON_VERSION="`$PYTHON <<EOF
> -import sys
> -print sys.version[:3]
> -EOF`"
> -changequote([,])dnl
> +  PYTHON_VERSION="`$PYTHON -c 'import sys; print sys.version[[:3]]' 2>&5`"
>    AC_SUBST(PYTHON_VERSION)
>    AC_MSG_RESULT($PYTHON_VERSION)
>  fi
> 
> 
> -- 
>        Carey Evans  http://home.clear.net.nz/pages/c.evans/
> +---
> | This is the LINUX5250 Mailing List!
> | To submit a new message, send your mail to LINUX5250@midrange.com.
> | To subscribe to this list send email to LINUX5250-SUB@midrange.com.
> | To unsubscribe from this list send email to LINUX5250-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: david@midrange.com
> +---

-- 
Mike Madore
Software Engineer
TurboLinux, Inc.
+---
| This is the LINUX5250 Mailing List!
| To submit a new message, send your mail to LINUX5250@midrange.com.
| To subscribe to this list send email to LINUX5250-SUB@midrange.com.
| To unsubscribe from this list send email to LINUX5250-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].