madler / zlib

A massively spiffy yet delicately unobtrusive compression library.
http://zlib.net/
Other
5.58k stars 2.43k forks source link

configure: Directory pathnames may now contain the equals sign. #854

Open DoctorNoobingstoneIPresume opened 1 year ago

DoctorNoobingstoneIPresume commented 1 year ago

The user is allowed to specify directory pathnames using --prefix=PATHNAME etc., but the extraction of the PATHNAME used to use a regex which eliminated everything until the last equals sign.

We have switched to eliminating everything until the first equals sign.

DoctorNoobingstoneIPresume commented 1 year ago

I have tried "non-greedy repetition" by changing .*= to .*?=:

echo "--prefix=xxx=yyy" | sed s'/.*?=//'

but it does not seem to work for me.

DoctorNoobingstoneIPresume commented 1 year ago

I wish we could create a function which executes echo $1 | sed 's/[^=]*=// and call it instead of repeating the code in the processing of --prefix=, --eprefix=, --libdir=, --sharedlibdir=, --includedir=, --uname=, --archs= etc.

Neustradamus commented 7 months ago

@madler: Can you look this PR?