"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "configure.ac" between
sarg-2.3.11.tar.gz and sarg-2.4.0.tar.gz

About: SARG ia a Squid Analysis Report Generator.

configure.ac  (sarg-2.3.11):configure.ac  (sarg-2.4.0)
dnl Process this file with autoconf or autoreconf to produce a configure script. dnl Process this file with autoconf or autoreconf to produce a configure script.
AC_INIT([sarg],[2.3.11]) AC_INIT([sarg],[2.4.0])
AC_CONFIG_SRCDIR([log.c]) AC_CONFIG_SRCDIR([log.c])
AC_CONFIG_AUX_DIR(cfgaux) AC_CONFIG_AUX_DIR([cfgaux])
AC_CONFIG_MACRO_DIR([m4])
dnl We don't use automake but the following macro is required to
dnl install "install-sh" that is required by configure.
dnl I may be a bug in autoconf 2.69...
dnl But if it is enabled, the AM_GNU_GETTEXT produce a warning!
dnl The solution for now is to manually run automake -a before
dnl running the configure script
dnl AM_INIT_AUTOMAKE
AC_CANONICAL_HOST AC_CANONICAL_HOST
AC_ARG_WITH(gcc, AC_ARG_WITH(gcc,
AS_HELP_STRING([--without-gcc],[use CC to compile])) AS_HELP_STRING([--without-gcc],[use CC to compile]))
test -n "$CC" && cc_specified=yes test -n "$CC" && cc_specified=yes
case ${with_gcc} in case ${with_gcc} in
yes ) CC=gcc ;; yes ) CC=gcc ;;
dnl yes ) CC=g++ ;; dnl yes ) CC=g++ ;;
skipping to change at line 30 skipping to change at line 39
dnl The purpose of the following condition is unknown but it is obsolete as it i s. dnl The purpose of the following condition is unknown but it is obsolete as it i s.
dnl The -Aa option produces an error claiming that some argument are missing. dnl The -Aa option produces an error claiming that some argument are missing.
dnl if test "${CC}" = "cc" ; then dnl if test "${CC}" = "cc" ; then
dnl CFLAGS="${CFLAGS} -g -O2 -Aa" dnl CFLAGS="${CFLAGS} -g -O2 -Aa"
dnl fi dnl fi
dnl C99 support is required to define LLONG_MAX (at least on CentOS 5.7) dnl C99 support is required to define LLONG_MAX (at least on CentOS 5.7)
AC_PROG_CC_C99 AC_PROG_CC_C99
# Report more warnings to improve code quality. # Report more warnings to improve code quality.
CFLAGS="${CFLAGS} -Wall -Wno-sign-compare" CFLAGS="${CFLAGS} -Wall"
dnl Check for supported compiler options dnl Check for supported compiler options
AC_MSG_CHECKING([for extra warnings flag in $CC]) AC_MSG_CHECKING([for extra warnings flag in $CC])
saved_CFLAGS="${CFLAGS}" saved_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} -Wextra -Wno-unused-parameter" CFLAGS="${CFLAGS} -Wextra -Wno-unused-parameter"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_extra_warnings="yes"],[have_extra_w arnings="no"]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_extra_warnings="yes"],[have_extra_w arnings="no"])
AC_MSG_RESULT($have_extra_warnings) AC_MSG_RESULT($have_extra_warnings)
if test "$have_extra_warnings" = "no" ; then AS_IF([test "$have_extra_warnings" = "no"],[CFLAGS="${saved_CFLAGS}"])
CFLAGS="${saved_CFLAGS}"
fi # Don't compare signs as it is a mess
CFLAGS="${CFLAGS} -Wno-sign-compare"
AC_MSG_CHECKING([for implicit-function-declaration error flag in $CC]) AC_MSG_CHECKING([for implicit-function-declaration error flag in $CC])
saved_CFLAGS="${CFLAGS}" saved_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} -Werror=implicit-function-declaration" CFLAGS="${CFLAGS} -Werror=implicit-function-declaration"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_implicit_function_declaration="yes" ],[have_implicit_function_declaration="no"]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_implicit_function_declaration="yes" ],[have_implicit_function_declaration="no"])
AC_MSG_RESULT($have_implicit_function_declaration) AC_MSG_RESULT($have_implicit_function_declaration)
if test "$have_implicit_function_declaration" = "no" ; then AS_IF([test "$have_implicit_function_declaration" = "no"],[CFLAGS="${saved_CFLAG
CFLAGS="${saved_CFLAGS}" S}"])
fi
AC_MSG_CHECKING([for format error flag in $CC]) AC_MSG_CHECKING([for format error flag in $CC])
saved_CFLAGS="${CFLAGS}" saved_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} -Werror=format" CFLAGS="${CFLAGS} -Werror=format"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_error_format="yes"],[have_error_for mat="no"]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_error_format="yes"],[have_error_for mat="no"])
AC_MSG_RESULT($have_error_format) AC_MSG_RESULT($have_error_format)
if test "$have_error_format" = "no" ; then AS_IF([test "$have_error_format" = "no"],[CFLAGS="${saved_CFLAGS}"])
CFLAGS="${saved_CFLAGS}"
fi
case "$host" in case "$host" in
*-solaris*) *-solaris*)
LDFLAGS="${LDFLAGS} -lsocket -lnsl" LDFLAGS="${LDFLAGS} -lsocket -lnsl"
CFLAGS="-DSOLARIS ${CFLAGS}" CFLAGS="-DSOLARIS ${CFLAGS}"
;; ;;
esac esac
#dnl Checks for programs. #dnl Checks for programs.
#AC_PROG_CC #AC_PROG_CC
dnl Check for headers dnl Check for headers
AC_HEADER_DIRENT AC_HEADER_DIRENT
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_HEADERS(stdio.h stdlib.h string.h strings.h sys/time.h time.h unistd.h sys/dirent.h \ 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 \ dirent.h sys/types.h sys/socket.h netdb.h arpa/inet.h netinet/in. h sys/stat.h \
ctype.h errno.h sys/resource.h sys/wait.h stdarg.h inttypes.h lim its.h locale.h \ ctype.h errno.h sys/resource.h sys/wait.h stdarg.h inttypes.h lim its.h locale.h \
execinfo.h math.h libintl.h libgen.h stdbool.h getopt.h fcntl.h) execinfo.h math.h libintl.h libgen.h stdbool.h getopt.h fcntl.h f
nmatch.h \
winsock.h)
if test $ac_cv_header_getopt_h = "no" ; then AS_IF([test $ac_cv_header_getopt_h = "no"],[AC_MSG_ERROR("getopt.h is required t
AC_MSG_ERROR("getopt.h is required to compile sarg") o compile sarg")])
fi
# Build with gd # Build with gd
AC_ARG_WITH([gd], AC_ARG_WITH([gd],
AS_HELP_STRING([--with-gd],[Compile with support for the graphical gd library]), AS_HELP_STRING([--with-gd],[Compile with support for the graphical gd lib
[],[with_gd=check]) rary]),
if ( test "x$with_gd" != "xno" ) ; then [],[with_gd=check])
AS_IF([test "x$with_gd" != "xno"],
[
AC_CHECK_HEADERS(gd.h gdfontl.h gdfontt.h gdfonts.h gdfontmb.h gdfontg.h) AC_CHECK_HEADERS(gd.h gdfontl.h gdfontt.h gdfonts.h gdfontmb.h gdfontg.h)
if ( test "x$ac_cv_header_gd_h" = "xyes" ) ; then AS_IF([test "x$ac_cv_header_gd_h" = "xyes"],
[
AC_CHECK_LIB(gd, gdImagePng,LIBS="-lgd ${LIBS}"; HAVE_GD_LIB="yes ", HAVE_GD_LIB="") AC_CHECK_LIB(gd, gdImagePng,LIBS="-lgd ${LIBS}"; HAVE_GD_LIB="yes ", HAVE_GD_LIB="")
if ( test "x$HAVE_GD_LIB" != "xyes" ) ; then AS_IF([test "x$HAVE_GD_LIB" != "xyes"],
AC_MSG_ERROR([ligbd is required to compile sarg with gd]) [
fi AC_MSG_ERROR([libgd is required to compile sarg with gd])
else ])
],[
gd_status="not found" gd_status="not found"
fi ])
else ],[
gd_status="disabled" gd_status="disabled"
fi ])
# Build with LDAP # Build with LDAP
AC_ARG_WITH([ldap], AC_ARG_WITH([ldap],
AS_HELP_STRING([--with-ldap],[Compile with LDAP support]), AS_HELP_STRING([--with-ldap],[Compile with LDAP support]),
[],[with_ldap=check]) [],[with_ldap=check])
if ( test "x$with_ldap" != "xno" ) ; then AS_IF([test "x$with_ldap" != "xno"],
AC_CHECK_HEADERS(ldap.h) [
AC_CHECK_LIB(ldap, ldap_init,LIBS="-lldap ${LIBS}"; HAVE_LDAP="yes", HAVE AC_CHECK_HEADERS([ldap_cdefs.h] [ldap_features.h] [ldap.h],,break)
_LDAP="") AS_IF([test "x$ac_cv_header_ldap_h" = "xyes"],
else [
AC_MSG_NOTICE([Not building with LDAP support as requested on the configu AC_CHECK_LIB(ldap, ldap_init,LIBS="-lldap ${LIBS}"; HAVE_LDAP="ye
ration command line]) s", HAVE_LDAP="")
fi ],[
ldap_status="not found"
])
],[
ldap_status="disabled"
])
# Build with iconv # Build with iconv
AC_ARG_WITH([iconv], AC_ARG_WITH([iconv],
AS_HELP_STRING([--with-iconv],[Compile with support for iconv]), AS_HELP_STRING([--with-iconv],[Compile with support for iconv]),
[],[with_iconv=check]) [],[with_iconv=check])
if ( test "x$with_iconv" != "xno" ) ; then AS_IF([test "x$with_iconv" != "xno"],
[
dnl Check for iconv dnl Check for iconv
AM_ICONV AM_ICONV
if test -n "$LIBICONV" ; then AS_IF([test -n "$LIBICONV"],[LIBS="$LIBS $LIBICONV"])
LIBS="$LIBS $LIBICONV"
fi
AC_CHECK_HEADERS(iconv.h) AC_CHECK_HEADERS(iconv.h)
else ],[
AC_MSG_NOTICE([Not building with iconv as requested on the configuration command line]) AC_MSG_NOTICE([Not building with iconv as requested on the configuration command line])
fi ])
# Build with pcre # Build with pcre
AC_ARG_WITH([pcre], AC_ARG_WITH([pcre],
AS_HELP_STRING([--with-pcre],[Compile with support for the Perl Compatible Regul AS_HELP_STRING([--with-pcre],[Compile with support for the Perl Compatibl
ar Expressions library]), e Regular Expressions library]),
[],[with_pcre=check]) [],[with_pcre=check])
if ( test "x$with_pcre" != "xno" ) ; then AS_IF([test "x$with_pcre" != "xno"],
[
AC_CHECK_HEADERS(pcre.h) AC_CHECK_HEADERS(pcre.h)
if ( test "x$ac_cv_header_pcre_h" = "xyes" ) ; then AS_IF([test "x$ac_cv_header_pcre_h" = "xyes"],
[
LIBS="$LIBS $(pcre-config --libs)" LIBS="$LIBS $(pcre-config --libs)"
CFLAGS="$CFLAGS $(pcre-config --cflags)" CFLAGS="$CFLAGS $(pcre-config --cflags)"
else ],[
pcre_status="not found" pcre_status="not found"
fi ])
else ],[
pcre_status="disabled" pcre_status="disabled"
fi ])
# Build with file globbing
AC_ARG_WITH([glob],
AS_HELP_STRING([--without-glob],[Ignore wildcards in file names]),
[],[with_glob=yes])
AS_IF([test "x$with_glob" != "xno"],
[
AC_CHECK_HEADERS([glob.h],[],
[
AS_IF([test "x$with_glob" != "xcheck"],
[
AC_MSG_FAILURE([glob.h not found (use --without-glob to c
ompile without file globbing)])
])
])
],[
glob_status="disabled"
])
# Build with zlib
AC_ARG_WITH([zlib],
AS_HELP_STRING([--with-zlib],[Compile with support to decompress gz files
]),
[],[with_zlib=check])
AS_IF([test "x$with_zlib" != "xno" ],
[
AC_CHECK_HEADERS(zlib.h)
AS_IF([test "x$ac_cv_header_zlib_h" = "xyes"],
[
AC_CHECK_LIB([z],[gzopen],
[
LIBS="-lz ${LIBS}"
HAVE_ZLIB_LIB="yes"
],[
HAVE_ZLIB_LIB=""
])
AS_IF([test "x$HAVE_ZLIB_LIB" != "xyes"],[AC_MSG_ERROR([zlib was
not found])])
],[
zlib_status="not found"
])
],[
zlib_status="disabled"
])
# Build with bzlib
AC_ARG_WITH([bzlib],
AS_HELP_STRING([--with-bzlib],[Compile with support to decompress bz2 fil
es]),
[],[with_bzlib=check])
AS_IF([test "x$with_bzlib" != "xno" ],
[
AC_CHECK_HEADERS(bzlib.h)
AS_IF([test "x$ac_cv_header_bzlib_h" = "xyes"],
[
AC_CHECK_LIB([bz2],[BZ2_bzReadOpen],
[
LIBS="-lbz2 ${LIBS}"
HAVE_BZLIB_LIB="yes"
],[
HAVE_BZLIB_LIB=""
])
AS_IF([test "x$HAVE_BZLIB_LIB" != "xyes"],[AC_MSG_ERROR([bzlib wa
s not found])])
],[
bzlib_status="not found"
])
],[
bzlib_status="disabled"
])
# Build with liblzma
AC_ARG_WITH([liblzma],
AS_HELP_STRING([--with-liblzma],[Compile with support to decompress xz fi
les]),
[],[with_liblzma=check])
AS_IF([test "x$with_liblzma" != "xno" ],
[
AC_CHECK_HEADERS(lzma.h)
AS_IF([test "x$ac_cv_header_lzma_h" = "xyes"],
[
AC_CHECK_LIB([lzma],[lzma_stream_decoder],
[
LIBS="-llzma ${LIBS}"
HAVE_LIBLZMA_LIB="yes"
],[
HAVE_LIBLZMA_LIB=""
])
AS_IF([test "x$HAVE_LIBLZMA_LIB" != "xyes"],[AC_MSG_ERROR([liblzm
a was not found])])
],[
liblzma_status="not found"
])
],[
liblzma_status="disabled"
])
dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST AC_C_CONST
AC_STRUCT_TM AC_STRUCT_TM
# Change the gettext version according to the available version on your system. # Change the gettext version according to the available version on your system.
# It should not be necessary to change it unless you run autoreconf -fi. # It should not be necessary to change it unless you run autoreconf -fi.
AM_GNU_GETTEXT_VERSION([0.19.8]) AM_GNU_GETTEXT_VERSION([0.18])
AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT([external])
AC_SYS_LARGEFILE AC_SYS_LARGEFILE
# Check whether fopen64 is available and whether _LARGEFILE64_SOURCE # Check whether fopen64 is available and whether _LARGEFILE64_SOURCE
# needs to be defined for it # needs to be defined for it
AC_MSG_CHECKING([for fopen64]) AC_MSG_CHECKING([for fopen64])
AC_CACHE_VAL(bu_cv_have_fopen64, AC_CACHE_VAL(bu_cv_have_fopen64,
[noerror_CFLAGS=$CFLAGS [noerror_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -Werror" CFLAGS="$CFLAGS -Werror"
skipping to change at line 176 skipping to change at line 280
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[FILE *f = fopen64 ("/ tmp/foo","r");fclose(f);]])],[bu_cv_have_fopen64="yes without -Werror" AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[FILE *f = fopen64 ("/ tmp/foo","r");fclose(f);]])],[bu_cv_have_fopen64="yes without -Werror"
werror_status="fail"], werror_status="fail"],
[CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE" [CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE"
AC_TRY_LINK([#include <stdio.h>], [FILE *f = fopen64 ("/tmp/foo","r");fclose(f) ;], AC_TRY_LINK([#include <stdio.h>], [FILE *f = fopen64 ("/tmp/foo","r");fclose(f) ;],
bu_cv_have_fopen64="need -D_LARGEFILE64_SOURCE and no -Werror" bu_cv_have_fopen64="need -D_LARGEFILE64_SOURCE and no -Werror"
werror_status="fail", werror_status="fail",
bu_cv_have_fopen64=no)])) bu_cv_have_fopen64=no)]))
]) ])
CFLAGS=$noerror_CFLAGS]) CFLAGS=$noerror_CFLAGS])
AC_MSG_RESULT($bu_cv_have_fopen64) AC_MSG_RESULT($bu_cv_have_fopen64)
if test "$bu_cv_have_fopen64" != no; then AS_IF([test "$bu_cv_have_fopen64" != no],
AC_DEFINE([HAVE_FOPEN64], 1, [
[Is fopen64 available?]) AC_DEFINE([HAVE_FOPEN64],1,[Is fopen64 available?])
if test "$bu_cv_have_fopen64" = "need -D_LARGEFILE64_SOURCE"; then AS_IF([test "$bu_cv_have_fopen64" = "need -D_LARGEFILE64_SOURCE"],
AC_DEFINE([_LARGEFILE64_SOURCE], 1, [
[Enable LFS]) AC_DEFINE([_LARGEFILE64_SOURCE],1,[Enable LFS])
fi ])
fi ])
dnl check for functions dnl check for functions
AC_CHECK_FUNCS(bzero)
AC_CHECK_FUNCS(backtrace) AC_CHECK_FUNCS(backtrace)
AC_CHECK_FUNCS(symlink) AC_CHECK_FUNCS(symlink)
AC_CHECK_FUNCS(lstat) AC_CHECK_FUNCS(lstat)
AC_CHECK_FUNCS(getnameinfo) AC_CHECK_FUNCS(getnameinfo)
AC_CHECK_FUNCS(getaddrinfo) AC_CHECK_FUNCS(getaddrinfo)
AC_CHECK_FUNCS(mkstemp) AC_CHECK_FUNCS(mkstemp)
AC_CHECK_FUNCS(fnmatch)
dnl check for structure members dnl check for structure members
AC_CHECK_MEMBER([struct sockaddr_storage.ss_len],[AC_DEFINE([HAVE_SOCKADDR_SA_LE N],1,[ss_len in sockaddr_storage])]) AC_CHECK_MEMBER([struct sockaddr_storage.ss_len],[AC_DEFINE([HAVE_SOCKADDR_SA_LE N],1,[ss_len in sockaddr_storage])])
dnl windows require this library
AS_IF([test $ac_cv_header_winsock_h = "yes"],
[
# AC_CHECK_LIBS([ws2_32],[WSAGetLastError]) fails because of the __stdcall in
the function prototype
LIBS="$LIBS -lws2_32"
])
dnl check for the rlim_t size dnl check for the rlim_t size
AC_CHECK_SIZEOF(rlim_t,1,[#if HAVE_SYS_RESOURCE_H AC_CHECK_SIZEOF(rlim_t,1,[#if HAVE_SYS_RESOURCE_H
#include <sys/resource.h> #include <sys/resource.h>
#endif #endif
]) ])
if test $ac_cv_sizeof_rlim_t = "4"; then AS_IF([test $ac_cv_sizeof_rlim_t = "4"],
AC_DEFINE(RLIM_STRING, "%d", [Rlim string]) [
elif test $ac_cv_sizeof_rlim_t = "8"; then AC_DEFINE(RLIM_STRING, "%d", [Rlim string])
AC_DEFINE(RLIM_STRING, "%lli", [Rlim string]) ],[test $ac_cv_sizeof_rlim_t = "8"],
else [
AC_MSG_WARN([can not detect the size of your system\'s rlim_t type]) AC_DEFINE(RLIM_STRING, "%lli", [Rlim string])
fi ],[
AC_MSG_WARN([can not detect the size of your system rlim_t type])
])
dnl check for the long long int max constant dnl check for the long long int max constant
AC_CHECK_DECL(LLONG_MAX,HAVE_LLONG_MAX="yes",HAVE_LLONG_MAX="no",[[#include <lim its.h>]]) AC_CHECK_DECL(LLONG_MAX,HAVE_LLONG_MAX="yes",HAVE_LLONG_MAX="no",[[#include <lim its.h>]])
if ( test "x$ac_cv_have_decl_LLONG_MAX" != "xyes" ) ; then AS_IF([test "x$ac_cv_have_decl_LLONG_MAX" != "xyes"],
[
AC_MSG_ERROR([LLONG_MAX is not defined on your system.]) AC_MSG_ERROR([LLONG_MAX is not defined on your system.])
fi ])
dnl Select sarg-php directory dnl Select sarg-php directory
AC_ARG_ENABLE(sargphp, AC_ARG_ENABLE(sargphp,
AS_HELP_STRING([--enable-sargphp=sargphpdir], AS_HELP_STRING([--enable-sargphp=sargphpdir],
[Select sargphpdir as the directory to install sarg-php into]), [Select sargphpdir as the directory to install sarg-php into]),
[
AS_IF([test "$enableval" -a "x$enableval" != "xno"],[SARGPHPDIR=$
enableval])
],[SARGPHPDIR="/var/www/html"])
AS_IF([test "$SARGPHPDIR"],
[ [
if test "$enableval" -a "x$enableval" != "xno" ; then AC_MSG_NOTICE([using $SARGPHPDIR as the directory to install sarg-php])
SARGPHPDIR=$enableval AC_SUBST(SARGPHPDIR)
fi ])
],[SARGPHPDIR="/var/www/html"])
if test "$SARGPHPDIR" ; then
echo "using $SARGPHPDIR as the directory to install sarg-php"
AC_SUBST(SARGPHPDIR)
fi
dnl Select fonts dir dnl Select fonts dir
AC_ARG_ENABLE(fontdir, AC_ARG_ENABLE(fontdir,
AS_HELP_STRING([--enable-fontdir=fontdir], AS_HELP_STRING([--enable-fontdir=fontdir],
[Select fontdir as the directory with the fonts to use in the reports]), [Select fontdir as the directory with the fonts to use in the reports]),
[ [
if test "$enableval" -a "x$enableval" != "xno" ; then AS_IF([test "$enableval" -a "x$enableval" != "xno"],[FONTDIR=$ena
FONTDIR=$enableval bleval])
fi ],[FONTDIR="${datarootdir}/sarg/fonts"])
],[FONTDIR="${datarootdir}/sarg/fonts"]) AS_IF([test "$FONTDIR"],
if test "$FONTDIR" ; then [
if test "x$prefix" = "xNONE" ; then AS_IF([test "x$prefix" = "xNONE"],
tempfullpath=`prefix=$ac_default_prefix ; eval "echo $FONTDIR"` [
else tempfullpath=`prefix=$ac_default_prefix ; eval "echo $FONTDIR"`
tempfullpath=`eval "echo $FONTDIR"` ],[
fi tempfullpath=`eval "echo $FONTDIR"`
echo "using $tempfullpath as the directory of the fonts" ])
AC_SUBST(FONTDIR) AC_MSG_NOTICE([using $tempfullpath as the directory of the fonts])
fi AC_SUBST(FONTDIR)
])
dnl Select images dir dnl Select images dir
AC_ARG_ENABLE(imagedir, AC_ARG_ENABLE(imagedir,
AS_HELP_STRING([--enable-imagedir=imagedir], AS_HELP_STRING([--enable-imagedir=imagedir],
[Select imagedir as the directory with the images to use in the reports]), [Select imagedir as the directory with the images to use in the reports])
[ ,
if test "$enableval"; then [
IMAGEDIR=$enableval AS_IF([test "$enableval"],[IMAGEDIR=$enableval])
fi ],[IMAGEDIR="${datarootdir}/sarg/images"])
],[IMAGEDIR="${datarootdir}/sarg/images"]) AS_IF([test "x$prefix" = "xNONE"],
if test "x$prefix" = "xNONE" ; then [
tempfullpath=`prefix=$ac_default_prefix ; eval "echo $IMAGEDIR"` tempfullpath=`prefix=$ac_default_prefix ; eval "echo $IMAGEDIR"`
else ],[
tempfullpath=`eval "echo $IMAGEDIR"` tempfullpath=`eval "echo $IMAGEDIR"`
fi ])
echo "using $tempfullpath as the directory of the images" AC_MSG_NOTICE([using $tempfullpath as the directory of the images])
AC_SUBST(IMAGEDIR) AC_SUBST(IMAGEDIR)
dnl Enable extra compile and run time protection dnl Enable extra compile and run time protection
AC_ARG_ENABLE(extraprotection, AC_ARG_ENABLE(extraprotection,
AS_HELP_STRING([--enable-extraprotection], AS_HELP_STRING([--enable-extraprotection],
[Enable compile and runtime extra protections]), [Enable compile and runtime extra protections]),
[ [
if test "$enableval"; then AS_IF([test "$enableval"],
# _FORTIFY_SOURCE may have been defined by the system. It must be undefin [
ed before it is changed to the value we want. # _FORTIFY_SOURCE may have been defined by the system. It must be
CFLAGS="${CFLAGS} -fstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 undefined before it is changed to the value we want.
" CFLAGS="${CFLAGS} -fstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_
if test "x$werror_status" != "xfail" ; then SOURCE=2"
CFLAGS="${CFLAGS} -Werror" AS_IF([test "x$werror_status" != "xfail"],[CFLAGS="${CFLAGS} -Wer
fi ror"])
AC_MSG_CHECKING([for format security flag in $CC]) AC_MSG_CHECKING([for format security flag in $CC])
saved_CFLAGS="${CFLAGS}" saved_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} -Wformat -Werror=format-security" CFLAGS="${CFLAGS} -Wformat -Werror=format-security"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_format_security="yes"],[have AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_format_security="yes
_format_security="no"]) "],[have_format_security="no"])
AC_MSG_RESULT($have_format_security) AC_MSG_RESULT($have_format_security)
if test "$have_format_security" = "no" ; then AS_IF([test "$have_format_security" = "no"],[CFLAGS="${saved_CFLA
CFLAGS="${saved_CFLAGS}" GS}"])
fi
AC_MSG_CHECKING([for empty body flag in $CC])
AC_MSG_CHECKING([for empty body flag in $CC]) saved_CFLAGS="${CFLAGS}"
saved_CFLAGS="${CFLAGS}" CFLAGS="${CFLAGS} -Wempty-body"
CFLAGS="${CFLAGS} -Wempty-body" AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_empty_body="yes"],[h
AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_empty_body="yes"],[have_empt ave_empty_body="no"])
y_body="no"]) AC_MSG_RESULT($have_empty_body)
AC_MSG_RESULT($have_empty_body) AS_IF([test "$have_empty_body" = "no"],[CFLAGS="${saved_CFLAGS}"]
if test "$have_empty_body" = "no" ; then )
CFLAGS="${saved_CFLAGS}" ])
fi
fi
]) ])
dnl Enable double check of the data written in the reports dnl Enable double check of the data written in the reports
AC_ARG_ENABLE(doublecheck, AC_ARG_ENABLE(doublecheck,
AS_HELP_STRING([--enable-doublecheck], AS_HELP_STRING([--enable-doublecheck],
[Make sarg double check the data it manipulates and output a warning if an error [Make sarg double check the data it manipulates and output a warning if a
is found]), n error is found]),
[ [
if test "$enableval"; then AS_IF([test "$enableval"],
AC_DEFINE(ENABLE_DOUBLE_CHECK_DATA) [
fi AC_DEFINE(ENABLE_DOUBLE_CHECK_DATA)
])
]) ])
dnl Get the xsl stylesheet to produce the manpage dnl Get the xsl stylesheet to produce the manpage
AC_ARG_ENABLE(xsl-man, AC_ARG_ENABLE(xsl-man,
AS_HELP_STRING([--enable-xsl-man=man-xsl-style-sheet], AS_HELP_STRING([--enable-xsl-man=man-xsl-style-sheet],
[Select the directory containing the the XSL stylesheets to convert DocBook into [Select the directory containing the the XSL stylesheets to convert DocBo
man page]), ok into man page]),
[ [
if test "$enableval"; then AS_IF([test "$enableval"],
[
XSL_MAN_STYLESHEET=$enableval XSL_MAN_STYLESHEET=$enableval
AC_SUBST(XSL_MAN_STYLESHEET) AC_SUBST(XSL_MAN_STYLESHEET)
fi ])
], ],
AC_CHECK_FILES([/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.x sl], AC_CHECK_FILES([/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.x sl],
[ [
# debian # debian
XSL_MAN_STYLESHEET="/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpage s/docbook.xsl" XSL_MAN_STYLESHEET="/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpage s/docbook.xsl"
AC_SUBST(XSL_MAN_STYLESHEET) AC_SUBST(XSL_MAN_STYLESHEET)
], ],[
[ AC_CHECK_FILES([/usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.
AC_CHECK_FILES([/usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl], xsl],
[ [
# gentoo # gentoo
XSL_MAN_STYLESHEET="/usr/share/sgml/docbook/xsl-stylesheets/manpages/docb XSL_MAN_STYLESHEET="/usr/share/sgml/docbook/xsl-stylesheets/manpa
ook.xsl" ges/docbook.xsl"
AC_SUBST(XSL_MAN_STYLESHEET) AC_SUBST(XSL_MAN_STYLESHEET)
],) ])
])) ]))
dnl Get the xsl stylesheet to produce the html page dnl Get the xsl stylesheet to produce the html page
AC_ARG_ENABLE(xsl-html, AC_ARG_ENABLE(xsl-html,
AS_HELP_STRING([--enable-xsl-html=html-xsl-style-sheet], AS_HELP_STRING([--enable-xsl-html=html-xsl-style-sheet],
[Select the directory containing the the XSL stylesheets to convert DocBook into [Select the directory containing the the XSL stylesheets to convert DocBo
html page]), ok into html page]),
[ [
if test "$enableval"; then AS_IF([test "$enableval"],
[
XSL_HTML_STYLESHEET=$enableval XSL_HTML_STYLESHEET=$enableval
AC_SUBST(XSL_HTML_STYLESHEET) AC_SUBST(XSL_HTML_STYLESHEET)
fi ])
], ],
AC_CHECK_FILES([/usr/share/sgml/docbook/stylesheet/xsl/docbook-xsl/html/onechunk .xsl], AC_CHECK_FILES([/usr/share/sgml/docbook/stylesheet/xsl/docbook-xsl/html/onechunk .xsl],
[ [
# debian # debian
XSL_HTML_STYLESHEET="/usr/share/sgml/docbook/stylesheet/xsl/docbook-xsl/h tml/onechunk.xsl" XSL_HTML_STYLESHEET="/usr/share/sgml/docbook/stylesheet/xsl/docbook-xsl/h tml/onechunk.xsl"
AC_SUBST(XSL_HTML_STYLESHEET) AC_SUBST(XSL_HTML_STYLESHEET)
], ],
[ [
AC_CHECK_FILES([/usr/share/sgml/docbook/xsl-stylesheets/html/onechunk.xsl], AC_CHECK_FILES([/usr/share/sgml/docbook/xsl-stylesheets/html/onechunk.xsl],
[ [
# gentoo # gentoo
XSL_HTML_STYLESHEET="/usr/share/sgml/docbook/xsl-stylesheets/html/onechun k.xsl" XSL_HTML_STYLESHEET="/usr/share/sgml/docbook/xsl-stylesheets/html/onechun k.xsl"
AC_SUBST(XSL_HTML_STYLESHEET) AC_SUBST(XSL_HTML_STYLESHEET)
],) ])
])) ]))
AC_SUBST(PACKAGE,"$PACKAGE_NAME") AC_SUBST(PACKAGE,"$PACKAGE_NAME")
AC_SUBST(VERSION,"$PACKAGE_VERSION") AC_SUBST(VERSION,"$PACKAGE_VERSION")
AC_CONFIG_FILES([Makefile po/Makefile.in]) AC_CONFIG_FILES([Makefile po/Makefile.in])
AC_OUTPUT AC_OUTPUT
if ( test "x$gd_status" = "xdisabled" ) ; then AS_IF([test "x$gd_status" = "xdisabled"],[
AC_MSG_NOTICE([Not building with gd as requested on the configuration com mand line]) AC_MSG_NOTICE([Not building with gd as requested on the configuration com mand line])
elif ( test "x$gd_status" = "xnot found" ) ; then ],[test "x$gd_status" = "xnot found"],[
AC_MSG_NOTICE([gd.h was not found so the graphs won't be available in the report]) AC_MSG_NOTICE([gd.h was not found so the graphs won't be available in the report])
fi ])
if ( test "x$pcre_status" = "xdisabled" ) ; then AS_IF([test "x$pcre_status" = "xdisabled"],[
AC_MSG_NOTICE([Not building with pcre as requested on the configuration c ommand line]) AC_MSG_NOTICE([Not building with pcre as requested on the configuration c ommand line])
elif ( test "x$pcre_status" = "xnot found" ) ; then ],[test "x$pcre_status" = "xnot found"],[
AC_MSG_NOTICE([pcre.h was not found so the regexp won't be available in t AC_MSG_NOTICE([pcre.h was not found so the regexp won't be available in h
he hostalias]) ostalias])
fi ])
AS_IF([test "x$ldap_status" = "xdisabled"],[
AC_MSG_NOTICE([Not building with LDAP support as requested on the configu
ration command line])
],[test "x$ldap_status" = "xnot found"],[
AC_MSG_NOTICE([ldap header files not found so LDAP is not available to re
solve user's names])
])
AS_IF([test "x$glob_status" = "xdisabled"],[
AC_MSG_NOTICE([Not building with file globbing as requested on the config
uration command line])
])
AS_IF([test "x$zlib_status" = "xdisabled"],[
AC_MSG_NOTICE([Not building with zlib as requested on the configuration c
ommand line])
],[test "x$zlib_status" = "xnot found"],[
AC_MSG_NOTICE([zlib.h was not found so it won't be possible to process gz
ipped files])
])
AS_IF([test "x$bzlib_status" = "xdisabled"],[
AC_MSG_NOTICE([Not building with bzlib as requested on the configuration
command line])
],[test "x$bzlib_status" = "xnot found"],[
AC_MSG_NOTICE([bzlib.h was not found so it won't be possible to process b
zipped files])
])
AS_IF([test "x$liblzma_status" = "xdisabled"],[
AC_MSG_NOTICE([Not building with liblzma as requested on the configuratio
n command line])
],[test "x$liblzma_status" = "xnot found"],[
AC_MSG_NOTICE([lzma.h was not found so it won't be possible to process xz
files])
])
 End of changes. 52 change blocks. 
173 lines changed or deleted 300 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)