[gnome-shell] Use AM_PATH_PYTHON to find Python >= 2.5



commit 3d499219da7505b16eaf8215493da5da40641bca
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Mon Aug 31 11:52:18 2009 -0400

    Use AM_PATH_PYTHON to find Python >= 2.5
    
    On OpenSolaris /usr/bin/python is 2.4; use AM_PATH_PYTHON to find
    a newer Python. (The PYTHON environment variable can also be set
    before running configure to override the search.)
    
    http://bugzilla.gnome.org/show_bug.cgi?id=578196

 configure.ac       |    4 ++++
 src/Makefile.am    |    1 +
 src/gnome-shell.in |    2 +-
 3 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a99f6b5..83ea03f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,6 +28,10 @@ AM_GLIB_GNU_GETTEXT
 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
 AM_GCONF_SOURCE_2
 
+# Get a value to substitute into gnome-shell.in
+AM_PATH_PYTHON([2.5])
+AC_SUBST(PYTHON)
+
 # We need at least this, since gst_plugin_register_static() was added
 # in 0.10.16, but nothing older than 0.10.21 has been tested.
 GSTREAMER_MIN_VERSION=0.10.16
diff --git a/src/Makefile.am b/src/Makefile.am
index b855287..9dd9ff8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -16,6 +16,7 @@ gnome-shell: gnome-shell.in
 	    -e "s|@libexecdir[ ]|$(libexecdir)|" \
 	    -e "s|@libdir[ ]|$(libdir)|" \
 	    -e "s|@pkgdatadir[ ]|$(pkgdatadir)|" \
+	    -e "s|@PYTHON[ ]|$(PYTHON)|" \
 	    -e "s|@sysconfdir[ ]|$(sysconfdir)|" \
 	    $< > $@ && chmod a+x $@
 CLEANFILES += gnome-shell
diff --git a/src/gnome-shell.in b/src/gnome-shell.in
index a9003a3..035ccd3 100644
--- a/src/gnome-shell.in
+++ b/src/gnome-shell.in
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#! PYTHON@
 
 import atexit
 import optparse



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]