diff --git a/.gitignore b/.gitignore index ae152ff7..d5cddf02 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ *~ Makefile Makefile.in +*.deps # Absolute @@ -19,7 +20,6 @@ missing py-compile stamp-h1 dbus-installed.conf - intltool-extract intltool-extract.in intltool-merge @@ -35,4 +35,10 @@ po/*.gmo sugar/__installed__.py tools/sugar-setup-activity shell/PresenceService/org.laptop.Presence.service -threadframe/build +threadframe +config.guess +config.sub +depcomp +libtool +ltmain.sh +po/ChangeLog diff --git a/Makefile.am b/Makefile.am index 5d9791fa..902e2b38 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,24 @@ -SUBDIRS = activities shell sugar tools threadframe +SUBDIRS = activities po shell sugar tools threadframe dbusconfdir = $(pkgdatadir) dbusconf_DATA = dbus-installed.conf install-data-local: - sugar/setup.py $(top_srcdir)/activities $(pkgdatadir)/activities $(bindir)/sugar-activity-factory + $(top_srcdir)/sugar/setup.py \ + $(top_srcdir)/activities \ + $(DESTDIR)$(pkgdatadir)/activities \ + $(bindir)/sugar-activity-factory + +uninstall-local: + rm -rf $(DESTDIR)$(pkgdatadir)/activities/*.activity + rm -rf $(DESTDIR)$(pkgdatadir)/activities/*.service + +DISTCLEANFILES = \ + intltool-extract \ + intltool-merge \ + intltool-update + +EXTRA_DIST = \ + intltool-merge.in \ + intltool-update.in \ + intltool-extract.in diff --git a/configure.ac b/configure.ac index ab66e07c..3bf52007 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,8 @@ -AC_INIT([Sugar],[0.18],[],[sugar]) +AC_INIT([Sugar],[0.19],[],[sugar]) AC_PREREQ([2.59]) +AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_SRCDIR([configure.ac]) @@ -9,7 +10,11 @@ AM_INIT_AUTOMAKE([1.9 foreign dist-bzip2 no-dist-gzip]) AM_MAINTAINER_MODE +AC_DISABLE_STATIC +AC_PROG_LIBTOOL + AM_PATH_PYTHON +AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)]) # # Setup GETTEXT diff --git a/m4/python.m4 b/m4/python.m4 new file mode 100644 index 00000000..e1c5266d --- /dev/null +++ b/m4/python.m4 @@ -0,0 +1,62 @@ +## this one is commonly used with AM_PATH_PYTHONDIR ... +dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]]) +dnl Check if a module containing a given symbol is visible to python. +AC_DEFUN([AM_CHECK_PYMOD], +[AC_REQUIRE([AM_PATH_PYTHON]) +py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` +AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1) +AC_CACHE_VAL(py_cv_mod_$py_mod_var, [ +ifelse([$2],[], [prog=" +import sys +try: + import $1 +except ImportError: + sys.exit(1) +except: + sys.exit(0) +sys.exit(0)"], [prog=" +import $1 +$1.$2"]) +if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC + then + eval "py_cv_mod_$py_mod_var=yes" + else + eval "py_cv_mod_$py_mod_var=no" + fi +]) +py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"` +if test "x$py_val" != xno; then + AC_MSG_RESULT(yes) + ifelse([$3], [],, [$3 +])dnl +else + AC_MSG_RESULT(no) + ifelse([$4], [],, [$4 +])dnl +fi +]) + +dnl a macro to check for ability to create python extensions +dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE]) +dnl function also defines PYTHON_INCLUDES +AC_DEFUN([AM_CHECK_PYTHON_HEADERS], +[AC_REQUIRE([AM_PATH_PYTHON]) +AC_MSG_CHECKING(for headers required to compile python extensions) +dnl deduce PYTHON_INCLUDES +py_prefix=`$PYTHON -c "import sys; print sys.prefix"` +py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` +PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" +if test "$py_prefix" != "$py_exec_prefix"; then + PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" +fi +AC_SUBST(PYTHON_INCLUDES) +dnl check if the headers exist: +save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" +AC_TRY_CPP([#include ],dnl +[AC_MSG_RESULT(found) +$1],dnl +[AC_MSG_RESULT(not found) +$2]) +CPPFLAGS="$save_CPPFLAGS" +]) diff --git a/po/POTFILES.in b/po/POTFILES.in index 249b86f0..ff93532d 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,5 +1,5 @@ -shell/PresenceWindow.py -shell/StartPage.py activities/browser/NavigationToolbar.py -shell/shell.py sugar/chat/ChatEditor.py +activities/chat/ChatActivity.py +activities/groupchat/GroupChatActivity.py +shell/PresenceView.py diff --git a/shell/Makefile.am b/shell/Makefile.am index 61483ae8..dbaefdd9 100644 --- a/shell/Makefile.am +++ b/shell/Makefile.am @@ -21,4 +21,4 @@ sugar_PYTHON = \ PresenceView.py \ Shell.py -EXTRA_DIST = sugar +EXTRA_DIST = $(bin_SCRIPTS) diff --git a/shell/PresenceService/Makefile.am b/shell/PresenceService/Makefile.am index b80f2245..1710d540 100644 --- a/shell/PresenceService/Makefile.am +++ b/shell/PresenceService/Makefile.am @@ -12,3 +12,7 @@ sugar_PYTHON = \ Buddy.py \ PresenceService.py \ Service.py + +DISTCLEANFILES = $(service_DATA) + +EXTRA_DIST = $(service_in_files) diff --git a/threadframe/Makefile.am b/threadframe/Makefile.am index e2cbd43e..01ce6b1e 100644 --- a/threadframe/Makefile.am +++ b/threadframe/Makefile.am @@ -1,13 +1,6 @@ -all: - python setup.py build +INCLUDES = $(PYTHON_INCLUDES) -install: - python setup.py install --prefix=${prefix} - -uninstall: - rm -f ${prefix}/lib/python2.4/site-packages/threadframe.so - -clean: - python setup.py clean - -rm -rf build - -rm -f core *~ *.so *.o *.pyd *.a python*.def +threadframedir = $(pyexecdir) +threadframe_la_LDFLAGS = -module -avoid-version +threadframe_LTLIBRARIES = threadframe.la +threadframe_la_SOURCES = threadframemodule.c