Merge lp:~noskcaj/ubuntu/vivid/sagan/liblognorm-transition into lp:ubuntu/vivid/sagan
- Vivid (15.04)
- liblognorm-transition
- Merge into vivid
Proposed by
Jackson Doak
Status: | Needs review |
---|---|
Proposed branch: | lp:~noskcaj/ubuntu/vivid/sagan/liblognorm-transition |
Merge into: | lp:ubuntu/vivid/sagan |
Diff against target: |
39802 lines (+21113/-12473) 125 files modified
.pc/01-do-not-include-lognorm-private-header.patch/src/sagan-config.c (+0/-532) .pc/01-do-not-include-lognorm-private-header.patch/src/sagan-signal.c (+0/-160) .pc/01-do-not-include-lognorm-private-header.patch/src/sagan.c (+0/-1322) .pc/applied-patches (+0/-1) AUTHORS (+0/-1) FAQ (+1/-4) INSTALL (+12/-7) Makefile (+805/-0) Makefile.am (+2/-2) Makefile.in (+252/-164) NEWS (+1/-2) README (+9/-6) aclocal.m4 (+703/-254) autogen.sh (+5/-0) config.guess (+206/-161) config.h (+335/-0) config.h.in (+53/-12) config.status (+1290/-0) config.sub (+157/-121) configure (+2040/-899) configure.ac (+300/-0) configure.in (+0/-325) debian/changelog (+8/-0) debian/control (+3/-1) debian/patches/01-do-not-include-lognorm-private-header.patch (+0/-36) debian/patches/series (+0/-1) depcomp (+347/-186) doc/sagan_freebsd.howto.md (+393/-0) etc/sagan.8 (+4/-1) etc/sagan.conf (+252/-63) extra/README (+2/-1) extra/barnyard2/barnyard2.cli.conf (+6/-0) extra/barnyard2/barnyard2.snorby.conf (+15/-0) extra/pulledpork/fetchcarl.sh (+187/-0) extra/pulledpork/pulledpork.sagan.conf (+19/-0) extra/rc.d-freebsd/sagan (+39/-0) extra/rsyslog/sagan.conf (+6/-0) install-sh (+21/-14) missing (+159/-320) src/Makefile (+0/-673) src/Makefile.am (+20/-5) src/Makefile.in (+844/-254) src/output-plugins/sagan-alert.c (+30/-18) src/output-plugins/sagan-alert.h (+26/-0) src/output-plugins/sagan-esmtp.c (+210/-157) src/output-plugins/sagan-esmtp.h (+8/-0) src/output-plugins/sagan-external.c (+114/-90) src/output-plugins/sagan-external.h (+25/-0) src/output-plugins/sagan-prelude.c (+0/-456) src/output-plugins/sagan-prelude.h (+0/-39) src/output-plugins/sagan-snort.c (+0/-597) src/output-plugins/sagan-snort.h (+0/-57) src/output-plugins/sagan-snortsam.c (+644/-579) src/output-plugins/sagan-snortsam.h (+199/-202) src/output-plugins/sagan-twofish.c (+574/-513) src/output-plugins/sagan-twofish.h (+54/-51) src/output-plugins/sagan-unified2.c (+439/-424) src/output-plugins/sagan-unified2.h (+3/-3) src/parsers/parse-ip.c (+106/-56) src/parsers/parse-port.c (+140/-115) src/parsers/parse-proto.c (+93/-0) src/parsers/parsers.h (+30/-0) src/processors/sagan-blacklist.c (+327/-0) src/processors/sagan-blacklist.h (+42/-0) src/processors/sagan-engine.c (+952/-0) src/processors/sagan-engine.h (+31/-0) src/processors/sagan-perfmon.c (+254/-0) src/processors/sagan-perfmon.h (+24/-0) src/processors/sagan-search.c (+281/-0) src/processors/sagan-search.h (+44/-0) src/processors/sagan-track-clients.c (+209/-0) src/processors/sagan-track-clients.h (+49/-0) src/processors/sagan-websense.c (+14/-0) src/sagan-alert-time.c (+195/-0) src/sagan-alert-time.h (+27/-0) src/sagan-classifications.c (+74/-62) src/sagan-classifications.h (+38/-0) src/sagan-config.c (+845/-442) src/sagan-config.h (+192/-0) src/sagan-credits.c (+72/-0) src/sagan-credits.h (+26/-0) src/sagan-defs.h (+56/-17) src/sagan-flowbit.c (+681/-0) src/sagan-flowbit.h (+50/-0) src/sagan-gen-msg.c (+116/-0) src/sagan-gen-msg.h (+37/-0) src/sagan-geoip.c (+136/-0) src/sagan-geoip.h (+35/-0) src/sagan-ignore-list.c (+84/-0) src/sagan-ignore-list.h (+34/-0) src/sagan-key.c (+21/-14) src/sagan-key.h (+25/-0) src/sagan-liblognorm.c (+193/-0) src/sagan-liblognorm.h (+60/-0) src/sagan-lockfile.c (+80/-58) src/sagan-lockfile.h (+27/-0) src/sagan-meta-content.c (+147/-0) src/sagan-meta-content.h (+26/-0) src/sagan-output.c (+65/-51) src/sagan-output.h (+26/-0) src/sagan-plog.c (+160/-144) src/sagan-plog.h (+36/-0) src/sagan-processor.c (+148/-16) src/sagan-processor.h (+26/-0) src/sagan-protocol-map.c (+115/-0) src/sagan-protocol-map.h (+48/-0) src/sagan-references.c (+129/-99) src/sagan-references.h (+37/-0) src/sagan-rules.c (+1113/-535) src/sagan-rules.h (+129/-0) src/sagan-send-alert.c (+91/-0) src/sagan-send-alert.h (+26/-0) src/sagan-signal.c (+191/-100) src/sagan-signal.h (+39/-0) src/sagan-stats.c (+159/-50) src/sagan-stats.h (+25/-0) src/sagan-strlcat.c (+27/-25) src/sagan-strlcpy.c (+26/-23) src/sagan-usage.c (+60/-61) src/sagan-usage.h (+25/-0) src/sagan-util.c (+516/-273) src/sagan.c (+988/-1241) src/sagan.h (+211/-376) src/version.h (+1/-1) stamp-h1 (+1/-0) |
To merge this branch: | bzr merge lp:~noskcaj/ubuntu/vivid/sagan/liblognorm-transition |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Iain Lane | Needs Fixing | ||
Review via email: mp+242573@code.launchpad.net |
Commit message
Description of the change
New upstream RC release. Allows the package to build, so this is preferable to our current version.
To post a comment you must log in.
Unmerged revisions
- 12. By Jackson Doak
-
Add build-dep on libee-dev.
- 11. By Jackson Doak
-
* New upstream release.
* Drop patch, no longer needed
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === removed directory '.pc/01-do-not-include-lognorm-private-header.patch' | |||
2 | === removed directory '.pc/01-do-not-include-lognorm-private-header.patch/src' | |||
3 | === removed file '.pc/01-do-not-include-lognorm-private-header.patch/src/sagan-config.c' | |||
4 | --- .pc/01-do-not-include-lognorm-private-header.patch/src/sagan-config.c 2012-04-16 22:33:24 +0000 | |||
5 | +++ .pc/01-do-not-include-lognorm-private-header.patch/src/sagan-config.c 1970-01-01 00:00:00 +0000 | |||
6 | @@ -1,532 +0,0 @@ | |||
7 | 1 | /* | ||
8 | 2 | ** Copyright (C) 2009-2012 Quadrant Information Security <quadrantsec.com> | ||
9 | 3 | ** Copyright (C) 2009-2012 Champ Clark III <cclark@quadrantsec.com> | ||
10 | 4 | ** | ||
11 | 5 | ** This program is free software; you can redistribute it and/or modify | ||
12 | 6 | ** it under the terms of the GNU General Public License Version 2 as | ||
13 | 7 | ** published by the Free Software Foundation. You may not use, modify or | ||
14 | 8 | ** distribute this program under any other version of the GNU General | ||
15 | 9 | ** Public License. | ||
16 | 10 | ** | ||
17 | 11 | ** This program is distributed in the hope that it will be useful, | ||
18 | 12 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | 13 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | 14 | ** GNU General Public License for more details. | ||
21 | 15 | ** | ||
22 | 16 | ** You should have received a copy of the GNU General Public License | ||
23 | 17 | ** along with this program; if not, write to the Free Software | ||
24 | 18 | ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
25 | 19 | */ | ||
26 | 20 | |||
27 | 21 | /* sagan-config.c | ||
28 | 22 | * | ||
29 | 23 | * Loads the sagan.conf file into memory | ||
30 | 24 | * | ||
31 | 25 | */ | ||
32 | 26 | |||
33 | 27 | #ifdef HAVE_CONFIG_H | ||
34 | 28 | #include "config.h" /* From autoconf */ | ||
35 | 29 | #endif | ||
36 | 30 | |||
37 | 31 | #include <stdio.h> | ||
38 | 32 | #include <stdlib.h> | ||
39 | 33 | #include <sys/types.h> | ||
40 | 34 | #include <unistd.h> | ||
41 | 35 | #include <pthread.h> | ||
42 | 36 | #include <ctype.h> | ||
43 | 37 | #include <errno.h> | ||
44 | 38 | #include <fcntl.h> | ||
45 | 39 | #include <sys/stat.h> | ||
46 | 40 | #include <string.h> | ||
47 | 41 | #include <getopt.h> | ||
48 | 42 | #include <time.h> | ||
49 | 43 | #include <signal.h> | ||
50 | 44 | #include <netinet/in.h> | ||
51 | 45 | #include <arpa/inet.h> | ||
52 | 46 | #include <math.h> | ||
53 | 47 | |||
54 | 48 | #ifdef HAVE_LIBLOGNORM | ||
55 | 49 | #include <liblognorm.h> | ||
56 | 50 | #include <ptree.h> | ||
57 | 51 | #include <lognorm.h> | ||
58 | 52 | #endif | ||
59 | 53 | |||
60 | 54 | #include "version.h" | ||
61 | 55 | |||
62 | 56 | #include "sagan.h" | ||
63 | 57 | |||
64 | 58 | #ifdef HAVE_LIBDNET | ||
65 | 59 | #include "output-plugins/sagan-unified2.h" | ||
66 | 60 | #endif | ||
67 | 61 | |||
68 | 62 | |||
69 | 63 | #ifdef HAVE_LIBLOGNORM | ||
70 | 64 | struct liblognorm_struct *liblognormstruct; | ||
71 | 65 | int liblognorm_count; | ||
72 | 66 | #endif | ||
73 | 67 | |||
74 | 68 | struct _Rule_Struct *rulestruct; | ||
75 | 69 | struct _SaganCounters *counters; | ||
76 | 70 | |||
77 | 71 | void load_config( _SaganDebug *debug, _SaganConfig *config ) { | ||
78 | 72 | |||
79 | 73 | FILE *sagancfg; | ||
80 | 74 | |||
81 | 75 | char normfile[MAXPATH]; | ||
82 | 76 | |||
83 | 77 | char *filename; | ||
84 | 78 | char ruleset[MAXPATH]; | ||
85 | 79 | |||
86 | 80 | char tmpbuf[CONFBUF]; | ||
87 | 81 | char tmpstring[CONFBUF]; | ||
88 | 82 | |||
89 | 83 | char *sagan_option=NULL; | ||
90 | 84 | char *sagan_var=NULL; | ||
91 | 85 | char *ptmp=NULL; | ||
92 | 86 | |||
93 | 87 | char *tok=NULL; | ||
94 | 88 | |||
95 | 89 | int i,check; | ||
96 | 90 | |||
97 | 91 | /* Set some system defaults */ | ||
98 | 92 | |||
99 | 93 | snprintf(config->sagan_alert_filepath, sizeof(config->sagan_alert_filepath), "%s", ALERTLOG); | ||
100 | 94 | snprintf(config->sagan_lockfile, sizeof(config->sagan_lockfile), "%s", LOCKFILE); | ||
101 | 95 | snprintf(config->sagan_log_path, sizeof(config->sagan_log_path), "%s", SAGANLOGPATH); | ||
102 | 96 | config->sagan_proto = 17; /* Default to UDP */ | ||
103 | 97 | config->max_output_threads = MAX_OUTPUT_THREADS; | ||
104 | 98 | config->max_processor_threads = MAX_PROCESSOR_THREADS; | ||
105 | 99 | |||
106 | 100 | /* Start loading configuration */ | ||
107 | 101 | |||
108 | 102 | rulestruct = (_Rule_Struct *) realloc(rulestruct, (counters->rulecount+1) * sizeof(_Rule_Struct)); | ||
109 | 103 | |||
110 | 104 | /* Gather information for the master configuration file */ | ||
111 | 105 | |||
112 | 106 | |||
113 | 107 | if ((sagancfg = fopen(config->sagan_config, "r")) == NULL) { | ||
114 | 108 | fprintf(stderr, "[%s, line %d] Cannot open configuration file (%s)\n", __FILE__, __LINE__, config->sagan_config); | ||
115 | 109 | exit(1); | ||
116 | 110 | } | ||
117 | 111 | |||
118 | 112 | while(fgets(tmpbuf, sizeof(tmpbuf), sagancfg) != NULL) { | ||
119 | 113 | if (tmpbuf[0] == '#') continue; | ||
120 | 114 | if (tmpbuf[0] == ';') continue; | ||
121 | 115 | if (tmpbuf[0] == 10 ) continue; | ||
122 | 116 | if (tmpbuf[0] == 32 ) continue; | ||
123 | 117 | |||
124 | 118 | sagan_option = strtok_r(tmpbuf, " ", &tok); | ||
125 | 119 | |||
126 | 120 | if (!strcmp(remrt(sagan_option), "max_output_threads")) { | ||
127 | 121 | sagan_var = strtok_r(NULL, " ", &tok); | ||
128 | 122 | config->max_output_threads = atol(sagan_var); | ||
129 | 123 | } | ||
130 | 124 | |||
131 | 125 | if (!strcmp(remrt(sagan_option), "max_processor_threads")) { | ||
132 | 126 | sagan_var = strtok_r(NULL, " ", &tok); | ||
133 | 127 | config->max_processor_threads = atol(sagan_var); | ||
134 | 128 | } | ||
135 | 129 | |||
136 | 130 | if (!strcmp(remrt(sagan_option), "disable_dns_warnings")) { | ||
137 | 131 | sagan_log(config, 0, "Supressing DNS warnings"); | ||
138 | 132 | config->disable_dns_warnings = 1; | ||
139 | 133 | } | ||
140 | 134 | |||
141 | 135 | if (!strcmp(remrt(sagan_option), "syslog_src_lookup")) { | ||
142 | 136 | sagan_log(config, 0, "DNS lookup of source address supplied by syslog daemon"); | ||
143 | 137 | config->syslog_src_lookup = 1; | ||
144 | 138 | } | ||
145 | 139 | |||
146 | 140 | |||
147 | 141 | if (!strcmp(sagan_option, "sagan_host")) { | ||
148 | 142 | snprintf(config->sagan_host, sizeof(config->sagan_host)-1, "%s", strtok_r(NULL, " " , &tok)); | ||
149 | 143 | config->sagan_host[strlen(config->sagan_host)-1] = '\0'; | ||
150 | 144 | } | ||
151 | 145 | |||
152 | 146 | if (!strcmp(sagan_option, "sagan_port")) { | ||
153 | 147 | sagan_var = strtok_r(NULL, " ", &tok); | ||
154 | 148 | config->sagan_port = atoi(sagan_var); | ||
155 | 149 | } | ||
156 | 150 | |||
157 | 151 | #ifndef HAVE_LIBESMTP | ||
158 | 152 | if (!strcmp(sagan_option, "send-to") || !strcmp(sagan_option, "min_email_priority")) | ||
159 | 153 | sagan_log(config,1, "\"libesmtp\" support not found. Re-compile with ESMTP support or disable in the sagan.conf."); | ||
160 | 154 | #endif | ||
161 | 155 | |||
162 | 156 | #ifdef HAVE_LIBESMTP | ||
163 | 157 | |||
164 | 158 | if (!strcmp(sagan_option, "send-to")) { | ||
165 | 159 | sagan_var = strtok_r(NULL, " ", &tok); | ||
166 | 160 | snprintf(config->sagan_esmtp_to, sizeof(config->sagan_esmtp_to), "%s", sagan_var); | ||
167 | 161 | remrt(config->sagan_esmtp_to); | ||
168 | 162 | config->sagan_esmtp_flag=1; | ||
169 | 163 | config->sagan_sendto_flag=1; | ||
170 | 164 | } | ||
171 | 165 | |||
172 | 166 | if (!strcmp(sagan_option, "min_email_priority")) { | ||
173 | 167 | sagan_var = strtok_r(NULL, " ", &tok); | ||
174 | 168 | config->min_email_priority = atoi(sagan_var); | ||
175 | 169 | } | ||
176 | 170 | |||
177 | 171 | #endif | ||
178 | 172 | |||
179 | 173 | #ifndef HAVE_LIBPCAP | ||
180 | 174 | if (!strcmp(sagan_option, "plog_interface") || !strcmp(sagan_option, "plog_logdev") || !strcmp(sagan_option, "plog_port")) | ||
181 | 175 | sagan_log(config,1, "\"libpcap\" support not found. Re-compile with PCAP support or disable in the sagan.conf."); | ||
182 | 176 | #endif | ||
183 | 177 | |||
184 | 178 | #ifdef HAVE_LIBPCAP | ||
185 | 179 | |||
186 | 180 | if (!strcmp(sagan_option, "plog_interface")) { | ||
187 | 181 | snprintf(config->plog_interface, sizeof(config->plog_interface)-1, "%s", strtok_r(NULL, " ", &tok)); | ||
188 | 182 | config->plog_interface[strlen(config->plog_interface)-1] = '\0'; | ||
189 | 183 | config->plog_flag=1; | ||
190 | 184 | } | ||
191 | 185 | |||
192 | 186 | if (!strcmp(sagan_option, "plog_logdev")) { | ||
193 | 187 | snprintf(config->plog_logdev, sizeof(config->plog_logdev)-1, "%s", strtok_r(NULL, " ", &tok)); | ||
194 | 188 | config->plog_logdev[strlen(config->plog_logdev)-1] = '\0'; | ||
195 | 189 | config->plog_flag=1; | ||
196 | 190 | } | ||
197 | 191 | |||
198 | 192 | if (!strcmp(sagan_option, "plog_port")) { | ||
199 | 193 | sagan_var = strtok_r(NULL, " ", &tok); | ||
200 | 194 | config->plog_port = atoi(sagan_var); | ||
201 | 195 | config->plog_flag = 1; | ||
202 | 196 | } | ||
203 | 197 | |||
204 | 198 | #endif | ||
205 | 199 | |||
206 | 200 | #if defined(HAVE_LIBMYSQLCLIENT_R) || defined(HAVE_LIBPQ) | ||
207 | 201 | |||
208 | 202 | if (!strcmp(sagan_option, "sagan_proto")) { | ||
209 | 203 | sagan_var = strtok_r(NULL, " ", &tok); | ||
210 | 204 | config->sagan_proto = atoi(sagan_var); | ||
211 | 205 | } | ||
212 | 206 | |||
213 | 207 | if (!strcmp(sagan_option, "sagan_hostname")) { | ||
214 | 208 | snprintf(config->sagan_hostname, sizeof(config->sagan_hostname)-1, "%s", strtok_r(NULL, " ", &tok)); | ||
215 | 209 | config->sagan_hostname[strlen(config->sagan_hostname)-1] = '\0'; | ||
216 | 210 | } | ||
217 | 211 | |||
218 | 212 | if (!strcmp(sagan_option, "sagan_interface")) { | ||
219 | 213 | snprintf(config->sagan_interface, sizeof(config->sagan_interface)-1, "%s", strtok_r(NULL, " ", &tok)); | ||
220 | 214 | config->sagan_interface[strlen(config->sagan_interface)-1] = '\0'; | ||
221 | 215 | } | ||
222 | 216 | |||
223 | 217 | if (!strcmp(sagan_option, "sagan_filter")) { | ||
224 | 218 | snprintf(config->sagan_filter, sizeof(config->sagan_filter)-1, "%s", strtok_r(NULL, " ", &tok)); | ||
225 | 219 | config->sagan_filter[strlen(config->sagan_filter)-1] = '\0'; | ||
226 | 220 | } | ||
227 | 221 | |||
228 | 222 | if (!strcmp(sagan_option, "sagan_detail")) { | ||
229 | 223 | sagan_var = strtok_r(NULL, " ", &tok); | ||
230 | 224 | config->sagan_detail = atoi(sagan_var); | ||
231 | 225 | } | ||
232 | 226 | |||
233 | 227 | #endif | ||
234 | 228 | |||
235 | 229 | #ifndef HAVE_LIBLOGNORM | ||
236 | 230 | if (!strcmp(sagan_option, "normalize:")) { | ||
237 | 231 | sagan_log(config, 0, "WARNING: Sagan was not compiled with \"liblognorm\" support!"); | ||
238 | 232 | sagan_log(config, 0, "WARNING: Sagan will continue, but _without_ liblognorm!"); | ||
239 | 233 | } | ||
240 | 234 | #endif | ||
241 | 235 | |||
242 | 236 | #ifdef HAVE_LIBLOGNORM | ||
243 | 237 | |||
244 | 238 | /* | ||
245 | 239 | We load the location for liblognorm's 'rule base/samples'. We don't want to | ||
246 | 240 | load them quiet yet. We only want to load samples we need, so we do the | ||
247 | 241 | actual ln_loadSamples() after the configuration file and all rules have | ||
248 | 242 | been analyzed */ | ||
249 | 243 | |||
250 | 244 | if (!strcmp(sagan_option, "normalize:")) { | ||
251 | 245 | liblognormstruct = (liblognorm_struct *) realloc(liblognormstruct, (liblognorm_count+1) * sizeof(liblognorm_struct)); | ||
252 | 246 | |||
253 | 247 | sagan_var = strtok_r(NULL, ",", &tok); | ||
254 | 248 | remspaces(sagan_var); | ||
255 | 249 | snprintf(liblognormstruct[liblognorm_count].type, sizeof(liblognormstruct[liblognorm_count].type), "%s", sagan_var); | ||
256 | 250 | |||
257 | 251 | snprintf(tmpstring, sizeof(tmpstring), "%s", strtok_r(NULL, ",", &tok)); | ||
258 | 252 | remspaces(tmpstring); | ||
259 | 253 | tmpstring[strlen(tmpstring)-1] = '\0'; | ||
260 | 254 | strlcpy(normfile, sagan_replace_str(tmpstring, "$RULE_PATH", config->sagan_rule_path), sizeof(normfile)); | ||
261 | 255 | snprintf(liblognormstruct[liblognorm_count].filepath, sizeof(liblognormstruct[liblognorm_count].filepath), "%s", normfile); | ||
262 | 256 | |||
263 | 257 | liblognorm_count++; | ||
264 | 258 | } | ||
265 | 259 | |||
266 | 260 | #endif | ||
267 | 261 | |||
268 | 262 | if (!strcmp(sagan_option, "output")) { | ||
269 | 263 | sagan_var = strtok_r(NULL," ", &tok); | ||
270 | 264 | |||
271 | 265 | if (!strcmp(sagan_var, "external:")) { | ||
272 | 266 | snprintf(config->sagan_extern, sizeof(config->sagan_extern), "%s", strtok_r(NULL, " ", &tok)); | ||
273 | 267 | if (strstr(strtok_r(NULL, " ", &tok), "parsable")) config->sagan_exttype=1; | ||
274 | 268 | config->sagan_ext_flag=1; | ||
275 | 269 | } | ||
276 | 270 | |||
277 | 271 | |||
278 | 272 | #ifdef WITH_SNORTSAM | ||
279 | 273 | if (!strcmp(sagan_var, "alert_fwsam:")) { | ||
280 | 274 | snprintf(config->sagan_fwsam_info, sizeof(config->sagan_fwsam_info), "%s", remrt(strtok_r(NULL, " ", &tok))); | ||
281 | 275 | config->sagan_fwsam_flag=1; | ||
282 | 276 | } | ||
283 | 277 | #endif | ||
284 | 278 | |||
285 | 279 | #ifndef HAVE_LIBDNET | ||
286 | 280 | if (!strcmp(sagan_var, "unified2:")) { | ||
287 | 281 | sagan_log(config, 0,"\"libdnet\" support not found. This is needed for unified2."); | ||
288 | 282 | sagan_log(config, 1, "Re-compile with libdnet support or disable in the sagan.conf."); | ||
289 | 283 | } | ||
290 | 284 | #endif | ||
291 | 285 | |||
292 | 286 | #ifdef HAVE_LIBDNET | ||
293 | 287 | |||
294 | 288 | if (!strcmp(sagan_var, "unified2:")) { | ||
295 | 289 | |||
296 | 290 | config->sagan_unified2_flag = 1; | ||
297 | 291 | |||
298 | 292 | ptmp = sagan_var; | ||
299 | 293 | remrt(ptmp); | ||
300 | 294 | |||
301 | 295 | while (ptmp != NULL ) { | ||
302 | 296 | |||
303 | 297 | if (!strcmp(ptmp, "filename")) { | ||
304 | 298 | ptmp = strtok_r(NULL, ",", &tok); | ||
305 | 299 | snprintf(config->unified2_filepath, sizeof(config->unified2_filepath), "%s/%s", config->sagan_log_path, ptmp); | ||
306 | 300 | } | ||
307 | 301 | |||
308 | 302 | if (!strcmp(ptmp, "limit")) { | ||
309 | 303 | ptmp = strtok_r(NULL, " ", &tok); | ||
310 | 304 | config->unified2_limit = atoi(ptmp) * 1024 * 1024; | ||
311 | 305 | } | ||
312 | 306 | |||
313 | 307 | if (!strcmp(ptmp, "nostamp")) config->unified2_nostamp = 1; | ||
314 | 308 | |||
315 | 309 | ptmp = strtok_r(NULL, " ", &tok); | ||
316 | 310 | |||
317 | 311 | } | ||
318 | 312 | } | ||
319 | 313 | |||
320 | 314 | #endif | ||
321 | 315 | |||
322 | 316 | #ifndef HAVE_LIBPRELUDE | ||
323 | 317 | if (!strcmp(sagan_var, "prelude:")) | ||
324 | 318 | sagan_log(config,1, " libprelude support not found. Re-compile with Prelude support or disable in the sagan.conf."); | ||
325 | 319 | #endif | ||
326 | 320 | |||
327 | 321 | #ifdef HAVE_LIBPRELUDE | ||
328 | 322 | |||
329 | 323 | if (!strcmp(sagan_var, "prelude:")) { | ||
330 | 324 | config->output_thread_flag = 1; | ||
331 | 325 | ptmp = sagan_var; | ||
332 | 326 | |||
333 | 327 | while (ptmp != NULL ) { | ||
334 | 328 | |||
335 | 329 | if (!strcmp(ptmp, "profile")) { | ||
336 | 330 | ptmp = strtok_r(NULL, " ", &tok); | ||
337 | 331 | snprintf(config->sagan_prelude_profile, sizeof(config->sagan_prelude_profile), "%s", ptmp); | ||
338 | 332 | remrt(config->sagan_prelude_profile); | ||
339 | 333 | config->sagan_prelude_flag=1; | ||
340 | 334 | } | ||
341 | 335 | |||
342 | 336 | ptmp = strtok_r(NULL, "=", &tok); | ||
343 | 337 | } | ||
344 | 338 | } | ||
345 | 339 | #endif | ||
346 | 340 | |||
347 | 341 | |||
348 | 342 | #ifdef HAVE_LIBESMTP | ||
349 | 343 | |||
350 | 344 | if (!strcmp(sagan_var, "email:")) { | ||
351 | 345 | config->output_thread_flag = 1; | ||
352 | 346 | ptmp = sagan_var; | ||
353 | 347 | |||
354 | 348 | while (ptmp != NULL ) { | ||
355 | 349 | |||
356 | 350 | if (!strcmp(ptmp, "from")) { | ||
357 | 351 | ptmp = strtok_r(NULL, " ", &tok); | ||
358 | 352 | snprintf(config->sagan_esmtp_from, sizeof(config->sagan_esmtp_from), "%s", ptmp); | ||
359 | 353 | remrt(config->sagan_esmtp_from); | ||
360 | 354 | } | ||
361 | 355 | |||
362 | 356 | if (!strcmp(ptmp, "smtpserver")) { | ||
363 | 357 | ptmp = strtok_r(NULL, " ", &tok); | ||
364 | 358 | snprintf(config->sagan_esmtp_server, sizeof(config->sagan_esmtp_server), "%s", ptmp); | ||
365 | 359 | remrt(config->sagan_esmtp_server); | ||
366 | 360 | } | ||
367 | 361 | |||
368 | 362 | ptmp = strtok_r(NULL, "=", &tok); | ||
369 | 363 | } | ||
370 | 364 | |||
371 | 365 | } | ||
372 | 366 | #endif | ||
373 | 367 | |||
374 | 368 | |||
375 | 369 | #if defined(HAVE_LIBMYSQLCLIENT_R) || defined(HAVE_LIBPQ) | ||
376 | 370 | |||
377 | 371 | /* output type (database, etc) */ | ||
378 | 372 | |||
379 | 373 | if (!strcmp(sagan_var, "database:")) { | ||
380 | 374 | config->output_thread_flag = 1; | ||
381 | 375 | sagan_var = strtok_r(NULL, ",", &tok); | ||
382 | 376 | |||
383 | 377 | /* Type (only "log" is used right now */ | ||
384 | 378 | |||
385 | 379 | if (!strcmp(sagan_var, "log")) { | ||
386 | 380 | sagan_var = strtok_r(NULL, ",", &tok); | ||
387 | 381 | } | ||
388 | 382 | |||
389 | 383 | /* MySQL/PostgreSQL/Oracle/etc */ | ||
390 | 384 | |||
391 | 385 | remspaces(sagan_var); | ||
392 | 386 | |||
393 | 387 | |||
394 | 388 | if (!strcmp(sagan_var, "mysql" )) { | ||
395 | 389 | #ifndef HAVE_LIBMYSQLCLIENT_R | ||
396 | 390 | sagan_log(config, 1,"MySQL support not found. Re-compile with MySQL support or disable in the sagan.conf."); | ||
397 | 391 | #endif | ||
398 | 392 | config->dbtype=1; | ||
399 | 393 | } | ||
400 | 394 | |||
401 | 395 | if (!strcmp(sagan_var, "postgresql" )) { | ||
402 | 396 | #ifndef HAVE_LIBPQ | ||
403 | 397 | sagan_log(config, 1,"PostgreSQL support not found. Re-compile with PostgreSQL support or disable in the sagan.conf."); | ||
404 | 398 | #endif | ||
405 | 399 | config->dbtype=2; | ||
406 | 400 | } | ||
407 | 401 | |||
408 | 402 | |||
409 | 403 | sagan_var = strtok_r(NULL, ",", &tok); | ||
410 | 404 | remrt(sagan_var); /* rm NL */ | ||
411 | 405 | |||
412 | 406 | strlcpy(tmpbuf, sagan_var, sizeof(tmpbuf)); | ||
413 | 407 | |||
414 | 408 | ptmp = strtok_r(tmpbuf, "=", &tok); | ||
415 | 409 | |||
416 | 410 | while (ptmp != NULL) { | ||
417 | 411 | remspaces(ptmp); | ||
418 | 412 | |||
419 | 413 | if (!strcmp(ptmp, "user")) { | ||
420 | 414 | ptmp = strtok_r(NULL, " ", &tok); | ||
421 | 415 | snprintf(config->dbuser, sizeof(config->dbuser), "%s", ptmp); | ||
422 | 416 | } | ||
423 | 417 | |||
424 | 418 | if (!strcmp(ptmp , "password")) { | ||
425 | 419 | ptmp = strtok_r(NULL, " ", &tok); | ||
426 | 420 | snprintf(config->dbpassword, sizeof(config->dbpassword), "%s", ptmp); | ||
427 | 421 | } | ||
428 | 422 | |||
429 | 423 | if (!strcmp(ptmp, "dbname")) { | ||
430 | 424 | ptmp = strtok_r(NULL, " ", &tok); | ||
431 | 425 | snprintf(config->dbname, sizeof(config->dbname), "%s", ptmp); | ||
432 | 426 | } | ||
433 | 427 | |||
434 | 428 | if (!strcmp(ptmp, "host")) { | ||
435 | 429 | ptmp = strtok_r(NULL, " ", &tok); | ||
436 | 430 | snprintf(config->dbhost, sizeof(config->dbhost), "%s", ptmp); | ||
437 | 431 | } | ||
438 | 432 | |||
439 | 433 | if (!strcmp(ptmp, "port")) { | ||
440 | 434 | config->dbport = atoi(ptmp); | ||
441 | 435 | } | ||
442 | 436 | |||
443 | 437 | ptmp = strtok_r(NULL, "=", &tok); | ||
444 | 438 | |||
445 | 439 | |||
446 | 440 | } | ||
447 | 441 | |||
448 | 442 | } | ||
449 | 443 | #endif | ||
450 | 444 | } | ||
451 | 445 | |||
452 | 446 | /* "var" */ | ||
453 | 447 | |||
454 | 448 | if (!strcmp(sagan_option, "var")) { | ||
455 | 449 | sagan_var = strtok_r(NULL, " ", &tok); | ||
456 | 450 | |||
457 | 451 | if (!strcmp(sagan_var, "FIFO" )) { | ||
458 | 452 | snprintf(config->sagan_fifo, sizeof(config->sagan_fifo), "%s", strtok_r(NULL, " ", &tok)); | ||
459 | 453 | config->sagan_fifo[strlen(config->sagan_fifo)-1] = '\0'; | ||
460 | 454 | } | ||
461 | 455 | |||
462 | 456 | if (!strcmp(sagan_var, "RULE_PATH" )) { | ||
463 | 457 | snprintf(config->sagan_rule_path, sizeof(config->sagan_rule_path), "%s", strtok_r(NULL, " ", &tok)); | ||
464 | 458 | config->sagan_rule_path[strlen(config->sagan_rule_path)-1] = '\0'; | ||
465 | 459 | } | ||
466 | 460 | |||
467 | 461 | if (!strcmp(sagan_var, "LOCKFILE" )) { | ||
468 | 462 | snprintf(config->sagan_lockfile, sizeof(config->sagan_lockfile), "%s", strtok_r(NULL, " ", &tok)); | ||
469 | 463 | config->sagan_lockfile[strlen(config->sagan_lockfile)-1] = '\0'; | ||
470 | 464 | } | ||
471 | 465 | |||
472 | 466 | if (!strcmp(sagan_var, "ALERTLOG" )) { | ||
473 | 467 | snprintf(config->sagan_alert_filepath, sizeof(config->sagan_alert_filepath), "%s", strtok_r(NULL, " ", &tok)); | ||
474 | 468 | config->sagan_alert_filepath[strlen(config->sagan_alert_filepath)-1] = '\0'; | ||
475 | 469 | } | ||
476 | 470 | |||
477 | 471 | if (!strcmp(sagan_var, "SAGANLOGPATH" )) { | ||
478 | 472 | snprintf(config->sagan_log_path, sizeof(config->sagan_log_path), "%s", strtok_r(NULL, " ", &tok)); | ||
479 | 473 | config->sagan_log_path[strlen(config->sagan_log_path)-1] = '\0'; | ||
480 | 474 | } | ||
481 | 475 | } | ||
482 | 476 | |||
483 | 477 | /* "include */ | ||
484 | 478 | |||
485 | 479 | if (!strcmp(sagan_option, "include" )) { | ||
486 | 480 | |||
487 | 481 | snprintf(tmpstring, sizeof(tmpstring), "%s", strtok_r(NULL, " ", &tok)); | ||
488 | 482 | |||
489 | 483 | tmpstring[strlen(tmpstring)-1] = '\0'; | ||
490 | 484 | |||
491 | 485 | strlcpy(ruleset, sagan_replace_str(tmpstring, "$RULE_PATH", config->sagan_rule_path), sizeof(ruleset)); | ||
492 | 486 | |||
493 | 487 | filename=sagan_getfilename(ruleset); /* Get the file name to figure out "what" we're loading */ | ||
494 | 488 | |||
495 | 489 | if (!strcmp(filename, "classification.config")) | ||
496 | 490 | { | ||
497 | 491 | load_classifications(debug, config, ruleset); | ||
498 | 492 | } | ||
499 | 493 | |||
500 | 494 | if (!strcmp(filename, "reference.config")) | ||
501 | 495 | { | ||
502 | 496 | load_reference(debug, config, ruleset); | ||
503 | 497 | } | ||
504 | 498 | |||
505 | 499 | /* It's not a classifcations file or reference, so it must be a ruleset */ | ||
506 | 500 | |||
507 | 501 | if (strcmp(filename, "reference.config") && strcmp(filename, "classification.config")) { | ||
508 | 502 | |||
509 | 503 | load_rules(debug, config, ruleset); | ||
510 | 504 | } | ||
511 | 505 | } | ||
512 | 506 | } | ||
513 | 507 | |||
514 | 508 | fclose(sagancfg); | ||
515 | 509 | |||
516 | 510 | /* Check rules for duplicate sid. We can't have that! */ | ||
517 | 511 | |||
518 | 512 | for (i = 0; i < counters->rulecount; i++) { | ||
519 | 513 | for ( check = i+1; check < counters->rulecount; check ++) { | ||
520 | 514 | if (!strcmp (rulestruct[check].s_sid, rulestruct[i].s_sid )) | ||
521 | 515 | sagan_log(config, 1, "[%s, line %d] Detected duplicate signature id [sid] number %s. Please correct this.", __FILE__, __LINE__, rulestruct[check].s_sid, rulestruct[i].s_sid); | ||
522 | 516 | } | ||
523 | 517 | } | ||
524 | 518 | |||
525 | 519 | /* If we have the "send-to" option, verify the configuration has the proper smtpserver, etc. */ | ||
526 | 520 | |||
527 | 521 | #ifdef HAVE_LIBESMTP | ||
528 | 522 | |||
529 | 523 | if (config->sagan_esmtp_flag && !strcmp(config->sagan_esmtp_server, "")) sagan_log(config, 1, "[%s, line %d] Configuration SMTP 'smtpserver' field is missing! |%s|", __FILE__, __LINE__, config->sagan_esmtp_server); | ||
530 | 524 | if (config->sagan_esmtp_flag && !strcmp(config->sagan_esmtp_from, "" )) sagan_log(config, 1, "[%s, line %d] Configuration SMTP 'from' field is missing!", __FILE__, __LINE__); | ||
531 | 525 | |||
532 | 526 | #endif | ||
533 | 527 | |||
534 | 528 | if (!strcmp(config->sagan_fifo, "")) sagan_log(config, 1, "No FIFO option found which is required! Aborting!"); | ||
535 | 529 | if (!strcmp(config->sagan_host, "" )) sagan_log(config, 1, "The 'sagan_host' option was not found and is required."); | ||
536 | 530 | if ( config->sagan_port == 0 ) sagan_log(config, 1, "The 'sagan_port' option was not set and is required."); | ||
537 | 531 | |||
538 | 532 | } | ||
539 | 533 | 0 | ||
540 | === removed file '.pc/01-do-not-include-lognorm-private-header.patch/src/sagan-signal.c' | |||
541 | --- .pc/01-do-not-include-lognorm-private-header.patch/src/sagan-signal.c 2012-04-16 22:33:24 +0000 | |||
542 | +++ .pc/01-do-not-include-lognorm-private-header.patch/src/sagan-signal.c 1970-01-01 00:00:00 +0000 | |||
543 | @@ -1,160 +0,0 @@ | |||
544 | 1 | /* | ||
545 | 2 | ** Copyright (C) 2009-2012 Quadrant Information Security <quadrantsec.com> | ||
546 | 3 | ** Copyright (C) 2009-2012 Champ Clark III <cclark@quadrantsec.com> | ||
547 | 4 | ** | ||
548 | 5 | ** This program is free software; you can redistribute it and/or modify | ||
549 | 6 | ** it under the terms of the GNU General Public License Version 2 as | ||
550 | 7 | ** published by the Free Software Foundation. You may not use, modify or | ||
551 | 8 | ** distribute this program under any other version of the GNU General | ||
552 | 9 | ** Public License. | ||
553 | 10 | ** | ||
554 | 11 | ** This program is distributed in the hope that it will be useful, | ||
555 | 12 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
556 | 13 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
557 | 14 | ** GNU General Public License for more details. | ||
558 | 15 | ** | ||
559 | 16 | ** You should have received a copy of the GNU General Public License | ||
560 | 17 | ** along with this program; if not, write to the Free Software | ||
561 | 18 | ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
562 | 19 | */ | ||
563 | 20 | |||
564 | 21 | /* sagan-signal.c | ||
565 | 22 | * | ||
566 | 23 | * This runs as a thread for signal processing. | ||
567 | 24 | * | ||
568 | 25 | */ | ||
569 | 26 | |||
570 | 27 | #ifdef HAVE_CONFIG_H | ||
571 | 28 | #include "config.h" /* From autoconf */ | ||
572 | 29 | #endif | ||
573 | 30 | |||
574 | 31 | #include <stdio.h> | ||
575 | 32 | #include <stdlib.h> | ||
576 | 33 | #include <signal.h> | ||
577 | 34 | #include <pthread.h> | ||
578 | 35 | #include <stdint.h> | ||
579 | 36 | |||
580 | 37 | #include "version.h" | ||
581 | 38 | |||
582 | 39 | #include "sagan.h" | ||
583 | 40 | |||
584 | 41 | #ifdef HAVE_LIBLOGNORM | ||
585 | 42 | #include <liblognorm.h> | ||
586 | 43 | #include <ptree.h> | ||
587 | 44 | #include <lognorm.h> | ||
588 | 45 | static ln_ctx ctx; | ||
589 | 46 | int liblognorm_count; | ||
590 | 47 | #endif | ||
591 | 48 | |||
592 | 49 | #ifdef HAVE_LIBPRELUDE | ||
593 | 50 | #include <libprelude/prelude.h> | ||
594 | 51 | sbool sagan_prelude_flag; | ||
595 | 52 | prelude_client_t *preludeclient; | ||
596 | 53 | #endif | ||
597 | 54 | |||
598 | 55 | #ifdef HAVE_LIBDNET | ||
599 | 56 | #include "output-plugins/sagan-unified2.h" | ||
600 | 57 | sbool sagan_unified2_flag; | ||
601 | 58 | #endif | ||
602 | 59 | |||
603 | 60 | #if defined(HAVE_LIBMYSQLCLIENT_R) || defined(HAVE_LIBPQ) | ||
604 | 61 | #include "output-plugins/sagan-snort.h" | ||
605 | 62 | #endif | ||
606 | 63 | |||
607 | 64 | |||
608 | 65 | struct _SaganCounters *counters; | ||
609 | 66 | |||
610 | 67 | struct rule_struct *rulestruct; | ||
611 | 68 | struct class_struct *classstruct; | ||
612 | 69 | struct ref_struct *refstruct; | ||
613 | 70 | |||
614 | 71 | pthread_mutex_t sig_mutex = PTHREAD_MUTEX_INITIALIZER; | ||
615 | 72 | |||
616 | 73 | void sig_handler( _SaganSigArgs *args ) { | ||
617 | 74 | |||
618 | 75 | sigset_t signal_set; | ||
619 | 76 | int sig; | ||
620 | 77 | |||
621 | 78 | for(;;) { | ||
622 | 79 | /* wait for any and all signals */ | ||
623 | 80 | sigfillset( &signal_set ); | ||
624 | 81 | sigwait( &signal_set, &sig ); | ||
625 | 82 | |||
626 | 83 | |||
627 | 84 | switch( sig ) | ||
628 | 85 | { | ||
629 | 86 | /* exit */ | ||
630 | 87 | case SIGQUIT: | ||
631 | 88 | case SIGINT: | ||
632 | 89 | case SIGTERM: | ||
633 | 90 | case SIGSEGV: | ||
634 | 91 | case SIGABRT: | ||
635 | 92 | |||
636 | 93 | sagan_log(args->config, 0, "\n\n[Received signal %d. Sagan version %s shutting down]-------\n", sig, VERSION); | ||
637 | 94 | sagan_statistics(args->config); | ||
638 | 95 | |||
639 | 96 | #if defined(HAVE_LIBMYSQLCLIENT_R) || defined(HAVE_LIBPQ) | ||
640 | 97 | |||
641 | 98 | /* last_cid != cid (has there been any alerts? */ | ||
642 | 99 | |||
643 | 100 | if ( args->config->dbtype != 0 && counters->last_cid != counters-> cid ) record_last_cid(args->debug, args->config, counters); | ||
644 | 101 | #endif | ||
645 | 102 | |||
646 | 103 | #ifdef HAVE_LIBPRELUDE | ||
647 | 104 | |||
648 | 105 | /* This comment is from the Snort source code. "Sensor reporting to Prelude | ||
649 | 106 | shall never go offline, which is why we use the | ||
650 | 107 | PRELUDE_CLIENT_EXIT_STATUS_FAILURE. */ | ||
651 | 108 | |||
652 | 109 | if ( sagan_prelude_flag != 0 ) { | ||
653 | 110 | prelude_client_destroy(preludeclient, PRELUDE_CLIENT_EXIT_STATUS_FAILURE); | ||
654 | 111 | prelude_deinit(); | ||
655 | 112 | } | ||
656 | 113 | |||
657 | 114 | #endif | ||
658 | 115 | |||
659 | 116 | #ifdef HAVE_LIBDNET | ||
660 | 117 | if ( sagan_unified2_flag ) Unified2CleanExit(args->config); | ||
661 | 118 | #endif | ||
662 | 119 | |||
663 | 120 | fflush(args->config->sagan_alert_stream); | ||
664 | 121 | fclose(args->config->sagan_alert_stream); /* Close Sagan alert file */ | ||
665 | 122 | |||
666 | 123 | fflush(args->config->sagan_log_stream); /* Close the sagan.log */ | ||
667 | 124 | fclose(args->config->sagan_log_stream); | ||
668 | 125 | |||
669 | 126 | removelockfile(args->config); | ||
670 | 127 | exit(0); | ||
671 | 128 | break; | ||
672 | 129 | |||
673 | 130 | case SIGHUP: | ||
674 | 131 | pthread_mutex_lock(&sig_mutex); | ||
675 | 132 | sagan_log(args->config, 0, "[Reloading Sagan version %s.]-------", VERSION); | ||
676 | 133 | |||
677 | 134 | /* Reset counters */ | ||
678 | 135 | counters->refcount=0; counters->classcount=0; counters->rulecount=0; counters->ruletotal=0; | ||
679 | 136 | |||
680 | 137 | /* Re-load everything */ | ||
681 | 138 | |||
682 | 139 | load_config(args->debug, args->config); | ||
683 | 140 | |||
684 | 141 | pthread_mutex_unlock(&sig_mutex); | ||
685 | 142 | |||
686 | 143 | sagan_log(args->config, 0, "Configuration reloaded."); | ||
687 | 144 | break; | ||
688 | 145 | |||
689 | 146 | /* Signals to ignore */ | ||
690 | 147 | case 17: /* Child process has exited. */ | ||
691 | 148 | case 28: /* Terminal 'resize'/alarm. */ | ||
692 | 149 | break; | ||
693 | 150 | |||
694 | 151 | case SIGUSR1: | ||
695 | 152 | sagan_statistics(args->config); | ||
696 | 153 | break; | ||
697 | 154 | |||
698 | 155 | default: | ||
699 | 156 | sagan_log(args->config, 0, "[Received signal %d. Sagan doesn't know how to deal with]", sig); | ||
700 | 157 | } | ||
701 | 158 | } | ||
702 | 159 | } | ||
703 | 160 | |||
704 | 161 | 0 | ||
705 | === removed file '.pc/01-do-not-include-lognorm-private-header.patch/src/sagan.c' | |||
706 | --- .pc/01-do-not-include-lognorm-private-header.patch/src/sagan.c 2012-04-16 22:33:24 +0000 | |||
707 | +++ .pc/01-do-not-include-lognorm-private-header.patch/src/sagan.c 1970-01-01 00:00:00 +0000 | |||
708 | @@ -1,1322 +0,0 @@ | |||
709 | 1 | /* | ||
710 | 2 | ** Copyright (C) 2009-2012 Quadrant Information Security <quadrantsec.com> | ||
711 | 3 | ** Copyright (C) 2009-2012 Champ Clark III <cclark@quadrantsec.com> | ||
712 | 4 | ** | ||
713 | 5 | ** This program is free software; you can redistribute it and/or modify | ||
714 | 6 | ** it under the terms of the GNU General Public License Version 2 as | ||
715 | 7 | ** published by the Free Software Foundation. You may not use, modify or | ||
716 | 8 | ** distribute this program under any other version of the GNU General | ||
717 | 9 | ** Public License. | ||
718 | 10 | ** | ||
719 | 11 | ** This program is distributed in the hope that it will be useful, | ||
720 | 12 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
721 | 13 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
722 | 14 | ** GNU General Public License for more details. | ||
723 | 15 | ** | ||
724 | 16 | ** You should have received a copy of the GNU General Public License | ||
725 | 17 | ** along with this program; if not, write to the Free Software | ||
726 | 18 | ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
727 | 19 | */ | ||
728 | 20 | |||
729 | 21 | /* sagan.c | ||
730 | 22 | * | ||
731 | 23 | * This is the main "thread" and engine that looks for events & patterns | ||
732 | 24 | * based on 'snort like' rule sets. | ||
733 | 25 | * | ||
734 | 26 | */ | ||
735 | 27 | |||
736 | 28 | #ifdef HAVE_CONFIG_H | ||
737 | 29 | #include "config.h" /* From autoconf */ | ||
738 | 30 | #endif | ||
739 | 31 | |||
740 | 32 | #include <stdio.h> | ||
741 | 33 | #include <stdlib.h> | ||
742 | 34 | #include <sys/types.h> | ||
743 | 35 | #include <unistd.h> | ||
744 | 36 | #include <pthread.h> | ||
745 | 37 | #include <ctype.h> | ||
746 | 38 | #include <errno.h> | ||
747 | 39 | #include <fcntl.h> | ||
748 | 40 | #include <sys/stat.h> | ||
749 | 41 | #include <string.h> | ||
750 | 42 | #include <getopt.h> | ||
751 | 43 | #include <time.h> | ||
752 | 44 | #include <signal.h> | ||
753 | 45 | #include <pcre.h> | ||
754 | 46 | #include <limits.h> | ||
755 | 47 | #include <stdint.h> | ||
756 | 48 | #include <inttypes.h> | ||
757 | 49 | #include <arpa/inet.h> | ||
758 | 50 | #include <netinet/in.h> | ||
759 | 51 | #include <sys/socket.h> | ||
760 | 52 | |||
761 | 53 | #include "sagan.h" | ||
762 | 54 | |||
763 | 55 | #include "version.h" | ||
764 | 56 | |||
765 | 57 | |||
766 | 58 | #ifdef HAVE_LIBLOGNORM | ||
767 | 59 | #include <liblognorm.h> | ||
768 | 60 | #include <ptree.h> | ||
769 | 61 | #include <lognorm.h> | ||
770 | 62 | #endif | ||
771 | 63 | |||
772 | 64 | #ifdef HAVE_LIBDNET | ||
773 | 65 | #include "output-plugins/sagan-unified2.h" | ||
774 | 66 | #endif | ||
775 | 67 | |||
776 | 68 | #define OVECCOUNT 30 | ||
777 | 69 | |||
778 | 70 | struct _SaganCounters *counters; | ||
779 | 71 | struct _Rule_Struct *rulestruct; | ||
780 | 72 | struct class_struct *classstruct; | ||
781 | 73 | |||
782 | 74 | sbool daemonize=0; | ||
783 | 75 | |||
784 | 76 | /****************************************************************************/ | ||
785 | 77 | /* Liblognorm Globals */ | ||
786 | 78 | /****************************************************************************/ | ||
787 | 79 | |||
788 | 80 | #ifdef HAVE_LIBLOGNORM | ||
789 | 81 | struct stat fileinfo; | ||
790 | 82 | struct liblognorm_struct *liblognormstruct; | ||
791 | 83 | struct liblognorm_toload_struct *liblognormtoloadstruct; | ||
792 | 84 | int liblognorm_count; | ||
793 | 85 | |||
794 | 86 | static ln_ctx ctx; | ||
795 | 87 | static ee_ctx eectx; | ||
796 | 88 | |||
797 | 89 | es_str_t *str; | ||
798 | 90 | es_str_t *propName = NULL; | ||
799 | 91 | |||
800 | 92 | struct ee_event *lnevent = NULL;; | ||
801 | 93 | struct ee_field *field = NULL; | ||
802 | 94 | char *cstr; | ||
803 | 95 | #endif | ||
804 | 96 | |||
805 | 97 | /* ######################################################################## | ||
806 | 98 | * Start of main() thread | ||
807 | 99 | * ######################################################################## */ | ||
808 | 100 | |||
809 | 101 | int main(int argc, char **argv) { | ||
810 | 102 | |||
811 | 103 | const struct option long_options[] = { | ||
812 | 104 | { "help", no_argument, NULL, 'h' }, | ||
813 | 105 | { "debug", required_argument, NULL, 'd' }, | ||
814 | 106 | { "daemon", no_argument, NULL, 'D' }, | ||
815 | 107 | { "user", required_argument, NULL, 'U' }, | ||
816 | 108 | { "chroot", required_argument, NULL, 'c' }, | ||
817 | 109 | { "config", required_argument, NULL, 'f' }, | ||
818 | 110 | { "log", required_argument, NULL, 'l' }, | ||
819 | 111 | {0, 0, 0, 0} | ||
820 | 112 | |||
821 | 113 | }; | ||
822 | 114 | |||
823 | 115 | static const char *short_options = | ||
824 | 116 | "l:f:u:d:c:pDh"; | ||
825 | 117 | |||
826 | 118 | int option_index = 0; | ||
827 | 119 | |||
828 | 120 | /* Passing Sagan events to output plugins */ | ||
829 | 121 | |||
830 | 122 | struct _Sagan_Event *SaganEvent = NULL; | ||
831 | 123 | SaganEvent = malloc(MAX_THREADS * sizeof(struct _Sagan_Event)); | ||
832 | 124 | |||
833 | 125 | /***************************************************************************/ | ||
834 | 126 | /* pthread for the output plugins */ | ||
835 | 127 | /***************************************************************************/ | ||
836 | 128 | |||
837 | 129 | pthread_t output_id[MAX_THREADS]; | ||
838 | 130 | pthread_attr_t thread_output_attr; | ||
839 | 131 | pthread_attr_init(&thread_output_attr); | ||
840 | 132 | pthread_attr_setdetachstate(&thread_output_attr, PTHREAD_CREATE_DETACHED); | ||
841 | 133 | |||
842 | 134 | /****************************************************************************/ | ||
843 | 135 | /* pthread for the processor plugins */ | ||
844 | 136 | /****************************************************************************/ | ||
845 | 137 | |||
846 | 138 | pthread_t processor_id[MAX_THREADS]; | ||
847 | 139 | pthread_attr_t thread_processor_attr; | ||
848 | 140 | pthread_attr_init(&thread_processor_attr); | ||
849 | 141 | pthread_attr_setdetachstate(&thread_processor_attr, PTHREAD_CREATE_DETACHED); | ||
850 | 142 | |||
851 | 143 | |||
852 | 144 | /****************************************************************************/ | ||
853 | 145 | /* libpcap/PLOG (syslog sniffer) local variables */ | ||
854 | 146 | /****************************************************************************/ | ||
855 | 147 | |||
856 | 148 | #ifdef HAVE_LIBPCAP | ||
857 | 149 | pthread_t pcap_thread; | ||
858 | 150 | pthread_attr_t thread_pcap_attr; | ||
859 | 151 | pthread_attr_init(&thread_pcap_attr); | ||
860 | 152 | pthread_attr_setdetachstate(&thread_pcap_attr, PTHREAD_CREATE_DETACHED); | ||
861 | 153 | #endif | ||
862 | 154 | |||
863 | 155 | /****************************************************************************/ | ||
864 | 156 | /* Various local variables */ | ||
865 | 157 | /****************************************************************************/ | ||
866 | 158 | |||
867 | 159 | #if defined(HAVE_LIBMYSQLCLIENT_R) || defined(HAVE_LIBPQ) | ||
868 | 160 | char *sqlout=NULL; | ||
869 | 161 | char *sql=NULL; | ||
870 | 162 | char sqltmp[MAXSQL]; | ||
871 | 163 | #endif | ||
872 | 164 | |||
873 | 165 | /* Block all signals, we create a signal handling thread */ | ||
874 | 166 | |||
875 | 167 | sigset_t signal_set; | ||
876 | 168 | pthread_t sig_thread; | ||
877 | 169 | sigfillset( &signal_set ); | ||
878 | 170 | pthread_sigmask( SIG_BLOCK, &signal_set, NULL ); | ||
879 | 171 | |||
880 | 172 | /* Key board handler (displays stats, etc */ | ||
881 | 173 | |||
882 | 174 | pthread_t key_thread; | ||
883 | 175 | pthread_attr_t key_thread_attr; | ||
884 | 176 | pthread_attr_init(&key_thread_attr); | ||
885 | 177 | pthread_attr_setdetachstate(&key_thread_attr, PTHREAD_CREATE_DETACHED); | ||
886 | 178 | |||
887 | 179 | struct sockaddr_in sa; | ||
888 | 180 | char src_dns_lookup[20]; | ||
889 | 181 | int dns_flag=0; | ||
890 | 182 | |||
891 | 183 | sbool fifoerr=0; | ||
892 | 184 | |||
893 | 185 | int threadid=0; | ||
894 | 186 | |||
895 | 187 | char *ip_src = NULL; | ||
896 | 188 | char *ip_dst = NULL; | ||
897 | 189 | |||
898 | 190 | char ip_srctmp[MAX_MSGSLOT][MAXIP]; | ||
899 | 191 | char ip_dsttmp[MAX_MSGSLOT][MAXIP]; | ||
900 | 192 | |||
901 | 193 | char *username = NULL; | ||
902 | 194 | char *uid = NULL; | ||
903 | 195 | char s_msg[1024]; | ||
904 | 196 | char s_msgtmp[MAX_MSGSLOT][1024]; | ||
905 | 197 | |||
906 | 198 | int src_port; | ||
907 | 199 | int dst_port; | ||
908 | 200 | |||
909 | 201 | int src_porttmp[MAX_MSGSLOT]; | ||
910 | 202 | int dst_porttmp[MAX_MSGSLOT]; | ||
911 | 203 | |||
912 | 204 | int after_count_by_src=0; | ||
913 | 205 | int after_count_by_dst=0; | ||
914 | 206 | sbool after_flag=0; | ||
915 | 207 | sbool after_log_flag=0; | ||
916 | 208 | |||
917 | 209 | int thresh_count_by_src=0; | ||
918 | 210 | int thresh_count_by_dst=0; | ||
919 | 211 | sbool thresh_flag=0; | ||
920 | 212 | sbool thresh_log_flag=0; | ||
921 | 213 | char timet[20]; | ||
922 | 214 | |||
923 | 215 | struct thresh_by_src *threshbysrc = NULL; | ||
924 | 216 | struct thresh_by_dst *threshbydst = NULL; | ||
925 | 217 | |||
926 | 218 | struct after_by_src *afterbysrc = NULL; | ||
927 | 219 | struct after_by_dst *afterbydst = NULL; | ||
928 | 220 | |||
929 | 221 | uint64_t thresh_oldtime_src; | ||
930 | 222 | uint64_t after_oldtime_src; | ||
931 | 223 | |||
932 | 224 | char fip[MAXIP]; | ||
933 | 225 | |||
934 | 226 | char *syslog_host=NULL; | ||
935 | 227 | char syslog_hosttmp[MAX_MSGSLOT][MAXHOST]; | ||
936 | 228 | |||
937 | 229 | char *syslog_facility=NULL; | ||
938 | 230 | char syslog_facilitytmp[MAX_MSGSLOT][MAXFACILITY]; | ||
939 | 231 | |||
940 | 232 | char *syslog_priority=NULL; | ||
941 | 233 | |||
942 | 234 | char *syslog_level=NULL; | ||
943 | 235 | char syslog_leveltmp[MAX_MSGSLOT][MAXLEVEL]; | ||
944 | 236 | |||
945 | 237 | char *syslog_tag=NULL; | ||
946 | 238 | char syslog_tagtmp[MAX_MSGSLOT][MAXTAG]; | ||
947 | 239 | |||
948 | 240 | char *syslog_date=NULL; | ||
949 | 241 | char syslog_datetmp[MAX_MSGSLOT][MAXDATE]; | ||
950 | 242 | |||
951 | 243 | char *syslog_time=NULL; | ||
952 | 244 | char syslog_timetmp[MAX_MSGSLOT][MAXTIME]; | ||
953 | 245 | |||
954 | 246 | char *syslog_program=NULL; | ||
955 | 247 | char syslog_programtmp[MAX_MSGSLOT][MAXPROGRAM]; | ||
956 | 248 | |||
957 | 249 | char *syslog_msg=NULL; | ||
958 | 250 | char syslog_msg_origtmp[MAX_SYSLOGMSG]; | ||
959 | 251 | |||
960 | 252 | int rc=0; | ||
961 | 253 | |||
962 | 254 | int ovector[OVECCOUNT]; | ||
963 | 255 | |||
964 | 256 | char syslogstring[MAX_SYSLOGMSG]; | ||
965 | 257 | char sysmsg[MAX_MSGSLOT][MAX_SYSLOGMSG]; | ||
966 | 258 | int msgslot=0; | ||
967 | 259 | char syslogtmp[2]; | ||
968 | 260 | char c; | ||
969 | 261 | |||
970 | 262 | char *ptmp; | ||
971 | 263 | char *tok; | ||
972 | 264 | char *tok2; | ||
973 | 265 | |||
974 | 266 | /* For the ruleset */ | ||
975 | 267 | |||
976 | 268 | char *content; | ||
977 | 269 | char *program; | ||
978 | 270 | char *facility; | ||
979 | 271 | char *syspri; | ||
980 | 272 | char *level; | ||
981 | 273 | char *tag; | ||
982 | 274 | char tmpbuf[128]; | ||
983 | 275 | memset(tmpbuf,0,128); | ||
984 | 276 | char ipbuf_src[128]; | ||
985 | 277 | char ipbuf_dst[128]; | ||
986 | 278 | |||
987 | 279 | char *syslog_msg_case; | ||
988 | 280 | char *s_content_case; | ||
989 | 281 | |||
990 | 282 | char *runas=RUNAS; | ||
991 | 283 | |||
992 | 284 | int i; | ||
993 | 285 | int fd=0; | ||
994 | 286 | int b; | ||
995 | 287 | int z; | ||
996 | 288 | int match=0; | ||
997 | 289 | int pcrematch=0; | ||
998 | 290 | |||
999 | 291 | time_t t; | ||
1000 | 292 | struct tm *now, *run; | ||
1001 | 293 | |||
1002 | 294 | /* Allocate and clear memory for global structs */ | ||
1003 | 295 | |||
1004 | 296 | struct _SaganDebug *debug; | ||
1005 | 297 | debug = malloc(sizeof(_SaganDebug)); | ||
1006 | 298 | memset(debug, 0, sizeof(_SaganDebug)); | ||
1007 | 299 | |||
1008 | 300 | struct _SaganConfig *config; | ||
1009 | 301 | config = malloc(sizeof(_SaganConfig)); | ||
1010 | 302 | memset(config, 0, sizeof(_SaganConfig)); | ||
1011 | 303 | |||
1012 | 304 | struct _SaganSigArgs *sigargs; | ||
1013 | 305 | sigargs = malloc(sizeof(_SaganSigArgs)); | ||
1014 | 306 | memset(sigargs, 0, sizeof(_SaganSigArgs)); | ||
1015 | 307 | |||
1016 | 308 | struct _SaganDNSCache *dnscache; | ||
1017 | 309 | dnscache = malloc(sizeof(_SaganDNSCache)); | ||
1018 | 310 | memset(dnscache, 0, sizeof(_SaganDNSCache)); | ||
1019 | 311 | |||
1020 | 312 | counters = malloc(sizeof(_SaganCounters)); | ||
1021 | 313 | memset(counters, 0, sizeof(_SaganCounters)); | ||
1022 | 314 | |||
1023 | 315 | t = time(NULL); | ||
1024 | 316 | run=localtime(&t); | ||
1025 | 317 | strftime(config->sagan_startutime, sizeof(config->sagan_startutime), "%s", run); | ||
1026 | 318 | |||
1027 | 319 | |||
1028 | 320 | snprintf(config->sagan_config, sizeof(config->sagan_config), "%s", CONFIG_FILE_PATH); | ||
1029 | 321 | |||
1030 | 322 | /* We set the config->sagan_log_filepath to the system default. It'll be fopen'ed | ||
1031 | 323 | shortly - 06/03/2011 - Champ Clark III */ | ||
1032 | 324 | |||
1033 | 325 | snprintf(config->sagan_log_filepath, sizeof(config->sagan_log_filepath), "%s", SAGANLOG); | ||
1034 | 326 | |||
1035 | 327 | /* Get command line arg's */ | ||
1036 | 328 | while ((c = getopt_long(argc, argv, short_options, long_options, &option_index)) != -1) { | ||
1037 | 329 | |||
1038 | 330 | switch(c) { | ||
1039 | 331 | |||
1040 | 332 | if (c == -1) break; | ||
1041 | 333 | |||
1042 | 334 | case 'h': | ||
1043 | 335 | sagan_usage(); | ||
1044 | 336 | exit(0); | ||
1045 | 337 | break; | ||
1046 | 338 | |||
1047 | 339 | case 'd': | ||
1048 | 340 | |||
1049 | 341 | if (strstr(optarg, "syslog")) debug->debugsyslog=1; | ||
1050 | 342 | if (strstr(optarg, "load")) debug->debugload=1; | ||
1051 | 343 | if (strstr(optarg, "fwsam")) debug->debugfwsam=1; | ||
1052 | 344 | |||
1053 | 345 | #ifdef HAVE_LIBLOGNORM | ||
1054 | 346 | if (strstr(optarg, "normalize" )) debug->debugnormalize=1; | ||
1055 | 347 | #endif | ||
1056 | 348 | |||
1057 | 349 | #if defined(HAVE_LIBMYSQLCLIENT_R) || defined(HAVE_LIBPQ) | ||
1058 | 350 | if (strstr(optarg, "sql")) debug->debugsql=1; | ||
1059 | 351 | #endif | ||
1060 | 352 | |||
1061 | 353 | #ifdef HAVE_LIBESMTP | ||
1062 | 354 | if (strstr(optarg, "smtp")) debug->debugesmtp=1; | ||
1063 | 355 | #endif | ||
1064 | 356 | |||
1065 | 357 | #ifdef HAVE_LIBPCAP | ||
1066 | 358 | if (strstr(optarg, "plog")) debug->debugplog=1; | ||
1067 | 359 | #endif | ||
1068 | 360 | |||
1069 | 361 | break; | ||
1070 | 362 | |||
1071 | 363 | case 'D': | ||
1072 | 364 | daemonize=1; | ||
1073 | 365 | break; | ||
1074 | 366 | |||
1075 | 367 | case 'u': | ||
1076 | 368 | runas=optarg; | ||
1077 | 369 | break; | ||
1078 | 370 | |||
1079 | 371 | case 'c': | ||
1080 | 372 | sagan_chroot(runas,optarg); | ||
1081 | 373 | break; | ||
1082 | 374 | |||
1083 | 375 | case 'f': | ||
1084 | 376 | strncpy(config->sagan_config,optarg,sizeof(config->sagan_config) - 1); // strlcpy | ||
1085 | 377 | config->sagan_config[sizeof(config->sagan_config)-1] = '\0'; | ||
1086 | 378 | break; | ||
1087 | 379 | |||
1088 | 380 | case 'l': | ||
1089 | 381 | strncpy(config->sagan_log_filepath,optarg,sizeof(config->sagan_log_filepath) - 1); | ||
1090 | 382 | config->sagan_log_filepath[sizeof(config->sagan_log_filepath)-1] = '\0'; | ||
1091 | 383 | break; | ||
1092 | 384 | |||
1093 | 385 | |||
1094 | 386 | default: | ||
1095 | 387 | fprintf(stderr, "Invalid argument! See below for command line switches.\n"); | ||
1096 | 388 | sagan_usage(); | ||
1097 | 389 | exit(0); | ||
1098 | 390 | break; | ||
1099 | 391 | } | ||
1100 | 392 | } | ||
1101 | 393 | |||
1102 | 394 | /* Open the sagan.log file. Moved from sagan-config.c as it became to complex | ||
1103 | 395 | 06/03/2011 - Champ Clark */ | ||
1104 | 396 | |||
1105 | 397 | if ((config->sagan_log_stream = fopen(config->sagan_log_filepath, "a")) == NULL) { | ||
1106 | 398 | fprintf(stderr, "[E] [%s, line %d] Cannot open %s!\n", __FILE__, __LINE__, config->sagan_log_filepath); | ||
1107 | 399 | exit(1); | ||
1108 | 400 | } | ||
1109 | 401 | |||
1110 | 402 | |||
1111 | 403 | load_config( debug, config ); | ||
1112 | 404 | |||
1113 | 405 | /* Load/init liblognorm definitions. I tried to move this into a subroutine, | ||
1114 | 406 | * but that ended up causing segfaults on ln_normalize() or causing | ||
1115 | 407 | * liblognorm not to function correctly (not parsing fields). Make reloading | ||
1116 | 408 | * a SIGHUP a issue as well. | ||
1117 | 409 | * 12/17/2010 - Champ | ||
1118 | 410 | */ | ||
1119 | 411 | |||
1120 | 412 | #ifdef HAVE_LIBLOGNORM | ||
1121 | 413 | if((ctx = ln_initCtx()) == NULL) sagan_log(config, 1, "[%s, line %d] Cannot initialize liblognorm context.", __FILE__, __LINE__); | ||
1122 | 414 | if((eectx = ee_initCtx()) == NULL) sagan_log(config, 1, "[%s, line %d] Cannot initialize libee context.", __FILE__, __LINE__); | ||
1123 | 415 | |||
1124 | 416 | ln_setEECtx(ctx, eectx); | ||
1125 | 417 | |||
1126 | 418 | for (i=0; i < counters->liblognormtoload_count; i++) { | ||
1127 | 419 | sagan_log(config, 0, "Loading %s for normalization.", liblognormtoloadstruct[i].filepath); | ||
1128 | 420 | if (stat(liblognormtoloadstruct[i].filepath, &fileinfo)) sagan_log(config, 1, "%s was not fonnd.", liblognormtoloadstruct[i].filepath); | ||
1129 | 421 | ln_loadSamples(ctx, liblognormtoloadstruct[i].filepath); | ||
1130 | 422 | } | ||
1131 | 423 | #endif | ||
1132 | 424 | |||
1133 | 425 | sagan_log(config, 0, "Configuration file %s loaded and %d rules loaded.", config->sagan_config, counters->rulecount); | ||
1134 | 426 | sagan_log(config, 0, "Sagan version %s is firing up!", VERSION); | ||
1135 | 427 | |||
1136 | 428 | /* We go ahead and assign values to SaganSigArgs (struct sig_thread_args). This | ||
1137 | 429 | * struct is always used by the sig_handler thread, and sometimes used by the | ||
1138 | 430 | * plog_handler (below). So we assign values now */ | ||
1139 | 431 | |||
1140 | 432 | sigargs->daemonize = daemonize; | ||
1141 | 433 | sigargs->debug = debug; | ||
1142 | 434 | sigargs->config = config; | ||
1143 | 435 | |||
1144 | 436 | #ifdef HAVE_LIBPCAP | ||
1145 | 437 | |||
1146 | 438 | /* Spawn a thread to 'sniff' syslog traffic (sagan-plog.c). This redirects syslog | ||
1147 | 439 | traffic to the /dev/log socket. This needs "root" access, so we drop priv's | ||
1148 | 440 | after this thread is started */ | ||
1149 | 441 | |||
1150 | 442 | if ( config->plog_flag ) { | ||
1151 | 443 | |||
1152 | 444 | if ( pthread_create( &pcap_thread, NULL, (void *)plog_handler, sigargs )) { | ||
1153 | 445 | |||
1154 | 446 | removelockfile(config); | ||
1155 | 447 | sagan_log(config, 1, "[%s, line %d] Error creating libpcap handler thread.", __FILE__, __LINE__); | ||
1156 | 448 | } | ||
1157 | 449 | |||
1158 | 450 | sleep(1); /* Sleep to avoid race between main() and plog thread | ||
1159 | 451 | plog thread needs "root" rights before sagan_droppriv(). | ||
1160 | 452 | In some cases main() run sagan_droppriv() before thread | ||
1161 | 453 | can complete - Champ Clark - 07/20/2011 */ | ||
1162 | 454 | |||
1163 | 455 | } | ||
1164 | 456 | #endif | ||
1165 | 457 | |||
1166 | 458 | sagan_droppriv(config, runas); /* Become the Sagan user */ | ||
1167 | 459 | sagan_log(config, 0, "---------------------------------------------------------------------------"); | ||
1168 | 460 | |||
1169 | 461 | /* Open sagan alert file */ | ||
1170 | 462 | |||
1171 | 463 | if (( config->sagan_alert_stream = fopen(config->sagan_alert_filepath, "a" )) == NULL ) { | ||
1172 | 464 | removelockfile(config); | ||
1173 | 465 | sagan_log(config, 1, "[%s, line %d] Can't open %s!", __FILE__, __LINE__, config->sagan_alert_filepath); | ||
1174 | 466 | } | ||
1175 | 467 | |||
1176 | 468 | sagan_log(config, 0, "Max Output Threads : %" PRIu64 "", config->max_output_threads); | ||
1177 | 469 | sagan_log(config, 0, "Max Processor Threads: %" PRIu64 "", config->max_processor_threads); | ||
1178 | 470 | |||
1179 | 471 | sagan_log(config, 0, ""); | ||
1180 | 472 | |||
1181 | 473 | #if defined(HAVE_LIBMYSQLCLIENT_R) || defined(HAVE_LIBPQ) | ||
1182 | 474 | if ( config->dbtype ) { | ||
1183 | 475 | |||
1184 | 476 | config->endian = checkendian(); | ||
1185 | 477 | |||
1186 | 478 | db_connect(config); | ||
1187 | 479 | |||
1188 | 480 | get_sensor_id( debug, config ); | ||
1189 | 481 | sagan_log(config, 0, "Sensor ID : %d", config->sensor_id); | ||
1190 | 482 | counters->cid = get_cid( debug, config ) + 1; | ||
1191 | 483 | |||
1192 | 484 | snprintf(sqltmp, sizeof(sqltmp), "SELECT MAX(cid) FROM event WHERE sid=%d", config->sensor_id); | ||
1193 | 485 | sql=sqltmp; | ||
1194 | 486 | sqlout = db_query(debug, config, sql); | ||
1195 | 487 | |||
1196 | 488 | sagan_log(config, 0, "Next CID : %" PRIu64 "", counters->cid); | ||
1197 | 489 | |||
1198 | 490 | /* Check the event table and compare sensor.last_cid with event_cid. If there's a | ||
1199 | 491 | * mismatch, we correct it - Champ Clark 03/30/2012 */ | ||
1200 | 492 | |||
1201 | 493 | if ( atol(sqlout) != counters->cid ) { | ||
1202 | 494 | sagan_log(config, 2, "Inconsistent cid information for sid=%d. Recovering by rolling forward to cid=%d", config->sensor_id, atol(sqlout) ); | ||
1203 | 495 | counters->cid = atol(sqlout); | ||
1204 | 496 | record_last_cid(debug, config, counters); | ||
1205 | 497 | } | ||
1206 | 498 | |||
1207 | 499 | counters->last_cid = counters->cid; /* Use to determine if a change has happened in sagan_siganl.c */ | ||
1208 | 500 | } | ||
1209 | 501 | |||
1210 | 502 | #endif | ||
1211 | 503 | |||
1212 | 504 | #ifdef HAVE_LIBPRELUDE | ||
1213 | 505 | |||
1214 | 506 | if ( config->sagan_prelude_flag ) { | ||
1215 | 507 | |||
1216 | 508 | sagan_log(config, 0, "Prelude profile: %s", config->sagan_prelude_profile); | ||
1217 | 509 | sagan_log(config, 0, ""); /* libprelude dumps some information. This is to make it pretty */ | ||
1218 | 510 | |||
1219 | 511 | PreludeInit(config); | ||
1220 | 512 | } | ||
1221 | 513 | |||
1222 | 514 | #endif | ||
1223 | 515 | |||
1224 | 516 | #ifdef HAVE_LIBDNET | ||
1225 | 517 | |||
1226 | 518 | if ( config->sagan_unified2_flag ) { | ||
1227 | 519 | |||
1228 | 520 | sagan_log(config, 0, ""); | ||
1229 | 521 | sagan_log(config, 0, "Unified2 file: %s", config->unified2_filepath); | ||
1230 | 522 | sagan_log(config, 0, "Unified2 limit: %dM", config->unified2_limit / 1024 / 1024 ); | ||
1231 | 523 | Unified2InitFile( config ); | ||
1232 | 524 | |||
1233 | 525 | } | ||
1234 | 526 | |||
1235 | 527 | #endif | ||
1236 | 528 | |||
1237 | 529 | |||
1238 | 530 | sagan_log(config, 0, ""); | ||
1239 | 531 | |||
1240 | 532 | sagan_log(config, 0, ""); | ||
1241 | 533 | sagan_log(config, 0, " ,-._,-. -*> Sagan! <*-"); | ||
1242 | 534 | sagan_log(config, 0, " \\/)\"(\\/ Version %s", VERSION); | ||
1243 | 535 | sagan_log(config, 0, " (_o_) Champ Clark III & The Quadrant InfoSec Team [quadrantsec.com]"); | ||
1244 | 536 | sagan_log(config, 0, " / \\/) Copyright (C) 2009-2012 Quadrant Information Security, et al."); | ||
1245 | 537 | sagan_log(config, 0, " (|| ||) Using PCRE version: %s", pcre_version()); | ||
1246 | 538 | sagan_log(config, 0, " oo-oo Sagan is processing events....."); | ||
1247 | 539 | sagan_log(config, 0, ""); | ||
1248 | 540 | |||
1249 | 541 | /* Become a daemon if requested */ | ||
1250 | 542 | |||
1251 | 543 | if ( daemonize ) | ||
1252 | 544 | { | ||
1253 | 545 | sagan_log(config, 0, "Becoming a daemon!"); | ||
1254 | 546 | |||
1255 | 547 | pid_t pid = 0; | ||
1256 | 548 | setsid(); | ||
1257 | 549 | pid = fork(); | ||
1258 | 550 | if (pid == 0) {} else { exit(0); } | ||
1259 | 551 | } | ||
1260 | 552 | |||
1261 | 553 | /* Create the signal handlers thread _after_ the fork() so it can properly | ||
1262 | 554 | * handly signals - Champ Clark III - 06/13/2011 */ | ||
1263 | 555 | |||
1264 | 556 | if ( pthread_create( &sig_thread, NULL, (void *)sig_handler, sigargs )) { | ||
1265 | 557 | removelockfile(config); | ||
1266 | 558 | sagan_log(config, 1, "[%s, line %d] Error creating signal handler thread.", __FILE__, __LINE__); | ||
1267 | 559 | } | ||
1268 | 560 | |||
1269 | 561 | |||
1270 | 562 | /* We don't want the key_handler() if we're in daemon mode! */ | ||
1271 | 563 | |||
1272 | 564 | if (!daemonize) { | ||
1273 | 565 | |||
1274 | 566 | if (pthread_create( &key_thread, NULL, (void *)key_handler, config )) { ; | ||
1275 | 567 | removelockfile(config); | ||
1276 | 568 | sagan_log(config, 1, "[%s, line %d] Error creating key_handler thread.", __FILE__, __LINE__); | ||
1277 | 569 | } | ||
1278 | 570 | |||
1279 | 571 | } | ||
1280 | 572 | |||
1281 | 573 | /* We do this after forking so init scripts can complete */ | ||
1282 | 574 | |||
1283 | 575 | /* Check lock file _after_ thread. If you don't it'll retreive the wrong pid | ||
1284 | 576 | * and incorrectly believe there is a stale lock file if --daemon */ | ||
1285 | 577 | |||
1286 | 578 | checklockfile(config); | ||
1287 | 579 | |||
1288 | 580 | sagan_log(config, 0, "Attempting to open syslog FIFO (%s).", config->sagan_fifo); | ||
1289 | 581 | |||
1290 | 582 | if ( fd == 0 ) fd = open(config->sagan_fifo, O_RDONLY); | ||
1291 | 583 | |||
1292 | 584 | sagan_log(config, 0, "Successfully opened FIFO (%s).", config->sagan_fifo); | ||
1293 | 585 | |||
1294 | 586 | while(1) { | ||
1295 | 587 | |||
1296 | 588 | if(fd < 0) { | ||
1297 | 589 | removelockfile(config); | ||
1298 | 590 | sagan_log(config, 1, "[%s, line %d] Error opening in FIFO! %s (Errno: %d)", __FILE__, __LINE__, config->sagan_fifo, errno); | ||
1299 | 591 | } | ||
1300 | 592 | |||
1301 | 593 | i = read(fd, &c, 1); | ||
1302 | 594 | |||
1303 | 595 | if(i < 0) { | ||
1304 | 596 | removelockfile(config); | ||
1305 | 597 | sagan_log(config, 1, "[%s, line %d] Error reading FIFO! %s (Errno: %d)", __FILE__, __LINE__, config->sagan_fifo, errno); | ||
1306 | 598 | } | ||
1307 | 599 | |||
1308 | 600 | /* Error on reading (FIFO writer left) and we have no | ||
1309 | 601 | * previous error state. */ | ||
1310 | 602 | |||
1311 | 603 | if (i == 0 && fifoerr == 0 ) { | ||
1312 | 604 | sagan_log(config, 0, "FIFO closed (writer exited). Will start processing when writer resumes."); | ||
1313 | 605 | fifoerr=1; | ||
1314 | 606 | } | ||
1315 | 607 | |||
1316 | 608 | /* If previous state was error, now we see data, | ||
1317 | 609 | * then the write is back online. */ | ||
1318 | 610 | |||
1319 | 611 | if ( fifoerr == 1 && i == 1 ) { | ||
1320 | 612 | sagan_log(config, 0,"FIFO writer detected, resuming..."); | ||
1321 | 613 | fifoerr=0; /* Rest error state */ | ||
1322 | 614 | } | ||
1323 | 615 | |||
1324 | 616 | /* FIFO will return null and eat CPU. We sleep to avoid | ||
1325 | 617 | * this until the FIFO writer comes back online */ | ||
1326 | 618 | |||
1327 | 619 | if ( fifoerr == 1 ) sleep(1); | ||
1328 | 620 | |||
1329 | 621 | snprintf(syslogtmp, sizeof(syslogtmp), "%c", c); | ||
1330 | 622 | strncat(syslogstring, syslogtmp, 1); | ||
1331 | 623 | |||
1332 | 624 | if ( c == '\n' || c == '\r' ) | ||
1333 | 625 | { | ||
1334 | 626 | |||
1335 | 627 | counters->sagantotal++; | ||
1336 | 628 | syslog_host = strtok_r(syslogstring, "|", &tok); | ||
1337 | 629 | |||
1338 | 630 | /* If we're using DNS (and we shouldn't be!), we start DNS checks and lookups | ||
1339 | 631 | * here. We cache both good and bad lookups to not over load our DNS server(s). | ||
1340 | 632 | * The only way DNS cache can be cleared is to restart Sagan */ | ||
1341 | 633 | |||
1342 | 634 | if (config->syslog_src_lookup ) { | ||
1343 | 635 | if ( inet_pton(AF_INET, syslog_host, &(sa.sin_addr)) == 0 ) { /* Is inbound a valid IP? */ | ||
1344 | 636 | dns_flag=0; | ||
1345 | 637 | |||
1346 | 638 | for(i=0; i <= counters->dns_cache_count ; i++) { /* Check cache first */ | ||
1347 | 639 | if (!strcmp( dnscache[i].hostname, syslog_host)) { | ||
1348 | 640 | syslog_host = dnscache[i].src_ip; | ||
1349 | 641 | dns_flag=1; | ||
1350 | 642 | } | ||
1351 | 643 | } | ||
1352 | 644 | |||
1353 | 645 | /* If entry was not found in cache, look it up */ | ||
1354 | 646 | |||
1355 | 647 | if ( dns_flag == 0 ) { | ||
1356 | 648 | |||
1357 | 649 | /* Do a DNS lookup */ | ||
1358 | 650 | snprintf(src_dns_lookup, sizeof(src_dns_lookup), "%s", dns_lookup(config, syslog_host)); | ||
1359 | 651 | |||
1360 | 652 | /* Invalid lookups get the config->sagan_host value */ | ||
1361 | 653 | |||
1362 | 654 | if (!strcmp(src_dns_lookup, "0" )) { | ||
1363 | 655 | snprintf(src_dns_lookup, sizeof(src_dns_lookup), "%s", config->sagan_host); | ||
1364 | 656 | counters->dns_miss_count++; | ||
1365 | 657 | } | ||
1366 | 658 | |||
1367 | 659 | |||
1368 | 660 | /* Add entry to DNS Cache */ | ||
1369 | 661 | |||
1370 | 662 | dnscache = (_SaganDNSCache *) realloc(dnscache, (counters->dns_cache_count+1) * sizeof(_SaganDNSCache)); | ||
1371 | 663 | snprintf(dnscache[counters->dns_cache_count].hostname, sizeof(dnscache[counters->dns_cache_count].hostname), "%s", syslog_host); | ||
1372 | 664 | snprintf(dnscache[counters->dns_cache_count].src_ip, sizeof(dnscache[counters->dns_cache_count].src_ip), "%s", src_dns_lookup); | ||
1373 | 665 | counters->dns_cache_count++; | ||
1374 | 666 | syslog_host = src_dns_lookup; | ||
1375 | 667 | |||
1376 | 668 | } | ||
1377 | 669 | } | ||
1378 | 670 | |||
1379 | 671 | } else { | ||
1380 | 672 | |||
1381 | 673 | /* We check to see if values from our FIFO are valid. If we aren't doing DNS related | ||
1382 | 674 | * stuff (above), we start basic check with the syslog_host */ | ||
1383 | 675 | |||
1384 | 676 | if (syslog_host == NULL || inet_pton(AF_INET, syslog_host, &(sa.sin_addr)) == 0 ) { | ||
1385 | 677 | syslog_host = config->sagan_host; | ||
1386 | 678 | if ( !fifoerr ) sagan_log(config, 0, "Sagan received a malformed 'host' (replaced with %s)", config->sagan_host); | ||
1387 | 679 | } | ||
1388 | 680 | } | ||
1389 | 681 | |||
1390 | 682 | /* We know check the rest of the values */ | ||
1391 | 683 | |||
1392 | 684 | syslog_facility=strtok_r(NULL, "|", &tok); | ||
1393 | 685 | if ( syslog_facility == NULL ) { | ||
1394 | 686 | syslog_facility = "SAGAN: FACILITY ERROR"; | ||
1395 | 687 | if ( !fifoerr ) sagan_log(config, 0, "Sagan received a malformed 'facility'"); | ||
1396 | 688 | } | ||
1397 | 689 | |||
1398 | 690 | syslog_priority=strtok_r(NULL, "|", &tok); | ||
1399 | 691 | if ( syslog_priority == NULL ) { | ||
1400 | 692 | syslog_priority = "SAGAN: PRIORITY ERROR"; | ||
1401 | 693 | if ( !fifoerr ) sagan_log(config, 0, "Sagan received a malformed 'priority'"); | ||
1402 | 694 | } | ||
1403 | 695 | |||
1404 | 696 | syslog_level=strtok_r(NULL, "|", &tok); | ||
1405 | 697 | if ( syslog_level == NULL ) { | ||
1406 | 698 | syslog_level = "SAGAN: LEVEL ERROR"; | ||
1407 | 699 | if ( !fifoerr ) sagan_log(config, 0, "Sagan received a malformed 'priority'"); | ||
1408 | 700 | } | ||
1409 | 701 | |||
1410 | 702 | syslog_tag=strtok_r(NULL, "|", &tok); | ||
1411 | 703 | if ( syslog_tag == NULL ) { | ||
1412 | 704 | syslog_tag = "SAGAN: TAG ERROR"; | ||
1413 | 705 | if ( !fifoerr ) sagan_log(config, 0, "Sagan received a malformed 'tag'"); | ||
1414 | 706 | } | ||
1415 | 707 | |||
1416 | 708 | syslog_date=strtok_r(NULL, "|", &tok); | ||
1417 | 709 | if ( syslog_date == NULL ) { | ||
1418 | 710 | syslog_date = "SAGAN: DATE ERROR"; | ||
1419 | 711 | if ( !fifoerr ) sagan_log(config, 0, "Sagan received a malformed 'date'"); | ||
1420 | 712 | } | ||
1421 | 713 | |||
1422 | 714 | syslog_time=strtok_r(NULL, "|", &tok); | ||
1423 | 715 | if ( syslog_time == NULL ) { | ||
1424 | 716 | syslog_time = "SAGAN: TIME ERROR"; | ||
1425 | 717 | if ( !fifoerr ) sagan_log(config, 0, "Sagan received a malformed 'time'"); | ||
1426 | 718 | } | ||
1427 | 719 | |||
1428 | 720 | syslog_program=strtok_r(NULL, "|", &tok); | ||
1429 | 721 | if ( syslog_program == NULL ) { | ||
1430 | 722 | syslog_program = "SAGAN: PROGRAM ERROR"; | ||
1431 | 723 | if ( !fifoerr ) sagan_log(config, 0, "Sagan received a malformed 'program'"); | ||
1432 | 724 | } else { | ||
1433 | 725 | syslog_msg=syslog_program + strlen(syslog_program) + 1; | ||
1434 | 726 | } | ||
1435 | 727 | |||
1436 | 728 | if ( syslog_msg == NULL ) { | ||
1437 | 729 | syslog_msg = "SAGAN: MESSAGE ERROR"; | ||
1438 | 730 | if ( !fifoerr ) sagan_log(config, 0, "Sagan received a malformed 'message'\n"); | ||
1439 | 731 | |||
1440 | 732 | /* If the message is lost, all is lost. Typically, you don't lose part of the message, | ||
1441 | 733 | * it's more likely to lose all - Champ Clark III 11/17/2011 */ | ||
1442 | 734 | |||
1443 | 735 | counters->sagan_log_drop++; | ||
1444 | 736 | |||
1445 | 737 | } | ||
1446 | 738 | |||
1447 | 739 | |||
1448 | 740 | /* Strip any \n or \r from the syslog_msg */ | ||
1449 | 741 | |||
1450 | 742 | if ( strcspn ( syslog_msg, "\n" ) < strlen(syslog_msg) ) | ||
1451 | 743 | syslog_msg[strcspn ( syslog_msg, "\n" )] = '\0'; | ||
1452 | 744 | |||
1453 | 745 | |||
1454 | 746 | if (debug->debugsyslog) sagan_log(config, 0, "%s|%s|%s|%s|%s|%s|%s|%s|%s", syslog_host, syslog_facility, syslog_priority, syslog_level, syslog_tag, syslog_date, syslog_time, syslog_program, syslog_msg); | ||
1455 | 747 | |||
1456 | 748 | |||
1457 | 749 | /* Search for matches */ | ||
1458 | 750 | |||
1459 | 751 | /* First we search for 'program' and such. This way, we don't waste CPU | ||
1460 | 752 | * time with pcre/content. */ | ||
1461 | 753 | |||
1462 | 754 | for(b=0; b < counters->rulecount; b++) { | ||
1463 | 755 | |||
1464 | 756 | match = 0; program=""; facility=""; syspri=""; level=""; tag=""; content=""; | ||
1465 | 757 | |||
1466 | 758 | if ( strcmp(rulestruct[b].s_program, "" )) { | ||
1467 | 759 | snprintf(tmpbuf, sizeof(tmpbuf), "%s", rulestruct[b].s_program); | ||
1468 | 760 | ptmp = strtok_r(tmpbuf, "|", &tok2); | ||
1469 | 761 | match=1; | ||
1470 | 762 | while ( ptmp != NULL ) { | ||
1471 | 763 | if (!strcmp(ptmp, syslog_program)) match=0; | ||
1472 | 764 | ptmp = strtok_r(NULL, "|", &tok2); | ||
1473 | 765 | } | ||
1474 | 766 | } | ||
1475 | 767 | |||
1476 | 768 | if ( strcmp(rulestruct[b].s_facility, "" )) { | ||
1477 | 769 | snprintf(tmpbuf, sizeof(tmpbuf), "%s", rulestruct[b].s_facility); | ||
1478 | 770 | ptmp = strtok_r(tmpbuf, "|", &tok2); | ||
1479 | 771 | match=1; | ||
1480 | 772 | while ( ptmp != NULL ) { | ||
1481 | 773 | if (!strcmp(ptmp, syslog_facility)) match=0; | ||
1482 | 774 | ptmp = strtok_r(NULL, "|", &tok2); | ||
1483 | 775 | } | ||
1484 | 776 | } | ||
1485 | 777 | |||
1486 | 778 | if ( strcmp(rulestruct[b].s_syspri, "" )) { | ||
1487 | 779 | snprintf(tmpbuf, sizeof(tmpbuf), "%s", rulestruct[b].s_syspri); | ||
1488 | 780 | ptmp = strtok_r(tmpbuf, "|", &tok2); | ||
1489 | 781 | match=1; | ||
1490 | 782 | while ( ptmp != NULL ) { | ||
1491 | 783 | if (!strcmp(ptmp, syslog_priority)) match=0; | ||
1492 | 784 | ptmp = strtok_r(NULL, "|", &tok2); | ||
1493 | 785 | } | ||
1494 | 786 | } | ||
1495 | 787 | |||
1496 | 788 | if ( strcmp(rulestruct[b].s_level, "" )) { | ||
1497 | 789 | snprintf(tmpbuf, sizeof(tmpbuf), "%s", rulestruct[b].s_level); | ||
1498 | 790 | ptmp = strtok_r(tmpbuf, "|", &tok2); | ||
1499 | 791 | match=1; | ||
1500 | 792 | while ( ptmp != NULL ) { | ||
1501 | 793 | if (!strcmp(ptmp, syslog_level)) match=0; | ||
1502 | 794 | ptmp = strtok_r(NULL, "|", &tok2); | ||
1503 | 795 | } | ||
1504 | 796 | } | ||
1505 | 797 | |||
1506 | 798 | if ( strcmp(rulestruct[b].s_tag, "" )) { | ||
1507 | 799 | snprintf(tmpbuf, sizeof(tmpbuf), "%s", rulestruct[b].s_tag); | ||
1508 | 800 | ptmp = strtok_r(tmpbuf, "|", &tok2); | ||
1509 | 801 | match=1; | ||
1510 | 802 | while ( ptmp != NULL ) { | ||
1511 | 803 | if (!strcmp(ptmp, syslog_tag)) match=0; | ||
1512 | 804 | ptmp = strtok_r(NULL, "|", &tok2); | ||
1513 | 805 | } | ||
1514 | 806 | } | ||
1515 | 807 | |||
1516 | 808 | /* If there has been a match above, or NULL on all, then we continue with | ||
1517 | 809 | * PCRE/content search */ | ||
1518 | 810 | |||
1519 | 811 | /* Search via strstr (content:) */ | ||
1520 | 812 | |||
1521 | 813 | if ( match == 0 ) { | ||
1522 | 814 | |||
1523 | 815 | if ( rulestruct[b].content_count != 0 ) { | ||
1524 | 816 | |||
1525 | 817 | for(z=0; z<rulestruct[b].content_count; z++) { | ||
1526 | 818 | |||
1527 | 819 | /* If case insensitive */ | ||
1528 | 820 | if ( rulestruct[b].s_nocase == 1 ) { | ||
1529 | 821 | snprintf(syslog_msg_origtmp, sizeof(syslog_msg_origtmp), "%s", syslog_msg); | ||
1530 | 822 | syslog_msg_case=syslog_msg_origtmp; | ||
1531 | 823 | s_content_case=rulestruct[b].s_content[z]; | ||
1532 | 824 | toupperc(syslog_msg_case); | ||
1533 | 825 | toupperc(s_content_case); | ||
1534 | 826 | if (strstr(syslog_msg_case, s_content_case )) pcrematch++; | ||
1535 | 827 | } else { | ||
1536 | 828 | |||
1537 | 829 | /* If case sensitive */ | ||
1538 | 830 | if (strstr(syslog_msg, rulestruct[b].s_content[z] )) pcrematch++; | ||
1539 | 831 | } | ||
1540 | 832 | } | ||
1541 | 833 | } | ||
1542 | 834 | |||
1543 | 835 | |||
1544 | 836 | /* Search via PCRE */ | ||
1545 | 837 | |||
1546 | 838 | if ( rulestruct[b].pcre_count != 0 ) { | ||
1547 | 839 | |||
1548 | 840 | for(z=0; z<rulestruct[b].pcre_count; z++) { | ||
1549 | 841 | |||
1550 | 842 | rc = pcre_exec( rulestruct[b].re_pcre[z], rulestruct[b].pcre_extra[z], syslog_msg, (int)strlen(syslog_msg), 0, 0, ovector, OVECCOUNT); | ||
1551 | 843 | |||
1552 | 844 | } /* End of pcre if */ | ||
1553 | 845 | |||
1554 | 846 | if ( rc == 1 ) { | ||
1555 | 847 | pcrematch++; | ||
1556 | 848 | } | ||
1557 | 849 | } | ||
1558 | 850 | |||
1559 | 851 | } /* End of content: & pcre */ | ||
1560 | 852 | |||
1561 | 853 | /* if you got match */ | ||
1562 | 854 | |||
1563 | 855 | if ( pcrematch == rulestruct[b].pcre_count + rulestruct[b].content_count ) | ||
1564 | 856 | { | ||
1565 | 857 | |||
1566 | 858 | if ( match == 0 ) { | ||
1567 | 859 | |||
1568 | 860 | counters->saganfound++; | ||
1569 | 861 | |||
1570 | 862 | ip_src=NULL; | ||
1571 | 863 | ip_dst=NULL; | ||
1572 | 864 | dst_port=0; | ||
1573 | 865 | src_port=0; | ||
1574 | 866 | |||
1575 | 867 | username=NULL; | ||
1576 | 868 | uid=NULL; | ||
1577 | 869 | |||
1578 | 870 | #ifdef HAVE_LIBLOGNORM | ||
1579 | 871 | if ( rulestruct[b].normalize == 1 && counters->liblognormtoload_count != 0 ) | ||
1580 | 872 | { | ||
1581 | 873 | str = es_newStrFromCStr(syslog_msg, strlen(syslog_msg )); | ||
1582 | 874 | ln_normalize(ctx, str, &lnevent); | ||
1583 | 875 | if(lnevent != NULL) { | ||
1584 | 876 | es_emptyStr(str); | ||
1585 | 877 | ee_fmtEventToRFC5424(lnevent, &str); | ||
1586 | 878 | cstr = es_str2cstr(str, NULL); | ||
1587 | 879 | |||
1588 | 880 | if ( debug->debugnormalize ) sagan_log(config, 0, "Normalize output: %s", cstr); | ||
1589 | 881 | |||
1590 | 882 | propName = es_newStrFromBuf("src-ip", 6); | ||
1591 | 883 | if((field = ee_getEventField(lnevent, propName)) != NULL) { | ||
1592 | 884 | str = ee_getFieldValueAsStr(field, 0); | ||
1593 | 885 | ip_src = es_str2cstr(str, NULL); | ||
1594 | 886 | } | ||
1595 | 887 | |||
1596 | 888 | propName = es_newStrFromBuf("dst-ip", 6); | ||
1597 | 889 | if((field = ee_getEventField(lnevent, propName)) != NULL) { | ||
1598 | 890 | str = ee_getFieldValueAsStr(field, 0); | ||
1599 | 891 | ip_dst = es_str2cstr(str, NULL); | ||
1600 | 892 | } | ||
1601 | 893 | |||
1602 | 894 | propName = es_newStrFromBuf("src-port", 8); | ||
1603 | 895 | if((field = ee_getEventField(lnevent, propName)) != NULL) { | ||
1604 | 896 | str = ee_getFieldValueAsStr(field, 0); | ||
1605 | 897 | cstr = es_str2cstr(str, NULL); | ||
1606 | 898 | src_port = atoi(cstr); | ||
1607 | 899 | } | ||
1608 | 900 | |||
1609 | 901 | propName = es_newStrFromBuf("dst-port", 8); | ||
1610 | 902 | if((field = ee_getEventField(lnevent, propName)) != NULL) { | ||
1611 | 903 | str = ee_getFieldValueAsStr(field, 0); | ||
1612 | 904 | cstr = es_str2cstr(str, NULL); | ||
1613 | 905 | dst_port = atoi(cstr); | ||
1614 | 906 | } | ||
1615 | 907 | |||
1616 | 908 | propName = es_newStrFromBuf("username", 8); | ||
1617 | 909 | if((field = ee_getEventField(lnevent, propName)) != NULL) { | ||
1618 | 910 | str = ee_getFieldValueAsStr(field, 0); | ||
1619 | 911 | username = es_str2cstr(str, NULL); | ||
1620 | 912 | } | ||
1621 | 913 | |||
1622 | 914 | propName = es_newStrFromBuf("uid", 3); | ||
1623 | 915 | if((field = ee_getEventField(lnevent, propName)) != NULL) { | ||
1624 | 916 | str = ee_getFieldValueAsStr(field, 0); | ||
1625 | 917 | uid = es_str2cstr(str, NULL); | ||
1626 | 918 | } | ||
1627 | 919 | |||
1628 | 920 | propName = es_newStrFromBuf("src-host", 8); | ||
1629 | 921 | if((field = ee_getEventField(lnevent, propName)) != NULL) { | ||
1630 | 922 | str = ee_getFieldValueAsStr(field, 0); | ||
1631 | 923 | snprintf(ipbuf_src, sizeof(ipbuf_src), "%s", dns_lookup(config, es_str2cstr(str, NULL))); | ||
1632 | 924 | ip_src=ipbuf_src; | ||
1633 | 925 | } | ||
1634 | 926 | |||
1635 | 927 | propName = es_newStrFromBuf("dst-host", 8); | ||
1636 | 928 | if((field = ee_getEventField(lnevent, propName)) != NULL) { | ||
1637 | 929 | str = ee_getFieldValueAsStr(field, 0); | ||
1638 | 930 | snprintf(ipbuf_dst, sizeof(ipbuf_dst), "%s", dns_lookup(config, es_str2cstr(str, NULL))); | ||
1639 | 931 | ip_dst=ipbuf_dst; | ||
1640 | 932 | |||
1641 | 933 | } | ||
1642 | 934 | |||
1643 | 935 | free(cstr); | ||
1644 | 936 | ee_deleteEvent(lnevent); | ||
1645 | 937 | lnevent = NULL; | ||
1646 | 938 | } | ||
1647 | 939 | |||
1648 | 940 | } | ||
1649 | 941 | #endif | ||
1650 | 942 | |||
1651 | 943 | /* Normalization always over rides parse_ip/parse_port */ | ||
1652 | 944 | |||
1653 | 945 | if ( rulestruct[b].normalize == 0 ) { | ||
1654 | 946 | |||
1655 | 947 | /* parse_ip && parse_port - Simple means of parsing */ | ||
1656 | 948 | |||
1657 | 949 | if ( rulestruct[b].s_find_ip == 1 ) { | ||
1658 | 950 | |||
1659 | 951 | snprintf(fip, sizeof(fip), "%s", parse_ip_simple(syslog_msg)); | ||
1660 | 952 | |||
1661 | 953 | if (strcmp(fip,"0")) { | ||
1662 | 954 | ip_src = fip; ip_dst = syslog_host; | ||
1663 | 955 | } else { | ||
1664 | 956 | ip_src = syslog_host; ip_dst = config->sagan_host; | ||
1665 | 957 | } | ||
1666 | 958 | } else { | ||
1667 | 959 | ip_src = syslog_host; ip_dst = config->sagan_host; | ||
1668 | 960 | } | ||
1669 | 961 | |||
1670 | 962 | if ( rulestruct[b].s_find_port == 1 ) { | ||
1671 | 963 | src_port = parse_port_simple(config, syslog_msg); | ||
1672 | 964 | } else { | ||
1673 | 965 | src_port = config->sagan_port; | ||
1674 | 966 | } | ||
1675 | 967 | } | ||
1676 | 968 | |||
1677 | 969 | if ( ip_src == NULL ) ip_src=syslog_host; | ||
1678 | 970 | if ( ip_dst == NULL ) ip_dst=syslog_host; | ||
1679 | 971 | |||
1680 | 972 | if ( src_port == 0 ) src_port=config->sagan_port; | ||
1681 | 973 | if ( dst_port == 0 ) dst_port=rulestruct[b].dst_port; | ||
1682 | 974 | |||
1683 | 975 | snprintf(s_msg, sizeof(s_msg), "%s", rulestruct[b].s_msg); | ||
1684 | 976 | |||
1685 | 977 | if (username != NULL ) { | ||
1686 | 978 | snprintf(tmpbuf, sizeof(tmpbuf), " [%s]", username); | ||
1687 | 979 | strlcat(s_msg, tmpbuf, sizeof(s_msg)); | ||
1688 | 980 | } | ||
1689 | 981 | |||
1690 | 982 | if (uid != NULL ) { | ||
1691 | 983 | snprintf(tmpbuf, sizeof(tmpbuf), " [uid: %s]", uid); | ||
1692 | 984 | strlcat(s_msg, tmpbuf, sizeof(s_msg)); | ||
1693 | 985 | } | ||
1694 | 986 | |||
1695 | 987 | /* We don't want 127.0.0.1, so remap it to something more useful */ | ||
1696 | 988 | |||
1697 | 989 | if (!strcmp(ip_src, "127.0.0.1" )) ip_src=config->sagan_host; | ||
1698 | 990 | if (!strcmp(ip_dst, "127.0.0.1" )) ip_dst=config->sagan_host; | ||
1699 | 991 | |||
1700 | 992 | /*********************************************************/ | ||
1701 | 993 | /* After - Similar to thresholding, but the opposite */ | ||
1702 | 994 | /* direction - ie - alert _after_ X number of events */ | ||
1703 | 995 | /*********************************************************/ | ||
1704 | 996 | |||
1705 | 997 | if ( rulestruct[b].after_src_or_dst != 0 ) { | ||
1706 | 998 | |||
1707 | 999 | after_log_flag=1; | ||
1708 | 1000 | |||
1709 | 1001 | t = time(NULL); | ||
1710 | 1002 | now=localtime(&t); | ||
1711 | 1003 | strftime(timet, sizeof(timet), "%s", now); | ||
1712 | 1004 | |||
1713 | 1005 | /* After by source IP address */ | ||
1714 | 1006 | |||
1715 | 1007 | if ( rulestruct[b].after_src_or_dst == 1 ) { | ||
1716 | 1008 | after_flag = 0; | ||
1717 | 1009 | |||
1718 | 1010 | for (i = 0; i < after_count_by_src; i++ ) { | ||
1719 | 1011 | if (!strcmp( afterbysrc[i].ipsrc, ip_src ) && !strcmp(afterbysrc[i].sid, rulestruct[b].s_sid )) { | ||
1720 | 1012 | after_flag=1; | ||
1721 | 1013 | afterbysrc[i].count++; | ||
1722 | 1014 | after_oldtime_src = atol(timet) - afterbysrc[i].utime; | ||
1723 | 1015 | afterbysrc[i].utime = atol(timet); | ||
1724 | 1016 | if ( after_oldtime_src > rulestruct[b].after_seconds ) { | ||
1725 | 1017 | afterbysrc[i].count=1; | ||
1726 | 1018 | afterbysrc[i].utime = atol(timet); | ||
1727 | 1019 | after_log_flag=1; | ||
1728 | 1020 | } | ||
1729 | 1021 | |||
1730 | 1022 | if ( rulestruct[b].after_count < afterbysrc[i].count ) | ||
1731 | 1023 | { | ||
1732 | 1024 | after_log_flag = 0; | ||
1733 | 1025 | sagan_log(config, 0, "After SID %s by source IP address. [%s]", afterbysrc[i].sid, ip_src); | ||
1734 | 1026 | counters->after_total++; | ||
1735 | 1027 | } | ||
1736 | 1028 | |||
1737 | 1029 | } | ||
1738 | 1030 | } | ||
1739 | 1031 | } | ||
1740 | 1032 | |||
1741 | 1033 | |||
1742 | 1034 | /* If not found, add it to the array */ | ||
1743 | 1035 | |||
1744 | 1036 | if ( after_flag == 0 ) { | ||
1745 | 1037 | afterbysrc = (after_by_src *) realloc(afterbysrc, (after_count_by_src+1) * sizeof(after_by_src)); | ||
1746 | 1038 | snprintf(afterbysrc[after_count_by_src].ipsrc, sizeof(afterbysrc[after_count_by_src].ipsrc), "%s", ip_src); | ||
1747 | 1039 | snprintf(afterbysrc[after_count_by_src].sid, sizeof(afterbysrc[after_count_by_src].sid), "%s", rulestruct[b].s_sid ); | ||
1748 | 1040 | afterbysrc[after_count_by_src].count = 1; | ||
1749 | 1041 | afterbysrc[after_count_by_src].utime = atol(timet); | ||
1750 | 1042 | after_count_by_src++; | ||
1751 | 1043 | } | ||
1752 | 1044 | |||
1753 | 1045 | /* After by destination IP address */ | ||
1754 | 1046 | |||
1755 | 1047 | if ( rulestruct[b].after_src_or_dst == 2 ) { | ||
1756 | 1048 | |||
1757 | 1049 | after_flag = 0; | ||
1758 | 1050 | |||
1759 | 1051 | /* Check array for matching src / sid */ | ||
1760 | 1052 | |||
1761 | 1053 | for (i = 0; i < after_count_by_dst; i++ ) { | ||
1762 | 1054 | if (!strcmp( afterbydst[i].ipdst, ip_dst ) && !strcmp(afterbydst[i].sid, rulestruct[b].s_sid )) { | ||
1763 | 1055 | after_flag=1; | ||
1764 | 1056 | afterbydst[i].count++; | ||
1765 | 1057 | after_oldtime_src = atol(timet) - afterbydst[i].utime; | ||
1766 | 1058 | afterbydst[i].utime = atol(timet); | ||
1767 | 1059 | if ( after_oldtime_src > rulestruct[b].after_seconds ) { | ||
1768 | 1060 | afterbydst[i].count=1; | ||
1769 | 1061 | afterbydst[i].utime = atol(timet); | ||
1770 | 1062 | after_log_flag=1; | ||
1771 | 1063 | } | ||
1772 | 1064 | |||
1773 | 1065 | if ( rulestruct[b].after_count < afterbydst[i].count ) { | ||
1774 | 1066 | after_log_flag = 0; | ||
1775 | 1067 | sagan_log(config, 0, "After SID %s by destination IP address. [%s]", afterbysrc[i].sid, ip_dst); | ||
1776 | 1068 | counters->after_total++; | ||
1777 | 1069 | } | ||
1778 | 1070 | } | ||
1779 | 1071 | } | ||
1780 | 1072 | |||
1781 | 1073 | /* If not found, add it to the array */ | ||
1782 | 1074 | |||
1783 | 1075 | if ( after_flag == 0 ) { | ||
1784 | 1076 | afterbydst = (after_by_dst *) realloc(afterbydst, (after_count_by_dst+1) * sizeof(after_by_dst)); | ||
1785 | 1077 | snprintf(afterbydst[after_count_by_dst].ipdst, sizeof(afterbydst[after_count_by_dst].ipdst), "%s", ip_dst); | ||
1786 | 1078 | snprintf(afterbydst[after_count_by_dst].sid, sizeof(afterbydst[after_count_by_dst].sid), "%s", rulestruct[b].s_sid ); | ||
1787 | 1079 | afterbydst[after_count_by_dst].count = 1; | ||
1788 | 1080 | afterbydst[after_count_by_dst].utime = atol(timet); | ||
1789 | 1081 | after_count_by_dst++; | ||
1790 | 1082 | } | ||
1791 | 1083 | } | ||
1792 | 1084 | |||
1793 | 1085 | } /* End of After */ | ||
1794 | 1086 | |||
1795 | 1087 | |||
1796 | 1088 | thresh_log_flag = 0; | ||
1797 | 1089 | |||
1798 | 1090 | /*********************************************************/ | ||
1799 | 1091 | /* Thresh holding */ | ||
1800 | 1092 | /*********************************************************/ | ||
1801 | 1093 | |||
1802 | 1094 | if ( rulestruct[b].threshold_type != 0 && after_log_flag == 0) { | ||
1803 | 1095 | |||
1804 | 1096 | t = time(NULL); | ||
1805 | 1097 | now=localtime(&t); | ||
1806 | 1098 | strftime(timet, sizeof(timet), "%s", now); | ||
1807 | 1099 | |||
1808 | 1100 | /* Thresholding by source IP address */ | ||
1809 | 1101 | |||
1810 | 1102 | if ( rulestruct[b].threshold_src_or_dst == 1 ) { | ||
1811 | 1103 | thresh_flag = 0; | ||
1812 | 1104 | |||
1813 | 1105 | /* Check array for matching src / sid */ | ||
1814 | 1106 | |||
1815 | 1107 | for (i = 0; i < thresh_count_by_src; i++ ) { | ||
1816 | 1108 | if (!strcmp( threshbysrc[i].ipsrc, ip_src ) && !strcmp(threshbysrc[i].sid, rulestruct[b].s_sid )) { | ||
1817 | 1109 | thresh_flag=1; | ||
1818 | 1110 | threshbysrc[i].count++; | ||
1819 | 1111 | thresh_oldtime_src = atol(timet) - threshbysrc[i].utime; | ||
1820 | 1112 | threshbysrc[i].utime = atol(timet); | ||
1821 | 1113 | if ( thresh_oldtime_src > rulestruct[b].threshold_seconds ) { | ||
1822 | 1114 | threshbysrc[i].count=1; | ||
1823 | 1115 | threshbysrc[i].utime = atol(timet); | ||
1824 | 1116 | thresh_log_flag=0; | ||
1825 | 1117 | } | ||
1826 | 1118 | |||
1827 | 1119 | if ( rulestruct[b].threshold_count < threshbysrc[i].count ) | ||
1828 | 1120 | { | ||
1829 | 1121 | thresh_log_flag = 1; | ||
1830 | 1122 | sagan_log(config, 0, "Threshold SID %s by source IP address. [%s]", threshbysrc[i].sid, ip_src); | ||
1831 | 1123 | counters->threshold_total++; | ||
1832 | 1124 | } | ||
1833 | 1125 | |||
1834 | 1126 | } | ||
1835 | 1127 | } | ||
1836 | 1128 | |||
1837 | 1129 | /* If not found, add it to the array */ | ||
1838 | 1130 | |||
1839 | 1131 | if ( thresh_flag == 0 ) { | ||
1840 | 1132 | threshbysrc = (thresh_by_src *) realloc(threshbysrc, (thresh_count_by_src+1) * sizeof(thresh_by_src)); | ||
1841 | 1133 | snprintf(threshbysrc[thresh_count_by_src].ipsrc, sizeof(threshbysrc[thresh_count_by_src].ipsrc), "%s", ip_src); | ||
1842 | 1134 | snprintf(threshbysrc[thresh_count_by_src].sid, sizeof(threshbysrc[thresh_count_by_src].sid), "%s", rulestruct[b].s_sid ); | ||
1843 | 1135 | threshbysrc[thresh_count_by_src].count = 1; | ||
1844 | 1136 | threshbysrc[thresh_count_by_src].utime = atol(timet); | ||
1845 | 1137 | thresh_count_by_src++; | ||
1846 | 1138 | } | ||
1847 | 1139 | } | ||
1848 | 1140 | |||
1849 | 1141 | /* Thresholding by destination IP address */ | ||
1850 | 1142 | |||
1851 | 1143 | if ( rulestruct[b].threshold_src_or_dst == 2 ) { | ||
1852 | 1144 | thresh_flag = 0; | ||
1853 | 1145 | |||
1854 | 1146 | /* Check array for matching src / sid */ | ||
1855 | 1147 | |||
1856 | 1148 | for (i = 0; i < thresh_count_by_dst; i++ ) { | ||
1857 | 1149 | if (!strcmp( threshbydst[i].ipdst, ip_dst ) && !strcmp(threshbydst[i].sid, rulestruct[b].s_sid )) { | ||
1858 | 1150 | thresh_flag=1; | ||
1859 | 1151 | threshbydst[i].count++; | ||
1860 | 1152 | thresh_oldtime_src = atol(timet) - threshbydst[i].utime; | ||
1861 | 1153 | threshbydst[i].utime = atol(timet); | ||
1862 | 1154 | if ( thresh_oldtime_src > rulestruct[b].threshold_seconds ) { | ||
1863 | 1155 | threshbydst[i].count=1; | ||
1864 | 1156 | threshbydst[i].utime = atol(timet); | ||
1865 | 1157 | thresh_log_flag=0; | ||
1866 | 1158 | } | ||
1867 | 1159 | |||
1868 | 1160 | if ( rulestruct[b].threshold_count < threshbydst[i].count ) { | ||
1869 | 1161 | thresh_log_flag = 1; | ||
1870 | 1162 | sagan_log(config, 0, "Threshold SID %s by destination IP address. [%s]", threshbysrc[i].sid, ip_dst); | ||
1871 | 1163 | counters->threshold_total++; | ||
1872 | 1164 | } | ||
1873 | 1165 | } | ||
1874 | 1166 | } | ||
1875 | 1167 | |||
1876 | 1168 | /* If not found, add it to the array */ | ||
1877 | 1169 | |||
1878 | 1170 | if ( thresh_flag == 0 ) { | ||
1879 | 1171 | threshbydst = (thresh_by_dst *) realloc(threshbydst, (thresh_count_by_dst+1) * sizeof(thresh_by_dst)); | ||
1880 | 1172 | snprintf(threshbydst[thresh_count_by_dst].ipdst, sizeof(threshbydst[thresh_count_by_dst].ipdst), "%s", ip_dst); | ||
1881 | 1173 | snprintf(threshbydst[thresh_count_by_dst].sid, sizeof(threshbydst[thresh_count_by_dst].sid), "%s", rulestruct[b].s_sid ); | ||
1882 | 1174 | threshbydst[thresh_count_by_dst].count = 1; | ||
1883 | 1175 | threshbydst[thresh_count_by_dst].utime = atol(timet); | ||
1884 | 1176 | thresh_count_by_dst++; | ||
1885 | 1177 | } | ||
1886 | 1178 | } | ||
1887 | 1179 | } /* End of thresholding */ | ||
1888 | 1180 | |||
1889 | 1181 | |||
1890 | 1182 | /****************************************************************************/ | ||
1891 | 1183 | /* Populate the SaganEvent array with the information needed. This info */ | ||
1892 | 1184 | /* will be passed to the threads. No need to populate it _if_ we're in a */ | ||
1893 | 1185 | /* threshold state. */ | ||
1894 | 1186 | /****************************************************************************/ | ||
1895 | 1187 | |||
1896 | 1188 | /* Check for thesholding & "after" */ | ||
1897 | 1189 | |||
1898 | 1190 | if ( thresh_log_flag == 0 && after_log_flag == 0 ) { | ||
1899 | 1191 | |||
1900 | 1192 | threadid++; | ||
1901 | 1193 | if ( threadid >= MAX_THREADS ) threadid=0; | ||
1902 | 1194 | |||
1903 | 1195 | msgslot++; | ||
1904 | 1196 | if ( msgslot >= MAX_MSGSLOT ) msgslot=0; | ||
1905 | 1197 | |||
1906 | 1198 | /* We can't use the pointers from our syslog data. If two (or more) event's | ||
1907 | 1199 | * fire at the same time, the two alerts will have corrupted information | ||
1908 | 1200 | * (due to threading). So we populate the SaganEvent[threadid] with the | ||
1909 | 1201 | * var[msgslot] information. - Champ Clark 02/02/2011 | ||
1910 | 1202 | */ | ||
1911 | 1203 | |||
1912 | 1204 | snprintf(sysmsg[msgslot], sizeof(sysmsg[msgslot]), "%s", syslog_msg); | ||
1913 | 1205 | snprintf(syslog_timetmp[msgslot], sizeof(syslog_timetmp[msgslot]), "%s", syslog_time); | ||
1914 | 1206 | snprintf(syslog_datetmp[msgslot], sizeof(syslog_datetmp[msgslot]), "%s", syslog_date); | ||
1915 | 1207 | snprintf(syslog_leveltmp[msgslot], sizeof(syslog_leveltmp[msgslot]), "%s", syslog_level); | ||
1916 | 1208 | snprintf(syslog_tagtmp[msgslot], sizeof(syslog_tagtmp[msgslot]), "%s", syslog_tag); | ||
1917 | 1209 | snprintf(syslog_facilitytmp[msgslot], sizeof(syslog_facilitytmp[msgslot]), "%s", syslog_facility); | ||
1918 | 1210 | snprintf(syslog_programtmp[msgslot], sizeof(syslog_programtmp[msgslot]), "%s", syslog_program); | ||
1919 | 1211 | snprintf(ip_srctmp[msgslot], sizeof(ip_srctmp[msgslot]), "%s", ip_src); | ||
1920 | 1212 | snprintf(ip_dsttmp[msgslot], sizeof(ip_dsttmp[msgslot]), "%s", ip_dst); | ||
1921 | 1213 | snprintf(syslog_hosttmp[msgslot], sizeof(syslog_hosttmp[msgslot]), "%s", syslog_host); | ||
1922 | 1214 | snprintf(s_msgtmp[msgslot], sizeof(s_msgtmp[msgslot]), "%s", s_msg); | ||
1923 | 1215 | src_porttmp[msgslot] = src_port; | ||
1924 | 1216 | dst_porttmp[msgslot] = dst_port; | ||
1925 | 1217 | |||
1926 | 1218 | SaganEvent[threadid].ip_src = ip_srctmp[msgslot]; | ||
1927 | 1219 | SaganEvent[threadid].ip_dst = ip_dsttmp[msgslot]; | ||
1928 | 1220 | SaganEvent[threadid].dst_port = dst_porttmp[msgslot]; | ||
1929 | 1221 | SaganEvent[threadid].src_port = src_porttmp[msgslot]; | ||
1930 | 1222 | SaganEvent[threadid].found = b; | ||
1931 | 1223 | SaganEvent[threadid].program = syslog_programtmp[msgslot]; | ||
1932 | 1224 | SaganEvent[threadid].message = sysmsg[msgslot]; | ||
1933 | 1225 | SaganEvent[threadid].time = syslog_timetmp[msgslot]; | ||
1934 | 1226 | SaganEvent[threadid].date = syslog_datetmp[msgslot]; | ||
1935 | 1227 | SaganEvent[threadid].f_msg = s_msgtmp[msgslot]; | ||
1936 | 1228 | SaganEvent[threadid].facility = syslog_facilitytmp[msgslot]; | ||
1937 | 1229 | SaganEvent[threadid].priority = syslog_leveltmp[msgslot]; | ||
1938 | 1230 | SaganEvent[threadid].tag = syslog_tagtmp[msgslot]; | ||
1939 | 1231 | SaganEvent[threadid].host = syslog_hosttmp[msgslot]; | ||
1940 | 1232 | SaganEvent[threadid].event_time_sec = time(NULL); | ||
1941 | 1233 | |||
1942 | 1234 | SaganEvent[threadid].debug = debug; | ||
1943 | 1235 | SaganEvent[threadid].config = config; | ||
1944 | 1236 | |||
1945 | 1237 | } | ||
1946 | 1238 | |||
1947 | 1239 | /***************************************************************************/ | ||
1948 | 1240 | /* Output plugins that cannot be threaded and require little I/O (almost */ | ||
1949 | 1241 | /* no I/O blocking) - IE - unified2/ASCII alerts */ | ||
1950 | 1242 | /***************************************************************************/ | ||
1951 | 1243 | |||
1952 | 1244 | /* If thresholding isn't happening, send to output plugins */ | ||
1953 | 1245 | |||
1954 | 1246 | if ( thresh_log_flag == 0 && after_log_flag == 0 ) { | ||
1955 | 1247 | |||
1956 | 1248 | sagan_alert( &SaganEvent[threadid] ); /* | ||
1957 | 1249 | |||
1958 | 1250 | /* Log to unified2 output (if enabled and have libdnet). */ | ||
1959 | 1251 | |||
1960 | 1252 | #ifdef HAVE_LIBDNET | ||
1961 | 1253 | if ( config->sagan_unified2_flag ) { | ||
1962 | 1254 | if ( thresh_log_flag == 0 && after_log_flag == 0 ) Sagan_Unified2( &SaganEvent[threadid] ); | ||
1963 | 1255 | if ( thresh_log_flag == 0 && after_log_flag == 0 ) Sagan_Unified2LogPacketAlert( &SaganEvent[threadid] ); | ||
1964 | 1256 | } | ||
1965 | 1257 | #endif | ||
1966 | 1258 | |||
1967 | 1259 | /****************************************************************************/ | ||
1968 | 1260 | /* Output Plugin Threads - This is for output plugins like SQL/etc that */ | ||
1969 | 1261 | /* might cause some I/O blocking */ | ||
1970 | 1262 | /****************************************************************************/ | ||
1971 | 1263 | |||
1972 | 1264 | if ( config->output_thread_flag ) { | ||
1973 | 1265 | |||
1974 | 1266 | if ( counters->thread_output_counter < config->max_output_threads ) { | ||
1975 | 1267 | |||
1976 | 1268 | counters->thread_output_counter++; | ||
1977 | 1269 | |||
1978 | 1270 | if ( pthread_create ( &output_id[threadid], &thread_output_attr, (void *)sagan_output, &SaganEvent[threadid] ) ) { | ||
1979 | 1271 | removelockfile(config); | ||
1980 | 1272 | sagan_log(config, 1, "[%s, line %d] Error creating output-plugin thread", __FILE__, __LINE__); | ||
1981 | 1273 | } | ||
1982 | 1274 | } else { | ||
1983 | 1275 | counters->sagan_output_drop++; | ||
1984 | 1276 | sagan_log(config, 0, "[%s, line %d] sagan_output(): Out of threads\n", __FILE__, __LINE__); | ||
1985 | 1277 | } | ||
1986 | 1278 | } | ||
1987 | 1279 | |||
1988 | 1280 | |||
1989 | 1281 | /****************************************************************************/ | ||
1990 | 1282 | /* Log Processors that might take valuable CPU time (Geo IP, etc) */ | ||
1991 | 1283 | /* Not sure if this section will remain here or not. We might end up with */ | ||
1992 | 1284 | /* "processors" and "preprocessors" - Champ Clark III 04/04/2012 */ | ||
1993 | 1285 | /****************************************************************************/ | ||
1994 | 1286 | |||
1995 | 1287 | if ( config->processor_thread_flag ) { | ||
1996 | 1288 | |||
1997 | 1289 | if ( counters->thread_processor_counter < config->max_processor_threads ) { | ||
1998 | 1290 | |||
1999 | 1291 | counters->thread_processor_counter++; | ||
2000 | 1292 | |||
2001 | 1293 | if ( pthread_create ( &processor_id[threadid], &thread_processor_attr, (void *)sagan_processor, &SaganEvent[threadid] ) ) { | ||
2002 | 1294 | removelockfile(config); | ||
2003 | 1295 | sagan_log(config, 1, "[%s, line %d] Error creating processor-plugin thread", __FILE__, __LINE__); | ||
2004 | 1296 | } | ||
2005 | 1297 | } else { | ||
2006 | 1298 | counters->sagan_processor_drop++; | ||
2007 | 1299 | sagan_log(config, 0, "[%s, line %d] sagan_processor(): Out of threads\n", __FILE__, __LINE__); | ||
2008 | 1300 | } | ||
2009 | 1301 | } | ||
2010 | 1302 | |||
2011 | 1303 | |||
2012 | 1304 | |||
2013 | 1305 | } /* End of threshold */ | ||
2014 | 1306 | } /* End of match */ | ||
2015 | 1307 | } /* End of pcre match */ | ||
2016 | 1308 | |||
2017 | 1309 | match=0; /* Reset match! */ | ||
2018 | 1310 | pcrematch=0; | ||
2019 | 1311 | rc=0; | ||
2020 | 1312 | } /* End for for loop */ | ||
2021 | 1313 | |||
2022 | 1314 | syslogstring[0]='\0'; /* Reset values */ | ||
2023 | 1315 | syslogtmp[0]='\0'; | ||
2024 | 1316 | } | ||
2025 | 1317 | |||
2026 | 1318 | } /* End of while(1) */ | ||
2027 | 1319 | |||
2028 | 1320 | } /* End of main */ | ||
2029 | 1321 | |||
2030 | 1322 | |||
2031 | 1323 | 0 | ||
2032 | === removed file '.pc/applied-patches' | |||
2033 | --- .pc/applied-patches 2011-12-17 16:04:27 +0000 | |||
2034 | +++ .pc/applied-patches 1970-01-01 00:00:00 +0000 | |||
2035 | @@ -1,1 +0,0 @@ | |||
2036 | 1 | 01-do-not-include-lognorm-private-header.patch | ||
2037 | 2 | 0 | ||
2038 | === modified file 'AUTHORS' | |||
2039 | --- AUTHORS 2011-12-17 16:04:27 +0000 | |||
2040 | +++ AUTHORS 2014-11-22 20:03:11 +0000 | |||
2041 | @@ -1,4 +1,3 @@ | |||
2042 | 1 | |||
2043 | 2 | Primary code development was done by Champ Clark III (champ@quadrantsec.com). | 1 | Primary code development was done by Champ Clark III (champ@quadrantsec.com). |
2044 | 3 | 2 | ||
2045 | 4 | Many people have contributed to the project. I'm hoping in the future | 3 | Many people have contributed to the project. I'm hoping in the future |
2046 | 5 | 4 | ||
2047 | === modified file 'FAQ' | |||
2048 | --- FAQ 2011-12-17 16:04:27 +0000 | |||
2049 | +++ FAQ 2014-11-22 20:03:11 +0000 | |||
2050 | @@ -1,4 +1,1 @@ | |||
2055 | 1 | For the Sagan FAQ, please see: | 1 | See http://sagan.quadrantsec.com |
2052 | 2 | |||
2053 | 3 | https://wiki.quadrantsec.com/bin/view/Main/SaganFAQ | ||
2054 | 4 | |||
2056 | 5 | 2 | ||
2057 | === modified file 'INSTALL' | |||
2058 | --- INSTALL 2012-04-16 22:33:24 +0000 | |||
2059 | +++ INSTALL 2014-11-22 20:03:11 +0000 | |||
2060 | @@ -1,8 +1,8 @@ | |||
2061 | 1 | Installation Instructions | 1 | Installation Instructions |
2062 | 2 | ************************* | 2 | ************************* |
2063 | 3 | 3 | ||
2066 | 4 | Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, | 4 | Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, |
2067 | 5 | 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | 5 | Inc. |
2068 | 6 | 6 | ||
2069 | 7 | Copying and distribution of this file, with or without modification, | 7 | Copying and distribution of this file, with or without modification, |
2070 | 8 | are permitted in any medium without royalty provided the copyright | 8 | are permitted in any medium without royalty provided the copyright |
2071 | @@ -12,8 +12,8 @@ | |||
2072 | 12 | Basic Installation | 12 | Basic Installation |
2073 | 13 | ================== | 13 | ================== |
2074 | 14 | 14 | ||
2077 | 15 | Briefly, the shell commands `./configure; make; make install' should | 15 | Briefly, the shell command `./configure && make && make install' |
2078 | 16 | configure, build, and install this package. The following | 16 | should configure, build, and install this package. The following |
2079 | 17 | more-detailed instructions are generic; see the `README' file for | 17 | more-detailed instructions are generic; see the `README' file for |
2080 | 18 | instructions specific to this package. Some packages provide this | 18 | instructions specific to this package. Some packages provide this |
2081 | 19 | `INSTALL' file but do not implement all of the features documented | 19 | `INSTALL' file but do not implement all of the features documented |
2082 | @@ -226,6 +226,11 @@ | |||
2083 | 226 | 226 | ||
2084 | 227 | and if that doesn't work, install pre-built binaries of GCC for HP-UX. | 227 | and if that doesn't work, install pre-built binaries of GCC for HP-UX. |
2085 | 228 | 228 | ||
2086 | 229 | HP-UX `make' updates targets which have the same time stamps as | ||
2087 | 230 | their prerequisites, which makes it generally unusable when shipped | ||
2088 | 231 | generated files such as `configure' are involved. Use GNU `make' | ||
2089 | 232 | instead. | ||
2090 | 233 | |||
2091 | 229 | On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot | 234 | On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot |
2092 | 230 | parse its `<wchar.h>' header file. The option `-nodtk' can be used as | 235 | parse its `<wchar.h>' header file. The option `-nodtk' can be used as |
2093 | 231 | a workaround. If GNU CC is not installed, it is therefore recommended | 236 | a workaround. If GNU CC is not installed, it is therefore recommended |
2094 | @@ -304,9 +309,10 @@ | |||
2095 | 304 | overridden in the site shell script). | 309 | overridden in the site shell script). |
2096 | 305 | 310 | ||
2097 | 306 | Unfortunately, this technique does not work for `CONFIG_SHELL' due to | 311 | Unfortunately, this technique does not work for `CONFIG_SHELL' due to |
2099 | 307 | an Autoconf bug. Until the bug is fixed you can use this workaround: | 312 | an Autoconf limitation. Until the limitation is lifted, you can use |
2100 | 313 | this workaround: | ||
2101 | 308 | 314 | ||
2103 | 309 | CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash | 315 | CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash |
2104 | 310 | 316 | ||
2105 | 311 | `configure' Invocation | 317 | `configure' Invocation |
2106 | 312 | ====================== | 318 | ====================== |
2107 | @@ -362,4 +368,3 @@ | |||
2108 | 362 | 368 | ||
2109 | 363 | `configure' also accepts some other, not widely useful, options. Run | 369 | `configure' also accepts some other, not widely useful, options. Run |
2110 | 364 | `configure --help' for more details. | 370 | `configure --help' for more details. |
2111 | 365 | |||
2112 | 366 | 371 | ||
2113 | === added file 'Makefile' | |||
2114 | --- Makefile 1970-01-01 00:00:00 +0000 | |||
2115 | +++ Makefile 2014-11-22 20:03:11 +0000 | |||
2116 | @@ -0,0 +1,805 @@ | |||
2117 | 1 | # Makefile.in generated by automake 1.14.1 from Makefile.am. | ||
2118 | 2 | # Makefile. Generated from Makefile.in by configure. | ||
2119 | 3 | |||
2120 | 4 | # Copyright (C) 1994-2013 Free Software Foundation, Inc. | ||
2121 | 5 | |||
2122 | 6 | # This Makefile.in is free software; the Free Software Foundation | ||
2123 | 7 | # gives unlimited permission to copy and/or distribute it, | ||
2124 | 8 | # with or without modifications, as long as this notice is preserved. | ||
2125 | 9 | |||
2126 | 10 | # This program is distributed in the hope that it will be useful, | ||
2127 | 11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | ||
2128 | 12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
2129 | 13 | # PARTICULAR PURPOSE. | ||
2130 | 14 | |||
2131 | 15 | |||
2132 | 16 | |||
2133 | 17 | am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' | ||
2134 | 18 | am__make_running_with_option = \ | ||
2135 | 19 | case $${target_option-} in \ | ||
2136 | 20 | ?) ;; \ | ||
2137 | 21 | *) echo "am__make_running_with_option: internal error: invalid" \ | ||
2138 | 22 | "target option '$${target_option-}' specified" >&2; \ | ||
2139 | 23 | exit 1;; \ | ||
2140 | 24 | esac; \ | ||
2141 | 25 | has_opt=no; \ | ||
2142 | 26 | sane_makeflags=$$MAKEFLAGS; \ | ||
2143 | 27 | if $(am__is_gnu_make); then \ | ||
2144 | 28 | sane_makeflags=$$MFLAGS; \ | ||
2145 | 29 | else \ | ||
2146 | 30 | case $$MAKEFLAGS in \ | ||
2147 | 31 | *\\[\ \ ]*) \ | ||
2148 | 32 | bs=\\; \ | ||
2149 | 33 | sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | ||
2150 | 34 | | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ | ||
2151 | 35 | esac; \ | ||
2152 | 36 | fi; \ | ||
2153 | 37 | skip_next=no; \ | ||
2154 | 38 | strip_trailopt () \ | ||
2155 | 39 | { \ | ||
2156 | 40 | flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ | ||
2157 | 41 | }; \ | ||
2158 | 42 | for flg in $$sane_makeflags; do \ | ||
2159 | 43 | test $$skip_next = yes && { skip_next=no; continue; }; \ | ||
2160 | 44 | case $$flg in \ | ||
2161 | 45 | *=*|--*) continue;; \ | ||
2162 | 46 | -*I) strip_trailopt 'I'; skip_next=yes;; \ | ||
2163 | 47 | -*I?*) strip_trailopt 'I';; \ | ||
2164 | 48 | -*O) strip_trailopt 'O'; skip_next=yes;; \ | ||
2165 | 49 | -*O?*) strip_trailopt 'O';; \ | ||
2166 | 50 | -*l) strip_trailopt 'l'; skip_next=yes;; \ | ||
2167 | 51 | -*l?*) strip_trailopt 'l';; \ | ||
2168 | 52 | -[dEDm]) skip_next=yes;; \ | ||
2169 | 53 | -[JT]) skip_next=yes;; \ | ||
2170 | 54 | esac; \ | ||
2171 | 55 | case $$flg in \ | ||
2172 | 56 | *$$target_option*) has_opt=yes; break;; \ | ||
2173 | 57 | esac; \ | ||
2174 | 58 | done; \ | ||
2175 | 59 | test $$has_opt = yes | ||
2176 | 60 | am__make_dryrun = (target_option=n; $(am__make_running_with_option)) | ||
2177 | 61 | am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) | ||
2178 | 62 | pkgdatadir = $(datadir)/sagan | ||
2179 | 63 | pkgincludedir = $(includedir)/sagan | ||
2180 | 64 | pkglibdir = $(libdir)/sagan | ||
2181 | 65 | pkglibexecdir = $(libexecdir)/sagan | ||
2182 | 66 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | ||
2183 | 67 | install_sh_DATA = $(install_sh) -c -m 644 | ||
2184 | 68 | install_sh_PROGRAM = $(install_sh) -c | ||
2185 | 69 | install_sh_SCRIPT = $(install_sh) -c | ||
2186 | 70 | INSTALL_HEADER = $(INSTALL_DATA) | ||
2187 | 71 | transform = $(program_transform_name) | ||
2188 | 72 | NORMAL_INSTALL = : | ||
2189 | 73 | PRE_INSTALL = : | ||
2190 | 74 | POST_INSTALL = : | ||
2191 | 75 | NORMAL_UNINSTALL = : | ||
2192 | 76 | PRE_UNINSTALL = : | ||
2193 | 77 | POST_UNINSTALL = : | ||
2194 | 78 | build_triplet = x86_64-unknown-linux-gnu | ||
2195 | 79 | host_triplet = x86_64-unknown-linux-gnu | ||
2196 | 80 | target_triplet = x86_64-unknown-linux-gnu | ||
2197 | 81 | subdir = . | ||
2198 | 82 | DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ | ||
2199 | 83 | $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ | ||
2200 | 84 | $(top_srcdir)/configure $(am__configure_deps) \ | ||
2201 | 85 | $(srcdir)/config.h.in COPYING TODO compile config.guess \ | ||
2202 | 86 | config.sub depcomp install-sh missing | ||
2203 | 87 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
2204 | 88 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac | ||
2205 | 89 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | ||
2206 | 90 | $(ACLOCAL_M4) | ||
2207 | 91 | am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ | ||
2208 | 92 | configure.lineno config.status.lineno | ||
2209 | 93 | mkinstalldirs = $(install_sh) -d | ||
2210 | 94 | CONFIG_HEADER = config.h | ||
2211 | 95 | CONFIG_CLEAN_FILES = | ||
2212 | 96 | CONFIG_CLEAN_VPATH_FILES = | ||
2213 | 97 | AM_V_P = $(am__v_P_$(V)) | ||
2214 | 98 | am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) | ||
2215 | 99 | am__v_P_0 = false | ||
2216 | 100 | am__v_P_1 = : | ||
2217 | 101 | AM_V_GEN = $(am__v_GEN_$(V)) | ||
2218 | 102 | am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) | ||
2219 | 103 | am__v_GEN_0 = @echo " GEN " $@; | ||
2220 | 104 | am__v_GEN_1 = | ||
2221 | 105 | AM_V_at = $(am__v_at_$(V)) | ||
2222 | 106 | am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) | ||
2223 | 107 | am__v_at_0 = @ | ||
2224 | 108 | am__v_at_1 = | ||
2225 | 109 | SOURCES = | ||
2226 | 110 | DIST_SOURCES = | ||
2227 | 111 | RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ | ||
2228 | 112 | ctags-recursive dvi-recursive html-recursive info-recursive \ | ||
2229 | 113 | install-data-recursive install-dvi-recursive \ | ||
2230 | 114 | install-exec-recursive install-html-recursive \ | ||
2231 | 115 | install-info-recursive install-pdf-recursive \ | ||
2232 | 116 | install-ps-recursive install-recursive installcheck-recursive \ | ||
2233 | 117 | installdirs-recursive pdf-recursive ps-recursive \ | ||
2234 | 118 | tags-recursive uninstall-recursive | ||
2235 | 119 | am__can_run_installinfo = \ | ||
2236 | 120 | case $$AM_UPDATE_INFO_DIR in \ | ||
2237 | 121 | n|no|NO) false;; \ | ||
2238 | 122 | *) (install-info --version) >/dev/null 2>&1;; \ | ||
2239 | 123 | esac | ||
2240 | 124 | RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ | ||
2241 | 125 | distclean-recursive maintainer-clean-recursive | ||
2242 | 126 | am__recursive_targets = \ | ||
2243 | 127 | $(RECURSIVE_TARGETS) \ | ||
2244 | 128 | $(RECURSIVE_CLEAN_TARGETS) \ | ||
2245 | 129 | $(am__extra_recursive_targets) | ||
2246 | 130 | AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ | ||
2247 | 131 | cscope distdir dist dist-all distcheck | ||
2248 | 132 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ | ||
2249 | 133 | $(LISP)config.h.in | ||
2250 | 134 | # Read a list of newline-separated strings from the standard input, | ||
2251 | 135 | # and print each of them once, without duplicates. Input order is | ||
2252 | 136 | # *not* preserved. | ||
2253 | 137 | am__uniquify_input = $(AWK) '\ | ||
2254 | 138 | BEGIN { nonempty = 0; } \ | ||
2255 | 139 | { items[$$0] = 1; nonempty = 1; } \ | ||
2256 | 140 | END { if (nonempty) { for (i in items) print i; }; } \ | ||
2257 | 141 | ' | ||
2258 | 142 | # Make sure the list of sources is unique. This is necessary because, | ||
2259 | 143 | # e.g., the same source file might be shared among _SOURCES variables | ||
2260 | 144 | # for different programs/libraries. | ||
2261 | 145 | am__define_uniq_tagged_files = \ | ||
2262 | 146 | list='$(am__tagged_files)'; \ | ||
2263 | 147 | unique=`for i in $$list; do \ | ||
2264 | 148 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
2265 | 149 | done | $(am__uniquify_input)` | ||
2266 | 150 | ETAGS = etags | ||
2267 | 151 | CTAGS = ctags | ||
2268 | 152 | CSCOPE = cscope | ||
2269 | 153 | DIST_SUBDIRS = $(SUBDIRS) | ||
2270 | 154 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
2271 | 155 | distdir = $(PACKAGE)-$(VERSION) | ||
2272 | 156 | top_distdir = $(distdir) | ||
2273 | 157 | am__remove_distdir = \ | ||
2274 | 158 | if test -d "$(distdir)"; then \ | ||
2275 | 159 | find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ | ||
2276 | 160 | && rm -rf "$(distdir)" \ | ||
2277 | 161 | || { sleep 5 && rm -rf "$(distdir)"; }; \ | ||
2278 | 162 | else :; fi | ||
2279 | 163 | am__post_remove_distdir = $(am__remove_distdir) | ||
2280 | 164 | am__relativize = \ | ||
2281 | 165 | dir0=`pwd`; \ | ||
2282 | 166 | sed_first='s,^\([^/]*\)/.*$$,\1,'; \ | ||
2283 | 167 | sed_rest='s,^[^/]*/*,,'; \ | ||
2284 | 168 | sed_last='s,^.*/\([^/]*\)$$,\1,'; \ | ||
2285 | 169 | sed_butlast='s,/*[^/]*$$,,'; \ | ||
2286 | 170 | while test -n "$$dir1"; do \ | ||
2287 | 171 | first=`echo "$$dir1" | sed -e "$$sed_first"`; \ | ||
2288 | 172 | if test "$$first" != "."; then \ | ||
2289 | 173 | if test "$$first" = ".."; then \ | ||
2290 | 174 | dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ | ||
2291 | 175 | dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ | ||
2292 | 176 | else \ | ||
2293 | 177 | first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ | ||
2294 | 178 | if test "$$first2" = "$$first"; then \ | ||
2295 | 179 | dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ | ||
2296 | 180 | else \ | ||
2297 | 181 | dir2="../$$dir2"; \ | ||
2298 | 182 | fi; \ | ||
2299 | 183 | dir0="$$dir0"/"$$first"; \ | ||
2300 | 184 | fi; \ | ||
2301 | 185 | fi; \ | ||
2302 | 186 | dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ | ||
2303 | 187 | done; \ | ||
2304 | 188 | reldir="$$dir2" | ||
2305 | 189 | DIST_ARCHIVES = $(distdir).tar.gz | ||
2306 | 190 | GZIP_ENV = --best | ||
2307 | 191 | DIST_TARGETS = dist-gzip | ||
2308 | 192 | distuninstallcheck_listfiles = find . -type f -print | ||
2309 | 193 | am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | ||
2310 | 194 | | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' | ||
2311 | 195 | distcleancheck_listfiles = find . -type f -print | ||
2312 | 196 | ACLOCAL = ${SHELL} /home/champ/code/release-1.0.0RC4/sagan/missing aclocal-1.14 | ||
2313 | 197 | AMTAR = $${TAR-tar} | ||
2314 | 198 | AM_DEFAULT_VERBOSITY = 1 | ||
2315 | 199 | AUTOCONF = ${SHELL} /home/champ/code/release-1.0.0RC4/sagan/missing autoconf | ||
2316 | 200 | AUTOHEADER = ${SHELL} /home/champ/code/release-1.0.0RC4/sagan/missing autoheader | ||
2317 | 201 | AUTOMAKE = ${SHELL} /home/champ/code/release-1.0.0RC4/sagan/missing automake-1.14 | ||
2318 | 202 | AWK = gawk | ||
2319 | 203 | CC = gcc | ||
2320 | 204 | CCDEPMODE = depmode=gcc3 | ||
2321 | 205 | CFLAGS = -g -O2 | ||
2322 | 206 | CPP = gcc -E | ||
2323 | 207 | CPPFLAGS = | ||
2324 | 208 | CYGPATH_W = echo | ||
2325 | 209 | DEFS = -DHAVE_CONFIG_H | ||
2326 | 210 | DEPDIR = .deps | ||
2327 | 211 | ECHO_C = | ||
2328 | 212 | ECHO_N = -n | ||
2329 | 213 | ECHO_T = | ||
2330 | 214 | EGREP = /bin/grep -E | ||
2331 | 215 | ENDIAN = little | ||
2332 | 216 | EXEEXT = | ||
2333 | 217 | GREP = /bin/grep | ||
2334 | 218 | INSTALL = /usr/bin/install -c | ||
2335 | 219 | INSTALL_DATA = ${INSTALL} -m 644 | ||
2336 | 220 | INSTALL_PROGRAM = ${INSTALL} | ||
2337 | 221 | INSTALL_SCRIPT = ${INSTALL} | ||
2338 | 222 | INSTALL_STRIP_PROGRAM = $(install_sh) -c -s | ||
2339 | 223 | JSON_C_CFLAGS = -I/usr/include/json | ||
2340 | 224 | JSON_C_LIBS = -ljson | ||
2341 | 225 | LDFLAGS = | ||
2342 | 226 | LIBESTR_CFLAGS = | ||
2343 | 227 | LIBESTR_LIBS = -L/usr/lib -lestr | ||
2344 | 228 | LIBLOGNORM_CFLAGS = | ||
2345 | 229 | LIBLOGNORM_LIBS = -L/usr/lib -llognorm -lestr | ||
2346 | 230 | LIBOBJS = | ||
2347 | 231 | LIBS = -ldnet -llognorm -lestr -lm -lpthread -lpcre | ||
2348 | 232 | LTLIBOBJS = | ||
2349 | 233 | MAINT = # | ||
2350 | 234 | MAKEINFO = ${SHELL} /home/champ/code/release-1.0.0RC4/sagan/missing makeinfo | ||
2351 | 235 | MKDIR_P = /bin/mkdir -p | ||
2352 | 236 | OBJEXT = o | ||
2353 | 237 | PACKAGE = sagan | ||
2354 | 238 | PACKAGE_BUGREPORT = | ||
2355 | 239 | PACKAGE_NAME = | ||
2356 | 240 | PACKAGE_STRING = | ||
2357 | 241 | PACKAGE_TARNAME = | ||
2358 | 242 | PACKAGE_URL = | ||
2359 | 243 | PACKAGE_VERSION = | ||
2360 | 244 | PATH_SEPARATOR = : | ||
2361 | 245 | PKG_CONFIG = /usr/bin/pkg-config | ||
2362 | 246 | PKG_CONFIG_LIBDIR = | ||
2363 | 247 | PKG_CONFIG_PATH = | ||
2364 | 248 | SET_MAKE = | ||
2365 | 249 | SHELL = /bin/sh | ||
2366 | 250 | STRIP = | ||
2367 | 251 | VERSION = 1.0.0-RC4 | ||
2368 | 252 | abs_builddir = /home/champ/code/release-1.0.0RC4/sagan | ||
2369 | 253 | abs_srcdir = /home/champ/code/release-1.0.0RC4/sagan | ||
2370 | 254 | abs_top_builddir = /home/champ/code/release-1.0.0RC4/sagan | ||
2371 | 255 | abs_top_srcdir = /home/champ/code/release-1.0.0RC4/sagan | ||
2372 | 256 | ac_ct_CC = gcc | ||
2373 | 257 | am__include = include | ||
2374 | 258 | am__leading_dot = . | ||
2375 | 259 | am__quote = | ||
2376 | 260 | am__tar = $${TAR-tar} chof - "$$tardir" | ||
2377 | 261 | am__untar = $${TAR-tar} xf - | ||
2378 | 262 | bindir = ${exec_prefix}/bin | ||
2379 | 263 | build = x86_64-unknown-linux-gnu | ||
2380 | 264 | build_alias = | ||
2381 | 265 | build_cpu = x86_64 | ||
2382 | 266 | build_os = linux-gnu | ||
2383 | 267 | build_vendor = unknown | ||
2384 | 268 | builddir = . | ||
2385 | 269 | datadir = ${datarootdir} | ||
2386 | 270 | datarootdir = ${prefix}/share | ||
2387 | 271 | docdir = ${datarootdir}/doc/${PACKAGE} | ||
2388 | 272 | dvidir = ${docdir} | ||
2389 | 273 | exec_prefix = ${prefix} | ||
2390 | 274 | host = x86_64-unknown-linux-gnu | ||
2391 | 275 | host_alias = | ||
2392 | 276 | host_cpu = x86_64 | ||
2393 | 277 | host_os = linux-gnu | ||
2394 | 278 | host_vendor = unknown | ||
2395 | 279 | htmldir = ${docdir} | ||
2396 | 280 | includedir = ${prefix}/include | ||
2397 | 281 | infodir = ${datarootdir}/info | ||
2398 | 282 | install_sh = ${SHELL} /home/champ/code/release-1.0.0RC4/sagan/install-sh | ||
2399 | 283 | libdir = ${exec_prefix}/lib | ||
2400 | 284 | libexecdir = ${exec_prefix}/libexec | ||
2401 | 285 | localedir = ${datarootdir}/locale | ||
2402 | 286 | localstatedir = ${prefix}/var | ||
2403 | 287 | mandir = ${datarootdir}/man | ||
2404 | 288 | mkdir_p = $(MKDIR_P) | ||
2405 | 289 | oldincludedir = /usr/include | ||
2406 | 290 | pdfdir = ${docdir} | ||
2407 | 291 | prefix = /usr/local | ||
2408 | 292 | program_transform_name = s,x,x, | ||
2409 | 293 | psdir = ${docdir} | ||
2410 | 294 | sbindir = ${exec_prefix}/sbin | ||
2411 | 295 | sharedstatedir = ${prefix}/com | ||
2412 | 296 | srcdir = . | ||
2413 | 297 | sysconfdir = ${prefix}/etc | ||
2414 | 298 | target = x86_64-unknown-linux-gnu | ||
2415 | 299 | target_alias = | ||
2416 | 300 | target_cpu = x86_64 | ||
2417 | 301 | target_os = linux-gnu | ||
2418 | 302 | target_vendor = unknown | ||
2419 | 303 | top_build_prefix = | ||
2420 | 304 | top_builddir = . | ||
2421 | 305 | top_srcdir = . | ||
2422 | 306 | AUTOMAKE_OPIONS = foreign no-dependencies | ||
2423 | 307 | SUBDIRS = src | ||
2424 | 308 | INCLUDES = @INCLUDES@ | ||
2425 | 309 | all: config.h | ||
2426 | 310 | $(MAKE) $(AM_MAKEFLAGS) all-recursive | ||
2427 | 311 | |||
2428 | 312 | .SUFFIXES: | ||
2429 | 313 | am--refresh: Makefile | ||
2430 | 314 | @: | ||
2431 | 315 | $(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps) | ||
2432 | 316 | @for dep in $?; do \ | ||
2433 | 317 | case '$(am__configure_deps)' in \ | ||
2434 | 318 | *$$dep*) \ | ||
2435 | 319 | echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ | ||
2436 | 320 | $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ | ||
2437 | 321 | && exit 0; \ | ||
2438 | 322 | exit 1;; \ | ||
2439 | 323 | esac; \ | ||
2440 | 324 | done; \ | ||
2441 | 325 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ | ||
2442 | 326 | $(am__cd) $(top_srcdir) && \ | ||
2443 | 327 | $(AUTOMAKE) --gnu Makefile | ||
2444 | 328 | .PRECIOUS: Makefile | ||
2445 | 329 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
2446 | 330 | @case '$?' in \ | ||
2447 | 331 | *config.status*) \ | ||
2448 | 332 | echo ' $(SHELL) ./config.status'; \ | ||
2449 | 333 | $(SHELL) ./config.status;; \ | ||
2450 | 334 | *) \ | ||
2451 | 335 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ | ||
2452 | 336 | cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ | ||
2453 | 337 | esac; | ||
2454 | 338 | |||
2455 | 339 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
2456 | 340 | $(SHELL) ./config.status --recheck | ||
2457 | 341 | |||
2458 | 342 | $(top_srcdir)/configure: # $(am__configure_deps) | ||
2459 | 343 | $(am__cd) $(srcdir) && $(AUTOCONF) | ||
2460 | 344 | $(ACLOCAL_M4): # $(am__aclocal_m4_deps) | ||
2461 | 345 | $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) | ||
2462 | 346 | $(am__aclocal_m4_deps): | ||
2463 | 347 | |||
2464 | 348 | config.h: stamp-h1 | ||
2465 | 349 | @test -f $@ || rm -f stamp-h1 | ||
2466 | 350 | @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 | ||
2467 | 351 | |||
2468 | 352 | stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status | ||
2469 | 353 | @rm -f stamp-h1 | ||
2470 | 354 | cd $(top_builddir) && $(SHELL) ./config.status config.h | ||
2471 | 355 | $(srcdir)/config.h.in: # $(am__configure_deps) | ||
2472 | 356 | ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) | ||
2473 | 357 | rm -f stamp-h1 | ||
2474 | 358 | touch $@ | ||
2475 | 359 | |||
2476 | 360 | distclean-hdr: | ||
2477 | 361 | -rm -f config.h stamp-h1 | ||
2478 | 362 | |||
2479 | 363 | # This directory's subdirectories are mostly independent; you can cd | ||
2480 | 364 | # into them and run 'make' without going through this Makefile. | ||
2481 | 365 | # To change the values of 'make' variables: instead of editing Makefiles, | ||
2482 | 366 | # (1) if the variable is set in 'config.status', edit 'config.status' | ||
2483 | 367 | # (which will cause the Makefiles to be regenerated when you run 'make'); | ||
2484 | 368 | # (2) otherwise, pass the desired values on the 'make' command line. | ||
2485 | 369 | $(am__recursive_targets): | ||
2486 | 370 | @fail=; \ | ||
2487 | 371 | if $(am__make_keepgoing); then \ | ||
2488 | 372 | failcom='fail=yes'; \ | ||
2489 | 373 | else \ | ||
2490 | 374 | failcom='exit 1'; \ | ||
2491 | 375 | fi; \ | ||
2492 | 376 | dot_seen=no; \ | ||
2493 | 377 | target=`echo $@ | sed s/-recursive//`; \ | ||
2494 | 378 | case "$@" in \ | ||
2495 | 379 | distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ | ||
2496 | 380 | *) list='$(SUBDIRS)' ;; \ | ||
2497 | 381 | esac; \ | ||
2498 | 382 | for subdir in $$list; do \ | ||
2499 | 383 | echo "Making $$target in $$subdir"; \ | ||
2500 | 384 | if test "$$subdir" = "."; then \ | ||
2501 | 385 | dot_seen=yes; \ | ||
2502 | 386 | local_target="$$target-am"; \ | ||
2503 | 387 | else \ | ||
2504 | 388 | local_target="$$target"; \ | ||
2505 | 389 | fi; \ | ||
2506 | 390 | ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ | ||
2507 | 391 | || eval $$failcom; \ | ||
2508 | 392 | done; \ | ||
2509 | 393 | if test "$$dot_seen" = "no"; then \ | ||
2510 | 394 | $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ | ||
2511 | 395 | fi; test -z "$$fail" | ||
2512 | 396 | |||
2513 | 397 | ID: $(am__tagged_files) | ||
2514 | 398 | $(am__define_uniq_tagged_files); mkid -fID $$unique | ||
2515 | 399 | tags: tags-recursive | ||
2516 | 400 | TAGS: tags | ||
2517 | 401 | |||
2518 | 402 | tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) | ||
2519 | 403 | set x; \ | ||
2520 | 404 | here=`pwd`; \ | ||
2521 | 405 | if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ | ||
2522 | 406 | include_option=--etags-include; \ | ||
2523 | 407 | empty_fix=.; \ | ||
2524 | 408 | else \ | ||
2525 | 409 | include_option=--include; \ | ||
2526 | 410 | empty_fix=; \ | ||
2527 | 411 | fi; \ | ||
2528 | 412 | list='$(SUBDIRS)'; for subdir in $$list; do \ | ||
2529 | 413 | if test "$$subdir" = .; then :; else \ | ||
2530 | 414 | test ! -f $$subdir/TAGS || \ | ||
2531 | 415 | set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ | ||
2532 | 416 | fi; \ | ||
2533 | 417 | done; \ | ||
2534 | 418 | $(am__define_uniq_tagged_files); \ | ||
2535 | 419 | shift; \ | ||
2536 | 420 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ | ||
2537 | 421 | test -n "$$unique" || unique=$$empty_fix; \ | ||
2538 | 422 | if test $$# -gt 0; then \ | ||
2539 | 423 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
2540 | 424 | "$$@" $$unique; \ | ||
2541 | 425 | else \ | ||
2542 | 426 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
2543 | 427 | $$unique; \ | ||
2544 | 428 | fi; \ | ||
2545 | 429 | fi | ||
2546 | 430 | ctags: ctags-recursive | ||
2547 | 431 | |||
2548 | 432 | CTAGS: ctags | ||
2549 | 433 | ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) | ||
2550 | 434 | $(am__define_uniq_tagged_files); \ | ||
2551 | 435 | test -z "$(CTAGS_ARGS)$$unique" \ | ||
2552 | 436 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
2553 | 437 | $$unique | ||
2554 | 438 | |||
2555 | 439 | GTAGS: | ||
2556 | 440 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
2557 | 441 | && $(am__cd) $(top_srcdir) \ | ||
2558 | 442 | && gtags -i $(GTAGS_ARGS) "$$here" | ||
2559 | 443 | cscope: cscope.files | ||
2560 | 444 | test ! -s cscope.files \ | ||
2561 | 445 | || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) | ||
2562 | 446 | clean-cscope: | ||
2563 | 447 | -rm -f cscope.files | ||
2564 | 448 | cscope.files: clean-cscope cscopelist | ||
2565 | 449 | cscopelist: cscopelist-recursive | ||
2566 | 450 | |||
2567 | 451 | cscopelist-am: $(am__tagged_files) | ||
2568 | 452 | list='$(am__tagged_files)'; \ | ||
2569 | 453 | case "$(srcdir)" in \ | ||
2570 | 454 | [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ | ||
2571 | 455 | *) sdir=$(subdir)/$(srcdir) ;; \ | ||
2572 | 456 | esac; \ | ||
2573 | 457 | for i in $$list; do \ | ||
2574 | 458 | if test -f "$$i"; then \ | ||
2575 | 459 | echo "$(subdir)/$$i"; \ | ||
2576 | 460 | else \ | ||
2577 | 461 | echo "$$sdir/$$i"; \ | ||
2578 | 462 | fi; \ | ||
2579 | 463 | done >> $(top_builddir)/cscope.files | ||
2580 | 464 | |||
2581 | 465 | distclean-tags: | ||
2582 | 466 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
2583 | 467 | -rm -f cscope.out cscope.in.out cscope.po.out cscope.files | ||
2584 | 468 | |||
2585 | 469 | distdir: $(DISTFILES) | ||
2586 | 470 | $(am__remove_distdir) | ||
2587 | 471 | test -d "$(distdir)" || mkdir "$(distdir)" | ||
2588 | 472 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
2589 | 473 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
2590 | 474 | list='$(DISTFILES)'; \ | ||
2591 | 475 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
2592 | 476 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
2593 | 477 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
2594 | 478 | case $$dist_files in \ | ||
2595 | 479 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
2596 | 480 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
2597 | 481 | sort -u` ;; \ | ||
2598 | 482 | esac; \ | ||
2599 | 483 | for file in $$dist_files; do \ | ||
2600 | 484 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
2601 | 485 | if test -d $$d/$$file; then \ | ||
2602 | 486 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
2603 | 487 | if test -d "$(distdir)/$$file"; then \ | ||
2604 | 488 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
2605 | 489 | fi; \ | ||
2606 | 490 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
2607 | 491 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | ||
2608 | 492 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
2609 | 493 | fi; \ | ||
2610 | 494 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | ||
2611 | 495 | else \ | ||
2612 | 496 | test -f "$(distdir)/$$file" \ | ||
2613 | 497 | || cp -p $$d/$$file "$(distdir)/$$file" \ | ||
2614 | 498 | || exit 1; \ | ||
2615 | 499 | fi; \ | ||
2616 | 500 | done | ||
2617 | 501 | @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ | ||
2618 | 502 | if test "$$subdir" = .; then :; else \ | ||
2619 | 503 | $(am__make_dryrun) \ | ||
2620 | 504 | || test -d "$(distdir)/$$subdir" \ | ||
2621 | 505 | || $(MKDIR_P) "$(distdir)/$$subdir" \ | ||
2622 | 506 | || exit 1; \ | ||
2623 | 507 | dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ | ||
2624 | 508 | $(am__relativize); \ | ||
2625 | 509 | new_distdir=$$reldir; \ | ||
2626 | 510 | dir1=$$subdir; dir2="$(top_distdir)"; \ | ||
2627 | 511 | $(am__relativize); \ | ||
2628 | 512 | new_top_distdir=$$reldir; \ | ||
2629 | 513 | echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ | ||
2630 | 514 | echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ | ||
2631 | 515 | ($(am__cd) $$subdir && \ | ||
2632 | 516 | $(MAKE) $(AM_MAKEFLAGS) \ | ||
2633 | 517 | top_distdir="$$new_top_distdir" \ | ||
2634 | 518 | distdir="$$new_distdir" \ | ||
2635 | 519 | am__remove_distdir=: \ | ||
2636 | 520 | am__skip_length_check=: \ | ||
2637 | 521 | am__skip_mode_fix=: \ | ||
2638 | 522 | distdir) \ | ||
2639 | 523 | || exit 1; \ | ||
2640 | 524 | fi; \ | ||
2641 | 525 | done | ||
2642 | 526 | -test -n "$(am__skip_mode_fix)" \ | ||
2643 | 527 | || find "$(distdir)" -type d ! -perm -755 \ | ||
2644 | 528 | -exec chmod u+rwx,go+rx {} \; -o \ | ||
2645 | 529 | ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ | ||
2646 | 530 | ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ | ||
2647 | 531 | ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ | ||
2648 | 532 | || chmod -R a+r "$(distdir)" | ||
2649 | 533 | dist-gzip: distdir | ||
2650 | 534 | tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz | ||
2651 | 535 | $(am__post_remove_distdir) | ||
2652 | 536 | |||
2653 | 537 | dist-bzip2: distdir | ||
2654 | 538 | tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 | ||
2655 | 539 | $(am__post_remove_distdir) | ||
2656 | 540 | |||
2657 | 541 | dist-lzip: distdir | ||
2658 | 542 | tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz | ||
2659 | 543 | $(am__post_remove_distdir) | ||
2660 | 544 | |||
2661 | 545 | dist-xz: distdir | ||
2662 | 546 | tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz | ||
2663 | 547 | $(am__post_remove_distdir) | ||
2664 | 548 | |||
2665 | 549 | dist-tarZ: distdir | ||
2666 | 550 | @echo WARNING: "Support for shar distribution archives is" \ | ||
2667 | 551 | "deprecated." >&2 | ||
2668 | 552 | @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 | ||
2669 | 553 | tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z | ||
2670 | 554 | $(am__post_remove_distdir) | ||
2671 | 555 | |||
2672 | 556 | dist-shar: distdir | ||
2673 | 557 | @echo WARNING: "Support for distribution archives compressed with" \ | ||
2674 | 558 | "legacy program 'compress' is deprecated." >&2 | ||
2675 | 559 | @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 | ||
2676 | 560 | shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz | ||
2677 | 561 | $(am__post_remove_distdir) | ||
2678 | 562 | |||
2679 | 563 | dist-zip: distdir | ||
2680 | 564 | -rm -f $(distdir).zip | ||
2681 | 565 | zip -rq $(distdir).zip $(distdir) | ||
2682 | 566 | $(am__post_remove_distdir) | ||
2683 | 567 | |||
2684 | 568 | dist dist-all: | ||
2685 | 569 | $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' | ||
2686 | 570 | $(am__post_remove_distdir) | ||
2687 | 571 | |||
2688 | 572 | # This target untars the dist file and tries a VPATH configuration. Then | ||
2689 | 573 | # it guarantees that the distribution is self-contained by making another | ||
2690 | 574 | # tarfile. | ||
2691 | 575 | distcheck: dist | ||
2692 | 576 | case '$(DIST_ARCHIVES)' in \ | ||
2693 | 577 | *.tar.gz*) \ | ||
2694 | 578 | GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ | ||
2695 | 579 | *.tar.bz2*) \ | ||
2696 | 580 | bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ | ||
2697 | 581 | *.tar.lz*) \ | ||
2698 | 582 | lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ | ||
2699 | 583 | *.tar.xz*) \ | ||
2700 | 584 | xz -dc $(distdir).tar.xz | $(am__untar) ;;\ | ||
2701 | 585 | *.tar.Z*) \ | ||
2702 | 586 | uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ | ||
2703 | 587 | *.shar.gz*) \ | ||
2704 | 588 | GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ | ||
2705 | 589 | *.zip*) \ | ||
2706 | 590 | unzip $(distdir).zip ;;\ | ||
2707 | 591 | esac | ||
2708 | 592 | chmod -R a-w $(distdir) | ||
2709 | 593 | chmod u+w $(distdir) | ||
2710 | 594 | mkdir $(distdir)/_build $(distdir)/_inst | ||
2711 | 595 | chmod a-w $(distdir) | ||
2712 | 596 | test -d $(distdir)/_build || exit 0; \ | ||
2713 | 597 | dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ | ||
2714 | 598 | && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ | ||
2715 | 599 | && am__cwd=`pwd` \ | ||
2716 | 600 | && $(am__cd) $(distdir)/_build \ | ||
2717 | 601 | && ../configure \ | ||
2718 | 602 | $(AM_DISTCHECK_CONFIGURE_FLAGS) \ | ||
2719 | 603 | $(DISTCHECK_CONFIGURE_FLAGS) \ | ||
2720 | 604 | --srcdir=.. --prefix="$$dc_install_base" \ | ||
2721 | 605 | && $(MAKE) $(AM_MAKEFLAGS) \ | ||
2722 | 606 | && $(MAKE) $(AM_MAKEFLAGS) dvi \ | ||
2723 | 607 | && $(MAKE) $(AM_MAKEFLAGS) check \ | ||
2724 | 608 | && $(MAKE) $(AM_MAKEFLAGS) install \ | ||
2725 | 609 | && $(MAKE) $(AM_MAKEFLAGS) installcheck \ | ||
2726 | 610 | && $(MAKE) $(AM_MAKEFLAGS) uninstall \ | ||
2727 | 611 | && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ | ||
2728 | 612 | distuninstallcheck \ | ||
2729 | 613 | && chmod -R a-w "$$dc_install_base" \ | ||
2730 | 614 | && ({ \ | ||
2731 | 615 | (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ | ||
2732 | 616 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ | ||
2733 | 617 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ | ||
2734 | 618 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ | ||
2735 | 619 | distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ | ||
2736 | 620 | } || { rm -rf "$$dc_destdir"; exit 1; }) \ | ||
2737 | 621 | && rm -rf "$$dc_destdir" \ | ||
2738 | 622 | && $(MAKE) $(AM_MAKEFLAGS) dist \ | ||
2739 | 623 | && rm -rf $(DIST_ARCHIVES) \ | ||
2740 | 624 | && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ | ||
2741 | 625 | && cd "$$am__cwd" \ | ||
2742 | 626 | || exit 1 | ||
2743 | 627 | $(am__post_remove_distdir) | ||
2744 | 628 | @(echo "$(distdir) archives ready for distribution: "; \ | ||
2745 | 629 | list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ | ||
2746 | 630 | sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' | ||
2747 | 631 | distuninstallcheck: | ||
2748 | 632 | @test -n '$(distuninstallcheck_dir)' || { \ | ||
2749 | 633 | echo 'ERROR: trying to run $@ with an empty' \ | ||
2750 | 634 | '$$(distuninstallcheck_dir)' >&2; \ | ||
2751 | 635 | exit 1; \ | ||
2752 | 636 | }; \ | ||
2753 | 637 | $(am__cd) '$(distuninstallcheck_dir)' || { \ | ||
2754 | 638 | echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ | ||
2755 | 639 | exit 1; \ | ||
2756 | 640 | }; \ | ||
2757 | 641 | test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ | ||
2758 | 642 | || { echo "ERROR: files left after uninstall:" ; \ | ||
2759 | 643 | if test -n "$(DESTDIR)"; then \ | ||
2760 | 644 | echo " (check DESTDIR support)"; \ | ||
2761 | 645 | fi ; \ | ||
2762 | 646 | $(distuninstallcheck_listfiles) ; \ | ||
2763 | 647 | exit 1; } >&2 | ||
2764 | 648 | distcleancheck: distclean | ||
2765 | 649 | @if test '$(srcdir)' = . ; then \ | ||
2766 | 650 | echo "ERROR: distcleancheck can only run from a VPATH build" ; \ | ||
2767 | 651 | exit 1 ; \ | ||
2768 | 652 | fi | ||
2769 | 653 | @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ | ||
2770 | 654 | || { echo "ERROR: files left in build directory after distclean:" ; \ | ||
2771 | 655 | $(distcleancheck_listfiles) ; \ | ||
2772 | 656 | exit 1; } >&2 | ||
2773 | 657 | check-am: all-am | ||
2774 | 658 | check: check-recursive | ||
2775 | 659 | all-am: Makefile config.h | ||
2776 | 660 | installdirs: installdirs-recursive | ||
2777 | 661 | installdirs-am: | ||
2778 | 662 | install: install-recursive | ||
2779 | 663 | install-exec: install-exec-recursive | ||
2780 | 664 | install-data: install-data-recursive | ||
2781 | 665 | uninstall: uninstall-recursive | ||
2782 | 666 | |||
2783 | 667 | install-am: all-am | ||
2784 | 668 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
2785 | 669 | |||
2786 | 670 | installcheck: installcheck-recursive | ||
2787 | 671 | install-strip: | ||
2788 | 672 | if test -z '$(STRIP)'; then \ | ||
2789 | 673 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
2790 | 674 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
2791 | 675 | install; \ | ||
2792 | 676 | else \ | ||
2793 | 677 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
2794 | 678 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
2795 | 679 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ | ||
2796 | 680 | fi | ||
2797 | 681 | mostlyclean-generic: | ||
2798 | 682 | |||
2799 | 683 | clean-generic: | ||
2800 | 684 | |||
2801 | 685 | distclean-generic: | ||
2802 | 686 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
2803 | 687 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | ||
2804 | 688 | |||
2805 | 689 | maintainer-clean-generic: | ||
2806 | 690 | @echo "This command is intended for maintainers to use" | ||
2807 | 691 | @echo "it deletes files that may require special tools to rebuild." | ||
2808 | 692 | clean: clean-recursive | ||
2809 | 693 | |||
2810 | 694 | clean-am: clean-generic mostlyclean-am | ||
2811 | 695 | |||
2812 | 696 | distclean: distclean-recursive | ||
2813 | 697 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) | ||
2814 | 698 | -rm -f Makefile | ||
2815 | 699 | distclean-am: clean-am distclean-generic distclean-hdr distclean-tags | ||
2816 | 700 | |||
2817 | 701 | dvi: dvi-recursive | ||
2818 | 702 | |||
2819 | 703 | dvi-am: | ||
2820 | 704 | |||
2821 | 705 | html: html-recursive | ||
2822 | 706 | |||
2823 | 707 | html-am: | ||
2824 | 708 | |||
2825 | 709 | info: info-recursive | ||
2826 | 710 | |||
2827 | 711 | info-am: | ||
2828 | 712 | |||
2829 | 713 | install-data-am: install-data-local | ||
2830 | 714 | |||
2831 | 715 | install-dvi: install-dvi-recursive | ||
2832 | 716 | |||
2833 | 717 | install-dvi-am: | ||
2834 | 718 | |||
2835 | 719 | install-exec-am: | ||
2836 | 720 | |||
2837 | 721 | install-html: install-html-recursive | ||
2838 | 722 | |||
2839 | 723 | install-html-am: | ||
2840 | 724 | |||
2841 | 725 | install-info: install-info-recursive | ||
2842 | 726 | |||
2843 | 727 | install-info-am: | ||
2844 | 728 | |||
2845 | 729 | install-man: | ||
2846 | 730 | |||
2847 | 731 | install-pdf: install-pdf-recursive | ||
2848 | 732 | |||
2849 | 733 | install-pdf-am: | ||
2850 | 734 | |||
2851 | 735 | install-ps: install-ps-recursive | ||
2852 | 736 | |||
2853 | 737 | install-ps-am: | ||
2854 | 738 | |||
2855 | 739 | installcheck-am: | ||
2856 | 740 | |||
2857 | 741 | maintainer-clean: maintainer-clean-recursive | ||
2858 | 742 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) | ||
2859 | 743 | -rm -rf $(top_srcdir)/autom4te.cache | ||
2860 | 744 | -rm -f Makefile | ||
2861 | 745 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
2862 | 746 | |||
2863 | 747 | mostlyclean: mostlyclean-recursive | ||
2864 | 748 | |||
2865 | 749 | mostlyclean-am: mostlyclean-generic | ||
2866 | 750 | |||
2867 | 751 | pdf: pdf-recursive | ||
2868 | 752 | |||
2869 | 753 | pdf-am: | ||
2870 | 754 | |||
2871 | 755 | ps: ps-recursive | ||
2872 | 756 | |||
2873 | 757 | ps-am: | ||
2874 | 758 | |||
2875 | 759 | uninstall-am: | ||
2876 | 760 | |||
2877 | 761 | .MAKE: $(am__recursive_targets) all install-am install-strip | ||
2878 | 762 | |||
2879 | 763 | .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ | ||
2880 | 764 | am--refresh check check-am clean clean-cscope clean-generic \ | ||
2881 | 765 | cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ | ||
2882 | 766 | dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ | ||
2883 | 767 | distcheck distclean distclean-generic distclean-hdr \ | ||
2884 | 768 | distclean-tags distcleancheck distdir distuninstallcheck dvi \ | ||
2885 | 769 | dvi-am html html-am info info-am install install-am \ | ||
2886 | 770 | install-data install-data-am install-data-local install-dvi \ | ||
2887 | 771 | install-dvi-am install-exec install-exec-am install-html \ | ||
2888 | 772 | install-html-am install-info install-info-am install-man \ | ||
2889 | 773 | install-pdf install-pdf-am install-ps install-ps-am \ | ||
2890 | 774 | install-strip installcheck installcheck-am installdirs \ | ||
2891 | 775 | installdirs-am maintainer-clean maintainer-clean-generic \ | ||
2892 | 776 | mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ | ||
2893 | 777 | tags-am uninstall uninstall-am | ||
2894 | 778 | |||
2895 | 779 | |||
2896 | 780 | # Install BFD include file, and others that it needs. | ||
2897 | 781 | #install-data-local: | ||
2898 | 782 | # @$(NORMAL_INSTALL) | ||
2899 | 783 | # $(mkinstalldirs) $(sysconfdir) | ||
2900 | 784 | # $(INSTALL_DATA)sagan.conf $(sysconfdir)/sagan.conf | ||
2901 | 785 | |||
2902 | 786 | install-data-local: | ||
2903 | 787 | test -z "$(DESTDIR)$(sysconfdir)" || /bin/mkdir -p "$(DESTDIR)$(sysconfdir)" | ||
2904 | 788 | test -f "$(DESTDIR)$(sysconfdir)/sagan.conf" || $(INSTALL_DATA) etc/sagan.conf "$(DESTDIR)$(sysconfdir)/sagan.conf" | ||
2905 | 789 | test -z "$(DESTDIR)$(sbindir)" || /bin/mkdir -p "$(DESTDIR)$(sbindir)" | ||
2906 | 790 | $(INSTALL) -d "$(DESTDIR)$(mandir)/man8" | ||
2907 | 791 | $(INSTALL) -m 644 etc/sagan.8 "$(DESTDIR)$(mandir)/man8" | ||
2908 | 792 | $(INSTALL) -m 755 src/sagan "$(DESTDIR)$(sbindir)/sagan" | ||
2909 | 793 | $(INSTALL) -d "$(DESTDIR)/var/log/sagan" | ||
2910 | 794 | $(INSTALL) -d "$(DESTDIR)/var/run/sagan" | ||
2911 | 795 | @echo "" | ||
2912 | 796 | @echo "------------------------------------------------------------------------------" | ||
2913 | 797 | @echo "Sagan has been installed! You still need to do a few more things before your" | ||
2914 | 798 | @echo "up and running. For more information, see:" | ||
2915 | 799 | @echo "https://wiki.quadrantsec.com/twiki/bin/view/Main/SaganInstall" | ||
2916 | 800 | @echo "------------------------------------------------------------------------------" | ||
2917 | 801 | @echo "" | ||
2918 | 802 | |||
2919 | 803 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
2920 | 804 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
2921 | 805 | .NOEXPORT: | ||
2922 | 0 | 806 | ||
2923 | === modified file 'Makefile.am' | |||
2924 | --- Makefile.am 2011-12-17 16:04:27 +0000 | |||
2925 | +++ Makefile.am 2014-11-22 20:03:11 +0000 | |||
2926 | @@ -21,8 +21,8 @@ | |||
2927 | 21 | @echo "" | 21 | @echo "" |
2928 | 22 | @echo "------------------------------------------------------------------------------" | 22 | @echo "------------------------------------------------------------------------------" |
2929 | 23 | @echo "Sagan has been installed! You still need to do a few more things before your" | 23 | @echo "Sagan has been installed! You still need to do a few more things before your" |
2932 | 24 | @echo "up and running. See https://wiki.quadrantsec.com/bin/view/Main/SaganHOWTO for" | 24 | @echo "up and running. For more information, see:" |
2933 | 25 | @echo "more information." | 25 | @echo "https://wiki.quadrantsec.com/twiki/bin/view/Main/SaganInstall" |
2934 | 26 | @echo "------------------------------------------------------------------------------" | 26 | @echo "------------------------------------------------------------------------------" |
2935 | 27 | @echo "" | 27 | @echo "" |
2936 | 28 | 28 | ||
2937 | 29 | 29 | ||
2938 | === modified file 'Makefile.in' | |||
2939 | --- Makefile.in 2011-12-17 16:04:27 +0000 | |||
2940 | +++ Makefile.in 2014-11-22 20:03:11 +0000 | |||
2941 | @@ -1,9 +1,8 @@ | |||
2943 | 1 | # Makefile.in generated by automake 1.11.1 from Makefile.am. | 1 | # Makefile.in generated by automake 1.14.1 from Makefile.am. |
2944 | 2 | # @configure_input@ | 2 | # @configure_input@ |
2945 | 3 | 3 | ||
2949 | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | 4 | # Copyright (C) 1994-2013 Free Software Foundation, Inc. |
2950 | 5 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, | 5 | |
2948 | 6 | # Inc. | ||
2951 | 7 | # This Makefile.in is free software; the Free Software Foundation | 6 | # This Makefile.in is free software; the Free Software Foundation |
2952 | 8 | # gives unlimited permission to copy and/or distribute it, | 7 | # gives unlimited permission to copy and/or distribute it, |
2953 | 9 | # with or without modifications, as long as this notice is preserved. | 8 | # with or without modifications, as long as this notice is preserved. |
2954 | @@ -15,6 +14,51 @@ | |||
2955 | 15 | 14 | ||
2956 | 16 | @SET_MAKE@ | 15 | @SET_MAKE@ |
2957 | 17 | VPATH = @srcdir@ | 16 | VPATH = @srcdir@ |
2958 | 17 | am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' | ||
2959 | 18 | am__make_running_with_option = \ | ||
2960 | 19 | case $${target_option-} in \ | ||
2961 | 20 | ?) ;; \ | ||
2962 | 21 | *) echo "am__make_running_with_option: internal error: invalid" \ | ||
2963 | 22 | "target option '$${target_option-}' specified" >&2; \ | ||
2964 | 23 | exit 1;; \ | ||
2965 | 24 | esac; \ | ||
2966 | 25 | has_opt=no; \ | ||
2967 | 26 | sane_makeflags=$$MAKEFLAGS; \ | ||
2968 | 27 | if $(am__is_gnu_make); then \ | ||
2969 | 28 | sane_makeflags=$$MFLAGS; \ | ||
2970 | 29 | else \ | ||
2971 | 30 | case $$MAKEFLAGS in \ | ||
2972 | 31 | *\\[\ \ ]*) \ | ||
2973 | 32 | bs=\\; \ | ||
2974 | 33 | sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | ||
2975 | 34 | | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ | ||
2976 | 35 | esac; \ | ||
2977 | 36 | fi; \ | ||
2978 | 37 | skip_next=no; \ | ||
2979 | 38 | strip_trailopt () \ | ||
2980 | 39 | { \ | ||
2981 | 40 | flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ | ||
2982 | 41 | }; \ | ||
2983 | 42 | for flg in $$sane_makeflags; do \ | ||
2984 | 43 | test $$skip_next = yes && { skip_next=no; continue; }; \ | ||
2985 | 44 | case $$flg in \ | ||
2986 | 45 | *=*|--*) continue;; \ | ||
2987 | 46 | -*I) strip_trailopt 'I'; skip_next=yes;; \ | ||
2988 | 47 | -*I?*) strip_trailopt 'I';; \ | ||
2989 | 48 | -*O) strip_trailopt 'O'; skip_next=yes;; \ | ||
2990 | 49 | -*O?*) strip_trailopt 'O';; \ | ||
2991 | 50 | -*l) strip_trailopt 'l'; skip_next=yes;; \ | ||
2992 | 51 | -*l?*) strip_trailopt 'l';; \ | ||
2993 | 52 | -[dEDm]) skip_next=yes;; \ | ||
2994 | 53 | -[JT]) skip_next=yes;; \ | ||
2995 | 54 | esac; \ | ||
2996 | 55 | case $$flg in \ | ||
2997 | 56 | *$$target_option*) has_opt=yes; break;; \ | ||
2998 | 57 | esac; \ | ||
2999 | 58 | done; \ | ||
3000 | 59 | test $$has_opt = yes | ||
3001 | 60 | am__make_dryrun = (target_option=n; $(am__make_running_with_option)) | ||
3002 | 61 | am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) | ||
3003 | 18 | pkgdatadir = $(datadir)/@PACKAGE@ | 62 | pkgdatadir = $(datadir)/@PACKAGE@ |
3004 | 19 | pkgincludedir = $(includedir)/@PACKAGE@ | 63 | pkgincludedir = $(includedir)/@PACKAGE@ |
3005 | 20 | pkglibdir = $(libdir)/@PACKAGE@ | 64 | pkglibdir = $(libdir)/@PACKAGE@ |
3006 | @@ -35,12 +79,13 @@ | |||
3007 | 35 | host_triplet = @host@ | 79 | host_triplet = @host@ |
3008 | 36 | target_triplet = @target@ | 80 | target_triplet = @target@ |
3009 | 37 | subdir = . | 81 | subdir = . |
3014 | 38 | DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ | 82 | DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ |
3015 | 39 | $(srcdir)/Makefile.in $(srcdir)/config.h.in \ | 83 | $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ |
3016 | 40 | $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ | 84 | $(top_srcdir)/configure $(am__configure_deps) \ |
3017 | 41 | TODO config.guess config.sub depcomp install-sh missing | 85 | $(srcdir)/config.h.in COPYING TODO compile config.guess \ |
3018 | 86 | config.sub depcomp install-sh missing | ||
3019 | 42 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | 87 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
3021 | 43 | am__aclocal_m4_deps = $(top_srcdir)/configure.in | 88 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac |
3022 | 44 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | 89 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ |
3023 | 45 | $(ACLOCAL_M4) | 90 | $(ACLOCAL_M4) |
3024 | 46 | am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ | 91 | am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ |
3025 | @@ -49,30 +94,73 @@ | |||
3026 | 49 | CONFIG_HEADER = config.h | 94 | CONFIG_HEADER = config.h |
3027 | 50 | CONFIG_CLEAN_FILES = | 95 | CONFIG_CLEAN_FILES = |
3028 | 51 | CONFIG_CLEAN_VPATH_FILES = | 96 | CONFIG_CLEAN_VPATH_FILES = |
3029 | 97 | AM_V_P = $(am__v_P_@AM_V@) | ||
3030 | 98 | am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) | ||
3031 | 99 | am__v_P_0 = false | ||
3032 | 100 | am__v_P_1 = : | ||
3033 | 101 | AM_V_GEN = $(am__v_GEN_@AM_V@) | ||
3034 | 102 | am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) | ||
3035 | 103 | am__v_GEN_0 = @echo " GEN " $@; | ||
3036 | 104 | am__v_GEN_1 = | ||
3037 | 105 | AM_V_at = $(am__v_at_@AM_V@) | ||
3038 | 106 | am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) | ||
3039 | 107 | am__v_at_0 = @ | ||
3040 | 108 | am__v_at_1 = | ||
3041 | 52 | SOURCES = | 109 | SOURCES = |
3042 | 53 | DIST_SOURCES = | 110 | DIST_SOURCES = |
3050 | 54 | RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ | 111 | RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ |
3051 | 55 | html-recursive info-recursive install-data-recursive \ | 112 | ctags-recursive dvi-recursive html-recursive info-recursive \ |
3052 | 56 | install-dvi-recursive install-exec-recursive \ | 113 | install-data-recursive install-dvi-recursive \ |
3053 | 57 | install-html-recursive install-info-recursive \ | 114 | install-exec-recursive install-html-recursive \ |
3054 | 58 | install-pdf-recursive install-ps-recursive install-recursive \ | 115 | install-info-recursive install-pdf-recursive \ |
3055 | 59 | installcheck-recursive installdirs-recursive pdf-recursive \ | 116 | install-ps-recursive install-recursive installcheck-recursive \ |
3056 | 60 | ps-recursive uninstall-recursive | 117 | installdirs-recursive pdf-recursive ps-recursive \ |
3057 | 118 | tags-recursive uninstall-recursive | ||
3058 | 119 | am__can_run_installinfo = \ | ||
3059 | 120 | case $$AM_UPDATE_INFO_DIR in \ | ||
3060 | 121 | n|no|NO) false;; \ | ||
3061 | 122 | *) (install-info --version) >/dev/null 2>&1;; \ | ||
3062 | 123 | esac | ||
3063 | 61 | RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ | 124 | RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ |
3064 | 62 | distclean-recursive maintainer-clean-recursive | 125 | distclean-recursive maintainer-clean-recursive |
3068 | 63 | AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ | 126 | am__recursive_targets = \ |
3069 | 64 | $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ | 127 | $(RECURSIVE_TARGETS) \ |
3070 | 65 | distdir dist dist-all distcheck | 128 | $(RECURSIVE_CLEAN_TARGETS) \ |
3071 | 129 | $(am__extra_recursive_targets) | ||
3072 | 130 | AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ | ||
3073 | 131 | cscope distdir dist dist-all distcheck | ||
3074 | 132 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ | ||
3075 | 133 | $(LISP)config.h.in | ||
3076 | 134 | # Read a list of newline-separated strings from the standard input, | ||
3077 | 135 | # and print each of them once, without duplicates. Input order is | ||
3078 | 136 | # *not* preserved. | ||
3079 | 137 | am__uniquify_input = $(AWK) '\ | ||
3080 | 138 | BEGIN { nonempty = 0; } \ | ||
3081 | 139 | { items[$$0] = 1; nonempty = 1; } \ | ||
3082 | 140 | END { if (nonempty) { for (i in items) print i; }; } \ | ||
3083 | 141 | ' | ||
3084 | 142 | # Make sure the list of sources is unique. This is necessary because, | ||
3085 | 143 | # e.g., the same source file might be shared among _SOURCES variables | ||
3086 | 144 | # for different programs/libraries. | ||
3087 | 145 | am__define_uniq_tagged_files = \ | ||
3088 | 146 | list='$(am__tagged_files)'; \ | ||
3089 | 147 | unique=`for i in $$list; do \ | ||
3090 | 148 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
3091 | 149 | done | $(am__uniquify_input)` | ||
3092 | 66 | ETAGS = etags | 150 | ETAGS = etags |
3093 | 67 | CTAGS = ctags | 151 | CTAGS = ctags |
3094 | 152 | CSCOPE = cscope | ||
3095 | 68 | DIST_SUBDIRS = $(SUBDIRS) | 153 | DIST_SUBDIRS = $(SUBDIRS) |
3096 | 69 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | 154 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) |
3097 | 70 | distdir = $(PACKAGE)-$(VERSION) | 155 | distdir = $(PACKAGE)-$(VERSION) |
3098 | 71 | top_distdir = $(distdir) | 156 | top_distdir = $(distdir) |
3099 | 72 | am__remove_distdir = \ | 157 | am__remove_distdir = \ |
3103 | 73 | { test ! -d "$(distdir)" \ | 158 | if test -d "$(distdir)"; then \ |
3104 | 74 | || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ | 159 | find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ |
3105 | 75 | && rm -fr "$(distdir)"; }; } | 160 | && rm -rf "$(distdir)" \ |
3106 | 161 | || { sleep 5 && rm -rf "$(distdir)"; }; \ | ||
3107 | 162 | else :; fi | ||
3108 | 163 | am__post_remove_distdir = $(am__remove_distdir) | ||
3109 | 76 | am__relativize = \ | 164 | am__relativize = \ |
3110 | 77 | dir0=`pwd`; \ | 165 | dir0=`pwd`; \ |
3111 | 78 | sed_first='s,^\([^/]*\)/.*$$,\1,'; \ | 166 | sed_first='s,^\([^/]*\)/.*$$,\1,'; \ |
3112 | @@ -100,10 +188,14 @@ | |||
3113 | 100 | reldir="$$dir2" | 188 | reldir="$$dir2" |
3114 | 101 | DIST_ARCHIVES = $(distdir).tar.gz | 189 | DIST_ARCHIVES = $(distdir).tar.gz |
3115 | 102 | GZIP_ENV = --best | 190 | GZIP_ENV = --best |
3116 | 191 | DIST_TARGETS = dist-gzip | ||
3117 | 103 | distuninstallcheck_listfiles = find . -type f -print | 192 | distuninstallcheck_listfiles = find . -type f -print |
3118 | 193 | am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | ||
3119 | 194 | | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' | ||
3120 | 104 | distcleancheck_listfiles = find . -type f -print | 195 | distcleancheck_listfiles = find . -type f -print |
3121 | 105 | ACLOCAL = @ACLOCAL@ | 196 | ACLOCAL = @ACLOCAL@ |
3122 | 106 | AMTAR = @AMTAR@ | 197 | AMTAR = @AMTAR@ |
3123 | 198 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ | ||
3124 | 107 | AUTOCONF = @AUTOCONF@ | 199 | AUTOCONF = @AUTOCONF@ |
3125 | 108 | AUTOHEADER = @AUTOHEADER@ | 200 | AUTOHEADER = @AUTOHEADER@ |
3126 | 109 | AUTOMAKE = @AUTOMAKE@ | 201 | AUTOMAKE = @AUTOMAKE@ |
3127 | @@ -128,10 +220,17 @@ | |||
3128 | 128 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | 220 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
3129 | 129 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | 221 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
3130 | 130 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | 222 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ |
3131 | 223 | JSON_C_CFLAGS = @JSON_C_CFLAGS@ | ||
3132 | 224 | JSON_C_LIBS = @JSON_C_LIBS@ | ||
3133 | 131 | LDFLAGS = @LDFLAGS@ | 225 | LDFLAGS = @LDFLAGS@ |
3134 | 226 | LIBESTR_CFLAGS = @LIBESTR_CFLAGS@ | ||
3135 | 227 | LIBESTR_LIBS = @LIBESTR_LIBS@ | ||
3136 | 228 | LIBLOGNORM_CFLAGS = @LIBLOGNORM_CFLAGS@ | ||
3137 | 229 | LIBLOGNORM_LIBS = @LIBLOGNORM_LIBS@ | ||
3138 | 132 | LIBOBJS = @LIBOBJS@ | 230 | LIBOBJS = @LIBOBJS@ |
3139 | 133 | LIBS = @LIBS@ | 231 | LIBS = @LIBS@ |
3140 | 134 | LTLIBOBJS = @LTLIBOBJS@ | 232 | LTLIBOBJS = @LTLIBOBJS@ |
3141 | 233 | MAINT = @MAINT@ | ||
3142 | 135 | MAKEINFO = @MAKEINFO@ | 234 | MAKEINFO = @MAKEINFO@ |
3143 | 136 | MKDIR_P = @MKDIR_P@ | 235 | MKDIR_P = @MKDIR_P@ |
3144 | 137 | OBJEXT = @OBJEXT@ | 236 | OBJEXT = @OBJEXT@ |
3145 | @@ -143,6 +242,9 @@ | |||
3146 | 143 | PACKAGE_URL = @PACKAGE_URL@ | 242 | PACKAGE_URL = @PACKAGE_URL@ |
3147 | 144 | PACKAGE_VERSION = @PACKAGE_VERSION@ | 243 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
3148 | 145 | PATH_SEPARATOR = @PATH_SEPARATOR@ | 244 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
3149 | 245 | PKG_CONFIG = @PKG_CONFIG@ | ||
3150 | 246 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
3151 | 247 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
3152 | 146 | SET_MAKE = @SET_MAKE@ | 248 | SET_MAKE = @SET_MAKE@ |
3153 | 147 | SHELL = @SHELL@ | 249 | SHELL = @SHELL@ |
3154 | 148 | STRIP = @STRIP@ | 250 | STRIP = @STRIP@ |
3155 | @@ -208,9 +310,9 @@ | |||
3156 | 208 | $(MAKE) $(AM_MAKEFLAGS) all-recursive | 310 | $(MAKE) $(AM_MAKEFLAGS) all-recursive |
3157 | 209 | 311 | ||
3158 | 210 | .SUFFIXES: | 312 | .SUFFIXES: |
3160 | 211 | am--refresh: | 313 | am--refresh: Makefile |
3161 | 212 | @: | 314 | @: |
3163 | 213 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | 315 | $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) |
3164 | 214 | @for dep in $?; do \ | 316 | @for dep in $?; do \ |
3165 | 215 | case '$(am__configure_deps)' in \ | 317 | case '$(am__configure_deps)' in \ |
3166 | 216 | *$$dep*) \ | 318 | *$$dep*) \ |
3167 | @@ -237,22 +339,20 @@ | |||
3168 | 237 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | 339 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) |
3169 | 238 | $(SHELL) ./config.status --recheck | 340 | $(SHELL) ./config.status --recheck |
3170 | 239 | 341 | ||
3172 | 240 | $(top_srcdir)/configure: $(am__configure_deps) | 342 | $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) |
3173 | 241 | $(am__cd) $(srcdir) && $(AUTOCONF) | 343 | $(am__cd) $(srcdir) && $(AUTOCONF) |
3175 | 242 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | 344 | $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) |
3176 | 243 | $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) | 345 | $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) |
3177 | 244 | $(am__aclocal_m4_deps): | 346 | $(am__aclocal_m4_deps): |
3178 | 245 | 347 | ||
3179 | 246 | config.h: stamp-h1 | 348 | config.h: stamp-h1 |
3184 | 247 | @if test ! -f $@; then \ | 349 | @test -f $@ || rm -f stamp-h1 |
3185 | 248 | rm -f stamp-h1; \ | 350 | @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 |
3182 | 249 | $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ | ||
3183 | 250 | else :; fi | ||
3186 | 251 | 351 | ||
3187 | 252 | stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status | 352 | stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status |
3188 | 253 | @rm -f stamp-h1 | 353 | @rm -f stamp-h1 |
3189 | 254 | cd $(top_builddir) && $(SHELL) ./config.status config.h | 354 | cd $(top_builddir) && $(SHELL) ./config.status config.h |
3191 | 255 | $(srcdir)/config.h.in: $(am__configure_deps) | 355 | $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) |
3192 | 256 | ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) | 356 | ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) |
3193 | 257 | rm -f stamp-h1 | 357 | rm -f stamp-h1 |
3194 | 258 | touch $@ | 358 | touch $@ |
3195 | @@ -261,22 +361,25 @@ | |||
3196 | 261 | -rm -f config.h stamp-h1 | 361 | -rm -f config.h stamp-h1 |
3197 | 262 | 362 | ||
3198 | 263 | # This directory's subdirectories are mostly independent; you can cd | 363 | # This directory's subdirectories are mostly independent; you can cd |
3212 | 264 | # into them and run `make' without going through this Makefile. | 364 | # into them and run 'make' without going through this Makefile. |
3213 | 265 | # To change the values of `make' variables: instead of editing Makefiles, | 365 | # To change the values of 'make' variables: instead of editing Makefiles, |
3214 | 266 | # (1) if the variable is set in `config.status', edit `config.status' | 366 | # (1) if the variable is set in 'config.status', edit 'config.status' |
3215 | 267 | # (which will cause the Makefiles to be regenerated when you run `make'); | 367 | # (which will cause the Makefiles to be regenerated when you run 'make'); |
3216 | 268 | # (2) otherwise, pass the desired values on the `make' command line. | 368 | # (2) otherwise, pass the desired values on the 'make' command line. |
3217 | 269 | $(RECURSIVE_TARGETS): | 369 | $(am__recursive_targets): |
3218 | 270 | @fail= failcom='exit 1'; \ | 370 | @fail=; \ |
3219 | 271 | for f in x $$MAKEFLAGS; do \ | 371 | if $(am__make_keepgoing); then \ |
3220 | 272 | case $$f in \ | 372 | failcom='fail=yes'; \ |
3221 | 273 | *=* | --[!k]*);; \ | 373 | else \ |
3222 | 274 | *k*) failcom='fail=yes';; \ | 374 | failcom='exit 1'; \ |
3223 | 275 | esac; \ | 375 | fi; \ |
3211 | 276 | done; \ | ||
3224 | 277 | dot_seen=no; \ | 376 | dot_seen=no; \ |
3225 | 278 | target=`echo $@ | sed s/-recursive//`; \ | 377 | target=`echo $@ | sed s/-recursive//`; \ |
3227 | 279 | list='$(SUBDIRS)'; for subdir in $$list; do \ | 378 | case "$@" in \ |
3228 | 379 | distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ | ||
3229 | 380 | *) list='$(SUBDIRS)' ;; \ | ||
3230 | 381 | esac; \ | ||
3231 | 382 | for subdir in $$list; do \ | ||
3232 | 280 | echo "Making $$target in $$subdir"; \ | 383 | echo "Making $$target in $$subdir"; \ |
3233 | 281 | if test "$$subdir" = "."; then \ | 384 | if test "$$subdir" = "."; then \ |
3234 | 282 | dot_seen=yes; \ | 385 | dot_seen=yes; \ |
3235 | @@ -291,57 +394,12 @@ | |||
3236 | 291 | $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ | 394 | $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ |
3237 | 292 | fi; test -z "$$fail" | 395 | fi; test -z "$$fail" |
3238 | 293 | 396 | ||
3290 | 294 | $(RECURSIVE_CLEAN_TARGETS): | 397 | ID: $(am__tagged_files) |
3291 | 295 | @fail= failcom='exit 1'; \ | 398 | $(am__define_uniq_tagged_files); mkid -fID $$unique |
3292 | 296 | for f in x $$MAKEFLAGS; do \ | 399 | tags: tags-recursive |
3293 | 297 | case $$f in \ | 400 | TAGS: tags |
3294 | 298 | *=* | --[!k]*);; \ | 401 | |
3295 | 299 | *k*) failcom='fail=yes';; \ | 402 | tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) |
3245 | 300 | esac; \ | ||
3246 | 301 | done; \ | ||
3247 | 302 | dot_seen=no; \ | ||
3248 | 303 | case "$@" in \ | ||
3249 | 304 | distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ | ||
3250 | 305 | *) list='$(SUBDIRS)' ;; \ | ||
3251 | 306 | esac; \ | ||
3252 | 307 | rev=''; for subdir in $$list; do \ | ||
3253 | 308 | if test "$$subdir" = "."; then :; else \ | ||
3254 | 309 | rev="$$subdir $$rev"; \ | ||
3255 | 310 | fi; \ | ||
3256 | 311 | done; \ | ||
3257 | 312 | rev="$$rev ."; \ | ||
3258 | 313 | target=`echo $@ | sed s/-recursive//`; \ | ||
3259 | 314 | for subdir in $$rev; do \ | ||
3260 | 315 | echo "Making $$target in $$subdir"; \ | ||
3261 | 316 | if test "$$subdir" = "."; then \ | ||
3262 | 317 | local_target="$$target-am"; \ | ||
3263 | 318 | else \ | ||
3264 | 319 | local_target="$$target"; \ | ||
3265 | 320 | fi; \ | ||
3266 | 321 | ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ | ||
3267 | 322 | || eval $$failcom; \ | ||
3268 | 323 | done && test -z "$$fail" | ||
3269 | 324 | tags-recursive: | ||
3270 | 325 | list='$(SUBDIRS)'; for subdir in $$list; do \ | ||
3271 | 326 | test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ | ||
3272 | 327 | done | ||
3273 | 328 | ctags-recursive: | ||
3274 | 329 | list='$(SUBDIRS)'; for subdir in $$list; do \ | ||
3275 | 330 | test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ | ||
3276 | 331 | done | ||
3277 | 332 | |||
3278 | 333 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
3279 | 334 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
3280 | 335 | unique=`for i in $$list; do \ | ||
3281 | 336 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
3282 | 337 | done | \ | ||
3283 | 338 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
3284 | 339 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
3285 | 340 | mkid -fID $$unique | ||
3286 | 341 | tags: TAGS | ||
3287 | 342 | |||
3288 | 343 | TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ | ||
3289 | 344 | $(TAGS_FILES) $(LISP) | ||
3296 | 345 | set x; \ | 403 | set x; \ |
3297 | 346 | here=`pwd`; \ | 404 | here=`pwd`; \ |
3298 | 347 | if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ | 405 | if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ |
3299 | @@ -357,12 +415,7 @@ | |||
3300 | 357 | set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ | 415 | set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ |
3301 | 358 | fi; \ | 416 | fi; \ |
3302 | 359 | done; \ | 417 | done; \ |
3309 | 360 | list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ | 418 | $(am__define_uniq_tagged_files); \ |
3304 | 361 | unique=`for i in $$list; do \ | ||
3305 | 362 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
3306 | 363 | done | \ | ||
3307 | 364 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
3308 | 365 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
3310 | 366 | shift; \ | 419 | shift; \ |
3311 | 367 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ | 420 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ |
3312 | 368 | test -n "$$unique" || unique=$$empty_fix; \ | 421 | test -n "$$unique" || unique=$$empty_fix; \ |
3313 | @@ -374,15 +427,11 @@ | |||
3314 | 374 | $$unique; \ | 427 | $$unique; \ |
3315 | 375 | fi; \ | 428 | fi; \ |
3316 | 376 | fi | 429 | fi |
3326 | 377 | ctags: CTAGS | 430 | ctags: ctags-recursive |
3327 | 378 | CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ | 431 | |
3328 | 379 | $(TAGS_FILES) $(LISP) | 432 | CTAGS: ctags |
3329 | 380 | list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ | 433 | ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) |
3330 | 381 | unique=`for i in $$list; do \ | 434 | $(am__define_uniq_tagged_files); \ |
3322 | 382 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
3323 | 383 | done | \ | ||
3324 | 384 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
3325 | 385 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
3331 | 386 | test -z "$(CTAGS_ARGS)$$unique" \ | 435 | test -z "$(CTAGS_ARGS)$$unique" \ |
3332 | 387 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | 436 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ |
3333 | 388 | $$unique | 437 | $$unique |
3334 | @@ -391,9 +440,31 @@ | |||
3335 | 391 | here=`$(am__cd) $(top_builddir) && pwd` \ | 440 | here=`$(am__cd) $(top_builddir) && pwd` \ |
3336 | 392 | && $(am__cd) $(top_srcdir) \ | 441 | && $(am__cd) $(top_srcdir) \ |
3337 | 393 | && gtags -i $(GTAGS_ARGS) "$$here" | 442 | && gtags -i $(GTAGS_ARGS) "$$here" |
3338 | 443 | cscope: cscope.files | ||
3339 | 444 | test ! -s cscope.files \ | ||
3340 | 445 | || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) | ||
3341 | 446 | clean-cscope: | ||
3342 | 447 | -rm -f cscope.files | ||
3343 | 448 | cscope.files: clean-cscope cscopelist | ||
3344 | 449 | cscopelist: cscopelist-recursive | ||
3345 | 450 | |||
3346 | 451 | cscopelist-am: $(am__tagged_files) | ||
3347 | 452 | list='$(am__tagged_files)'; \ | ||
3348 | 453 | case "$(srcdir)" in \ | ||
3349 | 454 | [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ | ||
3350 | 455 | *) sdir=$(subdir)/$(srcdir) ;; \ | ||
3351 | 456 | esac; \ | ||
3352 | 457 | for i in $$list; do \ | ||
3353 | 458 | if test -f "$$i"; then \ | ||
3354 | 459 | echo "$(subdir)/$$i"; \ | ||
3355 | 460 | else \ | ||
3356 | 461 | echo "$$sdir/$$i"; \ | ||
3357 | 462 | fi; \ | ||
3358 | 463 | done >> $(top_builddir)/cscope.files | ||
3359 | 394 | 464 | ||
3360 | 395 | distclean-tags: | 465 | distclean-tags: |
3361 | 396 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | 466 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags |
3362 | 467 | -rm -f cscope.out cscope.in.out cscope.po.out cscope.files | ||
3363 | 397 | 468 | ||
3364 | 398 | distdir: $(DISTFILES) | 469 | distdir: $(DISTFILES) |
3365 | 399 | $(am__remove_distdir) | 470 | $(am__remove_distdir) |
3366 | @@ -429,13 +500,10 @@ | |||
3367 | 429 | done | 500 | done |
3368 | 430 | @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ | 501 | @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ |
3369 | 431 | if test "$$subdir" = .; then :; else \ | 502 | if test "$$subdir" = .; then :; else \ |
3377 | 432 | test -d "$(distdir)/$$subdir" \ | 503 | $(am__make_dryrun) \ |
3378 | 433 | || $(MKDIR_P) "$(distdir)/$$subdir" \ | 504 | || test -d "$(distdir)/$$subdir" \ |
3379 | 434 | || exit 1; \ | 505 | || $(MKDIR_P) "$(distdir)/$$subdir" \ |
3380 | 435 | fi; \ | 506 | || exit 1; \ |
3374 | 436 | done | ||
3375 | 437 | @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ | ||
3376 | 438 | if test "$$subdir" = .; then :; else \ | ||
3381 | 439 | dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ | 507 | dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ |
3382 | 440 | $(am__relativize); \ | 508 | $(am__relativize); \ |
3383 | 441 | new_distdir=$$reldir; \ | 509 | new_distdir=$$reldir; \ |
3384 | @@ -464,36 +532,42 @@ | |||
3385 | 464 | || chmod -R a+r "$(distdir)" | 532 | || chmod -R a+r "$(distdir)" |
3386 | 465 | dist-gzip: distdir | 533 | dist-gzip: distdir |
3387 | 466 | tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz | 534 | tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz |
3389 | 467 | $(am__remove_distdir) | 535 | $(am__post_remove_distdir) |
3390 | 468 | 536 | ||
3391 | 469 | dist-bzip2: distdir | 537 | dist-bzip2: distdir |
3394 | 470 | tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 | 538 | tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 |
3395 | 471 | $(am__remove_distdir) | 539 | $(am__post_remove_distdir) |
3396 | 472 | 540 | ||
3400 | 473 | dist-lzma: distdir | 541 | dist-lzip: distdir |
3401 | 474 | tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma | 542 | tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz |
3402 | 475 | $(am__remove_distdir) | 543 | $(am__post_remove_distdir) |
3403 | 476 | 544 | ||
3404 | 477 | dist-xz: distdir | 545 | dist-xz: distdir |
3407 | 478 | tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz | 546 | tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz |
3408 | 479 | $(am__remove_distdir) | 547 | $(am__post_remove_distdir) |
3409 | 480 | 548 | ||
3410 | 481 | dist-tarZ: distdir | 549 | dist-tarZ: distdir |
3411 | 550 | @echo WARNING: "Support for shar distribution archives is" \ | ||
3412 | 551 | "deprecated." >&2 | ||
3413 | 552 | @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 | ||
3414 | 482 | tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z | 553 | tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z |
3416 | 483 | $(am__remove_distdir) | 554 | $(am__post_remove_distdir) |
3417 | 484 | 555 | ||
3418 | 485 | dist-shar: distdir | 556 | dist-shar: distdir |
3419 | 557 | @echo WARNING: "Support for distribution archives compressed with" \ | ||
3420 | 558 | "legacy program 'compress' is deprecated." >&2 | ||
3421 | 559 | @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 | ||
3422 | 486 | shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz | 560 | shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz |
3424 | 487 | $(am__remove_distdir) | 561 | $(am__post_remove_distdir) |
3425 | 488 | 562 | ||
3426 | 489 | dist-zip: distdir | 563 | dist-zip: distdir |
3427 | 490 | -rm -f $(distdir).zip | 564 | -rm -f $(distdir).zip |
3428 | 491 | zip -rq $(distdir).zip $(distdir) | 565 | zip -rq $(distdir).zip $(distdir) |
3430 | 492 | $(am__remove_distdir) | 566 | $(am__post_remove_distdir) |
3431 | 493 | 567 | ||
3435 | 494 | dist dist-all: distdir | 568 | dist dist-all: |
3436 | 495 | tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz | 569 | $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' |
3437 | 496 | $(am__remove_distdir) | 570 | $(am__post_remove_distdir) |
3438 | 497 | 571 | ||
3439 | 498 | # This target untars the dist file and tries a VPATH configuration. Then | 572 | # This target untars the dist file and tries a VPATH configuration. Then |
3440 | 499 | # it guarantees that the distribution is self-contained by making another | 573 | # it guarantees that the distribution is self-contained by making another |
3441 | @@ -504,8 +578,8 @@ | |||
3442 | 504 | GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ | 578 | GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ |
3443 | 505 | *.tar.bz2*) \ | 579 | *.tar.bz2*) \ |
3444 | 506 | bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ | 580 | bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ |
3447 | 507 | *.tar.lzma*) \ | 581 | *.tar.lz*) \ |
3448 | 508 | lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ | 582 | lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ |
3449 | 509 | *.tar.xz*) \ | 583 | *.tar.xz*) \ |
3450 | 510 | xz -dc $(distdir).tar.xz | $(am__untar) ;;\ | 584 | xz -dc $(distdir).tar.xz | $(am__untar) ;;\ |
3451 | 511 | *.tar.Z*) \ | 585 | *.tar.Z*) \ |
3452 | @@ -515,17 +589,19 @@ | |||
3453 | 515 | *.zip*) \ | 589 | *.zip*) \ |
3454 | 516 | unzip $(distdir).zip ;;\ | 590 | unzip $(distdir).zip ;;\ |
3455 | 517 | esac | 591 | esac |
3459 | 518 | chmod -R a-w $(distdir); chmod a+w $(distdir) | 592 | chmod -R a-w $(distdir) |
3460 | 519 | mkdir $(distdir)/_build | 593 | chmod u+w $(distdir) |
3461 | 520 | mkdir $(distdir)/_inst | 594 | mkdir $(distdir)/_build $(distdir)/_inst |
3462 | 521 | chmod a-w $(distdir) | 595 | chmod a-w $(distdir) |
3463 | 522 | test -d $(distdir)/_build || exit 0; \ | 596 | test -d $(distdir)/_build || exit 0; \ |
3464 | 523 | dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ | 597 | dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ |
3465 | 524 | && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ | 598 | && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ |
3466 | 525 | && am__cwd=`pwd` \ | 599 | && am__cwd=`pwd` \ |
3467 | 526 | && $(am__cd) $(distdir)/_build \ | 600 | && $(am__cd) $(distdir)/_build \ |
3469 | 527 | && ../configure --srcdir=.. --prefix="$$dc_install_base" \ | 601 | && ../configure \ |
3470 | 602 | $(AM_DISTCHECK_CONFIGURE_FLAGS) \ | ||
3471 | 528 | $(DISTCHECK_CONFIGURE_FLAGS) \ | 603 | $(DISTCHECK_CONFIGURE_FLAGS) \ |
3472 | 604 | --srcdir=.. --prefix="$$dc_install_base" \ | ||
3473 | 529 | && $(MAKE) $(AM_MAKEFLAGS) \ | 605 | && $(MAKE) $(AM_MAKEFLAGS) \ |
3474 | 530 | && $(MAKE) $(AM_MAKEFLAGS) dvi \ | 606 | && $(MAKE) $(AM_MAKEFLAGS) dvi \ |
3475 | 531 | && $(MAKE) $(AM_MAKEFLAGS) check \ | 607 | && $(MAKE) $(AM_MAKEFLAGS) check \ |
3476 | @@ -548,13 +624,21 @@ | |||
3477 | 548 | && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ | 624 | && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ |
3478 | 549 | && cd "$$am__cwd" \ | 625 | && cd "$$am__cwd" \ |
3479 | 550 | || exit 1 | 626 | || exit 1 |
3481 | 551 | $(am__remove_distdir) | 627 | $(am__post_remove_distdir) |
3482 | 552 | @(echo "$(distdir) archives ready for distribution: "; \ | 628 | @(echo "$(distdir) archives ready for distribution: "; \ |
3483 | 553 | list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ | 629 | list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ |
3484 | 554 | sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' | 630 | sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' |
3485 | 555 | distuninstallcheck: | 631 | distuninstallcheck: |
3488 | 556 | @$(am__cd) '$(distuninstallcheck_dir)' \ | 632 | @test -n '$(distuninstallcheck_dir)' || { \ |
3489 | 557 | && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ | 633 | echo 'ERROR: trying to run $@ with an empty' \ |
3490 | 634 | '$$(distuninstallcheck_dir)' >&2; \ | ||
3491 | 635 | exit 1; \ | ||
3492 | 636 | }; \ | ||
3493 | 637 | $(am__cd) '$(distuninstallcheck_dir)' || { \ | ||
3494 | 638 | echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ | ||
3495 | 639 | exit 1; \ | ||
3496 | 640 | }; \ | ||
3497 | 641 | test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ | ||
3498 | 558 | || { echo "ERROR: files left after uninstall:" ; \ | 642 | || { echo "ERROR: files left after uninstall:" ; \ |
3499 | 559 | if test -n "$(DESTDIR)"; then \ | 643 | if test -n "$(DESTDIR)"; then \ |
3500 | 560 | echo " (check DESTDIR support)"; \ | 644 | echo " (check DESTDIR support)"; \ |
3501 | @@ -585,10 +669,15 @@ | |||
3502 | 585 | 669 | ||
3503 | 586 | installcheck: installcheck-recursive | 670 | installcheck: installcheck-recursive |
3504 | 587 | install-strip: | 671 | install-strip: |
3509 | 588 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | 672 | if test -z '$(STRIP)'; then \ |
3510 | 589 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | 673 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ |
3511 | 590 | `test -z '$(STRIP)' || \ | 674 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ |
3512 | 591 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | 675 | install; \ |
3513 | 676 | else \ | ||
3514 | 677 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
3515 | 678 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
3516 | 679 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ | ||
3517 | 680 | fi | ||
3518 | 592 | mostlyclean-generic: | 681 | mostlyclean-generic: |
3519 | 593 | 682 | ||
3520 | 594 | clean-generic: | 683 | clean-generic: |
3521 | @@ -669,24 +758,23 @@ | |||
3522 | 669 | 758 | ||
3523 | 670 | uninstall-am: | 759 | uninstall-am: |
3524 | 671 | 760 | ||
3527 | 672 | .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ | 761 | .MAKE: $(am__recursive_targets) all install-am install-strip |
3526 | 673 | ctags-recursive install-am install-strip tags-recursive | ||
3528 | 674 | 762 | ||
3544 | 675 | .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ | 763 | .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ |
3545 | 676 | all all-am am--refresh check check-am clean clean-generic \ | 764 | am--refresh check check-am clean clean-cscope clean-generic \ |
3546 | 677 | ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ | 765 | cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ |
3547 | 678 | dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \ | 766 | dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ |
3548 | 679 | distclean distclean-generic distclean-hdr distclean-tags \ | 767 | distcheck distclean distclean-generic distclean-hdr \ |
3549 | 680 | distcleancheck distdir distuninstallcheck dvi dvi-am html \ | 768 | distclean-tags distcleancheck distdir distuninstallcheck dvi \ |
3550 | 681 | html-am info info-am install install-am install-data \ | 769 | dvi-am html html-am info info-am install install-am \ |
3551 | 682 | install-data-am install-data-local install-dvi install-dvi-am \ | 770 | install-data install-data-am install-data-local install-dvi \ |
3552 | 683 | install-exec install-exec-am install-html install-html-am \ | 771 | install-dvi-am install-exec install-exec-am install-html \ |
3553 | 684 | install-info install-info-am install-man install-pdf \ | 772 | install-html-am install-info install-info-am install-man \ |
3554 | 685 | install-pdf-am install-ps install-ps-am install-strip \ | 773 | install-pdf install-pdf-am install-ps install-ps-am \ |
3555 | 686 | installcheck installcheck-am installdirs installdirs-am \ | 774 | install-strip installcheck installcheck-am installdirs \ |
3556 | 687 | maintainer-clean maintainer-clean-generic mostlyclean \ | 775 | installdirs-am maintainer-clean maintainer-clean-generic \ |
3557 | 688 | mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ | 776 | mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ |
3558 | 689 | uninstall uninstall-am | 777 | tags-am uninstall uninstall-am |
3559 | 690 | 778 | ||
3560 | 691 | 779 | ||
3561 | 692 | # Install BFD include file, and others that it needs. | 780 | # Install BFD include file, and others that it needs. |
3562 | @@ -707,8 +795,8 @@ | |||
3563 | 707 | @echo "" | 795 | @echo "" |
3564 | 708 | @echo "------------------------------------------------------------------------------" | 796 | @echo "------------------------------------------------------------------------------" |
3565 | 709 | @echo "Sagan has been installed! You still need to do a few more things before your" | 797 | @echo "Sagan has been installed! You still need to do a few more things before your" |
3568 | 710 | @echo "up and running. See https://wiki.quadrantsec.com/bin/view/Main/SaganHOWTO for" | 798 | @echo "up and running. For more information, see:" |
3569 | 711 | @echo "more information." | 799 | @echo "https://wiki.quadrantsec.com/twiki/bin/view/Main/SaganInstall" |
3570 | 712 | @echo "------------------------------------------------------------------------------" | 800 | @echo "------------------------------------------------------------------------------" |
3571 | 713 | @echo "" | 801 | @echo "" |
3572 | 714 | 802 | ||
3573 | 715 | 803 | ||
3574 | === modified file 'NEWS' | |||
3575 | --- NEWS 2011-12-17 16:04:27 +0000 | |||
3576 | +++ NEWS 2014-11-22 20:03:11 +0000 | |||
3577 | @@ -1,2 +1,1 @@ | |||
3580 | 1 | 1 | See http://sagan.quadrantsec.com | |
3579 | 2 | For News, see http://sagan.quadrantsec.com | ||
3581 | 3 | 2 | ||
3582 | === modified file 'README' | |||
3583 | --- README 2012-04-16 22:33:24 +0000 | |||
3584 | +++ README 2014-11-22 20:03:11 +0000 | |||
3585 | @@ -11,17 +11,20 @@ | |||
3586 | 11 | compatibility with rule management software (oinkmaster/pulledpork/etc) | 11 | compatibility with rule management software (oinkmaster/pulledpork/etc) |
3587 | 12 | and allows Sagan to correlate log events with your Snort IDS/IPS | 12 | and allows Sagan to correlate log events with your Snort IDS/IPS |
3588 | 13 | system. Since Sagan can write to Snort IDS/IPS databases via | 13 | system. Since Sagan can write to Snort IDS/IPS databases via |
3593 | 14 | unified2/barnyard2 or direct SQL access, it is compatible with all | 14 | unified2/barnyard2, it is compatible with all Snort "consoles". |
3594 | 15 | Snort "consoles". For example, Sagan is compatible with Snorby | 15 | For example, Sagan is compatible with Snorby [http://www.snorby.org], |
3595 | 16 | [http://www.snorby.org], Sguil [http://sguil.sourceforge.net], BASE, | 16 | Sguil [http://sguil.sourceforge.net], BASE, and the Prelude IDS |
3596 | 17 | and the Prelude IDS framework! (to name a few). | 17 | framework! (to name a few). |
3597 | 18 | 18 | ||
3598 | 19 | Sagan supports many different output formats, log normalization | 19 | Sagan supports many different output formats, log normalization |
3601 | 20 | (via liblognorm), script execution on event and automatic firewall | 20 | (via liblognorm), GeoIP detection, script execution on event and |
3602 | 21 | support via "Snortsam" (see http://www.snortsam.net). | 21 | automatic firewall support via "Snortsam" |
3603 | 22 | (see http://www.snortsam.net). | ||
3604 | 22 | 23 | ||
3605 | 23 | For more information, please visit the Sagan web site: | 24 | For more information, please visit the Sagan web site: |
3606 | 24 | http://sagan.quadrantsec.com. | 25 | http://sagan.quadrantsec.com. |
3607 | 25 | 26 | ||
3608 | 27 | If you're looking for Sagan rules on Github, they are located at: | ||
3609 | 26 | 28 | ||
3610 | 29 | https://github.com/beave/sagan-rules | ||
3611 | 27 | 30 | ||
3612 | 28 | 31 | ||
3613 | === modified file 'aclocal.m4' | |||
3614 | --- aclocal.m4 2011-03-17 15:18:58 +0000 | |||
3615 | +++ aclocal.m4 2014-11-22 20:03:11 +0000 | |||
3616 | @@ -1,7 +1,7 @@ | |||
3621 | 1 | # generated automatically by aclocal 1.11.1 -*- Autoconf -*- | 1 | # generated automatically by aclocal 1.14.1 -*- Autoconf -*- |
3622 | 2 | 2 | ||
3623 | 3 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, | 3 | # Copyright (C) 1996-2013 Free Software Foundation, Inc. |
3624 | 4 | # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | 4 | |
3625 | 5 | # This file is free software; the Free Software Foundation | 5 | # This file is free software; the Free Software Foundation |
3626 | 6 | # gives unlimited permission to copy and/or distribute it, | 6 | # gives unlimited permission to copy and/or distribute it, |
3627 | 7 | # with or without modifications, as long as this notice is preserved. | 7 | # with or without modifications, as long as this notice is preserved. |
3628 | @@ -11,15 +11,231 @@ | |||
3629 | 11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | 11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
3630 | 12 | # PARTICULAR PURPOSE. | 12 | # PARTICULAR PURPOSE. |
3631 | 13 | 13 | ||
3632 | 14 | m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) | ||
3633 | 14 | m4_ifndef([AC_AUTOCONF_VERSION], | 15 | m4_ifndef([AC_AUTOCONF_VERSION], |
3634 | 15 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl | 16 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
3637 | 16 | m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, | 17 | m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, |
3638 | 17 | [m4_warning([this file was generated for autoconf 2.65. | 18 | [m4_warning([this file was generated for autoconf 2.69. |
3639 | 18 | You have another version of autoconf. It may work, but is not guaranteed to. | 19 | You have another version of autoconf. It may work, but is not guaranteed to. |
3640 | 19 | If you have problems, you may need to regenerate the build system entirely. | 20 | If you have problems, you may need to regenerate the build system entirely. |
3644 | 20 | To do so, use the procedure documented by the package, typically `autoreconf'.])]) | 21 | To do so, use the procedure documented by the package, typically 'autoreconf'.])]) |
3645 | 21 | 22 | ||
3646 | 22 | # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | 23 | # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- |
3647 | 24 | # serial 1 (pkg-config-0.24) | ||
3648 | 25 | # | ||
3649 | 26 | # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. | ||
3650 | 27 | # | ||
3651 | 28 | # This program is free software; you can redistribute it and/or modify | ||
3652 | 29 | # it under the terms of the GNU General Public License as published by | ||
3653 | 30 | # the Free Software Foundation; either version 2 of the License, or | ||
3654 | 31 | # (at your option) any later version. | ||
3655 | 32 | # | ||
3656 | 33 | # This program is distributed in the hope that it will be useful, but | ||
3657 | 34 | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3658 | 35 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
3659 | 36 | # General Public License for more details. | ||
3660 | 37 | # | ||
3661 | 38 | # You should have received a copy of the GNU General Public License | ||
3662 | 39 | # along with this program; if not, write to the Free Software | ||
3663 | 40 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
3664 | 41 | # | ||
3665 | 42 | # As a special exception to the GNU General Public License, if you | ||
3666 | 43 | # distribute this file as part of a program that contains a | ||
3667 | 44 | # configuration script generated by Autoconf, you may include it under | ||
3668 | 45 | # the same distribution terms that you use for the rest of that program. | ||
3669 | 46 | |||
3670 | 47 | # PKG_PROG_PKG_CONFIG([MIN-VERSION]) | ||
3671 | 48 | # ---------------------------------- | ||
3672 | 49 | AC_DEFUN([PKG_PROG_PKG_CONFIG], | ||
3673 | 50 | [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) | ||
3674 | 51 | m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) | ||
3675 | 52 | m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) | ||
3676 | 53 | AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) | ||
3677 | 54 | AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) | ||
3678 | 55 | AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) | ||
3679 | 56 | |||
3680 | 57 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then | ||
3681 | 58 | AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) | ||
3682 | 59 | fi | ||
3683 | 60 | if test -n "$PKG_CONFIG"; then | ||
3684 | 61 | _pkg_min_version=m4_default([$1], [0.9.0]) | ||
3685 | 62 | AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) | ||
3686 | 63 | if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then | ||
3687 | 64 | AC_MSG_RESULT([yes]) | ||
3688 | 65 | else | ||
3689 | 66 | AC_MSG_RESULT([no]) | ||
3690 | 67 | PKG_CONFIG="" | ||
3691 | 68 | fi | ||
3692 | 69 | fi[]dnl | ||
3693 | 70 | ])# PKG_PROG_PKG_CONFIG | ||
3694 | 71 | |||
3695 | 72 | # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | ||
3696 | 73 | # | ||
3697 | 74 | # Check to see whether a particular set of modules exists. Similar | ||
3698 | 75 | # to PKG_CHECK_MODULES(), but does not set variables or print errors. | ||
3699 | 76 | # | ||
3700 | 77 | # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | ||
3701 | 78 | # only at the first occurence in configure.ac, so if the first place | ||
3702 | 79 | # it's called might be skipped (such as if it is within an "if", you | ||
3703 | 80 | # have to call PKG_CHECK_EXISTS manually | ||
3704 | 81 | # -------------------------------------------------------------- | ||
3705 | 82 | AC_DEFUN([PKG_CHECK_EXISTS], | ||
3706 | 83 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | ||
3707 | 84 | if test -n "$PKG_CONFIG" && \ | ||
3708 | 85 | AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then | ||
3709 | 86 | m4_default([$2], [:]) | ||
3710 | 87 | m4_ifvaln([$3], [else | ||
3711 | 88 | $3])dnl | ||
3712 | 89 | fi]) | ||
3713 | 90 | |||
3714 | 91 | # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) | ||
3715 | 92 | # --------------------------------------------- | ||
3716 | 93 | m4_define([_PKG_CONFIG], | ||
3717 | 94 | [if test -n "$$1"; then | ||
3718 | 95 | pkg_cv_[]$1="$$1" | ||
3719 | 96 | elif test -n "$PKG_CONFIG"; then | ||
3720 | 97 | PKG_CHECK_EXISTS([$3], | ||
3721 | 98 | [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` | ||
3722 | 99 | test "x$?" != "x0" && pkg_failed=yes ], | ||
3723 | 100 | [pkg_failed=yes]) | ||
3724 | 101 | else | ||
3725 | 102 | pkg_failed=untried | ||
3726 | 103 | fi[]dnl | ||
3727 | 104 | ])# _PKG_CONFIG | ||
3728 | 105 | |||
3729 | 106 | # _PKG_SHORT_ERRORS_SUPPORTED | ||
3730 | 107 | # ----------------------------- | ||
3731 | 108 | AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], | ||
3732 | 109 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | ||
3733 | 110 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | ||
3734 | 111 | _pkg_short_errors_supported=yes | ||
3735 | 112 | else | ||
3736 | 113 | _pkg_short_errors_supported=no | ||
3737 | 114 | fi[]dnl | ||
3738 | 115 | ])# _PKG_SHORT_ERRORS_SUPPORTED | ||
3739 | 116 | |||
3740 | 117 | |||
3741 | 118 | # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], | ||
3742 | 119 | # [ACTION-IF-NOT-FOUND]) | ||
3743 | 120 | # | ||
3744 | 121 | # | ||
3745 | 122 | # Note that if there is a possibility the first call to | ||
3746 | 123 | # PKG_CHECK_MODULES might not happen, you should be sure to include an | ||
3747 | 124 | # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac | ||
3748 | 125 | # | ||
3749 | 126 | # | ||
3750 | 127 | # -------------------------------------------------------------- | ||
3751 | 128 | AC_DEFUN([PKG_CHECK_MODULES], | ||
3752 | 129 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | ||
3753 | 130 | AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl | ||
3754 | 131 | AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl | ||
3755 | 132 | |||
3756 | 133 | pkg_failed=no | ||
3757 | 134 | AC_MSG_CHECKING([for $1]) | ||
3758 | 135 | |||
3759 | 136 | _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) | ||
3760 | 137 | _PKG_CONFIG([$1][_LIBS], [libs], [$2]) | ||
3761 | 138 | |||
3762 | 139 | m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS | ||
3763 | 140 | and $1[]_LIBS to avoid the need to call pkg-config. | ||
3764 | 141 | See the pkg-config man page for more details.]) | ||
3765 | 142 | |||
3766 | 143 | if test $pkg_failed = yes; then | ||
3767 | 144 | AC_MSG_RESULT([no]) | ||
3768 | 145 | _PKG_SHORT_ERRORS_SUPPORTED | ||
3769 | 146 | if test $_pkg_short_errors_supported = yes; then | ||
3770 | 147 | $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` | ||
3771 | 148 | else | ||
3772 | 149 | $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` | ||
3773 | 150 | fi | ||
3774 | 151 | # Put the nasty error message in config.log where it belongs | ||
3775 | 152 | echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD | ||
3776 | 153 | |||
3777 | 154 | m4_default([$4], [AC_MSG_ERROR( | ||
3778 | 155 | [Package requirements ($2) were not met: | ||
3779 | 156 | |||
3780 | 157 | $$1_PKG_ERRORS | ||
3781 | 158 | |||
3782 | 159 | Consider adjusting the PKG_CONFIG_PATH environment variable if you | ||
3783 | 160 | installed software in a non-standard prefix. | ||
3784 | 161 | |||
3785 | 162 | _PKG_TEXT])[]dnl | ||
3786 | 163 | ]) | ||
3787 | 164 | elif test $pkg_failed = untried; then | ||
3788 | 165 | AC_MSG_RESULT([no]) | ||
3789 | 166 | m4_default([$4], [AC_MSG_FAILURE( | ||
3790 | 167 | [The pkg-config script could not be found or is too old. Make sure it | ||
3791 | 168 | is in your PATH or set the PKG_CONFIG environment variable to the full | ||
3792 | 169 | path to pkg-config. | ||
3793 | 170 | |||
3794 | 171 | _PKG_TEXT | ||
3795 | 172 | |||
3796 | 173 | To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl | ||
3797 | 174 | ]) | ||
3798 | 175 | else | ||
3799 | 176 | $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS | ||
3800 | 177 | $1[]_LIBS=$pkg_cv_[]$1[]_LIBS | ||
3801 | 178 | AC_MSG_RESULT([yes]) | ||
3802 | 179 | $3 | ||
3803 | 180 | fi[]dnl | ||
3804 | 181 | ])# PKG_CHECK_MODULES | ||
3805 | 182 | |||
3806 | 183 | |||
3807 | 184 | # PKG_INSTALLDIR(DIRECTORY) | ||
3808 | 185 | # ------------------------- | ||
3809 | 186 | # Substitutes the variable pkgconfigdir as the location where a module | ||
3810 | 187 | # should install pkg-config .pc files. By default the directory is | ||
3811 | 188 | # $libdir/pkgconfig, but the default can be changed by passing | ||
3812 | 189 | # DIRECTORY. The user can override through the --with-pkgconfigdir | ||
3813 | 190 | # parameter. | ||
3814 | 191 | AC_DEFUN([PKG_INSTALLDIR], | ||
3815 | 192 | [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) | ||
3816 | 193 | m4_pushdef([pkg_description], | ||
3817 | 194 | [pkg-config installation directory @<:@]pkg_default[@:>@]) | ||
3818 | 195 | AC_ARG_WITH([pkgconfigdir], | ||
3819 | 196 | [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, | ||
3820 | 197 | [with_pkgconfigdir=]pkg_default) | ||
3821 | 198 | AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) | ||
3822 | 199 | m4_popdef([pkg_default]) | ||
3823 | 200 | m4_popdef([pkg_description]) | ||
3824 | 201 | ]) dnl PKG_INSTALLDIR | ||
3825 | 202 | |||
3826 | 203 | |||
3827 | 204 | # PKG_NOARCH_INSTALLDIR(DIRECTORY) | ||
3828 | 205 | # ------------------------- | ||
3829 | 206 | # Substitutes the variable noarch_pkgconfigdir as the location where a | ||
3830 | 207 | # module should install arch-independent pkg-config .pc files. By | ||
3831 | 208 | # default the directory is $datadir/pkgconfig, but the default can be | ||
3832 | 209 | # changed by passing DIRECTORY. The user can override through the | ||
3833 | 210 | # --with-noarch-pkgconfigdir parameter. | ||
3834 | 211 | AC_DEFUN([PKG_NOARCH_INSTALLDIR], | ||
3835 | 212 | [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) | ||
3836 | 213 | m4_pushdef([pkg_description], | ||
3837 | 214 | [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) | ||
3838 | 215 | AC_ARG_WITH([noarch-pkgconfigdir], | ||
3839 | 216 | [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, | ||
3840 | 217 | [with_noarch_pkgconfigdir=]pkg_default) | ||
3841 | 218 | AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) | ||
3842 | 219 | m4_popdef([pkg_default]) | ||
3843 | 220 | m4_popdef([pkg_description]) | ||
3844 | 221 | ]) dnl PKG_NOARCH_INSTALLDIR | ||
3845 | 222 | |||
3846 | 223 | |||
3847 | 224 | # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, | ||
3848 | 225 | # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | ||
3849 | 226 | # ------------------------------------------- | ||
3850 | 227 | # Retrieves the value of the pkg-config variable for the given module. | ||
3851 | 228 | AC_DEFUN([PKG_CHECK_VAR], | ||
3852 | 229 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | ||
3853 | 230 | AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl | ||
3854 | 231 | |||
3855 | 232 | _PKG_CONFIG([$1], [variable="][$3]["], [$2]) | ||
3856 | 233 | AS_VAR_COPY([$1], [pkg_cv_][$1]) | ||
3857 | 234 | |||
3858 | 235 | AS_VAR_IF([$1], [""], [$5], [$4])dnl | ||
3859 | 236 | ])# PKG_CHECK_VAR | ||
3860 | 237 | |||
3861 | 238 | # Copyright (C) 2002-2013 Free Software Foundation, Inc. | ||
3862 | 23 | # | 239 | # |
3863 | 24 | # This file is free software; the Free Software Foundation | 240 | # This file is free software; the Free Software Foundation |
3864 | 25 | # gives unlimited permission to copy and/or distribute it, | 241 | # gives unlimited permission to copy and/or distribute it, |
3865 | @@ -31,10 +247,10 @@ | |||
3866 | 31 | # generated from the m4 files accompanying Automake X.Y. | 247 | # generated from the m4 files accompanying Automake X.Y. |
3867 | 32 | # (This private macro should not be called outside this file.) | 248 | # (This private macro should not be called outside this file.) |
3868 | 33 | AC_DEFUN([AM_AUTOMAKE_VERSION], | 249 | AC_DEFUN([AM_AUTOMAKE_VERSION], |
3870 | 34 | [am__api_version='1.11' | 250 | [am__api_version='1.14' |
3871 | 35 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to | 251 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to |
3872 | 36 | dnl require some minimum version. Point them to the right macro. | 252 | dnl require some minimum version. Point them to the right macro. |
3874 | 37 | m4_if([$1], [1.11.1], [], | 253 | m4_if([$1], [1.14.1], [], |
3875 | 38 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl | 254 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl |
3876 | 39 | ]) | 255 | ]) |
3877 | 40 | 256 | ||
3878 | @@ -50,22 +266,22 @@ | |||
3879 | 50 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. | 266 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. |
3880 | 51 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. | 267 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. |
3881 | 52 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], | 268 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
3883 | 53 | [AM_AUTOMAKE_VERSION([1.11.1])dnl | 269 | [AM_AUTOMAKE_VERSION([1.14.1])dnl |
3884 | 54 | m4_ifndef([AC_AUTOCONF_VERSION], | 270 | m4_ifndef([AC_AUTOCONF_VERSION], |
3885 | 55 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl | 271 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
3886 | 56 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) | 272 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) |
3887 | 57 | 273 | ||
3888 | 58 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- | 274 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- |
3889 | 59 | 275 | ||
3891 | 60 | # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. | 276 | # Copyright (C) 2001-2013 Free Software Foundation, Inc. |
3892 | 61 | # | 277 | # |
3893 | 62 | # This file is free software; the Free Software Foundation | 278 | # This file is free software; the Free Software Foundation |
3894 | 63 | # gives unlimited permission to copy and/or distribute it, | 279 | # gives unlimited permission to copy and/or distribute it, |
3895 | 64 | # with or without modifications, as long as this notice is preserved. | 280 | # with or without modifications, as long as this notice is preserved. |
3896 | 65 | 281 | ||
3897 | 66 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets | 282 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets |
3900 | 67 | # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to | 283 | # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to |
3901 | 68 | # `$srcdir', `$srcdir/..', or `$srcdir/../..'. | 284 | # '$srcdir', '$srcdir/..', or '$srcdir/../..'. |
3902 | 69 | # | 285 | # |
3903 | 70 | # Of course, Automake must honor this variable whenever it calls a | 286 | # Of course, Automake must honor this variable whenever it calls a |
3904 | 71 | # tool from the auxiliary directory. The problem is that $srcdir (and | 287 | # tool from the auxiliary directory. The problem is that $srcdir (and |
3905 | @@ -84,7 +300,7 @@ | |||
3906 | 84 | # | 300 | # |
3907 | 85 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir | 301 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir |
3908 | 86 | # are both prefixed by $srcdir. In an in-source build this is usually | 302 | # are both prefixed by $srcdir. In an in-source build this is usually |
3910 | 87 | # harmless because $srcdir is `.', but things will broke when you | 303 | # harmless because $srcdir is '.', but things will broke when you |
3911 | 88 | # start a VPATH build or use an absolute $srcdir. | 304 | # start a VPATH build or use an absolute $srcdir. |
3912 | 89 | # | 305 | # |
3913 | 90 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, | 306 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, |
3914 | @@ -110,22 +326,19 @@ | |||
3915 | 110 | 326 | ||
3916 | 111 | # AM_CONDITIONAL -*- Autoconf -*- | 327 | # AM_CONDITIONAL -*- Autoconf -*- |
3917 | 112 | 328 | ||
3920 | 113 | # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 | 329 | # Copyright (C) 1997-2013 Free Software Foundation, Inc. |
3919 | 114 | # Free Software Foundation, Inc. | ||
3921 | 115 | # | 330 | # |
3922 | 116 | # This file is free software; the Free Software Foundation | 331 | # This file is free software; the Free Software Foundation |
3923 | 117 | # gives unlimited permission to copy and/or distribute it, | 332 | # gives unlimited permission to copy and/or distribute it, |
3924 | 118 | # with or without modifications, as long as this notice is preserved. | 333 | # with or without modifications, as long as this notice is preserved. |
3925 | 119 | 334 | ||
3926 | 120 | # serial 9 | ||
3927 | 121 | |||
3928 | 122 | # AM_CONDITIONAL(NAME, SHELL-CONDITION) | 335 | # AM_CONDITIONAL(NAME, SHELL-CONDITION) |
3929 | 123 | # ------------------------------------- | 336 | # ------------------------------------- |
3930 | 124 | # Define a conditional. | 337 | # Define a conditional. |
3931 | 125 | AC_DEFUN([AM_CONDITIONAL], | 338 | AC_DEFUN([AM_CONDITIONAL], |
3935 | 126 | [AC_PREREQ(2.52)dnl | 339 | [AC_PREREQ([2.52])dnl |
3936 | 127 | ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], | 340 | m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], |
3937 | 128 | [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl | 341 | [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl |
3938 | 129 | AC_SUBST([$1_TRUE])dnl | 342 | AC_SUBST([$1_TRUE])dnl |
3939 | 130 | AC_SUBST([$1_FALSE])dnl | 343 | AC_SUBST([$1_FALSE])dnl |
3940 | 131 | _AM_SUBST_NOTMAKE([$1_TRUE])dnl | 344 | _AM_SUBST_NOTMAKE([$1_TRUE])dnl |
3941 | @@ -144,16 +357,14 @@ | |||
3942 | 144 | Usually this means the macro was only invoked conditionally.]]) | 357 | Usually this means the macro was only invoked conditionally.]]) |
3943 | 145 | fi])]) | 358 | fi])]) |
3944 | 146 | 359 | ||
3947 | 147 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 | 360 | # Copyright (C) 1999-2013 Free Software Foundation, Inc. |
3946 | 148 | # Free Software Foundation, Inc. | ||
3948 | 149 | # | 361 | # |
3949 | 150 | # This file is free software; the Free Software Foundation | 362 | # This file is free software; the Free Software Foundation |
3950 | 151 | # gives unlimited permission to copy and/or distribute it, | 363 | # gives unlimited permission to copy and/or distribute it, |
3951 | 152 | # with or without modifications, as long as this notice is preserved. | 364 | # with or without modifications, as long as this notice is preserved. |
3952 | 153 | 365 | ||
3953 | 154 | # serial 10 | ||
3954 | 155 | 366 | ||
3956 | 156 | # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be | 367 | # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be |
3957 | 157 | # written in clear, in which case automake, when reading aclocal.m4, | 368 | # written in clear, in which case automake, when reading aclocal.m4, |
3958 | 158 | # will think it sees a *use*, and therefore will trigger all it's | 369 | # will think it sees a *use*, and therefore will trigger all it's |
3959 | 159 | # C support machinery. Also note that it means that autoscan, seeing | 370 | # C support machinery. Also note that it means that autoscan, seeing |
3960 | @@ -163,7 +374,7 @@ | |||
3961 | 163 | # _AM_DEPENDENCIES(NAME) | 374 | # _AM_DEPENDENCIES(NAME) |
3962 | 164 | # ---------------------- | 375 | # ---------------------- |
3963 | 165 | # See how the compiler implements dependency checking. | 376 | # See how the compiler implements dependency checking. |
3965 | 166 | # NAME is "CC", "CXX", "GCJ", or "OBJC". | 377 | # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". |
3966 | 167 | # We try a few techniques and use that to set a single cache variable. | 378 | # We try a few techniques and use that to set a single cache variable. |
3967 | 168 | # | 379 | # |
3968 | 169 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was | 380 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was |
3969 | @@ -176,12 +387,13 @@ | |||
3970 | 176 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl | 387 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl |
3971 | 177 | AC_REQUIRE([AM_DEP_TRACK])dnl | 388 | AC_REQUIRE([AM_DEP_TRACK])dnl |
3972 | 178 | 389 | ||
3979 | 179 | ifelse([$1], CC, [depcc="$CC" am_compiler_list=], | 390 | m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], |
3980 | 180 | [$1], CXX, [depcc="$CXX" am_compiler_list=], | 391 | [$1], [CXX], [depcc="$CXX" am_compiler_list=], |
3981 | 181 | [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], | 392 | [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], |
3982 | 182 | [$1], UPC, [depcc="$UPC" am_compiler_list=], | 393 | [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], |
3983 | 183 | [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], | 394 | [$1], [UPC], [depcc="$UPC" am_compiler_list=], |
3984 | 184 | [depcc="$$1" am_compiler_list=]) | 395 | [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], |
3985 | 396 | [depcc="$$1" am_compiler_list=]) | ||
3986 | 185 | 397 | ||
3987 | 186 | AC_CACHE_CHECK([dependency style of $depcc], | 398 | AC_CACHE_CHECK([dependency style of $depcc], |
3988 | 187 | [am_cv_$1_dependencies_compiler_type], | 399 | [am_cv_$1_dependencies_compiler_type], |
3989 | @@ -189,8 +401,9 @@ | |||
3990 | 189 | # We make a subdir and do the tests there. Otherwise we can end up | 401 | # We make a subdir and do the tests there. Otherwise we can end up |
3991 | 190 | # making bogus files that we don't know about and never remove. For | 402 | # making bogus files that we don't know about and never remove. For |
3992 | 191 | # instance it was reported that on HP-UX the gcc test will end up | 403 | # instance it was reported that on HP-UX the gcc test will end up |
3995 | 192 | # making a dummy file named `D' -- because `-MD' means `put the output | 404 | # making a dummy file named 'D' -- because '-MD' means "put the output |
3996 | 193 | # in D'. | 405 | # in D". |
3997 | 406 | rm -rf conftest.dir | ||
3998 | 194 | mkdir conftest.dir | 407 | mkdir conftest.dir |
3999 | 195 | # Copy depcomp to subdir because otherwise we won't find it if we're | 408 | # Copy depcomp to subdir because otherwise we won't find it if we're |
4000 | 196 | # using a relative directory. | 409 | # using a relative directory. |
4001 | @@ -229,16 +442,16 @@ | |||
4002 | 229 | : > sub/conftest.c | 442 | : > sub/conftest.c |
4003 | 230 | for i in 1 2 3 4 5 6; do | 443 | for i in 1 2 3 4 5 6; do |
4004 | 231 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | 444 | echo '#include "conftst'$i'.h"' >> sub/conftest.c |
4008 | 232 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | 445 | # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with |
4009 | 233 | # Solaris 8's {/usr,}/bin/sh. | 446 | # Solaris 10 /bin/sh. |
4010 | 234 | touch sub/conftst$i.h | 447 | echo '/* dummy */' > sub/conftst$i.h |
4011 | 235 | done | 448 | done |
4012 | 236 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | 449 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf |
4013 | 237 | 450 | ||
4015 | 238 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | 451 | # We check with '-c' and '-o' for the sake of the "dashmstdout" |
4016 | 239 | # mode. It turns out that the SunPro C++ compiler does not properly | 452 | # mode. It turns out that the SunPro C++ compiler does not properly |
4019 | 240 | # handle `-M -o', and we need to detect this. Also, some Intel | 453 | # handle '-M -o', and we need to detect this. Also, some Intel |
4020 | 241 | # versions had trouble with output in subdirs | 454 | # versions had trouble with output in subdirs. |
4021 | 242 | am__obj=sub/conftest.${OBJEXT-o} | 455 | am__obj=sub/conftest.${OBJEXT-o} |
4022 | 243 | am__minus_obj="-o $am__obj" | 456 | am__minus_obj="-o $am__obj" |
4023 | 244 | case $depmode in | 457 | case $depmode in |
4024 | @@ -247,16 +460,16 @@ | |||
4025 | 247 | test "$am__universal" = false || continue | 460 | test "$am__universal" = false || continue |
4026 | 248 | ;; | 461 | ;; |
4027 | 249 | nosideeffect) | 462 | nosideeffect) |
4030 | 250 | # after this tag, mechanisms are not by side-effect, so they'll | 463 | # After this tag, mechanisms are not by side-effect, so they'll |
4031 | 251 | # only be used when explicitly requested | 464 | # only be used when explicitly requested. |
4032 | 252 | if test "x$enable_dependency_tracking" = xyes; then | 465 | if test "x$enable_dependency_tracking" = xyes; then |
4033 | 253 | continue | 466 | continue |
4034 | 254 | else | 467 | else |
4035 | 255 | break | 468 | break |
4036 | 256 | fi | 469 | fi |
4037 | 257 | ;; | 470 | ;; |
4040 | 258 | msvisualcpp | msvcmsys) | 471 | msvc7 | msvc7msys | msvisualcpp | msvcmsys) |
4041 | 259 | # This compiler won't grok `-c -o', but also, the minuso test has | 472 | # This compiler won't grok '-c -o', but also, the minuso test has |
4042 | 260 | # not run yet. These depmodes are late enough in the game, and | 473 | # not run yet. These depmodes are late enough in the game, and |
4043 | 261 | # so weak that their functioning should not be impacted. | 474 | # so weak that their functioning should not be impacted. |
4044 | 262 | am__obj=conftest.${OBJEXT-o} | 475 | am__obj=conftest.${OBJEXT-o} |
4045 | @@ -304,7 +517,7 @@ | |||
4046 | 304 | # AM_SET_DEPDIR | 517 | # AM_SET_DEPDIR |
4047 | 305 | # ------------- | 518 | # ------------- |
4048 | 306 | # Choose a directory name for dependency files. | 519 | # Choose a directory name for dependency files. |
4050 | 307 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES | 520 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES. |
4051 | 308 | AC_DEFUN([AM_SET_DEPDIR], | 521 | AC_DEFUN([AM_SET_DEPDIR], |
4052 | 309 | [AC_REQUIRE([AM_SET_LEADING_DOT])dnl | 522 | [AC_REQUIRE([AM_SET_LEADING_DOT])dnl |
4053 | 310 | AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl | 523 | AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl |
4054 | @@ -314,34 +527,39 @@ | |||
4055 | 314 | # AM_DEP_TRACK | 527 | # AM_DEP_TRACK |
4056 | 315 | # ------------ | 528 | # ------------ |
4057 | 316 | AC_DEFUN([AM_DEP_TRACK], | 529 | AC_DEFUN([AM_DEP_TRACK], |
4061 | 317 | [AC_ARG_ENABLE(dependency-tracking, | 530 | [AC_ARG_ENABLE([dependency-tracking], [dnl |
4062 | 318 | [ --disable-dependency-tracking speeds up one-time build | 531 | AS_HELP_STRING( |
4063 | 319 | --enable-dependency-tracking do not reject slow dependency extractors]) | 532 | [--enable-dependency-tracking], |
4064 | 533 | [do not reject slow dependency extractors]) | ||
4065 | 534 | AS_HELP_STRING( | ||
4066 | 535 | [--disable-dependency-tracking], | ||
4067 | 536 | [speeds up one-time build])]) | ||
4068 | 320 | if test "x$enable_dependency_tracking" != xno; then | 537 | if test "x$enable_dependency_tracking" != xno; then |
4069 | 321 | am_depcomp="$ac_aux_dir/depcomp" | 538 | am_depcomp="$ac_aux_dir/depcomp" |
4070 | 322 | AMDEPBACKSLASH='\' | 539 | AMDEPBACKSLASH='\' |
4071 | 540 | am__nodep='_no' | ||
4072 | 323 | fi | 541 | fi |
4073 | 324 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) | 542 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) |
4074 | 325 | AC_SUBST([AMDEPBACKSLASH])dnl | 543 | AC_SUBST([AMDEPBACKSLASH])dnl |
4075 | 326 | _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl | 544 | _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl |
4076 | 545 | AC_SUBST([am__nodep])dnl | ||
4077 | 546 | _AM_SUBST_NOTMAKE([am__nodep])dnl | ||
4078 | 327 | ]) | 547 | ]) |
4079 | 328 | 548 | ||
4080 | 329 | # Generate code to set up dependency tracking. -*- Autoconf -*- | 549 | # Generate code to set up dependency tracking. -*- Autoconf -*- |
4081 | 330 | 550 | ||
4084 | 331 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 | 551 | # Copyright (C) 1999-2013 Free Software Foundation, Inc. |
4083 | 332 | # Free Software Foundation, Inc. | ||
4085 | 333 | # | 552 | # |
4086 | 334 | # This file is free software; the Free Software Foundation | 553 | # This file is free software; the Free Software Foundation |
4087 | 335 | # gives unlimited permission to copy and/or distribute it, | 554 | # gives unlimited permission to copy and/or distribute it, |
4088 | 336 | # with or without modifications, as long as this notice is preserved. | 555 | # with or without modifications, as long as this notice is preserved. |
4089 | 337 | 556 | ||
4090 | 338 | #serial 5 | ||
4091 | 339 | 557 | ||
4092 | 340 | # _AM_OUTPUT_DEPENDENCY_COMMANDS | 558 | # _AM_OUTPUT_DEPENDENCY_COMMANDS |
4093 | 341 | # ------------------------------ | 559 | # ------------------------------ |
4094 | 342 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], | 560 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], |
4095 | 343 | [{ | 561 | [{ |
4097 | 344 | # Autoconf 2.62 quotes --file arguments for eval, but not when files | 562 | # Older Autoconf quotes --file arguments for eval, but not when files |
4098 | 345 | # are listed without --file. Let's play safe and only enable the eval | 563 | # are listed without --file. Let's play safe and only enable the eval |
4099 | 346 | # if we detect the quoting. | 564 | # if we detect the quoting. |
4100 | 347 | case $CONFIG_FILES in | 565 | case $CONFIG_FILES in |
4101 | @@ -354,7 +572,7 @@ | |||
4102 | 354 | # Strip MF so we end up with the name of the file. | 572 | # Strip MF so we end up with the name of the file. |
4103 | 355 | mf=`echo "$mf" | sed -e 's/:.*$//'` | 573 | mf=`echo "$mf" | sed -e 's/:.*$//'` |
4104 | 356 | # Check whether this is an Automake generated Makefile or not. | 574 | # Check whether this is an Automake generated Makefile or not. |
4106 | 357 | # We used to match only the files named `Makefile.in', but | 575 | # We used to match only the files named 'Makefile.in', but |
4107 | 358 | # some people rename them; so instead we look at the file content. | 576 | # some people rename them; so instead we look at the file content. |
4108 | 359 | # Grep'ing the first line is not enough: some people post-process | 577 | # Grep'ing the first line is not enough: some people post-process |
4109 | 360 | # each Makefile.in and add a new line on top of each file to say so. | 578 | # each Makefile.in and add a new line on top of each file to say so. |
4110 | @@ -366,21 +584,19 @@ | |||
4111 | 366 | continue | 584 | continue |
4112 | 367 | fi | 585 | fi |
4113 | 368 | # Extract the definition of DEPDIR, am__include, and am__quote | 586 | # Extract the definition of DEPDIR, am__include, and am__quote |
4115 | 369 | # from the Makefile without running `make'. | 587 | # from the Makefile without running 'make'. |
4116 | 370 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | 588 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` |
4117 | 371 | test -z "$DEPDIR" && continue | 589 | test -z "$DEPDIR" && continue |
4118 | 372 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | 590 | am__include=`sed -n 's/^am__include = //p' < "$mf"` |
4120 | 373 | test -z "am__include" && continue | 591 | test -z "$am__include" && continue |
4121 | 374 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | 592 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` |
4122 | 375 | # When using ansi2knr, U may be empty or an underscore; expand it | ||
4123 | 376 | U=`sed -n 's/^U = //p' < "$mf"` | ||
4124 | 377 | # Find all dependency output files, they are included files with | 593 | # Find all dependency output files, they are included files with |
4125 | 378 | # $(DEPDIR) in their names. We invoke sed twice because it is the | 594 | # $(DEPDIR) in their names. We invoke sed twice because it is the |
4126 | 379 | # simplest approach to changing $(DEPDIR) to its actual value in the | 595 | # simplest approach to changing $(DEPDIR) to its actual value in the |
4127 | 380 | # expansion. | 596 | # expansion. |
4128 | 381 | for file in `sed -n " | 597 | for file in `sed -n " |
4129 | 382 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | 598 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ |
4131 | 383 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do | 599 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do |
4132 | 384 | # Make sure the directory exists. | 600 | # Make sure the directory exists. |
4133 | 385 | test -f "$dirpart/$file" && continue | 601 | test -f "$dirpart/$file" && continue |
4134 | 386 | fdir=`AS_DIRNAME(["$file"])` | 602 | fdir=`AS_DIRNAME(["$file"])` |
4135 | @@ -398,7 +614,7 @@ | |||
4136 | 398 | # This macro should only be invoked once -- use via AC_REQUIRE. | 614 | # This macro should only be invoked once -- use via AC_REQUIRE. |
4137 | 399 | # | 615 | # |
4138 | 400 | # This code is only required when automatic dependency tracking | 616 | # This code is only required when automatic dependency tracking |
4140 | 401 | # is enabled. FIXME. This creates each `.P' file that we will | 617 | # is enabled. FIXME. This creates each '.P' file that we will |
4141 | 402 | # need in order to bootstrap the dependency handling code. | 618 | # need in order to bootstrap the dependency handling code. |
4142 | 403 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], | 619 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], |
4143 | 404 | [AC_CONFIG_COMMANDS([depfiles], | 620 | [AC_CONFIG_COMMANDS([depfiles], |
4144 | @@ -408,18 +624,21 @@ | |||
4145 | 408 | 624 | ||
4146 | 409 | # Do all the work for Automake. -*- Autoconf -*- | 625 | # Do all the work for Automake. -*- Autoconf -*- |
4147 | 410 | 626 | ||
4150 | 411 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, | 627 | # Copyright (C) 1996-2013 Free Software Foundation, Inc. |
4149 | 412 | # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. | ||
4151 | 413 | # | 628 | # |
4152 | 414 | # This file is free software; the Free Software Foundation | 629 | # This file is free software; the Free Software Foundation |
4153 | 415 | # gives unlimited permission to copy and/or distribute it, | 630 | # gives unlimited permission to copy and/or distribute it, |
4154 | 416 | # with or without modifications, as long as this notice is preserved. | 631 | # with or without modifications, as long as this notice is preserved. |
4155 | 417 | 632 | ||
4156 | 418 | # serial 16 | ||
4157 | 419 | |||
4158 | 420 | # This macro actually does too much. Some checks are only needed if | 633 | # This macro actually does too much. Some checks are only needed if |
4159 | 421 | # your package does certain things. But this isn't really a big deal. | 634 | # your package does certain things. But this isn't really a big deal. |
4160 | 422 | 635 | ||
4161 | 636 | dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. | ||
4162 | 637 | m4_define([AC_PROG_CC], | ||
4163 | 638 | m4_defn([AC_PROG_CC]) | ||
4164 | 639 | [_AM_PROG_CC_C_O | ||
4165 | 640 | ]) | ||
4166 | 641 | |||
4167 | 423 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) | 642 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) |
4168 | 424 | # AM_INIT_AUTOMAKE([OPTIONS]) | 643 | # AM_INIT_AUTOMAKE([OPTIONS]) |
4169 | 425 | # ----------------------------------------------- | 644 | # ----------------------------------------------- |
4170 | @@ -432,7 +651,7 @@ | |||
4171 | 432 | # arguments mandatory, and then we can depend on a new Autoconf | 651 | # arguments mandatory, and then we can depend on a new Autoconf |
4172 | 433 | # release and drop the old call support. | 652 | # release and drop the old call support. |
4173 | 434 | AC_DEFUN([AM_INIT_AUTOMAKE], | 653 | AC_DEFUN([AM_INIT_AUTOMAKE], |
4175 | 435 | [AC_PREREQ([2.62])dnl | 654 | [AC_PREREQ([2.65])dnl |
4176 | 436 | dnl Autoconf wants to disallow AM_ names. We explicitly allow | 655 | dnl Autoconf wants to disallow AM_ names. We explicitly allow |
4177 | 437 | dnl the ones we care about. | 656 | dnl the ones we care about. |
4178 | 438 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl | 657 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl |
4179 | @@ -461,31 +680,40 @@ | |||
4180 | 461 | # Define the identity of the package. | 680 | # Define the identity of the package. |
4181 | 462 | dnl Distinguish between old-style and new-style calls. | 681 | dnl Distinguish between old-style and new-style calls. |
4182 | 463 | m4_ifval([$2], | 682 | m4_ifval([$2], |
4184 | 464 | [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl | 683 | [AC_DIAGNOSE([obsolete], |
4185 | 684 | [$0: two- and three-arguments forms are deprecated.]) | ||
4186 | 685 | m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl | ||
4187 | 465 | AC_SUBST([PACKAGE], [$1])dnl | 686 | AC_SUBST([PACKAGE], [$1])dnl |
4188 | 466 | AC_SUBST([VERSION], [$2])], | 687 | AC_SUBST([VERSION], [$2])], |
4189 | 467 | [_AM_SET_OPTIONS([$1])dnl | 688 | [_AM_SET_OPTIONS([$1])dnl |
4190 | 468 | dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. | 689 | dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. |
4192 | 469 | m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, | 690 | m4_if( |
4193 | 691 | m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), | ||
4194 | 692 | [ok:ok],, | ||
4195 | 470 | [m4_fatal([AC_INIT should be called with package and version arguments])])dnl | 693 | [m4_fatal([AC_INIT should be called with package and version arguments])])dnl |
4196 | 471 | AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl | 694 | AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl |
4197 | 472 | AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl | 695 | AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl |
4198 | 473 | 696 | ||
4199 | 474 | _AM_IF_OPTION([no-define],, | 697 | _AM_IF_OPTION([no-define],, |
4202 | 475 | [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) | 698 | [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) |
4203 | 476 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl | 699 | AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl |
4204 | 477 | 700 | ||
4205 | 478 | # Some tools Automake needs. | 701 | # Some tools Automake needs. |
4206 | 479 | AC_REQUIRE([AM_SANITY_CHECK])dnl | 702 | AC_REQUIRE([AM_SANITY_CHECK])dnl |
4207 | 480 | AC_REQUIRE([AC_ARG_PROGRAM])dnl | 703 | AC_REQUIRE([AC_ARG_PROGRAM])dnl |
4213 | 481 | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) | 704 | AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) |
4214 | 482 | AM_MISSING_PROG(AUTOCONF, autoconf) | 705 | AM_MISSING_PROG([AUTOCONF], [autoconf]) |
4215 | 483 | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) | 706 | AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) |
4216 | 484 | AM_MISSING_PROG(AUTOHEADER, autoheader) | 707 | AM_MISSING_PROG([AUTOHEADER], [autoheader]) |
4217 | 485 | AM_MISSING_PROG(MAKEINFO, makeinfo) | 708 | AM_MISSING_PROG([MAKEINFO], [makeinfo]) |
4218 | 486 | AC_REQUIRE([AM_PROG_INSTALL_SH])dnl | 709 | AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
4219 | 487 | AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl | 710 | AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl |
4221 | 488 | AC_REQUIRE([AM_PROG_MKDIR_P])dnl | 711 | AC_REQUIRE([AC_PROG_MKDIR_P])dnl |
4222 | 712 | # For better backward compatibility. To be removed once Automake 1.9.x | ||
4223 | 713 | # dies out for good. For more background, see: | ||
4224 | 714 | # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> | ||
4225 | 715 | # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> | ||
4226 | 716 | AC_SUBST([mkdir_p], ['$(MKDIR_P)']) | ||
4227 | 489 | # We need awk for the "check" target. The system "awk" is bad on | 717 | # We need awk for the "check" target. The system "awk" is bad on |
4228 | 490 | # some platforms. | 718 | # some platforms. |
4229 | 491 | AC_REQUIRE([AC_PROG_AWK])dnl | 719 | AC_REQUIRE([AC_PROG_AWK])dnl |
4230 | @@ -496,34 +724,78 @@ | |||
4231 | 496 | [_AM_PROG_TAR([v7])])]) | 724 | [_AM_PROG_TAR([v7])])]) |
4232 | 497 | _AM_IF_OPTION([no-dependencies],, | 725 | _AM_IF_OPTION([no-dependencies],, |
4233 | 498 | [AC_PROVIDE_IFELSE([AC_PROG_CC], | 726 | [AC_PROVIDE_IFELSE([AC_PROG_CC], |
4237 | 499 | [_AM_DEPENDENCIES(CC)], | 727 | [_AM_DEPENDENCIES([CC])], |
4238 | 500 | [define([AC_PROG_CC], | 728 | [m4_define([AC_PROG_CC], |
4239 | 501 | defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl | 729 | m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl |
4240 | 502 | AC_PROVIDE_IFELSE([AC_PROG_CXX], | 730 | AC_PROVIDE_IFELSE([AC_PROG_CXX], |
4244 | 503 | [_AM_DEPENDENCIES(CXX)], | 731 | [_AM_DEPENDENCIES([CXX])], |
4245 | 504 | [define([AC_PROG_CXX], | 732 | [m4_define([AC_PROG_CXX], |
4246 | 505 | defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl | 733 | m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl |
4247 | 506 | AC_PROVIDE_IFELSE([AC_PROG_OBJC], | 734 | AC_PROVIDE_IFELSE([AC_PROG_OBJC], |
4251 | 507 | [_AM_DEPENDENCIES(OBJC)], | 735 | [_AM_DEPENDENCIES([OBJC])], |
4252 | 508 | [define([AC_PROG_OBJC], | 736 | [m4_define([AC_PROG_OBJC], |
4253 | 509 | defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl | 737 | m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl |
4254 | 738 | AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], | ||
4255 | 739 | [_AM_DEPENDENCIES([OBJCXX])], | ||
4256 | 740 | [m4_define([AC_PROG_OBJCXX], | ||
4257 | 741 | m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl | ||
4258 | 510 | ]) | 742 | ]) |
4263 | 511 | _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl | 743 | AC_REQUIRE([AM_SILENT_RULES])dnl |
4264 | 512 | dnl The `parallel-tests' driver may need to know about EXEEXT, so add the | 744 | dnl The testsuite driver may need to know about EXEEXT, so add the |
4265 | 513 | dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro | 745 | dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This |
4266 | 514 | dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. | 746 | dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. |
4267 | 515 | AC_CONFIG_COMMANDS_PRE(dnl | 747 | AC_CONFIG_COMMANDS_PRE(dnl |
4268 | 516 | [m4_provide_if([_AM_COMPILER_EXEEXT], | 748 | [m4_provide_if([_AM_COMPILER_EXEEXT], |
4269 | 517 | [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl | 749 | [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl |
4273 | 518 | ]) | 750 | |
4274 | 519 | 751 | # POSIX will say in a future version that running "rm -f" with no argument | |
4275 | 520 | dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not | 752 | # is OK; and we want to be able to make that assumption in our Makefile |
4276 | 753 | # recipes. So use an aggressive probe to check that the usage we want is | ||
4277 | 754 | # actually supported "in the wild" to an acceptable degree. | ||
4278 | 755 | # See automake bug#10828. | ||
4279 | 756 | # To make any issue more visible, cause the running configure to be aborted | ||
4280 | 757 | # by default if the 'rm' program in use doesn't match our expectations; the | ||
4281 | 758 | # user can still override this though. | ||
4282 | 759 | if rm -f && rm -fr && rm -rf; then : OK; else | ||
4283 | 760 | cat >&2 <<'END' | ||
4284 | 761 | Oops! | ||
4285 | 762 | |||
4286 | 763 | Your 'rm' program seems unable to run without file operands specified | ||
4287 | 764 | on the command line, even when the '-f' option is present. This is contrary | ||
4288 | 765 | to the behaviour of most rm programs out there, and not conforming with | ||
4289 | 766 | the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> | ||
4290 | 767 | |||
4291 | 768 | Please tell bug-automake@gnu.org about your system, including the value | ||
4292 | 769 | of your $PATH and any error possibly output before this message. This | ||
4293 | 770 | can help us improve future automake versions. | ||
4294 | 771 | |||
4295 | 772 | END | ||
4296 | 773 | if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then | ||
4297 | 774 | echo 'Configuration will proceed anyway, since you have set the' >&2 | ||
4298 | 775 | echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 | ||
4299 | 776 | echo >&2 | ||
4300 | 777 | else | ||
4301 | 778 | cat >&2 <<'END' | ||
4302 | 779 | Aborting the configuration process, to ensure you take notice of the issue. | ||
4303 | 780 | |||
4304 | 781 | You can download and install GNU coreutils to get an 'rm' implementation | ||
4305 | 782 | that behaves properly: <http://www.gnu.org/software/coreutils/>. | ||
4306 | 783 | |||
4307 | 784 | If you want to complete the configuration process using your problematic | ||
4308 | 785 | 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM | ||
4309 | 786 | to "yes", and re-run configure. | ||
4310 | 787 | |||
4311 | 788 | END | ||
4312 | 789 | AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) | ||
4313 | 790 | fi | ||
4314 | 791 | fi]) | ||
4315 | 792 | |||
4316 | 793 | dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not | ||
4317 | 521 | dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further | 794 | dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further |
4318 | 522 | dnl mangled by Autoconf and run in a shell conditional statement. | 795 | dnl mangled by Autoconf and run in a shell conditional statement. |
4319 | 523 | m4_define([_AC_COMPILER_EXEEXT], | 796 | m4_define([_AC_COMPILER_EXEEXT], |
4320 | 524 | m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) | 797 | m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) |
4321 | 525 | 798 | ||
4322 | 526 | |||
4323 | 527 | # When config.status generates a header, we must update the stamp-h file. | 799 | # When config.status generates a header, we must update the stamp-h file. |
4324 | 528 | # This file resides in the same directory as the config header | 800 | # This file resides in the same directory as the config header |
4325 | 529 | # that is generated. The stamp files are numbered to have different names. | 801 | # that is generated. The stamp files are numbered to have different names. |
4326 | @@ -545,7 +817,7 @@ | |||
4327 | 545 | done | 817 | done |
4328 | 546 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) | 818 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) |
4329 | 547 | 819 | ||
4331 | 548 | # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. | 820 | # Copyright (C) 2001-2013 Free Software Foundation, Inc. |
4332 | 549 | # | 821 | # |
4333 | 550 | # This file is free software; the Free Software Foundation | 822 | # This file is free software; the Free Software Foundation |
4334 | 551 | # gives unlimited permission to copy and/or distribute it, | 823 | # gives unlimited permission to copy and/or distribute it, |
4335 | @@ -564,16 +836,14 @@ | |||
4336 | 564 | install_sh="\${SHELL} $am_aux_dir/install-sh" | 836 | install_sh="\${SHELL} $am_aux_dir/install-sh" |
4337 | 565 | esac | 837 | esac |
4338 | 566 | fi | 838 | fi |
4340 | 567 | AC_SUBST(install_sh)]) | 839 | AC_SUBST([install_sh])]) |
4341 | 568 | 840 | ||
4343 | 569 | # Copyright (C) 2003, 2005 Free Software Foundation, Inc. | 841 | # Copyright (C) 2003-2013 Free Software Foundation, Inc. |
4344 | 570 | # | 842 | # |
4345 | 571 | # This file is free software; the Free Software Foundation | 843 | # This file is free software; the Free Software Foundation |
4346 | 572 | # gives unlimited permission to copy and/or distribute it, | 844 | # gives unlimited permission to copy and/or distribute it, |
4347 | 573 | # with or without modifications, as long as this notice is preserved. | 845 | # with or without modifications, as long as this notice is preserved. |
4348 | 574 | 846 | ||
4349 | 575 | # serial 2 | ||
4350 | 576 | |||
4351 | 577 | # Check whether the underlying file-system supports filenames | 847 | # Check whether the underlying file-system supports filenames |
4352 | 578 | # with a leading dot. For instance MS-DOS doesn't. | 848 | # with a leading dot. For instance MS-DOS doesn't. |
4353 | 579 | AC_DEFUN([AM_SET_LEADING_DOT], | 849 | AC_DEFUN([AM_SET_LEADING_DOT], |
4354 | @@ -587,16 +857,50 @@ | |||
4355 | 587 | rmdir .tst 2>/dev/null | 857 | rmdir .tst 2>/dev/null |
4356 | 588 | AC_SUBST([am__leading_dot])]) | 858 | AC_SUBST([am__leading_dot])]) |
4357 | 589 | 859 | ||
4358 | 860 | # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- | ||
4359 | 861 | # From Jim Meyering | ||
4360 | 862 | |||
4361 | 863 | # Copyright (C) 1996-2013 Free Software Foundation, Inc. | ||
4362 | 864 | # | ||
4363 | 865 | # This file is free software; the Free Software Foundation | ||
4364 | 866 | # gives unlimited permission to copy and/or distribute it, | ||
4365 | 867 | # with or without modifications, as long as this notice is preserved. | ||
4366 | 868 | |||
4367 | 869 | # AM_MAINTAINER_MODE([DEFAULT-MODE]) | ||
4368 | 870 | # ---------------------------------- | ||
4369 | 871 | # Control maintainer-specific portions of Makefiles. | ||
4370 | 872 | # Default is to disable them, unless 'enable' is passed literally. | ||
4371 | 873 | # For symmetry, 'disable' may be passed as well. Anyway, the user | ||
4372 | 874 | # can override the default with the --enable/--disable switch. | ||
4373 | 875 | AC_DEFUN([AM_MAINTAINER_MODE], | ||
4374 | 876 | [m4_case(m4_default([$1], [disable]), | ||
4375 | 877 | [enable], [m4_define([am_maintainer_other], [disable])], | ||
4376 | 878 | [disable], [m4_define([am_maintainer_other], [enable])], | ||
4377 | 879 | [m4_define([am_maintainer_other], [enable]) | ||
4378 | 880 | m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) | ||
4379 | 881 | AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) | ||
4380 | 882 | dnl maintainer-mode's default is 'disable' unless 'enable' is passed | ||
4381 | 883 | AC_ARG_ENABLE([maintainer-mode], | ||
4382 | 884 | [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], | ||
4383 | 885 | am_maintainer_other[ make rules and dependencies not useful | ||
4384 | 886 | (and sometimes confusing) to the casual installer])], | ||
4385 | 887 | [USE_MAINTAINER_MODE=$enableval], | ||
4386 | 888 | [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) | ||
4387 | 889 | AC_MSG_RESULT([$USE_MAINTAINER_MODE]) | ||
4388 | 890 | AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) | ||
4389 | 891 | MAINT=$MAINTAINER_MODE_TRUE | ||
4390 | 892 | AC_SUBST([MAINT])dnl | ||
4391 | 893 | ] | ||
4392 | 894 | ) | ||
4393 | 895 | |||
4394 | 590 | # Check to see how 'make' treats includes. -*- Autoconf -*- | 896 | # Check to see how 'make' treats includes. -*- Autoconf -*- |
4395 | 591 | 897 | ||
4397 | 592 | # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. | 898 | # Copyright (C) 2001-2013 Free Software Foundation, Inc. |
4398 | 593 | # | 899 | # |
4399 | 594 | # This file is free software; the Free Software Foundation | 900 | # This file is free software; the Free Software Foundation |
4400 | 595 | # gives unlimited permission to copy and/or distribute it, | 901 | # gives unlimited permission to copy and/or distribute it, |
4401 | 596 | # with or without modifications, as long as this notice is preserved. | 902 | # with or without modifications, as long as this notice is preserved. |
4402 | 597 | 903 | ||
4403 | 598 | # serial 4 | ||
4404 | 599 | |||
4405 | 600 | # AM_MAKE_INCLUDE() | 904 | # AM_MAKE_INCLUDE() |
4406 | 601 | # ----------------- | 905 | # ----------------- |
4407 | 602 | # Check to see how make treats includes. | 906 | # Check to see how make treats includes. |
4408 | @@ -614,7 +918,7 @@ | |||
4409 | 614 | _am_result=none | 918 | _am_result=none |
4410 | 615 | # First try GNU make style include. | 919 | # First try GNU make style include. |
4411 | 616 | echo "include confinc" > confmf | 920 | echo "include confinc" > confmf |
4413 | 617 | # Ignore all kinds of additional output from `make'. | 921 | # Ignore all kinds of additional output from 'make'. |
4414 | 618 | case `$am_make -s -f confmf 2> /dev/null` in #( | 922 | case `$am_make -s -f confmf 2> /dev/null` in #( |
4415 | 619 | *the\ am__doit\ target*) | 923 | *the\ am__doit\ target*) |
4416 | 620 | am__include=include | 924 | am__include=include |
4417 | @@ -641,15 +945,12 @@ | |||
4418 | 641 | 945 | ||
4419 | 642 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- | 946 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- |
4420 | 643 | 947 | ||
4423 | 644 | # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 | 948 | # Copyright (C) 1997-2013 Free Software Foundation, Inc. |
4422 | 645 | # Free Software Foundation, Inc. | ||
4424 | 646 | # | 949 | # |
4425 | 647 | # This file is free software; the Free Software Foundation | 950 | # This file is free software; the Free Software Foundation |
4426 | 648 | # gives unlimited permission to copy and/or distribute it, | 951 | # gives unlimited permission to copy and/or distribute it, |
4427 | 649 | # with or without modifications, as long as this notice is preserved. | 952 | # with or without modifications, as long as this notice is preserved. |
4428 | 650 | 953 | ||
4429 | 651 | # serial 6 | ||
4430 | 652 | |||
4431 | 653 | # AM_MISSING_PROG(NAME, PROGRAM) | 954 | # AM_MISSING_PROG(NAME, PROGRAM) |
4432 | 654 | # ------------------------------ | 955 | # ------------------------------ |
4433 | 655 | AC_DEFUN([AM_MISSING_PROG], | 956 | AC_DEFUN([AM_MISSING_PROG], |
4434 | @@ -657,11 +958,10 @@ | |||
4435 | 657 | $1=${$1-"${am_missing_run}$2"} | 958 | $1=${$1-"${am_missing_run}$2"} |
4436 | 658 | AC_SUBST($1)]) | 959 | AC_SUBST($1)]) |
4437 | 659 | 960 | ||
4438 | 660 | |||
4439 | 661 | # AM_MISSING_HAS_RUN | 961 | # AM_MISSING_HAS_RUN |
4440 | 662 | # ------------------ | 962 | # ------------------ |
4443 | 663 | # Define MISSING if not defined so far and test if it supports --run. | 963 | # Define MISSING if not defined so far and test if it is modern enough. |
4444 | 664 | # If it does, set am_missing_run to use it, otherwise, to nothing. | 964 | # If it is, set am_missing_run to use it, otherwise, to nothing. |
4445 | 665 | AC_DEFUN([AM_MISSING_HAS_RUN], | 965 | AC_DEFUN([AM_MISSING_HAS_RUN], |
4446 | 666 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | 966 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
4447 | 667 | AC_REQUIRE_AUX_FILE([missing])dnl | 967 | AC_REQUIRE_AUX_FILE([missing])dnl |
4448 | @@ -674,63 +974,35 @@ | |||
4449 | 674 | esac | 974 | esac |
4450 | 675 | fi | 975 | fi |
4451 | 676 | # Use eval to expand $SHELL | 976 | # Use eval to expand $SHELL |
4454 | 677 | if eval "$MISSING --run true"; then | 977 | if eval "$MISSING --is-lightweight"; then |
4455 | 678 | am_missing_run="$MISSING --run " | 978 | am_missing_run="$MISSING " |
4456 | 679 | else | 979 | else |
4457 | 680 | am_missing_run= | 980 | am_missing_run= |
4459 | 681 | AC_MSG_WARN([`missing' script is too old or missing]) | 981 | AC_MSG_WARN(['missing' script is too old or missing]) |
4460 | 682 | fi | 982 | fi |
4461 | 683 | ]) | 983 | ]) |
4462 | 684 | 984 | ||
4463 | 685 | # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. | ||
4464 | 686 | # | ||
4465 | 687 | # This file is free software; the Free Software Foundation | ||
4466 | 688 | # gives unlimited permission to copy and/or distribute it, | ||
4467 | 689 | # with or without modifications, as long as this notice is preserved. | ||
4468 | 690 | |||
4469 | 691 | # AM_PROG_MKDIR_P | ||
4470 | 692 | # --------------- | ||
4471 | 693 | # Check for `mkdir -p'. | ||
4472 | 694 | AC_DEFUN([AM_PROG_MKDIR_P], | ||
4473 | 695 | [AC_PREREQ([2.60])dnl | ||
4474 | 696 | AC_REQUIRE([AC_PROG_MKDIR_P])dnl | ||
4475 | 697 | dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, | ||
4476 | 698 | dnl while keeping a definition of mkdir_p for backward compatibility. | ||
4477 | 699 | dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. | ||
4478 | 700 | dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of | ||
4479 | 701 | dnl Makefile.ins that do not define MKDIR_P, so we do our own | ||
4480 | 702 | dnl adjustment using top_builddir (which is defined more often than | ||
4481 | 703 | dnl MKDIR_P). | ||
4482 | 704 | AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl | ||
4483 | 705 | case $mkdir_p in | ||
4484 | 706 | [[\\/$]]* | ?:[[\\/]]*) ;; | ||
4485 | 707 | */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; | ||
4486 | 708 | esac | ||
4487 | 709 | ]) | ||
4488 | 710 | |||
4489 | 711 | # Helper functions for option handling. -*- Autoconf -*- | 985 | # Helper functions for option handling. -*- Autoconf -*- |
4490 | 712 | 986 | ||
4492 | 713 | # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. | 987 | # Copyright (C) 2001-2013 Free Software Foundation, Inc. |
4493 | 714 | # | 988 | # |
4494 | 715 | # This file is free software; the Free Software Foundation | 989 | # This file is free software; the Free Software Foundation |
4495 | 716 | # gives unlimited permission to copy and/or distribute it, | 990 | # gives unlimited permission to copy and/or distribute it, |
4496 | 717 | # with or without modifications, as long as this notice is preserved. | 991 | # with or without modifications, as long as this notice is preserved. |
4497 | 718 | 992 | ||
4498 | 719 | # serial 4 | ||
4499 | 720 | |||
4500 | 721 | # _AM_MANGLE_OPTION(NAME) | 993 | # _AM_MANGLE_OPTION(NAME) |
4501 | 722 | # ----------------------- | 994 | # ----------------------- |
4502 | 723 | AC_DEFUN([_AM_MANGLE_OPTION], | 995 | AC_DEFUN([_AM_MANGLE_OPTION], |
4503 | 724 | [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) | 996 | [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) |
4504 | 725 | 997 | ||
4505 | 726 | # _AM_SET_OPTION(NAME) | 998 | # _AM_SET_OPTION(NAME) |
4507 | 727 | # ------------------------------ | 999 | # -------------------- |
4508 | 728 | # Set option NAME. Presently that only means defining a flag for this option. | 1000 | # Set option NAME. Presently that only means defining a flag for this option. |
4509 | 729 | AC_DEFUN([_AM_SET_OPTION], | 1001 | AC_DEFUN([_AM_SET_OPTION], |
4511 | 730 | [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) | 1002 | [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) |
4512 | 731 | 1003 | ||
4513 | 732 | # _AM_SET_OPTIONS(OPTIONS) | 1004 | # _AM_SET_OPTIONS(OPTIONS) |
4515 | 733 | # ---------------------------------- | 1005 | # ------------------------ |
4516 | 734 | # OPTIONS is a space-separated list of Automake options. | 1006 | # OPTIONS is a space-separated list of Automake options. |
4517 | 735 | AC_DEFUN([_AM_SET_OPTIONS], | 1007 | AC_DEFUN([_AM_SET_OPTIONS], |
4518 | 736 | [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) | 1008 | [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) |
4519 | @@ -741,24 +1013,82 @@ | |||
4520 | 741 | AC_DEFUN([_AM_IF_OPTION], | 1013 | AC_DEFUN([_AM_IF_OPTION], |
4521 | 742 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) | 1014 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
4522 | 743 | 1015 | ||
4523 | 1016 | # Copyright (C) 1999-2013 Free Software Foundation, Inc. | ||
4524 | 1017 | # | ||
4525 | 1018 | # This file is free software; the Free Software Foundation | ||
4526 | 1019 | # gives unlimited permission to copy and/or distribute it, | ||
4527 | 1020 | # with or without modifications, as long as this notice is preserved. | ||
4528 | 1021 | |||
4529 | 1022 | # _AM_PROG_CC_C_O | ||
4530 | 1023 | # --------------- | ||
4531 | 1024 | # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC | ||
4532 | 1025 | # to automatically call this. | ||
4533 | 1026 | AC_DEFUN([_AM_PROG_CC_C_O], | ||
4534 | 1027 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | ||
4535 | 1028 | AC_REQUIRE_AUX_FILE([compile])dnl | ||
4536 | 1029 | AC_LANG_PUSH([C])dnl | ||
4537 | 1030 | AC_CACHE_CHECK( | ||
4538 | 1031 | [whether $CC understands -c and -o together], | ||
4539 | 1032 | [am_cv_prog_cc_c_o], | ||
4540 | 1033 | [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) | ||
4541 | 1034 | # Make sure it works both with $CC and with simple cc. | ||
4542 | 1035 | # Following AC_PROG_CC_C_O, we do the test twice because some | ||
4543 | 1036 | # compilers refuse to overwrite an existing .o file with -o, | ||
4544 | 1037 | # though they will create one. | ||
4545 | 1038 | am_cv_prog_cc_c_o=yes | ||
4546 | 1039 | for am_i in 1 2; do | ||
4547 | 1040 | if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ | ||
4548 | 1041 | && test -f conftest2.$ac_objext; then | ||
4549 | 1042 | : OK | ||
4550 | 1043 | else | ||
4551 | 1044 | am_cv_prog_cc_c_o=no | ||
4552 | 1045 | break | ||
4553 | 1046 | fi | ||
4554 | 1047 | done | ||
4555 | 1048 | rm -f core conftest* | ||
4556 | 1049 | unset am_i]) | ||
4557 | 1050 | if test "$am_cv_prog_cc_c_o" != yes; then | ||
4558 | 1051 | # Losing compiler, so override with the script. | ||
4559 | 1052 | # FIXME: It is wrong to rewrite CC. | ||
4560 | 1053 | # But if we don't then we get into trouble of one sort or another. | ||
4561 | 1054 | # A longer-term fix would be to have automake use am__CC in this case, | ||
4562 | 1055 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | ||
4563 | 1056 | CC="$am_aux_dir/compile $CC" | ||
4564 | 1057 | fi | ||
4565 | 1058 | AC_LANG_POP([C])]) | ||
4566 | 1059 | |||
4567 | 1060 | # For backward compatibility. | ||
4568 | 1061 | AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) | ||
4569 | 1062 | |||
4570 | 1063 | # Copyright (C) 2001-2013 Free Software Foundation, Inc. | ||
4571 | 1064 | # | ||
4572 | 1065 | # This file is free software; the Free Software Foundation | ||
4573 | 1066 | # gives unlimited permission to copy and/or distribute it, | ||
4574 | 1067 | # with or without modifications, as long as this notice is preserved. | ||
4575 | 1068 | |||
4576 | 1069 | # AM_RUN_LOG(COMMAND) | ||
4577 | 1070 | # ------------------- | ||
4578 | 1071 | # Run COMMAND, save the exit status in ac_status, and log it. | ||
4579 | 1072 | # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) | ||
4580 | 1073 | AC_DEFUN([AM_RUN_LOG], | ||
4581 | 1074 | [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD | ||
4582 | 1075 | ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD | ||
4583 | 1076 | ac_status=$? | ||
4584 | 1077 | echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD | ||
4585 | 1078 | (exit $ac_status); }]) | ||
4586 | 1079 | |||
4587 | 744 | # Check to make sure that the build environment is sane. -*- Autoconf -*- | 1080 | # Check to make sure that the build environment is sane. -*- Autoconf -*- |
4588 | 745 | 1081 | ||
4591 | 746 | # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 | 1082 | # Copyright (C) 1996-2013 Free Software Foundation, Inc. |
4590 | 747 | # Free Software Foundation, Inc. | ||
4592 | 748 | # | 1083 | # |
4593 | 749 | # This file is free software; the Free Software Foundation | 1084 | # This file is free software; the Free Software Foundation |
4594 | 750 | # gives unlimited permission to copy and/or distribute it, | 1085 | # gives unlimited permission to copy and/or distribute it, |
4595 | 751 | # with or without modifications, as long as this notice is preserved. | 1086 | # with or without modifications, as long as this notice is preserved. |
4596 | 752 | 1087 | ||
4597 | 753 | # serial 5 | ||
4598 | 754 | |||
4599 | 755 | # AM_SANITY_CHECK | 1088 | # AM_SANITY_CHECK |
4600 | 756 | # --------------- | 1089 | # --------------- |
4601 | 757 | AC_DEFUN([AM_SANITY_CHECK], | 1090 | AC_DEFUN([AM_SANITY_CHECK], |
4602 | 758 | [AC_MSG_CHECKING([whether build environment is sane]) | 1091 | [AC_MSG_CHECKING([whether build environment is sane]) |
4603 | 759 | # Just in case | ||
4604 | 760 | sleep 1 | ||
4605 | 761 | echo timestamp > conftest.file | ||
4606 | 762 | # Reject unsafe characters in $srcdir or the absolute working directory | 1092 | # Reject unsafe characters in $srcdir or the absolute working directory |
4607 | 763 | # name. Accept space and tab only in the latter. | 1093 | # name. Accept space and tab only in the latter. |
4608 | 764 | am_lf=' | 1094 | am_lf=' |
4609 | @@ -769,32 +1099,40 @@ | |||
4610 | 769 | esac | 1099 | esac |
4611 | 770 | case $srcdir in | 1100 | case $srcdir in |
4612 | 771 | *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) | 1101 | *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) |
4614 | 772 | AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; | 1102 | AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; |
4615 | 773 | esac | 1103 | esac |
4616 | 774 | 1104 | ||
4618 | 775 | # Do `set' in a subshell so we don't clobber the current shell's | 1105 | # Do 'set' in a subshell so we don't clobber the current shell's |
4619 | 776 | # arguments. Must try -L first in case configure is actually a | 1106 | # arguments. Must try -L first in case configure is actually a |
4620 | 777 | # symlink; some systems play weird games with the mod time of symlinks | 1107 | # symlink; some systems play weird games with the mod time of symlinks |
4621 | 778 | # (eg FreeBSD returns the mod time of the symlink's containing | 1108 | # (eg FreeBSD returns the mod time of the symlink's containing |
4622 | 779 | # directory). | 1109 | # directory). |
4623 | 780 | if ( | 1110 | if ( |
4641 | 781 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` | 1111 | am_has_slept=no |
4642 | 782 | if test "$[*]" = "X"; then | 1112 | for am_try in 1 2; do |
4643 | 783 | # -L didn't work. | 1113 | echo "timestamp, slept: $am_has_slept" > conftest.file |
4644 | 784 | set X `ls -t "$srcdir/configure" conftest.file` | 1114 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` |
4645 | 785 | fi | 1115 | if test "$[*]" = "X"; then |
4646 | 786 | rm -f conftest.file | 1116 | # -L didn't work. |
4647 | 787 | if test "$[*]" != "X $srcdir/configure conftest.file" \ | 1117 | set X `ls -t "$srcdir/configure" conftest.file` |
4648 | 788 | && test "$[*]" != "X conftest.file $srcdir/configure"; then | 1118 | fi |
4649 | 789 | 1119 | if test "$[*]" != "X $srcdir/configure conftest.file" \ | |
4650 | 790 | # If neither matched, then we have a broken ls. This can happen | 1120 | && test "$[*]" != "X conftest.file $srcdir/configure"; then |
4651 | 791 | # if, for instance, CONFIG_SHELL is bash and it inherits a | 1121 | |
4652 | 792 | # broken ls alias from the environment. This has actually | 1122 | # If neither matched, then we have a broken ls. This can happen |
4653 | 793 | # happened. Such a system could not be considered "sane". | 1123 | # if, for instance, CONFIG_SHELL is bash and it inherits a |
4654 | 794 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken | 1124 | # broken ls alias from the environment. This has actually |
4655 | 795 | alias in your environment]) | 1125 | # happened. Such a system could not be considered "sane". |
4656 | 796 | fi | 1126 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
4657 | 797 | 1127 | alias in your environment]) | |
4658 | 1128 | fi | ||
4659 | 1129 | if test "$[2]" = conftest.file || test $am_try -eq 2; then | ||
4660 | 1130 | break | ||
4661 | 1131 | fi | ||
4662 | 1132 | # Just in case. | ||
4663 | 1133 | sleep 1 | ||
4664 | 1134 | am_has_slept=yes | ||
4665 | 1135 | done | ||
4666 | 798 | test "$[2]" = conftest.file | 1136 | test "$[2]" = conftest.file |
4667 | 799 | ) | 1137 | ) |
4668 | 800 | then | 1138 | then |
4669 | @@ -804,9 +1142,85 @@ | |||
4670 | 804 | AC_MSG_ERROR([newly created file is older than distributed files! | 1142 | AC_MSG_ERROR([newly created file is older than distributed files! |
4671 | 805 | Check your system clock]) | 1143 | Check your system clock]) |
4672 | 806 | fi | 1144 | fi |
4676 | 807 | AC_MSG_RESULT(yes)]) | 1145 | AC_MSG_RESULT([yes]) |
4677 | 808 | 1146 | # If we didn't sleep, we still need to ensure time stamps of config.status and | |
4678 | 809 | # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. | 1147 | # generated files are strictly newer. |
4679 | 1148 | am_sleep_pid= | ||
4680 | 1149 | if grep 'slept: no' conftest.file >/dev/null 2>&1; then | ||
4681 | 1150 | ( sleep 1 ) & | ||
4682 | 1151 | am_sleep_pid=$! | ||
4683 | 1152 | fi | ||
4684 | 1153 | AC_CONFIG_COMMANDS_PRE( | ||
4685 | 1154 | [AC_MSG_CHECKING([that generated files are newer than configure]) | ||
4686 | 1155 | if test -n "$am_sleep_pid"; then | ||
4687 | 1156 | # Hide warnings about reused PIDs. | ||
4688 | 1157 | wait $am_sleep_pid 2>/dev/null | ||
4689 | 1158 | fi | ||
4690 | 1159 | AC_MSG_RESULT([done])]) | ||
4691 | 1160 | rm -f conftest.file | ||
4692 | 1161 | ]) | ||
4693 | 1162 | |||
4694 | 1163 | # Copyright (C) 2009-2013 Free Software Foundation, Inc. | ||
4695 | 1164 | # | ||
4696 | 1165 | # This file is free software; the Free Software Foundation | ||
4697 | 1166 | # gives unlimited permission to copy and/or distribute it, | ||
4698 | 1167 | # with or without modifications, as long as this notice is preserved. | ||
4699 | 1168 | |||
4700 | 1169 | # AM_SILENT_RULES([DEFAULT]) | ||
4701 | 1170 | # -------------------------- | ||
4702 | 1171 | # Enable less verbose build rules; with the default set to DEFAULT | ||
4703 | 1172 | # ("yes" being less verbose, "no" or empty being verbose). | ||
4704 | 1173 | AC_DEFUN([AM_SILENT_RULES], | ||
4705 | 1174 | [AC_ARG_ENABLE([silent-rules], [dnl | ||
4706 | 1175 | AS_HELP_STRING( | ||
4707 | 1176 | [--enable-silent-rules], | ||
4708 | 1177 | [less verbose build output (undo: "make V=1")]) | ||
4709 | 1178 | AS_HELP_STRING( | ||
4710 | 1179 | [--disable-silent-rules], | ||
4711 | 1180 | [verbose build output (undo: "make V=0")])dnl | ||
4712 | 1181 | ]) | ||
4713 | 1182 | case $enable_silent_rules in @%:@ ((( | ||
4714 | 1183 | yes) AM_DEFAULT_VERBOSITY=0;; | ||
4715 | 1184 | no) AM_DEFAULT_VERBOSITY=1;; | ||
4716 | 1185 | *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; | ||
4717 | 1186 | esac | ||
4718 | 1187 | dnl | ||
4719 | 1188 | dnl A few 'make' implementations (e.g., NonStop OS and NextStep) | ||
4720 | 1189 | dnl do not support nested variable expansions. | ||
4721 | 1190 | dnl See automake bug#9928 and bug#10237. | ||
4722 | 1191 | am_make=${MAKE-make} | ||
4723 | 1192 | AC_CACHE_CHECK([whether $am_make supports nested variables], | ||
4724 | 1193 | [am_cv_make_support_nested_variables], | ||
4725 | 1194 | [if AS_ECHO([['TRUE=$(BAR$(V)) | ||
4726 | 1195 | BAR0=false | ||
4727 | 1196 | BAR1=true | ||
4728 | 1197 | V=1 | ||
4729 | 1198 | am__doit: | ||
4730 | 1199 | @$(TRUE) | ||
4731 | 1200 | .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then | ||
4732 | 1201 | am_cv_make_support_nested_variables=yes | ||
4733 | 1202 | else | ||
4734 | 1203 | am_cv_make_support_nested_variables=no | ||
4735 | 1204 | fi]) | ||
4736 | 1205 | if test $am_cv_make_support_nested_variables = yes; then | ||
4737 | 1206 | dnl Using '$V' instead of '$(V)' breaks IRIX make. | ||
4738 | 1207 | AM_V='$(V)' | ||
4739 | 1208 | AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' | ||
4740 | 1209 | else | ||
4741 | 1210 | AM_V=$AM_DEFAULT_VERBOSITY | ||
4742 | 1211 | AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY | ||
4743 | 1212 | fi | ||
4744 | 1213 | AC_SUBST([AM_V])dnl | ||
4745 | 1214 | AM_SUBST_NOTMAKE([AM_V])dnl | ||
4746 | 1215 | AC_SUBST([AM_DEFAULT_V])dnl | ||
4747 | 1216 | AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl | ||
4748 | 1217 | AC_SUBST([AM_DEFAULT_VERBOSITY])dnl | ||
4749 | 1218 | AM_BACKSLASH='\' | ||
4750 | 1219 | AC_SUBST([AM_BACKSLASH])dnl | ||
4751 | 1220 | _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl | ||
4752 | 1221 | ]) | ||
4753 | 1222 | |||
4754 | 1223 | # Copyright (C) 2001-2013 Free Software Foundation, Inc. | ||
4755 | 810 | # | 1224 | # |
4756 | 811 | # This file is free software; the Free Software Foundation | 1225 | # This file is free software; the Free Software Foundation |
4757 | 812 | # gives unlimited permission to copy and/or distribute it, | 1226 | # gives unlimited permission to copy and/or distribute it, |
4758 | @@ -814,34 +1228,32 @@ | |||
4759 | 814 | 1228 | ||
4760 | 815 | # AM_PROG_INSTALL_STRIP | 1229 | # AM_PROG_INSTALL_STRIP |
4761 | 816 | # --------------------- | 1230 | # --------------------- |
4763 | 817 | # One issue with vendor `install' (even GNU) is that you can't | 1231 | # One issue with vendor 'install' (even GNU) is that you can't |
4764 | 818 | # specify the program used to strip binaries. This is especially | 1232 | # specify the program used to strip binaries. This is especially |
4765 | 819 | # annoying in cross-compiling environments, where the build's strip | 1233 | # annoying in cross-compiling environments, where the build's strip |
4766 | 820 | # is unlikely to handle the host's binaries. | 1234 | # is unlikely to handle the host's binaries. |
4767 | 821 | # Fortunately install-sh will honor a STRIPPROG variable, so we | 1235 | # Fortunately install-sh will honor a STRIPPROG variable, so we |
4769 | 822 | # always use install-sh in `make install-strip', and initialize | 1236 | # always use install-sh in "make install-strip", and initialize |
4770 | 823 | # STRIPPROG with the value of the STRIP variable (set by the user). | 1237 | # STRIPPROG with the value of the STRIP variable (set by the user). |
4771 | 824 | AC_DEFUN([AM_PROG_INSTALL_STRIP], | 1238 | AC_DEFUN([AM_PROG_INSTALL_STRIP], |
4772 | 825 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl | 1239 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
4775 | 826 | # Installed binaries are usually stripped using `strip' when the user | 1240 | # Installed binaries are usually stripped using 'strip' when the user |
4776 | 827 | # run `make install-strip'. However `strip' might not be the right | 1241 | # run "make install-strip". However 'strip' might not be the right |
4777 | 828 | # tool to use in cross-compilation environments, therefore Automake | 1242 | # tool to use in cross-compilation environments, therefore Automake |
4780 | 829 | # will honor the `STRIP' environment variable to overrule this program. | 1243 | # will honor the 'STRIP' environment variable to overrule this program. |
4781 | 830 | dnl Don't test for $cross_compiling = yes, because it might be `maybe'. | 1244 | dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. |
4782 | 831 | if test "$cross_compiling" != no; then | 1245 | if test "$cross_compiling" != no; then |
4783 | 832 | AC_CHECK_TOOL([STRIP], [strip], :) | 1246 | AC_CHECK_TOOL([STRIP], [strip], :) |
4784 | 833 | fi | 1247 | fi |
4785 | 834 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | 1248 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" |
4786 | 835 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) | 1249 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
4787 | 836 | 1250 | ||
4789 | 837 | # Copyright (C) 2006, 2008 Free Software Foundation, Inc. | 1251 | # Copyright (C) 2006-2013 Free Software Foundation, Inc. |
4790 | 838 | # | 1252 | # |
4791 | 839 | # This file is free software; the Free Software Foundation | 1253 | # This file is free software; the Free Software Foundation |
4792 | 840 | # gives unlimited permission to copy and/or distribute it, | 1254 | # gives unlimited permission to copy and/or distribute it, |
4793 | 841 | # with or without modifications, as long as this notice is preserved. | 1255 | # with or without modifications, as long as this notice is preserved. |
4794 | 842 | 1256 | ||
4795 | 843 | # serial 2 | ||
4796 | 844 | |||
4797 | 845 | # _AM_SUBST_NOTMAKE(VARIABLE) | 1257 | # _AM_SUBST_NOTMAKE(VARIABLE) |
4798 | 846 | # --------------------------- | 1258 | # --------------------------- |
4799 | 847 | # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. | 1259 | # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. |
4800 | @@ -849,24 +1261,22 @@ | |||
4801 | 849 | AC_DEFUN([_AM_SUBST_NOTMAKE]) | 1261 | AC_DEFUN([_AM_SUBST_NOTMAKE]) |
4802 | 850 | 1262 | ||
4803 | 851 | # AM_SUBST_NOTMAKE(VARIABLE) | 1263 | # AM_SUBST_NOTMAKE(VARIABLE) |
4805 | 852 | # --------------------------- | 1264 | # -------------------------- |
4806 | 853 | # Public sister of _AM_SUBST_NOTMAKE. | 1265 | # Public sister of _AM_SUBST_NOTMAKE. |
4807 | 854 | AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) | 1266 | AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) |
4808 | 855 | 1267 | ||
4809 | 856 | # Check how to create a tarball. -*- Autoconf -*- | 1268 | # Check how to create a tarball. -*- Autoconf -*- |
4810 | 857 | 1269 | ||
4812 | 858 | # Copyright (C) 2004, 2005 Free Software Foundation, Inc. | 1270 | # Copyright (C) 2004-2013 Free Software Foundation, Inc. |
4813 | 859 | # | 1271 | # |
4814 | 860 | # This file is free software; the Free Software Foundation | 1272 | # This file is free software; the Free Software Foundation |
4815 | 861 | # gives unlimited permission to copy and/or distribute it, | 1273 | # gives unlimited permission to copy and/or distribute it, |
4816 | 862 | # with or without modifications, as long as this notice is preserved. | 1274 | # with or without modifications, as long as this notice is preserved. |
4817 | 863 | 1275 | ||
4818 | 864 | # serial 2 | ||
4819 | 865 | |||
4820 | 866 | # _AM_PROG_TAR(FORMAT) | 1276 | # _AM_PROG_TAR(FORMAT) |
4821 | 867 | # -------------------- | 1277 | # -------------------- |
4822 | 868 | # Check how to create a tarball in format FORMAT. | 1278 | # Check how to create a tarball in format FORMAT. |
4824 | 869 | # FORMAT should be one of `v7', `ustar', or `pax'. | 1279 | # FORMAT should be one of 'v7', 'ustar', or 'pax'. |
4825 | 870 | # | 1280 | # |
4826 | 871 | # Substitute a variable $(am__tar) that is a command | 1281 | # Substitute a variable $(am__tar) that is a command |
4827 | 872 | # writing to stdout a FORMAT-tarball containing the directory | 1282 | # writing to stdout a FORMAT-tarball containing the directory |
4828 | @@ -876,75 +1286,114 @@ | |||
4829 | 876 | # Substitute a variable $(am__untar) that extract such | 1286 | # Substitute a variable $(am__untar) that extract such |
4830 | 877 | # a tarball read from stdin. | 1287 | # a tarball read from stdin. |
4831 | 878 | # $(am__untar) < result.tar | 1288 | # $(am__untar) < result.tar |
4832 | 1289 | # | ||
4833 | 879 | AC_DEFUN([_AM_PROG_TAR], | 1290 | AC_DEFUN([_AM_PROG_TAR], |
4836 | 880 | [# Always define AMTAR for backward compatibility. | 1291 | [# Always define AMTAR for backward compatibility. Yes, it's still used |
4837 | 881 | AM_MISSING_PROG([AMTAR], [tar]) | 1292 | # in the wild :-( We should find a proper way to deprecate it ... |
4838 | 1293 | AC_SUBST([AMTAR], ['$${TAR-tar}']) | ||
4839 | 1294 | |||
4840 | 1295 | # We'll loop over all known methods to create a tar archive until one works. | ||
4841 | 1296 | _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' | ||
4842 | 1297 | |||
4843 | 882 | m4_if([$1], [v7], | 1298 | m4_if([$1], [v7], |
4909 | 883 | [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], | 1299 | [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], |
4910 | 884 | [m4_case([$1], [ustar],, [pax],, | 1300 | |
4911 | 885 | [m4_fatal([Unknown tar format])]) | 1301 | [m4_case([$1], |
4912 | 886 | AC_MSG_CHECKING([how to create a $1 tar archive]) | 1302 | [ustar], |
4913 | 887 | # Loop over all known methods to create a tar archive until one works. | 1303 | [# The POSIX 1988 'ustar' format is defined with fixed-size fields. |
4914 | 888 | _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' | 1304 | # There is notably a 21 bits limit for the UID and the GID. In fact, |
4915 | 889 | _am_tools=${am_cv_prog_tar_$1-$_am_tools} | 1305 | # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 |
4916 | 890 | # Do not fold the above two line into one, because Tru64 sh and | 1306 | # and bug#13588). |
4917 | 891 | # Solaris sh will not grok spaces in the rhs of `-'. | 1307 | am_max_uid=2097151 # 2^21 - 1 |
4918 | 892 | for _am_tool in $_am_tools | 1308 | am_max_gid=$am_max_uid |
4919 | 893 | do | 1309 | # The $UID and $GID variables are not portable, so we need to resort |
4920 | 894 | case $_am_tool in | 1310 | # to the POSIX-mandated id(1) utility. Errors in the 'id' calls |
4921 | 895 | gnutar) | 1311 | # below are definitely unexpected, so allow the users to see them |
4922 | 896 | for _am_tar in tar gnutar gtar; | 1312 | # (that is, avoid stderr redirection). |
4923 | 897 | do | 1313 | am_uid=`id -u || echo unknown` |
4924 | 898 | AM_RUN_LOG([$_am_tar --version]) && break | 1314 | am_gid=`id -g || echo unknown` |
4925 | 899 | done | 1315 | AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) |
4926 | 900 | am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' | 1316 | if test $am_uid -le $am_max_uid; then |
4927 | 901 | am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' | 1317 | AC_MSG_RESULT([yes]) |
4928 | 902 | am__untar="$_am_tar -xf -" | 1318 | else |
4929 | 903 | ;; | 1319 | AC_MSG_RESULT([no]) |
4930 | 904 | plaintar) | 1320 | _am_tools=none |
4931 | 905 | # Must skip GNU tar: if it does not support --format= it doesn't create | 1321 | fi |
4932 | 906 | # ustar tarball either. | 1322 | AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) |
4933 | 907 | (tar --version) >/dev/null 2>&1 && continue | 1323 | if test $am_gid -le $am_max_gid; then |
4934 | 908 | am__tar='tar chf - "$$tardir"' | 1324 | AC_MSG_RESULT([yes]) |
4935 | 909 | am__tar_='tar chf - "$tardir"' | 1325 | else |
4936 | 910 | am__untar='tar xf -' | 1326 | AC_MSG_RESULT([no]) |
4937 | 911 | ;; | 1327 | _am_tools=none |
4938 | 912 | pax) | 1328 | fi], |
4939 | 913 | am__tar='pax -L -x $1 -w "$$tardir"' | 1329 | |
4940 | 914 | am__tar_='pax -L -x $1 -w "$tardir"' | 1330 | [pax], |
4941 | 915 | am__untar='pax -r' | 1331 | [], |
4942 | 916 | ;; | 1332 | |
4943 | 917 | cpio) | 1333 | [m4_fatal([Unknown tar format])]) |
4944 | 918 | am__tar='find "$$tardir" -print | cpio -o -H $1 -L' | 1334 | |
4945 | 919 | am__tar_='find "$tardir" -print | cpio -o -H $1 -L' | 1335 | AC_MSG_CHECKING([how to create a $1 tar archive]) |
4946 | 920 | am__untar='cpio -i -H $1 -d' | 1336 | |
4947 | 921 | ;; | 1337 | # Go ahead even if we have the value already cached. We do so because we |
4948 | 922 | none) | 1338 | # need to set the values for the 'am__tar' and 'am__untar' variables. |
4949 | 923 | am__tar=false | 1339 | _am_tools=${am_cv_prog_tar_$1-$_am_tools} |
4950 | 924 | am__tar_=false | 1340 | |
4951 | 925 | am__untar=false | 1341 | for _am_tool in $_am_tools; do |
4952 | 926 | ;; | 1342 | case $_am_tool in |
4953 | 927 | esac | 1343 | gnutar) |
4954 | 928 | 1344 | for _am_tar in tar gnutar gtar; do | |
4955 | 929 | # If the value was cached, stop now. We just wanted to have am__tar | 1345 | AM_RUN_LOG([$_am_tar --version]) && break |
4956 | 930 | # and am__untar set. | 1346 | done |
4957 | 931 | test -n "${am_cv_prog_tar_$1}" && break | 1347 | am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' |
4958 | 932 | 1348 | am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' | |
4959 | 933 | # tar/untar a dummy directory, and stop if the command works | 1349 | am__untar="$_am_tar -xf -" |
4960 | 934 | rm -rf conftest.dir | 1350 | ;; |
4961 | 935 | mkdir conftest.dir | 1351 | plaintar) |
4962 | 936 | echo GrepMe > conftest.dir/file | 1352 | # Must skip GNU tar: if it does not support --format= it doesn't create |
4963 | 937 | AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) | 1353 | # ustar tarball either. |
4964 | 938 | rm -rf conftest.dir | 1354 | (tar --version) >/dev/null 2>&1 && continue |
4965 | 939 | if test -s conftest.tar; then | 1355 | am__tar='tar chf - "$$tardir"' |
4966 | 940 | AM_RUN_LOG([$am__untar <conftest.tar]) | 1356 | am__tar_='tar chf - "$tardir"' |
4967 | 941 | grep GrepMe conftest.dir/file >/dev/null 2>&1 && break | 1357 | am__untar='tar xf -' |
4968 | 942 | fi | 1358 | ;; |
4969 | 943 | done | 1359 | pax) |
4970 | 944 | rm -rf conftest.dir | 1360 | am__tar='pax -L -x $1 -w "$$tardir"' |
4971 | 945 | 1361 | am__tar_='pax -L -x $1 -w "$tardir"' | |
4972 | 946 | AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) | 1362 | am__untar='pax -r' |
4973 | 947 | AC_MSG_RESULT([$am_cv_prog_tar_$1])]) | 1363 | ;; |
4974 | 1364 | cpio) | ||
4975 | 1365 | am__tar='find "$$tardir" -print | cpio -o -H $1 -L' | ||
4976 | 1366 | am__tar_='find "$tardir" -print | cpio -o -H $1 -L' | ||
4977 | 1367 | am__untar='cpio -i -H $1 -d' | ||
4978 | 1368 | ;; | ||
4979 | 1369 | none) | ||
4980 | 1370 | am__tar=false | ||
4981 | 1371 | am__tar_=false | ||
4982 | 1372 | am__untar=false | ||
4983 | 1373 | ;; | ||
4984 | 1374 | esac | ||
4985 | 1375 | |||
4986 | 1376 | # If the value was cached, stop now. We just wanted to have am__tar | ||
4987 | 1377 | # and am__untar set. | ||
4988 | 1378 | test -n "${am_cv_prog_tar_$1}" && break | ||
4989 | 1379 | |||
4990 | 1380 | # tar/untar a dummy directory, and stop if the command works. | ||
4991 | 1381 | rm -rf conftest.dir | ||
4992 | 1382 | mkdir conftest.dir | ||
4993 | 1383 | echo GrepMe > conftest.dir/file | ||
4994 | 1384 | AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) | ||
4995 | 1385 | rm -rf conftest.dir | ||
4996 | 1386 | if test -s conftest.tar; then | ||
4997 | 1387 | AM_RUN_LOG([$am__untar <conftest.tar]) | ||
4998 | 1388 | AM_RUN_LOG([cat conftest.dir/file]) | ||
4999 | 1389 | grep GrepMe conftest.dir/file >/dev/null 2>&1 && break | ||
5000 | 1390 | fi |
The diff has been truncated for viewing.
I don't think this works very well, can you fix? Might be an update to sagan-rules.
laney@raleigh> sagan sagan/sagan. log! .conf file. [/etc/sagan- rules/classific ation.config] rules/reference .config] rules/gen- msg.map] rules/gen- msg.map)
[E] [sagan.c, line 392] Cannot open /var/log/
laney@raleigh> sudo sagan
[*] Loading classifications
[*] 46 classifications loaded
[*] Loading references.conf file. [/etc/sagan-
[*] 6 references loaded.
[*] Loading gen-msg.map file. [/etc/sagan-
[E] [sagan-gen-msg.c, line 62] Cannot open generator file (/etc/sagan-