klamav-devel Mailing List for KlamAV - ClamAV for KDE
Status: Alpha
Brought to you by:
hoganrobert
You can subscribe to this list here.
| 2009 |
Jan
|
Feb
(24) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: Robert H. <hog...@us...> - 2009-02-26 18:29:12
|
Update of /cvsroot/klamav/klamav/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv8265/src Modified Files: directorylist.cpp Log Message: Index: directorylist.cpp =================================================================== RCS file: /cvsroot/klamav/klamav/src/directorylist.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** directorylist.cpp 3 Feb 2006 20:35:02 -0000 1.1.1.1 --- directorylist.cpp 26 Feb 2009 18:29:05 -0000 1.2 *************** *** 291,295 **** setText(1, KURL(retVal[6]).path()); setText(2, url.fileName()); ! //kdDebug() << "Device Item: " << name << " " << url.fileName() << " " << text(1) << endl; m_lister.setDirOnlyMode( true ); setExpandable( false ); --- 291,295 ---- setText(1, KURL(retVal[6]).path()); setText(2, url.fileName()); ! kdDebug() << "Device Item: " << name << " " << url.fileName() << " " << text(1) << endl; m_lister.setDirOnlyMode( true ); setExpandable( false ); *************** *** 373,377 **** for( KFileItemListIterator it( list ); *it; ++it ) { ! ////kdDebug() << (*it)->name() << " " << (*it)->url() << " " << (*it)->text() << endl; if (this->listView()->findItem((*it)->name(),0) == 0){ DeviceItem *item = new DeviceItem( this, (*it)->name(), (*it)->url() ); --- 373,377 ---- for( KFileItemListIterator it( list ); *it; ++it ) { ! kdDebug() << (*it)->name() << " " << (*it)->url() << " " << (*it)->text() << endl; if (this->listView()->findItem((*it)->name(),0) == 0){ DeviceItem *item = new DeviceItem( this, (*it)->name(), (*it)->url() ); |
|
From: Robert H. <hog...@us...> - 2009-02-26 18:29:12
|
Update of /cvsroot/klamav/klamav In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv8265 Modified Files: create-release.sh Log Message: Index: create-release.sh =================================================================== RCS file: /cvsroot/klamav/klamav/create-release.sh,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** create-release.sh 16 Feb 2009 20:08:21 -0000 1.7 --- create-release.sh 26 Feb 2009 18:29:05 -0000 1.8 *************** *** 1,6 **** export CVS_RSH=ssh ! export VN=0.45 export VER=klamav-$VN ! export TAG=v0_45 cd .. TOPDIR=$PWD --- 1,6 ---- export CVS_RSH=ssh ! export VN=0.46 export VER=klamav-$VN ! export TAG=v0_46 cd .. TOPDIR=$PWD |
|
From: Robert H. <hog...@us...> - 2009-02-22 14:03:39
|
Update of /cvsroot/klamav/klamav In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10062 Modified Files: ChangeLog Log Message: Index: ChangeLog =================================================================== RCS file: /cvsroot/klamav/klamav/ChangeLog,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ChangeLog 17 Feb 2009 20:44:48 -0000 1.15 --- ChangeLog 22 Feb 2009 14:03:34 -0000 1.16 *************** *** 1,2 **** --- 1,6 ---- + 2009-02-23 Robert Hogan <ro...@ro...> + KlamAV 0.46 + o Compatibility changes for the upcoming ClamAV 0.95. + 2009-02-16 Robert Hogan <ro...@ro...> KlamAV 0.45 |
|
From: Robert H. <hog...@us...> - 2009-02-22 13:35:05
|
Update of /cvsroot/klamav/klamav In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv6522 Removed Files: config.h.in Log Message: config.h.in not required in repo --- config.h.in DELETED --- |
|
From: Robert H. <hog...@us...> - 2009-02-20 10:50:38
|
Update of /cvsroot/klamav/klamav/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17749/src Modified Files: version.h Log Message: Bump version for next release. Index: version.h =================================================================== RCS file: /cvsroot/klamav/klamav/src/version.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** version.h 16 Feb 2009 20:11:19 -0000 1.13 --- version.h 20 Feb 2009 10:50:32 -0000 1.14 *************** *** 3,7 **** */ ! #define VERSION_KLAMAV 0.45 ! #define KLAMAV_VERSION "0.45" --- 3,7 ---- */ ! #define VERSION_KLAMAV 0.46 ! #define KLAMAV_VERSION "0.46" |
|
From: Robert H. <hog...@us...> - 2009-02-20 10:43:17
|
Update of /cvsroot/klamav/klamav/src/klammail In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16571/src/klammail Modified Files: clamdmail.c Log Message: klammail now working clamav 0.95 Index: clamdmail.c =================================================================== RCS file: /cvsroot/klamav/klamav/src/klammail/clamdmail.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** clamdmail.c 20 Feb 2009 09:55:23 -0000 1.9 --- clamdmail.c 20 Feb 2009 10:43:07 -0000 1.10 *************** *** 214,225 **** /* build engine */ ! #ifndef SUPPORT_CLAMAV_V095 if((ret = cl_build(engine))) { printf("Database initialization error: %s\n", cl_strerror(ret));; cl_free(engine); close(fd); exit(2); } - #endif #ifndef SUPPORT_CLAMAV_V095 --- 214,231 ---- /* build engine */ ! #ifdef SUPPORT_CLAMAV_V095 ! if((ret = cl_engine_compile(engine))) { ! #else if((ret = cl_build(engine))) { + #endif printf("Database initialization error: %s\n", cl_strerror(ret));; + #ifdef SUPPORT_CLAMAV_V095 + cl_engine_free(engine); + #else cl_free(engine); + #endif close(fd); exit(2); } #ifndef SUPPORT_CLAMAV_V095 *************** *** 577,581 **** --- 583,591 ---- fprintf(tmp,"FixStaleSocket\n"); else + #ifdef SUPPORT_CLAMAV_V095 + fprintf(tmp,"FixStaleSocket yes\n"); + #else fprintf(tmp,"FixStaleSocket TRUE\n"); + #endif fflush(tmp); |
|
From: Robert H. <hog...@us...> - 2009-02-20 09:55:31
|
Update of /cvsroot/klamav/klamav/src/klammail In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9244/src/klammail Modified Files: clamdmail.c Log Message: Latest state of clamdmail, still not working. Index: clamdmail.c =================================================================== RCS file: /cvsroot/klamav/klamav/src/klammail/clamdmail.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** clamdmail.c 18 Feb 2009 20:05:16 -0000 1.8 --- clamdmail.c 20 Feb 2009 09:55:23 -0000 1.9 *************** *** 104,109 **** if(optc(opt, 'V')) { ! mprintf("clamdmail "KLAMAV_VERSION" \n"); ! mexit(0); } --- 104,109 ---- if(optc(opt, 'V')) { ! mprintf("clamdmail "KLAMAV_VERSION" \n"); ! mexit(0); } *************** *** 179,185 **** ! /* load all available databases from default directory */ if((ret == 2)) { startclamd(opt); if(optc(opt, 'd')) { #ifdef SUPPORT_CLAMAV_V095 --- 179,194 ---- ! /* Clamd isn't running, scan the file ourselves */ if((ret == 2)) { + /* Clamd isn't running, start it so it is available next time. */ startclamd(opt); + #ifdef SUPPORT_CLAMAV_V095 + if((engine = cl_engine_new()) == NULL) { + printf("Database initialization error: %s\n", cl_strerror(ret));; + cl_engine_free(engine); + close(fd); + exit(2); + } + #endif if(optc(opt, 'd')) { #ifdef SUPPORT_CLAMAV_V095 *************** *** 205,222 **** /* build engine */ ! #ifdef SUPPORT_CLAMAV_V095 ! if((engine = cl_engine_new()) == NULL) { ! #else if((ret = cl_build(engine))) { - #endif printf("Database initialization error: %s\n", cl_strerror(ret));; - #ifdef SUPPORT_CLAMAV_V095 - cl_engine_free(engine); - #else cl_free(engine); - #endif close(fd); exit(2); } #ifndef SUPPORT_CLAMAV_V095 /* set up archive limits */ --- 214,226 ---- /* build engine */ ! #ifndef SUPPORT_CLAMAV_V095 if((ret = cl_build(engine))) { printf("Database initialization error: %s\n", cl_strerror(ret));; cl_free(engine); close(fd); exit(2); } + #endif + #ifndef SUPPORT_CLAMAV_V095 /* set up archive limits */ *************** *** 235,238 **** --- 239,243 ---- ret = cl_scandesc(fd, &virname, &size, engine, CL_SCAN_STDOPT | CL_SCAN_ARCHIVE | CL_SCAN_MAIL | CL_SCAN_OLE2 | CL_SCAN_HTML); + printf("scandesc returned: %i\n", cl_strerror(ret));; #else ret = cl_scandesc(fd, &virname, &size, engine, &limits, |
|
From: Robert H. <hog...@us...> - 2009-02-18 20:15:43
|
Update of /cvsroot/klamav/klamav/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7377/src Modified Files: dbviewer.cpp Log Message: Compatibility changes for ClamAV 0.95 - second try Index: dbviewer.cpp =================================================================== RCS file: /cvsroot/klamav/klamav/src/dbviewer.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** dbviewer.cpp 18 Feb 2009 20:06:45 -0000 1.9 --- dbviewer.cpp 18 Feb 2009 20:15:28 -0000 1.10 *************** *** 800,814 **** #ifdef SUPPORT_CLAMAV_V095 if((engine = cl_engine_new()) == NULL) { - #else - if((ret = cl_build(engine))) { - #endif printf("Database initialization error: %s\n", cl_strerror(ret));; - #ifdef SUPPORT_CLAMAV_V095 cl_engine_free(engine); - #else - cl_free(engine); - #endif return 0; } #ifdef SUPPORT_CLAMAV_V095 --- 800,808 ---- #ifdef SUPPORT_CLAMAV_V095 if((engine = cl_engine_new()) == NULL) { printf("Database initialization error: %s\n", cl_strerror(ret));; cl_engine_free(engine); return 0; } + #endif #ifdef SUPPORT_CLAMAV_V095 |
|
From: Robert H. <hog...@us...> - 2009-02-18 20:07:46
|
Update of /cvsroot/klamav/klamav In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5920 Modified Files: configure.in.in Log Message: Compatibility changes for ClamAV 0.95 Index: configure.in.in =================================================================== RCS file: /cvsroot/klamav/klamav/configure.in.in,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** configure.in.in 11 Aug 2007 11:43:10 -0000 1.7 --- configure.in.in 18 Feb 2009 20:07:34 -0000 1.8 *************** *** 138,141 **** --- 138,146 ---- AC_SUBST(LIB_CLAM) + AC_CHECK_LIB(clamav, cl_free, [ tempres="no" ],tempres="yes") + if test "$tempres" = "yes"; then + AC_DEFINE([SUPPORT_CLAMAV_V095],[],[Support ClamAV 0.95]) + fi + dnl disable updates |
|
From: Robert H. <hog...@us...> - 2009-02-18 20:06:57
|
Update of /cvsroot/klamav/klamav/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5596 Modified Files: ctunit.cpp dbviewer.cpp freshklam.cpp Log Message: Compatibility changes for ClamAV 0.95 Index: ctunit.cpp =================================================================== RCS file: /cvsroot/klamav/klamav/src/ctunit.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ctunit.cpp 3 Feb 2006 20:35:04 -0000 1.1.1.1 --- ctunit.cpp 18 Feb 2009 20:06:45 -0000 1.2 *************** *** 16,19 **** --- 16,20 ---- #include <vector> #include <string> + #include <stdlib.h> // sprintf #include <stdio.h> // sprintf #include <ctype.h> // tolower Index: freshklam.cpp =================================================================== RCS file: /cvsroot/klamav/klamav/src/freshklam.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** freshklam.cpp 16 Feb 2009 19:23:51 -0000 1.12 --- freshklam.cpp 18 Feb 2009 20:06:45 -0000 1.13 *************** *** 11,14 **** --- 11,15 ---- #include "klamavconfig.h" #include "config.h" + #include "../config.h" #include <klocale.h> *************** *** 840,844 **** --- 841,849 ---- if (dbdir != dir_combo->url()){ /* load all available databases from default directory */ + #ifdef SUPPORT_CLAMAV_V095 + ret = cl_load((const char *)dir_combo->url(), engine, &no, CL_DB_STDOPT); + #else ret = cl_load((const char *)dir_combo->url(), &engine, &no, CL_DB_STDOPT); + #endif //ret = cl_loaddbdir((const char *)dir_combo->url(), &root, &no); ////kdDebug() << "ret " << ret << endl; Index: dbviewer.cpp =================================================================== RCS file: /cvsroot/klamav/klamav/src/dbviewer.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** dbviewer.cpp 5 Jan 2008 13:21:34 -0000 1.8 --- dbviewer.cpp 18 Feb 2009 20:06:45 -0000 1.9 *************** *** 13,16 **** --- 13,17 ---- #include "tabwidget.h" #include "freshklam.h" + #include "../config.h" #include <qheader.h> *************** *** 797,804 **** dbdir = lastDownloadPaths.first(); ret = cl_load((const char *)dbdir, &engine, &no, CL_DB_STDOPT); - //ret = cl_loaddbdir((const char *)dbdir, &root, &no); - //kdDebug() << "no " << no << endl; cl_free(engine); return no; --- 798,823 ---- dbdir = lastDownloadPaths.first(); + #ifdef SUPPORT_CLAMAV_V095 + if((engine = cl_engine_new()) == NULL) { + #else + if((ret = cl_build(engine))) { + #endif + printf("Database initialization error: %s\n", cl_strerror(ret));; + #ifdef SUPPORT_CLAMAV_V095 + cl_engine_free(engine); + #else + cl_free(engine); + #endif + return 0; + } + + #ifdef SUPPORT_CLAMAV_V095 + ret = cl_load((const char *)dbdir, engine, &no, CL_DB_STDOPT); + cl_engine_free(engine); + #else ret = cl_load((const char *)dbdir, &engine, &no, CL_DB_STDOPT); cl_free(engine); + #endif + kdDebug() << "no of sigs" << no << endl; return no; |
|
From: Robert H. <hog...@us...> - 2009-02-18 20:05:39
|
Update of /cvsroot/klamav/klamav/src/klammail In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5496 Modified Files: Makefile.am clamdmail.c Removed Files: manager.h treewalk.c treewalk.h Log Message: Compatibility changes for ClamAV 0.95 --- treewalk.h DELETED --- --- treewalk.c DELETED --- --- manager.h DELETED --- Index: clamdmail.c =================================================================== RCS file: /cvsroot/klamav/klamav/src/klammail/clamdmail.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** clamdmail.c 17 Feb 2009 20:15:16 -0000 1.7 --- clamdmail.c 18 Feb 2009 20:05:16 -0000 1.8 *************** *** 40,43 **** --- 40,44 ---- #include "memory.h" #include "../version.h" + #include "../../config.h" #define BUFFSIZE 1024 *************** *** 97,101 **** --- 98,104 ---- const char *virname; struct cl_engine *engine = NULL; + #ifndef SUPPORT_CLAMAV_V095 struct cl_limits limits; + #endif struct stat sb; *************** *** 157,161 **** --- 160,168 ---- if(fsync(fd) == -1) { close(fd); + #ifdef SUPPORT_CLAMAV_V095 + return CL_ETMPFILE; + #else return CL_EIO; + #endif } *************** *** 176,180 **** --- 183,191 ---- startclamd(opt); if(optc(opt, 'd')) { + #ifdef SUPPORT_CLAMAV_V095 + if((ret = cl_load(getargc(opt, 'd'), engine, &no, CL_DB_STDOPT))) { + #else if((ret = cl_load(getargc(opt, 'd'), &engine, &no, CL_DB_STDOPT))) { + #endif printf("cl_load: %s\n", cl_strerror(ret)); close(fd); *************** *** 182,186 **** --- 193,201 ---- } }else{ + #ifdef SUPPORT_CLAMAV_V095 + if((ret = cl_load(cl_retdbdir(), engine, &no, CL_DB_STDOPT))) { + #else if((ret = cl_loaddbdir(cl_retdbdir(), &engine, &no, CL_DB_STDOPT))) { + #endif printf("cl_loaddbdir: %s\n", cl_strerror(ret)); close(fd); *************** *** 190,199 **** --- 205,223 ---- /* build engine */ + #ifdef SUPPORT_CLAMAV_V095 + if((engine = cl_engine_new()) == NULL) { + #else if((ret = cl_build(engine))) { + #endif printf("Database initialization error: %s\n", cl_strerror(ret));; + #ifdef SUPPORT_CLAMAV_V095 + cl_engine_free(engine); + #else cl_free(engine); + #endif close(fd); exit(2); } + #ifndef SUPPORT_CLAMAV_V095 /* set up archive limits */ memset(&limits, 0, sizeof(struct cl_limits)); *************** *** 207,211 **** /*limits.maxratio = 200;*/ /* maximum compression ratio */ limits.archivememlim = 1; ! ret = cl_scandesc(fd, &virname, &size, engine, &limits, CL_SCAN_STDOPT | CL_ARCHIVE | CL_MAIL | CL_OLE2 | CL_SCAN_HTML); } --- 231,242 ---- /*limits.maxratio = 200;*/ /* maximum compression ratio */ limits.archivememlim = 1; ! #endif ! #ifdef SUPPORT_CLAMAV_V095 ! ret = cl_scandesc(fd, &virname, &size, engine, ! CL_SCAN_STDOPT | CL_SCAN_ARCHIVE | CL_SCAN_MAIL | CL_SCAN_OLE2 | CL_SCAN_HTML); ! #else ! ret = cl_scandesc(fd, &virname, &size, engine, &limits, ! CL_SCAN_STDOPT | CL_ARCHIVE | CL_MAIL | CL_OLE2 | CL_SCAN_HTML); ! #endif } *************** *** 217,221 **** --- 248,256 ---- if((ret == 2)) + #ifdef SUPPORT_CLAMAV_V095 + cl_engine_free(engine); + #else cl_free(engine); + #endif unlink(tmpnm); Index: Makefile.am =================================================================== RCS file: /cvsroot/klamav/klamav/src/klammail/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 5 Feb 2006 11:51:22 -0000 1.2 --- Makefile.am 18 Feb 2009 20:05:16 -0000 1.3 *************** *** 1,4 **** bin_PROGRAMS = klammail ! klammail_SOURCES = clamdmail.c options.c treewalk.c output.c memory.c cfgparser.c client.c # set the include path found by configure --- 1,4 ---- bin_PROGRAMS = klammail ! klammail_SOURCES = clamdmail.c options.c output.c memory.c cfgparser.c client.c # set the include path found by configure |
|
From: Robert H. <hog...@us...> - 2009-02-17 20:44:52
|
Update of /cvsroot/klamav/klamav In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30279 Modified Files: ChangeLog Log Message: Index: ChangeLog =================================================================== RCS file: /cvsroot/klamav/klamav/ChangeLog,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ChangeLog 16 Feb 2009 20:07:58 -0000 1.14 --- ChangeLog 17 Feb 2009 20:44:48 -0000 1.15 *************** *** 1,7 **** 2009-02-16 Robert Hogan <ro...@ro...> KlamAV 0.45 ! o Add new iconset from Maarten van Gent. ! o Ukrainian Translation from Yuri Chornoivan ! o Fix compilation against ClamAV 0.94 2008-07-06 Robert Hogan <ro...@ro...> --- 1,11 ---- 2009-02-16 Robert Hogan <ro...@ro...> KlamAV 0.45 ! o Add new iconset from Maarten van Gent. ! o Ukrainian Translation from Yuri Chornoivan ! o Fix compilation against ClamAV 0.94 ! o Fix bug #258424 in ubuntu bug tracker. ! o Install Konqueror Action 'Scan with KlamAV' so that it works on all systems. ! o Fix bug 213690 in ubuntu bugtracker. Whitespace fixes. ! o Fix paths when creating crontask. Patch from Marc Benstein 2008-07-06 Robert Hogan <ro...@ro...> |
|
From: Robert H. <hog...@us...> - 2009-02-17 20:37:47
|
Update of /cvsroot/klamav/klamav/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26413/src Modified Files: schedule.cpp Log Message: Fix bug #258424 in ubuntu bug tracker. Index: schedule.cpp =================================================================== RCS file: /cvsroot/klamav/klamav/src/schedule.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** schedule.cpp 17 Feb 2009 20:13:32 -0000 1.4 --- schedule.cpp 17 Feb 2009 20:37:42 -0000 1.5 *************** *** 376,385 **** ts << "until [ -z \"$1\" ] # Until all parameters used up..." << "\n"; ts << "do" << "\n"; ! ts << " if [ \"$URL\" = \"\" ]; then" << "\n"; ts << " URL=$1" << "\n"; ts << " SCANTHIS=$1" << "\n"; ts << " else" << "\n"; ! ts << " URL=$URL'*'$1" << "\n"; ! ts << " SCANTHIS=$SCANTHIS' '$1" << "\n"; ts << " fi" << "\n"; ts << " shift" << "\n"; --- 376,385 ---- ts << "until [ -z \"$1\" ] # Until all parameters used up..." << "\n"; ts << "do" << "\n"; ! ts << " if [ \"${URL}\" = \"\" ]; then" << "\n"; ts << " URL=$1" << "\n"; ts << " SCANTHIS=$1" << "\n"; ts << " else" << "\n"; ! ts << " URL=${URL}'*'$1" << "\n"; ! ts << " SCANTHIS=${SCANTHIS}' '$1" << "\n"; ts << " fi" << "\n"; ts << " shift" << "\n"; *************** *** 387,394 **** ts << "DCOPEXEC=`which dcop`" << "\n"; ts << "KLAMAVEXEC=`which klamav`" << "\n"; ! ts << "if $DCOPEXEC `$DCOPEXEC|grep klamav|head -1` DCOPKlamscan scanURLs \"${URL}\"; then" << "\n"; ts << " exit 0" << "\n"; ts << "else" << "\n"; ! ts << " $KLAMAVEXEC --scanthis $SCANTHIS" << "\n"; ts << "fi" << "\n"; --- 387,394 ---- ts << "DCOPEXEC=`which dcop`" << "\n"; ts << "KLAMAVEXEC=`which klamav`" << "\n"; ! ts << "if ${DCOPEXEC} `${DCOPEXEC}|grep klamav|head -1` DCOPKlamscan scanURLs \"${URL}\"; then" << "\n"; ts << " exit 0" << "\n"; ts << "else" << "\n"; ! ts << " ${KLAMAVEXEC} --scanthis ${SCANTHIS}" << "\n"; ts << "fi" << "\n"; |
|
From: Robert H. <hog...@us...> - 2009-02-17 20:25:03
|
Update of /cvsroot/klamav/klamav/src/action In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19658/src/action Modified Files: Makefile.am Log Message: Install Konqueror Action 'Scan with KlamAV' so that it works on all systems. Index: Makefile.am =================================================================== RCS file: /cvsroot/klamav/klamav/src/action/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile.am 3 Feb 2006 20:35:08 -0000 1.1.1.1 --- Makefile.am 17 Feb 2009 20:24:58 -0000 1.2 *************** *** 1,3 **** ! action_DATA = \ ScanWithKlamAV --- 1,3 ---- ! bin_SCRIPTS = \ ScanWithKlamAV |
|
From: Robert H. <hog...@us...> - 2009-02-17 20:15:20
|
Update of /cvsroot/klamav/klamav/src/klammail In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14535/src/klammail Modified Files: clamdmail.c Log Message: Fix bug 213690 in ubuntu bugtracker. Whitespace fixes. Index: clamdmail.c =================================================================== RCS file: /cvsroot/klamav/klamav/src/klammail/clamdmail.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** clamdmail.c 16 Feb 2009 19:21:46 -0000 1.6 --- clamdmail.c 17 Feb 2009 20:15:16 -0000 1.7 *************** *** 54,65 **** struct s_info { ! int signs; /* number of signatures loaded */ ! int dirs; /* number of scanned directories */ ! int files; /* number of scanned files */ ! int ifiles; /* number of infected files */ ! int notremoved; /* number of not removed files (if --remove) */ ! int notmoved; /* number of not moved files (if --move) */ ! int errors; /* ... of errors */ ! long int blocks; /* number of read 16kb blocks */ }; --- 54,65 ---- struct s_info { ! int signs; /* number of signatures loaded */ ! int dirs; /* number of scanned directories */ ! int files; /* number of scanned files */ ! int ifiles; /* number of infected files */ ! int notremoved; /* number of not removed files (if --remove) */ ! int notmoved; /* number of not moved files (if --move) */ ! int errors; /* ... of errors */ ! long int blocks; /* number of read 16kb blocks */ }; *************** *** 75,459 **** int clamdscan(struct optstruct *opt) { ! int ds, dms; ! struct timeval t1, t2; ! struct timezone tz; ! const char *bndrystore; ! const char *tmpdir; ! char *tmpfil; ! char *pfx; ! char *tmper; ! char *dir; ! struct passwd *user = NULL; ! FILE *tmp; ! FILE *fs; ! int bytes; ! char buff[BUFFSIZE]; ! struct cl_node *trie = NULL; ! int threads = 0; ! int fd, fdtmp, ret, no = 0; ! unsigned long int size = 0; ! long double mb; ! const char *virname; ! struct cl_engine *engine = NULL; ! struct cl_limits limits; ! struct stat sb; ! if(optc(opt, 'V')) { ! mprintf("clamdmail "KLAMAV_VERSION" \n"); ! mexit(0); ! } ! ! if(optc(opt, 'h')) { ! free_opt(opt); ! help(); ! } ! ! if(optc(opt, 'i')) printinfected = 1; ! else printinfected = 0; ! ! ! ! memset(&claminfo, 0, sizeof(struct s_info)); ! ! gettimeofday(&t1, &tz); ! //if(user) ! ! char name[19]; ! char *tmpnm; ! char *mdir; - if((mdir = getenv("TMPDIR")) == NULL) - #ifdef P_tmpdir - mdir = P_tmpdir; - #else - mdir = "/tmp"; - #endif - tmpnm = (char*) mcalloc(strlen(mdir) + 1 + 16 + 1 + 7, sizeof(char)); - if(tmpnm == NULL) { - exit(2); - } ! //snprintf(fullname, sizeof(fullname), "%s/pdfXXXXXX", dir); ! sprintf(tmpnm, "%s/", mdir); ! snprintf(name, sizeof(name), "klammailXXXXXX"); ! strncat(tmpnm, name, 19); ! mkstemp(tmpnm); ! fd = open(tmpnm,O_RDWR|O_CREAT, S_IRWXU); ! while((bytes = read(0, buff, BUFFSIZE)) > 0) { ! if(write(fd, buff, bytes) != bytes) { ! close(fd); ! return CL_EMEM; ! } ! } ! if(fsync(fd) == -1) { ! close(fd); ! return CL_EIO; ! } - close(fd); - if((fd = open(tmpnm, O_RDONLY)) == -1) { - printf("Can't open file %s\n", tmpnm); - exit(2); - } ! ret = 0; ! ret = client(tmpnm, opt, &virname); ! /* load all available databases from default directory */ ! if((ret == 2)) { ! startclamd(opt); ! if(optc(opt, 'd')) { ! if((ret = cl_load(getargc(opt, 'd'), &engine, &no, CL_DB_STDOPT))) { ! printf("cl_load: %s\n", cl_strerror(ret)); ! close(fd); ! return 50; ! } ! }else{ ! if((ret = cl_loaddbdir(cl_retdbdir(), &engine, &no, CL_DB_STDOPT))) { ! printf("cl_loaddbdir: %s\n", cl_strerror(ret)); ! close(fd); ! exit(2); ! } ! } ! /* build engine */ ! if((ret = cl_build(engine))) { ! printf("Database initialization error: %s\n", cl_strerror(ret));; ! cl_free(engine); ! close(fd); ! exit(2); ! } ! /* set up archive limits */ ! memset(&limits, 0, sizeof(struct cl_limits)); ! limits.maxfiles = 1000; /* max files */ ! limits.maxfilesize = 10 * 1048576; /* maximum size of archived/compressed ! * file (files exceeding this limit ! * will be ignored) ! */ ! /*limits.maxreclevel = 5;*/ /* maximum recursion level for archives */ ! /*limits.maxmailrec = 64;*/ /* maximum recursion level for mail files */ ! /*limits.maxratio = 200;*/ /* maximum compression ratio */ ! limits.archivememlim = 1; ! ret = cl_scandesc(fd, &virname, &size, engine, &limits, CL_SCAN_STDOPT | CL_ARCHIVE | CL_MAIL | CL_OLE2 | CL_SCAN_HTML); ! } ! /* scan descriptor (with archive and mail scanning enabled) */ ! close(fd); ! fd = open(tmpnm,O_RDWR, S_IRWXU); - spoolstdin(fd, ret, &virname, &bndrystore, opt); - if((ret == 2)) - cl_free(engine); ! unlink(tmpnm); ! mexit(0); } ! int spoolstdin(int fd, int ret, char **virname, const char **bndrystore, struct optstruct *opt) { ! int bytes; ! int i, j; ! long int size = 0; ! char buff[BUFFSIZE]; ! char string[1000]; ! char To[1000]; ! char ReplyTo[1000]; ! char DelivTo[1000]; ! char From[1000]; ! char ToR[1000]; ! char FromR[1000]; ! char boundary[1000]; ! char host[256]; /* could be HOST_NAME_MAX+1 on POSIX 1003.1-2001 */ ! struct timeval tv; ! struct timezone tz; ! char *s; ! char *storage; ! FILE *tmp; ! int pcount = 0; ! time_t starttime; ! struct tm *tm; ! char *out = NULL; ! const char *format; ! size_t out_length = 0; ! time_t when; ! int childpid; ! - strcpy (To, "To:"); - strcpy (From, "From:"); - strcpy (ReplyTo, "Reply-To:"); - strcpy (DelivTo, "Delivered"); ! gethostname(host, sizeof(host)); ! gettimeofday(&tv, &tz); ! time(&when); ! tm = localtime(&when); ! format = "%a, %_d %b %Y %H:%M:%S %z"; ! do { ! out_length += 200; ! out = (char *) realloc (out, out_length); ! out[0] = '\1'; ! } while (strftime (out, out_length, format, tm) == 0 && out[0] != '\0'); ! if(ret == CL_VIRUS) { ! if(!(optc(opt, 'f'))){ ! lseek(fd, 0, SEEK_SET); ! if (!(tmp = fdopen(fd,"r"))){ ! mprintf("@Can't open file \n"); ! return 54; ! } ! ! mprintf_stdout = 1; ! ! while (fgets(string, sizeof(string), tmp)) { ! if (strstr(string, To) && !(strstr(string, ReplyTo)) && !(strstr(string,DelivTo))){ ! strcpy(To, string); ! strcpy(ToR, string); ! } ! if (strstr(string, From)){ ! strcpy(FromR, string); ! } ! if (strncmp(string, "\n", 1) == 0 && pcount != 0){ ! break; ! } ! ++pcount; ! } ! ! if (strcmp(To,"To:") == 0){ ! strcat(To, " "); ! strcat(To, getargl(opt, "admin")); ! strcat(To, "\n"); ! } ! strcat(From, " "); ! strcat(From, "KlamAV"); ! strcat(From, "\n"); ! strcat(ReplyTo, " "); ! strcat(ReplyTo, "KlamAV"); ! strcat(ReplyTo, "\n"); ! mprintf("%s", From); ! mprintf("%s", ReplyTo); ! mprintf("%s", To); ! mprintf("Subject: Virus %s found in attached mail by KlamAV.\n", *virname); ! mprintf("Date: %s\n", out); ! if(!(optl(opt, "quar"))){ ! mprintf("MIME-Version: 1.0\n"); ! mprintf("Content-Type: multipart/mixed;\n"); ! mprintf(" boundary=\"----------=_%d\"\n",tv.tv_sec); ! mprintf("X-Virus-Status: Yes\n"); ! mprintf("X-Virus-Checker: Scanned by KlamAV %s on %s (virus-found %s);\n\t%s\n", ! KLAMAV_VERSION, host, *virname, out); ! mprintf("\n"); ! mprintf("\n"); ! mprintf("------------=_%d\n",tv.tv_sec); ! } ! mprintf("Content-Type: text/plain;\n"); ! mprintf(" charset=\"us-ascii\"\n"); ! mprintf("Content-Transfer-Encoding: quoted-printable\n"); ! if((optl(opt, "quar"))){ ! mprintf("X-Virus-Status: Yes\n"); ! mprintf("X-Virus-Checker: Scanned by KlamAV %s on %s (virus-found %s);\n\t%s\n", ! KLAMAV_VERSION, host, *virname, out); ! mprintf("\n"); ! mprintf("KlamAV anti-virus scanner has intercepted and quarantined a message addressed to you.\n"); ! } ! else ! { ! mprintf("\n"); ! mprintf("KlamAV anti-virus scanner has detected a virus in the attached message.\n"); ! } ! mprintf("\n"); ! mprintf("The following is a summary of the infected message:\n"); ! mprintf("\n"); ! mprintf("Virus name: %s\n", *virname); ! mprintf("%s", FromR); ! mprintf("%s", ToR); ! mprintf("\n"); ! mprintf("Please be aware that a virus spread by email normally forges the \n"); ! mprintf("address of the sender. There is a good chance that the infected message\n"); ! mprintf("was not received from the sender listed above. \n"); ! mprintf("\n"); ! if(!(optl(opt, "quar"))){ ! mprintf("------------=_%d\n",tv.tv_sec); ! mprintf("Content-Type: message/rfc822; x-virus-type=original\n"); ! mprintf("Content-Description: Infected Message - Open At Your Own Risk\n"); ! mprintf("Content-Disposition: inline\n"); ! mprintf("Content-Transfer-Encoding: 8bit\n"); ! mprintf("\n"); ! fflush(stdout); ! ! lseek(fd, 0, SEEK_SET); ! while((bytes = read(fd, buff, BUFFSIZE)) > 0) { ! ! if(write(1, buff, bytes) != bytes) { ! // cli_dbgmsg("clamdmail -> Can't write() file.\n"); ! close(fd); ! return CL_EMEM; ! } ! } ! mprintf("------------=_%d--\n",tv.tv_sec); ! } ! fflush(stdout); ! ! fclose(tmp); ! }else{ ! int bcnt = 0; ! lseek(fd, 0, SEEK_SET); ! if (!(tmp = fdopen(fd,"r"))){ ! mprintf("@Can't open file %s\n", fd); ! return 54; ! } ! ! mprintf_stdout = 1; ! while (fgets(string, sizeof(string), tmp)) { ! if (*string == '\n') { ! mprintf("X-Virus-Status: Yes\n"); ! mprintf("X-Virus-Checker: Scanned by KlamAV %s on %s (virus-found %s);\n\t%s\n", ! KLAMAV_VERSION, host, *virname, out); ! break; ! } ! fputs(string, stdout); ! } ! while (fgets(string, sizeof(string), tmp)) { ! fputs(string, stdout); ! } ! //} ! ! if(optl(opt, "tag")) ! if (!(*bndrystore)) ! printtag(); ! ! fclose(tmp); ! } ! ! if ( ( childpid=fork() ) == -1 ) { ! perror("Failed to fork; quitting\n"); ! exit(2); ! } ! ! if ( childpid == 0 ) { ! char *dialogmessage; ! dialogmessage = malloc(77+sizeof(virname)+sizeof(FromR)+sizeof(ToR)+4+84+54); ! sprintf(dialogmessage,"KlamAV has found an infected mail with the following details:\nVirus name: %s\n%s\n%s\nThe mail has been handled according to the filter rules set up in your mail client (probably put in your trash/deleted items directory).",*virname,FromR,ToR); ! ! if (setenv("PATH","/usr/local/sbin:/usr/sbin:/sbin:/usr/bin:/bin:/usr/local/bin:/opt/kde/bin",1) == 0) ! execlp("kdialog", "kdialog", "--msgbox", dialogmessage, "--title", "Virus found by KlamAV:", NULL); ! free(dialogmessage); ! } ! } else if(ret == CL_CLEAN) { ! int bcnt = 0; ! lseek(fd, 0, SEEK_SET); ! if (!(tmp = fdopen(fd,"r"))){ ! mprintf("@Can't open file %s\n", fd); ! return 54; ! } ! mprintf_stdout = 1; ! while (fgets(string, sizeof(string), tmp)) { ! if (*string == '\n') { ! mprintf("X-Virus-Status: No\n"); ! mprintf("X-Virus-Checker: Scanned by KlamAV %s on %s (no viruses);\n\t%s\n\n", ! KLAMAV_VERSION, host, out); ! break; ! } ! fputs(string, stdout); ! } ! while (fgets(string, sizeof(string), tmp)) { ! fputs(string, stdout); ! } ! //} ! if(optl(opt, "tag")) ! if (!(*bndrystore)) ! printtag(); ! fclose(tmp); ! } else ! if(!printinfected) ! mprintf("stdin: %s\n", cl_strerror(ret)); ! ! return ret; } --- 75,450 ---- int clamdscan(struct optstruct *opt) { ! int ds, dms; ! struct timeval t1, t2; ! struct timezone tz; ! const char *bndrystore; ! const char *tmpdir; ! char *tmpfil; ! char *pfx; ! char *tmper; ! char *dir; ! struct passwd *user = NULL; ! FILE *tmp; ! FILE *fs; ! int bytes; ! char buff[BUFFSIZE]; ! struct cl_node *trie = NULL; ! int threads = 0; ! int fd, fdtmp, ret, no = 0; ! unsigned long int size = 0; ! long double mb; ! const char *virname; ! struct cl_engine *engine = NULL; ! struct cl_limits limits; ! struct stat sb; ! if(optc(opt, 'V')) { ! mprintf("clamdmail "KLAMAV_VERSION" \n"); ! mexit(0); ! } ! if(optc(opt, 'h')) { ! free_opt(opt); ! help(); ! } ! if(optc(opt, 'i')) printinfected = 1; ! else printinfected = 0; ! memset(&claminfo, 0, sizeof(struct s_info)); ! gettimeofday(&t1, &tz); + //if(user) ! char name[19]; ! char *tmpnm; ! char *mdir; ! if((mdir = getenv("TMPDIR")) == NULL) ! #ifdef P_tmpdir ! mdir = P_tmpdir; ! #else ! mdir = "/tmp"; ! #endif ! tmpnm = (char*) mcalloc(strlen(mdir) + 1 + 16 + 1 + 7, sizeof(char)); ! if(tmpnm == NULL) { ! exit(2); ! } ! sprintf(tmpnm, "%s/", mdir); ! snprintf(name, sizeof(name), "klammailXXXXXX"); ! strncat(tmpnm, name, 19); ! mkstemp(tmpnm); ! fd = open(tmpnm,O_RDWR|O_CREAT, S_IRWXU); + while((bytes = read(0, buff, BUFFSIZE)) > 0) { + if(write(fd, buff, bytes) != bytes) { + close(fd); + return CL_EMEM; + } + } ! if(fsync(fd) == -1) { ! close(fd); ! return CL_EIO; ! } ! close(fd); ! if((fd = open(tmpnm, O_RDONLY)) == -1) { ! printf("Can't open file %s\n", tmpnm); ! exit(2); ! } ! ret = 0; ! ret = client(tmpnm, opt, &virname); ! /* load all available databases from default directory */ ! if((ret == 2)) { ! startclamd(opt); ! if(optc(opt, 'd')) { ! if((ret = cl_load(getargc(opt, 'd'), &engine, &no, CL_DB_STDOPT))) { ! printf("cl_load: %s\n", cl_strerror(ret)); ! close(fd); ! return 50; ! } ! }else{ ! if((ret = cl_loaddbdir(cl_retdbdir(), &engine, &no, CL_DB_STDOPT))) { ! printf("cl_loaddbdir: %s\n", cl_strerror(ret)); ! close(fd); ! exit(2); ! } ! } ! ! /* build engine */ ! if((ret = cl_build(engine))) { ! printf("Database initialization error: %s\n", cl_strerror(ret));; ! cl_free(engine); ! close(fd); ! exit(2); ! } ! /* set up archive limits */ ! memset(&limits, 0, sizeof(struct cl_limits)); ! limits.maxfiles = 1000; /* max files */ ! limits.maxfilesize = 10 * 1048576; /* maximum size of archived/compressed ! * file (files exceeding this limit ! * will be ignored) ! */ ! /*limits.maxreclevel = 5;*/ /* maximum recursion level for archives */ ! /*limits.maxmailrec = 64;*/ /* maximum recursion level for mail files */ ! /*limits.maxratio = 200;*/ /* maximum compression ratio */ ! limits.archivememlim = 1; ! ret = cl_scandesc(fd, &virname, &size, engine, &limits, CL_SCAN_STDOPT | CL_ARCHIVE | CL_MAIL | CL_OLE2 | CL_SCAN_HTML); ! } ! ! /* scan descriptor (with archive and mail scanning enabled) */ ! close(fd); ! fd = open(tmpnm,O_RDWR, S_IRWXU); + spoolstdin(tmpnm, fd, ret, &virname, &bndrystore, opt); + if((ret == 2)) + cl_free(engine); + unlink(tmpnm); ! mexit(0); } ! int spoolstdin(char *tmpnm, int fd, int ret, char **virname, const char **bndrystore, struct optstruct *opt) { ! int bytes; ! int i, j; ! long int size = 0; ! char buff[BUFFSIZE]; ! char string[1000]; ! char To[1000]; ! char ReplyTo[1000]; ! char DelivTo[1000]; ! char From[1000]; ! char ToR[1000]; ! char FromR[1000]; ! char boundary[1000]; ! char host[256]; /* could be HOST_NAME_MAX+1 on POSIX 1003.1-2001 */ ! struct timeval tv; ! struct timezone tz; ! char *s; ! char *storage; ! FILE *tmp; ! int pcount = 0; ! time_t starttime; ! struct tm *tm; ! char *out = NULL; ! const char *format; ! size_t out_length = 0; ! time_t when; ! int childpid; ! strcpy (To, "To:"); ! strcpy (From, "From:"); ! strcpy (ReplyTo, "Reply-To:"); ! strcpy (DelivTo, "Delivered"); ! gethostname(host, sizeof(host)); ! gettimeofday(&tv, &tz); ! time(&when); ! tm = localtime(&when); ! format = "%a, %_d %b %Y %H:%M:%S %z"; ! do { ! out_length += 200; ! out = (char *) realloc (out, out_length); ! out[0] = '\1'; ! } while (strftime (out, out_length, format, tm) == 0 && out[0] != '\0'); ! if(ret == CL_VIRUS) { ! if(!(optc(opt, 'f'))){ ! lseek(fd, 0, SEEK_SET); ! if (!(tmp = fdopen(fd,"r"))){ ! mprintf("@Can't open file %s\n", tmpnm); ! return 54; ! } ! mprintf_stdout = 1; ! while (fgets(string, sizeof(string), tmp)) { ! if (strstr(string, To) && !(strstr(string, ReplyTo)) && !(strstr(string,DelivTo))){ ! strcpy(To, string); ! strcpy(ToR, string); ! } ! if (strstr(string, From)){ ! strcpy(FromR, string); ! } ! if (strncmp(string, "\n", 1) == 0 && pcount != 0){ ! break; ! } ! ++pcount; ! } ! if (strcmp(To,"To:") == 0){ ! strcat(To, " "); ! strcat(To, getargl(opt, "admin")); ! strcat(To, "\n"); ! } ! strcat(From, " "); ! strcat(From, "KlamAV"); ! strcat(From, "\n"); ! strcat(ReplyTo, " "); ! strcat(ReplyTo, "KlamAV"); ! strcat(ReplyTo, "\n"); ! mprintf("%s", From); ! mprintf("%s", ReplyTo); ! mprintf("%s", To); ! mprintf("Subject: Virus %s found in attached mail by KlamAV.\n", *virname); ! mprintf("Date: %s\n", out); ! if(!(optl(opt, "quar"))){ ! mprintf("MIME-Version: 1.0\n"); ! mprintf("Content-Type: multipart/mixed;\n"); ! mprintf(" boundary=\"----------=_%d\"\n",tv.tv_sec); ! mprintf("X-Virus-Status: Yes\n"); ! mprintf("X-Virus-Checker: Scanned by KlamAV %s on %s (virus-found %s);\n\t%s\n", ! KLAMAV_VERSION, host, *virname, out); ! mprintf("\n"); ! mprintf("\n"); ! mprintf("------------=_%d\n",tv.tv_sec); ! } ! mprintf("Content-Type: text/plain;\n"); ! mprintf(" charset=\"us-ascii\"\n"); ! mprintf("Content-Transfer-Encoding: quoted-printable\n"); ! if((optl(opt, "quar"))){ ! mprintf("X-Virus-Status: Yes\n"); ! mprintf("X-Virus-Checker: Scanned by KlamAV %s on %s (virus-found %s);\n\t%s\n", ! KLAMAV_VERSION, host, *virname, out); ! mprintf("\n"); ! mprintf("KlamAV anti-virus scanner has intercepted and quarantined a message addressed to you.\n"); ! } ! else ! { ! mprintf("\n"); ! mprintf("KlamAV anti-virus scanner has detected a virus in the attached message.\n"); ! } ! mprintf("\n"); ! mprintf("The following is a summary of the infected message:\n"); ! mprintf("\n"); ! mprintf("Virus name: %s\n", *virname); ! mprintf("%s", FromR); ! mprintf("%s", ToR); ! mprintf("\n"); ! mprintf("Please be aware that a virus spread by email normally forges the \n"); ! mprintf("address of the sender. There is a good chance that the infected message\n"); ! mprintf("was not received from the sender listed above. \n"); ! mprintf("\n"); ! if(!(optl(opt, "quar"))){ ! mprintf("------------=_%d\n",tv.tv_sec); ! mprintf("Content-Type: message/rfc822; x-virus-type=original\n"); ! mprintf("Content-Description: Infected Message - Open At Your Own Risk\n"); ! mprintf("Content-Disposition: inline\n"); ! mprintf("Content-Transfer-Encoding: 8bit\n"); ! mprintf("\n"); ! fflush(stdout); ! lseek(fd, 0, SEEK_SET); ! while((bytes = read(fd, buff, BUFFSIZE)) > 0) { ! ! if(write(1, buff, bytes) != bytes) { ! close(fd); ! return CL_EMEM; ! } ! } ! mprintf("------------=_%d--\n",tv.tv_sec); ! } ! fflush(stdout); ! ! fclose(tmp); ! }else{ ! int bcnt = 0; ! lseek(fd, 0, SEEK_SET); ! if (!(tmp = fdopen(fd,"r"))){ ! mprintf("@Can't open file %s\n", tmpnm); ! return 54; ! } ! ! mprintf_stdout = 1; ! ! while (fgets(string, sizeof(string), tmp)) { ! if (*string == '\n') { ! mprintf("X-Virus-Status: Yes\n"); ! mprintf("X-Virus-Checker: Scanned by KlamAV %s on %s (virus-found %s);\n\t%s\n", ! KLAMAV_VERSION, host, *virname, out); ! break; ! } ! fputs(string, stdout); ! } ! while (fgets(string, sizeof(string), tmp)) { ! fputs(string, stdout); ! } ! ! if(optl(opt, "tag")) { ! if (!(*bndrystore)) ! printtag(); ! } ! fclose(tmp); ! } ! ! if ( ( childpid=fork() ) == -1 ) { ! perror("Failed to fork; quitting\n"); ! exit(2); ! } ! ! if ( childpid == 0 ) { ! char *dialogmessage; ! dialogmessage = malloc(77+sizeof(virname)+sizeof(FromR)+sizeof(ToR)+4+84+54); ! sprintf(dialogmessage,"KlamAV has found an infected mail with the following details:\nVirus name: %s\n%s\n%s\nThe mail has been handled according to the filter rules set up in your mail client (probably put in your trash/deleted items directory).",*virname,FromR,ToR); ! ! if (setenv("PATH","/usr/local/sbin:/usr/sbin:/sbin:/usr/bin:/bin:/usr/local/bin:/opt/kde/bin",1) == 0) ! execlp("kdialog", "kdialog", "--msgbox", dialogmessage, "--title", "Virus found by KlamAV:", NULL); ! free(dialogmessage); ! } ! } else if(ret == CL_CLEAN) { ! int bcnt = 0; ! lseek(fd, 0, SEEK_SET); ! if (!(tmp = fdopen(fd,"r"))){ ! mprintf("@Can't open file %s\n", tmpnm); ! return 54; ! } ! ! mprintf_stdout = 1; ! ! while (fgets(string, sizeof(string), tmp)) { ! if (*string == '\n') { ! mprintf("X-Virus-Status: No\n"); ! mprintf("X-Virus-Checker: Scanned by KlamAV %s on %s (no viruses);\n\t%s\n\n", ! KLAMAV_VERSION, host, out); ! break; ! } ! fputs(string, stdout); ! } ! while (fgets(string, sizeof(string), tmp)) { ! fputs(string, stdout); ! } ! ! if(optl(opt, "tag")) ! if (!(*bndrystore)) ! printtag(); ! ! fclose(tmp); ! } else { ! if(!printinfected) ! mprintf("stdin: %s\n", cl_strerror(ret)); ! } ! return ret; } *************** *** 500,585 **** { ! int pfds[2]; ! int childpid; ! int fd; ! char tmpnm[19]; ! char conffile[31]; ! struct stat sb; ! FILE *tmp; ! char *fullpath; ! char cwd[200]; ! char *scancmd; ! ! snprintf(tmpnm, sizeof(tmpnm), "klammailXXXXXX"); ! mkstemp(tmpnm); ! ! fd = open(tmpnm,O_RDWR|O_CREAT, S_IRWXU); ! lseek(fd, 0, SEEK_SET); ! if (!(tmp = fdopen(fd,"w"))){ ! mprintf("@Can't open file \n"); ! } - fprintf(tmp,"LocalSocket /tmp/KlamMailSock\n"); - fprintf(tmp,"MaxDirectoryRecursion 15\n"); - fprintf(tmp,"SelfCheck 900\n"); - //fprintf(tmp,"ScanArchive\n"); - if(optc(opt, 'd')) { - stat(getargc(opt, 'd'), &sb); - switch(sb.st_mode & S_IFMT) { - case S_IFREG: - fprintf(tmp,"DatabaseDirectory %s\n",getargc(opt, 'd')); - break; - case S_IFDIR: - fprintf(tmp,"DatabaseDirectory %s\n",getargc(opt, 'd')); - break; - default: - mprintf("@%s: Not supported database file type\n", getargc(opt, 'd')); - break; - } - }else{ - fprintf(tmp,"DatabaseDirectory /usr/local/share/clamav\n"); - } - //fprintf(tmp,"ScanMail\n"); - if ((strstr(cl_retver(), "0.8")) || (strstr(cl_retver(), "0.7"))) - fprintf(tmp,"FixStaleSocket\n"); - else - fprintf(tmp,"FixStaleSocket TRUE\n"); ! fflush(tmp); ! ! fclose(tmp); ! close(fd); ! fullpath = (char*) mcalloc(200 + strlen(tmpnm) + 10, sizeof(char)); ! if(!getcwd(cwd, 200)) { ! mprintf("@Can't get absolute pathname of current working directory.\n"); ! return; ! } ! sprintf(fullpath, "%s/%s", cwd, tmpnm); ! ! if ( pipe(pfds) == -1 ) { ! perror("Failed to create pipe; quitting\n"); ! exit(1); ! } ! if ( ( childpid=fork() ) == -1 ) { ! perror("Failed to fork; quitting\n"); ! exit(2); ! } ! /* instead of STDIN -> clamdmail -> STDOUT, do ! STDIN -> clamdmail -> spamc -> STDOUT ! (previously incorrect as STDIN -> spamc -> clamdmail -> STDOUT) ! */ ! if ( childpid == 0 ) { ! if (setenv("PATH","/usr/local/sbin:/usr/sbin:/sbin:/usr/bin:/bin:/usr/local/bin:/opt/kde/bin",1) == 0) ! execlp("clamd", "clamd", "-c", fullpath, NULL); ! } ! sleep(1); ! unlink(fullpath); } --- 491,576 ---- { ! int pfds[2]; ! int childpid; ! int fd; ! char tmpnm[19]; ! char conffile[31]; ! struct stat sb; ! FILE *tmp; ! char *fullpath; ! char cwd[200]; ! char *scancmd; + snprintf(tmpnm, sizeof(tmpnm), "klammailXXXXXX"); + mkstemp(tmpnm); ! fd = open(tmpnm,O_RDWR|O_CREAT, S_IRWXU); ! lseek(fd, 0, SEEK_SET); ! if (!(tmp = fdopen(fd,"w"))){ ! mprintf("@Can't open file \n"); ! } ! fprintf(tmp,"LocalSocket /tmp/KlamMailSock\n"); ! fprintf(tmp,"MaxDirectoryRecursion 15\n"); ! fprintf(tmp,"SelfCheck 900\n"); ! //fprintf(tmp,"ScanArchive\n"); ! if(optc(opt, 'd')) { ! stat(getargc(opt, 'd'), &sb); ! switch(sb.st_mode & S_IFMT) { ! case S_IFREG: ! fprintf(tmp,"DatabaseDirectory %s\n",getargc(opt, 'd')); ! break; ! case S_IFDIR: ! fprintf(tmp,"DatabaseDirectory %s\n",getargc(opt, 'd')); ! break; ! default: ! mprintf("@%s: Not supported database file type\n", getargc(opt, 'd')); ! break; ! } ! }else{ ! fprintf(tmp,"DatabaseDirectory /usr/local/share/clamav\n"); ! } ! //fprintf(tmp,"ScanMail\n"); ! if ((strstr(cl_retver(), "0.8")) || (strstr(cl_retver(), "0.7"))) ! fprintf(tmp,"FixStaleSocket\n"); ! else ! fprintf(tmp,"FixStaleSocket TRUE\n"); ! fflush(tmp); ! fclose(tmp); ! close(fd); ! fullpath = (char*) mcalloc(200 + strlen(tmpnm) + 10, sizeof(char)); ! if(!getcwd(cwd, 200)) { ! mprintf("@Can't get absolute pathname of current working directory.\n"); ! return; ! } ! sprintf(fullpath, "%s/%s", cwd, tmpnm); ! ! if ( pipe(pfds) == -1 ) { ! perror("Failed to create pipe; quitting\n"); ! exit(1); ! } ! ! if ( ( childpid=fork() ) == -1 ) { ! perror("Failed to fork; quitting\n"); ! exit(2); ! } ! ! /* instead of STDIN -> clamdmail -> STDOUT, do ! STDIN -> clamdmail -> spamc -> STDOUT ! (previously incorrect as STDIN -> spamc -> clamdmail -> STDOUT) ! */ ! if ( childpid == 0 ) { ! if (setenv("PATH","/usr/local/sbin:/usr/sbin:/sbin:/usr/bin:/bin:/usr/local/bin:/opt/kde/bin",1) == 0) ! execlp("clamd", "clamd", "-c", fullpath, NULL); ! } ! ! sleep(1); ! unlink(fullpath); } |
|
From: Robert H. <hog...@us...> - 2009-02-17 20:13:38
|
Update of /cvsroot/klamav/klamav/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13534/src Modified Files: schedule.cpp Log Message: Fix paths when creating crontask. Patch from Marc Benstein Index: schedule.cpp =================================================================== RCS file: /cvsroot/klamav/klamav/src/schedule.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** schedule.cpp 5 Jan 2008 13:21:34 -0000 1.3 --- schedule.cpp 17 Feb 2009 20:13:32 -0000 1.4 *************** *** 366,370 **** ts << QString("PATH=%1").arg(QString(getenv("PATH"))) << "\n"; ts << "export PATH" << "\n"; ! ts << "DCOPSERVER=`cat /home/$USER/.DCOPserver_$HOSTNAME_:0 | grep local`" << "\n"; ts << "export DCOPSERVER" << "\n"; ts << "DISPLAY=:0" << "\n"; --- 366,370 ---- ts << QString("PATH=%1").arg(QString(getenv("PATH"))) << "\n"; ts << "export PATH" << "\n"; ! ts << "DCOPSERVER=`cat /home/${USER}/.DCOPserver_${HOSTNAME}_:0 | grep local`" << "\n"; ts << "export DCOPSERVER" << "\n"; ts << "DISPLAY=:0" << "\n"; *************** *** 385,391 **** ts << " shift" << "\n"; ts << "done" << "\n"; ! ts << "DCOPEXEC=`type dcop`" << "\n"; ! ts << "KLAMAVEXEC=`type klamav`" << "\n"; ! ts << "if $DCOPEXEC `$DCOPEXEC|grep klamav|head -1` DCOPKlamscan scanURLs \"$URL\"; then" << "\n"; ts << " exit 0" << "\n"; ts << "else" << "\n"; --- 385,391 ---- ts << " shift" << "\n"; ts << "done" << "\n"; ! ts << "DCOPEXEC=`which dcop`" << "\n"; ! ts << "KLAMAVEXEC=`which klamav`" << "\n"; ! ts << "if $DCOPEXEC `$DCOPEXEC|grep klamav|head -1` DCOPKlamscan scanURLs \"${URL}\"; then" << "\n"; ts << " exit 0" << "\n"; ts << "else" << "\n"; |
|
From: Robert H. <hog...@us...> - 2009-02-17 19:29:30
|
Update of /cvsroot/klamav/klamav In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14359 Modified Files: Makefile.am TODO Log Message: Index: Makefile.am =================================================================== RCS file: /cvsroot/klamav/klamav/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.am 31 Jul 2006 19:18:34 -0000 1.3 --- Makefile.am 17 Feb 2009 19:29:25 -0000 1.4 *************** *** 18,20 **** cd $(top_distdir) && perl admin/am_edit -padmin cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs - _SOURCES = create-release.sh --- 18,19 ---- Index: TODO =================================================================== RCS file: /cvsroot/klamav/klamav/TODO,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TODO 5 Jan 2008 19:39:23 -0000 1.3 --- TODO 17 Feb 2009 19:29:25 -0000 1.4 *************** *** 2,5 **** --- 2,7 ---- -------------------------------------------------------------------------------------- + * FIX: mountpoints of devices not getting passed + * Fix handling of unicode filenames qhen quaranting * make klamd conditional on kernel type (2.4 only) |
|
From: Robert H. <hog...@us...> - 2009-02-17 19:26:31
|
Update of /cvsroot/klamav/klamav In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv12480 Removed Files: Makefile.in Log Message: --- Makefile.in DELETED --- |
|
From: Robert H. <hog...@us...> - 2009-02-17 19:25:23
|
Update of /cvsroot/klamav/klamav/src/action In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11014/src/action Removed Files: Makefile.in Log Message: --- Makefile.in DELETED --- |
|
From: Robert H. <hog...@us...> - 2009-02-17 19:24:34
|
Update of /cvsroot/klamav/klamav/src/about In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10155/src/about Removed Files: Makefile.in Log Message: --- Makefile.in DELETED --- |
|
From: Robert H. <hog...@us...> - 2009-02-17 19:21:10
|
Update of /cvsroot/klamav/klamav In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv6277 Removed Files: aclocal.m4 Log Message: --- aclocal.m4 DELETED --- |
|
From: Robert H. <hog...@us...> - 2009-02-17 19:21:10
|
Update of /cvsroot/klamav/klamav In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5990 Removed Files: configure.in Log Message: --- configure.in DELETED --- |
|
From: Robert H. <hog...@us...> - 2009-02-16 23:16:39
|
Update of /cvsroot/klamav/klamav In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv8088 Added Files: configure.in Log Message: --- NEW FILE: configure.in --- dnl ======================================================= dnl FILE: ./admin/configure.in.min dnl ======================================================= dnl This file is part of the KDE libraries/packages dnl Copyright (C) 2001 Stephan Kulow (co...@kd...) dnl This file is free software; you can redistribute it and/or dnl modify it under the terms of the GNU Library General Public dnl License as published by the Free Software Foundation; either dnl version 2 of the License, or (at your option) any later version. dnl This library is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl Library General Public License for more details. dnl You should have received a copy of the GNU Library General Public License dnl along with this library; see the file COPYING.LIB. If not, write to dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, dnl Boston, MA 02110-1301, USA. # Original Author was Ka...@kd... # I lifted it in some mater. (Stephan Kulow) # I used much code from Janos Farkas dnl Process this file with autoconf to produce a configure script. AC_INIT(acinclude.m4) dnl a source file from your sub dir dnl This is so we can use kde-common AC_CONFIG_AUX_DIR(admin) dnl This ksh/zsh feature conflicts with `cd blah ; pwd` unset CDPATH dnl Checking host/target/build systems, for make, install etc. AC_CANONICAL_SYSTEM dnl Perform program name transformation AC_ARG_PROGRAM dnl Automake doc recommends to do this only here. (Janos) AM_INIT_AUTOMAKE(klamav, 0.1) dnl searches for some needed programs KDE_SET_PREFIX dnl generate the config header AM_CONFIG_HEADER(config.h) dnl at the distribution this done dnl Checks for programs. AC_CHECK_COMPILERS AC_ENABLE_SHARED(yes) AC_ENABLE_STATIC(no) KDE_PROG_LIBTOOL dnl for NLS support. Call them in this order! dnl WITH_NLS is for the po files AM_KDE_WITH_NLS KDE_USE_QT(3.3.5) AC_PATH_KDE dnl ======================================================= dnl FILE: configure.in.in dnl ======================================================= #MIN_CONFIG(3.3.5) dnl PACKAGE set before AC_C_BIGENDIAN AC_CHECK_KDEMAXPATHLEN ############################################################################### # BEGIN PKG-CONFIG CHECK ############################################################################### AC_ARG_VAR(PKGCONFIGFOUND, [Path to pkg-config]) AC_CHECK_PROG(PKGCONFIGFOUND, pkg-config, [yes]) ############################################################################### # END PKG-CONFIG CHECK ############################################################################### ############################################################################### # BEGIN SQLITE CHECK ############################################################################### LIB_SQLITE="" AC_ARG_WITH(included-sqlite, AC_HELP_STRING([--without-included-sqlite],[build KlamAV using system sqlite library]), [included_sqlite=$withval], [included_sqlite=yes] ) if test x$included_sqlite = xno; then if test x$PKGCONFIGFOUND = xyes; then PKG_CHECK_MODULES(SQLITE, sqlite3 >= 3.0, have_sqlite=yes,have_sqlite=no) if test x$have_sqlite = xyes; then LIB_SQLITE=`pkg-config --libs sqlite3` else AC_MSG_ERROR(Can't find sqlite database library. Check your installation of sqlite or use included sqlite.) fi fi fi AC_SUBST(LIB_SQLITE) AM_CONDITIONAL(with_included_sqlite, [test x$included_sqlite = xyes]) # Determine pointer size for sqlite KDE_CHECK_TYPES AC_DEFINE(SQLITE_PTR_SZ, SIZEOF_CHAR_P, [Determine pointer size for SQLite]) ############################################################################### # END SQLITE CHECK ############################################################################### # ---- Taken from KOffice ---------------------- # --- Check for KDE 3.2 or 3.3 or 3.4 or 3.5 --- AC_MSG_CHECKING([for KDE version]) AC_LANG_SAVE AC_LANG_CPLUSPLUS kdeversion_save_CXXFLAGS="$CXXFLAGS" kdeversion_safe_LIBS="$LIBS" LIBS="$LIBS $X_EXTRA_LIBS" CXXFLAGS="$CXXFLAGS $all_includes" AC_COMPILE_IFELSE([ #include <kdeversion.h> #if ! ( KDE_IS_VERSION( 3, 2, 90 ) ) #error KDE 3.2 #endif ], need_kde32_compat="no" , need_kde32_compat="yes" ) AC_COMPILE_IFELSE([ #include <kdeversion.h> #if ! ( KDE_IS_VERSION( 3, 3, 90 ) ) #error KDE 3.3 #endif ], need_kde33_compat="no" , need_kde33_compat="yes" ) AC_COMPILE_IFELSE([ #include <kdeversion.h> #if ! ( KDE_IS_VERSION( 3, 4, 90 ) ) #error KDE 3.4 #endif ], need_kde34_compat="no" , need_kde34_compat="yes" ) AC_COMPILE_IFELSE([ #include <kdeversion.h> #if ! ( KDE_IS_VERSION( 3, 5, 2 ) ) #error KDE 3.5.x (x < 2) #endif ], need_kde351_compat="no" , need_kde351_compat="yes" ) CXXFLAGS="$kdeversion_save_CXXFLAGS" LIBS="$kdeversion_safe_LIBS" AC_LANG_RESTORE if test "$need_kde32_compat" = "yes"; then AC_MSG_ERROR([You have KDE 3.2.x. KlamAV needs KDE 3.5.2 or greater.]) else if test "$need_kde33_compat" = "yes"; then AC_MSG_ERROR([You have KDE 3.3.x KlamAV needs KDE 3.5.2 or greater.]) else if test "$need_kde34_compat" = "yes"; then AC_MSG_ERROR([You have KDE 3.4.x KlamAV needs KDE 3.5.2 or greater.]) else if test "$need_kde351_compat" = "yes"; then AC_MSG_ERROR([You have KDE 3.5.1. KlamAV needs KDE 3.5.2 or greater.]) else AC_MSG_RESULT([KDE 3.5.x (x >=2) or SVN trunk]) fi fi fi fi # --- End KDE 3.2 check --- AC_CHECK_LIB(clamav, cl_scanfile, [LIB_CLAM=" -lclamav";],AC_MSG_ERROR(Can't find ClamAV's libraries. Please check your installation of ClamAV.)) AC_SUBST(LIB_CLAM) dnl disable updates # Whether we should use the disableupdates memory allocation debugging library. AC_MSG_CHECKING(whether to use disable-updates (build KlamAV with GUI updates disabled )) AC_ARG_WITH(disableupdates, [ --with-disableupdates build KlamAV with GUI updates disabled . ], [if [[ "$withval" = "yes" ]]; then disableupdates=1 AC_MSG_RESULT(yes) else disableupdates=1 AC_MSG_RESULT(no) fi], [ disableupdates=0; AC_MSG_RESULT(no) ] ) if [[ $disableupdates -eq 1 ]]; then AC_DEFINE(DISABLE_UPDATES, 1, "Define to disable gui updates") fi KDE_CREATE_SUBDIRSLIST AC_CONFIG_FILES([ Makefile ]) AC_CONFIG_FILES([ doc/Makefile ]) AC_CONFIG_FILES([ doc/en/Makefile ]) AC_CONFIG_FILES([ po/Makefile ]) AC_CONFIG_FILES([ src/Makefile ]) AC_CONFIG_FILES([ src/about/Makefile ]) AC_CONFIG_FILES([ src/action/Makefile ]) AC_CONFIG_FILES([ src/arkollon/Makefile ]) AC_CONFIG_FILES([ src/icons/Makefile ]) AC_CONFIG_FILES([ src/klamdnew/Makefile ]) AC_CONFIG_FILES([ src/klamdold/Makefile ]) AC_CONFIG_FILES([ src/klammail/Makefile ]) AC_CONFIG_FILES([ src/metadb/Makefile ]) AC_CONFIG_FILES([ src/sqlite/Makefile ]) AC_OUTPUT # Check if KDE_SET_PREFIX was called, and --prefix was passed to configure if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then # And if so, warn when they don't match if test "$kde_libs_prefix" != "$given_prefix"; then # And if kde doesn't know about the prefix yet echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null if test $? -ne 0; then echo "" echo "Warning: you chose to install this package in $given_prefix," echo "but KDE was found in $kde_libs_prefix." echo "For this to work, you will need to tell KDE about the new prefix, by ensuring" echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix" echo "Then restart KDE." echo "" fi fi fi if test x$GXX = "xyes" -a x$kde_have_gcc_visibility = "xyes" -a x$kde_cv_val_qt_gcc_visibility_patched = "xno"; then echo "" echo "Your GCC supports symbol visibility, but the patch for Qt supporting visibility" echo "was not included. Therefore, GCC symbol visibility support remains disabled." echo "" echo "For better performance, consider including the Qt visibility supporting patch" echo "located at:" echo "" echo "http://bugs.kde.org/show_bug.cgi?id=109386" echo "" echo "and recompile all of Qt and KDE. Note, this is entirely optional and" echo "everything will continue to work just fine without it." echo "" fi if test "$all_tests" = "bad"; then if test ! "$cache_file" = "/dev/null"; then echo "" echo "Please remove the file $cache_file after changing your setup" echo "so that configure will find the changes next time." echo "" fi else echo "" echo "Good - your configure finished. Start make now" echo "" fi |
|
From: Robert H. <hog...@us...> - 2009-02-16 22:17:42
|
Update of /cvsroot/klamav/klamav In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18407 Added Files: aclocal.m4 Log Message: --- NEW FILE: aclocal.m4 --- # generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # 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_$1_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. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # 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=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 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 # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar <conftest.tar]) grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([acinclude.m4]) |