File: readline

package info (click to toggle)
libnginx-mod-js 0.7.9-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,180 kB
  • sloc: ansic: 91,416; javascript: 4,038; exp: 427; sh: 309; python: 181; perl: 126; makefile: 18
file content (79 lines) | stat: -rw-r--r-- 1,998 bytes parent folder | download
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Copyright (C) Dmitry Volyntsev
# Copyright (C) NGINX, Inc.


NJS_READLINE_LIB=

njs_found=no

njs_feature="GNU readline library"
njs_feature_name=NJS_HAVE_GNU_READLINE
njs_feature_run=no
njs_feature_incs=
njs_feature_libs="-lreadline"
njs_feature_test="#include <stdio.h>
                  #include <readline/readline.h>
                  #include <readline/history.h>

                  int main(void) {
                      add_history(NULL);
                      return 0;
                  }"
. auto/feature

if [ $njs_found = no ]; then
    njs_feature="editline library in editline/readline.h"
    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
fi

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