Browse Source

there is no need for python switch (wxGUI vdigit and nviz were
pythonized)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@45388 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 14 years ago
parent
commit
a7fa845f0f
6 changed files with 739 additions and 1048 deletions
  1. 734 939
      configure
  2. 4 85
      configure.in
  3. 0 6
      include/Make/Platform.make.in
  4. 0 15
      include/Make/Python.make
  5. 0 2
      include/gisdefs.h
  6. 1 1
      lib/init/variables.html

File diff suppressed because it is too large
+ 734 - 939
configure


+ 4 - 85
configure.in

@@ -8,11 +8,11 @@
 # PURPOSE:  	This configure runs all the tests to determine what components
 #   	    	are installed on the current system. It also defines certain
 #   	    	configuration variables for compilation and installation.
-# COPYRIGHT:    (C) 2000-2009 by the GRASS Development Team
+# COPYRIGHT:    (C) 2000-2009, 2011 by the GRASS Development Team
 #
-#               This program is free software under the GNU General Public
-#   	    	License (>=v2). Read the file COPYING that comes with GRASS
-#   	    	for details.
+#               This program is free software under the GNU General
+#   	    	Public License (>=v2). Read the file COPYING that
+#   	    	comes with GRASS for details.
 #
 # MANUAL:       http://www.gnu.org/software/autoconf/manual/autoconf.html
 # Website for   config.guess, config.sub:
@@ -267,13 +267,6 @@ AC_ARG_WITH(gdal,
                           enable GDAL/OGR support (gdal-config with path,
                           e.g. '--with-gdal=/usr/local/bin/gdal-config')])
 
