Hi all,

Is it possible for an nginx module to define custom compilation switches
that add external libs / preprocessor macros ? Is there some example of a
module that does it ?
Specifically, what I'm trying to do is measure time accurately in my module
for benchmarking purposes. Since I use Linux, I was planning to use
clock_gettime(CLOCK_MONOTONIC) for that. This function is Linux-specific,
and so I would like to make it optional at compilation time:
 * if nginx is compile with --with-clock-gettime (or something like that) I
will use clock_gettime and link against the required library (librt)
 * otherwise, I will fall back to using gettimeofday or drop the feature
altogether

Thanks,

Eran

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,255292,255292#msg-255292

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to