Opened 12 years ago

Closed 12 years ago

#38 closed task (fixed)

configure.in: wxwidgets and python checks

Reported by: martinl Owned by: grass-dev@…
Priority: minor Milestone: 6.4.0
Component: Default Version: svn-trunk
Keywords: Cc:
CPU: Unspecified Platform: Unspecified

Description

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

Attachments (4)

configure_wx.diff (3.5 KB) - added by martinl 12 years ago.
Add check for wxWidgets
configure_wx-1.diff (6.8 KB) - added by martinl 12 years ago.
updated patch
configure_wx-2.diff (6.5 KB) - added by martinl 12 years ago.
requires python-config
configure_wx-3.diff (5.9 KB) - added by martinl 12 years ago.
Requires python-config, --with-python=[path/python-config]

Download all attachments as: .zip

Change History (7)

Changed 12 years ago by martinl

Attachment: configure_wx.diff added

Add check for wxWidgets

comment:1 Changed 12 years ago by martinl

Type: defecttask

Changed 12 years ago by martinl

Attachment: configure_wx-1.diff added

updated patch

comment:2 Changed 12 years ago by martinl

From ML by Glynn Clements:

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.


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)

Changed 12 years ago by martinl

Attachment: configure_wx-2.diff added

requires python-config

Changed 12 years ago by martinl

Attachment: configure_wx-3.diff added

Requires python-config, --with-python=[path/python-config]

comment:3 Changed 12 years ago by martinl

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.