[Xfce4-commits] <thunarx-python:master> More work on the build scripts
Adam Plumb
noreply at xfce.org
Thu May 27 18:10:09 CEST 2010
Updating branch refs/heads/master
to 836f65471e23858dbdea16910d80b19e0ce9da13 (commit)
from fc75031cf4668d93e81ed38dcc14ee915d253e77 (commit)
commit 836f65471e23858dbdea16910d80b19e0ce9da13
Author: Adam Plumb <adamplumb at gmail.com>
Date: Thu Sep 17 21:57:17 2009 -0400
More work on the build scripts
configure.ac | 20 +++++++++++---------
src/Makefile.am | 26 ++++++++++++++++++++++----
src/thunarxmodule.c | 6 +++---
3 files changed, 36 insertions(+), 16 deletions(-)
diff --git a/configure.ac b/configure.ac
index 7a47d00..7273782 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,14 +1,15 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.61)
+AC_PREREQ([2.61])
AC_INIT(thunarx-python, 0.0.1)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/thunarx-python.h])
-AC_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC
+AC_PROG_INSTALL
AC_PROG_LIBTOOL
# Check for programs
@@ -17,11 +18,12 @@ PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.6.0])
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.6.0])
PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.6.0])
PKG_CHECK_MODULES([PYGTK], [pygtk-2.0 >= 2.8.0])
+PKG_CHECK_MODULES([PYTHON_GNOME], [gnome-python-2.0])
-PACKAGE_CFLAGS="-g -Wall $THUNARX_CFLAGS $APR_CFLAGS $GTK_CFLAGS $GLIB_CFLAGS $GOBJECT_CFLAGS"
-PACKAGE_LIBS="-g $THUNARX_LIBS $APR_LIBS $GTK_LIBS $GLIB_LIBS $GOBJECT_LIBS"
-PACKAGE_LDFLAGS="$THUNARX_LDFLAGS $APR_LDFLAGS $GTK_LDFLAGS $GLIB_LDFLAGS $GOBJECT_LDFLAGS"
-PACKAGE_CPPFLAGS="$THUNARX_CPPFLAGS $APR_CPPFLAGS $GTK_CPPFLAGS $GLIB_CPPFLAGS $GOBJECT_CPPFLAGS"
+PACKAGE_CFLAGS="-g -Wall $THUNARX_CFLAGS $PYGTK_CFLAGS $GTK_CFLAGS $GLIB_CFLAGS $GOBJECT_CFLAGS $PYTHON_GNOME_CFLAGS"
+PACKAGE_LIBS="-g $THUNARX_LIBS $PYGTK_LIBS $GTK_LIBS $GLIB_LIBS $GOBJECT_LIBS $PYTHON_GNOME_LIBS"
+PACKAGE_LDFLAGS="$THUNARX_LDFLAGS $PYGTK_LDFLAGS $GTK_LDFLAGS $GLIB_LDFLAGS $GOBJECT_LDFLAGS $PYTHON_GNOME_LDFLAGS"
+PACKAGE_CPPFLAGS="$THUNARX_CPPFLAGS $PYGTK_CPPFLAGS $GTK_CPPFLAGS $GLIB_CPPFLAGS $GOBJECT_CPPFLAGS $PYTHON_GNOME_CPPFLAGS"
# Make dependency CFLAGS and LIBS available
AC_SUBST(PACKAGE_CFLAGS)
@@ -29,16 +31,16 @@ AC_SUBST(PACKAGE_LIBS)
AC_SUBST(PACKAGE_LDFLAGS)
AC_SUBST(PACKAGE_CPPFLAGS)
-PYTHON_CFLAGS="-I/usr/include/boost/python `python-config --includes`"
+PYTHON_CFLAGS="`python-config --includes`"
PYTHON_LIBS="`python-config --ldflags`"
AC_MSG_CHECKING(for pygtk defs)
-PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
+PYGTK_DEFSDIR=`pkg-config --variable=defsdir pygtk-2.0`
AC_SUBST(PYGTK_DEFSDIR)
AC_MSG_RESULT($PYGTK_DEFSDIR)
AC_MSG_CHECKING(for pygtk codegen)
-PYGTK_CODEGEN="/usr/bin/python `$PKG_CONFIG --variable=codegendir pygtk-2.0`/codegen.py"
+PYGTK_CODEGEN="/usr/bin/python `pkg-config --variable=codegendir pygtk-2.0`/codegen.py"
AC_SUBST(PYGTK_CODEGEN)
AC_MSG_RESULT($PYGTK_CODEGEN)
diff --git a/src/Makefile.am b/src/Makefile.am
index 604e2f2..c66f5a8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -13,7 +13,9 @@ libthunarx_python_la_LIBADD = \
$(PYTHON_LIBS)
libthunarx_python_la_LDFLAGS = \
- -module -pthread
+ -avoid-version \
+ -export-dynamic \
+ -module \
$(PACKAGE_LDFLAGS)
libthunarx_python_la_CPPFLAGS = \
@@ -26,10 +28,26 @@ libthunarx_python_la_CFLAGS = \
pyexec_LTLIBRARIES = libthunarx.la
pyexecdir = $(libdir)/thunarx-1/thunarx-python
-libthunarx_la_LIBADD = $(PACKAGE_LIBS)
-libthunarx_la_SOURCES = thunarxmodule.c
-nodist_libthunarx_la_SOURCES = thunarx.c
+libthunarx_la_CFLAGS = \
+ $(PACKAGE_CFLAGS) \
+ $(PYTHON_CFLAGS)
+
+libthunarx_la_LDFLAGS = \
+ $(PACKAGE_LDFLAGS) \
+ -module -avoid-version -export-symbols-regex initthunarx
+
+libthunarx_la_LIBADD = \
+ $(PACKAGE_LIBS) \
+ $(PYTHON_LIBS)
+
+libthunarx_la_SOURCES = \
+ thunarxmodule.c
+
+nodist_libthunarx_la_SOURCES = \
+ thunarx.c
+
thunarx.c: thunarx.defs thunarx.override
+
CLEANFILES = thunarx.c
EXTRA_DIST = thunarx.override thunarx.defs
diff --git a/src/thunarxmodule.c b/src/thunarxmodule.c
index a72ac2e..03d48c6 100644
--- a/src/thunarxmodule.c
+++ b/src/thunarxmodule.c
@@ -39,9 +39,9 @@ initthunarx(void)
{
PyObject *m, *d;
- if (!g_getenv("INSIDE_NAUTILUS_PYTHON")) {
- Py_FatalError("This module can only be used from thunarx");
- return;
+ if (!g_getenv("INSIDE_THUNARX_PYTHON")) {
+ Py_FatalError("This module can only be used from thunarx");
+ return;
}
init_pygobject ();
More information about the Xfce4-commits
mailing list