[PATCH] Configure: don't test alternatives if preferred feature is found

Piotr Sikora piotrsikora at google.com
Tue Jun 28 21:25:09 UTC 2016


Hey Maxim,

> There was at least one attempt to introduce a code using both
> fcntl(F_READAHEAD) and posix_fadvise() depending on a
> configuration.  And I don't think this should be prevented at
> configure stage.

This code isn't part of current NGINX codebase, so it's a moot point.

Once fallbacks to alternatives are added to the code (and I might add
some myself), it's trivial to re-enable them in the ./configure script
on case-by-case basis, but right now those tests for alternatives are
just pointless and waste CPU cycles.

Furthermore, sometimes those tests warn about issues in features that
aren't going to get used anyway, because preferred feature was already
found.

For example, on OSX, you'll see this:

checking for mmap(MAP_ANON|MAP_SHARED) ... found
checking for mmap("/dev/zero", MAP_SHARED) ... found but is not working
checking for System V shared memory ... found

Best regards,
Piotr Sikora



More information about the nginx-devel mailing list