forked from FRiCKLE/ngx_zeromq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig
109 lines (97 loc) · 3.95 KB
/
config
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Copyright (c) 2012, FRiCKLE <info@frickle.com>
# Copyright (c) 2012, Piotr Sikora <piotr.sikora@frickle.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
NGX_VERSION=`grep nginx_version src/core/nginx.h | sed -e 's/^.* \(.*\)$/\1/'`
if `expr "$NGX_VERSION" \< 1000000 >/dev/null 2>&1`; then
echo "$0: error: ngx_zeromq module requires nginx-1.0.0+"
exit 1
fi
ngx_feature_name=
ngx_feature_run=yes
ngx_feature_incs="#include <zmq.h>"
ngx_feature_test="if (ZMQ_VERSION < 20100) { return 1; }"
if [ -n "$LIBZMQ_INC" -o -n "$LIBZMQ_LIB" ]; then
# specified by LIBZMQ_INC and/or LIBZMQ_LIB
ngx_feature="ZeroMQ library in directories specified by LIBZMQ_INC ($LIBZMQ_INC) and/or LIBZMQ_LIB ($LIBZMQ_LIB)"
ngx_feature_path="$LIBZMQ_INC"
if [ $NGX_RPATH = YES ]; then
ngx_feature_libs="-R$LIBZMQ_LIB -L$LIBZMQ_LIB -lzmq"
else
ngx_feature_libs="-L$LIBZMQ_LIB -lzmq"
fi
. auto/feature
else
# auto-discovery
ngx_feature="ZeroMQ library"
ngx_feature_path=
ngx_feature_libs="-lzmq"
. auto/feature
if [ $ngx_found = no ]; then
# FreeBSD, OpenBSD
ngx_feature="ZeroMQ library in /usr/local/"
ngx_feature_path="/usr/local/include"
if [ $NGX_RPATH = YES ]; then
ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lzmq"
else
ngx_feature_libs="-L/usr/local/lib -lzmq"
fi
. auto/feature
fi
if [ $ngx_found = no ]; then
# NetBSD
ngx_feature="ZeroMQ library in /usr/pkg/"
ngx_feature_path="/usr/pkg/include"
if [ $NGX_RPATH = YES ]; then
ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lzmq"
else
ngx_feature_libs="-L/usr/pkg/lib -lzmq"
fi
. auto/feature
fi
if [ $ngx_found = no ]; then
# MacPorts
ngx_feature="ZeroMQ library in /opt/local/"
ngx_feature_path="/opt/local/include"
if [ $NGX_RPATH = YES ]; then
ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lzmq"
else
ngx_feature_libs="-L/opt/local/lib -lzmq"
fi
. auto/feature
fi
fi
if [ $ngx_found = no ]; then
echo "$0: error: ngx_zeromq module requires libzmq-2.1.0+."
exit 1
fi
ngx_addon_name="ngx_zeromq_module"
CORE_MODULES="$CORE_MODULES ngx_zeromq_module"
CORE_INCS="$CORE_INCS $ngx_feature_path $ngx_addon_dir/src"
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
HTTP_MODULES="$HTTP_MODULES ngx_http_upstream_zeromq_module"
NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_addon_dir/src/ngx_event_zeromq.h"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS \
$ngx_addon_dir/src/ngx_event_zeromq.c \
$ngx_addon_dir/src/ngx_http_upstream_zeromq_module.c"
have=NGX_ZEROMQ_MODULE . auto/have