Hi,

Attached are misc small trivia:

- Check for Python.h and error out if it was not found
- Honour AR and LD from the environment and add aal and xiar to the
  guess for AR
- Find the revision file in the source-directory

The revision file thing was ment to help with building out of the
source-tree, but this doesn't seem to be supported by distutils, as
you mentioned some days ago.

Please consider applying.
Thanks and cheers,
Bernhard


Index: Synopsis_0_8/src/configure.ac
===================================================================
--- Synopsis_0_8/src/configure.ac	(revision 1928)
+++ Synopsis_0_8/src/configure.ac	(working copy)
@@ -39,8 +39,10 @@ AC_PROG_CPP
 AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_RANLIB
-AC_CHECK_PROGS(AR, ar aal, ar)
+AC_CHECK_PROGS(AR, ar aal xiar, ar)
+AC_CHECK_PROGS(LD, ld xild, ld)
 AC_SUBST(AR)
+AC_SUBST(LD)
 AC_PROG_LN_S
 
 # Determine major, minor, and bugfix version
Index: Synopsis_0_8/setup.py
===================================================================
--- Synopsis_0_8/setup.py	(revision 1928)
+++ Synopsis_0_8/setup.py	(working copy)
@@ -20,7 +20,7 @@ module_ext = sysconfig.get_config_var('S
 def prefix(list, pref): return [pref + x for x in list]
 
 version = '0.10'
-revision = open('revision').read()[:-1]
+revision = open(os.path.join(os.path.dirname(sys.argv[0]),'revision')).read()[:-1]
 
 py_packages = ["Synopsis",
                "Synopsis.Parsers",
Index: Synopsis_0_8/config/python_ext.m4
===================================================================
--- Synopsis_0_8/config/python_ext.m4	(revision 1928)
+++ Synopsis_0_8/config/python_ext.m4	(working copy)
@@ -26,6 +26,8 @@ PYTHON_INCLUDE=`$PYTHON -c "from distuti
 AC_SUBST(PYTHON)
 AC_SUBST(PYTHON_INCLUDE)
 
+AC_CHECK_HEADERS(Python.h,[],[AC_MSG_ERROR([Python.h not found. Install python-dev])])
+
 LIBEXT=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_config_var('SO')" | tr -d "\r"`
 case `uname -s` in
 CYGWIN*)
