Merge lp:~noskcaj/ubuntu/vivid/sagan/liblognorm-transition into lp:ubuntu/vivid/sagan

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
Reviewer Review Type Date Requested Status
Iain Lane Needs Fixing
Review via email: mp+242573@code.launchpad.net

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.
Revision history for this message
Iain Lane (laney) wrote :

I don't think this works very well, can you fix? Might be an update to sagan-rules.

laney@raleigh> sagan
[E] [sagan.c, line 392] Cannot open /var/log/sagan/sagan.log!
laney@raleigh> sudo sagan
[*] Loading classifications.conf file. [/etc/sagan-rules/classification.config]
[*] 46 classifications loaded
[*] Loading references.conf file. [/etc/sagan-rules/reference.config]
[*] 6 references loaded.
[*] Loading gen-msg.map file. [/etc/sagan-rules/gen-msg.map]
[E] [sagan-gen-msg.c, line 62] Cannot open generator file (/etc/sagan-rules/gen-msg.map)

review: Needs Fixing

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

Subscribers

People subscribed via source and target branches

to all changes: