After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 532591 - patch to fix python detection (and add libtool 2.2 support)
patch to fix python detection (and add libtool 2.2 support)
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
: 546563 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-05-11 09:24 UTC by Rémi Cardona
Modified: 2008-08-14 13:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
totem-2.22.2-fix-python-and-libtool-2.2.patch (1.50 KB, patch)
2008-05-11 09:25 UTC, Rémi Cardona
none Details | Review

Description Rémi Cardona 2008-05-11 09:24:16 UTC
The current python detection "algorithm" is broken. It will hard disable python support even before actually checking for python.

This patch fixes the issue and renames some variables for improved clarity.

The m4_ifdef line at the top of the patch is for libtool 2.2 which no longer creates ./libtool when calling AC_PROG_LIBTOOL (it is now created with AC_OUTPUT). This macro forces libtool to create its scripts earlier (one of the python detection scripts needs ./libtool).

Patch already applied in Gentoo on top of 2.22.2, but svn trunk needs it too.

Thanks
Comment 1 Rémi Cardona 2008-05-11 09:25:14 UTC
Created attachment 110712 [details] [review]
totem-2.22.2-fix-python-and-libtool-2.2.patch
Comment 2 Rémi Cardona 2008-05-23 12:13:57 UTC
Ping?
Comment 3 Bastien Nocera 2008-06-10 13:13:39 UTC
I'd rather you split those 2 problems in different bugs.

For the libtool changes, could you please point me to documentation that would explain why libtool made that behavioural change?

And for the Python problem, I don't see in which cases Python could be disabled when present and requested.
Comment 4 Rémi Cardona 2008-06-10 14:01:39 UTC
(In reply to comment #3)
> I'd rather you split those 2 problems in different bugs.

I just grouped them for the sake of simplicity, the libtool 2.2 changes only being the first hunk of the patch.

> For the libtool changes, could you please point me to documentation that would
> explain why libtool made that behavioural change?

As I said in the first comment, AC_PROG_LIBTOOL no longer creates the "libtool" script. It's created in AC_OUTPUT so that things are created all at the same time (for consistency I guess? http://www.gnu.org/software/libtool/manual/libtool.html#index-LT_005fOUTPUT-113 http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=blob;f=ChangeLog.2005;hb=HEAD#l1448 that's all I could fine explaining the change)

> And for the Python problem, I don't see in which cases Python could be disabled
> when present and requested.

If using --{en,dis}able-python, it works fine. The second part of the patch just fixes autodetection :

On my system, if I just run configure, I will get the following :

checking whether Python plugin support is requested... autodetect
checking for a Python interpreter with version >= 2.3... python
checking for python... /usr/bin/python
checking for python version... 2.5
checking for python platform... linux2
checking for python script directory... ${prefix}/lib64/python2.5/site-packages
checking for python extension module directory... ${exec_prefix}/lib64/python2.5/site-packages
checking whether we can build a shared library depending on libpython... no
[...]
configure:    Python binding support disabled



If I run "./configure --enable-python"

checking whether Python plugin support is requested... yes
checking for a Python interpreter with version >= 2.3... python
checking for python... /usr/bin/python
checking for python version... 2.5
checking for python platform... linux2
checking for python script directory... ${prefix}/lib64/python2.5/site-packages
checking for python extension module directory... ${exec_prefix}/lib64/python2.5/site-packages
checking whether we can build a shared library depending on libpython... yes
checking for PYGTK... yes
checking for pygtk defs... /usr/share/pygtk/2.0/defs
checking for pygtk codegen... /usr/bin/python /usr/lib64/python2.5/site-packages/gtk-2.0/codegen/codegen.py
checking for pygtk h2def... /usr/bin/python /usr/lib64/python2.5/site-packages/gtk-2.0/codegen/h2def.py
[...]
configure: ** Python binding support enabled
Comment 5 Bastien Nocera 2008-08-14 13:05:05 UTC
*** Bug 546563 has been marked as a duplicate of this bug. ***
Comment 6 Bastien Nocera 2008-08-14 13:18:29 UTC
2008-08-14  Bastien Nocera  <hadess@hadess.net>

	* configure.in: Support libtool 2.2, don't try to check for
	presence of Python through compiling against it, as libtool is
	required to compile against it, and libtool isn't available yet
	during configure
	Adapted from patches by Rémi Cardona and Patryk Zawadzki
	(Closes: #532591)
	Also fix the message telling us whether Vala is enabled