SDL-Hercules-390 / hyperion

The SDL Hercules 4.x Hyperion version of the System/370, ESA/390, and z/Architecture Emulator
Other
240 stars 90 forks source link

Avoid the use of Perl in configure #454

Closed Rhialto closed 2 years ago

Rhialto commented 2 years ago

In configure.ac there are these lines:

dnl Kludge to fix Debian/Ubuntu libtool
perl -pi -e 's/link_all_deplibs=no/link_all_deplibs=yes/' libtool

As far as I can see, this is the only use of Perl in the actual building process. It would be nice to remove it, since it is a pretty expensive dependency.

The same effect can be had with (gnu)sed which is already a dependency. I haven't checked yet if any gnu specific features of gsed are used, and can be removed, but here I will avoid those:

sed -e 's/^link_all_deplibs=no$/link_all_deplibs=yes/' <libtool >libtool.new
mv libtool.new libtool

(adding the ^ and $ anchors while I'm there)

(There is some use of Perl in the git hooks, but those are only relevant when committing anything, so removing Perl for the build-only case is still worth it in my opinion)

wrljet commented 2 years ago

I will test this on all my build test systems. Bill

wrljet commented 2 years ago

OK, I lied, I'm not going to test this on all my test systems, as there are just too many. But I have tested this change on these:

I think this is a decent representative sample of the different major distributions. All of the above are x86_64 versions, but I seriously doubt the sed is affected by the CPU type.

So... I'm going to go ahead and commit this change shortly to the develop branch.

Bill

wrljet commented 2 years ago

Changed in commit https://github.com/SDL-Hercules-390/hyperion/commit/dabbf1918dfa934c68110b4b2eb3552cb6540bd2