[GRASS-dev] Re: [GRASS GIS] #38: configure.in: wxwidgets and python checks

Martin Landa landa.martin at gmail.com
Fri Feb 8 16:49:24 EST 2008


Hi,

2008/2/8, Glynn Clements <glynn at gclements.plus.com>:
>
> GRASS GIS wrote:
>
> >  Based on Glynn's notes I updated the patch (see configure_wx-1.diff)
> >
> >  Instead of --with-python=path/py-config is used --with-python=path/python.
> >  Configure also checks for python-config.
> >
> >  {{{
> >    --with-python[=path/python] enable Python support (python with path,
> >  e.g. '--with-python=/usr/bin/python2.5', default: no)
> >    --with-wxwidgets[=path/wx-config] enable wxWidgets support (wx-config
> >  with path, e.g. '--with-wxwidgets=/usr/local/bin/wx-config', default: no)
> >  }}}
>
> I think that you really should be using python-config rather than
> trying to roll your own mechanism to achieve the same ends.

python-config is used if available, see

  AC_PATH_PROG(PY_CONFIG, python-config, no)

  # With Python includes directory

  if test "$PY_CONFIG" = "no" ; then
    PYTHONINC="`$PYTHON -c ['import sys
includepy = \"%s/include/python%s\" % (sys.prefix, sys.version[:3])
if sys.version[0] > \"1\" or sys.version[2] > \"4\":
    libpl = \"%s/include/python%s\" % (sys.exec_prefix, sys.version[:3])
else:
    libpl = \"%s/'$PYLIB'/python%s/config\" % (sys.exec_prefix, sys.version[:3])
print \"-I%s -I%s\" % (includepy, libpl)'`]"
  else
    PYTHONINC=`"$PY_CONFIG" --cflags`
  fi
  LOC_CHECK_INCLUDES(Python.h,Python,$PYTHONINC)

I am not sure if to require python-config.

Martin

-- 
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *


More information about the grass-dev mailing list