c++ - force automake and autoconf to set the -lz flag behind the compilation line, and do it without changing the .ac files -


i having source package developer comfortably using ancient gcc version, compilation requires -lz flags before object specs. package "branchy" , automake , autoconf "stuffy" have 2 questions:

first question how configure autotools set -lz flag behind?

second, possible force setting @ of -lz flag without messing makefile.ac , configure.ac files? since not software package editing these files whenever doing new build not option.

note if copy compilation line throws error , put -lz , -lxerces-c flags @ end works. have somehow change in autotools.

update:

well managed somehow fix running badly configured line with
$ g++ line_contents -lz -lxerces-c (making sure in right directory) , had idea of running make again, seemed automake considered step passed , went forward.

still, nice find answer on how change order autotools!

you can write own "gcc" task. python or bash script check if 1 of arguments -lz, , reoder them , call real gcc. after run cc=path/to/your/gcc ./configure , stuff should work.


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -