summaryrefslogblamecommitdiffhomepage
path: root/auto/njs
blob: 72304793f92e107caeb5c64c4cdabf929eaba87b (plain) (tree)








































                                                        

# 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"