diff options
Diffstat (limited to 'auto/njs')
-rw-r--r-- | auto/njs | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/auto/njs b/auto/njs new file mode 100644 index 00000000..72304793 --- /dev/null +++ b/auto/njs @@ -0,0 +1,41 @@ + +# Copyright (C) NGINX, Inc. + + +nxt_found=no +NXT_HAVE_NJS=NO + +NXT_NJS_CFLAGS= +NXT_NJS_AUX_CFLAGS= +NXT_NJS_LIBS="-lnjs" +NXT_NJS_AUX_LIBS="$NXT_LIBM $NXT_LIB_AUX_LIBS" + +nxt_feature="NJS" +nxt_feature_name=NXT_HAVE_NJS +nxt_feature_run=no +nxt_feature_incs="$NXT_NJS_CFLAGS $NXT_NJS_AUX_CFLAGS" +nxt_feature_libs="$NXT_NJS_LIBS $NXT_NJS_AUX_LIBS" +nxt_feature_test="#include <njs.h> + + int main(void) { + njs_vm_t *vm; + njs_vm_opt_t opts; + + njs_vm_opt_init(&opts); + + vm = njs_vm_create(&opts); + if (vm == NULL) + return 1; + return 0; + }" +. auto/feature + +if [ $nxt_found = no ]; then + $echo + $echo $0: error: no NJS library found. + $echo + exit 1; +fi + +NXT_LIB_AUX_CFLAGS="$NXT_LIB_AUX_CFLAGS $NXT_NJS_CFLAGS" +NXT_LIB_AUX_LIBS="$NXT_NJS_LIBS $NXT_LIB_AUX_LIBS" |