Thread: [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 |
From: Jason T. <ta...@li...> - 2001-01-29 21:08:12
|
> 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 Yeah, Roland suggested we include that stuff for people who don't want to patch automake. > So, I set out to fix the problem, which resulted in the following patch. I think the patch is good, but I'd like it if you could modify it so that if their automake is not patched, it asks them if they want to patch it, instead of automatically doing it for them. Mention that the configure script already exists and they don't really need to use autogen.sh if they don't want to patch automake. Otherwise it looks good, and I'll merge it in. Cheers, Jason. |
From: Jason T. <ta...@li...> - 2001-01-29 21:59:37
|
> I think the patch is good, but I'd like it if you could modify it so > that if their automake is not patched, it asks them if they want to Additionally, it ought to check that you have sufficient privileges to do this, and fail gracefully otherwise. Jason. |
From: Sune K. <su...@in...> - 2001-02-02 18:52:08
Attachments:
autogen.patch
|
[ Jason Tackaberry ] > > So, I set out to fix the problem, which resulted in the following patch. > > I think the patch is good, but I'd like it if you could modify it so > that if their automake is not patched, it asks them if they want to > patch it, instead of automatically doing it for them. Mention that > the configure script already exists and they don't really need to use > autogen.sh if they don't want to patch automake. It now suggests that they use the included configure script, unless they really need to regenerate configure and the Makefile.in's. It's just a simple "Press CTRL-C to cancel, enter to really do it"-style warning. Also, about checking that it can actually patch automake, since what it actually does is to create a patched copy (in ./automake+python), and use the included macro-files, there's not much need to check it can do so. I know it's not the optimal solution, but I like it a lot better than having to run autogen.sh as root, or some equivalent solution. Oh, and it also fixes a buglet in autogen.sh, where the second time you ran autogen.sh, on a system w/o Python support in the global automake, it would forget to include the local macro-files. > Otherwise it looks good, and I'll merge it in. Nice. -- Sune Kirkeby | Please forgive me if, in the heat of battle, http://mel.interspace.dk/~sune/ | I sometimes forget which side I'm on. |