From 1c72006ee9143e3288c9020e55319571c1fd32bb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Marchal?= Date: Thu, 29 Dec 2011 15:05:52 +0000 Subject: [PATCH] Support for gd, ldap and iconv can be disabled during configuration The configuration script support the three command line switches --without-gd, --without-ldap and --without-iconv to build sarg without one of those external module. --- CMakeLists.txt | 2 +- ChangeLog | 6 +++++- configure.in | 48 ++++++++++++++++++++++++++++++++++++++---------- include/info.h | 2 +- 4 files changed, 45 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 42c26c5..586bd37 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ PROJECT(sarg C) SET(sarg_VERSION 2) SET(sarg_REVISION "3.3-pre1") SET(sarg_BUILD "") -SET(sarg_BUILDDATE "Dec-07-2011") +SET(sarg_BUILDDATE "Dec-29-2011") INCLUDE(AddFileDependencies) INCLUDE(CheckIncludeFile) diff --git a/ChangeLog b/ChangeLog index e44f814..75eadf9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ SARG ChangeLog -Nov-01-2011 Version 2.3.2-pre2 +Dec-29-2011 Version 2.3.3-pre1 + - Don't abort the report generation due to an error in a squidGuard error (wrapped over log lines). + - Support for gd, ldap and iconv can be disabled during configuration. + +Dec-07-2011 Version 2.3.2 - Add support for sorttable.js (http://www.kryogenix.org/code/browser/sorttable/) to dynamically sort some tables (thanks to Éric). - Add the two command line options --lastlog and --keeplogs to set the number of reports to keep or to keep all the reports respectively (thanks to Emmanuel Lacour for the suggestion). - Report the user ID in the e-mail report. diff --git a/configure.in b/configure.in index 1bf9710..13b681b 100644 --- a/configure.in +++ b/configure.in @@ -65,24 +65,52 @@ dnl Check for headers AC_HEADER_DIRENT AC_HEADER_STDC -dnl Check for iconv -AM_ICONV -if test -n "$LIBICONV" ; then - LIBS="$LIBS $LIBICONV" -fi AC_CHECK_HEADERS(stdio.h stdlib.h string.h strings.h sys/time.h time.h unistd.h sys/dirent.h \ dirent.h sys/types.h sys/socket.h netdb.h arpa/inet.h netinet/in.h sys/stat.h \ - ctype.h gd.h gdfontl.h gdfontt.h gdfonts.h gdfontmb.h gdfontg.h iconv.h \ - errno.h sys/resource.h sys/wait.h stdarg.h inttypes.h limits.h locale.h \ - execinfo.h ldap.h math.h libintl.h libgen.h stdbool.h getopt.h fcntl.h) + ctype.h errno.h sys/resource.h sys/wait.h stdarg.h inttypes.h limits.h locale.h \ + execinfo.h math.h libintl.h libgen.h stdbool.h getopt.h fcntl.h) if test $ac_cv_header_getopt_h = "no" ; then AC_MSG_ERROR("getopt.h is required to compile sarg") fi -AC_CHECK_LIB(gd, gdImagePng,LIBS="-lgd ${LIBS}"; HAVE_GD_LIB="yes", HAVE_GD_LIB="") -AC_CHECK_LIB(ldap, ldap_init,LIBS="-lldap ${LIBS}"; HAVE_LDAP="yes", HAVE_LDAP="") +# Build with gd +AC_ARG_WITH([gd], +[ --with-gd Compile with support for the graphical gd library], +[],[with_gd=check]) +if ( test "x$with_gd" != "xno" ) ; then + AC_CHECK_HEADERS(gd.h gdfontl.h gdfontt.h gdfonts.h gdfontmb.h gdfontg.h) + AC_CHECK_LIB(gd, gdImagePng,LIBS="-lgd ${LIBS}"; HAVE_GD_LIB="yes", HAVE_GD_LIB="") +else + AC_MSG_NOTICE([Not building with gd as requested on the configuration command line]) +fi + +# Build with LDAP +AC_ARG_WITH([ldap], +[ --with-ldap Compile with LDAP support], +[],[with_ldap=check]) +if ( test "x$with_ldap" != "xno" ) ; then + AC_CHECK_HEADERS(ldap.h) + AC_CHECK_LIB(ldap, ldap_init,LIBS="-lldap ${LIBS}"; HAVE_LDAP="yes", HAVE_LDAP="") +else + AC_MSG_NOTICE([Not building with LDAP support as requested on the configuration command line]) +fi + +# Build with iconv +AC_ARG_WITH([iconv], +[ --with-iconv Compile with support for iconv], +[],[with_iconv=check]) +if ( test "x$with_iconv" != "xno" ) ; then + dnl Check for iconv + AM_ICONV + if test -n "$LIBICONV" ; then + LIBS="$LIBS $LIBICONV" + fi + AC_CHECK_HEADERS(iconv.h) +else + AC_MSG_NOTICE([Not building with iconv as requested on the configuration command line]) +fi dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST diff --git a/include/info.h b/include/info.h index 5564860..866038b 100755 --- a/include/info.h +++ b/include/info.h @@ -1,3 +1,3 @@ -#define VERSION PACKAGE_VERSION" Dec-07-2011" +#define VERSION PACKAGE_VERSION" Dec-29-2011" #define PGM PACKAGE_NAME #define URL "http://sarg.sourceforge.net" -- 2.47.2