[Orbit-python-list] [patch] make autogen.sh (automake really) work on Debian
Status: Inactive
Brought to you by:
tack
From: Sune K. <su...@in...> - 2001-01-29 20:12:38
|
Hi all, A few days ago I co'ed the CVS-tree, and to my dismay discovered that it was quite uncompilable on my Debian box (a somewhat outdated unstable is installed here). This was due to (1) the lack of configure and friends in the CVS tree (they seem to have appeared in the meanwhile, yay!), and (2) autogen.sh being borken with the Debian automake (version 1.4, unpatched I think). So, I set out to fix the problem, which resulted in the following patch. The patch makes orbit-python compilable on my Debian box, by looking inside automake to see if it contains the string "handle_python", and if not create a patched automake in the build directory (and instructing aclocal to look in the python-am-changes directory). This might not be the finest of solutions, but for me it sure beats not being able to compile other than by hand :-). Regards, P.S. I copied the patch in below my signature, verbatim, it's something like 60 lines long, so I though that would be best. Please say if you prefer it otherwise, even for small patches such as this. P.P.S. I changed the automake download-URL, since ftp.gnu.org is it's home AFAIK, and there was only a 1.2d (or 1.3d, can't remember) at the old URL. -- Sune Kirkeby | Please forgive me if, in the heat of battle, http://mel.interspace.dk/~sune/ | I sometimes forget which side I'm on. --- Makefile.am.orig Mon Jan 29 20:37:51 2001 +++ Makefile.am Mon Jan 29 20:43:47 2001 @@ -1 +1,2 @@ -SUBDIRS=src \ No newline at end of file +SUBDIRS=src +DISTCLEANFILES=automake+python --- autogen.sh.orig Sat Jan 27 18:10:47 2001 +++ autogen.sh Mon Jan 29 20:42:22 2001 @@ -22,11 +22,38 @@ (automake --version) < /dev/null > /dev/null 2>&1 || { echo echo "You must have automake installed to compile orbit-python." - echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz" - echo "(or a newer version if it is available)" + echo "Get ftp://ftp.gnu.org/gnu/automake/automake-1.4.tar.gz" DIE=1 } +# This is a very ugly hack, it might even be better to distribute our +# own automake, but. . . nah. -sune +if [ -f automake+python ] ; then + AUTOMAKE="./automake+python" +else + AUTOMAKE=`which automake` +fi +if ! grep -q handle_python $AUTOMAKE ; then + echo "Creating patched copy of automake with Python-support." + cp $AUTOMAKE automake+python || exit 1 + AUTOMAKE="./automake+python" + + if $AUTOMAKE --version | grep -q 1.3 ; then + PATCH=python-am-changes/automake-1.3.diff + elif $AUTOMAKE --version | grep -q 1.4 ; then + PATCH=python-am-changes/automake-1.4.diff + else + echo "Warning: This automake is not version 1.3 or 1.4," + echo "I'll try patching it anyway. Wish me luck." + PATCH=python-am-changes/automake-1.4.diff + fi + + if ! patch $AUTOMAKE < $PATCH ; then + echo "Error: It failed, bailing out." + DIE=1 + fi +fi + if test "$DIE" -eq 1; then exit 1 fi @@ -41,8 +68,8 @@ echo processing $i (cd $i; \ libtoolize --copy --force; \ - aclocal $ACLOCAL_FLAGS; autoheader; \ - automake --add-missing; \ + aclocal -I python-am-changes $ACLOCAL_FLAGS; autoheader; \ + $AUTOMAKE --add-missing; \ autoheader; \ autoconf) done |