diff options
author | Dmitry Volyntsev <xeioex@nginx.com> | 2021-12-24 15:48:11 +0000 |
---|---|---|
committer | Dmitry Volyntsev <xeioex@nginx.com> | 2021-12-24 15:48:11 +0000 |
commit | dab37f775147a99c6a8a98a4abe0013062959ec5 (patch) | |
tree | c5608467afde3b97a6215900abc9efd2ca32f87e /nginx/ngx_js_regex.c | |
parent | 00ef29516143738e3d57884e43eefda75a475597 (diff) | |
download | njs-dab37f775147a99c6a8a98a4abe0013062959ec5.tar.gz njs-dab37f775147a99c6a8a98a4abe0013062959ec5.zip |
Building regexp backend as an external.
This allows not to build PCRE specific code as a part of libnjs.a thus
supporting nginx builds with flags like --with-pcre=PCRE_DIR. When
--no-pcre configure option is provided external code have to implement
methods declared in njs_regex.h.
This also closes #18 issue on Github.
Diffstat (limited to 'nginx/ngx_js_regex.c')
-rw-r--r-- | nginx/ngx_js_regex.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/nginx/ngx_js_regex.c b/nginx/ngx_js_regex.c new file mode 100644 index 00000000..b88316ef --- /dev/null +++ b/nginx/ngx_js_regex.c @@ -0,0 +1,16 @@ + +/* + * Copyright (C) Dmitry Volyntsev + * Copyright (C) NGINX, Inc. + */ + + +#include <ngx_config.h> + +#if (NGX_PCRE2) + +#define NJS_HAVE_PCRE2 1 + +#endif + +#include "../external/njs_regex.c" |