On Feb 5, 2008, at 9:48 AM, grass-dev-request@lists.osgeo.org wrote:
Date: Tue, 05 Feb 2008 15:33:16 -0000
From: "GRASS GIS" <trac@osgeo.org>
Subject: [GRASS-dev] [GRASS GIS] #38: configure.in: wxwidgets and
python checks
To: undisclosed-recipients:;
Message-ID: <041.9c4978075f370c9d8e8e1cc30c0cf3f1@osgeo.org>
Content-Type: text/plain; charset="utf-8"
#38: configure.in: wxwidgets and python checks
---------------------+------------------------------------------------------
Reporter: martinl | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: minor | Milestone: 6.4.0
Component: default | Version: svn-trunk
Keywords: |
---------------------+------------------------------------------------------
Hi,
I modified the configure script to support wxWidgets. It checks
* if wx-config is presented
* wxWidgets version (>=2.8.1 required)
* check for wx/wxprec.h and wx/wxPython/pseudodc.h (wxPython required
too)
The patch also checks for Python.h header if --with-python is given.
This should solve compilation of wxGUI vdigit component
http://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/vdigit/Makefile.in
Martin
Martin,
Is this the main GRASS configure script or just a script for vdigit?
If the former, this could be a problem on a Mac, depending on how it searches for stuff. I don't think that wxWidgets is installed on a Mac along with wxPython. This is different on Linux machines. Also, as William mentioned yesterday, Python on a Mac is in a different place than it is for Linux--and in yet a different place for Windows.
Michael
Michael,
2008/2/5, Michael Barton <michael.barton@asu.edu>:
Is this the main GRASS configure script or just a script for vdigit?
yes, the "main" configure script (./configure). There no "local"
configure scripts. The patch adds new switch --with-wxwidgets to the
configure.
If the former, this could be a problem on a Mac, depending on how it
searches for stuff. I don't think that wxWidgets is installed on a
Mac along with wxPython. This is different on Linux machines. Also,
as William mentioned yesterday, Python on a Mac is in a different
place than it is for Linux--and in yet a different place for Windows.
Regards, Martin
Michael
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
--
Martin Landa <landa.martin@gmail.com> * http://gama.fsv.cvut.cz/~landa *
What does --with-wxwidgets do if you set it? What happens if you do not?
Michael
____________________
C. Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>
On Feb 5, 2008, at 10:11 AM, Martin Landa wrote:
Michael,
2008/2/5, Michael Barton <michael.barton@asu.edu>:
Is this the main GRASS configure script or just a script for vdigit?
yes, the "main" configure script (./configure). There no "local"
configure scripts. The patch adds new switch --with-wxwidgets to the
configure.
If the former, this could be a problem on a Mac, depending on how it
searches for stuff. I don't think that wxWidgets is installed on a
Mac along with wxPython. This is different on Linux machines. Also,
as William mentioned yesterday, Python on a Mac is in a different
place than it is for Linux--and in yet a different place for Windows.
Regards, Martin
Michael
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
grass-dev Info Page
-- Martin Landa <landa.martin@gmail.com> * http://gama.fsv.cvut.cz/~landa *
Hi,
2008/2/5, Michael Barton <michael.barton@asu.edu>:
What does --with-wxwidgets do if you set it? What happens if you do not?
from the ticket description
It checks
* if wx-config is presented
* wxWidgets version (>=2.8.1 required)
* check for wx/wxprec.h and wx/wxPython/pseudodc.h (wxPython required too)
The patch also checks for Python.h header if --with-python is given.
for vdigit it meas: it is compiled only when you give --with-python
and --with-widgets, otherwise vdigit would be not compiled.
Martin
Michael
____________________
C. Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>
On Feb 5, 2008, at 10:11 AM, Martin Landa wrote:
> Michael,
>
> 2008/2/5, Michael Barton <michael.barton@asu.edu>:
>> Is this the main GRASS configure script or just a script for vdigit?
>
> yes, the "main" configure script (./configure). There no "local"
> configure scripts. The patch adds new switch --with-wxwidgets to the
> configure.
>
>> If the former, this could be a problem on a Mac, depending on how it
>> searches for stuff. I don't think that wxWidgets is installed on a
>> Mac along with wxPython. This is different on Linux machines. Also,
>> as William mentioned yesterday, Python on a Mac is in a different
>> place than it is for Linux--and in yet a different place for Windows.
>
> Regards, Martin
>
>>
>> Michael
>> _______________________________________________
>> grass-dev mailing list
>> grass-dev@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-dev
>>
>
>
> --
> Martin Landa <landa.martin@gmail.com> * http://gama.fsv.cvut.cz/
> ~landa *
--
Martin Landa <landa.martin@gmail.com> * http://gama.fsv.cvut.cz/~landa *
On Feb 5, 2008, at 10:24 AM, Martin Landa wrote:
Hi,
2008/2/5, Michael Barton <michael.barton@asu.edu>:
What does --with-wxwidgets do if you set it? What happens if you do not?
from the ticket description
It checks
* if wx-config is presented
* wxWidgets version (>=2.8.1 required)
* check for wx/wxprec.h and wx/wxPython/pseudodc.h (wxPython required too)
The patch also checks for Python.h header if --with-python is given.
for vdigit it meas: it is compiled only when you give --with-python
and --with-widgets, otherwise vdigit would be not compiled.
Martin
That's fine Martin. Thanks. I'm trying to find out how it checks. Are the checks generic enough to work with Mac and Windows, or are they still hard coded to Linux locations?
Michael
Michael
____________________
C. Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>
On Feb 5, 2008, at 10:11 AM, Martin Landa wrote:
Michael,
2008/2/5, Michael Barton <michael.barton@asu.edu>:
Is this the main GRASS configure script or just a script for vdigit?
yes, the "main" configure script (./configure). There no "local"
configure scripts. The patch adds new switch --with-wxwidgets to the
configure.
If the former, this could be a problem on a Mac, depending on how it
searches for stuff. I don't think that wxWidgets is installed on a
Mac along with wxPython. This is different on Linux machines. Also,
as William mentioned yesterday, Python on a Mac is in a different
place than it is for Linux--and in yet a different place for Windows.
Regards, Martin
Michael
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
grass-dev Info Page
--
Martin Landa <landa.martin@gmail.com> * http://gama.fsv.cvut.cz/
~landa *
--
Martin Landa <landa.martin@gmail.com> * http://gama.fsv.cvut.cz/~landa *
Hi,
2008/2/5, Michael Barton <michael.barton@asu.edu>:
> 2008/2/5, Michael Barton <michael.barton@asu.edu>:
>> What does --with-wxwidgets do if you set it? What happens if you
>> do not?
>
> from the ticket description
>
> It checks
>
> * if wx-config is presented
> * wxWidgets version (>=2.8.1 required)
> * check for wx/wxprec.h and wx/wxPython/pseudodc.h (wxPython
> required too)
>
> The patch also checks for Python.h header if --with-python is given.
>
> for vdigit it meas: it is compiled only when you give --with-python
> and --with-widgets, otherwise vdigit would be not compiled.
>
> Martin
That's fine Martin. Thanks. I'm trying to find out how it checks. Are
the checks generic enough to work with Mac and Windows, or are they
still hard coded to Linux locations?
if you look at gui/wxpython/vdigit/Makefile, only one location is
still hard-coded, the includes for python
-I/usr/include/python$(PYTHONVERSION)
The patch checks for Python.h and include directory, it should work on
Mac/Windows too.
Martin
--
Martin Landa <landa.martin@gmail.com> * http://gama.fsv.cvut.cz/~landa *
On Feb 5, 2008, at 10:45 AM, Martin Landa wrote:
Hi,
2008/2/5, Michael Barton <michael.barton@asu.edu>:
2008/2/5, Michael Barton <michael.barton@asu.edu>:
What does --with-wxwidgets do if you set it? What happens if you
do not?
from the ticket description
It checks
* if wx-config is presented
* wxWidgets version (>=2.8.1 required)
* check for wx/wxprec.h and wx/wxPython/pseudodc.h (wxPython
required too)
The patch also checks for Python.h header if --with-python is given.
for vdigit it meas: it is compiled only when you give --with-python
and --with-widgets, otherwise vdigit would be not compiled.
Martin
That's fine Martin. Thanks. I'm trying to find out how it checks. Are
the checks generic enough to work with Mac and Windows, or are they
still hard coded to Linux locations?
if you look at gui/wxpython/vdigit/Makefile, only one location is
still hard-coded, the includes for python
-I/usr/include/python$(PYTHONVERSION)
The patch checks for Python.h and include directory, it should work on
Mac/Windows too.
Martin
OK, my standard MacPython include directory and Python.h are at /Library/Frameworks/Python.framework/Versions/2.5/include/Python.h
wx is down a similar path.
Michael
--
Martin Landa <landa.martin@gmail.com> * http://gama.fsv.cvut.cz/~landa *
On Feb 5, 2008, at 11:45 AM, Martin Landa wrote:
Hi,
2008/2/5, Michael Barton <michael.barton@asu.edu>:
That's fine Martin. Thanks. I'm trying to find out how it checks. Are
the checks generic enough to work with Mac and Windows, or are they
still hard coded to Linux locations?
if you look at gui/wxpython/vdigit/Makefile, only one location is
still hard-coded, the includes for python
-I/usr/include/python$(PYTHONVERSION)
The patch checks for Python.h and include directory, it should work on
Mac/Windows too.
Martin
This is not good. Unless the --with-python include dir is also used. (RE my suggestion from the GDAL configure) I don't see anything in configure that sets a python include dir. In fact, I don't see the wxwidgets option either - are you sure it's in SVN now?
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
The equator is so long, it could encircle the earth completely once.
Hi
2008/2/5, William Kyngesburye <woklist@kyngchaos.com>:
[snip]
This is not good. Unless the --with-python include dir is also used.
(RE my suggestion from the GDAL configure) I don't see anything in
configure that sets a python include dir. In fact, I don't see the
wxwidgets option either - are you sure it's in SVN now?
the patch is attached to the ticket, see
http://trac.osgeo.org/grass/attachment/ticket/38/configure_wx.diff
not submitted to svn, since the review is needed...
Martin
--
Martin Landa <landa.martin@gmail.com> * http://gama.fsv.cvut.cz/~landa *
On Feb 5, 2008, at 11:00 AM, William Kyngesburye wrote:
On Feb 5, 2008, at 11:45 AM, Martin Landa wrote:
Hi,
2008/2/5, Michael Barton <michael.barton@asu.edu>:
That's fine Martin. Thanks. I'm trying to find out how it checks. Are
the checks generic enough to work with Mac and Windows, or are they
still hard coded to Linux locations?
if you look at gui/wxpython/vdigit/Makefile, only one location is
still hard-coded, the includes for python
-I/usr/include/python$(PYTHONVERSION)
The patch checks for Python.h and include directory, it should work on
Mac/Windows too.
Martin
This is not good. Unless the --with-python include dir is also used. (RE my suggestion from the GDAL configure) I don't see anything in configure that sets a python include dir. In fact, I don't see the wxwidgets option either - are you sure it's in SVN now?
The basic idea is sound -- do a check at configure to see if the resources are present to compile vdigit and set it to compile or not compile accordingly.
We just need to make this generic enough to encompass the cross-platform variation in Python installations.
Michael
Ah, I see. Somehow I assumed that it was SVN already...
Looks good for OSX, though I'm not comfortable rebuilding configure from configure.in to be able to test it.
On Feb 5, 2008, at 12:03 PM, Martin Landa wrote:
Hi
2008/2/5, William Kyngesburye <woklist@kyngchaos.com>:
[snip]
This is not good. Unless the --with-python include dir is also used.
(RE my suggestion from the GDAL configure) I don't see anything in
configure that sets a python include dir. In fact, I don't see the
wxwidgets option either - are you sure it's in SVN now?
the patch is attached to the ticket, see
http://trac.osgeo.org/grass/attachment/ticket/38/configure_wx.diff
not submitted to svn, since the review is needed...
Martin
--
Martin Landa <landa.martin@gmail.com> * http://gama.fsv.cvut.cz/~landa *
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
"Oh, look, I seem to have fallen down a deep, dark hole. Now what does that remind me of? Ah, yes - life."
- Marvin
Martin Landa wrote:
Hi,
2008/2/5, Michael Barton <michael.barton@asu.edu>:
> > 2008/2/5, Michael Barton <michael.barton@asu.edu>:
> >> What does --with-wxwidgets do if you set it? What happens if you
> >> do not?
> >
> > from the ticket description
> >
> > It checks
> >
> > * if wx-config is presented
> > * wxWidgets version (>=2.8.1 required)
> > * check for wx/wxprec.h and wx/wxPython/pseudodc.h (wxPython
> > required too)
> >
> > The patch also checks for Python.h header if --with-python is given.
> >
> > for vdigit it meas: it is compiled only when you give --with-python
> > and --with-widgets, otherwise vdigit would be not compiled.
> >
> > Martin
>
> That's fine Martin. Thanks. I'm trying to find out how it checks. Are
> the checks generic enough to work with Mac and Windows, or are they
> still hard coded to Linux locations?
if you look at gui/wxpython/vdigit/Makefile, only one location is
still hard-coded, the includes for python
-I/usr/include/python$(PYTHONVERSION)
You should probably use python-config to get this information.
I would suggest that --with-wxwidgets and --with-python take optional
arguments specifying the path to the wx-config and python-config
utilities respectively, in case they aren't in the path. --with-gdal
already behaves like this.
Also, is there any need to have vdigit/Makefile generated from
Makefile.in. Can the configuration settings not go into
Platform.make[.in]? vdigit/Makefile already includes Platform.make via
Lib.make.
The patch checks for Python.h and include directory, it should work on
Mac/Windows too.
The configure checks might work, but the hard-coded linking switches
and ".so" won't work. I suggest trying to mimic a normal library build
as closely as possible.
--
Glynn Clements <glynn@gclements.plus.com>