blob: 6a13e6cb751b6b799450a5d2ec8fa8551644d81c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# Copyright (C) Dmitry Volyntsev
# Copyright (C) NGINX, Inc.
NJS_READLINE_LIB=
njs_found=no
njs_feature="editline library in editline/readline.h"
njs_feature_run=no
njs_feature_incs=
njs_feature_name=NJS_HAVE_EDITLINE
njs_feature_libs="-ledit"
njs_feature_test="#include <stdio.h>
#include <editline/readline.h>
int main(void) {
add_history(NULL);
return 0;
}"
. auto/feature
if [ $njs_found = no ]; then
# FreeBSD port
njs_feature_name=NJS_HAVE_EDIT_READLINE
njs_feature="editline in edit/readline/readline.h"
njs_feature_test="#include <stdio.h>
#include <edit/readline/readline.h>
int main(void) {
add_history(NULL);
return 0;
}"
. auto/feature
fi
if [ $njs_found = no ]; then
# NetBSD
njs_feature_name=NJS_HAVE_NETBSD_READLINE
njs_feature="editline in readline/readline.h"
njs_feature_test="#include <stdio.h>
#include <readline/readline.h>
int main(void) {
add_history(NULL);
return 0;
}"
. auto/feature
fi
if [ $njs_found = yes ]; then
NJS_HAVE_READLINE=YES
njs_define=NJS_HAVE_READLINE . auto/define
NJS_READLINE_LIB=$njs_feature_libs
else
NJS_HAVE_READLINE=NO
echo " - njs CLI is built without interactive shell support"
fi
|