Index: dspam_dump.1 =================================================================== --- dspam_dump.1 (.../vendor/dspam/3.0.0) (revision 39233) +++ dspam_dump.1 (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -1,80 +0,0 @@ -.\" -*- nroff -*- -.\" -.\" dspam_dump3.0 -.\" -.\" Authors: Jonathan A. Zdziarski -.\" -.\" Copyright (c) 2004 Network Dweebs Corporation -.\" All rights reserved -.\" -.TH dspam_dump 1 "May 31, 2004" "DSPAM" "DSPAM" - -.SH NAME -dspam_dump - produce a dump of a user's metadata - -.SH SYNOPSIS -.na -.B dspam_dump -[\c -.BI \ username \fR -] -[\c -.BI \ token \fR -] - -.ad -.SH DESCRIPTION -.LP -.B dspam_dump -dumps a user's metadata dictionary to stdout. This can be used to view the -entire contents of a user's dictionary, or used in combination with grep to view -a subset of data. The output provides the token's stored value (in CRC64 -format), the number of spam and nonspam hits, and the token's computed -probability. - -.SH OPTIONS -.LP -.ne 3 -.TP -.BI \ username \fR\c -The username of the user to dump - -.n3 -.TP -.BI \ token \fR\c -The text string of the token to search for and dump. If no token is specified, -.B all tokens -will be dumped to stdout. - -.SH EXAMPLES -.B dspam_dump user "Subject*Viagra" - -Dumps the token Subject*Viagra, which represents the word Viagra in the Subject -header, for the user specified. - -.SH EXIT VALUE -.LP -.ne 3 -.PD 0 -.TP -.B 0 -Operation was successful. -.ne 3 -.TP -.B other -Operation resulted in an error. -.PD - -.SH AUTHORS -.LP - -Jonathan A. Zdziarski - -For more information, see http://www.nuclearelephant.com. - -.SH SEE ALSO -.BR dspam (1), -.BR dspam_stats (1), -.BR dspam_corpus (1), -.BR dspam_clean (1), -.BR dspam_merge (1) Index: dspam_clean.1 =================================================================== --- dspam_clean.1 (.../vendor/dspam/3.0.0) (revision 39233) +++ dspam_clean.1 (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -1,110 +0,0 @@ -.\" -*- nroff -*- -.\" -.\" dspam_clean3.0 -.\" -.\" Authors: Jonathan A. Zdziarski -.\" -.\" Copyright (c) 2004 Network Dweebs Corporation -.\" All rights reserved -.\" -.TH dspam_clean 1 "May 31, 2004" "DSPAM" "DSPAM" - -.SH NAME -dspam_clean - perform periodic maintenance of metadata - -.SH SYNOPSIS -.na -.B dspam_clean -[\c -.I \-s[signature_life]\fR\c -] -[\c -.I \-p[probability_life]\fR\c -] -[\c -.I \-u[sl,hcl,shl,ihl]\fR -] -[\c -.I \ user1 user2 ... userN \fR -] - -.ad -.SH DESCRIPTION -.LP -.B dspam_clean -is used to perform periodic housecleaning on DSPAM's metadata dictionary by -deleting old or useless data. - -.SH OPTIONS -.LP -.ne 3 -.TP -.BI \-s\fR\c -Performs stale signature purging. If a value is specified, the default value of -14 days will be overridden. Specifying an age of 0 will delete all signatures -from the user(s) processed. - -.n 3 -.TP -.BI \-p\fR\c -Deletes all tokens from the target user(s) database whose probability is -between 0.35 and 0.65 (fairly neutral, useless data). If a value is -specified, the default life of 30 days will be overridden. It's a good idea -to use this flag once with a life of 0 days for users after a significant amount -of corpus training. - -.n 3 -.TP -.BI \-u\fR\c -Deletes all unused tokens from a user's dataset. Four different life values -are used: - -.B sl -Stale tokens which have not been used for a long period of time - -.B hcl -Tokens with a total hit count below 5 (which will be assigned a hapaxial value -by DSPAM) - -.B shl -Tokens witha single spam hit - -.B ihl -Tokens with a single innocent hit - -Ages may be overridden by specifying a format string, such as -u30,15,10,10 -where each number represents the respective life. Specifying a life of zero -will delete all unused tokens in the category. - -.n 3 -.TP -.BI \ user1\ user2\ ...\ userN\fR\c -Specify the username(s) to perform the selected maintenance operations on. If -no username is specified, all users are processed. - -.SH EXIT VALUE -.LP -.ne 3 -.PD 0 -.TP -.B 0 -Operation was successful. -.ne 3 -.TP -.B other -Operation resulted in an error. -.PD - -.SH AUTHORS -.LP - -Jonathan A. Zdziarski - -For more information, see http://www.nuclearelephant.com. - -.SH SEE ALSO -.BR dspam (1), -.BR dspam_stats (1), -.BR dspam_corpus (1), -.BR dspam_dump (1), -.BR dspam_merge (1) Index: dspam.pc.in =================================================================== --- dspam.pc.in (.../vendor/dspam/3.0.0) (revision 39233) +++ dspam.pc.in (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -1,10 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: DSPAM -Description: DSPAM Anti-Spam Library -Version: @VERSION@ -Libs: -L${libdir} -ldspam -Cflags: -I${includedir}/dspam Index: dspam_stats.1 =================================================================== --- dspam_stats.1 (.../vendor/dspam/3.0.0) (revision 39233) +++ dspam_stats.1 (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -1,70 +0,0 @@ -.\" -*- nroff -*- -.\" -.\" dspam_stats3.0 -.\" -.\" Authors: Jonathan A. Zdziarski -.\" -.\" Copyright (c) 2004 Network Dweebs Corporation -.\" All rights reserved -.\" -.TH dspam_stats 1 "May 31, 2004" "DSPAM" "DSPAM" - -.SH NAME -dspam_stats - display spam statistics - -.SH SYNOPSIS -.na -.B dspam_stats -[\c -.BI \-H\fR\c -] -[\c -.I \ username \fR\c -] - -.ad -.SH DESCRIPTION -.LP -.B dspam_stats -displays the spam filtering statistics for one or all users on the system. Displays TS (Total Spams), TI (Total Innocent), TM (Total Spam Misses) and FP (Total False Positives). To calculate the total number of spams caught by DSPAM, subtract TM from TS. - -.SH OPTIONS -.LP -.ne 3 -.TP -.BI \-H\fR\c -Uses multi-line, human-readable output displaying the fully-qualified names for -each class of totals, instead of their abbreviated terms. - -.n3 3 -.TP -.BI \[username]\c -Specifies the username to query. If no username is provided, all users will be -queried. - -.SH EXIT VALUE -.LP -.ne 3 -.PD 0 -.TP -.B 0 -Operation was successful. -.ne 3 -.TP -.B other -Operation resulted in an error. -.PD - -.SH AUTHORS -.LP - -Jonathan A. Zdziarski - -For more information, see http://www.nuclearelephant.com. - -.SH SEE ALSO -.BR dspam (1), -.BR dspam_corpus (1), -.BR dspam_clean (1), -.BR dspam_dump (1), -.BR dspam_merge (1) Index: dspam.1 =================================================================== --- dspam.1 (.../vendor/dspam/3.0.0) (revision 39233) +++ dspam.1 (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -1,218 +0,0 @@ -.\" -*- nroff -*- -.\" -.\" dspam3.0 -.\" -.\" Authors: Jonathan A. Zdziarski -.\" -.\" Copyright (c) 2004 Network Dweebs Corporation -.\" All rights reserved -.\" -.TH DSPAM 1 "May 31, 2004" "DSPAM" "DSPAM" - -.SH NAME -dspam \- DSPAM Anti-Spam Agent - -.SH SYNOPSIS -.na -.B dspam -[\c -.BI \--mode=[teft|toe|tum|notrain]\fR\c -] -[\c -.BI \--user\ user1 -user2\ ...\ userN\fR\c -] -[\c -.BI \--feature\c -=[ch,no,wh,tb=N]\fR\c -] -[\c -.B \--class\c -=[spam|innocent]\fR\c -] -[\c -.B \--source\c -=[error|corpus|inoculation] \c -] -[\c -.B \--deliver\c -=[spam,innocent] \c -] -[\c -.B \--help \c -] -[\c -.B \--process \c -] -[\c -.B \--classify \c -] -[\c -.BI \--stdout \c -] -[\c -.I \ delivery\_arguments \fR\c -] - -.ad -.SH DESCRIPTION -.LP -.B The DSPAM agent -provides a direct interface to mail servers for command-line -spam filtering. The agent can masquerade as the mail server's local delivery -agent and will process any email passed to it. The agent will then call whatever -delivery agent was specified at compile time or quarantine/tag/drop messages -identified as spam. The DSPAM agent can function locally or as a proxy. It -is also responsible for processing classification errors so that DSPAM can -learn from its mistakes. - -.SH OPTIONS -.LP -.ne 3 -.TP -.BI \--user\ user1 \ user2\ ...\ userN\fR\c -Specifies the destination users of the incoming message. In most cases this is -the local user on the system, however some implementations may call for virtual -usernames, specific to DSPAM, to be assigned. The agent processes an -incoming message once for each user specified. If the message is to be -delivered, the $u (or %u) parameters of the argument string will be interpolated -for the current user being processed. - -.n3 3 -.TP -.BI \--mode= [toe|tum|teft|notrain]\c -Configures the training mode to be used for this process: - -.B teft -: Train-Everything. Trains on all messages processed. This is a very thorough training approach and should be considered the standard training approach for most users. TEFT may, however, prove too volatile on installations with extremely high per-user traffic, or prove not very scalable on systems with extremely large user-bases. In the event that TEFT is proving ineffective, one of the other modes is recommended. - -.B toe -: Train-on-Error. Trains only on a classification error, once the user's metadata has matured to 2500 innocent messages. This training mode is much less resource intensive, as only occasional metadata writes are necessary. It is also far less volatile than the TEFT mode of training. One drawback, however, is that TOE only learns when DSPAM has made a mistake - which means the data is sometimes too static, and unable to "ease into" a different type of behavior. - -.B tum -: Train-until-Mature. This training mode is a hybrid between the other two training modes and provides a great balance between volatility and static metadata. TuM will train on a per-token basis only tokens which have had fewer than 25 "hits" on them, unless an error is being retrained in which case all tokens are trained. This training mode provides a solid core of stable tokens to keep accuracy consistent, but also allows for dynamic adaptation to any new types of email behavior a user might be experiencing. - -.B notrain -: No training. Do not train the user's data, and do not keep totals. This should only be used in cases where you want to process mail for a particular user (based on a group, for example), but don't want the user to accumulate any learning data. - -.ne 3 -.TP -.BI \--feature= [chained,noise,tb=N,whitelist] \c -Specifies the features that should be activated for this filter instance. The following features may be used individually or combined using a comma as a delimiter: - -.B chained -: Chained Tokens (also known as biGrams). Chained Tokens combines adjacent tokens, presently with a window size of 2, to form token "chains". Chained tokens uses additional storage resources, but greatly improves accuracy. Recommended as a default feature. - -.B noise -: Bayesian Noise Reduction (BNR). Bayesian Noise Reduction kicks in at 2500 innocent messages and provides an advanced progressive noise logic to reduce Bayesian Noise (wordlist attacks) in spams. See http://www.nuclearelephant.com/projects/dspam/bnr.html for more information. - -.B tb\=N -: Sets the training loop buffering level. Training loop buffering is the amount of statistical sedation performed to water down statistics and avoid false positives during the user's training loop. The training buffer sets the buffer sensitivity, and should be a number between 0 (no buffering whatsoever) to 10 (heavy buffering). The default is 5, half of what previous versions of DSPAM used. To avoid dulling down statistics at all during the training loop, set this to 0. - -.B whitelist -: Automatic whitelisting. DSPAM will keep track of the entire "From:" line for each message received per user, and automatically whitelist messages from senders with more than 20 innocent messages and zero spams. Once the user reports a spam from the sender, automatic whitelisting will automatically be deactivated for that sender. Since DSPAM uses the entire "From:" line, and not just the sender's email address, automatic whitelisting is a very safe approach to improving accuracy especially during initial training. - -.ne 3 -.TP -.BI \--class= [spam|innocent] \c -Identifies the disposition (if any) of the message being presented. This flag -should be used when a misclassification has occured, when the user is -corpus-feeding a message, or when an inoculation is being presented. This -flag should not be used for standard processing. This flag must be used in -conjunction with the --source flag. Omitting this flag causes DSPAM to -determine the disposition of the message on its own (the standard operating -mode). - -.ne 3 -.TP -.BI \--source= [error|corpus|inoculation] \c -Where -.B --class -is used, the source of the classification must also be provided. The source -tells dspam how to learn the message being presented: - - -.B error -: The message being presented was a message previously misclassified by DSPAM. When 'error' is provided as a source, DSPAM requires that the DSPAM signature be present in the message, and will use the signature to recall the original training metadata. If the signature is not present, the message will be rejected. In this source mode, DSPAM will also decrement each token's previous classification's count as well as the user totals. - -You should use error only when DSPAM has made an error in classifying the message, and should present the modified version of the message with the DSPAM signature when doing so. - -.B corpus -: The message being presented is from a mail corpus, and should be trained as a new message, rather than re-trained based on a signature. The message's full headers and body will be analyzed and the correct classification will be incremented, without its opposite being decremented. - -You should use corpus only when feeding messages in from corpus. - -.B inoculation -: The message being presented is in pristine form, and should be trained as an inoculation. Inoculations are a more intense mode of training designed to cause DSPAM to train the user's metadata repeatedly on previoulsy unknown tokens, in an attepmt to vaccinate the user from future messages similar to the one being presented. You should use inoculation only on honeypots and the like. - -.ne 3 -.TP -.BI \--deliver= [innocent,spam]\c -Tells -.B DSPAM -to deliver the message if its result falls within the criteria specified. For example, --deliver=innocent will cause DSPAM to only deliver the message if its classification has been determined as innocent. Providing --deliver=innocent,spam will cause DSPAM to deliver the message regardless of its classification. This flag provides a significant amount of flexibility for nonstandard implementations. - -.ne 3 -.TP -.B \--stdout \c -If the message is indeed deemed "deliverable" by the -.B\--deliver -flag, this flag will cause DSPAM to deliver the message to stdout, rather than the configured delivery agent. - -.ne 3 -.TP -.B \--process \c -Tells -.B DSPAM -to process the message. This is the default behavior, and the flag is implied unless -.B \--classify -is used. - -.ne 3 -.TP -.BI \--classify\c -Tells -.B DSPAM -to only classify the message, and not perform any writes to the user's -data or attempt to deliver/quarantine the message. The results of a -classification are printed to stdout in the following format: - -X-DSPAM-Result: User; result="Spam"; probability=1.0000; confidence=0.80 - -.B NOTE -: The output of the classification is specific to a user's own data, and -does not include the output of any groups they might be affiliated with, -so it is entirely possible that the message would be caught as spam by a -group the user belongs to, and appear as innocent in the output of a -classification. To get the classification for the -.B group -, use the group name as the user instead of an individual. - -.SH EXIT VALUE -.LP -.ne 3 -.PD 0 -.TP -.B 0 -Operation was successful. -.ne 3 -.TP -.B other -Operation resulted in an error. If the error involved an error in calling the -delivery agent, the exit value of the delivery agent will be returned. -.PD - -.SH AUTHORS -.LP - -Jonathan A. Zdziarski - -For more information, see http://www.nuclearelephant.com. - -.SH SEE ALSO -.BR dspam_stats (1), -.BR dspam_corpus (1), -.BR dspam_clean (1), -.BR dspam_dump (1), -.BR dspam_merge (1) - Index: dspam_merge.1 =================================================================== --- dspam_merge.1 (.../vendor/dspam/3.0.0) (revision 39233) +++ dspam_merge.1 (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -1,87 +0,0 @@ -.\" -*- nroff -*- -.\" -.\" dspam_merge3.0 -.\" -.\" Authors: Jonathan A. Zdziarski -.\" -.\" Copyright (c) 2004 Network Dweebs Corporation -.\" All rights reserved -.\" -.TH dspam_merge 1 "May 31, 2004" "DSPAM" "DSPAM" - -.SH NAME -dspam_merge - merge several users' metadata into a composite - -.SH SYNOPSIS -.na -.B dspam_merge -[\c -.BI \ user1\ user2\ ...\ userN \fR -] -[\c -.BI \ -o \ username \fR -] - -.ad -.SH DESCRIPTION -.LP -.B dspam_merge -merges several users' metadata into a single user's dictionary. This tool -is designed to create global users and seeded data. The hit sounds for each -token and per-user totals are added together to produce a single composite -dataset. After creating a composite user, -.B dspam_clean -should be run with the -p option to clean up extraneous data. - -.B NOTE -: Merges may take a considerable amount of time. This could potentially increase -the load on the server or even slow down the delivery of email. A merge should -only be performed when the system is fairly acquiesce. - -.SH OPTIONS -.LP -.ne 3 -.TP -.BI \ user1\ user2\ ...\ userN \fR\c -A list of users to merge together. - -.n3 -.TP -.BI \ -o \ username \fR\c -The target user which will be created (if necessary). This user will contain -the composite generated by the merge. - -.SH EXAMPLES -.B dspam_merge dick jane spot -o ralph - -Merges the metadata dictionaries of dick, jane, and spot into a single -composite under the user -.B ralph -. - -.SH EXIT VALUE -.LP -.ne 3 -.PD 0 -.TP -.B 0 -Operation was successful. -.ne 3 -.TP -.B other -Operation resulted in an error. -.PD - -.SH AUTHORS -.LP - -Jonathan A. Zdziarski - -For more information, see http://www.nuclearelephant.com. - -.SH SEE ALSO -.BR dspam (1), -.BR dspam_dump (1), -.BR dspam_stats (1), -.BR dspam_corpus (1), -.BR dspam_clean (1) Index: CHANGELOG =================================================================== --- CHANGELOG (.../vendor/dspam/3.0.0) (revision 39233) +++ CHANGELOG (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -1,3370 +0,0 @@ -Version 3.0.0 -------------- - -[20040614.0700] jonz: fixed 14-day user graphs - -fixed a bug causing the 14-day user graphs to appear empty - -[20040612.0018] jonz: oracle storage driver fixes - -made several bugfixes to oracle storage driver -added --with-oracle-version[=10] configure flag for linking to 10g libraries - -[20040609.0205] jonz: fixed a bug in --enable-signature-attachments - -fixed two bugs using --enable-signature attachments; 1 compiler error and 1 -segfault (uninitialized value) - -[20040608.0715] jonz: fixed compile bug with --enable-webmail - -fixed compile errors resulting from --enable-webmail - -[20040607.1800] jonz: replaced quarantine locking with fcntl locking - -replaced quarantine .lock'ing with fcntl locking and also applied it to -locking .log files. fcntl should work over NFS. - -[20040607.0730] jonz: fixed rare segfault (strlen on NULL) - -fixed a rare segfault in decode.c - -[20040607.0730] jonz: minor aesthetic changes to cgi - -minor aesthetic changes to cgi - -[20040606.1445] jonz: added training left option to dspam_stats -H - -modified dspam_stats to display # of training messages left when using -H -command - -[20040606.1441] jonz: fixed bug in training threshold - -fixed a bug in the training threshold, which miscalculated the mail left to -train. - -[20040605.1521] jonz: added statistical sedation to cgi - -added level of sensitivity-during-training to cgi preferences - -[20040605.1450] jonz: added ability to edit user preferences from admin suite - -added the ability to edit user preferences (and the default preferences) -from the admin suite. - -[20040605.1100] jonz: fixed a bug with user processing flag - -fixed a bug where some parameters may be added as users instead of parameters. -this was particularly the case if no mailer flags prepended %u. - -[20040604.0525] jonz: fixed blank dspam signature on reclassification - -fixed a problem where reclassified messages would receive: - -X-DSPAM-Signature: !DSPAM! - -fixed this by NOT stripping the old X-DSPAM-Signature header, since a new one -is not created upon reclassification - -[20040604.0525] jonz: fixed untrusted.mailer_args - -fixed a bug where the last argument of untrusted.mailer_args was ignored. - -Version 3.0.0.rc2 ------------------ - -[20040603.2215] jonz: added user-logging option - -added --disable-user-logging option to disable user logging - -[20040603.0500] jonz: auto-whitelisting now works with toe-mode training - -added code to cause automatic whitelisting to function with toe-mode training - -[20040602.0030] jonz: added administration suite cgi - -added administration suite cgi - -[20040602.0030] jonz: added system logging of execution time - -added system logging of execution time - -[20040602.0025] jonz: fixed spam subject - -fixed spam subject headings to support variable length titles - -[20040601.2230] jonz: added system logging - -added system logging to DSPAM_HOME/system.log for future sysadmin interface - -[20040601.1822] jonz: removed mysql delay_key_write - -removed mysql's delay_key_write feature from the sql scripts, because of a -bug in mysql that leads to database corruption when using it. - -[20040601.0330] jonz: added To: header parsing - -added --enable-parse-to-header, which will parse spam-username and fp-username -from the To: header of a message to determine the username. This can be -used in lieu of using spam/fp aliases by creating a wildcard subdomain -(such as spam.yourdomain.com) and piping all email into dspam without a ---user flag, for example: - -wildcard: "|/usr/local/bin/dspam --mode=toe --class=spam --source=error" - -[20040531.2245] jonz: added pkgconfig files - -added installation of pkgconfig files submitted by Ronald Hummelink - - -[20040531.2120] jonz: added --enable-broken-return-codes - -added --enable-broken-return-codes configure option which causes DSPAM to -return an exit code of 99 if the message being processed is believed to be -spam, 0 if not, and any other code to suggest an error has occured. this is -useful for some MTAs such as qmail. - -[20040531.2100] jonz: fixed error.h overwrite bug - -fixed a bug where libc's error.h would be overwritten if --prefix=/usr. DSPAM -headers are now written to includedir/dspam. - -[20040531.1915] jonz: added man pages - -added man pages to distribution - -[20040531.0830] jonz: fixed header signature stripping - -signatures no longer stripped if --enable-signature-headers is used; to allow -for re-re-training - -[20040531.0830] jonz: fixed cgi graphs falling below zero - -minor fix to cgi graphs preventing data points from falling below zero - -Version 3.0.0.rc1 ------------------ - -[20040528.0100] jonz: added logging support - -added support for message logging (enabled by default). logs all classification -calls to $DSPAM_HOME/data/user/user.log. disable with --disable-logging. - -[20040527.2200] jonz: added new CGI - -added new CGI - -[20040527.0730] jonz: added support for profiling - -added support for profiling using gmon output. this allows developers to use -profiling tools such as gprof to analyze the performance of the software. - -[20040527.0730] jonz: applied patch submitted by Mark Femal - -applied a patch submitted by Mark Femal which: -1. Includes select *.h files and incorporates them into the installation -2. Fixes some issues in compiling with Sun's Pro C compiler -3. Makes some minor changes to header files to avoid conflicts - -Version 3.0.0.beta.3.1 ----------------------- - -[20040525.0830] jonz: fixed compiler error on verbose debug - -fixed compiler errors when verbose debug was enabled - -Version 3.0.0.beta.3 --------------------- - -[20040524.2024] jonz: bugfix for null bodies - -applied bugfix causing a segfault when the message body of some parts was -null. rare occurrence. - -[20040524.1903] jonz: implemented Robinson's technique for combining p-values - -added support for using Robinson's technique for combining p-values, as -described at http://www.linuxjournal.com/article.php?sid=6467. This technique -is presently used for chi-square calculations, but using ---enable-robinson-pvalues will use this technique for *all* calculations in -place of Graham's approach. Appears to provide slightly better results -(on the order of 1 message per thousand). - -[20040524.0529] jonz: implemented *real* chi-square - -implement Fisher-Robinson's Inverse Chi-Square algorithm...the real stuff. -use --enable-chi-square to use. - -[20040522.2350] jonz: renamed chi-square to robinson's naive bayesian - -renamed chi-square because it really isn't chi-square, but robinson's first -algorithm for naive bayesian combination. use --enable-robinson to use. - -[20040520.0800] jonz: bugfix for attachments - -fixed a bug that caused message headers in attachment sections to be ignored - -Version 3.0.0.beta.2.1 ----------------------- - -[20040518.0630] jonz: bugfix: seg faults on rare occasions - -fixed a strlen(NULL) bug fixing an occasional segfault - -[20040514.1130] jonz: applied dspam_genaliases patch - -applied dspam_genaliases patch supplied by Scott Moorhouse - which adds the following functionality: - ---exclude NAME Do not generate an alias for username / usernames. ---excludeuid NUM Do not generate an alias for UID / UIDS. ---minuid NUM Minimum UID for which to generate an alias. ---maxuid NUM Maximum UID for which to generate an alias. - -It also uses setpwent/getpwent to get passwd information instead -of /etc/passwd. This allows the tool to be used with any default system -authentication. - -[20040514.0830] jonz: modified mode=notrain to ignore signature - -when setting mode=notrain, the signature is NOT stored, and not appended to -an email. - -Version 3.0.0.beta.2 --------------------- - -[20040513.1845] jonz: updated configure.ac - -updated configure.ac to work with newer versions of autoconf (with warnings) - -[20040513.0157] jonz: segfault patch for sql drivers - -applied patch to prevent segfaults in mysql and pgsql drivers under certain -conditions - -[20040512.0830] jonz: user directories moved to $DSPAM_HOME/data - -user directories have been moved to $DSPAM_HOME/data. it will be necessary to -move all user directories into this folder when upgrading - -[20040512.0830] jonz: default $DSPAM_HOME changed - -default dspam home has been changed from /etc/mail/dspam to /var/dspam. use ---with-dspam-home to change this. - -[20040512.0830] jonz: patch for sql drivers - -applied patch for mysql and pgsql drivers to prevent errors in sql due to -lack of commas - -Version 3.0.0.beta.1.2 ----------------------- - -[20040504.1835] jonz: bugfix for signed message signature - -corrected a bug where the boundary for a signed message would be missing -a carriage return. - -[20040504.0548] jonz: bugfix for token storage bug - -fixed a token storage bug, where some tokens would not be stored if they -were preceeded by a token that was found in the database - -[20040503.0830] jonz: bugfix for corpus spam delivery - -fixed a bug where corpusfed messages would be delivered if a quarantine agent -was specified at configure time. - -[20040501.1052] jonz: added spam-subject feature - -added a spam-subject feature which can be activated with --enable-spam-subject. -when enabled, DSPAM will prepend [SPAM] to the subject headers of all messages -suspected to be spam. - -Version 3.0.0.beta.1.1 ----------------------- - -[20040501.0630] jonz: fixed critical problems with pgsql_drv driver - -fixed a critical problem with the postgres storage driver to correct sql errors -in processing - -Version 3.0.0.beta.1 --------------------- - -[20040430.0800] jonz: fix for sql driver subtractions - -implemented GREATEST(0, [Argument] ) functions for subtractions, which fixes a -problem in which error corrections are not made to tokens where there are -zero hits for the classification being subtracted from. should also -definitively prevent negative values in hit totals. - -[20040430.0800] jonz: bugfix: corpus feeding invoked test-conditional training - -fixed a bug where corpus feeding would invoke test-conditional training. - -[20040430.0800] jonz: test-conditional training to subtract only once - -test-conditional training modified to subtract from misclassified corpus only -once, and corpus feed for all other iterations - -[20040430.0800] jonz: fixed bug in sql-drivers/test-conditional training - -fixed a bug in the sql drivers where test condition training would make -exponential changes instead of incremental. this was due to not resetting -the control token on every call to _ds_getall_spamrecords. - -[20040430.0745] jonz: fixed bug in web stats - -fixed bug where merged group web stats wouldn't get written - -[20040430.0730] jonz: fixed bug in TOE totals - -fixed a bug where spam/innocent classified wasn't updated when TOE was used - -[20040427.0433] jonz: fixed bug in mysql and pgsql drivers - -fixed a bug in mysql and pgsql drivers where dspam_merge was functioning -incorrectly, due to the token count on record insertion being set to 1 or 0, -and not the actual token value. - -[20040427.0155] jonz: merged groups shouldn't merge with themselves - -corrected a situation where the actual user in a merged group could be merged -with themselves, if they were the target user. - -[20040427.0119] jonz: applied bdb patch for solaris - -applied a patch to building on Solaris 9 with BDB drivers - -[20040425.0757] jonz: updated pgsql drivers - -applied pgsql_drv storage driver updates submitted by Rustam Aliyev - -Version 3.0.0.alpha.6 ---------------------- - -[20040424.2235] jonz: fixed header tokenization - -fixed header tokenization from previous alpha; was suddenly leaving out -heading from token names. - -[20040424.1427] jonz: added merged groups - -merged groups are similar to global groups, only instead of the global user -being used in lieu of per-user statistics, the global user in a merged group -is merged with the user's own training data. this allows immediate correction -to take place and no training loop. - -NOTE: merged groups are storage driver dependent. presently they have only -been implemented for the mysql driver. - -[20040422.1900] jonz: messages with empty bodies should still be processed - -fixed bug where messages with empty bodies failed into delivery - -[20040422.1829] jonz: added encoding strip patch - -added patch to fix the stripping of the content-transfer-encoding - -[20040421.1809] jonz: added training mode 'notrain' - -added training mode 'notrain' which will process the message, but not train any -user data; this is ideal for implementations where a global dictionary is -used, but the administrator doesn't want to accumulate training data for each -user. - -[20040421.0310] jonz: fixed TOE-mode totals updating - -fixed bug where TOE-mode would update totals when it shouldn't - -Version 3.0.0.alpha.5 ---------------------- - -[20040421.0100] jonz: fixed totaling problems with classification groups - -fixed totaling problems with global users and classification groups, where -spams wouldn't get counted, and some innocents - -[20040421.0100] jonz: fix for dspam_stats - -fix for dspam_stats, identifying individual users - -[20040420.0734] jonz: fix for builds on Solaris w/BDB - -fixed compiler error when building on Solaris w/BDB drivers - -[20040419.0758] jonz: fix for X-DSPAM-Result header problem with TOE - -TOE resulted in the X-DSPAM-Result being send to stdout, which broke all -implementations of TOE where --stdout was used. bug fixed. - -[20040419.0700] jonz: added support for multipart/encrypted messages - -added the same support for multipart/encrypted messags as is provided -for multipart/signed - -[20040418.1840] jonz: changes to pgsql objects - -changes to pgsql objects to fix performance issues - -[20040417.1105] jonz: more global user tweaks - -if the global user thinks the message was innocent, but the user thinks it was -spam, retrain the message as a false positive into the user's dictionary -automatically, but don't update FP totals (internal function) - -[20040417.1050] jonz: implemented totals checking - -implemented totals checking to insure no totals travel below 0 - -[20040417.1045] jonz: don't retrain some classification catches - -patch added not to retrain some spams in a global user catch if the user's -own dictionary already learned it as spam - -[20040417.1037] jonz: patch for non-user creation - -patch made to sql-based drivers to avoid creating virtual users in cases where -a message isn't being directly processed (e.g. tools, error correction, etc.) - -[20040417.2006] jonz: added human-readable patch to dspam_stats - -added patch for human-readable format to dspam_stats, submitted by Alan -Shields - -Version 3.0.0.alpha.4 ---------------------- - -[20040416.0000] jonz: fix for global users to prevent FPs - -applied bugfix for global users code where false positives were getting -generated because the user's dictionary wasn't completely ignored. - -[20040416.0000] jonz: applied dspam_corpus division by zero patch - -applied div by zero patch for dspam_corpus submitted by Nick Burnett - -[20040415.0010] jonz: added end-of-token truncated symbols - -added support for end-of-token symbols, such as exclamation point. slight -boost in accuracy in testing. - -[20040414.0052] jonz: added abbreviated feature references - -the first two letters of a feature can be used alternatively instead of the -whole feature name; for example --feature=ch,no,wh - -[20040411.0100] jonz: added X-DSPAM-Confidence header - -added X-DSPAM-Confidence header to all processed messages to identify the -confidence level of the decision made. - -[20040410.0930] jonz: tum maturity level increased to 50 hits - -train-until-mature level increased from 25 hits to 50; doesn't appear to work -well in classification groups. - -[20040409.0201] jonz: added support for domain scale - -added support for domain scale applying patches submitted by -Patrick Tudor - -[20040409.0153] jonz: applied pgsql patches - -applied more pgsql patches - -[20040409.0129] jonz: fixed headers to preserve original encoding - -headers are now delivered with original encodings - -[20040407.2254] jonz: added mass false positive button to CGI - -added a button to reverse multipe false positives by clicking on checkboxes. - -[20040407.2248] jonz: fixed bug in classification groups - -fixed a bug in classification groups, where a "classify catch" would cause -the DSPAM signature to be empty, and thus irreversible. - -[20040407.0255] jonz: tweaks to postgres m4 - -tweaks to postgres m4 to test headers and library on configure - -Version 3.0.0.alpha.3 ---------------------- - -[20040406.0124] jonz: supress extra newline in message body - -corrected message reassembly behavior by supressing newline characters at the -end of the message body. - -[20040405.0524] jonz: added postgresql driver to project - -added pgsql_drv (PostgreSQL) submitted by Rustam Aliyev -to project, added to configure with its own set of configuration commands. -see tools.pgsql/README for more information. Applied recent SQL fixes. - -[20040405.0330] jonz: virtual users should not be created on reclassification - -if a message is being submitted for reclassification, a virtual user should not -be created, but fail instead - e.g. spam could be getting sent to the alias, -and shouldn't create new uids. - -[20040405.0233] jonz: fixed SQL-driver hits-below-zero bug - -fixed a bug causing some tokens to drop below zero hits using the mysql -driver. - -[20040405.0149] jonz: fixed BNR bug - -fixed a bug caused by Bayesian Noise Reduction which caused some messages -never to get learned if the control token was filtered; or caused filtered -tokens never to be learned. - -[20040403.1745] jonz: rewrite of libdspam API - -rewrite of libdspam's API. in short: - -- Operating modes DSM_ADDSPAM and DSM_FALSEPOSITIVE dropped -- CTX->classification added: DSR_ISSPAM | DSR_ISINNOCENT | DSR_NONE -- CTX->source added: DSS_ERROR | DSS_INOCULATION | DSS_CORPUS | DSS_NONE - -provides a much cleaner and less ambiguous interface - -[20040403.1215] jonz: removed signature deletion - -removed signature deletion from agent, so messages can be re-re-classified. -also prevents mysql errors. - -[20040403.1125] jonz: added dotfile debugging support - ---enable-debug and --enable-verbose-debug flags now require a .debug file -to be dropped in order to log debug messages, providing you with the ability -to dynamically activate/deactivate debug messages for some or all users. A -.debug file can either be dropped in DSPAM_HOME to activate debugging for all -users, or a username.debug file can be dropped in DSPAM_HOME/userpath/ to -activate debugging for a subset of users. - -[20040402.1839] jonz: added support for domain-name groups - -added support for groups based on domain name - -Version 3.0.0.alpha.2 ---------------------- - -[20040402.0730] jonz: improved agent classification output - -agent classification output improved to include username, result, probability, -and confidence level in MIME format for easy parsing - -[20040402.0730] jonz: added broken MTA support - ---enable-broken-mta -You should enable this if your MTA is broken and passes messages into DSPAM -with CTRL-M's (^M) in them. - -[20040402.0730] jonz: added training loop buffering feature - -Training loop buffering is the amount of statistical sedation performed to -water down statistics and avoid false positives during the user's training loop. -The training buffer sets the buffer sensitivity, and should be a number -between 0 (no buffering whatsoever) to 10 (heavy buffering). The default is 5, -half of what previous versions of DSPAM used. To avoid dulling down -statistics at all during the training loop, set this to 0. - -The training buffer can be set using bf=N as a feature, where N is the level of -buffering (0-10). For example: - ---feature=chained,noise,tb=10 - -Causes the buffer level to be set to 10, the highest level of safety, whereas - ---feature=chained,noise,tb=0 - -Removes all buffering constraints - -[20040402.0723] jonz: fixed bug in dspam_dump - -fixed a bug in dspam_dump causing unknown tokens to be displayed with -uninitialized values - -[20040402.0720] jonz: fixed bug in agent for signature dropping - -when a signature can't be found, the message is dropped; unfortunately the -agent forgot to shut down the dspam context which caused BDB to lock up. - -[20040402.0700] jonz: added switch for webmail - -The webmail switch is designed for systems where the original message remains -server side and can therefore be presented in pristine format for retraining. - - --enable-webmail - The webmail switch is designed for systems where the original message - remains server side and can therefore be presented in pristine format for - retraining. This option will cause DSPAM to cease all writing of - signatures and DSPAM headers to the message, and deliver the message in as - pristine format as possible. This mode REQUIRES that the original message - in its pristine format (as of delivery) be presented for retraining, as in - the case of webmail or other applications where the message is actually - kept server-side during reading, and is preserved. DO NOT use this switch - unless the original message can be presented for retraining with the - ORIGINAL HEADERS and NO MODIFICATIONS. - -[20040401.2243] jonz: fix for signature headers - -applied patch to fix multipart boundary bug when signature-headers is enabled - -Version 3.0.0.alpha.1 ---------------------- - -[20040401.1230] jonz: patches to corpus locking - -made patches for corpus locking, to help prevent corruption with BDB drivers. -DSPAM agent now drops a .corpuslock file upon processing a corpus which in -turn tells the drivers not to run automatic recovery. this should prevent -corruption when an email comes in while you are corpus training with the BDB -drivers. this was not an issue with the SQL-based drivers. - -[20040401.1230] jonz: deleted libdb4_purge, libdb3_purge - -libdb4_purge and libdb3_purge have been obsoleted by the new rewritten -dspam_clean tool - -[20040401.0720] jonz: extended group line length to 10k - -extended length of a single group line to 10k, from 1k - -[20040401.0720] jonz: new dspam_clean functionality - -dspam_clean has been rewritten to support the following different clean -operations: - -1. Using the -s flag, dspam_clean will continue to perform stale signature - purging. If an age is specified, for example -s14, the age defined as the - default will be overridden. Specifying an age of 0 will delete all - signatures for the users processed. - -2. Using the -p flag, dspam_clean will delete all tokens from a user's database - whose probability is between 0.35 and 0.65 (fairly neutral, useless tokens) - that fall beyond the default age. If an age is specified, for example - -p30, the age defined as the default will be overridden. It is a good - idea to use this type of clean with an age of 0 on users after a lot of - corpus training. - -3. Using the -u flag, dspam_clean will delete all unused tokens from a user's - database. There are four different types of unused tokens: - - - Tokens which have not been used for a long time - - Tokens which have a total hit count below 5 - - Tokens which have only one spam hit - - Tokens which have only one innocent hit - - Ages may be overridden by specifying a format such as -u30,15,10,10 - where each number represents the respective age. Specifying an age of - zero will delete all unused tokens in the category. - -Optionally, usernames may be specified to override the default behavior of -processing all users. - -Examples: - -Process all users on the system using all clean operations: - dspam_clean -s -p15 -u90,30,15,15 - -Delete all of user 'dick' and 'jane's signatures - dspam_clean -s0 dick jane - -Perform a post-corpus training clean on user 'spot' - dspam_clean -p0 -u0,0,0,0 - -Perform nightly maintenance using all default values, for all users, with all -options enabled: - dspam_clean -p -u -s - -NOTE: You may wish to only run certain cleaning modes depending on the type of -storage driver you are using. For example, the MySQL storage driver -includes a purge.sql script which performs signature and unused operations, -leaving only the probability operation as a useful operation. If you are -using a SQL-based storage driver, it is strongly recommended that you use -the maintenace scripts wherever possible. - -[20040401.0720] jonz: added _ds_delall_spamrecords and _ds_del_spamrecord - -added spamrecord deletion functionality to storage driver, increased version -to 5:0:0 - -[20040331.2000] jonz: applied some memory leak patches - -applied some memory leak patches submitted by -William Ahern - -[20040328.2200] jonz: renamed USERDIR to DSPAM_HOME - -all references to USERDIR are now known as DSPAM_HOME, including the ---with-dspam-home configure flag, and mode settings. - -[20040328.2200] jonz: moved several features to commandline - -many features have been REMOVED from the configure script and into the -commandline including chained tokens, bayesian noise reduction, automatic -whitelisting, and training modes. please see the documentation for a complete -list of commandline arguments. - -configure functions which have changed: - ---with-userdir-* changed all to dspam-home ---with-local-delivery-agent changed to --with-delivery-agent ---enable/disable-chained-tokens removed from configure ---enable/disable-bnr removed from configure ---enable/disable-whitelist removed from configure ---enable/disable-toe removed from configure ---enable/disable-tum removed from configure ---enable/disable-spam-delivery removed from configure ---enable-deliver-to-stdout removed from configure - -[20040328.1745] jonz: completely reworked commandline arguments - -please see documentation for new commandline arguments. - -[20040328.1745] jonz: removed free-pass of arguments by untrusted users - -removed ability to pass in arguments by untrusted users, when the file -untrusted.mailer_args didn't exist - -[20040327.2230] jonz: CGI to allow logo-click to return - -changed CGI to allow a click on the DSPAM logo to return the user to the -main page - -[20040327.2222] jonz: thresholds to include all totals - -thresholds changed to include all 3 totals: learned, classified, corpusfed - -[20040327.2221] jonz: test-conditional training threshold dropped - -test-conditional training threshold dropped to 1000 messages - -[20040326.0730] jonz: extended DAF flagset - -extended DAF flagset to four bytes - -[20040326.0730] jonz: temporarily removed blackbox framework - -archived and removed blackbox framework from cvs; not likely i'll be working -on it any time soon - -[20040325.2129] jonz: extended context flags to u_int32_t - -extended context flags to 4 bytes, to add additional commandline features - -[20040325.2129] jonz: compatibility fixes for TOE - -compatibility fixes for TOE for web client and stats - -[20040325.1939] jonz: code cleanup - -commented headers, cleaned up code - -[20040325.1930] jonz: converted total_spam, total_innocent - -converted total_spam, total_innocent to spam_learned, innocent_learned, and -added spam_classified, innocent_classified for stats use with TOE. - -NOTE: changes are required to SQL-based drivers for this version - -MySQL Example: - -alter table dspam_stats add spam_learned int; -alter table dspam_stats add innocent_learned int; -alter table dspam_stats add spam_classified int; -alter table dspam_stats add innocent_classified int; -update dspam_stats set spam_learned = total_spam; -update dspam_stats set innocent_learned = total_innocent; -update dspam_stats set spam_classified = 0; -update dspam_stats set innocent_classified = 0; -alter table dspam_stats drop column total_spam; -alter table dspam_stats drop column total_innocent; -alter table dspam_stats add spam_misclassified int; -alter table dspam_stats add innocent_misclassified int; -update dspam_stats set spam_misclassified = spam_misses; -update dspam_stats set innocent_misclassified = false_positives; -alter table dspam_stats drop column spam_misses; -alter table dspam_stats drop column false_positives; - -[20040325.1930] jonz: addspam to fail on failed signature retrieval - -due to a lot of misconfigurations of dspam, addspam will now fail if a -signature cannot be retrieved. this should help pinpoint problem installs -and clients, and prevent poor accuracy. - -Version 2.11.1 --------------- - -[20040325.0757] jonz: added --help - -added --help commandline argument - -[20040325.0757] jonz: fixed division by zero bug in dspam.cgi - -small chance of division by zero bug fixed - -[20040325.0740] jonz: fixed toe - -fixed toe, which has been accidentally disabled in testing - -[20040325.0740] jonz: provided runtime arguments for training mode - -added run-time arguments --toe --tum --teft to specify training mode. the -default is based on configure-time options. - -also added training_mode variable to dspam context, should not affect -compatibility. - -Version 2.10.2 --------------- - -[20040319.2138] jonz: added shell quoting of special characters - -special characters are now quoted, instead of filtered, when calling the LDA. - -Version 2.11.0 / Version 2.10.2 -------------------------------- - -[20040319.1845] jonz: fixed bash special characters problem - -fixed special characters problem in bash by encapsulating all arguments in -quotes - -[20040319.0730] jonz: added train-on-mature training option - ---enable-tum -train-on-mature (TuM) is a hybrid of train-everything and train-on-error. -all tokens are candidates for training as in train-everything, but only tokens -whose total number of "hits" don't exceed 100 are trained. on error, all -tokens are trained. this provides a good balance between the volatility of -train-everything and the lack of behavioral learning in train-on-error. it -also has the added benefit of not breaking the things that toe presently -breaks in dspam (whitelists, stats, etc). - -[20040319.0700] jonz: fixed source address bug - -fixed a bug in source address tracking where messages were reported as innocent -even if they were guilty, if the user had < 2500 messages in corpus - -[20040318.1932] jonz: fixed compile-time warning in dspam_tools.c - -fixed warning for uninitialized crc variable - -[20040318.0259] jonz: post-training features dropped to 2500 - -post-training features such as TOE and BNR have had their prerequisite ham count -droped from 4000 to 2500. - -[20040318.0241] jonz: fixed up headers so developers only need libdspam.h - -fixed up header dependencies so developers only need include libdspam.h to -use libdspam. - -[20040318.0124] jonz: added support for header-based signatures - -for implementations where a signature in the body is unacceptable, using ---enable-signature-headers will place the signature in the header, and not -in the body. - -IMPORTANT: This will -require- that the headers be forwarded with the message -when being reported as spam. This usually requires bouncing the message, -forwarding it as an attachment, or using a macro. The header will otherwise -be lost with standard forwarding. - -[20040316.2315] jonz: added support for userlist termination - -userlist can now be terminated using -- - -Version 2.10.1 --------------- - -[20040314.0128] jonz: bugfix for segfaults in dspam.c - -segfaults can occur on some systems (predominantly Solaris) when mail is sent -to multiple local recipients. bugfix required the header insert pointer to -be reset. - -Version 2.10.0 --------------- - -[20040307.1828] jonz: new dspam_corpus tool by Gary Funck - -replaced old dspam_corpus tool with a better one contributed by Gary Funck - - -[20040305.0320] jonz: added postfix documentation - -added documentation for postfix local delivery - -[20040305.0320] jonz: added support for domain filesystem structure - -use of --enable-domain-scale configures filesystem for domain-based -support. when used, username@domain should be passed in as the userid and -$USERDIR/domain/username/ will be used instead of $USERDIR/username or -$USERDIR/u/us/username as done with large scale - -[20040303.2208] jonz: applied bugfix patch by dennis pedersen - -applied a bugfix to libdb3 and libdb4 fixing a bug that was presented in rc2 -causing loop hangs. submitted by dennis pedersen - -[20040303.0243] jonz: added long username support - -by default, the username length uses the same limits as the operating system. -if --enable-long-usernames is specified, however, the limit will be set to -256. - -Version 2.10-rc2 ----------------- - -[20040302.0007] jonz: implemented auto-whitelisting - -implemented auto-whitelisting using --enable-whitelist function. automatic -whitelisting will automatically whitelist any full 'From' addresses (including -the name) that have appeared in at least 10 innocent messages and zero spams. -when a message is forwarded as a spam, any automatic whitelisting for that -address is permanently deactivated. - -[20040301.2339] jonz: fixed purge.sql - -fixed some bugs in MySQL's purge.sql, optimized for speed thanks to another -patch submitted by bob glamm. - -[20040229.1245] jonz: applied patch submitted by Sascha Blank - -applied patch submitted by Sascha Blank for dspam_dump to allow lookup of -individual tokens. - -[20040228.1618] jonz: train-on-error to perform source address tracking - -train-on-error mode fixed to perform source address tracking - -[20040224.2008] jonz: fixed high cpu utilization on large messages - -fixed an iteration problem which caused high cpu utilization on large (2MB+) -text messages - -[20040223.0350] jonz: fixed compile error in libdspam.c - -fixed compile error in libdspam.c when HAVE_ISO_VARARGS isn't defined - -Version 2.10-rc1 ----------------- - -[20040222.1606] jonz: added support for global groups - -global groups allows DSPAM to provide a "SpamAssassin type out-of-the-box -filtering" for all new users until they have built their own useful -dictionaries. to create a global classification group, add something like -this to $USERDIR/group: - -groupname:classification:*globaluser - -This will automatically add globaluser as a classification peer to all users. -Any user who has less than 1000 innocent messages or 250 spam messages in -their corpus, or whose filter is uncertain about a particular message will -consult the global dictionary for an answer. - -global groups will need to be trained using corpus or other means, or by -using the dspam_merge tool. the global user (in this case 'globaluser') is -treated just as any other user on the system. - -[20040221.2155] jonz: format changes to dspam_dump - -dspam_dump formatting changes + display of token probability - -[20040220.1700] jonz: added quick fix for \r stripping in dspam_corpus - -added a quick fix to strip \r's in mailboxes when using dspam_corpus - -[20040220.1700] jonz: fixed segfault bug - -fixed a bug that caused DSPAM to segfault on empty MIME delimiters. This -generally only occured with spams, as legitimate messages have RFC-compliant -delimiters. - -[20040219.0150] jonz: added support for neural networking - -see README for more details - -[20040218.2300] jonz: added tweaking to BNR for small text samples - -added tweaking of thresholds to BNR for small text sampes < 3.5k - -[20040217.0724] jonz: fixed some miscellaneous compile warnings - -fixed some miscellaneous compile warnings. 2 for when trusted user security -is disabled, 1 for dspam_2mysql.c:126 - -Version 2.10-beta-2 -------------------- - -[20040214.1632] jonz: added TOE support - -added TOE (Train on Error) support using the --enable-toe configure function. -see the README file for more details. - -[20040213.1549] jonz: fixed X-DSPAM header duplication bug - -fixed a bug which caused X-DSPAM headers to be cumulatively appended when -a single message addresses multiple local users. - -[20040214.1327] jonz: added --enable-client-compression configure flag - -added option --enable-client-compression to use compression option between -data source and its clients (where available). presently only available with -the mysql_drv storage driver. you should enable this if the data source -is on a separate machine from the DSPAM agent(s), as it conserves bandwidth -at the expense of a few CPU cycles. - -[20040214.1258] jonz: created speed and space optimized MySQL scripts - -created both speed and space optimized mysql_objects.sql scripts. - -[20040214.1235] jonz: added new stats to CGI - -added FP stats + overall accuracy to CGI - -[20040214.1235] jonz: added debug output for noise filtering - -added noise level, spammy tokens, and eliminations to debug output - -Version 2.10-beta-1 -------------------- - -[20040212.2208] jonz: added stale data purge / PURGE_ANY - -added stale data purge to libdb3 and libdb4 purge tools. based on PURGE_ANY, -defined in config.h, any stale data is removed after six months. - -[20040212.2205] jonz: added DSF_NOISE flag - -added DSF_NOISE flag to libdspam interface for activating Bayesian Noise -Reduction. - -[20040211.0158] jonz: disabled mysql_drv _ds_delete_signature - -disabled _ds_delete_signature in mysql_drv due to errors; added signature -purge to purge.sql script. no longer necessary to run dspam_clean if using -the mysql storage driver. - -[20040211.0155] jonz: mysql_drv get_one update - -check to insure there was at least one token to be loaded, otherwise do not -perform query - -Version 2.9.6 -------------- -[20040208.1906] jonz: bugfix for BNR - -BUGFIX: when BNR is activated on users with < 4000 innocent -messages, the filter forgets to load token stats for the user and marks -all messages as innocent. - -Version 2.9.5 -------------- -[20040204.0413] jonz: implemented Bayesian Dolby - -implemented Bayesian Noise Reduction -(see http://www.nuclearelephant.com/projects/dspam/bnr.html) - -[20040202.2216] jonz: added multipart frequency threshholds - -body tokens in multipart messages now require a minimum frequency of 2 to be -included in the calculation. - -[20040128.2021] jonz: only report source-addresses in mature corpuses - -only report source-addresses when the user has >4000 innocent messages in -their corpus. - -Version 2.9.4 -------------- - -[20030128.0334] jonz: added DSPAM SBL dropfile support - -added support to source address tracking to drop SBL files to /var/spool/sbl -if exists, where client in directory watch mode can read. - -Version 2.9.3 -------------- - -[20040122.0700] jonz: hex decoding - -a small piece of code to perform hex-decoding on 8bit encodings. very useful, -although hex encoding is still somewhat rare. - -[20040121.0805] jonz: new stats watering-down code for high-spam users - -implemented new code for watering down statistcs during the learning phase to -compensate for users with a high percentage of spam. this should only affect -accuracy of normal (average spam) users for the first 1000 messages. -significant watering down takes place up to 1000 spams. limited watering -down takes place up to 2500 spams if the user has more spam in their corpus -than innocent mail. - -[20040121.0805] jonz: priority given to complex tokens - -slight code tweak to give priority to more complex tokens (e.g. chained -tokens) to help improve accuracy. - -[20030121.0805] jonz: signaure should not be stored when using --corpus - -signatures are no longer stored when using the --corpus flag - -Version 2.9.1 ------------- - -[20031220.1442] jonz: added notification emails - -three different notification emails can be configured to get sent: - -- to a user the first time they receive a message through dspam (first run) -- to a user the first time a spam is caught through dspam on their behalf -- to a user when their quarantine box is > 2MB in size - -to use notification emails, copy the txt/ directory from the distribution -into USERDIR and configure the emails accordingly. more information is -available in the README. - -Version 2.8.1 -------------- - -[20031205.0821] jonz: html preformatting only for html parts - -html preformatting to be done only to html parts; html comments in -plain text parts should not be filtered out. - -[20031205.0156] jonz: high-byte tokens not ignored - -fixed a small bug causing tokens consisting of all high-bytes to be -ignored. - -[20031205.0122] jonz: tweaked cgi spam ratio - -tweaked cgi spam ratio to include misclassificatoins - -[20031130.1016] jonz: dspam_merge to corpusfy totals - -dspam_merge now moves all totals to corpusfed, so that a merged user can -easily start with fresh stats. - -[20031129.1619] jonz: fixed quarantine agent arg skip bug - -fixed minor bug which caused some arguments to be skipped then using a custom -quarantine agent - -[20031129.1443] jonz: implemented opt-in/opt-out storage directory - -moved all user.dspam and user.nodspam files to USERDIR/opt-in and -USERDIR/opt-out, respectively. this saves from needing to have and set up -a directory for each user. - -Version 2.8 ------------ - -[20031126.1633] jonz: stepped down insert query error to debug info - -stepped down the query error on insert down to debug info, as it is a common -occurance on busy servers. - -[20031124.0523] jonz: corrected buffer overrun in BDB drivers - -corrected buffer overrun vulnerability in BDB drivers dealing with copying -tokens into memory. discovered when working with corrupt dictionaries which -caused segfaults. the dictionary would have to be manipulated in order to -exploit, so risk was minimal. - -[20031124.0459] jonz: fixed bug in dspam_2mysql - -dspam_2mysql failed to place quotes around token value. - -[20031123.1351] jonz: fixed libdb4,libdb3 shared group bug - -fixed a bug that caused shared groups to fail with the following error: - -DB_ENV->open failed: No such file or directory - -[20031120.0405] jonz: fixed HTML boundary corruption with signature removal - -fixed a bug that caused boundary corruption after an HTML part where a DSPAM -signature from a previous reply was removed by the agent. - -[20031120.0405] jonz: do not remove old signatures from signed messages - -corrected the dspam agent so that older signatures from signed messages were -not parsed out. this caused the message to fail to authenticate. - -Version 2.8-rc-1 ----------------- - -[20031115.2042] jonz: fixed minor memory leak on initialization failure - -minor memory leak caused in libdspam when dspam_init fails. does not affect -DSPAM agent, only library. - -[20031115.2042] jonz: DSM_CLASSIFY generated truncated signatures - -fixed a bug where DSM_CLASSIFY generated truncated signatures - -[20031115.1540] jonz: corrected multipart analysis bug - -corrected a bug that caused parts of a multipart message that were not -specifically marked as text with the "Content-Type" header to be ignored from -analysis. - -[20031114.1949] jonz: corrected DSM_CLASSIFY in-memory totals bug - -corrected a bug that changed in-memory totals when DSM_CLASSIFY was used - -[20031113.1938] jonz: corrected DSM_CLASSIFY bug in libdspam - -corrected two bugs in libdspam regarding the DSM_CLASSIFY mode: - -1. CTX->signature would overwrite the provided signature with a new signature - resulting in a potential memory leak - -2. If no signature was provided, DSM_CLASSIFY would segfault instead of create - a new signature - -Version 2.8-beta-2 ------------------- - -[20031103.1119] awn: libdspam version changed to the '4:0:0' - -libdspam version changed to the '4:0:0' because introducing and -requiring of dspam_init_driver() at start and dspam_shutdown_driver() at -and is backward incompatible change. - -[20031031.0402] jonz: fixed web stats for shared groups - -shared group webstats fixed - -[20031031.0340] jonz: added commandline options - -added --stdout commandline option to deliver messages to stdout -added --deliver-spam commandline option to deliver spams to user's mailbox -changed --deliver flag to --deliver-fp, although --deliver still supported - for backward compatibility. option still only necessary when configuring - with --enable-spam-delivery - -[20031031.0324] jonz: changed default configure options - -enabled the following as defaults in configure: - -alternative-bayesian (alternative Bayesian algorithm) -test-conditional (test-conditional, iterative based training) - -[20031030.1120] jonz: fixed caching bug - -fixed caching bug in mysql_drv driver and ora_drv drivers causing dspam_stats -to return stats for first user, as stats for all users - -[20031029.0538] jonz: added --classify commandline flag - -the --classify commandline flag will classify the input message and output -to stdout "SPAM" or "HAM" depending on the result. No changes will be made -to the user's tokens or totals. - -[20031029.0538] jonz: changed totals mechanism - -the following changes have been made to the totals mechanism: - -- spam_misses has been changed to spam_misclassified -- false_positives has been changed to innocent_misclassified -- spam_corpusfed and innocent_corpusfed have been added - -IMPORTANT UPGRADE NOTE: Please see the README for information on updating your -SQL databases to accept these changes if you are using a SQL-based driver. If -you are using a BDB-based driver, these changes will automatically be -implemented. - -[20031028.2000] jonz: corrected CLASSIFY bug in mysql_drv and ora_drv - -corrected a significant bug in mysql_drv and ora_drv which caused tokens and -totals to be incremented on all CLASSIFY calls. - -[20031028.2000] jonz: changed DSF_CLASSIFY (flag) to DSM_CLASSIFY (mode) - -the DSF_CLASSIFY flag is now a mode called DSM_CLASSIFY. - -Version 2.8-beta-1 ------------------- - -[20031028.0531] jonz: added customizable header for cgi - -cgi spam account now has customizable header - -[20031028.0448] jonz: classification catches to add as spam - -spam catches by a member of a classification group should result in the -message being added as spam, as opposed to innocent. this has been corrected. - -[20031028.0204] jonz: X-DSPAM-User header only considered in managed groups - -the X-DSPAM-User header field is only paid attention to when the user is -a member of a managed group (the only time where the original user is -necessary). - -the parsing of the X-DSPAM-User header has also been corrected to chomp the -newline character, which was resulting in some systems including the character -in the username. - -[20031028.0116] jonz: corrected a critical error in classification groups - -corrected a critical error in classification groups causing DSPAM to crash -(and the message get delivered by the MTA's failsafe in most cases) when a -user in a classification group resulted in a spam being caught. - -[20031027.0137] jonz: added mta whitelists for source address tracking - -file USERDIR/mta.whitelist may now contain a list of internal MTA ip addresses, -which will cause DSPAM to skip to the next 'Received' header when processing -the source address. each IP should be on a newline. - -[20031026.1706] jonz: added signal handling to tools - -added signal handling to tools, to unlock databases upon SIGINT, SIGPIPE or -SIGTERM to avoid stale locks. - -[20031025.1111] jonz: added rolling filter accuracy stats to cgi - -rolling filter accuracy stats allows the user to measure their filtering -accuracy over a period of time (usually monthly or quarterly). stats should -be reset after a good learning period (approximately 4000 spams and nonspams) -to measure accuracy accurately =) - -[20031024.0007] jonz: libdb drivers reworked - -libdb drivers reworked for better: -- locking (exclusive) -- recovery (simple recovery run on open) -- environment management (individual user environments) - -IMPORTANT UPGRADE NOTE: - -run the script 'dspam_movefiles [userdir]' in the tools directory to upgrade to -this new directory storage format. after running, make sure you chown the -correct file ownership to the newly created directories. this should be done -with the MTA shut down and no dspam processes running. - -you will also need to reinstall/reconfigure the CGI - -[20031023.1949] jonz: update to cgi to avoid missed messages - -cgi now tracks the size of the quarantine between viewing and deleting all -messages, to avoid deleting messages that came in while reviewing the -quarantine. - -[20031023.1727] jonz: compensated for converged boundaries - -compensated for a slight break of RFC where two boundaries in a nested -message appear without a blank space in-between, leading to message corruption. -fortunatley, this type of behavior is extremely scarce. - -[20031023.0900] jonz: fixed classification group bug - -fixed a bug that caused classification groups never to fire; datatype -CTX->confidence should be float, not int. - -[20031022.2229] jonz: added "-d %u" to default cgi flags - -added "-d %u" to default dspam cgi flags to assist new users - -[20031022.0930] jonz: fixed bug preventing multiple group subscriptions - -fixed a bug that caused a user to not be able to be subscribed to multiple -groups - -Version 2.7.6.10 ----------------- - -[20031022.0930] jonz: added support for managed shared groups - -the group type 'shared' can be appended with ',managed' to convert the shared -group into a managed shared group. a managed shared group is the same as a -shared group, only the managed version will share the quarantine box as well, -enabling one user (named after the group) to manage the handling of all -quarantine functions (false positive reporting, etc.). - -this is generally not what users want, as personal information could potentially -be shared with the administrator of the group, however there are some -circumstances where this would be appropriate. - -a regular shared group: - -groupname:shared:user1,user2,userN - -a managed shared group: - -groupname:shared,managed:user1,user2,userN - -[20031022.0930] jonz: corrected long-time stdin bug - -corrected a long-time, just discovered but that caused stdin to be read in very -small chunks (32 bytes each). correcting this bug has caused DSPAM to read -in messages much quicker. - -[20031022.0930] jonz: cgi to use X-DSPAM-Signature - -when message-id is not present, the cgi will now use the X-DSPAM-Signature -field to uniquely identify each message. - -[20031022.0930] jonz: extended header assembly buffer to 4k - -header assembly buffer extended to 4k; was truncating some longer fields at 1k. - -[20031022.0930] jonz: minor crash bugfix - -an obscure bug has been corrected which caused dspam to crash if the word -"boundary" was placed on a line in the message body, and that line began -with a space or tab. - -[20031022.0900] jonz: false positives not delivered when spam-delivery enabled - -false positives shouldn't be delivered when --enable-spam-delivery is enabled, -since they will be mailed in (or otherwise processed) directly from the user's -inbox. - -to force false positives to be delivered, use the --deliver commandline -argument - -Version 2.7.6.9 ---------------- - -[20031021.1300] jonz: significant changes to mysql driver - -the data type for the 'token' field in the dspam_token_data table has been -changed from BIGINT to VARCHAR. This is due to a bug in MySQL being unable to -handle some of the large numeric values used for tokens. - -BEFORE UPGRADING, SHUT DOWN YOUR MTA AND ISSUE THE FOLLOWING MYSQL QUERY: - -alter table dspam_token_data modify token varchar(32); - -[20031021.1206] awn: Convenience symlinks for libdb{3,4}_deadlock - -Convenience symlinks dspam_deadlock.libdb4 (in case of libdb4_drv), -dspam_deadlock.libdb3 (in case of libdb3_drv) and dspam_deadlock (in -case of both libdb*_drv) are added and pointed to the appropriate -libdb{3,4}_deadlock binary. - -[20031021.1016] awn: configure: mysql and network-related libraries - --lnsl and -lsocket are added to the mysql client library check where -needed (e.g. on Solaris). - -[20031021.0000] jonz: changed signature format to include frequency - -WARNING: You should delete all your temporary signature information before -upgrading to this version, as the signature format has changed. You can do -this by deleting all your .sig files or issuing a -"delete from dspam_signature_data" query if using a SQL-based driver. - -RATIONALE: When performing classification queries with signatures, the -frequency is necessary to insure an identical calculation. - -[20031021.0000] jonz: added support for 'CLASSIFICATION' group - -A 'CLASSIFICATION' group type has been added. Classify groups are groups of -users who share the results of spams against their own personal dictionaries. -This means that for every message that comes in for any user in the group, -dspam classifies that message for every user and if any user believes the -message to be spam, it is marked as spam for the destination user. - -To avoid false positives, external classification is only used when there is -a confidence level of 0.30 or higher of spam. The confidence level is -calculated with Chi-Square. - -Members of this type of group should only join after their initial training -period. Members may also be part of an inoculation group, but users can -not be a part of both a classify group and a shared group. - -[20031021.0000] jonz: changed default probability for single-corpus tokens - -changed the probability for tokens that appear only in one corpus: - -TYPE FROM TO -Appears +10 in Spam .9901 .9999 -Appears <10 in Spam .9900 .9998 -Appears +10 in Innocent .0099 .0001 -Appears <10 in Innocent .0100 .0002 - -[20031019.2200] jonz: added test-conditional training support - -added configure flag --enable-test-conditional which will enable test- -conditional training. test-conditional tranining will automatically re-train -the user's dictionary on spam or false positive until the message condition is -met (e.g. until the user's dictionary no longer results in misclassification of -the message being retrained). this training has a maximum number of 5 -iterations, and will only invoke when: - -- The user has > 4000 innocent messages in their corpus, and is reporting - a spam - -- The user is reporting a false positive (regardless of the number of -messages in their corpus) - -[20031019.2016] jonz: added support for shared groups in mysql_drv driver - -support has been added for shared groups using the mysql_drv driver, but with -one caveat: if you will NOT be enabling "virtual users" support, you will need -to create a user on your system for each group you add. This is because the -mysql_drv driver maps user ids in the database to users on the system. this -is not an issue when "virtual users" support is enabled. - -Version 2.7.6.8 ---------------- - -[20031019.1722] jonz: added mysql.sock functionality - -added functionality for connecting via mysql.sock instead of TCP. specify -pathname to socket in lieu of hostname to implement. - -[20031019.1700] jonz: eliminated false-positive retrain headers - -eliminated the additional X-DSPAM headers added when reclassifying a -false positive. the headers from the original classification are -preserved. - -[20031019.1530] jonz: centralized syslog logging of mysql query errors - -centralized/standardized syslog logging of all mysql query errors - -[20031019.1530] jonz: corrected bug in virtual users w/mysql - -corrected a bug causing some tools to fail when virtual users is enabled while -using the mysql_drv driver. - -[20031018.1050] jonz: corrected type-o in dspam_corpus.in - -fixed close(PIPIE) type-o in dspam_corpus.in - -Version 2.7.6.7 ---------------- - -[20031017.2230] jonz: enhanced overall inoculation processing - -code cleanup of inoculation processing; one central subroutine. fixed some -minor related bugs. - -[20031017.2129] jonz: corrected external inoculation processing - -external inoculations (--corpus --inoculate --addspam combination) resulted in -an error causing the user to never be inoculated, however all users in the -inoculation group were. corrected this bug so that the destination user would -also be inoculated. - -Version 2.7.6.6 ---------------- - -[20031017.1930] jonz: fixed bugs in CGI 'From' line reporting - -fixed a bug that caused malformatting in the 'Fron' line when placing in spam -quarantine - -[20031017.1930] jonz: fixed bugs in false positive processing - -fixed a bug, which now strips out any quarantine message 'From' line added by -DSPAM prior to processing. - -[20031017.1930] jonz: fixed variable definition problems with experimental code - -fixed bugs in experimental code; should not affect normal users, but broke -the build anyway. - -Version 2.7.6.5 ---------------- - -[20031017.1730] jonz: added --enable-experimental - -added --enable-experimental flag which activates experimental code, moved -the following code bases to experimental: - -- Versatile Language Message Inoculation Format - (standard for sending/receiving inoculations across multiple anti-spam - platforms and systems) - -- Counting of unknown tokens in messages - -[20031017.1700] jonz: only inoculate users who require inoculation - -inoculation now only inoculates users who would otherwise have misclassified -the message being presented - -[20031017.1600] jonz: changed all /tmp files to USERDIR - -all /tmp files now outputted to USERDIR to avoid a race condition. - -[20031016.2207] awn: libdb detection is changed again (sigh) - -Probing for -ldb- and -ldb is resurrected again (needed -for some version of Debian with libdb v3.2.9). Difference from previous -one is using libtool for linking test frogram at the "header- -vs. library version" check stage. - -[20031016.1837] jonz: changed high characters to 'z' instead of ignored - -changed all high characters to z's; previously ignored them. effective way to -improve filter rate on spams using wide characters. credit for this technique -given to Brian Burton. - -[20031016.1400] jonz: added warning about MySQL bug to README - -added information about the bug in MySQL versions < 4.0.15.stable to the -MySQL README. - -[20031016.1227] jonz: compensated for mysql_drv insert bug - -compensated for mysql_drv insert bug; made better code in both mysql_drv and -ora_drv to handle insert failures with more grace - -[20031016.1142] jonz: corrected token insert debug output - -corrected debug output for token inserts to display correct query and disk -state. - -Version 2.7.6.4 ---------------- - -[20031016.0946] jonz: switched to MyISAM MySQL tables - -InnoDB turned out to be much slower than MyISAM, so all MySQL objects have -been changed to be of type "MyISAM". - -[20031015.1434] jonz: added exit code mirroring of LDA - -added exit code mirroring of LDA; if any calls to LDA fail, dspam will return -the last failed exit code - -[20031015.1045] jonz: added caching of getpwnam() and getpwuid() information - -added caching of getpwnam() and getpwuid() information for non-virtual users -(already caches for virtual users). this was added to keep some tools from -hammering on LDAP or other local authentication mechanisms. - -Version 2.7.6.3 ---------------- - -[20031014.2211] jonz: fixed 100% cpu utilization bug in libdbX_deadlock - -fixed a bug in libdbX_deadlock causing 100% cpu utilization on linux - -[20031014.1935] jonz: fixed auto-recovery in libdb drivers - -fixed bugs in auto-recovery mechanism in libdb drivers - -[20031014.1545] jonz: added support for accepting inoculation messages - -Added support for "Inoculation Message Format", a new standard which -is currently in the form of an Internet-Draft, to allow inoculation -via email and trusted checksums. - -[20031014.0824] jonz: added X-DSPAM-Signature - -X-DSPAM-Signature is NOT a replacement for having in-line signatures -but is useful for debugging purposes - -[20031014.0842] jonz: enhanced boundary recognition - -enhanced boundary recognition to catch boundaries with malformatted -definition lines - -[20031013.2217] jonz: fixed bug in dspam_2mysql - -fixed type-o in 'false-positives' field to false_positives - -[20031013.1949] jonz: better html filtering - -implemented better filtering of some useless html tag data, focus more on -content; resulted in the catching of a few more spams - -[20031013.1832] jonz: added --inoculate flag - -added support for inoculation using --inoculate flag. this can be used in -conjunction with external inoculation as described in the README file. - -Version 2.7.6.2 ---------------- - -[20031013.1443] jonz: fixed algorithm initialization bug - -fixed a bug in the initialization of algorithm data, which caused some -miscalculations whenever the first token was very innocent. - -[20031013.1413] jonz: changed token sorting algorithm - -token sorting now sorts by delta first, then by frequency; this means -tiebreakers will be based in part on token frequency - -[20031013.1329] jonz: added deadlock detection tool - -for large-volume implementations, added a deadlock detection tool, -libdb3_deadlock or libdb4_deadlock. this tool can be run at system start and -will continue to perform deadlock operations in the background. - -[20031013.1317] jonz: implemented deadlock detection - -Implemented calls to libdb's deadlock detection mechanism - -[20031013.1250] jonz: modified Chi-Square algorithm for better performance - -Chi-Square algorithm changed to use 25 tokens, ignoring mid-range - -[20031012.1831] jonz: changed group file format, added inoculation type - -changed group format to: - -groupname:grouptype:user1,user2,userN - -BE SURE TO UPDATE IN YOUR GROUP FILE - -there are now two types of groups: shared and inoculation. the shared group -is the group everyone is used to, sharing dictionaries and signature dbs. - -the inoculation group allows each member of the group to maintain their own -private dictionary and signature database, but members of the group will -automatically train eachother's dictionaries with spams they manually forward in -which will help 'inoculate' all other group members from new spams going out. - -examples: - -development:shared:bob,tom,bill - -company:inoculation:jim,ted,robert - -a user can be a member of multiple inoculation groups, but cannot be a member -of both a shared group and an inoculation group. - -[20031012.0009] jonz: fixed freed-memory bug in decode.c - -fixed freed-memory bug in deocde.c, which caused an occasional crash when -decoding encoded headers. - -Version 2.7.6.1 ---------------- - -[20031011.1236] jonz: added support for multiple algorithms - -added support for multiple algorithms; e.g. if any of the enabled algorithms -suspect the message is spam, it is spam. you can use the following flags: - ---enable-chi-square ---enable-alternative-bayesian ---disable-traditional-bayesian - -traditional bayesian is enabled by default - -[20031011.1034] jonz: added Chi-Square specific per-token calculations - -when using Chi-Square, added Chi-Square's expanded per-token calculations - -[20031011.0923] jonz: fixed alternative bayesian calculations - -fixed problem with the wrong definition names being used, which caused -alternative bayesian never to get invoked - -[20031011.0923] jonz: fixed a bug in all calculations - -a bug in 2.7.6 was fixed which resulted in spams to be missed if there were -fewer than 15 tokens available for calculation. this could only occur in the -most rarest of circumstances, so it should not have affected much. - -Version 2.7.6 -------------- - -[20031008.2200] jonz: added alternative calculation modes - -added --enable-alternative-bayesian flag which invokes Brian Burton's -alternative Bayesian algorithm - -added --enable-chi-square flag which invokes Chi-Square algorithm - -only one or neither (for default bayesian) flags should be used. debug -information for all three calculations is generated regardless. - -[20031008.2029] jonz: fixed bug in libdb drivers - -fixed a bug which used memory that had already been freed causing -some occasional unpredictible behavior. - -[20031008.1431] jonz: added support for multipart/signed messages - -added support for multipart/signed messages without altering message body. -signature is appended as a text attachment. - -[20031007.1904] jonz: fixed bug in boundary detection - -fixed a bug in boundary detection where boundary would fail to be detected if -it wasn't the first definition on the Content-Type heading. For example: - -Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; - boundary="------------ms010307080208090601090900" - -would have failed. this bug fix also improves overall boundary detection. - -[20031007.1724] jonz: added source address reporting - -the source address for all messages are now reported via syslog. this uses -the new dspam_getsource() function added to the API. depending on whether the -message is spam or innocent, the message will be reported either to MAIL.INFO -or MAIL.DEBUG. for example: - -dspam[30965]: spam detected from X.X.X.X - -dspam[30414]: innocent message from X.X.X.X - -this can be used for creating automatic blacklists. more to come. - -[20031007.1557] awn: configure script changes - -Configure script now detects version of libdb headers and guesses -appropriate library name from this version. Probed libraries are: - - -ldb-.minor> - -ldb - -As consequence and for example, no symlinking libdb41.so to the libdb-4.so is required now on FreeBSD. - -Version 2.7.5 -------------- - -[20031007.0930] jonz: date field no longer ignored - -date field is no longer ignored; time of day can sometimes play an effective -role in identifying spam or preventing false positives. - -[20031006.1911] jonz: Oracle storage driver - -first release of ora_drv; storage driver for Oracle. please see README file -for more information. - -[20031004.1423] awn: support for program-name transformation. - -Configure options `--program-prefix', `--program-suffix' and -`--program-transform-name' are fully supported now except CGI. -(Was: dspam_corpus and dspam_genaliases don't honor transformed name of -dspam binary). - -[20031003.1832] jonz: fix for base64-encoded binary messages - -bug fixed which caused corruption in some base64-encoded single-part -messages in which the only component was a binary file. - -[20031003.0031] jonz: automatic recovery for libdb drivers - -automatic recovery has been implemented for libdb drivers - -[20031003.0031] jonz: DB_ENV implemented for libdb drivers - -DB_ENV locking has been implemented for libdb drivers. This obsoletes -storage driver dot-lock file locking, which is no longer used. quarantine -dot-lockfile locking is still used when writing to the quarantine. - -Version 2.7.4 -------------- - -[20031002.1728] jonz: modified corpus flag to force results - -use of corpus flag now forces results to match commandline flags, meaning -innocent messages no longer need to be fed in first. - -[20031002.0800] jonz: added unique id to dspam_ngstats - -for systems without a static public ip address, a unique id can be configured -in dspam_ngstats.c (NGSTATS_UID) comprised of alphanumeric characters, periods, -and underscores. any invalid characters will cause stats to be ignored. - -[20031002.0800] jonz: removed broken sanity checks - -some sanity checks were firing off erroneous messages in 2.7.3; these have -been removed - -[20031001.0800] jonz: fixed --enable-large-scale with mysql_drv - -modified all drivers to add support for --enable-large-scale with mysql_drv - -[20031001.0800] jonz: added dspam_ngstats - -added dspam_ngstats, a global stats reporting tool designed for global -stats tracking for dspam - -[20030930.1547] awn: Convenience symlinks for libdb{3,4}_purge - -IMHO, `libdb3_purge' and `libdb4_purge' are not a very descriptive names. -Therefore, 2 convenience symlinks are added: - o dspam_purge.libdb4 (dspam_purge.libdb3 in case of libdb3 driver), and - o dspam_purge -both pointed to the appropriate libdb{3,4}_purge. - -[20030930.1517] jonz: fixed problem with trailing commas in update command - -Version 2.7.3 -------------- - -[20030929.1450] jonz: fixed problem with groups - -groups has been repaired; apparently a line of code was inadvertantly deleted -from the source tree causing it to fail in 2.7.2. - -[20030928.0253] awn: New scheme for conditional compilation of storage drivers - -All following is for `configure.ac' and resulting `configure' script: - - Now configure doesn't assume that storage driver sources are have - name `${storage_drv}.c' and `${storage_drv}.h' - - You need to list resulting .lo files in the `${storage_drv_objects}' - variable instead. - - Storage driver specific subdirectories are should be listed in the - `${storage_drv_subdirs}' variable also. - -This allows to have any number (including zero) driver-specific sources -and subdirectories, build automatically driver specific tools in these -directories (like `libdb4_purge') and should work properly in the VPATH -environment. - -[20030928.0248] awn: configure.ac bug fix - -Fix CPPFLAGS related bugs in the storage drivers sections of -`configure.ac'. - -All three storage sections in the configure.ac was have code like - CPPFLAGS="$DB_LIBS $CPPFLAGS" -instead of - CPPFLAGS="$DB_CPPFLAGS $CPPFLAGS" -(replace DB_ by MYSQL for give mysql case). - -This was my bug, I know. - -[20030927.1600] jonz: added docs for Courier MTA - -added documentation for configuring Courier MTA with DSPAM. contributed by -Michael Greb. - -Version 2.7.2 -------------- - -[20030925.2231] jonz: added --disable-trusted-user-security - -added configure flag --disable-trusted-user-security to disable trusted user -security, rather than trying to maintain two different versions of dspam. - -[20030925.1103] jonz: added support for RedHat's built-in libdb4.0 - -added support for RedHat's built-in libdb-4.0. This should also provide -compatibility with any other libdb-4.0. An alias will still be necessary: - -ln -s /usr/lib/libdb-4.0.so /usr/lib/libdb-4.so - -[20030925.1103] jonz: removed -d $u from default LDA configuration - --d $u coming first in the argument list caused some problems; -d %u should now -be used instead in the MTA configuration. - -[20030925.1103] jonz: patch to compensate for yahoo broken RFC bug - -implemented patch to compensate for a bug in the yahoo client where yahoo -breaks RFC and writes an end boundary prematurely, causing the real boundary -to get corrupted. - -[20030925.0855] jonz: changed compile flag --enable-virtual-uids - -changed compile flag --enable-virtual-uids to --enable-virtual-users - -[20030925.0852] jonz: fixed plain text html signature placement bug - -fixed a small bug that caused DSPAM to place the signature in html code samples -in plain text. - -[20030924.0000] jonz: added support for virtual users - -added support for virtual users in mysql_drv. this is necessary when the -users don't actually exist on the system. use --enable-virtual-users to -enable. only necessary when using the mysql storage driver. - -[20030923.2043] jonz: fix for multiple user bug - -restored %u and adjusted docs for multiple local user bug with sendmail - -Version 2.7.1 -------------- - -[20030923.0050] jonz: fixes for libdb tools - -several small fixes to issues with compiling libdb tools - -[20030923.0045] jonz: bug fix for header decoding - -fixed a bug causing some headers to decode incorrectly - -[20030923.0030] jonz: bug fix for attachments and signature - -added code to specifically NOT append a signature to any segments that have -"Content-Disposition" of type attachment. - -[20030922.1900] jonz: added more debug output - -added more debug output (on error) to mysql driver and libdspam - -[20030920.0840] jonz: mysql_drv to use -lm -lz - -switched mysql_drv to use -lm -lz in place of -lcrypto. both apparently have -compress/uncompress functions - -Version 2.7 ------------ - -[20030919.0900] jonz: added dspam_merge tool - -Version 2.7.beta.3 ------------------- - -[20030915.0000] jonz: added mysql_drv storage driver - -mysql_drv storage driver added for MySQL functionality. please see README -and tools.mysql_drv for more information. - -[20030914.1410] jonz: fixed bug in innocent_hits - -fixed bug where some tokens received 2 innocent hits instead of 1 (apparently -is an old but but did not dramatically affect effectiveness) - -[20030913.0956] jonz: implemented quarantine locking - -implemented quarantine locking mechanism independent of driver locking - -[20030913.0900] jonz: internalized API locking - -all API locking performed internally (driver-specific). no external locking -calls exist; part of _ds_init_storage and _ds_shutdown_storage. reason: -not all drivers will require context locking (and hopefully someday neither -will libdb3/libdb4 drivers). - -[20030912.0000] jonz: locks to use USERDIR - -for driver compatibility, all .lock file locking takes place in USERDIR, even -for large-scale implementations - -[20030911.0000] jonz: driver config script management - -implemented driver configure script management and tools.[driver] for -driver-specific tools. - -Version 2.7.beta.2 ------------------- - -[20030910.0054] jonz: message header decoding - -added message header decoding per RFC 2047 - -[20030909.1830] jonz: implmented standardized return codes - -implemented standardized return codes for the major api functions: -EINVAL, EFAILURE, ELOCk, EFILE, EUNKNOWN - -[20030909.1730] jonz: ported all tools to new driver API - -ported all tools to new driver API. dspam_purge has been replaced with -a driver-specific purge mechanism (default: libdb4_purge), due to the fact -that not all drivers will need to purge, and recreating datafiles is a very -specific function...still uses the storage driver api's locking mechanism. - -[20030909.0051] jonz: removed dspam_convert - -removed dspam_convert tool for 2.5->2.6 upgrades - -[20030909.0051] awn: configure script changes - -`--enable-gcc-warnings' configure option is added. - -[20030908.2000] jonz: implemented storage driver API - -implemented storage driver api. default driver is libdb4_drv - -[20030907.1627] awn: dspam_genaliases changes - -dspam_genaliases now generates `nospam-USER' aliases (aliases for false -positive reporting) by explicitly request only. New `--nospam' command -line option is used for this. - -Version 2.7.beta.1 ------------------- - -[20030907.1140] jonz: user identification and passthru changes - -the method of user identification and passthru has been changed: - - - DSPAM no longer recognizes -d to identify the user, but instead --user - must be used. --user will never be passed onto the local delivery agent. - - - In order to pass the -d flag through to the local delivery agent, it - must be specified either separately on the commandline, or at configure - time. - - - To allow -d flag support to be supported at configure time (and when - overriding untrusted users), the $u variable has been added to dspam. - any commandline arguments passed through DSPAM matching $u will be - replaced with the actual destination username (specified with --user - or automatically forced for untrusted users). - -These changes require some modifications to the mailer configuration. In the -following example for sendmail, you would change the following line in -the Mlocal block: - -A=/usr/local/bin/dspam -d $u - -to: - -A=/usr/local/bin/dspam --user $u -d $u - ---user is not passed through to the LDA, but -d is. Alternatively, you could -remove '-d $u' from sendmail.cf, and configure dspam with: - ---with-local-delivery-agent="/path/to/lda -d \$u" - -NOTE: be sure to escape the $ in $u ONLY when specifying it on the commandline. -This will prevent $u from being overwritten with the shell's environment -variable 'u'. - -Specifying this at configure time is especially useful if you plan on running -dspam via commandline and do not want to have to specify -d [username] in -addition to your --user [username] arguments. - -[20030907.1440] jonz: removed --deliver-cmd and --quarantine-cmd - -removed runtime --deliver-cmd and --quarantine-cmd functions; added configure -time --with-quarantine-agent="/path/to/agent" to override default quarantine -function. - -[20030906.0000] jonz: fix for boundary definition identification - -fix to detect non-lowercase multipart boundary definitions - -[20030906.0000] jonz: partial rewrite of internal sorting routines - -partial rewrite of tbt sort routines to drop recursion and potential stack -problems to follow. problems only experienced when using API with -multithreaded code. original patch submitted by Stuart Gathman - - -[20030906.0000] jonz: forced --deliver-cmd and --quarantine-cmd to require -trusted user permissions. dspam also must be compiled with ---enable-insecure-functions for them to be available. - -[20030906.0000] jonz: trusted user implementation - -implemented trusted user approach with user and passthru overrides for the -untrusted users. see README for more information - -Version 2.6.5.2 ---------------- - -[20030906.0000] jonz: insecure parameter check - -insecure parameter check; checks parameters for insecure characters: -| ; < > ` - -Version 2.6.5.1 ---------------- - -[20030905.1105] jonz: partitioned insecure functions - -partitioned potentially insecure functions to require the configure flag ---enable-insecure-functions to be set to activate. these include: - ---deliver-cmd ---quarantine-cmd - -special attention needs to be given to the execution permissions of the dspam -agent when enabling these functions to avoid users being able to -execute arbitrary commands on the server. it should be understood that these -are potentially insecure functions and could potentially lead to the execution -of arbitrary code if exploited by a malicious user or CGI. - -[20030905.0418] jonz: fixed bug: from header corruption - -if MTA is passing in From headers, they were being corrupted by DSPAM's -header parsing. fixed to specifically parse From headers differently - -[20030904.1422] jonz: fixed bug with quoted-printable debugging - -fixed a small bug that would fail to decode a quoted character immediately -following a line break - -[20030904.1127] awn: c89 compatiblity - -C89 compatiblity patch is applied. Patch author: Albert Chin-A-Young - - - * configure.ac, base64.c, decode.cn dspam.c, error.c, - error.h, libdspam.c, localdb.c, lock.c, signature.c, - tools/dspam_dump.c: Allow building with a C89 compiler - which does not have ISO varargs. - -[20030904.1046] awn: work around Solaris' make - -tools/Makefile.am doesn't uses $< authomatic variable because Solaris -make (at least some versions) doesn't supports its. - -[20030904.0700] jonz: segfaulting on _ds_message_destroy - -fixed a bug where destroying CTX->message caused a segfault. fortunately, this -bug would have never been reached by the agent or the api. - -[20030904.0700] jonz: nfs locking - -modified lock.c to work over nfs mounts, only checking pid when hostname -matches. maximum 20-minute stale lock removal. - -[20030903.1716] awn: dspam_corpus and dspam_genaliases update - -dspam_corpus and dspam_genaliases are use real path to the dspam binary -instead of assuming default /usr/local/bin/dspam. - -dspam_genaliases outputs aliases table to the stdout now by default. -Use new `-o filename' or `--output filename' option for redirect its to -the file. - -dspam_genaliases generates `nospam-USER' aliases in addition to the -`spam-USER' aliases now. - -[20030903.0145] jonz: fixed memory leak in dspam agent - -fixed internal memory leak in dspam agent where CTX->message was not destroyed. -only leaked until dspam agent exited, then memory was reclaimed - -[20030903.0145] jonz: updated example.c - -updated example.c to show correct CTX->message destruction - -[20030903.0115] jonz: fixed bug in false positive reporting - -fixed bug where innocent_hits incremented twice on false positive report - -Version 2.6.5 -------------- - -[20030902.0000] jonz: added --version commandline parameter - -added --version commandline parameter to display version; -v is not used as -it could be a passthru parameter to an LDA. - -[20030902.0000] awn: dspam_purge changes - -minor fixes to dspam_purge tool - -[20030901.0000] awn: configure changes - -- implemented checks (and use of results) for -- checking for math.h and fabs() were added, use -lm where need -- aesthetic changes - -[20030901.0000] awn: removed compiler warnings - -removed "no previous prototype" warnings with some compilers - -[20030901.0000] awn: compiler warnings - -miscellaneous changes to remove some compilation warnings - -Version 2.6.5-rc1.1 -------------------- - -[20030831.0000] jonz: debug output - -removed left over debug output - -Version 2.6.5-rc1 ------------------ - -[20030829.0000] jonz: fixed broken rfc attachments - -made compensation for broken rfcs with embedded attachments, where original -message should've been message/rfc822 but was instead attached as plain/text. -this caused attachments to be processed/consume large quantities of time. -decode.c modified to accept a new boundary definition from any header. - -[20030829.0000] jonz: --corpus flag foregoes message delivery/quarantine - -use of the --corpus flag will now prevent the messages fed in as corpus from -being delivered/quarantined - -[20030829.0000] jonz: added commandline delivery override - -commandline flags --deliver-cmd and --quarantine-cmd added to override the -default behavior for delivery (MLOCAL) and quarantine (either MLOCAL or -quarantine depending on configuration). syntax: - -dspam --deliver-cmd "/path/to/cmd -flags" -dspam --quarantine-cmd "/path/to/cmd -flags" - -(be sure not to use = sign). - -when overridden values used, the user id is by default NOT passed through to -the called program. use --with-passthru to pass ARG_USER %USER through to -the called program. example: - -dspam --deliver-cmd "/bin/cat" --with-passthru - -actually calls: /bin/cat -d [username] - -dspam --deliver-cmd "/bin/cat" - -actually calls: /bin/cat - -[20030829.0000] jonz: signature insertion moved inside body tag - -dspam signature now inserted (wherever possible) inside HTML body tags to -avoid droppage under certain conditions. - -[20030829.0000] jonz: changed dspam signature - -dspam signature changed to a visble signature to work with clients that -reformat only visible data (Eudora). new signature: - -!DSPAM:[SERIAL]! - -Version 2.6.5-beta-2 --------------------- - -[20030826.1800] jonz: added --enable-delivery-to-stdout option - -added --enable-delivery-to-stdout option which causes all delivered messages -to be printed to stdout rather than piped to an LDA. if you wish to have spams -printed to stdout as well, use the --enable-spam-delivery option in -conjunction. - -[20030825.0031] jonz: signature attachment mode - -coded signature-attachments mode, rewriting messages to include a dspam -signature attachment with full data, instead of writing the server-side -attachment. use --enable-signature-attachments to enable. - -[20030824.2345] jonz: application/dspam-signature media type - -added application/dspam-signature media type recognition - -Version 2.6.5-beta-1.1 ----------------------- - -[20030823.2010] jonz: fixed bug for empty headers - -fixed a bug where segments with empty headers would be dropped in reassembly -(currently these only seem to appear in mailer-daemon messages) - -Version 2.6.5-beta-1 --------------------- - -[20030823.1804] jonz: groups now share same signature file - -groups now share same signature file enabling them to use a single group alias -for forwarding spams. - -[20030823.1339] jonz: added new configure flags - ---enable-homedir-dotfiles -When enabled, instead of checking for $USERDIR/$USER[.nodspam|.dspam], -DSPAM will check for a .nodspam|.dspam file in the user's home directory. - ---enable-opt-in -Causes DSPAM to filter mail only for users with a .dspam dotfile. The default -is opt-out, which requires a .nodspam file to exist to bypass filtering. - -when using --enable-homedir-dotfiles, dspam installs as setuid root. - -[20030823.1100] jonz: fixed segfaulting on signature reversal - -[only affected alpha-4-internal] -fixed a bug where dspam segfaulted while reversing a signature making it -impossible to train dspam using signatures with alpha-4-internal. - -[20030823.1100] jonz: added support for message/rfc822 - -[only affected alpha-4-internal] -added support for parsing message/rfc822 components; signature was not being -found in forwarded messages using this media type. - -[20030822.0929] jonz: added fp alerts to cgi - -added customizable false positive alerts to cgi. alerts list will be -compared to message headers and hilight all messages that match in yellow. -alerts are stored as $USERDIR/$USER.alerts. - -[20030822.0929] jonz: fixed decoding header bug - -fixed a bug in the header decoding where the original encoding type was -reassembled into the message, instead of the decoded type. fix only -affected alpha-4 (internal). - -[20030822.0929] jonz: moved signature append to process - -moved appending of signature out of delivery_message and into the process -function, using the new message structures instead of parsing. this also -fixes a problem in that on memory failure, the delivery_message function -will no longer need to allocate memory. - -[20030822.0016] jonz: adjusted lock timeout - -adjusted lock timeout from 10 to 20 seconds. depending on the load of your -machine, this could be set higher or lower. the higher the setting, the less -chance of any failover deliveries being made, and the more chance of multiple -processes lined up waiting for a lock on a user's mailbox. - -[20030822.0014] jonz: documentation tweaks - -a few miscellaneous tweaks - -[20030821.2145] jonz: added --enable-spam-delivery - -added configure flag --enable-spam-delivery causing all spams to be delivered -instead of quarantined (for use with X-DSPAM header filtering - -[20030821.1935] jonz: rewrite of message post-processing - -Message post-processing rewritten; including appending of signature, -message re-write, etcetera. - -[20030821.1908] jonz: added header information - -X-DSPAM-Result: Spam || Innocent -X-DSPAM-Probability: (Actual Probability) - -[20030821.1820] jonz: removed CTX->copyback - -CTX->copyback is now obsolete. All base64 decoding is performed on -CTX->message, which is available from the context, or via calling -_ds_assemble_message() function using the message structure as a parameter. - -[20030821.1730] jonz: changes to DSPAM_CTX - -+ struct _ds_message *message; /* Message Components */ - -for compatibility with existing API, dspam_process still accepts a const char *, -however tools that already perform message actualization (such as the DSPAM -agent) can set CTX->message to the existing struct _ds_message * to avoid -reprocessing the message, and to carry over any encoding changes. - -[20030821.1730] jonz: implemented new decode/actualization functions in sig - -implemented use of new actualization and decoding functions [decode.c] in -dspam.c's signature scan code. - -[20030821.1729] jonz: finished block decoding functions - -/* Public decode function */ -char * _ds_decode_block(struct _ds_message_block *block); - -/* Private decoding functions */ -char * _ds_decode_base64(const char *body); -char * _ds_decode_quoted(const char *body); - -[20030820.0015] jonz: finished preliminary message actualization - -decode.c: finished preliminary actualization code (code responsible for -actualizing a message into its individual components). experiments with -plain messages and non-embedded multipart messages succeeded. next phase of -testing to include embedded multipart messages, including spams that are -designed to frequently break RFC. once testing/patching is complete, -decoding routines to follow. - -[20030819.0000] jonz: signature embeddedding changes - -signatures are now embedded in every text segment of a message to -insure they are forwarded properly - -[20030818.1350] awn: fix for empty messages - -(Submitted by Andrew W. Nosenk ) - -* added check for empty data to prevent segfault - -[20030817.1336] awn: configure script changes - -(Submitted by Andrew W. Nosenko ) - -* configure.ac: Work around versioning issues of some versions of - db-4. E.g. db_create() may be not a real function but simple - forwarding macro to the db_create_4001(). - -* configure.ac: New configure option `--with-db4-libraries' (as - pair for `--with-db4-includes') - -[20030817.1230] jonz: added --disable-bias configure flag - -when configure is run with --disable-bias, dspam no longer biases the -statistics in favor of innocent mail. This may increase the filter's -effectiveness in catching spam, but could also potentially result in less -false positive protection. some argue that eliminating bias is more -accurate, not less. - -[20030815.0300] jonz: added dspam_genaliases script - -a small script to create an aliases table from /etc/passwd - -[20030814.1928] jonz: added large-scale directory support to tools - -ported tools to support large-scape directory support (see below). - -[20030814.0005] jonz: added large-scale directory support - -when configure is run with --enable-large-scale, dspam stores all its user -files in large-scale mode. for example, user root's files would be stored in -/etc/mail/dspam/r/ro/root. directories are created automatically as needed. - -Version 2.6.4.1 ---------------- - -[20030816.2352] jonz: parse fix for boundaries with spaces - -added fix for multipart emails with spaces in the boundary definition -(e.g. boundary= "blah"). Discovered in some of the newer 'Urgent Response' -type spams. - -Version 2.6.4 -------------- - -[20030809.1115] jonz: corpus spams marked as misses - -spams learned through dspam_corpus are now marked as misses instead of -caught spam. - -[20030808.1945] jonz: changes to header processing - -Message-ID is now considered for useful information. Received header is now -considered, but parsed in a different manner preserving IP addresses and -other useful information. - -[20030808.1945] jonz: blank signatures will no longer get written - -blank signatures are a result of a failover passthrough for a particular -user. dpsam has been changed to not write a signature if the signature -itself is blank, preventing from appearing in an email. - -[20030808.1945] jonz: added .nodspam file functionality - -in an attempt to conserve disk space, a username.nodspam file may be -touched in the /etc/mail/dspam directory, which will cause all messages -for that user to be passed through dspam and not processed. this will -prevent a dictionary or signature file from being built and save disk -space. users wishing not to use dspam can still simply not use it, -but dropping a .nodspam file will prevent any files from being created. - -[20030805.1630] jonz: fixed multiple header destroy calls - -fixed bug where the header nodetree was destroyed a second time in some errors -that cleaned up and returned, causing a segmentation fault. - -[20030805.1400] jonz: added quoted-printable decoding - -added quoted-printable decoding; decodes hex codes into actual characters. - -[20030805.1230] jonz: documentation correction for dspam_corpus - -dspam_corpus uses --addspam flag, not -a anymore - -[20030805.1200] jonz: added verbose debugging option - -added --enable-verbose-debug for verbose debugging information to be written -to /tmp/dspam.debug - -[20030805.1200] jonz: new line unbreaking code - -new line unbreaking code to unbreak only quoted-printable lines - -Version 2.6.3 -------------- - -[20030801.0930] jonz: debug after context destruction - -fixed a bug in dspam.c that reported debug information for a context -after it had been destroyed. - -20030801.0930] jonz: dspam_clean to create new databases - -dspam_clean tool rewritten to create new databases when called in the same -fashion as dspam_purge. this helps keep the databases in good health and -smaller filesize. - -[20030801.0900] jonz: fix for PGP signatures - -fixed formatting bug causing PGP signatures to be corrupted. fix required -removing line unbreaking from message which could potentially cause dspam to -lose one or two signatures when messages are being forwarded from Microsoft -Outlook. does not appear to be a significant issue. - -[20030801.0900] jonz: fix for unchecked malloc calls - -fixed two unchecked malloc calls -=> struct nt *nt_create(int nodetype) -=> struct nt_node *nt_add(struct nt *nt, void *data) - -submitted by Thomas Lussing - -[20030731.0852] jonz: added syslog logging - -added syslog logging using mail facility - -[20030730.2323] jonz: documentation addition for username case - - added this to the README: - - NOTE: Some authentication mechanisms are case insensitive and will - authenticate the user regardless of the case they type it in. DSPAM, - on the other hand, is case sensitive and the case of the username used - will need to match the case on the system. If you suffer from this - authentication problem, and are certain all of your users' usernames are - in lowercase, you can add the following line of code to the CGI right - after the call to &ReadParse... - - $ENV{'REMOTE_USER'} = lc($ENV{'REMOTE_USER'}); - -[20030730.2311] jonz: fixed bug in dspam_stats - -fixed formatting bug in dspam_stats causing problem with usernames > 16 -characters. submitted by Stuart Gathman - -Version 2.6.2.03 ----------------- - -[20030729.2205] jonz: fixed more line parsing bugs - -fixed some additional bugs in line parsing which may have caused some emails -to appear blank in Microsoft Outlook - -Version 2.6.2.02 ----------------- - -[20030729.0225] jonz: internal cleanup - -removed unused variables and added prototypes for some functions lacking them - -[20030729.0225] jonz: implemented strsep to fix processing snag - -large messages resulted in significant processor consumption due to previous -method of splitting up messages line-by-line. strsep now implemented to remove -this bottleneck. - -Version 2.6.2.01 ----------------- - -[20030710.1000] jonz: fixed bug in dspam_stats - -dspam_stats now reports TS (total spams) as total spams minus spam misses. - -[20030710.1000] jonz: fixed bug in false positives - -fixed a bug where false positives reported without a signature would fail to -decrease the total number of spams. this event should never occur using -dspam, and only addresses this as an issue for any third party software using -the dspam library. - -[20030710.1000] jonz: added support for reusable contexts - -added support for reusable contexts, enabling a context to be processed -multiple times. - -[20030704.1827] jonz: fixed condition in chomp - -fixed a condition in chomp where it could potentially cause a segment fault if -called with a NULL pointer, or a string with zero length. this should never -occur anyway considering the calling code. - -Version 2.6.2 -------------- - -[20030701.0000] jonz: added DSF_CLASSIFY flag - -added DSF_CLASSIFY flag to libdspam. use of this flag causes libdspam _not_ to -record statistics for a specific operation, but only to evaluate and return -the operation's result. - -[20030701.0000] jonz: fixed bit assignment bug - -fixed a bit assignment bug resulting in clearing of all flags when headers -ignored -submitted by Stuard D. Gathman [stuart@bsmred.dmsi.com] - -[20030701.0000] jonz: fixed bugs related to corpus mail - -fixed a bug causing corpus mail's headers to be ignored -submitted by Stuard D. Gathman [stuart@bsmred.dmsi.com] - -Version 2.6.1.01 ----------------- - -[20030627.1924] jonz: fixed memory free of copyback buffer - -copyback buffer is now freed in dspam.c when context is destroyed - -Version 2.6.1.00 ----------------- - -[20030622.0000] jonz: added ` as delimiter - -[20030620.0000] jonz: added support for group dictionaries - -Group dictionaries enable a group of users with similar email behavior to -share the same dictionary while still maintaining a private quarantine box. -Please see README for more information. - -[20030620.0000] jonz: added dspam_stats tool - -The dspam_stats tool can be used to display the statistics for one or all -users on the system. Please see README for more information. - -Version 2.6.0.69 ----------------- - -[20030618.0000] jonz: line unbreaking correction - -correction made to line unbreaking to sanity check for consecutive -equal signs - -Version 2.6.0.68 ----------------- - -[20030612.0000] jonz: change to configure tool - -changed configure tool to look for db_strerror instead of -db_env_create in the event that libdb was built without -environmental functions - -Version 2.6.0.67 ----------------- - -[20030609.0021] jonz: bugfix in line unbreaking - -fixed a bug in line unbreaking (where clients use an equal sign -followed by a carriage return to break up long lines) causing -some attachments to be unreadable by some mail clients. lines -are now only unbroken in text segments. - -[20030607.1020] jonz: bugfix in attachment boundaries - -fixed a small bug that wrote the boundary twice at the end of -an attachment - -Version 2.6.0.66 ----------------- - -[20030603.1900] jonz: bugfix in line unbreaking - -fixed a bug in line unbreaking (where clients use an equal sign -followed by a carriage return to break up long lines) causing -unquoted signatures ending with an equal sign to be malparsed, -causing the email to become slightly jumbled. - -[20030603.1800] jonz: DSF_CORPUS flag - -added DSF_CORPUS flag for processing messages that are from corpus; -prevents innocent totals/hits from being subtracted when spam corpuses -are fed in. - -Version 2.6.0.65 ----------------- - -[20030601.0000] jonz: bugfix for locking - -a bug in the locking mechanism for tools fixed; occasionally could cause -a corrupt dictionary - -Version 2.6.0.64 ----------------- - -[20030525.2300] jonz: bugfix for boundaries - -fixed a bug causing boundaries ending in == to be parsed incorrectly -fixed a bug in parsing boundaries that used = without quotes - -[20030523.2300] jonz: bugfix for attachments - -fixed bug causing attachments to be dropped - -[20030523.2300] jonz: optimizations for large databases - -increased database cache to 4MB and implemented alternative btree -sorting routine to greatly speed up database functions - -[20030523.2000] jonz: addition of libtool/shared libs - -libtool is now implemented to build a shared libdspam library. - -[20030523.1830] jonz: bugfixes - -bugfix for multipart messages that caused message to be truncated -bugfixes to signature management causing some segfaults -bugfixes to crc64 calls, some calls returned a different crc every time - -[20030523.0100] jonz: partial rewrite - -Rewrote dspam engine into libdspam, enabling developers to link in libdspam -to provide "drop-in" spam filtering for their projects. - -Migrated to 64-bit tokens; previous 2.6-Beta databases using 32-bit tokens -will not work with this new version. - -Server-side-signature presently the only signature storage method; looking -into a different method of incorporating signature in emails. - -Implemented tracking of spam misses and false positives. Reported in CGI - -[20030521.2315] jonz: url tokens ignored outside of urls - -tokens found inside urls are ignored as individual tokens, and only -represented as Url*token. - -[20030520.0200] jonz: bugfix for base64 decoding - -fixed a bug that failed to decode non-multipart base64 messages - -[20030519.0000] jonz: ignore all html tags without spaces - -ignore all html tags without spaces; frequently used to separate tokens - -[20030519.0000] jonz: ignored collapsible html tags - -collapsed (rather than overwrote) html tags to join together tokens that -some spammers use such tags to separate. - -[20030518.1500] jonz: addition of dspam_crc tool - -dspam_crc tool converts a string into the numeric crc used for storage in -the dspam dictionary; makes it easier to use dspam_dump and grep for a -particular token - -[20030517.1930] jonz: bugfix for as_spam signature - -fixed a bug causing the signature not to be displayed -on messages marked as spams - -[20030517.1300] jonz: bugfixes - -fixed bugs in signature storage (delete .sig files to fix) -fixed bugs in dspam_purge -fixed bugs causing segfault under some circumstances - -[20030516.0052] jonz: exim documentation corrections by Jerome Alet - -Exim configuration to directors, not routers - -[20030516.0020] jonz: massive rewrite and optimizations - -addition of tbt and lht dynamic data structures -rewrite of debugging functions -rewrite of database functions -conversion to crc32 long integers for token management -addition of dspam_convert to convert old databases -renamed dbdump to dspam_dump, removed dbset/dbdelete - -these rewrites/optimizations convert all tokens to numeric (long) -values, making processing and sorting much faster. tbt implements -a binary tree sorting mechanism eliminating qsort. storing tokens -in numeric format also removes the necessity for the zlib compression -librayr. - -[20030514.1500] jonz: bugfix in content identification - -small bugfix in content identification that led some emails to miss a -dspam signature - -[20030514.1500] jonz: error message output added to debug - -error messages previously only made it to stderr. when --enable-debug -option is used, errors are also printed to debug - -Version 2.5.4 - May 14 2003 ---------------------------- - -[20030514.0240] jonz: added autoconf support contributed by Andrew W. Nosenko - -thanks to Andrew W. Nosenko for contributing the files/patches to provide -autoconf support to dspam. please read the README file for instructions. - -[20030514.0200] jonz: changed hash to support ints - -hash.c modified to support ints or character pointers. makes tracking -token frequency much faster. - -[20030513.2345] jonz: bug in dspam_clean corrected - -corrected a bug in dspam_clean causing it to fail - -[20030513.2300] jonz: experimental tokenized rules - -playing with a few experimental tokenized rules - -[20030513.2300] jonz: freebsd makefile setuid root - -modified the freebsd makefile to install as setuid root. this is due to -freebsd's mail.local requiring the ability to change its uid. dspam will -not work correctly on the commandline (for example when reporting false -positives) - -[20030513.0325] jonz: changed probabilities for single-corpus tokens - -probabilities of 0.0100 and 0.0101 were previously assigned to tokens -appearing only in the innocent corpus. this has been changed to -0.0099 and 0.0100 to balance out the 0.9900 and 0.9901 used for tokens -that appear only in the spam corpus. this very small change corrected -3 false positives that appeared. - -[20030513.0250] jonz: added documentation for exim - -documentation thanks to David Shirley - -[20030512.1930] jonz: applied changes submitted by Andrew W. Nosenko - -(DELIMITERS): Plain `^M' character is replaced by appropriate - escape sequence `\r' for avoiding gcc-3.2.2 warning "multi-line - string literals are deprecated" - -(MAX_FILENAME_LENGTH, MAX_USERNAME_LENGTH): Use system-defined - limits when available (for example max. filename length under - Linux is not 128 as harcoded, but 4096). - -(USERDIR): Define USERDIR only if not defined somewhere else - (e.g. from command line). Very convenient for building binary - package. - -Version 2.5.3 - May 12, 2003 ----------------------------- - -[20030512.1430] jonz: bugfix for ignored headers - -a bug was fixed that caused all headers to be ignored if a message was stored -as a raw message in the signature database. - -[20030512.1400] jonz: embedded boundary recognition - -added embedded boundary recognition to recognize emails with embedded bounaries, -such as those sent by Eudora when special formatting is enabled. - -[20030512.1200] jonz: documentation - -added better documentation for the correct permissions of the dspam -directories and the correct group memberships for the MTA user. - -[20030512.1200] jonz: locking bugfix - -fixed bug in locking that caused a loop if a lockfile could not be created -(due to file permissions). also increased lock debugging verbosity. - -[20030511.2025] jonz: false positives adjustment - -false positives reported now hit a token 3 times innocent instead of 2, -for faster re-learning. - -[20030511.2010] jonz: header parsing bug - -fixed a header parsing bug that did not carry the original header name -across multiple lines, for example the Received header. - -[20030511.1945] jonz: dspam_purge complete - -dspam_purge completed and expanded to delete old non-qualifying tokens -and defragment/shrink user dictionaries - -[20030511.1945] jonz: rewrite of dspam tools - -dspam tools rewritten to support new spam_record structure. - -[20030511.1945] jonz: implementation of struct spam_record - -new spam_record structure implemented for database storage; include last -hit date for new purge tool. subroutines backward compatible to work -with old databases. - -[20030511.1827] jonz: bugfix for lock sleep - -fixed a bug that caused all dspam processes to sleep for 1 second, even -if a lock was successfully acquired on the first try. - -[20030511.1719] jonz: addition of probability information to spams - -messages marked as spams now to include the tokens and probabilities used in -the message - -[20030511.1600] jonz: body tag filtering - -now ignoring body tags. the only frequently used tags that are being -considered are font, img, and meta - -Version 2.5.2 - May 11, 2003 ----------------------------- - -[20030510.1615] jonz: token word joins with punctuation - -token word joins modified to include dollar signs and exlamation points. for -example: - -$S A V E$ - -previously would result in 3 tokens: $S, AV, E$ but now results in one: $SAVE$ - -[20030510.1500] jonz: bugfix for multipart boundary - -a bug fixing a problem with multipart boundaries not being detected when defined -without using quotes has been corrected. this resulted in the dspam signature -(or identifier) never making it into the message. for example: - -Content-Type: multipart/alternative; - boundary='~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' - -is now detected correctly - -[20030510.0035] jonz: additional filtering - -added additional filtering to ignore words with control characters, -numbers that are not prefixed with $ or end with %, and any tokens that -do not begin with an alphanumeric character, with the exception of $ and #. - -[20030510.0020] jonz: bug fix for lock failures - -a bug has been fixed that caused dspam to loop, sending multiple emails -in the event of a lock failure - -[20030509.2100] jonz: Makefile for FreeBSD - -added makefile for freebsd - -[20030509.2015] jonz: procmail fix - -added small fix to accomodate some procmail implementations -that require an empty argument after -a - -[20030509.0130] jonz: addition of dspam_purge - -please see README for more details - -[20030509.0130] jonz: tools to output to stderr - -dspam tools to output to stderr - -[20030509.0130] jonz: removed probability from db storage - -removed the 13-character probability from the hash databases; was -taking up considerable space and wasn't necessary for the calculation. -is backwards compatible, so there is no need to delete any db's. - -[20030509.0040] jonz: ! is now treated as a delimeter - -the ! character has been added to the delimiter list - -[20030508.2330] jonz: added .lock locking mechanism - -added a .lock locking mechanism to prevent database corruption and/or -quarantine mailbox corruption. - -[20030508.1915] jonz: filtering of boundaries - -multipart boundaries are now filteres - -[20030508.1800] jonz: token word joins - -if a token is only one character long, and is adjacent to other similar -tokens, each token will be joined to create a single token. for example - -V I A G R A - -will be tokenized as "VIAGRA" - -[20030508.1800] jonz: header array abolished - -the array holding each header line has been replaced with a nodetree -(dynamic data storage) - -[20030508.0800] jonz: bugfix for dspam_clean - -dspam_clean segfaults after processing the first user signature file. this -was due to an invalid database handle being closed. the correct handle is -now used - -Version 2.5.1; May 8 2003: --------------------------- - -[20030508.0045] jonz: bugfix for inline comments - -inline comments normally used to break up guilty spam words such as -SEX - -were only partially filtered, leaving gaps between the letters and causing -DSPAM to miss the whole word. this has been corrected to eliminate the space -the comments previously used, bringing the words together for calculation. - -[20030508.0025] jonz: strdup() overusage - -if only one destination user is specified, strdup() is not used to duplicate -the original header/body pairs to pass to process_user() - -[20030507.1130] jonz: bugfix for multiple users - -when multiple users are specified in the local mailer parameters, the first -user process, due to a bug in setting ADD_AS_SPAM, determined whether the -message was spam for all other users. ADD_AS_SPAM is now reset to its original -value prior to each user's calculation. - -[20030507.2200] jonz: increased html filtering - -
libdb4 migration - -libdb 4 has been implemented after running into some problems with db1 -segmentation faults on large record insertions. as a result, to upgrade to -this and all newer versions, it will be necessary to delete all existing user -databases on the system. libdb4 can be found at www.sleepycat.com. it should -be relatively easy to re-code the db functions for db2 or db3, if the -administrator doesn't want to use db4. - -[20030506.0400] jonz: buffer.c memcpy implementation - -modified buffer.c to use memcpy() instead of strcat() resulting in a -_significant_ speed increase. the delay caused by strcat() in messages -with large attachments resulted in message parse times to be +20 seconds. -using memcpy(), parse time is down to less than a fraction of a second. -this fix addresses issues with dspam on low-end machines. - -[20030506.0400] jonz: server-side storage options - -if a token string is longer than the original message, the original message -is stored on the server instead and re-parsed. - -[20030506.0400] jonz: zlib compression library - -zlib (-lz) is now used to compress server-side signatures. zlib can be found -at http://www.gzip.org/zlib/. if you will not be using server-side -signatures, remove the -lz library flag from the makefile. - -[20030504.0400] jonz: server-side signatures - -server-side token signatures (SSTS) have been implemented with an optional -compile flag (set by default). using SSTS will eliminate long, annoying -DSPAM signatures at the expense of server disk space. the signature appended -to each email is replaced with a single comment to include a reference token. -this also enables the complete set of tokens from a message to be recorded -(although only the top 15 are used in actual calculation). - -compiling without SSTS mode enabled will only record 15 or 60 tokens from a -message, depending on whether more than 5 tokens are recognized. SSTS mode -will record all tokens. in either mode, only the most interesting 15 tokens -are used in the calculation. - -[20030504.0400] jonz: chained tokens - -chained tokens have been implemented providing several new analysis features. -for example the text 'FREE FOR ALL' will parse into five tokens: - -FREE -FOR -ALL -FREE FOR -FOR ALL - -this parsing is not specific to just words, but any type of valid token. -please read the white paper at: - -http://www.networkdweebs.com/products/dspam/Chained_Tokens.pdf - -...for more information. - -[20030504.0400] jonz: token precedence - -words not appearing in the opposite corpus were previously assigned a -probability of .99 or .01. now, priority is given to a token that appears -more than ten times in a single corpus. - -[20030504.0400] jonz: token case - -previously, tokens were case insensitive unless they were in all caps. now, -all tokens are case sensitive. - -[20030504.0400] jonz: short html tags - -short HTML tags (less than 15 characters) are filtered out. this helps -prevent false positives that could be caused by a lack of HTML-based email -in an innocent corpus. it is normally not desirable behavior to assign a -higher probability of spam to a message simply because it's in HTML, but we -don't want to filter out all HTML so longer tags will still be tokenized. - -[2003.0503.0400] jonz: special tokens for urls - -URLs are broken down into URL-specific tokens. for example, -http://www.networkdweebs.com/products/dspam/ will be broken down into: - -Url*www -Url*networkdweebs -Url*com -Url*products -Url*dspam - -this should help separate emails with suspicious URLs from emails with the -same tokens outside of a URL. - -[20030503.0400] jonz: misreported number of messages in quarantine - -due to a small bug, the number of messages in a quarantine box can be -misreported. this has been fixed. - -[20030503.0400] jonz: dspam signature change - -the DSPAM signature of previous versions is unfortunately rewritten -incorrectly by some email clients such as Microsoft Outlook. The signature -has been modified, and the signature retrieval tool has been coded with more -of a wildcard approach, to help avoid missing reversal information. -this only applies to administrators running DSPAM outside of its default -SSTS mode. - -[20030503.0400] jonz: closing html tags - -some spams fail to close their /html tag in an attempt to evade some spam -tools. DSPAM now closes the tag to avoid the dpsm signature being ignored. - -[20030503.0400] jonz: ignoring of useless header information - -the 'Message-ID', 'Received' and 'Date' headers are now ignored; they -seemed to be filling up more than half the tokens with useless information - -[20030503.0400] jonz: high asccii characters - -tokens with high ASCII characters are now ignored - -[20030503.0400] jonz: forwarded message headers - -dspam now ignores message headers for messages forwarded by user as spam with -no identifiable signature. this prevents irrelevent information from being -recorded, which could lead to any message in reply to be marked as a false -positive. - -[20030503.0400] jonz: minor code cleanup for linux build - -made some minor changes to code to build without warnings on linux - -[20040503.0400] jonz: reequired use of long --addspam flag - -the shortened flag for --addspam (-a) has been removed for compatibility -with procmail (procmail uses -a). in order to use this latest build, -all spam-box aliases (e.g. spam-bob) must be changed to --addspam. - -[20030503.0400] jonz: flag for chained tokens - -added -DCHAINED_TOKENS (enabled by default) switch; those who don't have -the extra disk space for chained tokens can now turn them off by removing -this compile flag. - -[20030503.0400] jonz: debug rework - --DDEBUG now results in debug going to /tmp/dspam.debug - -Version 2.4.1; April 29 2003 ----------------------------- - -[20030429.0000] jonz: dspam_signature tool addition - -Added dspam_signature tool for decoding dspam signatures via commandline - -Version 2.4; April 27 2003 --------------------------- - -[20030427.0000] jonz: signature change - -changed the signature to a base64-encoded, BEGIN/END delimited signature. -people seem to feel more comfortable with it, as it resembles the signatures -used with PGP, Server Certs, and other encrypted signatures...it's also -less messy. - -[20030427.0000] jonz: false positive recall mechanism - -in the unlikely event of a false positive, a mechanism is now available to -reverse the information from the false positive and email the message to the -user. this is made possible via a button while viewing a message in the -user's quarantine box. - -[20030427.0000] jonz: base64 decoding - -new code to Base64 Decode any encoded text segments. some SPAMs being sent -out today are encoded in an attempt to bypass any filtering. they are -now decoded prior to analysis and delivery. this only applies to text -segments (text/plain, text/html, etc.) and should not affect attachments. - -Version 2.35; April 24 2003 ---------------------------- - -[20030424.0000] jonz: makefile corretion - -Makefile.linux: -ldb -> -ldb1 - -[20030424.0000] jonz: prefixed from line - -prefixed messages headed to quarantine with a 'From' header to make mailbox -format compliant. - -[20030424.0000] jonz: quarantine box showing no spams - -fixed a bug that resulted in caught spams to not show up in quarantine box - -Version 2.3; April 20 2003 --------------------------- - -[20030420.0000] jonz: token insertion bug - -fixed a bug that occurs when inserting token information on some -multipart emails, which inserts it into the text/plain segment instead of -the text/html segment - -Version 2.2; April 17 2003 --------------------------- - -[20030417.0000] jonz: reversal information - -reversal information is now used in spams to reverse the original 15 tokens -(unlearn and relearn as spam). - -Version 2.1; April 14 2003 --------------------------- - -[20030414.0000] jonz: production changes - -applied 0.40 value to words with less than 5 hits -changed spam threshhold from .8 to .9 - -[2003.0414.0000] jonz: attachments - -repaired minor bug in filtering out attachments and html comments - -Version 2.0; April 11 2003 --------------------------- - -Initial release Index: dspam_corpus.1 =================================================================== --- dspam_corpus.1 (.../vendor/dspam/3.0.0) (revision 39233) +++ dspam_corpus.1 (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -1,87 +0,0 @@ -.\" -*- nroff -*- -.\" -.\" dspam_corpus3.0 -.\" -.\" Authors: Jonathan A. Zdziarski -.\" -.\" Copyright (c) 2004 Network Dweebs Corporation -.\" All rights reserved -.\" -.TH dspam_corpus 1 "May 31, 2004" "DSPAM" "DSPAM" - -.SH NAME -dspam_corpus - train a corpus of mail - -.SH SYNOPSIS -.na -.B dspam_corpus -[\c -.I \--addspam\fR\c -] -[\c -.I \--quiet\fR\c -] -[\c -.BI \ username \fR -] -[\c -.BI \ filename \fR -] - -.ad -.SH DESCRIPTION -.LP -.B dspam_corpus -is used to train a corpus of mail (in mailbox format). This tool may be used -to train only nonspam or both nonspam and spam. Spam should never be -trained alone (without nonspam). - -.SH OPTIONS -.LP -.ne 3 -.TP -.BI \--addspam\fR\c -Identifies that the corpus being trained is a corpus of spam. If this flag is -omitted, the corpus will be trained as nonspam. - -.n3 -.TP -.BI \--quiet\fR\c -Quiet mode. Supresses output. - -.n3 3 -.TP -.BI \[username]\c -Specifies the user to train. - -.n3 3 -.TP -.BI \[filename]\c -Specifies the pathname to the mailbox file containing the corpus mail. - -.SH EXIT VALUE -.LP -.ne 3 -.PD 0 -.TP -.B 0 -Operation was successful. -.ne 3 -.TP -.B other -Operation resulted in an error. -.PD - -.SH AUTHORS -.LP - -Jonathan A. Zdziarski - -For more information, see http://www.nuclearelephant.com. - -.SH SEE ALSO -.BR dspam (1), -.BR dspam_stats (1), -.BR dspam_clean (1), -.BR dspam_dump (1), -.BR dspam_merge (1) Index: dspam-uninstalled.pc.in =================================================================== --- dspam-uninstalled.pc.in (.../vendor/dspam/3.0.0) (revision 39233) +++ dspam-uninstalled.pc.in (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -1,8 +0,0 @@ -Name: DSPAM Uninstalled -Description: DSPAM Anti-Spam Library, Not Installed -Version: @VERSION@ -Libs: -L${libdir} -ldspam -Cflags: -I${includedir}/dspam -Libs: ${pc_top_builddir}/${pcfiledir}/libdspam.la -Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@ - Index: Makefile.in =================================================================== --- Makefile.in (.../vendor/dspam/3.0.0) (revision 39233) +++ Makefile.in (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.7.4 from Makefile.am. +# Makefile.in generated by automake 1.7.6 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 @@ -14,10 +14,6 @@ @SET_MAKE@ -# -# Makefile.am -# Written by Andrew W. Nosenko - srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -129,6 +125,10 @@ host_os = @host_os@ host_vendor = @host_vendor@ +# +# Makefile.am +# Written by Andrew W. Nosenko +# includedir = @includedir@/dspam infodir = @infodir@ install_sh = @install_sh@ @@ -153,17 +153,8 @@ # doc -man_MANS = dspam.1 dspam_stats.1 dspam_corpus.1 dspam_clean.1 dspam_dump.1 \ - dspam_merge.1 - - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = dspam.pc - -EXTRA_DIST = autogen.sh RELEASE.NOTES CHANGELOG LICENSE example.c \ - dspam-button.gif dspam.1 dspam_stats.1 dspam_corpus.1 dspam_clean.1 \ - dspam_dump.1 dspam_merge.1 \ - dspam.pc.in dspam-uninstalled.pc.in +EXTRA_DIST = autogen.sh RELEASE.NOTES CHANGE LICENSE example.c \ + dspam-button.gif MAINTAINERCLEANFILES = Makefile.in aclocal.m4 auto-config.h.in \ @@ -172,12 +163,7 @@ lib_LTLIBRARIES = libdspam.la -bin_PROGRAMS = dspam - -# installed for libdspam -include_HEADERS = buffer.h decode.h error.h lht.h libdspam.h \ - libdspam_objects.h nodetree.h storage_driver.h - +bin_PROGRAMS = dspam dscore # libdspam.a contans objects common for dspam and tools/* binaries libdspam_la_SOURCES = \ @@ -191,7 +177,10 @@ nodetree.c nodetree.h \ error.c error.h \ decode.c decode.h \ - storage_driver.h + storage_driver.h \ + journal.c journal.h \ + cuda.c cuda.h \ + crc32.c crc32.h libdspam_la_LIBADD = $(storage_drv_objects) -lm libdspam_la_DEPENDENCIES = $(storage_drv_objects) @@ -219,20 +208,36 @@ dspam_LDADD = libdspam.la dspam_LDFLAGS = -static +dscore_SOURCES = \ + config.h libdspam.h language.h \ + dscore.c \ + readfile.c readfile.h \ + buffer.h \ + storage_driver.h \ + md5.c md5.h + + +dscore_LDADD = libdspam.la +dscore_LDFLAGS = -static -ldl + ACLOCAL_AMFLAGS = -I m4 subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = auto-config.h -CONFIG_CLEAN_FILES = dspam.pc dspam-uninstalled.pc +CONFIG_CLEAN_FILES = LTLIBRARIES = $(lib_LTLIBRARIES) am_libdspam_la_OBJECTS = libdspam.lo tbt.lo lht.lo base64.lo buffer.lo \ - util.lo nodetree.lo error.lo decode.lo + util.lo nodetree.lo error.lo decode.lo journal.lo cuda.lo \ + crc32.lo libdspam_la_OBJECTS = $(am_libdspam_la_OBJECTS) -bin_PROGRAMS = dspam$(EXEEXT) +bin_PROGRAMS = dspam$(EXEEXT) dscore$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) +am_dscore_OBJECTS = dscore.$(OBJEXT) readfile.$(OBJEXT) md5.$(OBJEXT) +dscore_OBJECTS = $(am_dscore_OBJECTS) +dscore_DEPENDENCIES = libdspam.la am_dspam_OBJECTS = dspam.$(OBJEXT) md5.$(OBJEXT) dspam_OBJECTS = $(am_dspam_OBJECTS) dspam_DEPENDENCIES = libdspam.la @@ -241,14 +246,16 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/base64.Plo ./$(DEPDIR)/buffer.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/decode.Plo ./$(DEPDIR)/dspam.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/error.Plo ./$(DEPDIR)/lht.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/crc32.Plo ./$(DEPDIR)/cuda.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/decode.Plo ./$(DEPDIR)/dscore.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/dspam.Po ./$(DEPDIR)/error.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/journal.Plo ./$(DEPDIR)/lht.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libdb3_drv.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libdb4_drv.Plo ./$(DEPDIR)/libdspam.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/md5.Po ./$(DEPDIR)/mysql_drv.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/nodetree.Plo ./$(DEPDIR)/ora_drv.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/pgsql_drv.Plo ./$(DEPDIR)/tbt.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/util.Plo +@AMDEP_TRUE@ ./$(DEPDIR)/pgsql_drv.Plo ./$(DEPDIR)/readfile.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/tbt.Plo ./$(DEPDIR)/util.Plo COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ @@ -257,25 +264,17 @@ LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(libdspam_la_SOURCES) $(EXTRA_libdspam_la_SOURCES) \ - $(dspam_SOURCES) - -NROFF = nroff -MANS = $(man_MANS) -DATA = $(pkgconfig_DATA) - -HEADERS = $(include_HEADERS) - + $(dscore_SOURCES) $(dspam_SOURCES) RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ ps-recursive install-info-recursive uninstall-info-recursive \ all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive \ check-recursive installcheck-recursive -DIST_COMMON = README $(include_HEADERS) Makefile.am Makefile.in \ - aclocal.m4 auto-config.h.in config.guess config.sub configure \ - configure.ac depcomp dspam-uninstalled.pc.in dspam.pc.in \ - install-sh ltmain.sh missing mkinstalldirs -SOURCES = $(libdspam_la_SOURCES) $(EXTRA_libdspam_la_SOURCES) $(dspam_SOURCES) +DIST_COMMON = README Makefile.am Makefile.in aclocal.m4 \ + auto-config.h.in config.guess config.sub configure configure.ac \ + depcomp install-sh ltmain.sh missing mkinstalldirs +SOURCES = $(libdspam_la_SOURCES) $(EXTRA_libdspam_la_SOURCES) $(dscore_SOURCES) $(dspam_SOURCES) all: auto-config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -315,10 +314,6 @@ distclean-hdr: -rm -f auto-config.h stamp-h1 -dspam.pc: $(top_builddir)/config.status dspam.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -dspam-uninstalled.pc: $(top_builddir)/config.status dspam-uninstalled.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $@ libLTLIBRARIES_INSTALL = $(INSTALL) install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @@ -378,6 +373,9 @@ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done +dscore$(EXEEXT): $(dscore_OBJECTS) $(dscore_DEPENDENCIES) + @rm -f dscore$(EXEEXT) + $(LINK) $(dscore_LDFLAGS) $(dscore_OBJECTS) $(dscore_LDADD) $(LIBS) dspam$(EXEEXT): $(dspam_OBJECTS) $(dspam_DEPENDENCIES) @rm -f dspam$(EXEEXT) $(LINK) $(dspam_LDFLAGS) $(dspam_OBJECTS) $(dspam_LDADD) $(LIBS) @@ -390,9 +388,13 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cuda.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decode.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dscore.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dspam.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/journal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lht.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdb3_drv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdb4_drv.Plo@am__quote@ @@ -402,6 +404,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nodetree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ora_drv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgsql_drv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readfile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tbt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@ @@ -451,89 +454,6 @@ -rm -f libtool uninstall-info-am: -man1dir = $(mandir)/man1 -install-man1: $(man1_MANS) $(man_MANS) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(man1dir) - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ - $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ - done -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ - rm -f $(DESTDIR)$(man1dir)/$$inst; \ - done -pkgconfigDATA_INSTALL = $(INSTALL_DATA) -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir) - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ - echo " $(pkgconfigDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgconfigdir)/$$f"; \ - $(pkgconfigDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgconfigdir)/$$f; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ - echo " rm -f $(DESTDIR)$(pkgconfigdir)/$$f"; \ - rm -f $(DESTDIR)$(pkgconfigdir)/$$f; \ - done -includeHEADERS_INSTALL = $(INSTALL_HEADER) -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(includedir) - @list='$(include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ - echo " $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f"; \ - $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; for p in $$list; do \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ - echo " rm -f $(DESTDIR)$(includedir)/$$f"; \ - rm -f $(DESTDIR)$(includedir)/$$f; \ - done - # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, @@ -674,7 +594,6 @@ distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) - $(mkinstalldirs) $(distdir)/. @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ @@ -785,13 +704,12 @@ exit 1; } >&2 check-am: all-am check: check-recursive -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(DATA) $(HEADERS) \ - auto-config.h +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) auto-config.h install-binPROGRAMS: install-libLTLIBRARIES installdirs: installdirs-recursive installdirs-am: - $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) $(DESTDIR)$(pkgconfigdir) $(DESTDIR)$(includedir) + $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) install: install-recursive install-exec: install-exec-recursive @@ -837,8 +755,7 @@ info-am: -install-data-am: install-includeHEADERS install-man \ - install-pkgconfigDATA +install-data-am: install-exec-am: install-binPROGRAMS install-libLTLIBRARIES @$(NORMAL_INSTALL) @@ -846,13 +763,13 @@ install-info: install-info-recursive -install-man: install-man1 +install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf autom4te.cache + -rm -rf $(top_srcdir)/autom4te.cache maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive @@ -868,14 +785,11 @@ ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \ - uninstall-info-am uninstall-libLTLIBRARIES uninstall-man \ - uninstall-pkgconfigDATA +uninstall-am: uninstall-binPROGRAMS uninstall-info-am \ + uninstall-libLTLIBRARIES uninstall-info: uninstall-info-recursive -uninstall-man: uninstall-man1 - .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool clean-recursive ctags ctags-recursive dist \ @@ -886,9 +800,8 @@ dvi-recursive info info-am info-recursive install install-am \ install-binPROGRAMS install-data install-data-am \ install-data-recursive install-exec install-exec-am \ - install-exec-recursive install-includeHEADERS install-info \ - install-info-am install-info-recursive install-libLTLIBRARIES \ - install-man install-man1 install-pkgconfigDATA \ + install-exec-recursive install-info install-info-am \ + install-info-recursive install-libLTLIBRARIES install-man \ install-recursive install-strip installcheck installcheck-am \ installdirs installdirs-am installdirs-recursive \ maintainer-clean maintainer-clean-generic \ @@ -896,9 +809,8 @@ mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ pdf pdf-am pdf-recursive ps ps-am ps-recursive tags \ tags-recursive uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-includeHEADERS uninstall-info-am \ - uninstall-info-recursive uninstall-libLTLIBRARIES uninstall-man \ - uninstall-man1 uninstall-pkgconfigDATA uninstall-recursive + uninstall-info-am uninstall-info-recursive \ + uninstall-libLTLIBRARIES uninstall-recursive # Failing of chgrp is expected and normal case when someone do Index: config.h =================================================================== --- config.h (.../vendor/dspam/3.0.0) (revision 39233) +++ config.h (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -94,7 +94,7 @@ #ifndef DSPAM_HOME # warning DSPAM_HOME is not defined by configure/Makefile. # warning Fallback to hardcoded defaults. -# define DSPAM_HOME "/var/dspam" +# define DSPAM_HOME "/etc/mail/dspam" #endif #ifndef MAX Index: ltmain.sh =================================================================== --- ltmain.sh (.../vendor/dspam/3.0.0) (revision 39233) +++ ltmain.sh (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -1,7 +1,7 @@ # ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # @@ -24,32 +24,6 @@ # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. -basename="s,^.*/,,g" - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# RH: define SED for historic ltconfig's generated by Libtool 1.3 -[ -z "$SED" ] && SED=sed - -# The name of this program: -progname=`echo "$progpath" | $SED $basename` -modename="$progname" - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION=1.5.6 -TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42)" - - # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. @@ -62,7 +36,7 @@ : else # Restart under the correct shell, and then maybe $echo will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} + exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then @@ -71,9 +45,22 @@ cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE + exit 1 fi # Global variables. @@ -135,13 +121,10 @@ # Shell function definitions: # This seems to be the best place for them -# func_win32_libid arg -# return the library type of file 'arg' -# # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. -func_win32_libid () { +win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in @@ -150,7 +133,7 @@ ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ - $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + grep -E 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` if test "X$win32_nmres" = "Ximport" ; then @@ -174,76 +157,9 @@ $echo $win32_libid_type } - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () { - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - case "$@ " in - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - $echo "$modename: unable to infer tagged configuration" - $echo "$modename: specify a tag with \`--tag'" 1>&2 - exit $EXIT_FAILURE -# else -# $echo "$modename: using $tagname tagged configuration" - fi - ;; - esac - fi -} # End of Shell function definitions ##################################### -# Darwin sucks -eval std_shrext=\"$shrext_cmds\" - # Parse our command line options once, thoroughly. while test "$#" -gt 0 do @@ -263,13 +179,12 @@ ;; tag) tagname="$arg" - preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 - exit $EXIT_FAILURE + exit 1 ;; esac @@ -279,10 +194,10 @@ # not specially marked. ;; *) - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi @@ -311,22 +226,21 @@ $echo "Copyright (C) 2003 Free Software Foundation, Inc." $echo "This is free software; see the source for copying conditions. There is NO" $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - exit $EXIT_SUCCESS + exit 0 ;; --config) - ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath + ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 # Now print the configurations for the tags. for tagname in $taglist; do - ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" + ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0" done - exit $EXIT_SUCCESS + exit 0 ;; --debug) $echo "$progname: enabling shell trace mode" set -x - preserve_args="$preserve_args $arg" ;; --dry-run | -n) @@ -345,7 +259,7 @@ else $echo "disable static libraries" fi - exit $EXIT_SUCCESS + exit 0 ;; --finish) mode="finish" ;; @@ -357,7 +271,6 @@ --quiet | --silent) show=: - preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag ;; @@ -365,7 +278,6 @@ set tag "$optarg" ${1+"$@"} shift prev=tag - preserve_args="$preserve_args --tag" ;; -dlopen) @@ -376,7 +288,7 @@ -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 - exit $EXIT_FAILURE + exit 1 ;; *) @@ -389,7 +301,7 @@ if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 - exit $EXIT_FAILURE + exit 1 fi # If this variable is set in any of the actions, the command in it @@ -445,7 +357,7 @@ if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 - exit $EXIT_FAILURE + exit 1 fi # Change the help message to a mode-specific one. @@ -460,11 +372,9 @@ # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" - suppress_opt=yes suppress_output= arg_mode=normal libobj= - later= for arg do @@ -487,19 +397,24 @@ -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 - exit $EXIT_FAILURE + exit 1 fi arg_mode=target continue ;; - -static | -prefer-pic | -prefer-non-pic) - later="$later $arg" + -static) + build_old_libs=yes continue ;; - -no-suppress) - suppress_opt=no + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no continue ;; @@ -562,11 +477,11 @@ case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" - exit $EXIT_FAILURE + exit 1 ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 - exit $EXIT_FAILURE + exit 1 ;; *) # Get the name of the library object. @@ -599,30 +514,50 @@ *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 - exit $EXIT_FAILURE + exit 1 ;; esac - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -static) - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue + # Infer tagged configuration to use if any are available and + # if one wasn't chosen via the "--tag" command line option. + # Only attempt this if the compiler in the base compile + # command doesn't match the default compiler. + if test -n "$available_tags" && test -z "$tagname"; then + case $base_compile in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" + case "$base_compile " in + "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break ;; esac + fi done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + $echo "$modename: unable to infer tagged configuration" + $echo "$modename: specify a tag with \`--tag'" 1>&2 + exit 1 +# else +# $echo "$modename: using $tagname tagged configuration" + fi + ;; + esac + fi objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` @@ -636,7 +571,7 @@ if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 - exit $EXIT_FAILURE + exit 1 fi # Delete any leftover library objects. @@ -647,7 +582,7 @@ fi $run $rm $removelist - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + trap "$run $rm $removelist; exit 1" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in @@ -666,7 +601,7 @@ output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + trap "$run $rm $removelist; exit 1" 1 2 15 else output_obj= need_locks=no @@ -676,7 +611,7 @@ # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then - until $run ln "$progpath" "$lockfile" 2>/dev/null; do + until $run ln "$0" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done @@ -694,7 +629,7 @@ compiler." $run $rm $removelist - exit $EXIT_FAILURE + exit 1 fi $echo $srcfile > "$lockfile" fi @@ -749,7 +684,7 @@ if $run eval "$command"; then : else test -n "$output_obj" && $run $rm $removelist - exit $EXIT_FAILURE + exit 1 fi if test "$need_locks" = warn && @@ -769,7 +704,7 @@ compiler." $run $rm $removelist - exit $EXIT_FAILURE + exit 1 fi # Just move the object if needed, then go on to compile the next one @@ -790,9 +725,7 @@ EOF # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' - fi else # No PIC object so indicate it doesn't exist in the libtool # object file. @@ -821,7 +754,7 @@ if $run eval "$command"; then : else $run $rm $removelist - exit $EXIT_FAILURE + exit 1 fi if test "$need_locks" = warn && @@ -841,7 +774,7 @@ compiler." $run $rm $removelist - exit $EXIT_FAILURE + exit 1 fi # Just move the object if needed @@ -879,7 +812,7 @@ $run $rm "$lockfile" fi - exit $EXIT_SUCCESS + exit 0 ;; # libtool link mode @@ -905,7 +838,7 @@ ;; esac libtool_args="$nonopt" - base_compile="$nonopt $@" + base_compile="$nonopt" compile_command="$nonopt" finalize_command="$nonopt" @@ -937,7 +870,6 @@ no_install=no objs= non_pic_objects= - precious_files_regex= prefer_static_libs=no preload=no prev= @@ -951,8 +883,6 @@ vinfo= vinfo_number=no - func_infer_tag $base_compile - # We need to know -static, to get the right output filenames. for arg do @@ -984,6 +914,7 @@ # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" + base_compile="$base_compile $arg" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") @@ -1047,7 +978,7 @@ export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" - exit $EXIT_FAILURE + exit 1 fi prev= continue @@ -1062,11 +993,6 @@ prev= continue ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; release) release="-$arg" prev= @@ -1099,7 +1025,7 @@ test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE + exit 1 fi # Extract subdirectory from the argument. @@ -1152,7 +1078,7 @@ # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE + exit 1 else # Dry-run case. @@ -1173,7 +1099,7 @@ done else $echo "$modename: link input file \`$save_arg' does not exist" - exit $EXIT_FAILURE + exit 1 fi arg=$save_arg prev= @@ -1185,7 +1111,7 @@ [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE + exit 1 ;; esac if test "$prev" = rpath; then @@ -1225,11 +1151,6 @@ finalize_command="$finalize_command $qarg" continue ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; *) eval "$prev=\"\$arg\"" prev= @@ -1278,7 +1199,7 @@ -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" - exit $EXIT_FAILURE + exit 1 fi if test "X$arg" = "X-export-symbols"; then prev=expsyms @@ -1314,7 +1235,7 @@ absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - exit $EXIT_FAILURE + exit 1 fi dir="$absdir" ;; @@ -1369,11 +1290,6 @@ continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) - deplibs="$deplibs $arg" - continue - ;; - -module) module=yes continue @@ -1438,11 +1354,6 @@ -o) prev=output ;; - -precious-files-regex) - prev=precious_regex - continue - ;; - -release) prev=release continue @@ -1465,7 +1376,7 @@ [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE + exit 1 ;; esac case "$xrpath " in @@ -1588,7 +1499,7 @@ test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE + exit 1 fi # Extract subdirectory from the argument. @@ -1641,7 +1552,7 @@ # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE + exit 1 else # Dry-run case. @@ -1708,7 +1619,48 @@ if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 - exit $EXIT_FAILURE + exit 1 + fi + + # Infer tagged configuration to use if any are available and + # if one wasn't chosen via the "--tag" command line option. + # Only attempt this if the compiler in the base link + # command doesn't match the default compiler. + if test -n "$available_tags" && test -z "$tagname"; then + case $base_compile in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" + case $base_compile in + "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) + # The compiler in $compile_command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + $echo "$modename: unable to infer tagged configuration" + $echo "$modename: specify a tag with \`--tag'" 1>&2 + exit 1 +# else +# $echo "$modename: using $tagname tagged configuration" + fi + ;; + esac fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then @@ -1752,7 +1704,7 @@ "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 - exit $EXIT_FAILURE + exit 1 ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; @@ -1762,7 +1714,7 @@ case $host in *cygwin* | *mingw* | *pw32*) - # don't eliminate duplications in $postdeps and $predeps + # don't eliminate duplcations in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) @@ -1815,7 +1767,7 @@ *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 - exit $EXIT_FAILURE + exit 1 ;; esac done @@ -1853,15 +1805,6 @@ lib= found=no case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - fi - continue - ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 @@ -1873,19 +1816,13 @@ fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do - for search_ext in .la $std_shrext .so .a; do # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" + lib="$searchdir/lib${name}.la" if test -f "$lib"; then - if test "$search_ext" = ".la"; then found=yes - else - found=no - fi - break 2 + break fi done - done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then @@ -1949,11 +1886,11 @@ fi if test "$pass" = scan; then deplibs="$deplib $deplibs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 @@ -2032,14 +1969,14 @@ if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib'" 1>&2 - exit $EXIT_FAILURE + exit 1 fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE + exit 1 fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` @@ -2075,7 +2012,7 @@ if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE + exit 1 fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" @@ -2092,7 +2029,7 @@ done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 - exit $EXIT_FAILURE + exit 1 fi continue fi # $pass = conv @@ -2105,18 +2042,16 @@ done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE + exit 1 fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE + exit 1 fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then + if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't @@ -2165,7 +2100,7 @@ if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE + exit 1 fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). @@ -2280,8 +2215,7 @@ fi # This is a shared library - # Warn about portability, can't link against -module's on - # some systems (darwin) + # Warn about portability, can't link against -module's on some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then @@ -2348,10 +2282,9 @@ else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' - cmds=$extract_expsyms_cmds + eval cmds=\"$extract_expsyms_cmds\" for cmd in $cmds; do IFS="$save_ifs" - eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done @@ -2362,10 +2295,9 @@ if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' - cmds=$old_archive_from_expsyms_cmds + eval cmds=\"$old_archive_from_expsyms_cmds\" for cmd in $cmds; do IFS="$save_ifs" - eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done @@ -2388,9 +2320,9 @@ case $host in *-*-sco3.2v5* ) add_dir="-L$dir" ;; *-*-darwin* ) - # if the lib is a module then we can not link against - # it, someone is ignoring the new warnings I added - if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then + # if the lib is a module then we can not link against it, someone + # is ignoring the new warnings I added + if /usr/bin/file -L $add 2> /dev/null | grep "bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo @@ -2440,7 +2372,7 @@ if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" - exit $EXIT_FAILURE + exit 1 fi if test -n "$add_shlibpath"; then @@ -2483,8 +2415,7 @@ esac add="-l$name" elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then + if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" @@ -2564,8 +2495,7 @@ if test "$linkmode" = lib; then if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || + { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= @@ -2622,7 +2552,7 @@ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE + exit 1 fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 @@ -2632,8 +2562,7 @@ depdepl= case $host in *-*-darwin*) - # we do not want to link against static libs, - # but need to link against shared + # we do not want to link against static libs, but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do @@ -2642,18 +2571,15 @@ if test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" fi - # do not add paths which are already there - case " $newlib_search_path " in - *" $path "*) ;; - *) newlib_search_path="$newlib_search_path $path";; - esac - fi + newlib_search_path="$newlib_search_path $path" path="" + fi ;; *) path="-L$path" ;; esac + ;; -l*) case $host in @@ -2675,7 +2601,7 @@ esac case " $deplibs " in *" $depdepl "*) ;; - *) deplibs="$depdepl $deplibs" ;; + *) deplibs="$deplibs $depdepl" ;; esac case " $deplibs " in *" $path "*) ;; @@ -2766,8 +2692,7 @@ eval $var=\"$tmp_libs\" done # for var fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) + # Last step: remove runtime libs from dependency_libs (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in @@ -2827,19 +2752,19 @@ case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - eval shared_ext=\"$shrext_cmds\" + eval shared_ext=\"$shrext\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 - exit $EXIT_FAILURE + exit 1 fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - eval shared_ext=\"$shrext_cmds\" + eval shared_ext=\"$shrext\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` @@ -2850,7 +2775,7 @@ if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 - exit $EXIT_FAILURE + exit 1 else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" @@ -2898,7 +2823,7 @@ if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 - exit $EXIT_FAILURE + exit 1 fi # convert absolute version numbers to libtool ages @@ -2948,7 +2873,7 @@ *) $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE + exit 1 ;; esac @@ -2957,7 +2882,7 @@ *) $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE + exit 1 ;; esac @@ -2966,14 +2891,14 @@ *) $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE + exit 1 ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE + exit 1 fi # Calculate the version variables. @@ -3062,7 +2987,7 @@ *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE + exit 1 ;; esac @@ -3116,12 +3041,6 @@ *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi removelist="$removelist $p" ;; *) ;; @@ -3601,7 +3520,7 @@ fi # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" + eval shared_ext=\"$shrext\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" @@ -3631,11 +3550,10 @@ $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols - cmds=$export_symbols_cmds + eval cmds=\"$export_symbols_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" - eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" @@ -3752,23 +3670,19 @@ # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds + eval cmds=\"$module_expsym_cmds\" else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds + eval cmds=\"$module_cmds\" fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds + eval cmds=\"$archive_expsym_cmds\" else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds + eval cmds=\"$archive_cmds\" fi fi - if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` && + if test "X$skipped_export" != "X:" && len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else @@ -3869,28 +3783,19 @@ # value of $libobjs for piecewise linking. # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds + eval cmds=\"$archive_expsym_cmds\" else - cmds=$archive_cmds - fi + eval cmds=\"$archive_cmds\" fi # Append the command to remove the reloadable object files # to the just-reset $cmds. - eval cmds=\"\$cmds~\$rm $delfiles\" + eval cmds=\"\$cmds~$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" - eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done @@ -3899,7 +3804,7 @@ # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? - exit $EXIT_SUCCESS + exit 0 fi # Create links to the real library. @@ -3947,7 +3852,7 @@ *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit $EXIT_FAILURE + exit 1 fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` @@ -4041,11 +3946,10 @@ reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" - cmds=$reload_cmds + eval cmds=\"$reload_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" - eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done @@ -4058,7 +3962,7 @@ $run ${rm}r $gentop fi - exit $EXIT_SUCCESS + exit 0 fi if test "$build_libtool_libs" != yes; then @@ -4071,18 +3975,17 @@ # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS + exit 0 fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" - cmds=$reload_cmds + eval cmds=\"$reload_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" - eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done @@ -4094,7 +3997,7 @@ $run ${rm}r $gentop fi - exit $EXIT_SUCCESS + exit 0 ;; prog) @@ -4412,7 +4315,7 @@ ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit $EXIT_FAILURE + exit 1 ;; esac else @@ -4500,7 +4403,7 @@ # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? - exit $EXIT_SUCCESS + exit 0 fi if test "$hardcode_action" = relink; then @@ -4555,10 +4458,10 @@ fi # Quote $echo for shipping. - if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; + if test "X$echo" = "X$SHELL $0 --fallback-echo"; then + case $0 in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; + *) qecho="$SHELL `pwd`/$0 --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else @@ -4584,7 +4487,7 @@ cwrappersource=`$echo ${objdir}/lt-${output}.c` cwrapper=`$echo ${output}.exe` $rm $cwrappersource $cwrapper - trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15 cat > $cwrappersource < $output "\ #! $SHELL @@ -4893,7 +4796,7 @@ else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" - exit $EXIT_FAILURE + exit 1 fi fi @@ -4955,20 +4858,20 @@ esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" - exit $EXIT_FAILURE + exit 1 fi else # The program doesn't exist. \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 - exit $EXIT_FAILURE + exit 1 fi fi\ " chmod +x $output fi - exit $EXIT_SUCCESS + exit 0 ;; esac @@ -5054,13 +4957,13 @@ # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds + eval cmds=\"$old_archive_from_new_cmds\" else eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds + : else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." @@ -5112,13 +5015,12 @@ if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + eval cmds=\"\$concat_cmds~$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do - eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? @@ -5150,12 +5052,8 @@ fi done # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - # Only create the output if not a dry run. if test -z "$run"; then @@ -5174,7 +5072,7 @@ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE + exit 1 fi newdependency_libs="$newdependency_libs $libdir/$name" ;; @@ -5188,7 +5086,7 @@ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE + exit 1 fi newdlfiles="$newdlfiles $libdir/$name" done @@ -5199,30 +5097,11 @@ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE + exit 1 fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin @@ -5279,7 +5158,7 @@ $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac - exit $EXIT_SUCCESS + exit 0 ;; # libtool install mode @@ -5368,13 +5247,13 @@ if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 - exit $EXIT_FAILURE + exit 1 fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 - exit $EXIT_FAILURE + exit 1 fi if test -z "$files"; then @@ -5384,7 +5263,7 @@ $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 - exit $EXIT_FAILURE + exit 1 fi # Strip any trailing slash from the destination. @@ -5405,7 +5284,7 @@ if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 - exit $EXIT_FAILURE + exit 1 fi fi case $destdir in @@ -5417,7 +5296,7 @@ *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 - exit $EXIT_FAILURE + exit 1 ;; esac done @@ -5446,7 +5325,7 @@ else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 - exit $EXIT_FAILURE + exit 1 fi library_names= @@ -5488,7 +5367,7 @@ # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 - exit $EXIT_FAILURE + exit 1 fi if test -n "$inst_prefix_dir"; then @@ -5503,7 +5382,7 @@ if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - exit $EXIT_FAILURE + exit 1 fi fi @@ -5538,11 +5417,10 @@ # Do each command in the postinstall commands. lib="$destdir/$realname" - cmds=$postinstall_cmds + eval cmds=\"$postinstall_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" - eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done @@ -5582,7 +5460,7 @@ *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 - exit $EXIT_FAILURE + exit 1 ;; esac @@ -5600,7 +5478,7 @@ $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi - exit $EXIT_SUCCESS + exit 0 ;; *) @@ -5654,7 +5532,7 @@ # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 - exit $EXIT_FAILURE + exit 1 fi finalize=yes @@ -5694,13 +5572,15 @@ if test "$finalize" = yes && test -z "$run"; then tmpdir="/tmp" test -n "$TMPDIR" && tmpdir="$TMPDIR" + tmpdir_mktemp=`mktemp -d $tmpdir/libtool-XXXXXX 2> /dev/null` + if test "$?" = 0 ; then + tmpdir="$tmpdir_mktemp" + unset tmpdir_mktemp + else tmpdir="$tmpdir/libtool-$$" - save_umask=`umask` - umask 0077 - if $mkdir "$tmpdir"; then - umask $save_umask + fi + if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : else - umask $save_umask $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 continue fi @@ -5759,17 +5639,16 @@ $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? - if test -n "$stripme" && test -n "$old_striplib"; then + if test -n "$stripme" && test -n "$striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. - cmds=$old_postinstall_cmds + eval cmds=\"$old_postinstall_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" - eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done @@ -5783,9 +5662,9 @@ if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + exec_cmd='$SHELL $0 --finish$current_libdirs' else - exit $EXIT_SUCCESS + exit 0 fi ;; @@ -5804,11 +5683,10 @@ for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. - cmds=$finish_cmds + eval cmds=\"$finish_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" - eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" @@ -5825,7 +5703,7 @@ fi # Exit here if they wanted silent mode. - test "$show" = : && exit $EXIT_SUCCESS + test "$show" = : && exit 0 $echo "----------------------------------------------------------------------" $echo "Libraries have been installed in:" @@ -5861,7 +5739,7 @@ $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "----------------------------------------------------------------------" - exit $EXIT_SUCCESS + exit 0 ;; # libtool execute mode @@ -5873,7 +5751,7 @@ if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" - exit $EXIT_FAILURE + exit 1 fi # Handle -dlopen flags immediately. @@ -5881,7 +5759,7 @@ if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 - exit $EXIT_FAILURE + exit 1 fi dir= @@ -5892,7 +5770,7 @@ else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 - exit $EXIT_FAILURE + exit 1 fi # Read the libtool library. @@ -5919,7 +5797,7 @@ dir="$dir/$objdir" else $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE + exit 1 fi ;; @@ -5999,7 +5877,7 @@ $echo "export $shlibpath_var" fi $echo "$cmd$args" - exit $EXIT_SUCCESS + exit 0 fi ;; @@ -6027,7 +5905,7 @@ if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 - exit $EXIT_FAILURE + exit 1 fi rmdirs= @@ -6082,11 +5960,10 @@ if test "$mode" = uninstall; then if test -n "$library_names"; then # Do each command in the postuninstall commands. - cmds=$postuninstall_cmds + eval cmds=\"$postuninstall_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" - eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then @@ -6098,11 +5975,10 @@ if test -n "$old_library"; then # Do each command in the old_postuninstall commands. - cmds=$old_postuninstall_cmds + eval cmds=\"$old_postuninstall_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" - eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then @@ -6186,20 +6062,20 @@ "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE + exit 1 ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE + exit 1 fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd - exit $EXIT_FAILURE + exit 1 fi # We need to display help for each of the modes. @@ -6235,7 +6111,7 @@ a more detailed description of MODE. Report bugs to ." - exit $EXIT_SUCCESS + exit 0 ;; clean) @@ -6347,8 +6223,6 @@ -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries @@ -6390,14 +6264,14 @@ *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 - exit $EXIT_FAILURE + exit 1 ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." -exit $EXIT_SUCCESS +exit 0 # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting Index: crc32.c =================================================================== --- crc32.c (.../vendor/dspam/3.0.0) (revision 0) +++ crc32.c (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -0,0 +1,94 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + * + * Tom St Denis, tomstdenis@iahu.ca, http://libtomcrypt.org + */ +/* Provides keyring functionality for libtomcrypt, Tom St Denis */ + +static const unsigned char key_magic[4] = { 0x12, 0x34, 0x56, 0x78 }; +static const unsigned char file_magic[4] = { 0x9A, 0xBC, 0xDE, 0xF0 }; +static const unsigned char sign_magic[4] = { 0x87, 0x56, 0x43, 0x21 }; +static const unsigned char enc_magic[4] = { 0x0F, 0xED, 0xCB, 0xA9 }; + +static const unsigned long crc_table[256] = { + 0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL, + 0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL, + 0xe0d5e91eUL, 0x97d2d988UL, 0x09b64c2bUL, 0x7eb17cbdUL, 0xe7b82d07UL, + 0x90bf1d91UL, 0x1db71064UL, 0x6ab020f2UL, 0xf3b97148UL, 0x84be41deUL, + 0x1adad47dUL, 0x6ddde4ebUL, 0xf4d4b551UL, 0x83d385c7UL, 0x136c9856UL, + 0x646ba8c0UL, 0xfd62f97aUL, 0x8a65c9ecUL, 0x14015c4fUL, 0x63066cd9UL, + 0xfa0f3d63UL, 0x8d080df5UL, 0x3b6e20c8UL, 0x4c69105eUL, 0xd56041e4UL, + 0xa2677172UL, 0x3c03e4d1UL, 0x4b04d447UL, 0xd20d85fdUL, 0xa50ab56bUL, + 0x35b5a8faUL, 0x42b2986cUL, 0xdbbbc9d6UL, 0xacbcf940UL, 0x32d86ce3UL, + 0x45df5c75UL, 0xdcd60dcfUL, 0xabd13d59UL, 0x26d930acUL, 0x51de003aUL, + 0xc8d75180UL, 0xbfd06116UL, 0x21b4f4b5UL, 0x56b3c423UL, 0xcfba9599UL, + 0xb8bda50fUL, 0x2802b89eUL, 0x5f058808UL, 0xc60cd9b2UL, 0xb10be924UL, + 0x2f6f7c87UL, 0x58684c11UL, 0xc1611dabUL, 0xb6662d3dUL, 0x76dc4190UL, + 0x01db7106UL, 0x98d220bcUL, 0xefd5102aUL, 0x71b18589UL, 0x06b6b51fUL, + 0x9fbfe4a5UL, 0xe8b8d433UL, 0x7807c9a2UL, 0x0f00f934UL, 0x9609a88eUL, + 0xe10e9818UL, 0x7f6a0dbbUL, 0x086d3d2dUL, 0x91646c97UL, 0xe6635c01UL, + 0x6b6b51f4UL, 0x1c6c6162UL, 0x856530d8UL, 0xf262004eUL, 0x6c0695edUL, + 0x1b01a57bUL, 0x8208f4c1UL, 0xf50fc457UL, 0x65b0d9c6UL, 0x12b7e950UL, + 0x8bbeb8eaUL, 0xfcb9887cUL, 0x62dd1ddfUL, 0x15da2d49UL, 0x8cd37cf3UL, + 0xfbd44c65UL, 0x4db26158UL, 0x3ab551ceUL, 0xa3bc0074UL, 0xd4bb30e2UL, + 0x4adfa541UL, 0x3dd895d7UL, 0xa4d1c46dUL, 0xd3d6f4fbUL, 0x4369e96aUL, + 0x346ed9fcUL, 0xad678846UL, 0xda60b8d0UL, 0x44042d73UL, 0x33031de5UL, + 0xaa0a4c5fUL, 0xdd0d7cc9UL, 0x5005713cUL, 0x270241aaUL, 0xbe0b1010UL, + 0xc90c2086UL, 0x5768b525UL, 0x206f85b3UL, 0xb966d409UL, 0xce61e49fUL, + 0x5edef90eUL, 0x29d9c998UL, 0xb0d09822UL, 0xc7d7a8b4UL, 0x59b33d17UL, + 0x2eb40d81UL, 0xb7bd5c3bUL, 0xc0ba6cadUL, 0xedb88320UL, 0x9abfb3b6UL, + 0x03b6e20cUL, 0x74b1d29aUL, 0xead54739UL, 0x9dd277afUL, 0x04db2615UL, + 0x73dc1683UL, 0xe3630b12UL, 0x94643b84UL, 0x0d6d6a3eUL, 0x7a6a5aa8UL, + 0xe40ecf0bUL, 0x9309ff9dUL, 0x0a00ae27UL, 0x7d079eb1UL, 0xf00f9344UL, + 0x8708a3d2UL, 0x1e01f268UL, 0x6906c2feUL, 0xf762575dUL, 0x806567cbUL, + 0x196c3671UL, 0x6e6b06e7UL, 0xfed41b76UL, 0x89d32be0UL, 0x10da7a5aUL, + 0x67dd4accUL, 0xf9b9df6fUL, 0x8ebeeff9UL, 0x17b7be43UL, 0x60b08ed5UL, + 0xd6d6a3e8UL, 0xa1d1937eUL, 0x38d8c2c4UL, 0x4fdff252UL, 0xd1bb67f1UL, + 0xa6bc5767UL, 0x3fb506ddUL, 0x48b2364bUL, 0xd80d2bdaUL, 0xaf0a1b4cUL, + 0x36034af6UL, 0x41047a60UL, 0xdf60efc3UL, 0xa867df55UL, 0x316e8eefUL, + 0x4669be79UL, 0xcb61b38cUL, 0xbc66831aUL, 0x256fd2a0UL, 0x5268e236UL, + 0xcc0c7795UL, 0xbb0b4703UL, 0x220216b9UL, 0x5505262fUL, 0xc5ba3bbeUL, + 0xb2bd0b28UL, 0x2bb45a92UL, 0x5cb36a04UL, 0xc2d7ffa7UL, 0xb5d0cf31UL, + 0x2cd99e8bUL, 0x5bdeae1dUL, 0x9b64c2b0UL, 0xec63f226UL, 0x756aa39cUL, + 0x026d930aUL, 0x9c0906a9UL, 0xeb0e363fUL, 0x72076785UL, 0x05005713UL, + 0x95bf4a82UL, 0xe2b87a14UL, 0x7bb12baeUL, 0x0cb61b38UL, 0x92d28e9bUL, + 0xe5d5be0dUL, 0x7cdcefb7UL, 0x0bdbdf21UL, 0x86d3d2d4UL, 0xf1d4e242UL, + 0x68ddb3f8UL, 0x1fda836eUL, 0x81be16cdUL, 0xf6b9265bUL, 0x6fb077e1UL, + 0x18b74777UL, 0x88085ae6UL, 0xff0f6a70UL, 0x66063bcaUL, 0x11010b5cUL, + 0x8f659effUL, 0xf862ae69UL, 0x616bffd3UL, 0x166ccf45UL, 0xa00ae278UL, + 0xd70dd2eeUL, 0x4e048354UL, 0x3903b3c2UL, 0xa7672661UL, 0xd06016f7UL, + 0x4969474dUL, 0x3e6e77dbUL, 0xaed16a4aUL, 0xd9d65adcUL, 0x40df0b66UL, + 0x37d83bf0UL, 0xa9bcae53UL, 0xdebb9ec5UL, 0x47b2cf7fUL, 0x30b5ffe9UL, + 0xbdbdf21cUL, 0xcabac28aUL, 0x53b39330UL, 0x24b4a3a6UL, 0xbad03605UL, + 0xcdd70693UL, 0x54de5729UL, 0x23d967bfUL, 0xb3667a2eUL, 0xc4614ab8UL, + 0x5d681b02UL, 0x2a6f2b94UL, 0xb40bbe37UL, 0xc30c8ea1UL, 0x5a05df1bUL, + 0x2d02ef8dUL +}; + +#define DO1(buf) crc = crc_table[(crc ^ (*buf++)) & 0xff] ^ (crc >> 8); +#define DO2(buf) DO1(buf); DO1(buf); +#define DO4(buf) DO2(buf); DO2(buf); +#define DO8(buf) DO4(buf); DO4(buf); + +unsigned long crc32 (unsigned long crc, const unsigned char *buf, unsigned long len) +{ + //_ARGCHK(buf != NULL && len == 0); + crc = crc ^ 0xffffffffL; + while (len >= 8) { + DO8 (buf); + len -= 8; + } + + if (len > 0) { + do { + DO1 (buf); + } while (--len > 0); + } + return crc ^ 0xffffffffUL; +} + Index: cuda.c =================================================================== --- cuda.c (.../vendor/dspam/3.0.0) (revision 0) +++ cuda.c (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -0,0 +1,429 @@ +#define _GNU_SOURCE + +#include +#include +#include + +#include /* lockf(3) */ +#include /* MAX */ + +#include + +#include /* SSIZE_MAX */ + +#include + +#include +#include + +#include "cuda.h" +#include "config.h" + + +static struct { + struct { + FILE *fp; + + struct { + char host[128]; + unsigned short port; + char user[64]; + char pass[64]; + char db[64]; + } buf[2], *rd, *wr, *cur; + } creds; + + struct { + struct { + MYSQL *dbh; + } rd, wr, *cur; + } conn; +} mysql; + + +static void cuda_sql_cred_parse(void) { + static char *line; + static size_t lsz; + ssize_t lln; + unsigned nline; + + mysql.creds.rd = &mysql.creds.buf[0]; + mysql.creds.wr = &mysql.creds.buf[1]; + + *mysql.creds.rd->host = '\0'; + *mysql.creds.wr->host = '\0'; + + mysql.creds.cur = mysql.creds.rd; + + /* XXX: Since the descriptor is shared across processes, we need + * to serialize because we share the descriptor offset pointer. + */ + + if (0 != lockf(fileno(mysql.creds.fp),F_LOCK,0)) { + warn("Failed to lock MySQL credentials"); + return /* void */; + } + + rewind(mysql.creds.fp); + + for (nline = 1;nline < 7;nline++) { + lln = getline(&line,&lsz,mysql.creds.fp); + + if (lln == -1 || !lln) { + if (!feof(mysql.creds.fp)) + warn("Failed reading MySQL credentials"); + + break; + } + + if (line[lln - 1] == '\n') + line[--lln] = '\0'; + +next: + switch (nline) { + case 1: + *mysql.creds.cur->host = '\0'; + mysql.creds.cur->port = 0; + *mysql.creds.cur->user = '\0'; + *mysql.creds.cur->pass = '\0'; + *mysql.creds.cur->db = '\0'; + + (void)snprintf(mysql.creds.cur->host,sizeof mysql.creds.cur->host,"%s",line); + break; + case 2: + mysql.creds.cur->port = atoi(line); + break; + case 3: + (void)snprintf(mysql.creds.cur->user,sizeof mysql.creds.cur->user,"%s",line); + break; + case 4: + (void)snprintf(mysql.creds.cur->pass,sizeof mysql.creds.cur->pass,"%s",line); + break; + case 5: + (void)snprintf(mysql.creds.cur->db,sizeof mysql.creds.cur->db,"%s",line); + break; + case 6: + if (mysql.creds.cur == mysql.creds.rd) { + mysql.creds.cur = mysql.creds.wr; + nline = 1; + goto next; + } + break; + } + } + + if (0 != lockf(fileno(mysql.creds.fp),F_ULOCK,0)) { + warn("Failed to unlock MySQL credentials"); + return /* void */; + } + + if (!*mysql.creds.wr->host) + mysql.creds.wr = mysql.creds.rd; + + return /* void */; +} /* cuda_sql_cred_parse() */ + + +cuda_conn cuda_sql_open_conn(enum conn type) { + void *c_status; + unsigned c_flag = 0; + + switch (type) { + case read_conn: + mysql.creds.cur = mysql.creds.rd; + mysql.conn.cur = &mysql.conn.rd; + c_flag = 0; + break; + case write_conn: + mysql.creds.cur = mysql.creds.wr; + mysql.conn.cur = &mysql.conn.wr; + c_flag = CLIENT_COMPRESS; + break; + } + + if (mysql.conn.cur->dbh) + return mysql.conn.cur->dbh; + + if (!*mysql.creds.cur->host) + return NULL; + + mysql.conn.cur->dbh = mysql_init(NULL); + + if (!mysql.conn.cur->dbh) + return NULL; + + if (*mysql.creds.cur->host == '/') { + c_status = mysql_real_connect( + mysql.conn.cur->dbh, + NULL, + mysql.creds.cur->user, + mysql.creds.cur->pass, + mysql.creds.cur->db, + 0, + mysql.creds.cur->host, + c_flag + ); + } else { + c_status = mysql_real_connect( + mysql.conn.cur->dbh, + mysql.creds.cur->host, + mysql.creds.cur->user, + mysql.creds.cur->pass, + mysql.creds.cur->db, + mysql.creds.cur->port, + NULL, + c_flag + ); + } + + if (!c_status) { + cuda_sql_close_conn(mysql.conn.cur->dbh); + return NULL; + } + + return mysql.conn.cur->dbh; +} /* cuda_sql_open_conn() */ + + +void cuda_sql_close_conn(cuda_conn conn) { + if (mysql.conn.rd.dbh == conn) + mysql.conn.cur = &mysql.conn.rd; + else + mysql.conn.cur = &mysql.conn.wr; + + mysql_close(mysql.conn.cur->dbh); + mysql.conn.cur->dbh = NULL; + + return /* void */; +} /* cuda_sql_close_conn() */ + + +cuda_result cuda_sql_do(cuda_conn conn, const char *fmt,...) { + enum conn type; + va_list ap; + char *sql; + int sqlln; + int q_status; + MYSQL_RES *res; + + va_start(ap,fmt); + sqlln = vasprintf(&sql,fmt,ap); + va_end(ap); + + /*warnx("Issuing SQL: %s",sql);*/ + + if (sqlln == -1 || !sql) + return NULL; + + if (!conn) { + type = write_conn; +open_conn: + conn = cuda_sql_open_conn(type); + } else { + type = (conn == &mysql.conn.rd)? read_conn : write_conn; + } + + if (!conn) + return NULL; + + q_status = mysql_real_query(conn,sql,sqlln); + + switch (q_status) { + case 0: + break; + case CR_SERVER_GONE_ERROR: + case CR_SERVER_LOST: + cuda_sql_close_conn(conn); + conn = NULL; + goto open_conn; + default: + warn("MySQL query failed '%.*s': %s",256,sql,mysql_error(conn)); + free(sql); + return NULL; + } + + free(sql); + + res = mysql_store_result(conn); + + return res; +} /* cuda_sql_do() */ + + +char **cuda_next_row(cuda_result result) { + MYSQL_ROW row; + unsigned nfields, i; + unsigned long *flengths; + size_t hsize, fsize; + char **fields; + char *field; + + if (!result) + return NULL; + + row = mysql_fetch_row(result); + + if (!row) + return NULL; + + nfields = mysql_num_fields(result); + + if (!nfields) + return NULL; + + flengths = mysql_fetch_lengths(result); + + if (!flengths) + return NULL; + + hsize = (sizeof *fields) * (nfields + 1); + + for (fsize = 0, i = 0; i < nfields; i++) + fsize += flengths[i] + 1; + + fields = malloc(hsize + fsize); + + if (!fields) + return NULL; + + for (field = ((char *)fields) + hsize, i = 0; i < nfields; field += flengths[i] + 1, i++) { + (void)sprintf(field,"%.*s",MAX(0,(int)flengths[i]),(row[i])?row[i]:""); + fields[i] = field; + } + + fields[nfields] = NULL; + + return fields; +} /* cuda_next_row() */ + + +void cuda_free_row(char **row) { + free(row); +} /* cuda_free_row() */ + + +void cuda_sql_start_transaction(cuda_conn conn) { + cuda_sql_free_result(cuda_sql_do(conn,"START TRANSACTION")); +} /* cuda_sql_start_transaction() */ + + +void cuda_sql_commit(cuda_conn conn) { + cuda_sql_free_result(cuda_sql_do(conn,"COMMIT")); +} /* cuda_sql_commit() */ + + +void cuda_sql_rollback(cuda_conn conn) { + cuda_sql_free_result(cuda_sql_do(conn,"ROLLBACK")); +} /* cuda_sql_rollback() */ + + +size_t cuda_sql_affected(cuda_conn conn) { + return mysql_affected_rows(conn); +} /* cuda_sql_affected() */ + + +ssize_t cuda_sql_matched(cuda_conn conn) { + const char *info; + unsigned matched; + int n; + + info = mysql_info(conn); + + if (!info) + return -1; + + n = sscanf(info,"Rows matched: %u",&matched); + + if (n == 1) + return MIN(matched,SSIZE_MAX); + + return -1; +} /* cuda_sql_matched() */ + + +void cuda_sql_free_result(cuda_result result) { + if (!result) + return /* void */; + + mysql_free_result(result); +} /* cuda_sql_free_result() */ + + +char *cuda_sql_escape(cuda_conn conn,char **esc,size_t *escsz,const char *str,size_t strln) { + char *tmp; + + if (!esc) + return NULL; + + if (!*esc) + *escsz = 0; + + if (*escsz < (strln * 2) + 1) { + tmp = realloc(*esc,(strln * 2) + 1); + + if (!tmp) + return NULL; + + *esc = tmp; + *escsz = (strln * 2) + 1; + } + + (void)mysql_real_escape_string(conn,*esc,str,strln); + + return *esc; +} /* cuda_sql_escape() */ + + +const char *cuda_sql_strerror(cuda_conn conn) { + const char *err = mysql_error(conn); + + return (err && *err)? err : NULL; +} /* cuda_sql_strerror() */ + + +void cuda_sql_clearerr(cuda_conn conn) { + return /* void */; +} /* cuda_sql_clearerr() */ + + +void cuda_sql_reset(void) { + mysql.conn.rd.dbh = NULL; + mysql.conn.wr.dbh = NULL; + + return /* void */; +} /* cuda_sql_reset() */ + + +void cuda_sql_init(void) { + char path[1024]; + cuda_conn conn; + + if (sizeof path <= snprintf(path,sizeof path,"%s/mysql.data",DSPAM_HOME)) + err(EXIT_FAILURE,"Failed reading MySQL credentials"); + + mysql.creds.fp = fopen(path,"r+"); + /* write mode needed so we can use lockf() */ + + if (!mysql.creds.fp) + err(EXIT_FAILURE,"Failed reading MySQL credentials"); + + cuda_sql_cred_parse(); + + conn = cuda_sql_open_conn(read_conn); + + if (!conn) + errx(EXIT_FAILURE,"Failed to initialize MySQL connections"); + + cuda_sql_close_conn(conn); + /* XXX: Must close so we don't share across processes */ + + conn = cuda_sql_open_conn(write_conn); + + if (!conn) + err(EXIT_FAILURE,"Failed to initialize MySQL connections"); + + cuda_sql_close_conn(conn); + + return /* void */; +} /* cuda_sql_init() */ + Index: util.c =================================================================== --- util.c (.../vendor/dspam/3.0.0) (revision 39233) +++ util.c (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -75,6 +75,8 @@ string[len - 1] = 0; len--; } + if (len == 0) /* WA: Barracuda Networks, Inc. */ + return; if (string[len - 1] == 13) string[len - 1] = 0; return; @@ -260,16 +262,16 @@ { if (extension == NULL) { - snprintf (path, MAX_FILENAME_LENGTH, "%s/data/%c/%c/%s", + snprintf (path, MAX_FILENAME_LENGTH, "%s/%c/%c/%s", DSPAM_HOME, filename[0], filename[1], filename); } else { if (extension[0] == 0) - snprintf (path, MAX_FILENAME_LENGTH, "%s/data/%c/%c/%s/%s", + snprintf (path, MAX_FILENAME_LENGTH, "%s/%c/%c/%s/%s", DSPAM_HOME, filename[0], filename[1], filename, filename); else - snprintf (path, MAX_FILENAME_LENGTH, "%s/data/%c/%c/%s/%s.%s", + snprintf (path, MAX_FILENAME_LENGTH, "%s/%c/%c/%s/%s.%s", DSPAM_HOME, filename[0], filename[1], filename, filename, extension); } @@ -278,27 +280,27 @@ { if (extension == NULL) { - snprintf (path, MAX_FILENAME_LENGTH, "%s/data/%c/%s", + snprintf (path, MAX_FILENAME_LENGTH, "%s/%c/%s", DSPAM_HOME, filename[0], filename); } else { if (extension[0] == 0) - snprintf (path, MAX_FILENAME_LENGTH, "%s/data/%c/%s/%s", + snprintf (path, MAX_FILENAME_LENGTH, "%s/%c/%s/%s", DSPAM_HOME, filename[0], filename, filename); else - snprintf (path, MAX_FILENAME_LENGTH, "%s/data/%c/%s/%s.%s", + snprintf (path, MAX_FILENAME_LENGTH, "%s/%c/%s/%s.%s", DSPAM_HOME, filename[0], filename, filename, extension); } } #else if (extension == NULL) { - snprintf (path, MAX_FILENAME_LENGTH, "%s/data/%s", DSPAM_HOME, userpath); + snprintf (path, MAX_FILENAME_LENGTH, "%s/%s", DSPAM_HOME, userpath); } else { - snprintf (path, MAX_FILENAME_LENGTH, "%s/data/%s/%s.%s", + snprintf (path, MAX_FILENAME_LENGTH, "%s/%s/%s.%s", DSPAM_HOME, userpath, username, extension); } #endif Index: tools/Makefile.in =================================================================== --- tools/Makefile.in (.../vendor/dspam/3.0.0) (revision 39233) +++ tools/Makefile.in (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.7.4 from Makefile.am. +# Makefile.in generated by automake 1.7.6 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 @@ -459,7 +459,6 @@ installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(bindir) - install: install-am install-exec: install-exec-am install-data: install-data-am Index: tools/dspam_genaliases.in =================================================================== --- tools/dspam_genaliases.in (.../vendor/dspam/3.0.0) (revision 39233) +++ tools/dspam_genaliases.in (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -3,7 +3,7 @@ use strict; use File::Basename; use Getopt::Long; -use IO::File; +use IO; sub PROGNAME { 'dspam_genaliases'; } @@ -22,7 +22,7 @@ sub Help() { show_version(); - printf("Script that uses passwd data to output a dspam aliases\n"); + printf("Script that reads the `/etc/passwd' file and outputs a dspam aliases\n"); printf("table which can be included in the master aliases table.\n"); printf("\n"); printf("Usage:\n"); @@ -37,12 +37,6 @@ printf(" Special filename `-' is allowed and points\n"); printf(" to the stdout.\n"); printf(" [default: stdout]\n"); - printf(" --exclude NAME Do not generate an alias for username NAME. Specify\n"); - printf(" multiple times to exclude multiple user names.\n"); - printf(" --excludeuid NUM Do not generate an alias for UID. Specify multiple\n"); - printf(" times to exclude multiple UIDs.\n"); - printf(" --minuid NUM Minimum UID for which to generate an alias.\n"); - printf(" --maxuid NUM Maximum UID for which to generate an alias.\n"); ### printf(" --salt STR \"Salt\" aliases. Generate aliases like\n"); ### printf(" `spam-USER-STR' instead of `spam-USER'\n"); ### printf(" and `nospam-USER-STR' instead of `nospam-USER-STR'\n"); @@ -69,17 +63,12 @@ sub main() { my $success; - my $username; - my $passwd; - my $uid; my $opt_help; my $opt_version; - my $opt_minuid; - my $opt_maxuid; - my %excludename; - my %excludeuid; my $outfile; my $outhandle; + my $inputfile; + my $inputhandle; my $salt; my $opt_generate_nospam = FALSE; @@ -90,10 +79,6 @@ "version" => \$opt_version, "nospam" => \$opt_generate_nospam, "output|o=s" => \$outfile, - "minuid=i" => \$opt_minuid, - "maxuid=i" => \$opt_maxuid, - "exclude=s" => sub { $excludename{$_[1]} = 1 }, - "excludeuid=i" => sub { $excludeuid{$_[1]} = 1 } ### "salt=s" => \$salt ); @@ -126,6 +111,16 @@ ### $salt=''; ### } + # open input file + $inputfile = '/etc/passwd'; + $inputhandle = IO::File->new($inputfile, 'r'); + if (!$inputhandle) + { + printf(STDERR "%s: error opening `%s' for reading: %s\n", + $PROG, $inputfile, $!); + return EXIT_FAILURE; + } + # open output file. if (!defined($outfile) || $outfile eq '-') { @@ -147,12 +142,11 @@ # do real work ### my $alias_suffix = $salt eq '' ? '' : '-'.$salt; my $alias_suffix = ''; - setpwent(); - while (($username, $passwd, $uid) = getpwent) + my $line; + while (defined($line = $inputhandle->getline())) { - next if $opt_minuid && $uid < $opt_minuid; - next if $opt_maxuid && $uid > $opt_maxuid; - next if exists $excludeuid{$uid} || $excludename{$username}; + my $username; + ($username) = split(/:/, $line); $success = $outhandle->printf("spam-%s%s:\t\"|'%s' --user '%s' --class=spam --source=error --mode=teft\"\n", $username, $alias_suffix, @@ -185,6 +179,8 @@ return EXIT_FAILURE; } + $inputhandle->close(); + return EXIT_SUCCESS; } Index: tools/.cvsignore =================================================================== --- tools/.cvsignore (.../vendor/dspam/3.0.0) (revision 0) +++ tools/.cvsignore (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -0,0 +1,15 @@ +.deps +.libs +Makefile +Makefile.in +dspam_clean +dspam_convert +dspam_crc +dspam_dump +dspam_genaliases +dspam_merge +dspam_ngstats +*_purge +dspam_stats +dspam_2mysql +dspam_corpus Index: mysql_drv.c =================================================================== --- mysql_drv.c (.../vendor/dspam/3.0.0) (revision 39233) +++ mysql_drv.c (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -54,6 +54,8 @@ #include "language.h" #include "util.h" #include "lht.h" +#include "journal.h" + int test(MYSQL *, char *); @@ -90,7 +92,7 @@ struct _ds_spam_totals user, group; int uid = -1, gid = -1; - if (s->dbh == NULL) + if (s->rd_dbh == NULL) { LOGDEBUG ("_mysql_drv_get_spamtotals: invalid database handle (NULL)"); return EINVAL; @@ -141,13 +143,13 @@ "spam_classified, innocent_classified " " from dspam_stats where uid in(%d, %d)", uid, gid); - if (MYSQL_RUN_QUERY (s->dbh, query)) + if (MYSQL_RUN_QUERY (s->rd_dbh, query)) { - _mysql_drv_query_error (mysql_error (s->dbh), query); + _mysql_drv_query_error (mysql_error (s->rd_dbh), query); return EFAILURE; } - result = mysql_use_result (s->dbh); + result = mysql_use_result (s->rd_dbh); if (result == NULL) return EFAILURE; @@ -222,7 +224,7 @@ int result = 0; struct _ds_spam_totals user; - if (s->dbh == NULL) + if (s->wr_dbh == NULL) { LOGDEBUG ("_mysql_drv_set_spamtotals: invalid database handle (NULL)"); return EINVAL; @@ -272,11 +274,25 @@ CTX->totals.innocent_misclassified, CTX->totals.spam_corpusfed, CTX->totals.innocent_corpusfed, CTX->totals.spam_classified, CTX->totals.innocent_classified); - result = MYSQL_RUN_QUERY (s->dbh, query); + result = MYSQL_RUN_QUERY (s->wr_dbh, query); } + if (journal_getpid()) { if (s->control_totals.innocent_learned != 0 || result) { + journal_stats_delta( + CTX->username, + CTX->totals.spam_learned - s->control_totals.spam_learned, + CTX->totals.innocent_learned - s->control_totals.innocent_learned, + CTX->totals.spam_misclassified - s->control_totals.spam_misclassified, + CTX->totals.innocent_misclassified - s->control_totals.innocent_misclassified, + CTX->totals.spam_corpusfed - s->control_totals.spam_corpusfed, + CTX->totals.innocent_corpusfed - s->control_totals.innocent_corpusfed, + CTX->totals.spam_classified - s->control_totals.spam_classified, + CTX->totals.innocent_classified - s->control_totals.innocent_classified + ); + } + } else { snprintf (query, sizeof (query), "update dspam_stats set spam_learned = spam_learned %s %d, " "innocent_learned = innocent_learned %s %d, " @@ -320,14 +336,14 @@ abs (CTX->totals.innocent_classified - s->control_totals.innocent_classified), p->pw_uid); - if (MYSQL_RUN_QUERY (s->dbh, query)) + if (MYSQL_RUN_QUERY (s->wr_dbh, query)) { - _mysql_drv_query_error (mysql_error (s->dbh), query); + _mysql_drv_query_error (mysql_error (s->wr_dbh), query); if (CTX->flags & DSF_MERGED) memcpy(&CTX->totals, &user, sizeof(struct _ds_spam_totals)); return EFAILURE; } - } + } /* if (journal_getpid()) */ if (CTX->flags & DSF_MERGED) memcpy(&CTX->totals, &user, sizeof(struct _ds_spam_totals)); @@ -355,7 +371,7 @@ s->control_ih = 0; s->control_sh = 0; - if (s->dbh == NULL) + if (s->rd_dbh == NULL) { LOGDEBUG ("_ds_getall_spamrecords: invalid database handle (NULL)"); return EINVAL; @@ -427,14 +443,14 @@ if (!get_one) return 0; - if (MYSQL_RUN_QUERY (s->dbh, query->data)) + if (MYSQL_RUN_QUERY (s->rd_dbh, query->data)) { - _mysql_drv_query_error (mysql_error (s->dbh), query->data); + _mysql_drv_query_error (mysql_error (s->rd_dbh), query->data); buffer_destroy(query); return EFAILURE; } - result = mysql_use_result (s->dbh); + result = mysql_use_result (s->rd_dbh); if (result == NULL) { buffer_destroy(query); return EFAILURE; @@ -484,6 +500,47 @@ return 0; } +static int +_ds_setall_spamrecord_deltas (DSPAM_CTX * CTX, struct lht *freq) +{ + struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; + struct _ds_spam_stat stat; + struct lht_node *node_lht; + struct lht_c c_lht; + + if (CTX->operating_mode == DSM_CLASSIFY) + return 0; + + if (s->control_token == 0) + { + node_lht = c_lht_first (freq, &c_lht); + if (node_lht == NULL) + { + stat.spam_hits = 0; + stat.innocent_hits = 0; + } + else + { + stat.spam_hits = node_lht->s.spam_hits; + stat.innocent_hits = node_lht->s.innocent_hits; + } + } + else + { + lht_getspamstat (freq, s->control_token, &stat); + } + + node_lht = c_lht_first (freq, &c_lht); + while (node_lht != NULL) + { + journal_token_delta(CTX->username,node_lht->key,stat.spam_hits - s->control_sh,stat.innocent_hits - s->control_ih); + + node_lht = c_lht_next (freq, &c_lht); + } + + return 0; +} /* _ds_setall_spamrecord_deltas() */ + int _ds_setall_spamrecords (DSPAM_CTX * CTX, struct lht *freq) { @@ -496,7 +553,10 @@ struct passwd *p; int update_one = 0; - if (s->dbh == NULL) + if (journal_getpid()) + return _ds_setall_spamrecord_deltas(CTX, freq); + + if (s->wr_dbh == NULL) { LOGDEBUG ("_ds_setall_spamrecords: invalid database handle (NULL)"); return EINVAL; @@ -601,7 +661,7 @@ stat2.innocent_hits); } - if (MYSQL_RUN_QUERY (s->dbh, insert)) + if (MYSQL_RUN_QUERY (s->wr_dbh, insert)) stat2.disk = 'Y'; } @@ -636,9 +696,9 @@ if (update_one) { - if (MYSQL_RUN_QUERY (s->dbh, query->data)) + if (MYSQL_RUN_QUERY (s->wr_dbh, query->data)) { - _mysql_drv_query_error (mysql_error (s->dbh), query->data); + _mysql_drv_query_error (mysql_error (s->wr_dbh), query->data); buffer_destroy(query); return EFAILURE; } @@ -658,7 +718,7 @@ MYSQL_RES *result; MYSQL_ROW row; - if (s->dbh == NULL) + if (s->rd_dbh == NULL) { LOGDEBUG ("_ds_get_spamrecord: invalid database handle (NULL)"); return EINVAL; @@ -685,13 +745,13 @@ stat->innocent_hits = 0; stat->disk = 'N'; - if (MYSQL_RUN_QUERY (s->dbh, query)) + if (MYSQL_RUN_QUERY (s->rd_dbh, query)) { - _mysql_drv_query_error (mysql_error (s->dbh), query); + _mysql_drv_query_error (mysql_error (s->rd_dbh), query); return EFAILURE; } - result = mysql_use_result (s->dbh); + result = mysql_use_result (s->rd_dbh); if (result == NULL) return EFAILURE; @@ -718,7 +778,7 @@ struct passwd *p; int result = 0; - if (s->dbh == NULL) + if (s->wr_dbh == NULL) { LOGDEBUG ("_ds_set_spamrecord: invalid database handle (NULL)"); return EINVAL; @@ -746,7 +806,7 @@ "insert into dspam_token_data(uid, token, spam_hits, innocent_hits, last_hit)" " values(%d, '%llu', %ld, %ld, current_date())", p->pw_uid, token, stat->spam_hits, stat->innocent_hits); - result = MYSQL_RUN_QUERY (s->dbh, query); + result = MYSQL_RUN_QUERY (s->wr_dbh, query); } if (stat->disk == 'Y' || result) @@ -763,9 +823,9 @@ strlcat(query, " and innocent_hits + spam_hits < 50", sizeof(query)); } - if (MYSQL_RUN_QUERY (s->dbh, query)) + if (MYSQL_RUN_QUERY (s->wr_dbh, query)) { - _mysql_drv_query_error (mysql_error (s->dbh), query); + _mysql_drv_query_error (mysql_error (s->wr_dbh), query); return EFAILURE; } } @@ -777,15 +837,15 @@ _ds_init_storage (DSPAM_CTX * CTX) { struct _mysql_drv_storage *s; - MYSQL *connect; + MYSQL *rd_connect, *wr_connect; FILE *file; char filename[MAX_FILENAME_LENGTH]; char buffer[128]; - char hostname[128]; - char user[64]; - char password[32]; - char db[64]; - int port = 3306, i = 0; + char rd_hostname[128], wr_hostname[128]; + char rd_user[64], wr_user[64]; + char rd_password[32], wr_password[32]; + char rd_db[64], wr_db[64]; + int rd_port = 3306, wr_port=3306, i = 0; /* don't init if we're already initted */ if (CTX->storage != NULL) @@ -801,7 +861,8 @@ return EUNKNOWN; } - s->dbh = NULL; + s->rd_dbh = NULL; + s->wr_dbh = NULL; s->control_token = 0; s->iter_user = NULL; s->iter_token = NULL; @@ -819,60 +880,116 @@ return EFAILURE; } - db[0] = 0; + rd_db[0] = 0; + wr_db[0] = 0; while (fgets (buffer, sizeof (buffer), file) != NULL) { chomp (buffer); if (!i) - strlcpy (hostname, buffer, sizeof (hostname)); + strlcpy (rd_hostname, buffer, sizeof (rd_hostname)); else if (i == 1) - port = atoi (buffer); + rd_port = atoi (buffer); else if (i == 2) - strlcpy (user, buffer, sizeof (user)); + strlcpy (rd_user, buffer, sizeof (rd_user)); else if (i == 3) - strlcpy (password, buffer, sizeof (password)); + strlcpy (rd_password, buffer, sizeof (rd_password)); else if (i == 4) - strlcpy (db, buffer, sizeof (db)); + strlcpy (rd_db, buffer, sizeof (rd_db)); + else if (i == 5) + strlcpy (wr_hostname, buffer, sizeof (wr_hostname)); + else if (i == 6) + wr_port = atoi (buffer); + else if (i == 7) + strlcpy (wr_user, buffer, sizeof (wr_user)); + else if (i == 8) + strlcpy (wr_password, buffer, sizeof (wr_password)); + else if (i == 9) + strlcpy (wr_db, buffer, sizeof (wr_db)); i++; } fclose (file); - if (db[0] == 0) + if (rd_db[0] == 0) { LOG (LOG_WARNING, "file %s: incomplete mysql connect data", filename); return EINVAL; } - s->dbh = mysql_init (NULL); - if (s->dbh == NULL) + s->rd_dbh = mysql_init (NULL); + if (s->rd_dbh == NULL) + { + LOGDEBUG + ("_ds_init_storage: mysql_init: unable to initialize handle to database"); + return EUNKNOWN; + } + + s->wr_dbh = mysql_init (NULL); + if (s->wr_dbh == NULL) { LOGDEBUG ("_ds_init_storage: mysql_init: unable to initialize handle to database"); + + mysql_close(s->rd_dbh); + s->rd_dbh = NULL; + return EUNKNOWN; } - if (hostname[0] == '/') + if (!wr_db[0]) { + (void)strlcpy(wr_hostname,rd_hostname,sizeof wr_hostname); + wr_port = rd_port; + (void)strlcpy(wr_user,rd_user,sizeof wr_user); + (void)strlcpy(wr_password,rd_password,sizeof wr_password); + (void)strlcpy(wr_db,rd_db,sizeof wr_db); + } + + + if (rd_hostname[0] == '/') { - connect = - mysql_real_connect (s->dbh, NULL, user, password, db, 0, hostname, + rd_connect = + mysql_real_connect (s->rd_dbh, NULL, rd_user, rd_password, rd_db, 0, rd_hostname, REAL_CONNECT_FLAG); } else { - connect = - mysql_real_connect (s->dbh, hostname, user, password, db, port, NULL, + rd_connect = + mysql_real_connect (s->rd_dbh, rd_hostname, rd_user, rd_password, rd_db, rd_port, NULL, + REAL_CONNECT_FLAG); + } + + if (wr_hostname[0] == '/') + { + wr_connect = + mysql_real_connect (s->wr_dbh, NULL, wr_user, wr_password, wr_db, 0, wr_hostname, REAL_CONNECT_FLAG); + } - if (connect == NULL) + else { - LOG (LOG_WARNING, "%s", mysql_error (s->dbh)); + wr_connect = + mysql_real_connect (s->wr_dbh, wr_hostname, wr_user, wr_password, wr_db, wr_port, NULL, + REAL_CONNECT_FLAG); + } + + if (rd_connect == NULL || wr_connect == NULL) + { + LOG (LOG_WARNING, "%s", mysql_error ((rd_connect)?s->wr_dbh:s->rd_dbh)); + mysql_close(s->rd_dbh); s->rd_dbh = NULL; + mysql_close(s->wr_dbh); s->wr_dbh = NULL; return EFAILURE; } CTX->storage = s; + /* start our transaction */ + if (MYSQL_RUN_QUERY (s->wr_dbh, "start transaction")) + { + _mysql_drv_query_error (mysql_error (s->wr_dbh), "start transaction"); + } + + /* get spam totals on successful init */ if (CTX->username != NULL) { @@ -895,7 +1012,7 @@ { struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; - if (s->dbh == NULL) + if (s->rd_dbh == NULL || s->wr_dbh == NULL) { LOGDEBUG ("_ds_shutdown_storage: invalid database handle (NULL)"); return EINVAL; @@ -907,8 +1024,15 @@ _mysql_drv_set_spamtotals (CTX); } - mysql_close (s->dbh); - s->dbh = NULL; + /* commit our transaction */ + if (MYSQL_RUN_QUERY (s->wr_dbh, "commit")) + { + _mysql_drv_query_error (mysql_error (s->wr_dbh), "commit"); + } + + + mysql_close (s->rd_dbh); s->rd_dbh = NULL; + mysql_close (s->wr_dbh); s->wr_dbh = NULL; free(s); CTX->storage = NULL; @@ -948,7 +1072,7 @@ MYSQL_RES *result; MYSQL_ROW row; - if (s->dbh == NULL) + if (s->rd_dbh == NULL) { LOGDEBUG ("_ds_get_signature: invalid database handle (NULL)"); return EINVAL; @@ -969,13 +1093,13 @@ snprintf (query, sizeof (query), "select data, length from dspam_signature_data where uid = %d and signature = \"%s\"", p->pw_uid, signature); - if (mysql_real_query (s->dbh, query, strlen (query))) + if (mysql_real_query (s->rd_dbh, query, strlen (query))) { - _mysql_drv_query_error (mysql_error (s->dbh), query); + _mysql_drv_query_error (mysql_error (s->rd_dbh), query); return EFAILURE; } - result = mysql_use_result (s->dbh); + result = mysql_use_result (s->rd_dbh); if (result == NULL) return EFAILURE; @@ -1021,7 +1145,7 @@ buffer *query; struct passwd *p; - if (s->dbh == NULL) + if (s->wr_dbh == NULL) { LOGDEBUG ("_ds_set_signature; invalid database handle (NULL)"); return EINVAL; @@ -1053,7 +1177,7 @@ buffer_destroy(query); return EUNKNOWN; } - length = mysql_real_escape_string (s->dbh, mem, SIG->data, SIG->length); + length = mysql_real_escape_string (s->wr_dbh, mem, SIG->data, SIG->length); snprintf (scratch, sizeof (scratch), "insert into dspam_signature_data(uid, signature, length, created_on, data) values(%d, \"%s\", %ld, current_date(), \"", @@ -1062,9 +1186,9 @@ buffer_cat (query, mem); buffer_cat (query, "\")"); - if (mysql_real_query (s->dbh, query->data, query->used)) + if (mysql_real_query (s->wr_dbh, query->data, query->used)) { - _mysql_drv_query_error (mysql_error (s->dbh), query->data); + _mysql_drv_query_error (mysql_error (s->wr_dbh), query->data); buffer_destroy(query); free(mem); return EFAILURE; @@ -1082,7 +1206,7 @@ struct passwd *p; char query[128]; - if (s->dbh == NULL) + if (s->wr_dbh == NULL) { LOGDEBUG ("_ds_delete_signature: invalid database handle (NULL)"); return EINVAL; @@ -1104,9 +1228,9 @@ snprintf (query, sizeof (query), "delete from dspam_signature_data where uid = %d and signature = \"%s\"", p->pw_uid, signature); - if (MYSQL_RUN_QUERY (s->dbh, query)) + if (MYSQL_RUN_QUERY (s->wr_dbh, query)) { - _mysql_drv_query_error (mysql_error (s->dbh), query); + _mysql_drv_query_error (mysql_error (s->wr_dbh), query); return EFAILURE; } @@ -1122,7 +1246,7 @@ MYSQL_RES *result; MYSQL_ROW row; - if (s->dbh == NULL) + if (s->rd_dbh == NULL) { LOGDEBUG ("_ds_verify_signature: invalid database handle (NULL)"); return EINVAL; @@ -1143,13 +1267,13 @@ snprintf (query, sizeof (query), "select signature from dspam_signature_data where uid = %d and signature = \"%s\"", p->pw_uid, signature); - if (MYSQL_RUN_QUERY (s->dbh, query)) + if (MYSQL_RUN_QUERY (s->rd_dbh, query)) { - _mysql_drv_query_error (mysql_error (s->dbh), query); + _mysql_drv_query_error (mysql_error (s->rd_dbh), query); return EFAILURE; } - result = mysql_use_result (s->dbh); + result = mysql_use_result (s->rd_dbh); if (result == NULL) return -1; @@ -1176,7 +1300,7 @@ char query[128]; MYSQL_ROW row; - if (s->dbh == NULL) + if (s->rd_dbh == NULL) { LOGDEBUG ("_ds_get_nextuser: invalid database handle (NULL)"); return NULL; @@ -1189,13 +1313,13 @@ #else strcpy (query, "select distinct uid from dspam_stats"); #endif - if (MYSQL_RUN_QUERY (s->dbh, query)) + if (MYSQL_RUN_QUERY (s->rd_dbh, query)) { - _mysql_drv_query_error (mysql_error (s->dbh), query); + _mysql_drv_query_error (mysql_error (s->rd_dbh), query); return NULL; } - s->iter_user = mysql_use_result (s->dbh); + s->iter_user = mysql_use_result (s->rd_dbh); if (s->iter_user == NULL) return NULL; } @@ -1235,7 +1359,7 @@ MYSQL_ROW row; struct passwd *p; - if (s->dbh == NULL) + if (s->rd_dbh == NULL) { LOGDEBUG ("_ds_get_nexttoken: invalid database handle (NULL)"); return NULL; @@ -1267,13 +1391,13 @@ snprintf (query, sizeof (query), "select token, spam_hits, innocent_hits, unix_timestamp(last_hit) from dspam_token_data where uid = %d", p->pw_uid); - if (MYSQL_RUN_QUERY (s->dbh, query)) + if (MYSQL_RUN_QUERY (s->rd_dbh, query)) { - _mysql_drv_query_error (mysql_error (s->dbh), query); + _mysql_drv_query_error (mysql_error (s->rd_dbh), query); return NULL; } - s->iter_token = mysql_use_result (s->dbh); + s->iter_token = mysql_use_result (s->rd_dbh); if (s->iter_token == NULL) return NULL; } @@ -1305,7 +1429,7 @@ struct passwd *p; char *mem; - if (s->dbh == NULL) + if (s->rd_dbh == NULL) { LOGDEBUG ("_ds_get_nextsignature: invalid database handle (NULL)"); return NULL; @@ -1337,13 +1461,13 @@ snprintf (query, sizeof (query), "select data, signature, length, unix_timestamp(created_on) from dspam_signature_data where uid = %d", p->pw_uid); - if (mysql_real_query (s->dbh, query, strlen (query))) + if (mysql_real_query (s->rd_dbh, query, strlen (query))) { - _mysql_drv_query_error (mysql_error (s->dbh), query); + _mysql_drv_query_error (mysql_error (s->rd_dbh), query); return NULL; } - s->iter_sig = mysql_use_result (s->dbh); + s->iter_sig = mysql_use_result (s->rd_dbh); if (s->iter_sig == NULL) return NULL; } @@ -1407,31 +1531,33 @@ return &p; #else struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; + static char pw_name[1024] = {'\0'}; static struct passwd p = { NULL, NULL, 0, 0, NULL, NULL, NULL }; char query[256]; MYSQL_RES *result; MYSQL_ROW row; - if (p.pw_name != NULL) + p.pw_name = pw_name; + + if (*p.pw_name != '\0') { /* cache the last name queried */ if (name != NULL && !strcmp (p.pw_name, name)) return &p; - free (p.pw_name); - p.pw_name = NULL; + *p.pw_name = '\0'; } snprintf (query, sizeof (query), "select uid from dspam_virtual_uids where username = '%s'", name); - if (MYSQL_RUN_QUERY (s->dbh, query)) + if (MYSQL_RUN_QUERY (s->rd_dbh, query)) { - _mysql_drv_query_error (mysql_error (s->dbh), query); + _mysql_drv_query_error (mysql_error (s->rd_dbh), query); return NULL; } - result = mysql_use_result (s->dbh); + result = mysql_use_result (s->rd_dbh); if (result == NULL) { if (CTX->source == DSS_ERROR || CTX->operating_mode != DSM_PROCESS) return NULL; @@ -1456,7 +1582,7 @@ } p.pw_uid = strtol (row[0], NULL, 0); - p.pw_name = strdup (name); + (void)strlcpy(pw_name,name,sizeof pw_name); mysql_free_result (result); return &p; @@ -1487,30 +1613,32 @@ return &p; #else struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; + static char pw_name[1024] = {'\0'}; static struct passwd p = { NULL, NULL, 0, 0, NULL, NULL, NULL }; char query[256]; MYSQL_RES *result; MYSQL_ROW row; - if (p.pw_name != NULL) + p.pw_name = pw_name; + + if (*p.pw_name != '\0') { /* cache the last uid queried */ if (p.pw_uid == uid) return &p; - free (p.pw_name); - p.pw_name = NULL; + *p.pw_name = '\0'; } snprintf (query, sizeof (query), "select username from dspam_virtual_uids where uid = '%d'", uid); - if (MYSQL_RUN_QUERY (s->dbh, query)) + if (MYSQL_RUN_QUERY (s->rd_dbh, query)) { - _mysql_drv_query_error (mysql_error (s->dbh), query); + _mysql_drv_query_error (mysql_error (s->rd_dbh), query); return NULL; } - result = mysql_use_result (s->dbh); + result = mysql_use_result (s->rd_dbh); if (result == NULL) return NULL; @@ -1527,7 +1655,7 @@ return NULL; } - p.pw_name = strdup (row[0]); + (void)strlcpy(pw_name,row[0],sizeof pw_name); p.pw_uid = uid; mysql_free_result (result); @@ -1577,9 +1705,9 @@ /* we need to fail, to prevent a potential loop - even if it was inserted * by another process */ - if (MYSQL_RUN_QUERY (s->dbh, query)) + if (MYSQL_RUN_QUERY (s->wr_dbh, query)) { - _mysql_drv_query_error (mysql_error (s->dbh), query); + _mysql_drv_query_error (mysql_error (s->wr_dbh), query); return NULL; } @@ -1626,13 +1754,13 @@ snprintf(query, sizeof(query), "select total_correct, total_incorrect from " "dspam_neural_data where uid = %d and node = %d", p->pw_uid, n_uid); - if (MYSQL_RUN_QUERY (s->dbh, query)) + if (MYSQL_RUN_QUERY (s->rd_dbh, query)) { - _mysql_drv_query_error (mysql_error (s->dbh), query); + _mysql_drv_query_error (mysql_error (s->rd_dbh), query); return EUNKNOWN; } - result = mysql_use_result (s->dbh); + result = mysql_use_result (s->rd_dbh); if (result == NULL) goto NEWNODE; @@ -1701,7 +1829,7 @@ "%d, %d, %ld, %ld)", p->pw_uid, node->uid, node->total_correct, node->total_incorrect); - if (MYSQL_RUN_QUERY (s->dbh, query)) + if (MYSQL_RUN_QUERY (s->wr_dbh, query)) node->disk = 'Y'; } @@ -1714,9 +1842,9 @@ node->total_incorrect - node->control_incorrect, p->pw_uid, node->uid); - if (MYSQL_RUN_QUERY (s->dbh, query)) + if (MYSQL_RUN_QUERY (s->wr_dbh, query)) { - _mysql_drv_query_error (mysql_error (s->dbh), query); + _mysql_drv_query_error (mysql_error (s->wr_dbh), query); return EUNKNOWN; } } @@ -1739,7 +1867,7 @@ MYSQL_RES *result; MYSQL_ROW row; - if (s->dbh == NULL) + if (s->rd_dbh == NULL) { LOGDEBUG ("_ds_get_decision: invalid database handle (NULL)"); return EINVAL; @@ -1760,13 +1888,13 @@ snprintf (query, sizeof (query), "select data, length from dspam_neural_decisions where uid = %d and signature = \"%s\"", p->pw_uid, signature); - if (mysql_real_query (s->dbh, query, strlen (query))) + if (mysql_real_query (s->rd_dbh, query, strlen (query))) { - _mysql_drv_query_error (mysql_error (s->dbh), query); + _mysql_drv_query_error (mysql_error (s->rd_dbh), query); return EFAILURE; } - result = mysql_use_result (s->dbh); + result = mysql_use_result (s->rd_dbh); if (result == NULL) return EFAILURE; @@ -1812,7 +1940,7 @@ buffer *query; struct passwd *p; - if (s->dbh == NULL) + if (s->wr_dbh == NULL) { LOGDEBUG ("_ds_set_decision; invalid database handle (NULL)"); return EINVAL; @@ -1844,7 +1972,7 @@ buffer_destroy(query); return EUNKNOWN; } - length = mysql_real_escape_string (s->dbh, mem, DEC->data, DEC->length); + length = mysql_real_escape_string (s->wr_dbh, mem, DEC->data, DEC->length); snprintf (scratch, sizeof (scratch), "insert into dspam_neural_decisions(uid, signature, length, created_on, data) values(%d, \"%s\", %ld, current_date(), \"", @@ -1853,9 +1981,9 @@ buffer_cat (query, mem); buffer_cat (query, "\")"); - if (mysql_real_query (s->dbh, query->data, query->used)) + if (mysql_real_query (s->wr_dbh, query->data, query->used)) { - _mysql_drv_query_error (mysql_error (s->dbh), query->data); + _mysql_drv_query_error (mysql_error (s->wr_dbh), query->data); buffer_destroy(query); free(mem); return EFAILURE; @@ -1872,7 +2000,7 @@ struct passwd *p; char query[128]; - if (s->dbh == NULL) + if (s->wr_dbh == NULL) { LOGDEBUG ("_ds_delete_decision: invalid database handle (NULL)"); return EINVAL; @@ -1893,9 +2021,9 @@ snprintf (query, sizeof (query), "delete from dspam_neural_decisions where uid = %d and signature = \"%s\"", p->pw_uid, signature); - if (MYSQL_RUN_QUERY (s->dbh, query)) + if (MYSQL_RUN_QUERY (s->wr_dbh, query)) { - _mysql_drv_query_error (mysql_error (s->dbh), query); + _mysql_drv_query_error (mysql_error (s->wr_dbh), query); return EFAILURE; } @@ -1909,7 +2037,7 @@ struct passwd *p; char query[128]; - if (s->dbh == NULL) + if (s->wr_dbh == NULL) { LOGDEBUG ("_ds_delete_signature: invalid database handle (NULL)"); return EINVAL; @@ -1930,9 +2058,9 @@ snprintf (query, sizeof (query), "delete from dspam_token_data where uid = %d and token = \"%llu\"", p->pw_uid, token); - if (MYSQL_RUN_QUERY (s->dbh, query)) + if (MYSQL_RUN_QUERY (s->wr_dbh, query)) { - _mysql_drv_query_error (mysql_error (s->dbh), query); + _mysql_drv_query_error (mysql_error (s->wr_dbh), query); return EFAILURE; } @@ -1953,7 +2081,7 @@ if (freq->items < 1) return 0; - if (s->dbh == NULL) + if (s->wr_dbh == NULL) { LOGDEBUG ("_ds_delall_spamrecords: invalid database handle (NULL)"); return EINVAL; @@ -1995,9 +2123,9 @@ if (writes > 2500 || node_lht == NULL) { buffer_cat (query, ")"); - if (MYSQL_RUN_QUERY (s->dbh, query->data)) + if (MYSQL_RUN_QUERY (s->wr_dbh, query->data)) { - _mysql_drv_query_error (mysql_error (s->dbh), query->data); + _mysql_drv_query_error (mysql_error (s->wr_dbh), query->data); buffer_destroy(query); return EFAILURE; } @@ -2014,9 +2142,9 @@ if (writes) { buffer_cat (query, ")"); - if (MYSQL_RUN_QUERY (s->dbh, query->data)) + if (MYSQL_RUN_QUERY (s->wr_dbh, query->data)) { - _mysql_drv_query_error (mysql_error (s->dbh), query->data); + _mysql_drv_query_error (mysql_error (s->wr_dbh), query->data); buffer_destroy(query); return EFAILURE; } Index: crc32.h =================================================================== --- crc32.h (.../vendor/dspam/3.0.0) (revision 0) +++ crc32.h (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -0,0 +1,13 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + * + * Tom St Denis, tomstdenis@iahu.ca, http://libtomcrypt.org + */ +/* Provides keyring functionality for libtomcrypt, Tom St Denis */ + +unsigned long crc32 (unsigned long crc, const unsigned char *buf, unsigned long len); Index: cuda.h =================================================================== --- cuda.h (.../vendor/dspam/3.0.0) (revision 0) +++ cuda.h (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -0,0 +1,108 @@ + +enum conn { + read_conn, + write_conn +}; + + +typedef void *cuda_conn; +typedef void *cuda_result; + + +cuda_conn cuda_sql_open_conn(enum conn type); +/* + * Returns an opaque connection object capable of read or write operations. + */ + + +void cuda_sql_close_conn(cuda_conn conn); +/* + * Release the resources associated with the opaque connection object + * returned from cuda_sql_open_conn(). + */ + + +cuda_result cuda_sql_do(cuda_conn, const char *sql, ...); +/* + * Execute a SQL operation and return an opaque result object. + */ + + +void cuda_sql_start_transaction(cuda_conn conn); +void cuda_sql_commit(cuda_conn conn); +void cuda_sql_rollback(cuda_conn conn); +/* + * Declare/finish SQL transactions. + */ + +char **cuda_next_row(cuda_result result); +/* + * Returns NULL terminated character vector of fields. + */ + + +void cuda_free_row(char **row); +/* + * Free any resources associated with row returned from cuda_next_row(). + */ + + +size_t cuda_sql_affected(cuda_conn conn); +/* + * Return the number of rows affected in the last INSERT/UPDATE. + */ + + +ssize_t cuda_sql_matched(cuda_conn conn); +/* + * Return the number of rows _matched_ in an UPDATE (could return > 1 even + * if cuda_sql_affected returns 0). Returns -1 if used inappropriately. + */ + + +void cuda_sql_free_result(cuda_result result); +/* + * Releases the resources associate with the oqaque result object. + */ + + +char *cuda_sql_escape(cuda_conn conn,char **esc, size_t *escsz, const char *str,size_t strln); +/* + * esc pointer to char pointer + * escsz pointer to size of the space allocated to *esc + * str pointer to string to escape + * strln length of str (not including terminated NUL) + * + * Returns pointer to escaped string or NULL on error. On successful return + * esc and escsz will be modified appropriately. *esc is allocated w/ malloc(3)/realloc(3) and + * therefore should be deallocated with free(3). + */ + + +const char *cuda_sql_strerror(cuda_conn conn); +/* + * Return a string description of the last error, or NULL if there was + * no error. + */ + + +void cuda_sql_clearerr(cuda_conn conn); +/* + * Clear any error condition. + */ + + +void cuda_sql_reset(void); +/* + * Close any outstanding SQL connections. + * + * XXX: Make sure cuda_sql_close() will never be called w/ an outstanding + * connection handler. + */ + + +void cuda_sql_init(void); +/* + * Initialize cuda_sql_* interface. + */ + Index: configure.ac =================================================================== --- configure.ac (.../vendor/dspam/3.0.0) (revision 39233) +++ configure.ac (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -3,9 +3,9 @@ dnl Written by Andrew W. Nosenko dnl Modified and enhanced by Jonathan A. Zdziarski dnl -AC_PREREQ(2.59) -AC_COPYRIGHT([Copyright (C) 2004 Network Dweebs Corporation]) -AC_INIT([dspam],[3.0.0],[jonathan@nuclearelephant.com]) +AC_PREREQ(2.57) +AC_COPYRIGHT([Copyright (C) 2003 Network Dweebs Corporation]) +AC_INIT([dspam],[3.0.0.alpha.6],[jonathan@nuclearelephant.com]) AC_CONFIG_SRCDIR(dspam.c) AM_INIT_AUTOMAKE([1.7 foreign]) @@ -78,10 +78,11 @@ # Local delivery Agent # AC_ARG_WITH(delivery-agent, - [AS_HELP_STRING(--with-delivery-agent=PROG, + [AC_HELP_STRING([--with-delivery-agent=PROG], + [ Use PROG as delivery agent. Default value is system dependent. - )]) + ])]) MLOCAL="$with_delivery_agent" AC_MSG_CHECKING([for delivery agent]) @@ -109,7 +110,8 @@ # Overrides DSPAM's default quarantine mechanism # AC_ARG_WITH(quarantine-agent, - [AS_HELP_STRING(--with-quarantine-agent=PROG,Use PROG as quarantine agent.)]) + [AC_HELP_STRING([--with-quarantine-agent=PROG], + [Use PROG as quarantine agent.])]) QLOCAL="$with_quarantine_agent" AC_MSG_CHECKING([for quarantine agent]) if test x"$QLOCAL" != x @@ -126,14 +128,15 @@ # This variable is AC_SUBST'ed, not AC_DEFINE'd because used not only # for C-code, but for Makefile rules also. # -### dspam_home='$(prefix)/var/dspam' -dspam_home='/var/dspam' +### dspam_home='$(prefix)/etc/mail/dspam' +dspam_home='/etc/mail/dspam' AC_ARG_WITH(dspam_home, - [AS_HELP_STRING(--with-dspam-home=DIR, + [AC_HELP_STRING([--with-dspam-home=DIR], + [ Specify directory where per-user dictionaries, signatures, etc. should be stored. - @<:@default: /var/dspam@:>@ - )], + @<:@default: /etc/mail/dspam@:>@ + ])], [ dspam_home="$withval" ]) AC_SUBST(dspam_home) AC_MSG_CHECKING([for dspam_home]) @@ -141,23 +144,29 @@ # DSPAM_HOME ownership AC_ARG_WITH(dspam_home_mode, - [AS_HELP_STRING(--with-dspam-home-mode=MODE, - Set access mode for DSPAM_HOME, default 770 - )], + [AC_HELP_STRING([--with-dspam-home-mode=MODE], + [ + Set access mode for DSPAM_HOME, "none" means + "do not call chmod" @<:@default: 770@:>@ + ])], [ dspam_home_mode="$withval" ], [ dspam_home_mode='770' ] ) AC_ARG_WITH(dspam_home_owner, - [AS_HELP_STRING(--with-dspam-home-owner=OWNER, - Set owner for DSPAM_HOME, default root - )], + [AC_HELP_STRING([--with-dspam-home-owner=OWNER], + [ + Set owner for DSPAM_HOME, "none" means + "do not call chown" @<:@default: root@:>@ + ])], [ dspam_home_owner="$withval" ], [ dspam_home_owner='root' ] ) AC_ARG_WITH(dspam_home_group, - [AS_HELP_STRING(--with-dspam-home-group=GROUP, - Set group for DSPAM_HOME, default mail - )], + [AC_HELP_STRING([--with-dspam-home-group=GROUP], + [ + Set group for DSPAM_HOME, "none" means + "do not call chgrp" @<:@default: mail@:>@ + ])], [ dspam_home_group="$withval" ], [ dspam_home_group='mail' ] ) @@ -171,23 +180,30 @@ *) default_dspam_mode=2510;; esac AC_ARG_WITH(dspam_mode, - [AS_HELP_STRING(--with-dspam-mode=MODE, - Set access mode for dspam binary, default 2510 - )], + [AC_HELP_STRING([--with-dspam-mode=MODE], + [ + Set access mode for dspam binary, "none" means + "do not call chmod" @<:@default: 2510 in many + cases, but 4510 for FreeBSD@:>@ + ])], [ dspam_mode="$withval" ], [ dspam_mode="$default_dspam_mode" ] ) AC_ARG_WITH(dspam_owner, - [AS_HELP_STRING(--with-dspam-owner=OWNER, - Set owner for dspam binary, default root - )], + [AC_HELP_STRING([--with-dspam-owner=OWNER], + [ + Set owner for dspam binary, "none" means + "do not call chown" @<:@default: root@:>@ + ])], [ dspam_owner="$withval" ], [ dspam_owner='root' ] ) AC_ARG_WITH(dspam_group, - [AS_HELP_STRING(--with-dspam-group=GROUP, - Set group for dspam binary, default mail - )], + [AC_HELP_STRING([--with-dspam-group=GROUP], + [ + Set group for dspam binary, "none" means + "do not call chgrp" @<:@default: mail@:>@ + ])], [ dspam_group="$withval" ], [ dspam_group='mail' ] ) @@ -199,13 +215,13 @@ # Trusted Users # AC_ARG_ENABLE(trusted_user_security, - [AS_HELP_STRING(--disable-trusted-user-security,Disable trusted user security (enabled by default))]) + [AC_HELP_STRING([--disable-trusted-user-security], + [Disable trusted user security (enabled by default)])]) AC_MSG_CHECKING([whether to enable trusted user security]) case x"$enable_trusted_user_security" in xyes) # trusted user security enabled explicity ;; xno) # trusted user security disabled explicity - enable_trusted_user_security=no ;; x) # trusted user security enabled by default enable_trusted_user_security=yes @@ -227,11 +243,12 @@ # Debug output # AC_ARG_ENABLE(debug, - [AS_HELP_STRING(--enable-debug, + [AC_HELP_STRING([--enable-debug], + [ Cause DSPAM produce debug output and write them into DSPAM_HOME/dspam.debug file. Never enable this for production builds! - )]) + ])]) AC_MSG_CHECKING([whether to enable debug output]) case x"$enable_debug" in xyes) # debug output enabled explicity @@ -254,39 +271,13 @@ AC_MSG_RESULT([$enable_debug]) # -# Viagra -# -AC_ARG_ENABLE(viagra, - [AS_HELP_STRING(--enable-viagra, - )]) -AC_MSG_CHECKING([for viagra]) -case x"$enable_viagra" in - xyes) # viagra output enabled explicity - ;; - xno) # viagra output disabled explicity - ;; - x) # viagra output disabled by default - enable_viagra=no - ;; - *) AC_MSG_ERROR([unexpected value $enable_viagra for --{enable,disable}-viagra configure option]) - ;; -esac -if test x"$enable_viagra" != xyes -then - enable_viagra=no - AC_MSG_RESULT([no. looks like it's going to be a lonely build.]) -else - enable_viagra=yes # overkill, but convenient - AC_MSG_RESULT([yes. w00t! we'll be up all night compiling!]) -fi - -# # Neural Networking # AC_ARG_ENABLE(neural-networking, - [AS_HELP_STRING(--enable-neural-networking, + [AC_HELP_STRING([--enable-neural-networking], + [ Activates DSPAM's neural-networking functions. - )]) + ])]) AC_MSG_CHECKING([whether to enable neural-networking]) case x"$enable_neural_networking" in xyes) # enabled explicity @@ -309,159 +300,13 @@ AC_MSG_RESULT([$enable_neural_networking]) # -# System Logging -# -AC_ARG_ENABLE(system-logging, - [AS_HELP_STRING(--disable-system-logging, - Disable's system logging - )]) -AC_MSG_CHECKING([whether to enable system-logging]) -case x"$enable_system_logging" in - xyes) # enabled explicity - ;; - xno) # disabled explicity - enable_system_logging=no - ;; - x) # enabled by default - enable_system_logging=yes - ;; - *) AC_MSG_ERROR([unexpected value $enable_system_logging for --{enable,disable}-experimental configure option]) - ;; -esac -if test x"$enable_system_logging" != xyes -then - enable_system_logging=no -else - enable_system_logging=yes # overkill, but convenient - AC_DEFINE(SYSTEM_LOGGING, 1, [Defined if system logging is enabled]) -fi -AC_MSG_RESULT([$enable_system_logging]) - - -# -# User Logging -# -AC_ARG_ENABLE(user-logging, - [AS_HELP_STRING(--disable-user-logging, - Disable user logging - )]) -AC_MSG_CHECKING([whether to enable user logging]) -case x"$enable_user_logging" in - xyes) # enabled explicity - ;; - xno) # disabled explicity - enable_user_logging=no - ;; - x) # enabled by default - enable_user_logging=yes - ;; - *) AC_MSG_ERROR([unexpected value $enable_user_logging for --{enable,disable}-experimental configure option]) - ;; -esac -if test x"$enable_user_logging" != xyes -then - enable_user_logging=no -else - enable_user_logging=yes # overkill, but convenient - AC_DEFINE(USER_LOGGING, 1, [Defined if user logging is enabled]) -fi -AC_MSG_RESULT([$enable_user_logging]) - -# -# Parse To: Headers to determine username (on misclassification only) -# -AC_ARG_ENABLE(parse-to-headers, - [AS_HELP_STRING(--enable-parse-to-headers, - Parse To: headers on misclassification to identify user - )]) -AC_MSG_CHECKING([whether to enable parse-to-headers]) -case x"$enable_parse_to_headers" in - xyes) # enabled explicity - ;; - xno) # disabled explicity - ;; - x) # disabled by default - enable_parse_to_headers=no - ;; - *) AC_MSG_ERROR([unexpected value $enable_parse_to_headers for --{enable,disable}-experimental configure option]) - ;; -esac -if test x"$enable_parse_to_headers" != xyes -then - enable_parse_to_headers=no -else - enable_parse_to_headers=yes # overkill, but convenient - AC_DEFINE(PARSE_TO, 1, [Defined if parse-to-headers is enabled]) -fi -AC_MSG_RESULT([$enable_parse_to_headers]) - -# -# Broken Return Codes -# For integration with demented MTAs like qmail -# -AC_ARG_ENABLE(broken-return-codes, - [AS_HELP_STRING(--enable-broken-return-codes, - Returns an exitcode of 99 if a message is spam - )]) -AC_MSG_CHECKING([whether to enable broken-return-codes]) -case x"$enable_broken_return_codes" in - xyes) # enabled explicity - ;; - xno) # disabled explicity - ;; - x) # disabled by default - enable_broken_return_codes=no - ;; - *) AC_MSG_ERROR([unexpected value $enable_broken_return_codes for --{enable,disable}-experimental configure option]) - ;; -esac -if test x"$enable_broken_return_codes" != xyes -then - enable_broken_return_codes=no -else - enable_broken_return_codes=yes # overkill, but convenient - AC_DEFINE(BROKEN_RETURN_CODES, 1, [Defined if broken-return-codes is enabled]) -fi -AC_MSG_RESULT([$enable_broken_return_codes]) - -# -# Spam Subject -# -AC_ARG_ENABLE(spam-subject, - [AS_HELP_STRING(--enable-spam-subject, - Prepends [SPAM] to the Subject header of messages - believed to be spam - )]) -AC_MSG_CHECKING([whether to enable spam-subject]) -case x"$enable_spam_subject" in - xyes) # enabled explicity - ;; - xno) # disabled explicity - ;; - x) # disabled by default - enable_spam_subject=no - ;; - *) AC_MSG_ERROR([unexpected value $enable_spam_subject for --{enable,disable}-experimental configure option]) - ;; -esac -if test x"$enable_spam_subject" != xyes -then - enable_spam_subject=no -else - enable_spam_subject=yes # overkill, but convenient - AC_DEFINE(SPAM_SUBJECT, 1, [Defined if spam-subject is enabled]) -fi -AC_MSG_RESULT([$enable_spam_subject]) - - - -# # Experimental Functions # AC_ARG_ENABLE(experimental, - [AS_HELP_STRING(--enable-experimental, + [AC_HELP_STRING([--enable-experimental], + [ Activates DSPAM's experimental functions. - )]) + ])]) AC_MSG_CHECKING([whether to enable experimental functions]) case x"$enable_experimental" in xyes) # enabled explicity @@ -487,10 +332,11 @@ # Data Source Compression # AC_ARG_ENABLE(client-compression, - [AS_HELP_STRING(--enable-client-compression, + [AC_HELP_STRING([--enable-client-compression], + [ Use compression (if available) between data source and DSPAM agent. - )]) + ])]) AC_MSG_CHECKING([whether to enable client-compression]) case x"$enable_client_compression" in xyes) # client-compression output enabled explicity @@ -516,7 +362,8 @@ # Source Address Tracking # AC_ARG_ENABLE(source-address-tracking, - [AS_HELP_STRING(--enable-source-address-tracking,Cause DSPAM to report source addresses to syslog)]) + [AC_HELP_STRING([--enable-source-address-tracking], + [Cause DSPAM to report source addresses to syslog])]) AC_MSG_CHECKING([whether to enable source address tracking]) case x"$enable_source_address_tracking" in xyes) # enabled explicity @@ -545,12 +392,13 @@ # Verbose debug output # AC_ARG_ENABLE(verbose-debug, - [AS_HELP_STRING(--enable-verbose-debug, + [AC_HELP_STRING([--enable-verbose-debug], + [ Cause DSPAM produce verbose debug output and write them into DSPAM_HOME/dspam.debug file. Implies '--enable-debug'. Never enable this for production builds! - )]) + ])]) AC_MSG_CHECKING([whether to enable verbose debug output]) case x"$enable_verbose_debug" in xyes) # debug output enabled explicity @@ -577,11 +425,12 @@ # Long Usernames # AC_ARG_ENABLE(long-usernames, - [AS_HELP_STRING(--enable-long-usernames, + [AC_HELP_STRING([--enable-long-usernames], + [ Cause DSPAM to support long usernames. The default is to use the same length on usernames as the operating system. - )]) + ])]) AC_MSG_CHECKING([whether to enable long usernames]) case x"$enable_long_usernames" in xyes) # debug output enabled explicity @@ -607,13 +456,13 @@ # Traditional bayesian Calculations # AC_ARG_ENABLE(traditional-bayesian, - [AS_HELP_STRING(--disable-traditional-bayesian,Disable traditional Bayesian calculations)]) + [AC_HELP_STRING([--disable-traditional-bayesian], + [Disable traditional Bayesian calculations])]) AC_MSG_CHECKING([whether to enable traditional Bayesian calculations]) case x"$enable_traditional_bayesian" in xyes) # enabled explicity ;; xno) # disabled explicity - enable_traditional_bayesian=no ;; x) # enabled by default enable_traditional_bayesian=yes @@ -637,13 +486,13 @@ # Alternative bayesian Calculations # AC_ARG_ENABLE(alternative-bayesian, - [AS_HELP_STRING(--disable-alternative-bayesian,Disable alternative Bayesian calculations)]) + [AC_HELP_STRING([--disable-alternative-bayesian], + [Disable alternative Bayesian calculations])]) AC_MSG_CHECKING([whether to enable alternative Bayesian calculations]) case x"$enable_alternative_bayesian" in xyes) # enabled explicity ;; xno) # disabled explicity - enable_alternative_bayesian=no ;; x) # disabled by default enable_alternative_bayesian=yes @@ -662,36 +511,11 @@ AC_MSG_RESULT([$enable_alternative_bayesian]) # -# Robinson's Naive Bayesian -# -AC_ARG_ENABLE(robinson, - [AS_HELP_STRING(--enable-robinson,Cause DSPAM to use the Robinson Naive Bayesian calculation)]) -AC_MSG_CHECKING([whether to enable Robinson's naive Bayesian calculations]) -case x"$enable_robinson" in - xyes) # enabled explicity - ;; - xno) # disabled explicity - ;; - x) # disabled by default - enable_robinson=no - ;; - *) AC_MSG_ERROR([unexpected value $enable_robinson for --{enable,disable}-robinson configure option]) - ;; -esac -if test x"$enable_robinson" != xyes -then - enable_robinson=no -else - enable_robinson=yes # overkill, but convenient - AC_DEFINE(ROBINSON, 1, [Defined if Chi-Square calculation is enabled]) -fi -AC_MSG_RESULT([$enable_robinson]) - -# -# Fisher-Robinson's Inverse Chi-Square +# Chi-Square Calculation # AC_ARG_ENABLE(chi-square, - [AS_HELP_STRING(--enable-chi-square,Enable Fisher-Robinson Inverse Chi-Square calculations)]) + [AC_HELP_STRING([--enable-chi-square], + [Cause DSPAM to use the Chi-Square calculation])]) AC_MSG_CHECKING([whether to enable Chi-Square calculations]) case x"$enable_chi_square" in xyes) # enabled explicity @@ -709,58 +533,28 @@ enable_chi_square=no else enable_chi_square=yes # overkill, but convenient - AC_DEFINE(CHI_SQ, 1, - [Defined if Chi-Square calculation is enabled]) + AC_DEFINE(CHI_SQUARE, 1, [Defined if Chi-Square calculation is enabled]) fi AC_MSG_RESULT([$enable_chi_square]) -if test x"$enable_traditional_bayesian$enable_alternative_bayesian$enable_robinson$enable_chi_square" = xnononono +if test x"$enable_traditional_bayesian$enable_alternative_bayesian$enable_chi_square" = xnonono then AC_MSG_ERROR([you must have at least one algorithm enabled]) fi - -# -# Robinson's Technique for Combining P-Values -# -AC_ARG_ENABLE(robinson-pvalues, - [AS_HELP_STRING(--enable-robinson-pvalues,Enable Robinson's technique for combining p-values)]) -AC_MSG_CHECKING([whether to enable Robinson's technique]) -case x"$enable_robinson_pvalues" in - xyes) # enabled explicity - ;; - xno) # disabled explicity - ;; - x) # disabled by default - enable_robinson_pvalues=no - ;; - *) AC_MSG_ERROR([unexpected value $enable_robinson_pvalues for --{enable,disable}-robinson-pvalues configure option]) - ;; -esac -if test x"$enable_robinson_pvalues" != xyes -then - enable_robinson_pvalues=no -else - enable_robinson_pvalues=yes # overkill, but convenient - AC_DEFINE(ROBINSON_FW, 1, - [Defined if Robinson's technique for combining p-values is enabled]) -fi -AC_MSG_RESULT([$enable_robinson_pvalues]) - - # # Test-Conditional Training # (users with > 2500 innocent messages will retrain spams + false positives # until test condition is met - 5 iterations max) # AC_ARG_ENABLE(test-conditional, - [AS_HELP_STRING(--disable-test-conditional,Disables test-conditional (loop) training)]) + [AC_HELP_STRING([--disable-test-conditional], + [Disables test-conditional (loop) training])]) AC_MSG_CHECKING([whether to enable test-conditional training]) case x"$enable_test_conditional" in xyes) # enabled explicity ;; xno) # disabled explicity - enable_test_conditional=no ;; x) # disabled by default enable_test_conditional=yes @@ -781,10 +575,11 @@ # homedir dotfiles # AC_ARG_ENABLE(homedir-dotfiles, - [AS_HELP_STRING(--enable-homedir-dotfiles, + [AC_HELP_STRING([--enable-homedir-dotfiles], + [ Cause DSPAM to check for dotfiles in the user's home directory instead of DSPAM_HOME - )]) + ])]) AC_MSG_CHECKING([whether to enable homedir dotfiles]) case x"$enable_homedir_dotfiles" in xyes) # enabled explicity @@ -812,9 +607,10 @@ # broken-mta # AC_ARG_ENABLE(broken-mta, - [AS_HELP_STRING(--enable-broken-mta, Enable if you have a broken MTA that + [AC_HELP_STRING([--enable-broken-mta], + [ Enable if you have a broken MTA that passes ^M's into DSPAM. - )]) + ])]) AC_MSG_CHECKING([whether to enable broken-mta]) case x"$enable_broken_mta" in xyes) # enabled explicity @@ -840,10 +636,11 @@ # signature-headers # AC_ARG_ENABLE(signature-headers, - [AS_HELP_STRING(--enable-signature-headers, Cause DSPAM to place signatures in + [AC_HELP_STRING([--enable-signature-headers], + [ Cause DSPAM to place signatures in headers and not body (this will require all spams to be bounced into spam addresses) - )]) + ])]) AC_MSG_CHECKING([whether to enable signature-headers]) case x"$enable_signature_headers" in xyes) # enabled explicity @@ -869,10 +666,11 @@ # opt-in # AC_ARG_ENABLE(opt-in, - [AS_HELP_STRING(--enable-opt-in, + [AC_HELP_STRING([--enable-opt-in], + [ Cause DSPAM to run only for users who have a .dspam dotfile - )]) + ])]) AC_MSG_CHECKING([whether to enable opt-in]) case x"$enable_opt_in" in xyes) # enabled explicity @@ -898,11 +696,12 @@ # signature-attachments # AC_ARG_ENABLE(signature-attachments, - [AS_HELP_STRING(--enable-signature-attachments, + [AC_HELP_STRING([--enable-signature-attachments], + [ Cause DSPAM to rewrite messages to include a DSPAM signature attachment (this will eliminate the use of server-side signatures) - )]) + ])]) AC_MSG_CHECKING([whether to enable signature-attachments]) case x"$enable_signature_attachments" in xyes) # enabled explicity @@ -928,16 +727,16 @@ # Innocent Bias # AC_ARG_ENABLE(bias, - [AS_HELP_STRING(--disable-bias, + [AC_HELP_STRING([--disable-bias], + [ Cause DSPAM to calculate without a bias toward innocent mail - )]) + ])]) AC_MSG_CHECKING([whether to enable bias calculations]) case x"$enable_bias" in xyes) # debug output enabled explicity ;; xno) # debug output disabled explicity - enable_bias=no ;; x) # debug output disabled by default enable_bias=yes @@ -958,11 +757,12 @@ # signatures # AC_ARG_ENABLE(signatures, - [AS_HELP_STRING(--enable-webmail, Disables use of signatures on standard processing + [AC_HELP_STRING([--enable-webmail], + [ Disables use of signatures on standard processing ONLY use this if you are storing mail server-side, and are able to feed the PRISTINE copy of the message back in for retraining, such as in a webmail system. - )]) + ])]) AC_MSG_CHECKING([whether to disable signatures]) case x"$enable_webmail" in xyes) # enabled explicity @@ -988,7 +788,8 @@ # Large scale implementation # AC_ARG_ENABLE(large-scale, - [AS_HELP_STRING(--enable-large-scale,Manage file structure for a large scale implementation)]) + [AC_HELP_STRING([--enable-large-scale], + [Manage file structure for a large scale implementation])]) AC_MSG_CHECKING([whether to enable large scale implementation]) case x"$enable_large_scale" in xyes) # large-scale enabled explicitly @@ -1014,7 +815,8 @@ # Domain Scale Filesystem # AC_ARG_ENABLE(domain-scale, - [AS_HELP_STRING(--enable-domain-scale,Manage file structure to support a domain implementation)]) + [AC_HELP_STRING([--enable-domain-scale], + [Manage file structure to support a domain implementation])]) AC_MSG_CHECKING([whether to enable domain structure implementation]) case x"$enable_domain_scale" in xyes) # domain-scale enabled explicitly @@ -1045,10 +847,11 @@ # Signature life # AC_ARG_WITH(signature-life, - [AS_HELP_STRING(--with-signature-life=DAYS, + [AC_HELP_STRING([--with-signature-life=DAYS], + [ Use DAYS as the signature life. Default value is 14 days. - )], + ])], [ SIGNATURE_LIFE="$withval" ], [ SIGNATURE_LIFE=14 ]) @@ -1066,7 +869,8 @@ # storagedrv=libdb4_drv AC_ARG_WITH(storage-driver, - [AS_HELP_STRING(--with-storage-driver=DIR,Specify storage driver. @<:@default: libdb4_drv@:>@)], + [AC_HELP_STRING([--with-storage-driver=DIR], + [Specify storage driver. @<:@default: libdb4_drv@:>@])], [ storagedrv="$withval" ]) AC_MSG_CHECKING([for storage driver]) @@ -1100,6 +904,8 @@ LIBS="$DB_LIBS $LIBS" LDFLAGS="$DB_LDFLAGS $LDFLAGS" + AC_DEFINE([_BDB], 1, [Defined if using BDB storage driver]) + storage_drv_subdirs='tools.libdb4_drv' storage_drv_objects='libdb4_drv.lo' # Please note: because storage # drives is part of libdspam, @@ -1131,6 +937,7 @@ CPPFLAGS="$DB_CPPFLAGS $CPPFLAGS" LIBS="$DB_LIBS $LIBS" LDFLAGS="$DB_LDFLAGS" + AC_DEFINE([_BDB], 1, [Defined if using BDB storage driver]) storage_drv_sources='libdb3_drv.c libdb3_drv.h' storage_drv_subdirs='tools.libdb3_drv' storage_drv_objects='libdb3_drv.lo' # Please note: because storage @@ -1240,8 +1047,6 @@ #---------------------------------------------------------- # final cut # -GCC_BUILD_OPTIONS - AC_CONFIG_HEADERS(auto-config.h) AH_TOP([ #ifndef __auto_config_h @@ -1251,12 +1056,12 @@ #endif /* !__auto_config_h */ ]) -AC_CONFIG_FILES([Makefile tools/Makefile cgi/Makefile m4/Makefile]) +AC_CONFIG_FILES([Makefile tools/Makefile cgi/Makefile cgi/templates/Makefile m4/Makefile]) AC_CONFIG_FILES([tools.libdb4_drv/Makefile tools.libdb3_drv/Makefile]) AC_CONFIG_FILES([tools.mysql_drv/Makefile tools.ora_drv/Makefile]) -AC_CONFIG_FILES([txt/Makefile tools.pgsql_drv/Makefile cgi/templates/Makefile]) -AC_CONFIG_FILES([dspam.pc dspam-uninstalled.pc]) +AC_CONFIG_FILES([txt/Makefile tools.pgsql_drv/Makefile]) +### AC_CONFIG_FILES([doc/Makefile]) AC_OUTPUT - - +m4_pattern_forbid([^DS_]) +m4_pattern_forbid([^BCS_]) Index: decode.c =================================================================== --- decode.c (.../vendor/dspam/3.0.0) (revision 39233) +++ decode.c (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -198,6 +198,9 @@ if (h == NULL) { LOG (LOG_CRIT, ERROR_MEM_ALLOC); + _ds_destroy_message (out); + free (m_in); + nt_destroy (boundaries); return NULL; } @@ -228,6 +231,10 @@ if (!_ds_match_boundary (boundaries, x)) { _ds_push_boundary (boundaries, x); + + if (current_block->boundary != NULL) + free(current_block->boundary); + current_block->boundary = strdup (x); } } else if (x == NULL) { @@ -555,6 +562,10 @@ if (!_ds_match_boundary (boundaries, x)) { _ds_push_boundary (boundaries, x); + + if (block->boundary != NULL) + free(block->boundary); + block->boundary = strdup (x); } } else { @@ -621,7 +632,7 @@ } } - free (block->boundary); + free (block->boundary), block->boundary = NULL; free (block->terminating_boundary); buffer_destroy (block->body); buffer_destroy (block->original_signed_body); @@ -725,7 +736,7 @@ hex[1] = x[2]; if (x[1] == '\n') { - strcpy (x, x + 2); + memmove (x, x + 2, strlen(x + 2) + 1); x = strchr (x, '='); } else @@ -739,7 +750,7 @@ { val = (int) strtol (hex, NULL, 16); x[0] = val; - strcpy (x + 1, x + 3); + memmove(x + 1, x + 3, strlen(x + 3) + 1); } x = strchr (x + 1, '='); } Index: mysql_drv.h =================================================================== --- mysql_drv.h (.../vendor/dspam/3.0.0) (revision 39233) +++ mysql_drv.h (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -35,7 +35,8 @@ struct _mysql_drv_storage { - MYSQL *dbh; /* database connection */ + MYSQL *rd_dbh; /* read database connection */ + MYSQL *wr_dbh; /* read database connection */ struct _ds_spam_totals control_totals; /* totals at storage init */ struct _ds_spam_totals merged_totals; /* totals for merged group */ Index: auto-config.h.in =================================================================== --- auto-config.h.in (.../vendor/dspam/3.0.0) (revision 39233) +++ auto-config.h.in (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -17,11 +17,8 @@ /* Defined if MTA is broken */ #undef BROKEN_MTA -/* Defined if broken-return-codes is enabled */ -#undef BROKEN_RETURN_CODES - /* Defined if Chi-Square calculation is enabled */ -#undef CHI_SQ +#undef CHI_SQUARE /* Defined if client-compression is enabled */ #undef CLIENT_COMPRESSION @@ -50,6 +47,9 @@ /* Define if you have ISO C99 vararg macros */ #undef HAVE_ISO_VARARGS +/* Define to 1 if you have the `mysqlclient' library (-lmysqlclient). */ +#undef HAVE_LIBMYSQLCLIENT + /* Define to 1 if you have the header file. */ #undef HAVE_MATH_H @@ -134,18 +134,9 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* Defined if parse-to-headers is enabled */ -#undef PARSE_TO - /* Path to the program used as quarantine agent */ #undef QLOCAL -/* Defined if Chi-Square calculation is enabled */ -#undef ROBINSON - -/* Defined if Robinson's technique for combining p-values is enabled */ -#undef ROBINSON_FW - /* Defined if signature-attachments is enabled */ #undef SIGNATURE_IN_ATTACHMENTS @@ -158,15 +149,9 @@ /* Defined if source address tracking is enabled */ #undef SOURCE_ADDRESS_TRACKING -/* Defined if spam-subject is enabled */ -#undef SPAM_SUBJECT - /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS -/* Defined if system logging is enabled */ -#undef SYSTEM_LOGGING - /* Defined if test-conditional training is enabled */ #undef TEST_COND_TRAINING @@ -176,9 +161,6 @@ /* Defined if trusted user security are enabled */ #undef TRUSTED_USER_SECURITY -/* Defined if user logging is enabled */ -#undef USER_LOGGING - /* Defined if verbose debug output is enabled */ #undef VERBOSE @@ -191,11 +173,12 @@ /* Defined if webmail is enabled */ #undef WEBMAIL -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus +/* Defined if using BDB storage driver */ +#undef _BDB + +/* Define as `__inline' if that's what the C compiler calls it, or to nothing + if it is not supported. */ #undef inline -#endif #endif /* !__auto_config_h */ Index: .cvsignore =================================================================== --- .cvsignore (.../vendor/dspam/3.0.0) (revision 0) +++ .cvsignore (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -0,0 +1,32 @@ +*.lo +*.o +.deps +.libs +Makefile +Makefile.in +aclocal.m4 +auto-config.h +auto-config.h.in +autom4te.cache +config.log +config.status +configure +dspam +libtool +stamp-h1 +libdspam.la +dspam-*.tar.gz +dspam.prj* +dspam.pws +.tm_project.cache +samples +clean.sh +test +configure-dspam.sh +configure-bdb3.sh +configure-bdb4.sh +configure-mysql.sh +configure-oracle.sh +configure-pgsql.sh +SA-Corpus +clean.sql Index: tree.h =================================================================== --- tree.h (.../vendor/dspam/3.0.0) (revision 0) +++ tree.h (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -0,0 +1,677 @@ +/* $OpenBSD: tree.h,v 1.7 2002/10/17 21:51:54 art Exp $ */ +/* + * Copyright 2002 Niels Provos + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _SYS_TREE_H_ +#define _SYS_TREE_H_ + +/* + * This file defines data structures for different types of trees: + * splay trees and red-black trees. + * + * A splay tree is a self-organizing data structure. Every operation + * on the tree causes a splay to happen. The splay moves the requested + * node to the root of the tree and partly rebalances it. + * + * This has the benefit that request locality causes faster lookups as + * the requested nodes move to the top of the tree. On the other hand, + * every lookup causes memory writes. + * + * The Balance Theorem bounds the total access time for m operations + * and n inserts on an initially empty tree as O((m + n)lg n). The + * amortized cost for a sequence of m accesses to a splay tree is O(lg n); + * + * A red-black tree is a binary search tree with the node color as an + * extra attribute. It fulfills a set of conditions: + * - every search path from the root to a leaf consists of the + * same number of black nodes, + * - each red node (except for the root) has a black parent, + * - each leaf node is black. + * + * Every operation on a red-black tree is bounded as O(lg n). + * The maximum height of a red-black tree is 2lg (n+1). + */ + +#define SPLAY_HEAD(name, type) \ +struct name { \ + struct type *sph_root; /* root of the tree */ \ +} + +#define SPLAY_INITIALIZER(root) \ + { NULL } + +#define SPLAY_INIT(root) do { \ + (root)->sph_root = NULL; \ +} while (0) + +#define SPLAY_ENTRY(type) \ +struct { \ + struct type *spe_left; /* left element */ \ + struct type *spe_right; /* right element */ \ +} + +#define SPLAY_LEFT(elm, field) (elm)->field.spe_left +#define SPLAY_RIGHT(elm, field) (elm)->field.spe_right +#define SPLAY_ROOT(head) (head)->sph_root +#define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL) + +/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */ +#define SPLAY_ROTATE_RIGHT(head, tmp, field) do { \ + SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \ + SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ + (head)->sph_root = tmp; \ +} while (0) + +#define SPLAY_ROTATE_LEFT(head, tmp, field) do { \ + SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \ + SPLAY_LEFT(tmp, field) = (head)->sph_root; \ + (head)->sph_root = tmp; \ +} while (0) + +#define SPLAY_LINKLEFT(head, tmp, field) do { \ + SPLAY_LEFT(tmp, field) = (head)->sph_root; \ + tmp = (head)->sph_root; \ + (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \ +} while (0) + +#define SPLAY_LINKRIGHT(head, tmp, field) do { \ + SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ + tmp = (head)->sph_root; \ + (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \ +} while (0) + +#define SPLAY_ASSEMBLE(head, node, left, right, field) do { \ + SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \ + SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field);\ + SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \ + SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \ +} while (0) + +/* Generates prototypes and inline functions */ + +#define SPLAY_PROTOTYPE(name, type, field, cmp) \ +void name##_SPLAY(struct name *, struct type *); \ +void name##_SPLAY_MINMAX(struct name *, int); \ +struct type *name##_SPLAY_INSERT(struct name *, struct type *); \ +struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \ + \ +/* Finds the node with the same key as elm */ \ +static __inline struct type * \ +name##_SPLAY_FIND(struct name *head, struct type *elm) \ +{ \ + if (SPLAY_EMPTY(head)) \ + return(NULL); \ + name##_SPLAY(head, elm); \ + if ((cmp)(elm, (head)->sph_root) == 0) \ + return (head->sph_root); \ + return (NULL); \ +} \ + \ +static __inline struct type * \ +name##_SPLAY_NEXT(struct name *head, struct type *elm) \ +{ \ + name##_SPLAY(head, elm); \ + if (SPLAY_RIGHT(elm, field) != NULL) { \ + elm = SPLAY_RIGHT(elm, field); \ + while (SPLAY_LEFT(elm, field) != NULL) { \ + elm = SPLAY_LEFT(elm, field); \ + } \ + } else \ + elm = NULL; \ + return (elm); \ +} \ + \ +static __inline struct type * \ +name##_SPLAY_MIN_MAX(struct name *head, int val) \ +{ \ + name##_SPLAY_MINMAX(head, val); \ + return (SPLAY_ROOT(head)); \ +} + +/* Main splay operation. + * Moves node close to the key of elm to top + */ +#define SPLAY_GENERATE(name, type, field, cmp) \ +struct type * \ +name##_SPLAY_INSERT(struct name *head, struct type *elm) \ +{ \ + if (SPLAY_EMPTY(head)) { \ + SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \ + } else { \ + int __comp; \ + name##_SPLAY(head, elm); \ + __comp = (cmp)(elm, (head)->sph_root); \ + if(__comp < 0) { \ + SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field);\ + SPLAY_RIGHT(elm, field) = (head)->sph_root; \ + SPLAY_LEFT((head)->sph_root, field) = NULL; \ + } else if (__comp > 0) { \ + SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field);\ + SPLAY_LEFT(elm, field) = (head)->sph_root; \ + SPLAY_RIGHT((head)->sph_root, field) = NULL; \ + } else \ + return ((head)->sph_root); \ + } \ + (head)->sph_root = (elm); \ + return (NULL); \ +} \ + \ +struct type * \ +name##_SPLAY_REMOVE(struct name *head, struct type *elm) \ +{ \ + struct type *__tmp; \ + if (SPLAY_EMPTY(head)) \ + return (NULL); \ + name##_SPLAY(head, elm); \ + if ((cmp)(elm, (head)->sph_root) == 0) { \ + if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \ + (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);\ + } else { \ + __tmp = SPLAY_RIGHT((head)->sph_root, field); \ + (head)->sph_root = SPLAY_LEFT((head)->sph_root, field);\ + name##_SPLAY(head, elm); \ + SPLAY_RIGHT((head)->sph_root, field) = __tmp; \ + } \ + return (elm); \ + } \ + return (NULL); \ +} \ + \ +void \ +name##_SPLAY(struct name *head, struct type *elm) \ +{ \ + struct type __node, *__left, *__right, *__tmp; \ + int __comp; \ +\ + SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\ + __left = __right = &__node; \ +\ + while ((__comp = (cmp)(elm, (head)->sph_root))) { \ + if (__comp < 0) { \ + __tmp = SPLAY_LEFT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if ((cmp)(elm, __tmp) < 0){ \ + SPLAY_ROTATE_RIGHT(head, __tmp, field); \ + if (SPLAY_LEFT((head)->sph_root, field) == NULL)\ + break; \ + } \ + SPLAY_LINKLEFT(head, __right, field); \ + } else if (__comp > 0) { \ + __tmp = SPLAY_RIGHT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if ((cmp)(elm, __tmp) > 0){ \ + SPLAY_ROTATE_LEFT(head, __tmp, field); \ + if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\ + break; \ + } \ + SPLAY_LINKRIGHT(head, __left, field); \ + } \ + } \ + SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ +} \ + \ +/* Splay with either the minimum or the maximum element \ + * Used to find minimum or maximum element in tree. \ + */ \ +void name##_SPLAY_MINMAX(struct name *head, int __comp) \ +{ \ + struct type __node, *__left, *__right, *__tmp; \ +\ + SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\ + __left = __right = &__node; \ +\ + while (1) { \ + if (__comp < 0) { \ + __tmp = SPLAY_LEFT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if (__comp < 0){ \ + SPLAY_ROTATE_RIGHT(head, __tmp, field); \ + if (SPLAY_LEFT((head)->sph_root, field) == NULL)\ + break; \ + } \ + SPLAY_LINKLEFT(head, __right, field); \ + } else if (__comp > 0) { \ + __tmp = SPLAY_RIGHT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if (__comp > 0) { \ + SPLAY_ROTATE_LEFT(head, __tmp, field); \ + if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\ + break; \ + } \ + SPLAY_LINKRIGHT(head, __left, field); \ + } \ + } \ + SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ +} + +#define SPLAY_NEGINF -1 +#define SPLAY_INF 1 + +#define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y) +#define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y) +#define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y) +#define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y) +#define SPLAY_MIN(name, x) (SPLAY_EMPTY(x) ? NULL \ + : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF)) +#define SPLAY_MAX(name, x) (SPLAY_EMPTY(x) ? NULL \ + : name##_SPLAY_MIN_MAX(x, SPLAY_INF)) + +#define SPLAY_FOREACH(x, name, head) \ + for ((x) = SPLAY_MIN(name, head); \ + (x) != NULL; \ + (x) = SPLAY_NEXT(name, head, x)) + +/* Macros that define a red-back tree */ +#define RB_HEAD(name, type) \ +struct name { \ + struct type *rbh_root; /* root of the tree */ \ +} + +#define RB_INITIALIZER(root) \ + { NULL } + +#define RB_INIT(root) do { \ + (root)->rbh_root = NULL; \ +} while (0) + +#define RB_BLACK 0 +#define RB_RED 1 +#define RB_ENTRY(type) \ +struct { \ + struct type *rbe_left; /* left element */ \ + struct type *rbe_right; /* right element */ \ + struct type *rbe_parent; /* parent element */ \ + int rbe_color; /* node color */ \ +} + +#define RB_LEFT(elm, field) (elm)->field.rbe_left +#define RB_RIGHT(elm, field) (elm)->field.rbe_right +#define RB_PARENT(elm, field) (elm)->field.rbe_parent +#define RB_COLOR(elm, field) (elm)->field.rbe_color +#define RB_ROOT(head) (head)->rbh_root +#define RB_EMPTY(head) (RB_ROOT(head) == NULL) + +#define RB_SET(elm, parent, field) do { \ + RB_PARENT(elm, field) = parent; \ + RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \ + RB_COLOR(elm, field) = RB_RED; \ +} while (0) + +#define RB_SET_BLACKRED(black, red, field) do { \ + RB_COLOR(black, field) = RB_BLACK; \ + RB_COLOR(red, field) = RB_RED; \ +} while (0) + +#ifndef RB_AUGMENT +#define RB_AUGMENT(x) +#endif + +#define RB_ROTATE_LEFT(head, elm, tmp, field) do { \ + (tmp) = RB_RIGHT(elm, field); \ + if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field))) { \ + RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \ + } \ + RB_AUGMENT(elm); \ + if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field))) { \ + if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ + RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ + else \ + RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ + } else \ + (head)->rbh_root = (tmp); \ + RB_LEFT(tmp, field) = (elm); \ + RB_PARENT(elm, field) = (tmp); \ + RB_AUGMENT(tmp); \ + if ((RB_PARENT(tmp, field))) \ + RB_AUGMENT(RB_PARENT(tmp, field)); \ +} while (0) + +#define RB_ROTATE_RIGHT(head, elm, tmp, field) do { \ + (tmp) = RB_LEFT(elm, field); \ + if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field))) { \ + RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \ + } \ + RB_AUGMENT(elm); \ + if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field))) { \ + if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ + RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ + else \ + RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ + } else \ + (head)->rbh_root = (tmp); \ + RB_RIGHT(tmp, field) = (elm); \ + RB_PARENT(elm, field) = (tmp); \ + RB_AUGMENT(tmp); \ + if ((RB_PARENT(tmp, field))) \ + RB_AUGMENT(RB_PARENT(tmp, field)); \ +} while (0) + +/* Generates prototypes and inline functions */ +#define RB_PROTOTYPE(name, type, field, cmp) \ +void name##_RB_INSERT_COLOR(struct name *, struct type *); \ +void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\ +struct type *name##_RB_REMOVE(struct name *, struct type *); \ +struct type *name##_RB_INSERT(struct name *, struct type *); \ +struct type *name##_RB_FIND(struct name *, struct type *); \ +struct type *name##_RB_NEXT(struct name *, struct type *); \ +struct type *name##_RB_MINMAX(struct name *, int); \ + \ + +/* Main rb operation. + * Moves node close to the key of elm to top + */ +#define RB_GENERATE(name, type, field, cmp) \ +void \ +name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \ +{ \ + struct type *parent, *gparent, *tmp; \ + while ((parent = RB_PARENT(elm, field)) && \ + RB_COLOR(parent, field) == RB_RED) { \ + gparent = RB_PARENT(parent, field); \ + if (parent == RB_LEFT(gparent, field)) { \ + tmp = RB_RIGHT(gparent, field); \ + if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ + RB_COLOR(tmp, field) = RB_BLACK; \ + RB_SET_BLACKRED(parent, gparent, field);\ + elm = gparent; \ + continue; \ + } \ + if (RB_RIGHT(parent, field) == elm) { \ + RB_ROTATE_LEFT(head, parent, tmp, field);\ + tmp = parent; \ + parent = elm; \ + elm = tmp; \ + } \ + RB_SET_BLACKRED(parent, gparent, field); \ + RB_ROTATE_RIGHT(head, gparent, tmp, field); \ + } else { \ + tmp = RB_LEFT(gparent, field); \ + if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ + RB_COLOR(tmp, field) = RB_BLACK; \ + RB_SET_BLACKRED(parent, gparent, field);\ + elm = gparent; \ + continue; \ + } \ + if (RB_LEFT(parent, field) == elm) { \ + RB_ROTATE_RIGHT(head, parent, tmp, field);\ + tmp = parent; \ + parent = elm; \ + elm = tmp; \ + } \ + RB_SET_BLACKRED(parent, gparent, field); \ + RB_ROTATE_LEFT(head, gparent, tmp, field); \ + } \ + } \ + RB_COLOR(head->rbh_root, field) = RB_BLACK; \ +} \ + \ +void \ +name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, struct type *elm) \ +{ \ + struct type *tmp; \ + while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) && \ + elm != RB_ROOT(head)) { \ + if (RB_LEFT(parent, field) == elm) { \ + tmp = RB_RIGHT(parent, field); \ + if (RB_COLOR(tmp, field) == RB_RED) { \ + RB_SET_BLACKRED(tmp, parent, field); \ + RB_ROTATE_LEFT(head, parent, tmp, field);\ + tmp = RB_RIGHT(parent, field); \ + } \ + if ((RB_LEFT(tmp, field) == NULL || \ + RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\ + (RB_RIGHT(tmp, field) == NULL || \ + RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\ + RB_COLOR(tmp, field) = RB_RED; \ + elm = parent; \ + parent = RB_PARENT(elm, field); \ + } else { \ + if (RB_RIGHT(tmp, field) == NULL || \ + RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) {\ + struct type *oleft; \ + if ((oleft = RB_LEFT(tmp, field)))\ + RB_COLOR(oleft, field) = RB_BLACK;\ + RB_COLOR(tmp, field) = RB_RED; \ + RB_ROTATE_RIGHT(head, tmp, oleft, field);\ + tmp = RB_RIGHT(parent, field); \ + } \ + RB_COLOR(tmp, field) = RB_COLOR(parent, field);\ + RB_COLOR(parent, field) = RB_BLACK; \ + if (RB_RIGHT(tmp, field)) \ + RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK;\ + RB_ROTATE_LEFT(head, parent, tmp, field);\ + elm = RB_ROOT(head); \ + break; \ + } \ + } else { \ + tmp = RB_LEFT(parent, field); \ + if (RB_COLOR(tmp, field) == RB_RED) { \ + RB_SET_BLACKRED(tmp, parent, field); \ + RB_ROTATE_RIGHT(head, parent, tmp, field);\ + tmp = RB_LEFT(parent, field); \ + } \ + if ((RB_LEFT(tmp, field) == NULL || \ + RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\ + (RB_RIGHT(tmp, field) == NULL || \ + RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\ + RB_COLOR(tmp, field) = RB_RED; \ + elm = parent; \ + parent = RB_PARENT(elm, field); \ + } else { \ + if (RB_LEFT(tmp, field) == NULL || \ + RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) {\ + struct type *oright; \ + if ((oright = RB_RIGHT(tmp, field)))\ + RB_COLOR(oright, field) = RB_BLACK;\ + RB_COLOR(tmp, field) = RB_RED; \ + RB_ROTATE_LEFT(head, tmp, oright, field);\ + tmp = RB_LEFT(parent, field); \ + } \ + RB_COLOR(tmp, field) = RB_COLOR(parent, field);\ + RB_COLOR(parent, field) = RB_BLACK; \ + if (RB_LEFT(tmp, field)) \ + RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK;\ + RB_ROTATE_RIGHT(head, parent, tmp, field);\ + elm = RB_ROOT(head); \ + break; \ + } \ + } \ + } \ + if (elm) \ + RB_COLOR(elm, field) = RB_BLACK; \ +} \ + \ +struct type * \ +name##_RB_REMOVE(struct name *head, struct type *elm) \ +{ \ + struct type *child, *parent, *old = elm; \ + int color; \ + if (RB_LEFT(elm, field) == NULL) \ + child = RB_RIGHT(elm, field); \ + else if (RB_RIGHT(elm, field) == NULL) \ + child = RB_LEFT(elm, field); \ + else { \ + struct type *left; \ + elm = RB_RIGHT(elm, field); \ + while ((left = RB_LEFT(elm, field))) \ + elm = left; \ + child = RB_RIGHT(elm, field); \ + parent = RB_PARENT(elm, field); \ + color = RB_COLOR(elm, field); \ + if (child) \ + RB_PARENT(child, field) = parent; \ + if (parent) { \ + if (RB_LEFT(parent, field) == elm) \ + RB_LEFT(parent, field) = child; \ + else \ + RB_RIGHT(parent, field) = child; \ + RB_AUGMENT(parent); \ + } else \ + RB_ROOT(head) = child; \ + if (RB_PARENT(elm, field) == old) \ + parent = elm; \ + (elm)->field = (old)->field; \ + if (RB_PARENT(old, field)) { \ + if (RB_LEFT(RB_PARENT(old, field), field) == old)\ + RB_LEFT(RB_PARENT(old, field), field) = elm;\ + else \ + RB_RIGHT(RB_PARENT(old, field), field) = elm;\ + RB_AUGMENT(RB_PARENT(old, field)); \ + } else \ + RB_ROOT(head) = elm; \ + RB_PARENT(RB_LEFT(old, field), field) = elm; \ + if (RB_RIGHT(old, field)) \ + RB_PARENT(RB_RIGHT(old, field), field) = elm; \ + if (parent) { \ + left = parent; \ + do { \ + RB_AUGMENT(left); \ + } while ((left = RB_PARENT(left, field))); \ + } \ + goto color; \ + } \ + parent = RB_PARENT(elm, field); \ + color = RB_COLOR(elm, field); \ + if (child) \ + RB_PARENT(child, field) = parent; \ + if (parent) { \ + if (RB_LEFT(parent, field) == elm) \ + RB_LEFT(parent, field) = child; \ + else \ + RB_RIGHT(parent, field) = child; \ + RB_AUGMENT(parent); \ + } else \ + RB_ROOT(head) = child; \ +color: \ + if (color == RB_BLACK) \ + name##_RB_REMOVE_COLOR(head, parent, child); \ + return (old); \ +} \ + \ +/* Inserts a node into the RB tree */ \ +struct type * \ +name##_RB_INSERT(struct name *head, struct type *elm) \ +{ \ + struct type *tmp; \ + struct type *parent = NULL; \ + int comp = 0; \ + tmp = RB_ROOT(head); \ + while (tmp) { \ + parent = tmp; \ + comp = (cmp)(elm, parent); \ + if (comp < 0) \ + tmp = RB_LEFT(tmp, field); \ + else if (comp > 0) \ + tmp = RB_RIGHT(tmp, field); \ + else \ + return (tmp); \ + } \ + RB_SET(elm, parent, field); \ + if (parent != NULL) { \ + if (comp < 0) \ + RB_LEFT(parent, field) = elm; \ + else \ + RB_RIGHT(parent, field) = elm; \ + RB_AUGMENT(parent); \ + } else \ + RB_ROOT(head) = elm; \ + name##_RB_INSERT_COLOR(head, elm); \ + return (NULL); \ +} \ + \ +/* Finds the node with the same key as elm */ \ +struct type * \ +name##_RB_FIND(struct name *head, struct type *elm) \ +{ \ + struct type *tmp = RB_ROOT(head); \ + int comp; \ + while (tmp) { \ + comp = cmp(elm, tmp); \ + if (comp < 0) \ + tmp = RB_LEFT(tmp, field); \ + else if (comp > 0) \ + tmp = RB_RIGHT(tmp, field); \ + else \ + return (tmp); \ + } \ + return (NULL); \ +} \ + \ +struct type * \ +name##_RB_NEXT(struct name *head, struct type *elm) \ +{ \ + if (RB_RIGHT(elm, field)) { \ + elm = RB_RIGHT(elm, field); \ + while (RB_LEFT(elm, field)) \ + elm = RB_LEFT(elm, field); \ + } else { \ + if (RB_PARENT(elm, field) && \ + (elm == RB_LEFT(RB_PARENT(elm, field), field))) \ + elm = RB_PARENT(elm, field); \ + else { \ + while (RB_PARENT(elm, field) && \ + (elm == RB_RIGHT(RB_PARENT(elm, field), field)))\ + elm = RB_PARENT(elm, field); \ + elm = RB_PARENT(elm, field); \ + } \ + } \ + return (elm); \ +} \ + \ +struct type * \ +name##_RB_MINMAX(struct name *head, int val) \ +{ \ + struct type *tmp = RB_ROOT(head); \ + struct type *parent = NULL; \ + while (tmp) { \ + parent = tmp; \ + if (val < 0) \ + tmp = RB_LEFT(tmp, field); \ + else \ + tmp = RB_RIGHT(tmp, field); \ + } \ + return (parent); \ +} + +#define RB_NEGINF -1 +#define RB_INF 1 + +#define RB_INSERT(name, x, y) name##_RB_INSERT(x, y) +#define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y) +#define RB_FIND(name, x, y) name##_RB_FIND(x, y) +#define RB_NEXT(name, x, y) name##_RB_NEXT(x, y) +#define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF) +#define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF) + +#define RB_FOREACH(x, name, head) \ + for ((x) = RB_MIN(name, head); \ + (x) != NULL; \ + (x) = name##_RB_NEXT(head, x)) + +#endif /* _SYS_TREE_H_ */ Index: readfile.c =================================================================== --- readfile.c (.../vendor/dspam/3.0.0) (revision 0) +++ readfile.c (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -0,0 +1,382 @@ +/* ========================================================================== + * readfile.c - File slurper w/ guaranteed NUL termination. + * -------------------------------------------------------------------------- + * Copyright (C) 2004 Barracuda Networks + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * -------------------------------------------------------------------------- + * Notes: + * The trick w/ NUL termination (or file extension in the general case) + * and mmap(2) is to only extend the file _before_ mapping, and + * truncate to the original size only after unmapping the file. + * Otherwise, you end up in undefined behavior land. There is no safe + * way to read or write past the mapped length (though sometimes it + * might seem to work if their is some excess space in the last VM + * page; but you cannot depend on it under any circumstances), and + * mmap(2) will only map to the minimum of the specified length and the + * length of the file. Also, if the length of the file shrinks either + * before or after the mmap(2) call then you are also in big trouble. + * + * Therefore, this [mmap] implementation is only useful if you can + * guarantee that the file will not be modified--at least the file + * size--between readfile() and dropfile() (unless you want to catch + * and handle SIGBUS appropriately). That said, mmap(2) might turn out + * to be extremely useful when multiple applications are operating on + * the same file, because they will all basically be sharing the same + * VM pages and reading in the file will carry almost no penalty. (Not + * that read(2) is poor either, given the VFS buffer cache, but then + * you're copying everything into and out of kernel space, which on + * largish files might incur a non-negligable cost). + * + * Otherwise, just tweak this to always use the read(2) version. In + * fact, it might be a good idea to disable mmap(2) in an application + * until one is sure mmap(2) will be beneficial. + * + * ========================================================================== + */ +#define _GNU_SOURCE /* Circumvent crazy/broken glibc pedantism */ + +#include /* malloc(3) */ + +#include /* ftruncate(2) */ + +#include /* fstat(2) ftruncate(2) */ +#include /* fstat(2) */ +#include /* PROT_READ PROT_WRITE PROT_SHARED mmap(2) */ +#include /* LIST */ + +#include /* open(2) */ + +#include /* SSIZE_MAX PIPE_BUF */ + +#include + +#include "readfile.h" + + +#ifndef USE_MMAP +#define USE_MMAP 0 +#endif + +#define MMAP_THRESHOLD 1 +/* Threshold (in bytes) at which mmap(2) is more efficient than read(2) */ + + +#ifndef MIN +#define MIN(a,b) (((a) < (b)) ? (a) : (b)) +#endif + + +struct alloc { + int fd; + char *addr; + int mmap; + int extended; + size_t length; + LIST_ENTRY(alloc) le; +}; + +static LIST_HEAD(,alloc) alloc_lh; + + +static ssize_t readfile__mmap(char **addr, int fd, const struct stat *st, struct alloc *a) { + char ch; + + if (!S_ISREG(st->st_mode)) + return -1; + + a->length = st->st_size; + + if (-1 == lseek(fd,a->length-1,SEEK_SET)) + goto fail; + + if (1 != read(fd,&ch,1)) + goto fail; + + if (ch != '\0') { + if (0 != ftruncate(fd,a->length + 1)) + goto fail; + + a->length++; + + #if 0 /* Enable if we start using MAP_SHARED below */ + if (-1 == lseek(fd,a->length - 1,SEEK_SET)) + goto fail; + + if (1 != write(fd,"\0",1)) + goto fail; + /* Do a test write of the NUL character here (before the + * failsafe, below), otherwise if the disk is full or some + * other write error might occur when the mapped region is + * sync'd the application could get a SIGBUS. + */ + #endif + + a->extended = 1; + } else + a->extended = 0; + + *addr = mmap(0,a->length,PROT_READ|PROT_WRITE,MAP_PRIVATE,fd,0); + + if (*addr == MAP_FAILED) { + *addr = NULL; + goto fail; + } + + if ((*addr)[a->length-1] != '\0') + (*addr)[a->length-1] = '\0'; + /* Make sure we're NUL terminated, regardless. (failsafe) */ + + (void)madvise(*addr,a->length,MADV_SEQUENTIAL); + + return MIN(SSIZE_MAX,a->length - 1); +fail: + (void)lseek(fd,0,SEEK_SET); + + return -1; +} /* readfile__mmap() */ + + +/* + * Slightly faster than readfile__anon() since it can call malloc(3) once. + */ +static ssize_t readfile__file(char **addr, int fd, const struct stat *st) { + char *pos; + ssize_t left; + ssize_t len; + + if (!S_ISREG(st->st_mode)) + return -1; + + *addr = malloc(st->st_size + 1); + + if (!*addr) + return -1; + + pos = *addr; + left = st->st_size; + +read: + len = read(fd,pos,left); + + if (len == -1) { + switch (errno) { + case EINTR: + goto read; + default: + free(*addr); + return -1; + } + } + + pos += len; + left -= len; + + if (len > 0 && left > 0) + goto read; + + *pos = '\0'; + + return MIN(SSIZE_MAX,st->st_size - left); +} /* readfile__file() */ + + +/* + * Failsafe reader. Can read from any descriptor to EOF. + */ +static ssize_t readfile__anon(char **addr, int fd) { + char *end, *pos; + char *p; + size_t addrsz = 0; + ssize_t len; + + *addr = NULL; + +read_chunk: + p = realloc(*addr,addrsz + PIPE_BUF + 1); + + if (!p) { + free(*addr); + return -1; + } + + *addr = p; + + pos = *addr + addrsz; + end = pos + PIPE_BUF; + + addrsz += PIPE_BUF; + + goto restart; + + for (; pos < end && len; pos += len) { +restart: + len = read(fd,pos,end-pos); + + if (len == -1) { + switch (errno) { + case EINTR: + goto restart; + default: + free(*addr); + return -1; + } + } + } + + if (len) + goto read_chunk; + + *pos = '\0'; + /* Relax, we snuck in an extra byte with realloc(3). */ + + return MIN(SSIZE_MAX,addrsz - (end - pos)); +} /* readfile__anon() */ + + +static void dropfile__anon(struct alloc *a) { + free(a->addr); +} /* dropfile_read() */ + + +static void dropfile__mmap(struct alloc *a) { + (void)munmap(a->addr,a->length); + + if (a->extended) + (void)ftruncate(a->fd,a->length - 1); +} /* dropfile__mmap() */ + + +ssize_t readfile(char **buf, const char *path) { + int fd = -1; + struct stat st; + struct alloc *a = NULL; + ssize_t len; + int errno_; + + *buf = NULL; + + fd = open(path,O_RDWR); /* for __mmap */ + + if (fd == -1) + goto fail; + + if (0 != fstat(fd,&st)) + goto fail; + + a = malloc(sizeof *a); + + if (!a) + goto fail; + + if (st.st_size > MMAP_THRESHOLD && USE_MMAP) { + len = readfile__mmap(buf,fd,&st,a); + + a->fd = fd; + a->addr = *buf; + a->mmap = 1; + + if (len != -1) + goto finish; + } + + (void)close(fd); + + fd = open(path,O_RDONLY); /* lest we deadlock on pipes */ + + if (fd == -1) + goto fail; + + len = readfile__file(buf,fd,&st); + + if (len == -1) + len = readfile__anon(buf,fd); + + a->fd = fd; + a->addr = *buf; + a->mmap = 0; + + if (len == -1) + goto fail; + +finish: + LIST_INSERT_HEAD(&alloc_lh,a,le); + + return len; +fail: + errno_ = errno; + + if (fd != -1) + (void)close(fd); + + free(a); + + errno = errno_; + + return -1; +} /* readfile() */ + + +void dropfile(char *buf) { + struct alloc *a; + + for (a = alloc_lh.lh_first; a; a = a->le.le_next) { + if (a->addr == buf) { + if (a->mmap) + dropfile__mmap(a); + else + dropfile__anon(a); + + LIST_REMOVE(a,le); + + (void)close(a->fd); + + free(a); + + return; + } + } +} /* dropfile() */ + + +#if 0 + +#include +#include +#include + +int main(int argc, char *argv[]) { + int i = 1; + char *buf, *path; + + if (0 == strcmp(argv[1],"bench")) { + i = atoi(argv[2]); + path = argv[3]; + } else + path = argv[1]; + + for (; i; i--) { + if (-1 == readfile(&buf,path)) + err(EXIT_FAILURE,"failed"); + + (void)printf("%s",buf); + + dropfile(buf); + } + + return 0; +} + +#endif Index: readfile.h =================================================================== --- readfile.h (.../vendor/dspam/3.0.0) (revision 0) +++ readfile.h (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -0,0 +1,23 @@ +/* ========================================================================== + * readfile.h - File slurper w/ guaranteed NUL termination. + * -------------------------------------------------------------------------- + * + * Notes: + * + * ========================================================================== + */ + +ssize_t readfile(char **buf, const char *path); +/* + * Slurp file into process address space. + * + * buf Store the beginning of the file data at *buf. + * path Path to the file to slurp. + */ + +void dropfile(char *buf); +/* + * Free any resources associated with the address returned from readfile(). + * + * buf Address as returned from readfile(). + */ Index: tools.mysql_drv/Makefile.in =================================================================== --- tools.mysql_drv/Makefile.in (.../vendor/dspam/3.0.0) (revision 39233) +++ tools.mysql_drv/Makefile.in (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.7.4 from Makefile.am. +# Makefile.in generated by automake 1.7.6 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 @@ -214,7 +214,6 @@ all-am: Makefile installdirs: - install: install-am install-exec: install-exec-am install-data: install-data-am Index: tools.mysql_drv/mysql_objects.sql.space.optimized =================================================================== --- tools.mysql_drv/mysql_objects.sql.space.optimized (.../vendor/dspam/3.0.0) (revision 39233) +++ tools.mysql_drv/mysql_objects.sql.space.optimized (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -4,7 +4,7 @@ spam_hits int, innocent_hits int, last_hit date -) type=MyISAM; +) type=MyISAM DELAY_KEY_WRITE=1; create unique index id_token_data_01 on dspam_token_data(uid,token); create index id_token_data_02 on dspam_token_data(innocent_hits); @@ -15,7 +15,7 @@ data blob, length smallint, created_on date -) type=MyISAM; +) type=MyISAM DELAY_KEY_WRITE=1; create unique index id_signature_data_01 on dspam_signature_data(uid,signature); @@ -29,14 +29,14 @@ innocent_corpusfed int, spam_classified int, innocent_classified int -) type=MyISAM; +) type=MyISAM DELAY_KEY_WRITE=1; create table dspam_neural_data ( uid smallint unsigned, node smallint unsigned, total_correct int, total_incorrect int -) type=MyISAM; +) type=MyISAM DELAY_KEY_WRITE=1; create index id_neural_data_01 on dspam_neural_data(uid); create unique index id_neural_data_02 on dspam_neural_data(uid,node); @@ -47,7 +47,7 @@ data blob, length smallint, created_on date -) type=MyISAM; +) type=MyISAM DELAY_KEY_WRITE=1; create unique index id_neural_decisions_01 on dspam_neural_decisions(uid, signature); Index: tools.mysql_drv/.cvsignore =================================================================== --- tools.mysql_drv/.cvsignore (.../vendor/dspam/3.0.0) (revision 0) +++ tools.mysql_drv/.cvsignore (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -0,0 +1,5 @@ +.deps +.libs +Makefile +Makefile.in +*_purge Index: tools.mysql_drv/mysql_objects.sql.speed.optimized =================================================================== --- tools.mysql_drv/mysql_objects.sql.speed.optimized (.../vendor/dspam/3.0.0) (revision 39233) +++ tools.mysql_drv/mysql_objects.sql.speed.optimized (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -4,7 +4,7 @@ spam_hits int, innocent_hits int, last_hit date -) type=MyISAM; +) type=MyISAM DELAY_KEY_WRITE=1; create unique index id_token_data_01 on dspam_token_data(uid,token); create index id_token_data_02 on dspam_token_data(innocent_hits); @@ -15,7 +15,7 @@ data blob, length smallint, created_on date -) type=MyISAM; +) type=MyISAM DELAY_KEY_WRITE=1; create unique index id_signature_data_01 on dspam_signature_data(uid,signature); @@ -29,14 +29,14 @@ innocent_corpusfed int, spam_classified int, innocent_classified int -) type=MyISAM; +) type=MyISAM DELAY_KEY_WRITE=1; create table dspam_neural_data ( uid smallint unsigned, node smallint unsigned, total_correct int, total_incorrect int -) type=MyISAM; +) type=MyISAM DELAY_KEY_WRITE=1; create index id_neural_data_01 on dspam_neural_data(uid); create unique index id_neural_data_02 on dspam_neural_data(uid,node); @@ -47,7 +47,7 @@ data blob, length smallint, created_on date -) type=MyISAM; +) type=MyISAM DELAY_KEY_WRITE=1; create unique index id_neural_decisions_01 on dspam_neural_decisions(uid, signature); Index: m4/mysql_drv.m4 =================================================================== --- m4/mysql_drv.m4 (.../vendor/dspam/3.0.0) (revision 39233) +++ m4/mysql_drv.m4 (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -60,9 +60,45 @@ [AC_HELP_STRING([--with-mysql-includes=DIR], [Where to find Mysql headers])]) AC_MSG_CHECKING([where to find MySQL headers]) + if test x"$with_mysql_includes" = x then AC_MSG_RESULT([compiler default paths]) + + AC_CHECK_HEADER([mysql.h], + [], + [ mysql_headers_success=no ]) + + if test x"$mysql_headers_success" = xno + then + for mysql_include_path in /usr/include/mysql /usr/local/include /usr/local/include/mysql + do + AC_MSG_CHECKING([where to find MySQL headers]) + AC_MSG_RESULT([$mysql_include_path]) + + mysql_save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="-I$mysql_include_path $CPPFLAGS" + + unset ac_cv_header_mysql_h + + AC_CHECK_HEADER([mysql.h], + [ mysql_headers_success=yes ], + [ mysql_headers_success=no ]) + + if test x"$mysql_headers_success" = xno + then + CPPFLAGS=$mysql_save_CPPFLAGS + else + mysql_headers_CPPFLAGS="-I$mysql_include_path" + break + fi + done + + if test x"$mysql_headers_success" = xno + then + AC_MSG_ERROR([could not find mysql headers]) + fi + fi else AC_MSG_RESULT([$with_mysql_includes]) if test -d "$with_mysql_includes" @@ -73,10 +109,12 @@ fi mysql_headers_CPPFLAGS="-I$with_mysql_includes" CPPFLAGS="$mysql_headers_CPPFLAGS $CPPFLAGS" -fi + AC_CHECK_HEADER([mysql.h], [], [ mysql_headers_success=no ]) +fi + if test x"$mysql_headers_success" = xyes then AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ @@ -121,43 +159,63 @@ AC_ARG_WITH(mysql-libraries, [AC_HELP_STRING([--with-mysql-libraries=DIR], [Where to find MySQL])]) +DS_NETLIBS([mysql_libs_netlibs], + [mysql_libs_success=yes], + [mysql_libs_success=no]) + AC_MSG_CHECKING([where to find MySQL libraries]) + if test x"$with_mysql_libraries" = x then - AC_MSG_RESULT([compiler default paths]) -else - AC_MSG_RESULT([$with_mysql_libraries]) - if test -d "$with_mysql_libraries" + AC_MSG_RESULT([-lmysqlclient in compiler default paths]) + + mysql_libs_LIBS="-lmysqlclient $mysql_libs_netlibs -lm -lz" + LIBS="$mysql_libs_LIBS $mysql_libs_save_LIBS" + LDFLAGS="$mysql_libs_LDFLAGS $mysql_libs_save_LDFLAGS" + + AC_CHECK_LIB(mysqlclient,mysql_init,[mysql_libs_success=yes],[mysql_libs_success=no]) + + if test x"$mysql_libs_success" = xno then - : - else - AC_MSG_ERROR([required path for mysql libraries ($with_mysql_libraries) is not a directory]) - fi - mysql_libs_LDFLAGS="-L$with_mysql_libraries" -fi + for mysql_include_path in /usr/lib/mysql /usr/local/lib /usr/local/lib/mysql + do + + AC_MSG_CHECKING([where to find MySQL libraries]) + AC_MSG_RESULT([-lmysqlclient in $mysql_include_path]) + + mysql_libs_LIBS="-lmysqlclient $mysql_libs_netlibs -lm -lz" + LIBS="$mysql_libs_LIBS $mysql_libs_save_LIBS" + LDFLAGS="-L$mysql_include_path $mysql_libs_LDFLAGS $mysql_libs_save_LDFLAGS" + + unset ac_cv_lib_mysqlclient_mysql_init + + AC_CHECK_LIB(mysqlclient,mysql_init,[mysql_libs_success=yes],[mysql_libs_success=no]) -DS_NETLIBS([mysql_libs_netlibs], - [mysql_libs_success=yes], - [mysql_libs_success=no]) if test x"$mysql_libs_success" = xyes then - AC_MSG_CHECKING([for mysql_init in -lmysqlclient]) + mysql_libs_LDFLAGS="-L$mysql_include_path" + break + fi + done + + if test x"$mysql_libs_success" = xno + then + AC_MSG_ERROR([Unable to link to mysql library]) + fi + + fi +else + AC_MSG_RESULT([-lmysqlclient in $with_mysql_libraries]) + mysql_libs_LIBS="-lmysqlclient $mysql_libs_netlibs -lm -lz" LIBS="$mysql_libs_LIBS $mysql_libs_save_LIBS" - LDFLAGS="$mysql_libs_LDFLAGS $mysql_libs_save_LDFLAGS" + LDFLAGS="-L$with_mysql_libraries $mysql_libs_LDFLAGS $mysql_libs_save_LDFLAGS" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - ]], - [[ - MYSQL *mysql = mysql_init(NULL); - ]])], - [ mysql_libs_success=yes ], - [ mysql_libs_success=no ] - ) - AC_MSG_RESULT([$mysql_libs_success]) + AC_CHECK_LIB(mysqlclient,mysql_init,,AC_MSG_ERROR([Unable to link to mysql library])) + + mysql_libs_LDFLAGS="-L$with_mysql_libraries" fi + LIBS="$mysql_libs_save_LIBS" LDFLAGS="$mysql_libs_save_LDFLAGS" if test x"$mysql_libs_success" = xyes Index: m4/Makefile.in =================================================================== --- m4/Makefile.in (.../vendor/dspam/3.0.0) (revision 39233) +++ m4/Makefile.in (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.7.4 from Makefile.am. +# Makefile.in generated by automake 1.7.6 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 @@ -224,7 +224,6 @@ all-am: Makefile installdirs: - install: install-am install-exec: install-exec-am install-data: install-data-am Index: m4/ora_drv.m4 =================================================================== --- m4/ora_drv.m4 (.../vendor/dspam/3.0.0) (revision 39233) +++ m4/ora_drv.m4 (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -77,7 +77,7 @@ CPPFLAGS="$ora_headers_CPPFLAGS $CPPFLAGS" ora_headers_CFLAGS="-I$with_oracle_home/rdbms/demo -I$with_oracle-home/rdbms/public" CFLAGS="$ora_headers_CFLAGS $CFLAGS" - with_ora_include="$with_oracle_home/rdbms/demo" + with_ora_include="$with_oracle_home/rdbms/deom" fi if test x"$ora_headers_success" = xyes @@ -121,27 +121,9 @@ ora_libs_LDFLAGS="-L$with_oracle_home/lib" ora_libs_success=no -# -# oracle version -# -AC_ARG_WITH(oracle-version, - [AC_HELP_STRING([--with-oracle-version=MAJOR], - [Oracle's Major Version Number])]) -AC_MSG_CHECKING([Oracle Major Version Number]) -if test x"$with_oracle_version" = x -then - AC_MSG_RESULT([default]) -else - AC_MSG_RESULT([$with_oracle_version]) -fi - AC_MSG_CHECKING([for OCI Function calls in -lclntsh]) ora_libs_LIBS='-lclntsh' -if test x"$with_oracle_version" = x10 -then - ora_libs_LIBS='-lclntsh -lnnz10' -fi LIBS="$ora_libs_LIBS $ora_libs_save_LIBS" LDFLAGS="$ora_libs_LDFLAGS $ora_libs_save_LDFLAGS" Index: m4/.cvsignore =================================================================== --- m4/.cvsignore (.../vendor/dspam/3.0.0) (revision 0) +++ m4/.cvsignore (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -0,0 +1,2 @@ +Makefile +Makefile.in Index: configure =================================================================== --- configure (.../vendor/dspam/3.0.0) (revision 39233) +++ configure (.../trunk/email/main/bayes/regress/dspam3) (revision 39233) @@ -1,12 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for dspam 3.0.0. +# Generated by GNU Autoconf 2.57 for dspam 3.0.0.alpha.6. # # Report bugs to . # -# Copyright (C) 2004 Network Dweebs Corporation +# Copyright (C) 2003 Network Dweebs Corporation # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -23,10 +24,9 @@ elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false @@ -45,7 +45,7 @@ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var @@ -222,17 +222,16 @@ if mkdir -p . 2>/dev/null; then as_mkdir_p=: else - test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" # Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # IFS @@ -425,8 +424,8 @@ # Identity of this package. PACKAGE_NAME='dspam' PACKAGE_TARNAME='dspam' -PACKAGE_VERSION='3.0.0' -PACKAGE_STRING='dspam 3.0.0' +PACKAGE_VERSION='3.0.0.alpha.6' +PACKAGE_STRING='dspam 3.0.0.alpha.6' PACKAGE_BUGREPORT='jonathan@nuclearelephant.com' ac_unique_file="dspam.c" @@ -956,7 +955,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures dspam 3.0.0 to adapt to many kinds of systems. +\`configure' configures dspam 3.0.0.alpha.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1022,7 +1021,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dspam 3.0.0:";; + short | recursive ) echo "Configuration of dspam 3.0.0.alpha.6:";; esac cat <<\_ACEOF @@ -1043,19 +1042,8 @@ --enable-debug Cause DSPAM produce debug output and write them into DSPAM_HOME/dspam.debug file. Never enable this for production builds! - --enable-viagra --enable-neural-networking Activates DSPAM's neural-networking functions. - --disable-system-logging - Disable's system logging - --disable-user-logging Disable user logging - --enable-parse-to-headers - Parse To: headers on misclassification to identify - user - --enable-broken-return-codes - Returns an exitcode of 99 if a message is spam - --enable-spam-subject Prepends SPAM to the Subject header of messages - believed to be spam --enable-experimental Activates DSPAM's experimental functions. --enable-client-compression Use compression (if available) between data source @@ -1073,12 +1061,7 @@ Disable traditional Bayesian calculations --disable-alternative-bayesian Disable alternative Bayesian calculations - --enable-robinson Cause DSPAM to use the Robinson Naive Bayesian - calculation - --enable-chi-square Enable Fisher-Robinson Inverse Chi-Square - calculations - --enable-robinson-pvalues - Enable Robinson's technique for combining p-values + --enable-chi-square Cause DSPAM to use the Chi-Square calculation --disable-test-conditional Disables test-conditional (loop) training --enable-homedir-dotfiles @@ -1098,55 +1081,11 @@ server-side signatures) --disable-bias Cause DSPAM to calculate without a bias toward innocent mail - --enable-webmail -and - are able to feed the PRISTINE copy of the message back - in for retrainingDisables -and - are able to feed the PRISTINE copy of the message back - in for retraininguse -and - are able to feed the PRISTINE copy of the message back - in for retrainingof -and - are able to feed the PRISTINE copy of the message back - in for retrainingsignatures -and - are able to feed the PRISTINE copy of the message back - in for retrainingon -and - are able to feed the PRISTINE copy of the message back - in for retrainingstandard -and - are able to feed the PRISTINE copy of the message back - in for retrainingprocessing -and - are able to feed the PRISTINE copy of the message back - in for retrainingONLY -and - are able to feed the PRISTINE copy of the message back - in for retraininguse -and - are able to feed the PRISTINE copy of the message back - in for retrainingthis -and - are able to feed the PRISTINE copy of the message back - in for retrainingif -and - are able to feed the PRISTINE copy of the message back - in for retrainingyou -and - are able to feed the PRISTINE copy of the message back - in for retrainingare -and - are able to feed the PRISTINE copy of the message back - in for retrainingstoring -and - are able to feed the PRISTINE copy of the message back - in for retrainingmail -and - are able to feed the PRISTINE copy of the message back - in for retrainingserver-side + --enable-webmail Disables use of signatures on standard processing + ONLY use this if you are storing mail server-side, + and are able to feed the PRISTINE copy of the + message back in for retraining, such as in a webmail + system. --enable-large-scale Manage file structure for a large scale implementation --enable-domain-scale Manage file structure to support a domain @@ -1156,20 +1095,6 @@ --enable-virtual-users Cause pgsql_drv to generate virtual uids for each user --enable-virtual-users Cause ora_drv to generate virtual uids for each user - --enable-warnings[={no|[{yes|error}][,proto]}] - Disable (no) or enable (yes) more warnings - or enable and treat warnings as errors (error). - Simple --enable-warnings is the same - as --enable-warnings=yes. - You can add ',proto' to 'yes' or 'error' option - for turning on additional '-Wstrict-prototypes' - flag. - Have effect for GCC compilers only. - --disable-warnings Same as --enable-warnings=no [default] - --enable-profiling Disable (no) or enable (yes) performance profiling. - Generate extra code to write profile information - suitable for the analysis program gprof. Has effect - for GCC compilers only. Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1184,14 +1109,27 @@ dependent. --with-quarantine-agent=PROG Use PROG as quarantine agent. - --with-dspam-home=DIR -signaturesSpecify directory where per-user dictionaries - --with-dspam-home-mode=MODE Set access mode for DSPAM_HOME - --with-dspam-home-owner=OWNER Set owner for DSPAM_HOME - --with-dspam-home-group=GROUP Set group for DSPAM_HOME - --with-dspam-mode=MODE Set access mode for dspam binary - --with-dspam-owner=OWNER Set owner for dspam binary - --with-dspam-group=GROUP Set group for dspam binary + --with-dspam-home=DIR Specify directory where per-user dictionaries, + signatures, etc. should be stored. [default: + /etc/mail/dspam] + --with-dspam-home-mode=MODE + Set access mode for DSPAM_HOME, "none" means "do not + call chmod" [default: 770] + --with-dspam-home-owner=OWNER + Set owner for DSPAM_HOME, "none" means "do not call + chown" [default: root] + --with-dspam-home-group=GROUP + Set group for DSPAM_HOME, "none" means "do not call + chgrp" [default: mail] + --with-dspam-mode=MODE Set access mode for dspam binary, "none" means "do + not call chmod" [default: 2510 in many cases, but + 4510 for FreeBSD] + --with-dspam-owner=OWNER + Set owner for dspam binary, "none" means "do not + call chown" [default: root] + --with-dspam-group=GROUP + Set group for dspam binary, "none" means "do not + call chgrp" [default: mail] --with-signature-life=DAYS Use DAYS as the signature life. Default value is 14 days. @@ -1218,8 +1156,6 @@ --with-pgsql-libraries=DIR Where to find PostgreSQL libraries --with-oracle-home=DIR Where to find Oracle Home - --with-oracle-version=MAJOR - Oracle's Major Version Number Some influential environment variables: CC C compiler command @@ -1272,45 +1208,12 @@ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. @@ -1334,14 +1237,15 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -dspam configure 3.0.0 -generated by GNU Autoconf 2.59 +dspam configure 3.0.0.alpha.6 +generated by GNU Autoconf 2.57 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -Copyright (C) 2004 Network Dweebs Corporation +Copyright (C) 2003 Network Dweebs Corporation _ACEOF exit 0 fi @@ -1350,8 +1254,8 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by dspam $as_me 3.0.0, which was -generated by GNU Autoconf 2.59. Invocation command line was +It was created by dspam $as_me 3.0.0.alpha.6, which was +generated by GNU Autoconf 2.57. Invocation command line was $ $0 $@ @@ -1527,7 +1431,7 @@ echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && + rm -f core core.* *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 @@ -1725,7 +1629,6 @@ # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 @@ -1742,7 +1645,6 @@ case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. @@ -1907,7 +1809,7 @@ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1963,7 +1865,7 @@ # Define the identity of the package. PACKAGE='dspam' - VERSION='3.0.0' + VERSION='3.0.0.alpha.6' cat >>confdefs.h <<_ACEOF @@ -2489,6 +2391,7 @@ (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2508,8 +2411,8 @@ # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking for C compiler default output" >&5 +echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 @@ -2645,6 +2548,7 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2695,6 +2599,7 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2714,20 +2619,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -2741,7 +2636,7 @@ ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi @@ -2757,6 +2652,7 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2773,20 +2669,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -2800,7 +2686,7 @@ ac_cv_prog_cc_g=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 @@ -2827,6 +2713,7 @@ ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2854,16 +2741,6 @@ va_end (v); return s; } - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2890,20 +2767,10 @@ CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -2917,7 +2784,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.err conftest.$ac_objext +rm -f conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC @@ -2945,20 +2812,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -2967,6 +2824,7 @@ (exit $ac_status); }; }; then for ac_declaration in \ '' \ + '#include ' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ @@ -2974,13 +2832,14 @@ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration #include +$ac_declaration int main () { @@ -2991,20 +2850,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -3018,8 +2867,9 @@ continue fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3036,20 +2886,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -3062,7 +2902,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then @@ -3076,7 +2916,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3089,8 +2929,9 @@ am_make=${MAKE-make} cat > confinc << 'END' -doit: +am__doit: @echo done +.PHONY: am__doit END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 @@ -3165,18 +3006,32 @@ # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. - echo '#include "conftest.h"' > conftest.c - echo 'int i;' > conftest.h - echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + : > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) @@ -3194,11 +3049,12 @@ # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=conftest.c object=conftest.o \ - depfile=conftest.Po tmpdepfile=conftest.TPo \ - $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && - grep conftest.h conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # (even with -Werror). So we grep stderr for any message @@ -3262,6 +3118,7 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3284,7 +3141,6 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -3305,6 +3161,7 @@ # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3322,7 +3179,6 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -3369,6 +3225,7 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3391,7 +3248,6 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -3412,6 +3268,7 @@ # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3429,7 +3286,6 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -3705,7 +3561,7 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. -case `"$LD" -v 2>&1 &1 conftest.$ac_ext + echo '#line 3898 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4136,6 +3992,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4152,20 +4009,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -4179,8 +4026,7 @@ lt_cv_cc_needs_belf=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4208,6 +4054,7 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4228,20 +4075,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -4255,11 +4092,12 @@ ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4281,6 +4119,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4305,6 +4144,7 @@ : else cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4354,7 +4194,7 @@ ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi @@ -4388,6 +4228,7 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4399,20 +4240,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -4426,7 +4257,7 @@ eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -4457,6 +4288,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4467,20 +4299,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -4494,7 +4316,7 @@ ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -4502,6 +4324,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4519,7 +4342,6 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -4539,32 +4361,33 @@ echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) +case $ac_header_compiler:$ac_header_preproc in + yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; - no:yes:* ) + no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------------------- ## -## Report this to jonathan@nuclearelephant.com ## -## ------------------------------------------- ## +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -4575,7 +4398,7 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=\$ac_header_preproc" + eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -4709,6 +4532,7 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4728,20 +4552,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -4755,7 +4569,7 @@ ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi @@ -4771,6 +4585,7 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4787,20 +4602,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -4814,7 +4619,7 @@ ac_cv_prog_cxx_g=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 @@ -4835,6 +4640,7 @@ fi for ac_declaration in \ '' \ + '#include ' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ @@ -4842,13 +4648,14 @@ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration #include +$ac_declaration int main () { @@ -4859,20 +4666,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -4886,8 +4683,9 @@ continue fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4904,20 +4702,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -4930,7 +4718,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then @@ -4963,18 +4751,32 @@ # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. - echo '#include "conftest.h"' > conftest.c - echo 'int i;' > conftest.h - echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + : > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) @@ -4992,11 +4794,12 @@ # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=conftest.c object=conftest.o \ - depfile=conftest.Po tmpdepfile=conftest.TPo \ - $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && - grep conftest.h conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # (even with -Werror). So we grep stderr for any message @@ -5056,6 +4859,7 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5078,7 +4882,6 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi @@ -5099,6 +4902,7 @@ # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5116,7 +4920,6 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi @@ -5163,6 +4966,7 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5185,7 +4989,6 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi @@ -5206,6 +5009,7 @@ # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5223,7 +5027,6 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi @@ -5268,7 +5071,7 @@ ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran + for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 @@ -5310,7 +5113,7 @@ fi if test -z "$F77"; then ac_ct_F77=$F77 - for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran + for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -5355,7 +5158,7 @@ # Provide some information about the compiler. -echo "$as_me:5358:" \ +echo "$as_me:5161:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -5373,10 +5176,9 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) +# input file. ac_save_ext=$ac_ext ac_ext=F echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 @@ -5394,20 +5196,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -5421,13 +5213,14 @@ ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 ac_ext=$ac_save_ext +G77=`test $ac_compiler_gnu = yes && echo yes` ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= @@ -5444,20 +5237,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -5471,7 +5254,7 @@ ac_cv_prog_f77_g=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 @@ -5479,20 +5262,18 @@ if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then - if test "x$ac_cv_f77_compiler_gnu" = xyes; then + if test "$G77" = yes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else - if test "x$ac_cv_f77_compiler_gnu" = xyes; then + if test "$G77" = yes; then FFLAGS="-O2" else FFLAGS= fi fi - -G77=`test $ac_compiler_gnu = yes && echo yes` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -5620,7 +5401,7 @@ symcode='[BCDEGQRST]' ;; solaris* | sysv5*) - symcode='[BDT]' + symcode='[BDRT]' ;; sysv4) symcode='[DFNSTU]' @@ -5638,7 +5419,7 @@ # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) - symcode='[ABCDGISTW]' ;; + symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. @@ -6382,11 +6163,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6385: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6166: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6389: \$? = $ac_status" >&5 + echo "$as_me:6170: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6614,11 +6395,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6617: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6398: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6621: \$? = $ac_status" >&5 + echo "$as_me:6402: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6681,11 +6462,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6684: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6465: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6688: \$? = $ac_status" >&5 + echo "$as_me:6469: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -6893,6 +6674,31 @@ hardcode_shlibpath_var=no ;; + linux*) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds="$tmp_archive_cmds" + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + if test $supports_anon_versioning = yes; then + archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ +cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ +$echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + else + archive_expsym_cmds="$tmp_archive_cmds" + fi + else + ld_shlibs=no + fi + ;; + *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' @@ -7021,6 +6827,7 @@ allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7037,20 +6844,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -7068,8 +6865,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -7082,6 +6878,7 @@ else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7098,20 +6895,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -7129,8 +6916,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -8036,6 +7822,30 @@ # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' + + # Find out which ABI we are using (multilib Linux x86_64 hack). + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 7830 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + ;; + esac + fi + rm -rf conftest* + ;; + *) + ;; + esac + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; netbsd*) @@ -8229,6 +8039,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8252,20 +8063,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -8279,8 +8080,7 @@ ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 @@ -8304,28 +8104,21 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ - #ifdef __STDC__ # include #else # include #endif - -#undef shl_load - /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -8356,20 +8149,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -8383,8 +8166,7 @@ ac_cv_func_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 @@ -8399,6 +8181,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8422,20 +8205,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -8449,8 +8222,7 @@ ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 @@ -8464,28 +8236,21 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ - #ifdef __STDC__ # include #else # include #endif - -#undef dlopen - /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -8516,20 +8281,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -8543,8 +8298,7 @@ ac_cv_func_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 @@ -8559,6 +8313,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8582,20 +8337,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -8609,8 +8354,7 @@ ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 @@ -8626,6 +8370,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8649,20 +8394,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -8676,8 +8411,7 @@ ac_cv_lib_svld_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 @@ -8693,6 +8427,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8716,21 +8451,11 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8743,8 +8468,7 @@ ac_cv_lib_dld_dld_link=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 @@ -8799,7 +8523,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. -case `"$LD" -v 2>&1 &1 conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9949,20 +9674,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -9980,8 +9695,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -9995,6 +9709,7 @@ else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -10011,20 +9726,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -10042,8 +9747,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -11049,11 +10753,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11052: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10756: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11056: \$? = $ac_status" >&5 + echo "$as_me:10760: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -11116,11 +10820,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11119: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10823: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11123: \$? = $ac_status" >&5 + echo "$as_me:10827: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11682,6 +11386,30 @@ # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' + + # Find out which ABI we are using (multilib Linux x86_64 hack). + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 11394 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + ;; + esac + fi + rm -rf conftest* + ;; + *) + ;; + esac + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; netbsd*) @@ -11875,6 +11603,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11898,20 +11627,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -11925,8 +11644,7 @@ ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 @@ -11950,28 +11668,21 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ - #ifdef __STDC__ # include #else # include #endif - -#undef shl_load - /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -12002,20 +11713,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -12029,8 +11730,7 @@ ac_cv_func_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 @@ -12045,6 +11745,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12068,20 +11769,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -12095,8 +11786,7 @@ ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 @@ -12110,28 +11800,21 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ - #ifdef __STDC__ # include #else # include #endif - -#undef dlopen - /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -12162,20 +11845,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -12189,8 +11862,7 @@ ac_cv_func_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 @@ -12205,6 +11877,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12228,20 +11901,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -12255,8 +11918,7 @@ ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 @@ -12272,6 +11934,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12295,20 +11958,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -12322,8 +11975,7 @@ ac_cv_lib_svld_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 @@ -12339,6 +11991,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12362,20 +12015,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -12389,8 +12032,7 @@ ac_cv_lib_dld_dld_link=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 @@ -12445,7 +12087,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13010: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13372: \$? = $ac_status" >&5 + echo "$as_me:13014: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -13432,11 +13074,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13435: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13077: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13439: \$? = $ac_status" >&5 + echo "$as_me:13081: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -13644,6 +13286,31 @@ hardcode_shlibpath_var_F77=no ;; + linux*) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds_F77="$tmp_archive_cmds" + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ +cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ +$echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + else + archive_expsym_cmds_F77="$tmp_archive_cmds" + fi + else + ld_shlibs_F77=no + fi + ;; + *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' @@ -13778,20 +13445,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -13809,8 +13466,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -13829,20 +13485,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -13860,8 +13506,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -14767,6 +14412,30 @@ # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' + + # Find out which ABI we are using (multilib Linux x86_64 hack). + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 14420 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + ;; + esac + fi + rm -rf conftest* + ;; + *) + ;; + esac + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; netbsd*) @@ -15394,11 +15063,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15397: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15066: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15401: \$? = $ac_status" >&5 + echo "$as_me:15070: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15626,11 +15295,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15629: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15298: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15633: \$? = $ac_status" >&5 + echo "$as_me:15302: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15693,11 +15362,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15696: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15365: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15700: \$? = $ac_status" >&5 + echo "$as_me:15369: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15905,6 +15574,31 @@ hardcode_shlibpath_var_GCJ=no ;; + linux*) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds_GCJ="$tmp_archive_cmds" + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ +cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ +$echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + else + archive_expsym_cmds_GCJ="$tmp_archive_cmds" + fi + else + ld_shlibs_GCJ=no + fi + ;; + *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' @@ -16033,6 +15727,7 @@ allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -16049,20 +15744,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -16080,8 +15765,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -16094,6 +15778,7 @@ else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -16110,20 +15795,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -16141,8 +15816,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -17048,6 +16722,30 @@ # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' + + # Find out which ABI we are using (multilib Linux x86_64 hack). + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 16730 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + ;; + esac + fi + rm -rf conftest* + ;; + *) + ;; + esac + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; netbsd*) @@ -17241,6 +16939,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -17264,20 +16963,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -17291,8 +16980,7 @@ ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 @@ -17316,28 +17004,21 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ - #ifdef __STDC__ # include #else # include #endif - -#undef shl_load - /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -17368,20 +17049,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -17395,8 +17066,7 @@ ac_cv_func_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 @@ -17411,6 +17081,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -17434,20 +17105,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -17461,8 +17122,7 @@ ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 @@ -17476,28 +17136,21 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ - #ifdef __STDC__ # include #else # include #endif - -#undef dlopen - /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -17528,20 +17181,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -17555,8 +17198,7 @@ ac_cv_func_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 @@ -17571,6 +17213,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -17594,20 +17237,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -17621,8 +17254,7 @@ ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 @@ -17638,6 +17270,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -17661,20 +17294,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -17688,8 +17311,7 @@ ac_cv_lib_svld_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 @@ -17705,6 +17327,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -17728,20 +17351,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -17755,8 +17368,7 @@ ac_cv_lib_dld_dld_link=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 @@ -17811,7 +17423,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18953,6 +18565,7 @@ ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -18967,20 +18580,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -18993,25 +18596,21 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext done fi echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6 - - case $ac_cv_c_inline in inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif + no) +cat >>confdefs.h <<\_ACEOF +#define inline +_ACEOF + ;; + *) cat >>confdefs.h <<_ACEOF +#define inline $ac_cv_c_inline _ACEOF ;; esac @@ -19021,6 +18620,7 @@ echo "$as_me:$LINENO: checking for ISO C99 varargs macros in C" >&5 echo $ECHO_N "checking for ISO C99 varargs macros in C... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -19041,20 +18641,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -19081,7 +18671,7 @@ echo "${ECHO_T}no" >&6 fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext #--------------------------------------------------------- # Libc features @@ -19103,6 +18693,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -19113,20 +18704,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -19140,7 +18721,7 @@ ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -19148,6 +18729,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -19165,7 +18747,6 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -19185,32 +18766,33 @@ echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) +case $ac_header_compiler:$ac_header_preproc in + yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; - no:yes:* ) + no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------------------- ## -## Report this to jonathan@nuclearelephant.com ## -## ------------------------------------------- ## +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -19221,7 +18803,7 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=\$ac_header_preproc" + eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -19253,6 +18835,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -19263,20 +18846,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -19290,7 +18863,7 @@ ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -19298,6 +18871,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -19315,7 +18889,6 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -19335,32 +18908,33 @@ echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) +case $ac_header_compiler:$ac_header_preproc in + yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; - no:yes:* ) + no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------------------- ## -## Report this to jonathan@nuclearelephant.com ## -## ------------------------------------------- ## +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -19371,7 +18945,7 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=\$ac_header_preproc" + eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -19403,6 +18977,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -19413,20 +18988,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -19440,7 +19005,7 @@ ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -19448,6 +19013,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -19465,7 +19031,6 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -19485,32 +19050,33 @@ echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) +case $ac_header_compiler:$ac_header_preproc in + yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; - no:yes:* ) + no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------------------- ## -## Report this to jonathan@nuclearelephant.com ## -## ------------------------------------------- ## +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -19521,7 +19087,7 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=\$ac_header_preproc" + eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -19542,6 +19108,7 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -19562,20 +19129,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -19589,7 +19146,7 @@ ac_cv_header_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 @@ -19611,28 +19168,21 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ - #ifdef __STDC__ # include #else # include #endif - -#undef $ac_func - /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -19663,20 +19213,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -19690,8 +19230,7 @@ eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -19713,28 +19252,21 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ - #ifdef __STDC__ # include #else # include #endif - -#undef $ac_func - /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -19765,20 +19297,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -19792,8 +19314,7 @@ eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -19816,28 +19337,21 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ - #ifdef __STDC__ # include #else # include #endif - -#undef $ac_func - /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -19868,20 +19382,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -19895,8 +19399,7 @@ eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -19933,6 +19436,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -19943,20 +19447,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -19970,7 +19464,7 @@ ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -19978,6 +19472,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -19995,7 +19490,6 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -20015,32 +19509,33 @@ echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) +case $ac_header_compiler:$ac_header_preproc in + yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; - no:yes:* ) + no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------------------- ## -## Report this to jonathan@nuclearelephant.com ## -## ------------------------------------------- ## +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -20051,7 +19546,7 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=\$ac_header_preproc" + eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -20084,6 +19579,7 @@ ac_func_search_save_LIBS=$LIBS ac_cv_search_inet_ntoa=no cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -20107,20 +19603,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -20133,12 +19619,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_inet_ntoa" = no; then for ac_lib in nsl; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -20162,20 +19648,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -20189,8 +19665,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS @@ -20214,6 +19689,7 @@ ac_func_search_save_LIBS=$LIBS ac_cv_search_socket=no cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -20237,20 +19713,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -20263,12 +19729,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_socket" = no; then for ac_lib in socket; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -20292,20 +19758,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -20319,8 +19775,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS @@ -20438,8 +19893,8 @@ # This variable is AC_SUBST'ed, not AC_DEFINE'd because used not only # for C-code, but for Makefile rules also. # -### dspam_home='$(prefix)/var/dspam' -dspam_home='/var/dspam' +### dspam_home='$(prefix)/etc/mail/dspam' +dspam_home='/etc/mail/dspam' # Check whether --with-dspam_home or --without-dspam_home was given. if test "${with_dspam_home+set}" = set; then @@ -20534,7 +19989,6 @@ xyes) # trusted user security enabled explicity ;; xno) # trusted user security disabled explicity - enable_trusted_user_security=no ;; x) # trusted user security enabled by default enable_trusted_user_security=yes @@ -20596,40 +20050,6 @@ echo "${ECHO_T}$enable_debug" >&6 # -# Viagra -# -# Check whether --enable-viagra or --disable-viagra was given. -if test "${enable_viagra+set}" = set; then - enableval="$enable_viagra" - -fi; -echo "$as_me:$LINENO: checking for viagra" >&5 -echo $ECHO_N "checking for viagra... $ECHO_C" >&6 -case x"$enable_viagra" in - xyes) # viagra output enabled explicity - ;; - xno) # viagra output disabled explicity - ;; - x) # viagra output disabled by default - enable_viagra=no - ;; - *) { { echo "$as_me:$LINENO: error: unexpected value $enable_viagra for --{enable,disable}-viagra configure option" >&5 -echo "$as_me: error: unexpected value $enable_viagra for --{enable,disable}-viagra configure option" >&2;} - { (exit 1); exit 1; }; } - ;; -esac -if test x"$enable_viagra" != xyes -then - enable_viagra=no - echo "$as_me:$LINENO: result: no. looks like it's going to be a lonely build." >&5 -echo "${ECHO_T}no. looks like it's going to be a lonely build." >&6 -else - enable_viagra=yes # overkill, but convenient - echo "$as_me:$LINENO: result: yes. w00t! we'll be up all night compiling!" >&5 -echo "${ECHO_T}yes. w00t! we'll be up all night compiling!" >&6 -fi - -# # Neural Networking # # Check whether --enable-neural-networking or --disable-neural-networking was given. @@ -20667,340 +20087,149 @@ echo "${ECHO_T}$enable_neural_networking" >&6 # -# System Logging +# Experimental Functions # -# Check whether --enable-system-logging or --disable-system-logging was given. -if test "${enable_system_logging+set}" = set; then - enableval="$enable_system_logging" +# Check whether --enable-experimental or --disable-experimental was given. +if test "${enable_experimental+set}" = set; then + enableval="$enable_experimental" fi; -echo "$as_me:$LINENO: checking whether to enable system-logging" >&5 -echo $ECHO_N "checking whether to enable system-logging... $ECHO_C" >&6 -case x"$enable_system_logging" in +echo "$as_me:$LINENO: checking whether to enable experimental functions" >&5 +echo $ECHO_N "checking whether to enable experimental functions... $ECHO_C" >&6 +case x"$enable_experimental" in xyes) # enabled explicity ;; xno) # disabled explicity - enable_system_logging=no ;; - x) # enabled by default - enable_system_logging=yes + x) # disabled by default + enable_experimental=no ;; - *) { { echo "$as_me:$LINENO: error: unexpected value $enable_system_logging for --{enable,disable}-experimental configure option" >&5 -echo "$as_me: error: unexpected value $enable_system_logging for --{enable,disable}-experimental configure option" >&2;} + *) { { echo "$as_me:$LINENO: error: unexpected value $enable_experimental for --{enable,disable}-experimental configure option" >&5 +echo "$as_me: error: unexpected value $enable_experimental for --{enable,disable}-experimental configure option" >&2;} { (exit 1); exit 1; }; } ;; esac -if test x"$enable_system_logging" != xyes +if test x"$enable_experimental" != xyes then - enable_system_logging=no + enable_experimental=no else - enable_system_logging=yes # overkill, but convenient + enable_experimental=yes # overkill, but convenient cat >>confdefs.h <<\_ACEOF -#define SYSTEM_LOGGING 1 +#define EXPERIMENTAL 1 _ACEOF fi -echo "$as_me:$LINENO: result: $enable_system_logging" >&5 -echo "${ECHO_T}$enable_system_logging" >&6 - +echo "$as_me:$LINENO: result: $enable_experimental" >&5 +echo "${ECHO_T}$enable_experimental" >&6 # -# User Logging +# Data Source Compression # -# Check whether --enable-user-logging or --disable-user-logging was given. -if test "${enable_user_logging+set}" = set; then - enableval="$enable_user_logging" +# Check whether --enable-client-compression or --disable-client-compression was given. +if test "${enable_client_compression+set}" = set; then + enableval="$enable_client_compression" fi; -echo "$as_me:$LINENO: checking whether to enable user logging" >&5 -echo $ECHO_N "checking whether to enable user logging... $ECHO_C" >&6 -case x"$enable_user_logging" in - xyes) # enabled explicity +echo "$as_me:$LINENO: checking whether to enable client-compression" >&5 +echo $ECHO_N "checking whether to enable client-compression... $ECHO_C" >&6 +case x"$enable_client_compression" in + xyes) # client-compression output enabled explicity ;; - xno) # disabled explicity - enable_user_logging=no + xno) # client-compression output disabled explicity ;; - x) # enabled by default - enable_user_logging=yes + x) # client-compression output disabled by default + enable_client_compression=no ;; - *) { { echo "$as_me:$LINENO: error: unexpected value $enable_user_logging for --{enable,disable}-experimental configure option" >&5 -echo "$as_me: error: unexpected value $enable_user_logging for --{enable,disable}-experimental configure option" >&2;} + *) { { echo "$as_me:$LINENO: error: unexpected value $enable_client_compression for --{enable,disable}-client-compression configure option" >&5 +echo "$as_me: error: unexpected value $enable_client_compression for --{enable,disable}-client-compression configure option" >&2;} { (exit 1); exit 1; }; } ;; esac -if test x"$enable_user_logging" != xyes +if test x"$enable_client_compression" != xyes then - enable_user_logging=no + enable_client_compression=no else - enable_user_logging=yes # overkill, but convenient + enable_client_compression=yes # overkill, but convenient cat >>confdefs.h <<\_ACEOF -#define USER_LOGGING 1 +#define CLIENT_COMPRESSION 1 _ACEOF fi -echo "$as_me:$LINENO: result: $enable_user_logging" >&5 -echo "${ECHO_T}$enable_user_logging" >&6 +echo "$as_me:$LINENO: result: $enable_client_compression" >&5 +echo "${ECHO_T}$enable_client_compression" >&6 # -# Parse To: Headers to determine username (on misclassification only) +# Source Address Tracking # -# Check whether --enable-parse-to-headers or --disable-parse-to-headers was given. -if test "${enable_parse_to_headers+set}" = set; then - enableval="$enable_parse_to_headers" +# Check whether --enable-source-address-tracking or --disable-source-address-tracking was given. +if test "${enable_source_address_tracking+set}" = set; then + enableval="$enable_source_address_tracking" fi; -echo "$as_me:$LINENO: checking whether to enable parse-to-headers" >&5 -echo $ECHO_N "checking whether to enable parse-to-headers... $ECHO_C" >&6 -case x"$enable_parse_to_headers" in +echo "$as_me:$LINENO: checking whether to enable source address tracking" >&5 +echo $ECHO_N "checking whether to enable source address tracking... $ECHO_C" >&6 +case x"$enable_source_address_tracking" in xyes) # enabled explicity ;; xno) # disabled explicity ;; x) # disabled by default - enable_parse_to_headers=no + enable_source_address_tracking=no ;; - *) { { echo "$as_me:$LINENO: error: unexpected value $enable_parse_to_headers for --{enable,disable}-experimental configure option" >&5 -echo "$as_me: error: unexpected value $enable_parse_to_headers for --{enable,disable}-experimental configure option" >&2;} + *) { { echo "$as_me:$LINENO: error: unexpected value $enable_source_address_tracking for --{enable,disable}-source-address-tracking configure option" >&5 +echo "$as_me: error: unexpected value $enable_source_address_tracking for --{enable,disable}-source-address-tracking configure option" >&2;} { (exit 1); exit 1; }; } ;; esac -if test x"$enable_parse_to_headers" != xyes +if test x"$enable_source_address_tracking" != xyes then - enable_parse_to_headers=no + enable_source_address_tracking=no else - enable_parse_to_headers=yes # overkill, but convenient + enable_source_address_tracking=yes # overkill, but convenient cat >>confdefs.h <<\_ACEOF -#define PARSE_TO 1 +#define SOURCE_ADDRESS_TRACKING 1 _ACEOF + + fi -echo "$as_me:$LINENO: result: $enable_parse_to_headers" >&5 -echo "${ECHO_T}$enable_parse_to_headers" >&6 +echo "$as_me:$LINENO: result: $enable_source_address_tracking" >&5 +echo "${ECHO_T}$enable_source_address_tracking" >&6 # -# Broken Return Codes -# For integration with demented MTAs like qmail +# Verbose debug output # -# Check whether --enable-broken-return-codes or --disable-broken-return-codes was given. -if test "${enable_broken_return_codes+set}" = set; then - enableval="$enable_broken_return_codes" +# Check whether --enable-verbose-debug or --disable-verbose-debug was given. +if test "${enable_verbose_debug+set}" = set; then + enableval="$enable_verbose_debug" fi; -echo "$as_me:$LINENO: checking whether to enable broken-return-codes" >&5 -echo $ECHO_N "checking whether to enable broken-return-codes... $ECHO_C" >&6 -case x"$enable_broken_return_codes" in - xyes) # enabled explicity +echo "$as_me:$LINENO: checking whether to enable verbose debug output" >&5 +echo $ECHO_N "checking whether to enable verbose debug output... $ECHO_C" >&6 +case x"$enable_verbose_debug" in + xyes) # debug output enabled explicity ;; - xno) # disabled explicity + xno) # debug output disabled explicity ;; - x) # disabled by default - enable_broken_return_codes=no + x) # debug output disabled by default + enable_verbose_debug=no ;; - *) { { echo "$as_me:$LINENO: error: unexpected value $enable_broken_return_codes for --{enable,disable}-experimental configure option" >&5 -echo "$as_me: error: unexpected value $enable_broken_return_codes for --{enable,disable}-experimental configure option" >&2;} + *) { { echo "$as_me:$LINENO: error: unexpected value $enable_verbose_debug for --{enable,disable}-verbose-debug configure option" >&5 +echo "$as_me: error: unexpected value $enable_verbose_debug for --{enable,disable}-verbose-debug configure option" >&2;} { (exit 1); exit 1; }; } ;; esac -if test x"$enable_broken_return_codes" != xyes +if test x"$enable_verbose_debug" != xyes then - enable_broken_return_codes=no + enable_verbose_debug=no else - enable_broken_return_codes=yes # overkill, but convenient + enable_verbose_debug=yes # overkill, but convenient cat >>confdefs.h <<\_ACEOF -#define BROKEN_RETURN_CODES 1 -_ACEOF - -fi -echo "$as_me:$LINENO: result: $enable_broken_return_codes" >&5 -echo "${ECHO_T}$enable_broken_return_codes" >&6 - -# -# Spam Subject -# -# Check whether --enable-spam-subject or --disable-spam-subject was given. -if test "${enable_spam_subject+set}" = set; then - enableval="$enable_spam_subject" - -fi; -echo "$as_me:$LINENO: checking whether to enable spam-subject" >&5 -echo $ECHO_N "checking whether to enable spam-subject... $ECHO_C" >&6 -case x"$enable_spam_subject" in - xyes) # enabled explicity - ;; - xno) # disabled explicity - ;; - x) # disabled by default - enable_spam_subject=no - ;; - *) { { echo "$as_me:$LINENO: error: unexpected value $enable_spam_subject for --{enable,disable}-experimental configure option" >&5 -echo "$as_me: error: unexpected value $enable_spam_subject for --{enable,disable}-experimental configure option" >&2;} - { (exit 1); exit 1; }; } - ;; -esac -if test x"$enable_spam_subject" != xyes -then - enable_spam_subject=no -else - enable_spam_subject=yes # overkill, but convenient - -cat >>confdefs.h <<\_ACEOF -#define SPAM_SUBJECT 1 -_ACEOF - -fi -echo "$as_me:$LINENO: result: $enable_spam_subject" >&5 -echo "${ECHO_T}$enable_spam_subject" >&6 - - - -# -# Experimental Functions -# -# Check whether --enable-experimental or --disable-experimental was given. -if test "${enable_experimental+set}" = set; then - enableval="$enable_experimental" - -fi; -echo "$as_me:$LINENO: checking whether to enable experimental functions" >&5 -echo $ECHO_N "checking whether to enable experimental functions... $ECHO_C" >&6 -case x"$enable_experimental" in - xyes) # enabled explicity - ;; - xno) # disabled explicity - ;; - x) # disabled by default - enable_experimental=no - ;; - *) { { echo "$as_me:$LINENO: error: unexpected value $enable_experimental for --{enable,disable}-experimental configure option" >&5 -echo "$as_me: error: unexpected value $enable_experimental for --{enable,disable}-experimental configure option" >&2;} - { (exit 1); exit 1; }; } - ;; -esac -if test x"$enable_experimental" != xyes -then - enable_experimental=no -else - enable_experimental=yes # overkill, but convenient - -cat >>confdefs.h <<\_ACEOF -#define EXPERIMENTAL 1 -_ACEOF - -fi -echo "$as_me:$LINENO: result: $enable_experimental" >&5 -echo "${ECHO_T}$enable_experimental" >&6 - -# -# Data Source Compression -# -# Check whether --enable-client-compression or --disable-client-compression was given. -if test "${enable_client_compression+set}" = set; then - enableval="$enable_client_compression" - -fi; -echo "$as_me:$LINENO: checking whether to enable client-compression" >&5 -echo $ECHO_N "checking whether to enable client-compression... $ECHO_C" >&6 -case x"$enable_client_compression" in - xyes) # client-compression output enabled explicity - ;; - xno) # client-compression output disabled explicity - ;; - x) # client-compression output disabled by default - enable_client_compression=no - ;; - *) { { echo "$as_me:$LINENO: error: unexpected value $enable_client_compression for --{enable,disable}-client-compression configure option" >&5 -echo "$as_me: error: unexpected value $enable_client_compression for --{enable,disable}-client-compression configure option" >&2;} - { (exit 1); exit 1; }; } - ;; -esac -if test x"$enable_client_compression" != xyes -then - enable_client_compression=no -else - enable_client_compression=yes # overkill, but convenient - -cat >>confdefs.h <<\_ACEOF -#define CLIENT_COMPRESSION 1 -_ACEOF - -fi -echo "$as_me:$LINENO: result: $enable_client_compression" >&5 -echo "${ECHO_T}$enable_client_compression" >&6 - -# -# Source Address Tracking -# -# Check whether --enable-source-address-tracking or --disable-source-address-tracking was given. -if test "${enable_source_address_tracking+set}" = set; then - enableval="$enable_source_address_tracking" - -fi; -echo "$as_me:$LINENO: checking whether to enable source address tracking" >&5 -echo $ECHO_N "checking whether to enable source address tracking... $ECHO_C" >&6 -case x"$enable_source_address_tracking" in - xyes) # enabled explicity - ;; - xno) # disabled explicity - ;; - x) # disabled by default - enable_source_address_tracking=no - ;; - *) { { echo "$as_me:$LINENO: error: unexpected value $enable_source_address_tracking for --{enable,disable}-source-address-tracking configure option" >&5 -echo "$as_me: error: unexpected value $enable_source_address_tracking for --{enable,disable}-source-address-tracking configure option" >&2;} - { (exit 1); exit 1; }; } - ;; -esac -if test x"$enable_source_address_tracking" != xyes -then - enable_source_address_tracking=no -else - enable_source_address_tracking=yes # overkill, but convenient - -cat >>confdefs.h <<\_ACEOF -#define SOURCE_ADDRESS_TRACKING 1 -_ACEOF - - - -fi -echo "$as_me:$LINENO: result: $enable_source_address_tracking" >&5 -echo "${ECHO_T}$enable_source_address_tracking" >&6 - -# -# Verbose debug output -# -# Check whether --enable-verbose-debug or --disable-verbose-debug was given. -if test "${enable_verbose_debug+set}" = set; then - enableval="$enable_verbose_debug" - -fi; -echo "$as_me:$LINENO: checking whether to enable verbose debug output" >&5 -echo $ECHO_N "checking whether to enable verbose debug output... $ECHO_C" >&6 -case x"$enable_verbose_debug" in - xyes) # debug output enabled explicity - ;; - xno) # debug output disabled explicity - ;; - x) # debug output disabled by default - enable_verbose_debug=no - ;; - *) { { echo "$as_me:$LINENO: error: unexpected value $enable_verbose_debug for --{enable,disable}-verbose-debug configure option" >&5 -echo "$as_me: error: unexpected value $enable_verbose_debug for --{enable,disable}-verbose-debug configure option" >&2;} - { (exit 1); exit 1; }; } - ;; -esac -if test x"$enable_verbose_debug" != xyes -then - enable_verbose_debug=no -else - enable_verbose_debug=yes # overkill, but convenient - -cat >>confdefs.h <<\_ACEOF -#define DEBUG 1 +#define DEBUG 1 _ACEOF @@ -21063,7 +20292,6 @@ xyes) # enabled explicity ;; xno) # disabled explicity - enable_traditional_bayesian=no ;; x) # enabled by default enable_traditional_bayesian=yes @@ -21103,7 +20331,6 @@ xyes) # enabled explicity ;; xno) # disabled explicity - enable_alternative_bayesian=no ;; x) # disabled by default enable_alternative_bayesian=yes @@ -21128,44 +20355,7 @@ echo "${ECHO_T}$enable_alternative_bayesian" >&6 # -# Robinson's Naive Bayesian -# -# Check whether --enable-robinson or --disable-robinson was given. -if test "${enable_robinson+set}" = set; then - enableval="$enable_robinson" - -fi; -echo "$as_me:$LINENO: checking whether to enable Robinson's naive Bayesian calculations" >&5 -echo $ECHO_N "checking whether to enable Robinson's naive Bayesian calculations... $ECHO_C" >&6 -case x"$enable_robinson" in - xyes) # enabled explicity - ;; - xno) # disabled explicity - ;; - x) # disabled by default - enable_robinson=no - ;; - *) { { echo "$as_me:$LINENO: error: unexpected value $enable_robinson for --{enable,disable}-robinson configure option" >&5 -echo "$as_me: error: unexpected value $enable_robinson for --{enable,disable}-robinson configure option" >&2;} - { (exit 1); exit 1; }; } - ;; -esac -if test x"$enable_robinson" != xyes -then - enable_robinson=no -else - enable_robinson=yes # overkill, but convenient - -cat >>confdefs.h <<\_ACEOF -#define ROBINSON 1 -_ACEOF - -fi -echo "$as_me:$LINENO: result: $enable_robinson" >&5 -echo "${ECHO_T}$enable_robinson" >&6 - -# -# Fisher-Robinson's Inverse Chi-Square +# Chi-Square Calculation # # Check whether --enable-chi-square or --disable-chi-square was given. if test "${enable_chi_square+set}" = set; then @@ -21194,59 +20384,20 @@ enable_chi_square=yes # overkill, but convenient cat >>confdefs.h <<\_ACEOF -#define CHI_SQ 1 +#define CHI_SQUARE 1 _ACEOF fi echo "$as_me:$LINENO: result: $enable_chi_square" >&5 echo "${ECHO_T}$enable_chi_square" >&6 -if test x"$enable_traditional_bayesian$enable_alternative_bayesian$enable_robinson$enable_chi_square" = xnononono +if test x"$enable_traditional_bayesian$enable_alternative_bayesian$enable_chi_square" = xnonono then { { echo "$as_me:$LINENO: error: you must have at least one algorithm enabled" >&5 echo "$as_me: error: you must have at least one algorithm enabled" >&2;} { (exit 1); exit 1; }; } fi - -# -# Robinson's Technique for Combining P-Values -# -# Check whether --enable-robinson-pvalues or --disable-robinson-pvalues was given. -if test "${enable_robinson_pvalues+set}" = set; then - enableval="$enable_robinson_pvalues" - -fi; -echo "$as_me:$LINENO: checking whether to enable Robinson's technique" >&5 -echo $ECHO_N "checking whether to enable Robinson's technique... $ECHO_C" >&6 -case x"$enable_robinson_pvalues" in - xyes) # enabled explicity - ;; - xno) # disabled explicity - ;; - x) # disabled by default - enable_robinson_pvalues=no - ;; - *) { { echo "$as_me:$LINENO: error: unexpected value $enable_robinson_pvalues for --{enable,disable}-robinson-pvalues configure option" >&5 -echo "$as_me: error: unexpected value $enable_robinson_pvalues for --{enable,disable}-robinson-pvalues configure option" >&2;} - { (exit 1); exit 1; }; } - ;; -esac -if test x"$enable_robinson_pvalues" != xyes -then - enable_robinson_pvalues=no -else - enable_robinson_pvalues=yes # overkill, but convenient - -cat >>confdefs.h <<\_ACEOF -#define ROBINSON_FW 1 -_ACEOF - -fi -echo "$as_me:$LINENO: result: $enable_robinson_pvalues" >&5 -echo "${ECHO_T}$enable_robinson_pvalues" >&6 - - # # Test-Conditional Training # (users with > 2500 innocent messages will retrain spams + false positives @@ -21263,7 +20414,6 @@ xyes) # enabled explicity ;; xno) # disabled explicity - enable_test_conditional=no ;; x) # disabled by default enable_test_conditional=yes @@ -21488,7 +20638,6 @@ xyes) # debug output enabled explicity ;; xno) # debug output disabled explicity - enable_bias=no ;; x) # debug output disabled by default enable_bias=yes @@ -21779,6 +20928,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -21789,20 +20939,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -21816,7 +20956,7 @@ ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -21824,6 +20964,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -21841,7 +20982,6 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -21861,32 +21001,33 @@ echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) +case $ac_header_compiler:$ac_header_preproc in + yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; - no:yes:* ) + no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------------------- ## -## Report this to jonathan@nuclearelephant.com ## -## ------------------------------------------- ## +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -21897,7 +21038,7 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=\$ac_header_preproc" + eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -21945,6 +21086,7 @@ echo "$as_me:$LINENO: checking db.h usability" >&5 echo $ECHO_N "checking db.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -21955,20 +21097,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -21982,7 +21114,7 @@ ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -21990,6 +21122,7 @@ echo "$as_me:$LINENO: checking db.h presence" >&5 echo $ECHO_N "checking db.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -22007,7 +21140,6 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -22027,32 +21159,33 @@ echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) +case $ac_header_compiler:$ac_header_preproc in + yes:no ) { echo "$as_me:$LINENO: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: db.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: db.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes + { echo "$as_me:$LINENO: WARNING: db.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: db.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; - no:yes:* ) + no:yes ) { echo "$as_me:$LINENO: WARNING: db.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: db.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: db.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: db.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: db.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: db.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: db.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: db.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: db.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: db.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------------------- ## -## Report this to jonathan@nuclearelephant.com ## -## ------------------------------------------- ## +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -22096,6 +21229,7 @@ else cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -22177,7 +21311,7 @@ ds_db_headers_success=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -22260,6 +21394,7 @@ ds_db_libs_LIBS="$ds_db_libs_tmp_libdb $ds_db_libs_tmp_libpth" LIBS="$ds_db_libs_LIBS $ds_db_libs_save_LIBS" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -22281,20 +21416,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -22309,8 +21434,7 @@ ds_db_libs_success=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test x"$ds_db_libs_success" != xyes then @@ -22330,6 +21454,7 @@ ds_libtool_run_ifelse_ac_link_save="$ac_link" ac_link="./libtool --mode=link $ac_link -no-install" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -22375,20 +21500,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -22402,8 +21517,7 @@ ds_db_libs_success=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ac_link="$ds_libtool_run_ifelse_ac_link_save" @@ -22494,6 +21608,12 @@ LIBS="$DB_LIBS $LIBS" LDFLAGS="$DB_LDFLAGS $LDFLAGS" + +cat >>confdefs.h <<\_ACEOF +#define _BDB 1 +_ACEOF + + storage_drv_subdirs='tools.libdb4_drv' storage_drv_objects='libdb4_drv.lo' # Please note: because storage # drives is part of libdspam, @@ -22605,6 +21725,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -22615,20 +21736,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -22642,7 +21753,7 @@ ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -22650,6 +21761,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -22667,7 +21779,6 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -22687,32 +21798,33 @@ echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) +case $ac_header_compiler:$ac_header_preproc in + yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; - no:yes:* ) + no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------------------- ## -## Report this to jonathan@nuclearelephant.com ## -## ------------------------------------------- ## +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -22723,7 +21835,7 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=\$ac_header_preproc" + eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -22771,6 +21883,7 @@ echo "$as_me:$LINENO: checking db.h usability" >&5 echo $ECHO_N "checking db.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -22781,20 +21894,10 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + (eval $ac_compile) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -22808,7 +21911,7 @@ ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -22816,6 +21919,7 @@ echo "$as_me:$LINENO: checking db.h presence" >&5 echo $ECHO_N "checking db.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -22833,7 +21937,6 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -22853,32 +21956,33 @@ echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) +case $ac_header_compiler:$ac_header_preproc in + yes:no ) { echo "$as_me:$LINENO: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: db.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: db.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes + { echo "$as_me:$LINENO: WARNING: db.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: db.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; - no:yes:* ) + no:yes ) { echo "$as_me:$LINENO: WARNING: db.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: db.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: db.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: db.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: db.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: db.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: db.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: db.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: db.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: db.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------------------- ## -## Report this to jonathan@nuclearelephant.com ## -## ------------------------------------------- ## +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -22922,6 +22026,7 @@ else cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -23003,7 +22108,7 @@ ds_db_headers_success=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -23086,6 +22191,7 @@ ds_db_libs_LIBS="$ds_db_libs_tmp_libdb $ds_db_libs_tmp_libpth" LIBS="$ds_db_libs_LIBS $ds_db_libs_save_LIBS" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -23107,20 +22213,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -23135,8 +22231,7 @@ ds_db_libs_success=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test x"$ds_db_libs_success" != xyes then @@ -23156,6 +22251,7 @@ ds_libtool_run_ifelse_ac_link_save="$ac_link" ac_link="./libtool --mode=link $ac_link -no-install" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -23201,20 +22297,10 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -