diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-01-17 20:00:00 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-01-17 20:00:00 +0300 |
commit | 16cbf3c076a0aca6d47adaf3f719493674cf2363 (patch) | |
tree | e6530480020f62a2bdbf249988ec3e2a751d3927 /auto/pcre | |
download | unit-16cbf3c076a0aca6d47adaf3f719493674cf2363.tar.gz unit-16cbf3c076a0aca6d47adaf3f719493674cf2363.tar.bz2 |
Initial version.
Diffstat (limited to 'auto/pcre')
-rw-r--r-- | auto/pcre | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/auto/pcre b/auto/pcre new file mode 100644 index 00000000..e8765cef --- /dev/null +++ b/auto/pcre @@ -0,0 +1,49 @@ + +# Copyright (C) Igor Sysoev +# Copyright (C) NGINX, Inc. + + +NXT_REGEX=NO +NXT_PCRE_CFLAGS= +NXT_PCRE_LIB= + + +if [ $NXT_PCRE = YES ]; then + + nxt_found=no + + if /bin/sh -c "(pcre-config --version)" >> $NXT_AUTOCONF_ERR 2>&1; then + + NXT_PCRE_CFLAGS=`pcre-config --cflags` + NXT_PCRE_LIB=`pcre-config --libs` + + nxt_feature="PCRE library" + nxt_feature_name=NXT_HAVE_PCRE + nxt_feature_run=no + nxt_feature_incs=$NXT_PCRE_CFLAGS + nxt_feature_libs=$NXT_PCRE_LIB + nxt_feature_test="#include <pcre.h> + + int main() { + pcre *re; + + re = pcre_compile(NULL, 0, NULL, 0, NULL); + if (re == NULL) + return 1; + return 0; + }" + . auto/feature + fi + + if [ $nxt_found = no ]; then + $echo + $echo $0: error: no PCRE library found. + $echo + exit 1; + fi + + NXT_REGEX=YES + nxt_have=NXT_REGEX . auto/have + + $echo " + PCRE version: `pcre-config --version`" +fi |