[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b

aCaB acab at clamav.net
Sun Apr 4 01:08:58 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit a0b5adccf30ef88423cde787f739d79c59952547
Author: aCaB <acab at clamav.net>
Date:   Sun Nov 1 21:27:15 2009 +0100

    win32: configure.js

diff --git a/ChangeLog b/ChangeLog
index 787ad32..730aec5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun Nov  1 21:26:10 CET 2009 (acab)
+-----------------------------------
+ * win32: improve build system
+
 Sat Oct 31 19:13:18 CET 2009 (acab)
 -----------------------------------
  * win32: add resources
diff --git a/win32/.gitignore b/win32/.gitignore
index bb09bba..abaccdf 100644
--- a/win32/.gitignore
+++ b/win32/.gitignore
@@ -1,4 +1,3 @@
-!clamav-config.h
 !platform.h
 build
 *.ncb
diff --git a/win32/clamav-config.h b/win32/clamav-config.h
deleted file mode 100644
index 4b7f6a9..0000000
--- a/win32/clamav-config.h
+++ /dev/null
@@ -1,562 +0,0 @@
-/* clamav-config.h.  Generated from clamav-config.h.in by configure.  */
-/* clamav-config.h.in.  Generated from configure.in by autoheader.  */
-
-/* Define if building universal (internal helper macro) */
-/* #undef AC_APPLE_UNIVERSAL_BUILD */
-
-/* mmap flag for anonymous maps */
-/* #undef ANONYMOUS_MAP */
-
-/* enable bind8 compatibility */
-/* #undef BIND_8_COMPAT */
-
-/* "build clamd" */
-#define BUILD_CLAMD 1
-
-/* name of the clamav group */
-#define CLAMAVGROUP "clamav"
-
-/* name of the clamav user */
-#define CLAMAVUSER "clamav"
-
-/* enable clamuko */
-/* #undef CLAMUKO */
-
-/* enable debugging */
-/* #undef CL_DEBUG */
-
-/* enable experimental code */
-/* #undef CL_EXPERIMENTAL */
-
-/* thread safe */
-#define CL_THREAD_SAFE 1
-
-/* where to look for the config file */
-#define CONFDIR "C:\\ClamAV"
-
-/* curses header location */
-/* #define CURSES_INCLUDE <ncurses.h>
-
-/* os is aix */
-/* #undef C_AIX */
-
-/* os is beos */
-/* #undef C_BEOS */
-
-/* Increase thread stack size. */
-/* #undef C_BIGSTACK */
-
-/* os is bsd flavor */
-/* #undef C_BSD */
-
-/* os is darwin */
-/* #undef C_DARWIN */
-
-/* target is gnu-hurd */
-/* #undef C_GNU_HURD */
-
-/* os is hpux */
-/* #undef C_HPUX */
-
-/* os is interix */
-/* #undef C_INTERIX */
-
-/* os is irix */
-/* #undef C_IRIX */
-
-/* target is kfreebsd-gnu */
-/* #undef C_KFREEBSD_GNU */
-
-/* target is linux */
-/* #undef C_LINUX */
-
-/* os is OS/2 */
-/* #undef C_OS2 */
-
-/* os is osf/tru64 */
-/* #undef C_OSF */
-
-/* os is QNX 6.x.x */
-/* #undef C_QNX6 */
-
-/* os is solaris */
-/* #undef C_SOLARIS */
-
-/* Path to virus database directory. */
-#define DATADIR "c:\\ClamAV\\db"
-
-/* "default FD_SETSIZE value" */
-#define DEFAULT_FD_SETSIZE 1024
-
-/* whether _XOPEN_SOURCE needs to be defined for fd passing to work */
-/* #undef FDPASS_NEED_XOPEN */
-
-/* file i/o buffer size */
-#define FILEBUFF 8192
-
-/* FPU byte ordering is little endian */
-#define FPU_WORDS_BIGENDIAN 0
-
-/* enable workaround for broken DNS servers */
-/* #undef FRESHCLAM_DNS_FIX */
-
-/* use "Cache-Control: no-cache" in freshclam */
-/* #undef FRESHCLAM_NO_CACHE */
-
-/* Define to 1 if you have the `argz_add' function. */
-#define HAVE_ARGZ_ADD 1
-
-/* Define to 1 if you have the `argz_append' function. */
-#define HAVE_ARGZ_APPEND 1
-
-/* Define to 1 if you have the `argz_count' function. */
-#define HAVE_ARGZ_COUNT 1
-
-/* Define to 1 if you have the `argz_create_sep' function. */
-#define HAVE_ARGZ_CREATE_SEP 1
-
-/* Define to 1 if you have the <argz.h> header file. */
-#define HAVE_ARGZ_H 1
-
-/* Define to 1 if you have the `argz_insert' function. */
-#define HAVE_ARGZ_INSERT 1
-
-/* Define to 1 if you have the `argz_next' function. */
-#define HAVE_ARGZ_NEXT 1
-
-/* Define to 1 if you have the `argz_stringify' function. */
-#define HAVE_ARGZ_STRINGIFY 1
-
-/* attrib aligned */
-/* #undef HAVE_ATTRIB_ALIGNED */
-
-/* attrib packed */
-/* #undef HAVE_ATTRIB_PACKED */
-
-/* have bzip2 */
-#define HAVE_BZLIB_H 1
-
-/* Define to 1 if you have the `closedir' function. */
-#define HAVE_CLOSEDIR 1
-
-/* ancillary data style fd pass */
-#define HAVE_CONTROL_IN_MSGHDR 1
-
-/* Define to 1 if you have the `ctime_r' function. */
-#define HAVE_CTIME_R 1
-
-/* ctime_r takes 2 arguments */
-#define HAVE_CTIME_R_2 1
-
-/* ctime_r takes 3 arguments */
-/* #undef HAVE_CTIME_R_3 */
-
-/* Define to 1 if you have the declaration of `cygwin_conv_path', and to 0 if
-   you don't. */
-/* #undef HAVE_DECL_CYGWIN_CONV_PATH */
-
-/* Define to 1 if you have the <dirent.h> header file. */
-#define HAVE_DIRENT_H 1
-
-/* Define if you have the GNU dld library. */
-/* #undef HAVE_DLD */
-
-/* Define to 1 if you have the <dld.h> header file. */
-/* #undef HAVE_DLD_H */
-
-/* Define to 1 if you have the `dlerror' function. */
-#define HAVE_DLERROR 1
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* Define to 1 if you have the <dl.h> header file. */
-/* #undef HAVE_DL_H */
-
-/* Define if you have the _dyld_func_lookup function. */
-/* #undef HAVE_DYLD */
-
-/* Define to 1 if the system has the type `error_t'. */
-#define HAVE_ERROR_T 1
-
-/* have working file descriptor passing support */
-#define HAVE_FD_PASSING 1
-
-/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
-#define HAVE_FSEEKO 1
-
-/* have getaddrinfo() */
-#define HAVE_GETADDRINFO 1
-
-/* Define to 1 if getpagesize() is available */
-#define HAVE_GETPAGESIZE 1
-
-/* Define to 1 if you have the <grp.h> header file. */
-/* #undef HAVE_GRP_H */
-
-/* iconv() available */
-/* #undef HAVE_ICONV 1 */
-
-/* Define to 1 if you have the `inet_ntop' function. */
-#define HAVE_INET_NTOP 1
-
-/* Define to 1 if you have the `initgroups' function. */
-#define HAVE_INITGROUPS 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-/* #undef HAVE_INTTYPES_H */
-
-/* in_addr_t is defined */
-/* #define HAVE_IN_ADDR_T */
-
-/* in_port_t is defined */
-#define HAVE_IN_PORT_T 1
-
-/* Define to '1' if you have the check.h library */
-/* #undef HAVE_LIBCHECK */
-
-/* Define if you have the libdl library or equivalent. */
-#define HAVE_LIBDL 1
-
-/* Define if libdlloader will be built on this platform */
-#define HAVE_LIBDLLOADER 1
-
-/* Define to 1 if you have the <libmilter/mfapi.h> header file. */
-/* #undef HAVE_LIBMILTER_MFAPI_H */
-
-/* Define to '1' if you have the ncurses.h library */
-/* #undef HAVE_LIBNCURSES 1 */
-
-/* Define to '1' if you have the curses.h library */
-/* #undef HAVE_LIBPDCURSES */
-
-/* Define to 1 if you have the `z' library (-lz). */
-#define HAVE_LIBZ 1
-
-/* Define to 1 if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define this if a modern libltdl is already installed */
-#define HAVE_LTDL 1
-
-/* Define to 1 if you have the <mach-o/dyld.h> header file. */
-/* #undef HAVE_MACH_O_DYLD_H */
-
-/* Define to 1 if you have the `madvise' function. */
-/* #undef HAVE_MADVISE */
-
-/* Define to 1 if you have the `mallinfo' function. */
-/* #undef HAVE_MALLINFO */
-
-/* Define to 1 if you have the <malloc.h> header file. */
-#define HAVE_MALLOC_H 1
-
-/* Define to 1 if you have the `memcpy' function. */
-#define HAVE_MEMCPY 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the `mkstemp' function. */
-#define HAVE_MKSTEMP 1
-
-/* Define to 1 if you have a working `mmap' system call that supports
-   MAP_PRIVATE. */
-/* #undef HAVE_MMAP */
-
-/* Define to 1 if you have the <ndir.h> header file. */
-/* #undef HAVE_NDIR_H */
-
-/* Define to 1 if you have the `opendir' function. */
-#define HAVE_OPENDIR 1
-
-/* Define to 1 if you have the `poll' function. */
-#define HAVE_POLL 1
-
-/* Define to 1 if you have the <poll.h> header file. */
-#define HAVE_POLL_H 1
-
-/* "pragma pack" */
-#define HAVE_PRAGMA_PACK 1
-
-/* "pragma pack hppa/hp-ux style" */
-/* #undef HAVE_PRAGMA_PACK_HPPA */
-
-/* Define if libtool can extract symbol lists from object files. */
-#define HAVE_PRELOADED_SYMBOLS 1
-
-/* Define to 1 if you have the `pthread_yield' function. */
-#define HAVE_PTHREAD_YIELD 1
-
-/* Define to 1 if you have the <pwd.h> header file. */
-/* #undef HAVE_PWD_H */
-
-/* Define to 1 if you have the `readdir' function. */
-#define HAVE_READDIR 1
-
-/* readdir_r takes 2 arguments */
-/* #undef HAVE_READDIR_R_2 */
-
-/* readdir_r takes 3 arguments */
-/* #undef HAVE_READDIR_R_3 */
-
-/* Define to 1 if you have the `recvmsg' function. */
-#define HAVE_RECVMSG 1
-
-/* have resolv.h */
-#define HAVE_RESOLV_H 1
-
-/* Define signed right shift implementation */
-#define HAVE_SAR 1
-
-/* Define to 1 if you have the `sched_yield' function. */
-/* #undef HAVE_SCHED_YIELD */
-
-/* Define to 1 if you have the `sendmsg' function. */
-#define HAVE_SENDMSG 1
-
-/* Define to 1 if you have the `setgroups' function. */
-#define HAVE_SETGROUPS 1
-
-/* Define to 1 if you have the `setsid' function. */
-#define HAVE_SETSID 1
-
-/* Define if you have the shl_load function. */
-/* #undef HAVE_SHL_LOAD */
-
-/* Define to 1 if you have the `snprintf' function. */
-#define HAVE_SNPRINTF 1
-
-/* Define to 1 if you have the <stdbool.h> header file. */
-/* #define HAVE_STDBOOL_H */
-
-/* Define to 1 if you have the <stdint.h> header file. */
-/* #undef HAVE_STDINT_H */
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the `strcasestr' function. */
-/* #define HAVE_STRCASESTR */
-
-/* Define to 1 if you have the `strerror_r' function. */
-#define HAVE_STRERROR_R 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-/* #undef HAVE_STRINGS_H */
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the `strlcat' function. */
-/* #undef HAVE_STRLCAT */
-
-/* Define to 1 if you have the `strlcpy' function. */
-/* #undef HAVE_STRLCPY */
-
-/* Define to 1 if sysconf(_SC_PAGESIZE) is available */
-/* #undef HAVE_SYSCONF_SC_PAGESIZE */
-
-/* link against system-wide libtommath */
-/* #undef HAVE_SYSTEM_TOMMATH */
-
-/* Define to 1 if you have the <sys/dl.h> header file. */
-/* #undef HAVE_SYS_DL_H */
-
-/* Define to 1 if you have the <sys/filio.h> header file. */
-/* #undef HAVE_SYS_FILIO_H */
-
-/* Define to 1 if you have the <sys/inttypes.h> header file. */
-/* #undef HAVE_SYS_INTTYPES_H */
-
-/* Define to 1 if you have the <sys/int_types.h> header file. */
-/* #undef HAVE_SYS_INT_TYPES_H */
-
-/* Define to 1 if you have the <sys/mman.h> header file. */
-/* #undef HAVE_SYS_MMAN_H */
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-/* #undef HAVE_SYS_PARAM_H */
-
-/* "have <sys/select.h>" */
-/* #undef HAVE_SYS_SELECT_H */
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <sys/uio.h> header file. */
-/* #undef HAVE_SYS_UIO_H */
-
-/* Define to 1 if you have the <termios.h> header file. */
-/* #define HAVE_TERMIOS_H */
-
-/* Define to 1 if you have the <unistd.h> header file. */
-/* #undef HAVE_UNISTD_H */
-
-/* Define to 1 if you have the `vsnprintf' function. */
-#define HAVE_VSNPRINTF 1
-
-/* This value is set to 1 to indicate that the system argz facility works */
-#define HAVE_WORKING_ARGZ 1
-
-/* "Full library version number" */
-#define LIBCLAMAV_FULLVER "6.0.4"
-
-/* "Major library version number" */
-#define LIBCLAMAV_MAJORVER 6
-
-/* Define if the OS needs help to load dependent libraries for dlopen(). */
-/* #undef LTDL_DLOPEN_DEPLIBS */
-
-/* Define to the system default library search path. */
-#define LT_DLSEARCH_PATH "/lib:/usr/lib:/usr/local/lib:/usr/lib/atlas:/usr/local/lib:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu"
-
-/* The archive extension */
-#define LT_LIBEXT "dll"
-
-/* Define to the extension used for runtime loadable modules, say, ".so". */
-#define LT_MODULE_EXT ".dll"
-
-/* Define to the name of the environment variable that determines the run-time
-   module search path. */
-#define LT_MODULE_PATH_VAR "LD_LIBRARY_PATH"
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
-#define LT_OBJDIR ".libs/"
-
-/* disable assertions */
-#define NDEBUG 1
-
-/* Define if dlsym() requires a leading underscore in symbol names. */
-/* #undef NEED_USCORE */
-
-/* bzip funtions do not have bz2 prefix */
-/* #define NOBZ2PREFIX */
-
-/* "no fd_set" */
-/* #undef NO_FD_SET */
-
-/* Name of package */
-#define PACKAGE PACKAGE_NAME
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "http://bugs.clamav.net/"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "ClamAV"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "ClamAV devel"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "clamav"
-
-/* Define to the home page for this package. */
-#define PACKAGE_URL "http://www.clamav.net/"
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "devel"
-
-/* scan buffer size */
-#define SCANBUFF 131072
-
-/* Define to 1 if the `setpgrp' function takes no argument. */
-#define SETPGRP_VOID 1
-
-/* The number of bytes in type int */
-#define SIZEOF_INT 4
-
-/* The number of bytes in type long */
-#define SIZEOF_LONG 4
-
-/* The number of bytes in type long long */
-#define SIZEOF_LONG_LONG 8
-
-/* The number of bytes in type short */
-#define SIZEOF_SHORT 2
-
-/* The number of bytes in type void * */
-#define SIZEOF_VOID_P 4
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Support for IPv6 */
-/* #undef SUPPORT_IPv6 */
-
-/* enable memory pools */
-/* #undef USE_MPOOL */
-
-/* use syslog */
-/* #undef USE_SYSLOG */
-
-/* Version number of package */
-#define VERSION "devel-20091010"
-
-/* Version suffix for package */
-#define VERSION_SUFFIX ""
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
-   significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined AC_APPLE_UNIVERSAL_BUILD
-# if defined __BIG_ENDIAN__
-#  define WORDS_BIGENDIAN 0
-# endif
-#else
-# ifndef WORDS_BIGENDIAN
-#  define WORDS_BIGENDIAN 0
-# endif
-#endif
-
-/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
-/* #undef _LARGEFILE_SOURCE */
-
-/* POSIX compatibility */
-/* #undef _POSIX_PII_SOCKET */
-
-/* thread safe */
-#define _REENTRANT 1
-
-/* thread safe */
-/* #undef _THREAD_SAFE */
-
-/* Define so that glibc/gnulib argp.h does not typedef error_t. */
-/* #undef __error_t_defined */
-
-/* Define to empty if `const' does not conform to ANSI C. */
-/* #undef const */
-
-/* Define to a type to use for `error_t' if it is not otherwise available. */
-/* #undef error_t */
-
-/* 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
-#define inline _inline
-#endif
-
-/* Define to `long int' if <sys/types.h> does not define. */
-/* #undef off_t */
-
-/* Define to the equivalent of the C99 'restrict' keyword, or to
-   nothing if this is not supported.  Do not define if restrict is
-   supported directly.  */
-/* #undef restrict */
-/* Work around a bug in Sun C++: it does not support _Restrict or
-   __restrict__, even though the corresponding Sun C compiler ends up with
-   "#define restrict _Restrict" or "#define restrict __restrict__" in the
-   previous line.  Perhaps some future version of Sun C++ will work with
-   restrict; if so, hopefully it defines __RESTRICT like Sun C does.  */
-#if defined __SUNPRO_CC && !defined __RESTRICT
-# define _Restrict
-# define __restrict__
-#endif
-
-/* Define to "int" if <sys/socket.h> does not define. */
-/* #undef socklen_t */
-
-#include "platform.h"
diff --git a/win32/configure.bat b/win32/configure.bat
new file mode 100755
index 0000000..fefc8da
--- /dev/null
+++ b/win32/configure.bat
@@ -0,0 +1 @@
+cscript //NoLogo configure.js
\ No newline at end of file
diff --git a/win32/configure.js b/win32/configure.js
new file mode 100644
index 0000000..2ee82d1
--- /dev/null
+++ b/win32/configure.js
@@ -0,0 +1,314 @@
+var confs = new Array();
+confs['AC_APPLE_UNIVERSAL_BUILD'] = -1;
+confs['ANONYMOUS_MAP'] = -1;
+confs['BIND_8_COMPAT'] = -1;
+confs['BUILD_CLAMD'] = '1';
+confs['CLAMAVGROUP'] = '"clamav"';
+confs['CLAMAVUSER'] = '"clamav"';
+confs['CLAMUKO'] = -1;
+confs['CL_DEBUG'] = -1;
+confs['CL_EXPERIMENTAL'] = -1;
+confs['CL_THREAD_SAFE'] = '1';
+confs['CONFDIR'] = '"C:\\\\ClamAV"';
+confs['CURSES_INCLUDE'] = -1;
+confs['C_AIX'] = -1;
+confs['C_BEOS'] = -1;
+confs['C_BIGSTACK'] = -1;
+confs['C_BSD'] = -1;
+confs['C_DARWIN'] = -1;
+confs['C_GNU_HURD'] = -1;
+confs['C_HPUX'] = -1;
+confs['C_INTERIX'] = -1;
+confs['C_IRIX'] = -1;
+confs['C_KFREEBSD_GNU'] = -1;
+confs['C_LINUX'] = -1;
+confs['C_OS2'] = -1;
+confs['C_OSF'] = -1;
+confs['C_QNX6'] = -1;
+confs['C_SOLARIS'] = -1;
+confs['DATADIR'] = '"c:\\\\ClamAV\\\\db"';
+confs['DEFAULT_FD_SETSIZE'] = '1024';
+confs['FDPASS_NEED_XOPEN'] = -1;
+confs['FILEBUFF'] = '8192';
+confs['FPU_WORDS_BIGENDIAN'] = '0';
+confs['FRESHCLAM_DNS_FIX'] = -1;
+confs['FRESHCLAM_NO_CACHE'] = -1;
+confs['HAVE_ARGZ_ADD'] = -1;
+confs['HAVE_ARGZ_APPEND'] = -1;
+confs['HAVE_ARGZ_COUNT'] = -1;
+confs['HAVE_ARGZ_CREATE_SEP'] = -1;
+confs['HAVE_ARGZ_H'] = -1;
+confs['HAVE_ARGZ_INSERT'] = -1;
+confs['HAVE_ARGZ_NEXT'] = -1;
+confs['HAVE_ARGZ_STRINGIFY'] = -1;
+confs['HAVE_ATTRIB_ALIGNED'] = -1;
+confs['HAVE_ATTRIB_PACKED'] = -1;
+confs['HAVE_BZLIB_H'] = '1';
+confs['HAVE_CLOSEDIR'] = '1';
+confs['HAVE_CONTROL_IN_MSGHDR'] = '1' /* FIXME */;
+confs['HAVE_CTIME_R'] = '1' /* FIXME */;
+confs['HAVE_CTIME_R_2'] = '1' /* FIXME */;
+confs['HAVE_CTIME_R_3'] = -1;
+confs['HAVE_DECL_CYGWIN_CONV_PATH'] = -1;
+confs['HAVE_DIRENT_H'] = '1';
+confs['HAVE_DLD'] = -1;
+confs['HAVE_DLD_H'] = -1;
+confs['HAVE_DLERROR'] = '1' /* FIXME */;
+confs['HAVE_DLFCN_H'] = '1';
+confs['HAVE_DL_H'] = -1;
+confs['HAVE_DYLD'] = -1;
+confs['HAVE_ERROR_T'] = '1' /* FIXME */;
+confs['HAVE_FD_PASSING'] = -1;
+confs['HAVE_FSEEKO'] = '1' /* FIXME */;
+confs['HAVE_GETADDRINFO'] = '1';
+confs['HAVE_GETPAGESIZE'] = '1';
+confs['HAVE_GRP_H'] = -1;
+confs['HAVE_ICONV'] = -1;
+confs['HAVE_INET_NTOP'] = '1';
+confs['HAVE_INITGROUPS'] = -1;
+confs['HAVE_INTTYPES_H'] = -1;
+confs['HAVE_IN_ADDR_T'] = -1;
+confs['HAVE_IN_PORT_T'] = '1';
+confs['HAVE_LIBCHECK'] = -1;
+confs['HAVE_LIBDL'] = '1' /* FIXME */;
+confs['HAVE_LIBDLLOADER'] = '1' /* FIXME */;
+confs['HAVE_LIBMILTER_MFAPI_H'] = -1;
+confs['HAVE_LIBNCURSES'] = -1;
+confs['HAVE_LIBPDCURSES'] = -1;
+confs['HAVE_LIBZ'] = '1';
+confs['HAVE_LIMITS_H'] = '1' /* FIXME */;
+confs['HAVE_LTDL'] = '1';
+confs['HAVE_MACH_O_DYLD_H'] = -1;
+confs['HAVE_MADVISE'] = -1;
+confs['HAVE_MALLINFO'] = -1;
+confs['HAVE_MALLOC_H'] = '1';
+confs['HAVE_MEMCPY'] = '1';
+confs['HAVE_MEMORY_H'] = '1' /* FIXME */;
+confs['HAVE_MKSTEMP'] = '1' /* FIXME */;
+confs['HAVE_MMAP'] = -1;
+confs['HAVE_NDIR_H'] = -1;
+confs['HAVE_OPENDIR'] = '1';
+confs['HAVE_POLL'] = '1';
+confs['HAVE_POLL_H'] = '1';
+confs['HAVE_PRAGMA_PACK'] = '1';
+confs['HAVE_PRAGMA_PACK_HPPA'] = -1;
+confs['HAVE_PRELOADED_SYMBOLS'] = '1' /* FIXME */;
+confs['HAVE_PTHREAD_YIELD'] = '1';
+confs['HAVE_PWD_H'] = -1;
+confs['HAVE_READDIR'] = '1';
+confs['HAVE_READDIR_R_2'] = -1;
+confs['HAVE_READDIR_R_3'] = -1;
+confs['HAVE_RECVMSG'] = '1' /* FIXME */;
+confs['HAVE_RESOLV_H'] = '1';
+confs['HAVE_SAR'] = '1';
+confs['HAVE_SCHED_YIELD'] = -1;
+confs['HAVE_SENDMSG'] = '1';
+confs['HAVE_SETGROUPS'] = '1' /* FIXME */;
+confs['HAVE_SETSID'] = '1';
+confs['HAVE_SHL_LOAD'] = -1;
+confs['HAVE_SNPRINTF'] = '1';
+confs['HAVE_STDBOOL_H'] = -1;
+confs['HAVE_STDINT_H'] = -1;
+confs['HAVE_STDLIB_H'] = '1';
+confs['HAVE_STRCASESTR'] = -1 /* FIXME */;
+confs['HAVE_STRERROR_R'] = '1' /* FIXME */;
+confs['HAVE_STRINGS_H'] = -1;
+confs['HAVE_STRING_H'] = '1';
+confs['HAVE_STRLCAT'] = -1 /* FIXME */;
+confs['HAVE_STRLCPY'] = -1 /* FIXME */;
+confs['HAVE_SYSCONF_SC_PAGESIZE'] = -1;
+confs['HAVE_SYSTEM_TOMMATH'] = -1;
+confs['HAVE_SYS_DL_H'] = -1;
+confs['HAVE_SYS_FILIO_H'] = -1;
+confs['HAVE_SYS_INTTYPES_H'] = -1;
+confs['HAVE_SYS_INT_TYPES_H'] = -1;
+confs['HAVE_SYS_MMAN_H'] = -1;
+confs['HAVE_SYS_PARAM_H'] = -1;
+confs['HAVE_SYS_SELECT_H'] = -1;
+confs['HAVE_SYS_STAT_H'] = '1';
+confs['HAVE_SYS_TYPES_H'] = '1';
+confs['HAVE_SYS_UIO_H'] = -1;
+confs['HAVE_TERMIOS_H'] = -1;
+confs['HAVE_UNISTD_H'] = -1;
+confs['HAVE_VSNPRINTF'] = '1';
+confs['HAVE_WORKING_ARGZ'] = -1;
+confs['LIBCLAMAV_FULLVER'] = '"6.0.4"';
+confs['LIBCLAMAV_MAJORVER'] = '6';
+confs['LTDL_DLOPEN_DEPLIBS'] = -1;
+confs['LT_DLSEARCH_PATH'] = '""';
+confs['LT_LIBEXT'] = '"dll"';
+confs['LT_MODULE_EXT'] = '".dll"';
+confs['LT_MODULE_PATH_VAR'] = '"LD_LIBRARY_PATH"';
+confs['LT_OBJDIR'] = '""';
+confs['NDEBUG'] = '1';
+confs['NEED_USCORE'] = -1;
+confs['NOBZ2PREFIX'] = -1;
+confs['NO_FD_SET'] = -1;
+confs['PACKAGE'] = 'PACKAGE_NAME';
+confs['PACKAGE_BUGREPORT'] = '"http://bugs.clamav.net/"';
+confs['PACKAGE_NAME'] = '"ClamAV"';
+confs['PACKAGE_STRING'] = '"ClamAV devel"';
+confs['PACKAGE_TARNAME'] = '"clamav"';
+confs['PACKAGE_URL'] = '"http://www.clamav.net/"';
+confs['PACKAGE_VERSION'] = '"devel"';
+confs['SCANBUFF'] = '131072';
+confs['SETPGRP_VOID'] = '1';
+confs['SIZEOF_INT'] = '4';
+confs['SIZEOF_LONG'] = '4';
+confs['SIZEOF_LONG_LONG'] = '8';
+confs['SIZEOF_SHORT'] = '2';
+confs['SIZEOF_VOID_P'] = '4';
+confs['STDC_HEADERS'] = '1';
+confs['SUPPORT_IPv6'] = -1;
+confs['USE_MPOOL'] = -1;
+confs['USE_SYSLOG'] = -1;
+confs['VERSION_SUFFIX'] = '""';
+confs['WORDS_BIGENDIAN'] = '0';
+confs['_LARGEFILE_SOURCE'] = -1;
+confs['_POSIX_PII_SOCKET'] = -1;
+confs['_REENTRANT'] = '1' /* FIXME */;
+confs['_THREAD_SAFE'] = -1;
+confs['__error_t_defined'] = -1;
+confs['const'] = -1;
+confs['error_t'] = -1;
+confs['inline'] = '_inline';
+confs['off_t'] = -1;
+confs['restrict'] = -1;
+confs['socklen_t'] = -1;
+
+
+var W = WScript;
+var F;
+try {
+	F = W.CreateObject('Scripting.FileSystemObject');
+} catch(e) {
+	W.Echo('FSO creation failed: ' + e.message);
+	W.Quit(1);
+}
+var f;
+try {
+	f = F.GetFile(WScript.ScriptFullName);
+} catch(e) {
+	W.Echo('I don\'t exit: ' + e.message);
+	W.Quit(1);
+}
+
+var dir_win32 = f.ParentFolder;
+try {
+	f = F.GetFolder(dir_win32);
+} catch(e) {
+	W.Echo('GetFolder failed: ' + e.message);
+	W.Quit(1);
+}
+var dir_root = f.ParentFolder;
+var file_clconfin = dir_root + '\\clamav-config.h.in';
+try {
+	f = F.OpenTextFile(file_clconfin, 1, false)
+} catch (e) {
+	W.Echo('Cannot open '+file_clconfin+' for reading: '+ e.message);
+	W.Quit(1);
+}
+var file_clconftmp = dir_root + '\\win32\\clamav-config.h.tmp';
+var of;
+try {
+	of = F.CreateTextFile(file_clconftmp, true);
+} catch(e) {
+	W.Echo('Cannot open '+file_clconftmp+' for writing: ' + e.message);
+	W.Quit(1);
+}
+W.Echo('Generating clamav-config.h...');
+
+of.WriteLine('/* AUTOMATICALLY GENERATED BY configure.js */');
+var rx = new RegExp('^#\\s*undef (.*)');
+while(!f.AtEndOfStream) {
+	var ln = f.ReadLine();
+	if(!rx.exec(ln)) {
+		of.WriteLine(ln);
+		continue;
+	}
+	var c = RegExp.$1;
+	if(c == 'VERSION') {
+		var D = new Date();
+		var y = D.getYear() + '';
+		var m = (D.getMonth()+1) + '';
+		var d = (D.getDay()+1) + '';
+		if(m.length == 1) m = '0' + m;
+		if(d.length == 1) d = '0' + d;
+		of.WriteLine('#define VERSION "devel-' + y + m + d + '"');
+		continue;
+	}
+	if(!confs[c]) {
+		W.Echo('WARNING: Config option "' + c + '" is unknown');
+		of.WriteLine('/* #undef ' + c + ' */');
+		continue;
+	}
+	if(confs[c] == -1) {
+		of.WriteLine('/* #undef ' + c + ' */');
+	} else {
+		of.WriteLine('#define ' + c + ' ' + confs[c]);
+	}	
+}
+f.close();
+of.close();
+var file_clconfout = dir_root + '\\win32\\clamav-config.h';
+if(F.FileExists(file_clconfout))
+	F.DeleteFile(file_clconfout, true);
+
+try {
+	F.MoveFile(file_clconftmp, file_clconfout);
+} catch(e) {
+	W.Echo('Cannot rename '+ file_clconftmp +' to ' + file_clconfout + ': ' + e.message);
+	W.Quit(1);
+}
+
+var file_versionsta = dir_root + '\\libclamav\\version.h.static';
+var file_versionout = dir_root + '\\libclamav\\version.h';
+
+W.Echo('Generating version.h');
+if(F.FileExists(file_versionout))
+	F.DeleteFile(file_versionout, true);
+
+if(F.FileExists(file_versionsta)) {
+	try {
+		F.CopyFile(file_versionsta, file_versionout, true);
+	} catch(e) {
+		W.Echo('Cannot copy '+ file_versionsta +' to ' + file_versionout + ': ' + e.message);
+		W.Quit(1);
+	}
+} else {
+	var S;
+	var version = '';
+	try {
+		S = W.CreateObject('WScript.Shell');
+	} catch(e) {
+		W.Echo('No Shell available: ' + e.message);
+		W.Quit(1);
+	}
+	try {
+		var git = S.Exec('git describe --always');
+		version = git.StdOut.ReadAll();
+		while(git.Status == 0) {
+			W.Sleep(100);
+		}
+		if(git.ExitCode != 0) {
+			W.Echo('WARNING: git describe returned ' + git.ExitCode);
+			version = '';
+		} else {
+			version = '#define REPO_VERSION "devel-' + version.replace(/[\r\n]+$/, '') + '"';
+		}
+	} catch (e) { }
+	of = F.CreateTextFile(file_versionout, true);
+	if(!of) {
+		W.Echo('Cannot open '+file_versionout+' for writing');
+		W.Quit(1);
+	}
+	of.WriteLine('/* AUTOMATICALLY GENERATED BY configure.js */');
+	if(version != '') 
+		of.WriteLine(version);
+
+	of.close();
+}
+
+W.Echo('Work complete');
+W.Quit(0);
+
diff --git a/win32/platform.h b/win32/platform.h
index 4ea3784..1667437 100644
--- a/win32/platform.h
+++ b/win32/platform.h
@@ -79,4 +79,9 @@ LIBCLAMAV_EXPORT extern const char *CONFDIR_FRESHCLAM;
 LIBCLAMAV_EXPORT extern const char *CONFDIR_MILTER;
 #undef HAVE_CONFIG_H
 
-#endif /* __PLATFORM_H */
\ No newline at end of file
+#ifdef OUT
+#undef OUT
+#endif
+
+#endif /* __PLATFORM_H */
+
diff --git a/win32/res/common.rc b/win32/res/common.rc
index bb626d9..8d776e0 100644
--- a/win32/res/common.rc
+++ b/win32/res/common.rc
@@ -1,5 +1,10 @@
 #include <winver.h>
 #include "../libclamav/version.h"
+#ifndef REPO_VERSION
+#define __PLATFORM_H
+#include "clamav-config.h"
+#define REPO_VERSION VERSION
+#endif
 
 #define RES_VER_Q 0,96,0,0
 #define RES_VER_S "ClamAV 0.96"

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list