gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-dev] Rewritten macros/libXML.m4


From: dolphinling
Subject: [Gnash-dev] Rewritten macros/libXML.m4
Date: Mon, 14 May 2007 08:16:16 -0400
User-agent: Thunderbird 2.0.0.0 (X11/20070326)

I noticed there were a lot of problems with macros/libXML.m4:

The configure output was horrible:
"checking for libxml2 header... (cached) checking for libxml library... checking for libxml2 library... -lxml2 -lz -lm" (all on one line like that)

Some sections were entirely broken:
Lines 54-55 use the variables gnash_libxml_*, but those are never declared or used anywhere else, only gnash_libxml2_*
Line 73 uses the with_libxml_libs variable, it should be with_libxml_lib

And some other problems:
Lines 64-66 makes no sense, if a variable is already empty, then set it to empty
Lines 39-41 test for the library, but they're in the header section
The has_xml variable is only set, never used (and never used anywhere else in gnash either)

And beyond all that, it was really messy and not commented at all.


So I rewrote it. :)

I've never used autoconf before though, so someone *really* should review it carefully. I tested and it works for me, but it very well could break for other people.


Notes on the changes I made:
Mostly I just rearranged the logic in the files and made use of more autoconf macro features, along with removing stuff I thought was useless.

Lines 47-67 were removed entirely, they were broken and so I assume since no one ever fixed them, no one ever needed them there in the first place.

In the original, lines 39-41 set the library stuff if you didn't do --with-libxml-incl (which I assume no one ever did) and all the other checking logic (lines 78-98) was skipped. Most of that, while not broken, was the equivalent of the stuff that had been broken in the header section. The only way it would be reached is if someone didn't have xml2-config, and if they didn't have that they'd hit the broken header stuff. That means no one could have needed that logic, so I removed it too.


Stuff I'm unsure about:
Line 77 in my file (line 40 in the original), is the sed needed there? The stuff below did not remove that, and in fact explicitly included it. My guess is the sed should be removed, but I haven't tested that yet.

--
dolphinling
<http://dolphinling.net/>

Attachment: libXML.m4
Description: application/m4


reply via email to

[Prev in Thread] Current Thread [Next in Thread]