-AC_ARG_WITH(python,
-[  --with-python[=path/python-config]
-                          enable support for Python SWIG bindings and wxGUI
-                          Python extensions (python-config with path, e.g.
-                          '--with-python=/usr/bin/python2.5-config',
-                          default: no)],, with_python="no")
-
 AC_ARG_WITH(wxwidgets,
 [  --with-wxwidgets[=path/wx-config]
                           enable wxWidgets support (wx-config with path,
@@ -1740,79 +1733,6 @@ fi
 AC_SUBST(USE_LARGEFILES)
 # Done large file support
 
-# Python check
-
-AC_MSG_CHECKING(whether to use Python)
-
-PYTHONINC=
-PYTHONCFLAGS=
-PYTHONLDFLAGS=
-SWIG=
-USE_PYTHON=
-MACOSX_ARCHS_PYTHON=
-
-if test "$with_python" = "no" ; then
-  AC_MSG_RESULT(no)
-else
-  AC_MSG_RESULT(yes)
-  USE_PYTHON="1"
-  if test "$with_python" != "yes" ; then
-    PY_CONFIG="$with_python"
-  fi
-
-  AC_PATH_PROG(PY_CONFIG, python-config, no)
-
-  if test "$PY_CONFIG" != "no" ; then
-    # With Python includes directory 
-
-    PYTHONINC=`"$PY_CONFIG" --includes`
-    LOC_CHECK_INCLUDES(Python.h,Python,$PYTHONINC)
-
-    PYTHONCFLAGS=`"$PY_CONFIG" --cflags`
-
-    # With Python library directory
-
-    PYTHONLDFLAGS=`"$PY_CONFIG" --ldflags`
-
-    # shouldn't have arch flags in C/LD flags on OSX
-    for a in i386 ppc x86_64 ppc64
-    do
-      PYTHONCFLAGS=`echo "$PYTHONCFLAGS" | sed "s/-arch  *$a//g"`
-      PYTHONLDFLAGS=`echo "$PYTHONLDFLAGS" | sed "s/-arch  *$a//g"`
-    done
-  fi
-
-  # look for the swig program
-  AC_PATH_PROG(SWIG, swig, no)
-
-  # if test "$SWIG" = "no" ; then
-  #   AC_MSG_ERROR([*** couldn't find swig])
-  # fi
-
-  # check for available OSX archs in Python, assume framework
-  if test -n "$MACOSX_ARCHS" ; then
-    pylib=`"$PY_CONFIG" --prefix`/Python
-    pylibinfo=`file -L "$pylib"`
-    for a in i386 ppc x86_64 ppc64
-    do
-      # add only if in MACOSX_ARCHS
-      if test -n "`echo \"$pylibinfo\" | grep \"library $a\"`" ; then
-        if test -n "`echo "$MACOSX_ARCHS" | grep $a`" ; then
-          MACOSX_ARCHS_PYTHON="$MACOSX_ARCHS_PYTHON -arch $a"
-        fi
-      fi
-    done
-  fi
-
-fi # Done checking Python
-
-AC_SUBST(PYTHONINC)
-AC_SUBST(PYTHONCFLAGS)
-AC_SUBST(PYTHONLDFLAGS)
-AC_SUBST(SWIG)
-AC_SUBST(USE_PYTHON)
-AC_SUBST(MACOSX_ARCHS_PYTHON)
-
 # Enable wxWidgets support (for wxGUI)
 
 AC_MSG_CHECKING(whether to use wxWidgets)
@@ -1967,7 +1887,6 @@ LOC_MSG_USE(OGR support,USE_OGR)
 LOC_MSG_USE(OpenGL support,USE_OPENGL)
 LOC_MSG_USE(PNG support,USE_PNG)
 LOC_MSG_USE(PostgreSQL support,USE_POSTGRES)
-LOC_MSG_USE(Python support,USE_PYTHON)
 LOC_MSG_USE(Readline support,USE_READLINE)
 LOC_MSG_USE(SQLite support,USE_SQLITE)
 LOC_MSG_USE(Tcl/Tk support,USE_TCLTK)

+ 0 - 6
include/Make/Platform.make.in

@@ -216,12 +216,6 @@ CAIRO_HAS_XRENDER_SURFACE = @CAIRO_HAS_XRENDER_SURFACE@
 
 #Python
 PYTHON              = python
-PYTHONINC           = @PYTHONINC@
-PYTHONCFLAGS        = @PYTHONCFLAGS@
-PYTHONLDFLAGS       = @PYTHONLDFLAGS@
-SWIG                = @SWIG@
-USE_PYTHON          = @USE_PYTHON@
-MACOSX_ARCHS_PYTHON = @MACOSX_ARCHS_PYTHON@
 
 #wxWidgets
 WXVERSION           = @WXVERSION@

+ 0 - 15
include/Make/Python.make

@@ -1,20 +1,5 @@
 
-ifeq ($(findstring darwin,$(ARCH)),darwin)
-PYMOD_LD = $(CXX) -bundle -undefined dynamic_lookup
-PYMOD_LDFLAGS := $(SHLIB_LDFLAGS) -L$(ARCH_LIBDIR)
-else
-PYMOD_LD = $(CXX) -shared
-PYMOD_LDFLAGS := $(SHLIB_LDFLAGS) -L$(ARCH_LIBDIR) $(PYTHONLDFLAGS)
-endif
-PYMOD_CFLAGS = $(SHLIB_CFLAGS) $(PYTHONINC) $(PYTHON_CFLAGS)
-
 PY_SOURCES := $(wildcard *.py)
 
 %.pyc: %.py
 	$(PYTHON) -m py_compile $<
-
-%_wrap.c %.py: %.i $(EXTRA_SWIG)
-	$(SWIG) $(INC) -python -module $* -shadow $<
-
-_%.so: $(OBJDIR)/%_wrap.o $(_%_so_FILES)
-	$(PYMOD_LD) -o $@ $(LDFLAGS) $(EXTRA_LDFLAGS) $(PYMOD_LDFLAGS) $(filter %.o,$^) $($*_LIBS) $(LIBES) $(EXTRA_LIBS)

+ 0 - 2
include/gisdefs.h

@@ -112,9 +112,7 @@ void G_ascii_check(char *);
  *  the G_asprintf macro is disabled until a stable version of GDAL
  *  with a different function becomes widely used 
  */
-#ifndef SWIG
 int G_vasprintf(char **, const char *, va_list);
-#endif
 int G_asprintf(char **, const char *, ...)
     __attribute__ ((format(printf, 2, 3)));
 

+ 1 - 1
lib/init/variables.html

@@ -236,7 +236,7 @@ text
   to trace the source of the error.</dd>
 
   <dt>GRASS_PYTHON</dt>
-  <dd>[wxGUI, Python SWIG]<br>
+  <dd>[wxGUI, Python Ctypes]<br>
     set to override Python executable.<br>
     On Mac OS X this should be the pythonw executable for the wxGUI to work.</dd>