12488
for ac_header in stdlib.h unistd.h
12490
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12491
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12492
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
12493
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12494
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12495
echo $ECHO_N "(cached) $ECHO_C" >&6
12497
ac_res=`eval echo '${'$as_ac_Header'}'`
12498
{ echo "$as_me:$LINENO: result: $ac_res" >&5
12499
echo "${ECHO_T}$ac_res" >&6; }
12501
# Is the header compilable?
12502
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
12503
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
12504
cat >conftest.$ac_ext <<_ACEOF
12507
cat confdefs.h >>conftest.$ac_ext
12508
cat >>conftest.$ac_ext <<_ACEOF
12509
/* end confdefs.h. */
12510
$ac_includes_default
12511
#include <$ac_header>
12513
rm -f conftest.$ac_objext
12514
if { (ac_try="$ac_compile"
12515
case "(($ac_try" in
12516
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12517
*) ac_try_echo=$ac_try;;
12519
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12520
(eval "$ac_compile") 2>conftest.er1
12522
grep -v '^ *+' conftest.er1 >conftest.err
12524
cat conftest.err >&5
12525
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12526
(exit $ac_status); } && {
12527
test -z "$ac_c_werror_flag" ||
12528
test ! -s conftest.err
12529
} && test -s conftest.$ac_objext; then
12530
ac_header_compiler=yes
12532
echo "$as_me: failed program was:" >&5
12533
sed 's/^/| /' conftest.$ac_ext >&5
12535
ac_header_compiler=no
12538
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12539
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12540
echo "${ECHO_T}$ac_header_compiler" >&6; }
12542
# Is the header present?
12543
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
12544
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
12545
cat >conftest.$ac_ext <<_ACEOF
12548
cat confdefs.h >>conftest.$ac_ext
12549
cat >>conftest.$ac_ext <<_ACEOF
12550
/* end confdefs.h. */
12551
#include <$ac_header>
12553
if { (ac_try="$ac_cpp conftest.$ac_ext"
12554
case "(($ac_try" in
12555
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12556
*) ac_try_echo=$ac_try;;
12558
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12559
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12561
grep -v '^ *+' conftest.er1 >conftest.err
12563
cat conftest.err >&5
12564
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12565
(exit $ac_status); } >/dev/null && {
12566
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12567
test ! -s conftest.err
12569
ac_header_preproc=yes
12571
echo "$as_me: failed program was:" >&5
12572
sed 's/^/| /' conftest.$ac_ext >&5
12574
ac_header_preproc=no
12577
rm -f conftest.err conftest.$ac_ext
12578
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12579
echo "${ECHO_T}$ac_header_preproc" >&6; }
12581
# So? What about this header?
12582
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12584
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12585
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12586
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12587
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12588
ac_header_preproc=yes
12591
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12592
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12593
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12594
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12595
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12596
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12597
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
12598
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
12599
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12600
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12601
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12602
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12604
## -------------------------------------- ##
12605
## Report this to http://bugs.clamav.net/ ##
12606
## -------------------------------------- ##
12608
) | sed "s/^/$as_me: WARNING: /" >&2
12611
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
12612
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12613
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12614
echo $ECHO_N "(cached) $ECHO_C" >&6
12616
eval "$as_ac_Header=\$ac_header_preproc"
12618
ac_res=`eval echo '${'$as_ac_Header'}'`
12619
{ echo "$as_me:$LINENO: result: $ac_res" >&5
12620
echo "${ECHO_T}$ac_res" >&6; }
12623
if test `eval echo '${'$as_ac_Header'}'` = yes; then
12624
cat >>confdefs.h <<_ACEOF
12625
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12633
for ac_func in getpagesize
12635
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12636
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
12637
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
12638
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
12639
echo $ECHO_N "(cached) $ECHO_C" >&6
12641
cat >conftest.$ac_ext <<_ACEOF
12644
cat confdefs.h >>conftest.$ac_ext
12645
cat >>conftest.$ac_ext <<_ACEOF
12646
/* end confdefs.h. */
12647
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
12648
For example, HP-UX 11i <limits.h> declares gettimeofday. */
12649
#define $ac_func innocuous_$ac_func
12651
/* System header to define __stub macros and hopefully few prototypes,
12652
which can conflict with char $ac_func (); below.
12653
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12654
<limits.h> exists even on freestanding compilers. */
12657
# include <limits.h>
12659
# include <assert.h>
12664
/* Override any GCC internal prototype to avoid an error.
12665
Use char because int might match the return type of a GCC
12666
builtin and then its argument prototype would still apply. */
12671
/* The GNU C library defines this for functions which it implements
12672
to always fail with ENOSYS. Some functions are actually named
12673
something starting with __ and the normal name is an alias. */
12674
#if defined __stub_$ac_func || defined __stub___$ac_func
12681
return $ac_func ();
12686
rm -f conftest.$ac_objext conftest$ac_exeext
12687
if { (ac_try="$ac_link"
12688
case "(($ac_try" in
12689
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12690
*) ac_try_echo=$ac_try;;
12692
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12693
(eval "$ac_link") 2>conftest.er1
12695
grep -v '^ *+' conftest.er1 >conftest.err
12697
cat conftest.err >&5
12698
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12699
(exit $ac_status); } && {
12700
test -z "$ac_c_werror_flag" ||
12701
test ! -s conftest.err
12702
} && test -s conftest$ac_exeext &&
12703
$as_test_x conftest$ac_exeext; then
12704
eval "$as_ac_var=yes"
12706
echo "$as_me: failed program was:" >&5
12707
sed 's/^/| /' conftest.$ac_ext >&5
12709
eval "$as_ac_var=no"
12712
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12713
conftest$ac_exeext conftest.$ac_ext
12715
ac_res=`eval echo '${'$as_ac_var'}'`
12716
{ echo "$as_me:$LINENO: result: $ac_res" >&5
12717
echo "${ECHO_T}$ac_res" >&6; }
12718
if test `eval echo '${'$as_ac_var'}'` = yes; then
12719
cat >>confdefs.h <<_ACEOF
12720
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12726
{ echo "$as_me:$LINENO: checking for working mmap" >&5
12516
{ echo "$as_me:$LINENO: checking for working mmap" >&5
12727
12517
echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
12728
if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
12518
if test "${ac_cv_c_mmap_private+set}" = set; then
12729
12519
echo $ECHO_N "(cached) $ECHO_C" >&6
12731
if test "$cross_compiling" = yes; then
12732
ac_cv_func_mmap_fixed_mapped=no
12522
if test "$cross_compiling" = yes; then
12523
ac_cv_c_mmap_private=no
12734
12525
cat >conftest.$ac_ext <<_ACEOF
12735
12526
/* confdefs.h. */
12737
12528
cat confdefs.h >>conftest.$ac_ext
12738
12529
cat >>conftest.$ac_ext <<_ACEOF
12739
12530
/* end confdefs.h. */
12740
$ac_includes_default
12741
/* malloc might have been renamed as rpl_malloc. */
12744
/* Thanks to Mike Haertel and Jim Avera for this test.
12745
Here is a matrix of mmap possibilities:
12746
mmap private not fixed
12747
mmap private fixed at somewhere currently unmapped
12748
mmap private fixed at somewhere already mapped
12749
mmap shared not fixed
12750
mmap shared fixed at somewhere currently unmapped
12751
mmap shared fixed at somewhere already mapped
12752
For private mappings, we should verify that changes cannot be read()
12753
back from the file, nor mmap's back from the file at a different
12754
address. (There have been systems where private was not correctly
12755
implemented like the infamous i386 svr4.0, and systems where the
12756
VM page cache was not coherent with the file system buffer cache
12757
like early versions of FreeBSD and possibly contemporary NetBSD.)
12758
For shared mappings, we should conversely verify that changes get
12759
propagated back to all the places they're supposed to be.
12761
Grep wants private fixed already mapped.
12762
The main things grep needs to know about mmap are:
12763
* does it exist and is it safe to write into the mmap'd area
12764
* how to use it (BSD variants) */
12532
#include <unistd.h>
12533
#include <stdlib.h>
12534
#include <sys/mman.h>
12535
#ifdef HAVE_SYS_TYPES_H
12536
#include <sys/types.h>
12538
#ifdef HAVE_SYS_STAT_H
12539
#include <sys/stat.h>
12766
12541
#include <fcntl.h>
12767
#include <sys/mman.h>
12769
#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
12773
/* This mess was copied from the GNU getpagesize.h. */
12774
#ifndef HAVE_GETPAGESIZE
12775
/* Assume that all systems that can run configure have sys/param.h. */
12776
# ifndef HAVE_SYS_PARAM_H
12777
# define HAVE_SYS_PARAM_H 1
12780
# ifdef _SC_PAGESIZE
12781
# define getpagesize() sysconf(_SC_PAGESIZE)
12782
# else /* no _SC_PAGESIZE */
12783
# ifdef HAVE_SYS_PARAM_H
12784
# include <sys/param.h>
12785
# ifdef EXEC_PAGESIZE
12786
# define getpagesize() EXEC_PAGESIZE
12787
# else /* no EXEC_PAGESIZE */
12789
# define getpagesize() NBPG * CLSIZE
12792
# endif /* no CLSIZE */
12793
# else /* no NBPG */
12795
# define getpagesize() NBPC
12796
# else /* no NBPC */
12798
# define getpagesize() PAGESIZE
12799
# endif /* PAGESIZE */
12800
# endif /* no NBPC */
12801
# endif /* no NBPG */
12802
# endif /* no EXEC_PAGESIZE */
12803
# else /* no HAVE_SYS_PARAM_H */
12804
# define getpagesize() 8192 /* punt totally */
12805
# endif /* no HAVE_SYS_PARAM_H */
12806
# endif /* no _SC_PAGESIZE */
12808
#endif /* no HAVE_GETPAGESIZE */
12813
char *data, *data2, *data3;
12817
pagesize = getpagesize ();
12819
/* First, make a file with some known garbage in it. */
12820
data = (char *) malloc (pagesize);
12823
for (i = 0; i < pagesize; ++i)
12824
*(data + i) = rand ();
12826
fd = creat ("conftest.mmap", 0600);
12829
if (write (fd, data, pagesize) != pagesize)
12833
/* Next, try to mmap the file at a fixed address which already has
12834
something else allocated at it. If we can, also make sure that
12835
we see the same garbage. */
12836
fd = open ("conftest.mmap", O_RDWR);
12839
data2 = (char *) malloc (2 * pagesize);
12842
data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
12843
if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12844
MAP_PRIVATE | MAP_FIXED, fd, 0L))
12846
for (i = 0; i < pagesize; ++i)
12847
if (*(data + i) != *(data2 + i))
12850
/* Finally, make sure that changes to the mapped area do not
12851
percolate back to the file as seen by read(). (This is a bug on
12852
some variants of i386 svr4.0.) */
12853
for (i = 0; i < pagesize; ++i)
12854
*(data2 + i) = *(data2 + i) + 1;
12855
data3 = (char *) malloc (pagesize);
12858
if (read (fd, data3, pagesize) != pagesize)
12860
for (i = 0; i < pagesize; ++i)
12861
if (*(data + i) != *(data3 + i))
12544
char *data, *data2, *data3;
12545
unsigned i, datasize = 1024;
12548
/* First, make a file with some known garbage in it. */
12549
data = (char*) malloc(datasize);
12552
for(i=0;i<datasize;i++)
12553
*(data + i) = rand();
12555
fd = creat("conftest.mmap", 0600);
12558
if(write (fd, data, datasize) != datasize)
12561
fd = open("conftest.mmap", O_RDWR);
12564
/* Next, try to mmap the file at a fixed address which already has
12565
something else allocated at it. If we can, also make sure that
12566
we see the same garbage. */
12567
data2 = mmap(NULL, sizeof(data), PROT_READ | PROT_WRITE,
12568
MAP_PRIVATE, fd, 0L);
12569
if(data2 == MAP_FAILED)
12571
for(i=0;i<sizeof(data);i++)
12572
if(*(data + i) != *(data2+ i))
12574
/* Finally, make sure that changes to the mapped area do not
12575
percolate back to the file as seen by read(). (This is a bug on
12576
some variants of i386 svr4.0.) */
12577
for (i = 0; i < datasize; ++i)
12578
*(data2 + i) = *(data2 + i) + 1;
12579
data3 = (char*) malloc(datasize);
12582
if(read (fd, data3, datasize) != datasize)
12584
for(i=0;i<sizeof(data);i++)
12585
if(*(data + i) != *(data3 + i))
12867
12591
rm -f conftest$ac_exeext
12761
enable_check_ut=auto
12762
enable_ut_install=no
12763
# Check whether --enable-check was given.
12764
if test "${enable_check+set}" = set; then
12765
enableval=$enable_check; enable_check_ut=$enableval
12767
enable_check_ut="auto"
12771
if test "$enable_check_ut" != "no" ; then
12774
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
12775
if test -n "$ac_tool_prefix"; then
12776
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
12777
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
12778
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12779
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
12780
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12781
echo $ECHO_N "(cached) $ECHO_C" >&6
12783
case $PKG_CONFIG in
12785
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12788
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12789
for as_dir in $PATH
12792
test -z "$as_dir" && as_dir=.
12793
for ac_exec_ext in '' $ac_executable_extensions; do
12794
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12795
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12796
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12806
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12807
if test -n "$PKG_CONFIG"; then
12808
{ echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12809
echo "${ECHO_T}$PKG_CONFIG" >&6; }
12811
{ echo "$as_me:$LINENO: result: no" >&5
12812
echo "${ECHO_T}no" >&6; }
12817
if test -z "$ac_cv_path_PKG_CONFIG"; then
12818
ac_pt_PKG_CONFIG=$PKG_CONFIG
12819
# Extract the first word of "pkg-config", so it can be a program name with args.
12820
set dummy pkg-config; ac_word=$2
12821
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12822
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
12823
if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
12824
echo $ECHO_N "(cached) $ECHO_C" >&6
12826
case $ac_pt_PKG_CONFIG in
12828
ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
12831
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12832
for as_dir in $PATH
12835
test -z "$as_dir" && as_dir=.
12836
for ac_exec_ext in '' $ac_executable_extensions; do
12837
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12838
ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12839
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12849
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
12850
if test -n "$ac_pt_PKG_CONFIG"; then
12851
{ echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
12852
echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
12854
{ echo "$as_me:$LINENO: result: no" >&5
12855
echo "${ECHO_T}no" >&6; }
12858
if test "x$ac_pt_PKG_CONFIG" = x; then
12861
case $cross_compiling:$ac_tool_warned in
12863
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
12864
whose name does not start with the host triplet. If you think this
12865
configuration is useful to you, please write to autoconf@gnu.org." >&5
12866
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
12867
whose name does not start with the host triplet. If you think this
12868
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
12869
ac_tool_warned=yes ;;
12871
PKG_CONFIG=$ac_pt_PKG_CONFIG
12874
PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
12878
if test -n "$PKG_CONFIG"; then
12879
_pkg_min_version=0.9.0
12880
{ echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
12881
echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; }
12882
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
12883
{ echo "$as_me:$LINENO: result: yes" >&5
12884
echo "${ECHO_T}yes" >&6; }
12886
{ echo "$as_me:$LINENO: result: no" >&5
12887
echo "${ECHO_T}no" >&6; }
12894
{ echo "$as_me:$LINENO: checking for CHECK" >&5
12895
echo $ECHO_N "checking for CHECK... $ECHO_C" >&6; }
12897
if test -n "$PKG_CONFIG"; then
12898
if test -n "$CHECK_CFLAGS"; then
12899
pkg_cv_CHECK_CFLAGS="$CHECK_CFLAGS"
12901
if test -n "$PKG_CONFIG" && \
12902
{ (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"check\"") >&5
12903
($PKG_CONFIG --exists --print-errors "check") 2>&5
12905
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12906
(exit $ac_status); }; then
12907
pkg_cv_CHECK_CFLAGS=`$PKG_CONFIG --cflags "check" 2>/dev/null`
12915
if test -n "$PKG_CONFIG"; then
12916
if test -n "$CHECK_LIBS"; then
12917
pkg_cv_CHECK_LIBS="$CHECK_LIBS"
12919
if test -n "$PKG_CONFIG" && \
12920
{ (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"check\"") >&5
12921
($PKG_CONFIG --exists --print-errors "check") 2>&5
12923
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12924
(exit $ac_status); }; then
12925
pkg_cv_CHECK_LIBS=`$PKG_CONFIG --libs "check" 2>/dev/null`
12936
if test $pkg_failed = yes; then
12938
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
12939
_pkg_short_errors_supported=yes
12941
_pkg_short_errors_supported=no
12943
if test $_pkg_short_errors_supported = yes; then
12944
CHECK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "check"`
12946
CHECK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "check"`
12948
# Put the nasty error message in config.log where it belongs
12949
echo "$CHECK_PKG_ERRORS" >&5
12951
{ echo "$as_me:$LINENO: result: no" >&5
12952
echo "${ECHO_T}no" >&6; }
12953
{ echo "$as_me:$LINENO: WARNING: unable to find 'check' using pkg-config:
12955
Alternatively, you may set the environment variables CHECK_CFLAGS
12956
and CHECK_LIBS to avoid the need to call pkg-config.
12957
See the pkg-config man page for more details." >&5
12958
echo "$as_me: WARNING: unable to find 'check' using pkg-config:
12960
Alternatively, you may set the environment variables CHECK_CFLAGS
12961
and CHECK_LIBS to avoid the need to call pkg-config.
12962
See the pkg-config man page for more details." >&2;}
12963
elif test $pkg_failed = untried; then
12964
{ echo "$as_me:$LINENO: WARNING: unable to find 'check' using pkg-config:
12966
Alternatively, you may set the environment variables CHECK_CFLAGS
12967
and CHECK_LIBS to avoid the need to call pkg-config.
12968
See the pkg-config man page for more details." >&5
12969
echo "$as_me: WARNING: unable to find 'check' using pkg-config:
12971
Alternatively, you may set the environment variables CHECK_CFLAGS
12972
and CHECK_LIBS to avoid the need to call pkg-config.
12973
See the pkg-config man page for more details." >&2;}
12975
CHECK_CFLAGS=$pkg_cv_CHECK_CFLAGS
12976
CHECK_LIBS=$pkg_cv_CHECK_LIBS
12977
{ echo "$as_me:$LINENO: result: yes" >&5
12978
echo "${ECHO_T}yes" >&6; }
12981
save_CPPFLAGS="$CPPFLAGS";
12982
CPPFLAGS="$CPPFLAGS $CHECK_CFLAGS"
12984
if test -z "$CHECK_LIBS"; then
12985
# when pkg-config is not available, use defaults
12986
CHECK_LIBS="-lcheck"
12988
LIBS="$LIBS $CHECK_LIBS"
12989
if test "${ac_cv_header_check_h+set}" = set; then
12990
{ echo "$as_me:$LINENO: checking for check.h" >&5
12991
echo $ECHO_N "checking for check.h... $ECHO_C" >&6; }
12992
if test "${ac_cv_header_check_h+set}" = set; then
12993
echo $ECHO_N "(cached) $ECHO_C" >&6
12995
{ echo "$as_me:$LINENO: result: $ac_cv_header_check_h" >&5
12996
echo "${ECHO_T}$ac_cv_header_check_h" >&6; }
12998
# Is the header compilable?
12999
{ echo "$as_me:$LINENO: checking check.h usability" >&5
13000
echo $ECHO_N "checking check.h usability... $ECHO_C" >&6; }
13001
cat >conftest.$ac_ext <<_ACEOF
13004
cat confdefs.h >>conftest.$ac_ext
13005
cat >>conftest.$ac_ext <<_ACEOF
13006
/* end confdefs.h. */
13007
$ac_includes_default
13010
rm -f conftest.$ac_objext
13011
if { (ac_try="$ac_compile"
13012
case "(($ac_try" in
13013
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13014
*) ac_try_echo=$ac_try;;
13016
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13017
(eval "$ac_compile") 2>conftest.er1
13019
grep -v '^ *+' conftest.er1 >conftest.err
13021
cat conftest.err >&5
13022
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13023
(exit $ac_status); } && {
13024
test -z "$ac_c_werror_flag" ||
13025
test ! -s conftest.err
13026
} && test -s conftest.$ac_objext; then
13027
ac_header_compiler=yes
13029
echo "$as_me: failed program was:" >&5
13030
sed 's/^/| /' conftest.$ac_ext >&5
13032
ac_header_compiler=no
13035
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13036
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13037
echo "${ECHO_T}$ac_header_compiler" >&6; }
13039
# Is the header present?
13040
{ echo "$as_me:$LINENO: checking check.h presence" >&5
13041
echo $ECHO_N "checking check.h presence... $ECHO_C" >&6; }
13042
cat >conftest.$ac_ext <<_ACEOF
13045
cat confdefs.h >>conftest.$ac_ext
13046
cat >>conftest.$ac_ext <<_ACEOF
13047
/* end confdefs.h. */
13050
if { (ac_try="$ac_cpp conftest.$ac_ext"
13051
case "(($ac_try" in
13052
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13053
*) ac_try_echo=$ac_try;;
13055
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13056
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13058
grep -v '^ *+' conftest.er1 >conftest.err
13060
cat conftest.err >&5
13061
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13062
(exit $ac_status); } >/dev/null && {
13063
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13064
test ! -s conftest.err
13066
ac_header_preproc=yes
13068
echo "$as_me: failed program was:" >&5
13069
sed 's/^/| /' conftest.$ac_ext >&5
13071
ac_header_preproc=no
13074
rm -f conftest.err conftest.$ac_ext
13075
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13076
echo "${ECHO_T}$ac_header_preproc" >&6; }
13078
# So? What about this header?
13079
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13081
{ echo "$as_me:$LINENO: WARNING: check.h: accepted by the compiler, rejected by the preprocessor!" >&5
13082
echo "$as_me: WARNING: check.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13083
{ echo "$as_me:$LINENO: WARNING: check.h: proceeding with the compiler's result" >&5
13084
echo "$as_me: WARNING: check.h: proceeding with the compiler's result" >&2;}
13085
ac_header_preproc=yes
13088
{ echo "$as_me:$LINENO: WARNING: check.h: present but cannot be compiled" >&5
13089
echo "$as_me: WARNING: check.h: present but cannot be compiled" >&2;}
13090
{ echo "$as_me:$LINENO: WARNING: check.h: check for missing prerequisite headers?" >&5
13091
echo "$as_me: WARNING: check.h: check for missing prerequisite headers?" >&2;}
13092
{ echo "$as_me:$LINENO: WARNING: check.h: see the Autoconf documentation" >&5
13093
echo "$as_me: WARNING: check.h: see the Autoconf documentation" >&2;}
13094
{ echo "$as_me:$LINENO: WARNING: check.h: section \"Present But Cannot Be Compiled\"" >&5
13095
echo "$as_me: WARNING: check.h: section \"Present But Cannot Be Compiled\"" >&2;}
13096
{ echo "$as_me:$LINENO: WARNING: check.h: proceeding with the preprocessor's result" >&5
13097
echo "$as_me: WARNING: check.h: proceeding with the preprocessor's result" >&2;}
13098
{ echo "$as_me:$LINENO: WARNING: check.h: in the future, the compiler will take precedence" >&5
13099
echo "$as_me: WARNING: check.h: in the future, the compiler will take precedence" >&2;}
13101
## -------------------------------------- ##
13102
## Report this to http://bugs.clamav.net/ ##
13103
## -------------------------------------- ##
13105
) | sed "s/^/$as_me: WARNING: /" >&2
13108
{ echo "$as_me:$LINENO: checking for check.h" >&5
13109
echo $ECHO_N "checking for check.h... $ECHO_C" >&6; }
13110
if test "${ac_cv_header_check_h+set}" = set; then
13111
echo $ECHO_N "(cached) $ECHO_C" >&6
13113
ac_cv_header_check_h=$ac_header_preproc
13115
{ echo "$as_me:$LINENO: result: $ac_cv_header_check_h" >&5
13116
echo "${ECHO_T}$ac_cv_header_check_h" >&6; }
13119
if test $ac_cv_header_check_h = yes; then
13121
{ echo "$as_me:$LINENO: checking linking with check" >&5
13122
echo $ECHO_N "checking linking with check... $ECHO_C" >&6; }
13123
cat >conftest.$ac_ext <<_ACEOF
13126
cat confdefs.h >>conftest.$ac_ext
13127
cat >>conftest.$ac_ext <<_ACEOF
13128
/* end confdefs.h. */
13130
/* Override any GCC internal prototype to avoid an error.
13131
Use char because int might match the return type of a GCC
13132
builtin and then its argument prototype would still apply. */
13136
char srunner_create ();
13140
return srunner_create ();
13145
rm -f conftest.$ac_objext conftest$ac_exeext
13146
if { (ac_try="$ac_link"
13147
case "(($ac_try" in
13148
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13149
*) ac_try_echo=$ac_try;;
13151
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13152
(eval "$ac_link") 2>conftest.er1
13154
grep -v '^ *+' conftest.er1 >conftest.err
13156
cat conftest.err >&5
13157
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13158
(exit $ac_status); } && {
13159
test -z "$ac_c_werror_flag" ||
13160
test ! -s conftest.err
13161
} && test -s conftest$ac_exeext &&
13162
$as_test_x conftest$ac_exeext; then
13164
{ echo "$as_me:$LINENO: result: ok" >&5
13165
echo "${ECHO_T}ok" >&6; }
13167
cat >>confdefs.h <<\_ACEOF
13168
#define HAVE_CHECK 1
13171
# Check whether --enable-tests-install was given.
13172
if test "${enable_tests_install+set}" = set; then
13173
enableval=$enable_tests_install; enable_ut_install=$enableval
13175
enable_ut_install="no"
13180
echo "$as_me: failed program was:" >&5
13181
sed 's/^/| /' conftest.$ac_ext >&5
13183
{ echo "$as_me:$LINENO: result: failed" >&5
13184
echo "${ECHO_T}failed" >&6; };CHECK_LIBS=
13188
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13189
conftest$ac_exeext conftest.$ac_ext
13195
CPPFLAGS="$save_CPPFLAGS"
13198
if test "x$CHECK_LIBS" = "x" -a "$enable_check_ut" = "yes"; then
13199
{ { echo "$as_me:$LINENO: error:
13202
Alternatively, you may set the environment variables CHECK_CFLAGS
13203
and CHECK_LIBS to avoid the need to call pkg-config.
13204
See the pkg-config man page for more details.
13206
ERROR! Check was configured, but not found. Get it from http://check.sf.net/
13208
echo "$as_me: error:
13211
Alternatively, you may set the environment variables CHECK_CFLAGS
13212
and CHECK_LIBS to avoid the need to call pkg-config.
13213
See the pkg-config man page for more details.
13215
ERROR! Check was configured, but not found. Get it from http://check.sf.net/
13217
{ (exit 1); exit 1; }; }
13220
# Check whether --enable-coverage was given.
13221
if test "${enable_coverage+set}" = set; then
13222
enableval=$enable_coverage; enable_cov=$enableval
13228
if test "x$enable_coverage" = "xyes"; then
13229
if test "x$CHECK_LIBS" = "x"; then
13230
{ { echo "$as_me:$LINENO: error: Coverage testing required, but unit tests not enabled!" >&5
13231
echo "$as_me: error: Coverage testing required, but unit tests not enabled!" >&2;}
13232
{ (exit 1); exit 1; }; }
13234
if test "x$ac_compiler_gnu" != "xyes"; then
13235
{ { echo "$as_me:$LINENO: error: coverage testing only works if gcc is used" >&5
13236
echo "$as_me: error: coverage testing only works if gcc is used" >&2;}
13237
{ (exit 1); exit 1; }; }
13240
CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
13241
LDFLAGS="$LDFLAGS -lgcov"
13242
for ac_prog in gcov
13244
# Extract the first word of "$ac_prog", so it can be a program name with args.
13245
set dummy $ac_prog; ac_word=$2
13246
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13247
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
13248
if test "${ac_cv_prog_GCOV+set}" = set; then
13249
echo $ECHO_N "(cached) $ECHO_C" >&6
13251
if test -n "$GCOV"; then
13252
ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
13254
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13255
for as_dir in $PATH
13258
test -z "$as_dir" && as_dir=.
13259
for ac_exec_ext in '' $ac_executable_extensions; do
13260
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13261
ac_cv_prog_GCOV="$ac_prog"
13262
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13271
GCOV=$ac_cv_prog_GCOV
13272
if test -n "$GCOV"; then
13273
{ echo "$as_me:$LINENO: result: $GCOV" >&5
13274
echo "${ECHO_T}$GCOV" >&6; }
13276
{ echo "$as_me:$LINENO: result: no" >&5
13277
echo "${ECHO_T}no" >&6; }
13281
test -n "$GCOV" && break
13283
test -n "$GCOV" || GCOV="false"
13285
for ac_prog in lcov
13287
# Extract the first word of "$ac_prog", so it can be a program name with args.
13288
set dummy $ac_prog; ac_word=$2
13289
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13290
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
13291
if test "${ac_cv_prog_LCOV+set}" = set; then
13292
echo $ECHO_N "(cached) $ECHO_C" >&6
13294
if test -n "$LCOV"; then
13295
ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
13297
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13298
for as_dir in $PATH
13301
test -z "$as_dir" && as_dir=.
13302
for ac_exec_ext in '' $ac_executable_extensions; do
13303
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13304
ac_cv_prog_LCOV="$ac_prog"
13305
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13314
LCOV=$ac_cv_prog_LCOV
13315
if test -n "$LCOV"; then
13316
{ echo "$as_me:$LINENO: result: $LCOV" >&5
13317
echo "${ECHO_T}$LCOV" >&6; }
13319
{ echo "$as_me:$LINENO: result: no" >&5
13320
echo "${ECHO_T}no" >&6; }
13324
test -n "$LCOV" && break
13326
test -n "$LCOV" || LCOV="false"
13328
for ac_prog in genhtml
13330
# Extract the first word of "$ac_prog", so it can be a program name with args.
13331
set dummy $ac_prog; ac_word=$2
13332
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13333
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
13334
if test "${ac_cv_prog_GENHTML+set}" = set; then
13335
echo $ECHO_N "(cached) $ECHO_C" >&6
13337
if test -n "$GENHTML"; then
13338
ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
13340
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13341
for as_dir in $PATH
13344
test -z "$as_dir" && as_dir=.
13345
for ac_exec_ext in '' $ac_executable_extensions; do
13346
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13347
ac_cv_prog_GENHTML="$ac_prog"
13348
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13357
GENHTML=$ac_cv_prog_GENHTML
13358
if test -n "$GENHTML"; then
13359
{ echo "$as_me:$LINENO: result: $GENHTML" >&5
13360
echo "${ECHO_T}$GENHTML" >&6; }
13362
{ echo "$as_me:$LINENO: result: no" >&5
13363
echo "${ECHO_T}no" >&6; }
13367
test -n "$GENHTML" && break
13369
test -n "$GENHTML" || GENHTML="false"
13373
if test "x$enable_coverage" = "xyes"; then
13374
ENABLE_COVERAGE_TRUE=
13375
ENABLE_COVERAGE_FALSE='#'
13377
ENABLE_COVERAGE_TRUE='#'
13378
ENABLE_COVERAGE_FALSE=
13381
if test "x$enable_ut_install" = "xyes"; then
13382
ENABLE_UT_INSTALL_TRUE=
13383
ENABLE_UT_INSTALL_FALSE='#'
13385
ENABLE_UT_INSTALL_TRUE='#'
13386
ENABLE_UT_INSTALL_FALSE=
13037
13390
have_pthreads=no
13038
13391
if test "${ac_cv_header_pthread_h+set}" = set; then
13039
13392
{ echo "$as_me:$LINENO: checking for pthread.h" >&5
14447
14802
if test $ac_cv_header_bzlib_h = yes; then
14448
LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS $LTLIBBZ2";
14803
{ echo "$as_me:$LINENO: checking for CVE-2008-1372" >&5
14804
echo $ECHO_N "checking for CVE-2008-1372... $ECHO_C" >&6; }
14805
if test "${ac_cv_c_cve_2008_1372+set}" = set; then
14806
echo $ECHO_N "(cached) $ECHO_C" >&6
14809
save_LDFLAGS="$LDFLAGS"
14810
LDFLAGS="$LIBCLAMAV_LIBS $LTLIBBZ2"
14811
if test "$cross_compiling" = yes; then
14812
ac_cv_c_cve_2008_1372=ok
14814
cat >conftest.$ac_ext <<_ACEOF
14817
cat confdefs.h >>conftest.$ac_ext
14818
cat >>conftest.$ac_ext <<_ACEOF
14819
/* end confdefs.h. */
14821
#include <string.h>
14822
#include <stdlib.h>
14826
#define BZ2_bzReadOpen bzReadOpen
14827
#define BZ2_bzReadClose bzReadClose
14828
#define BZ2_bzRead bzRead
14831
const unsigned char poc[] = {
14832
0x42, 0x5a, 0x68, 0x39, 0x31, 0x41, 0x59, 0x26, 0x53, 0x59, 0x20, 0x0c,
14833
0xa6, 0x9c, 0x00, 0x00, 0xc2, 0xfb, 0x90, 0xca, 0x10, 0x04, 0x00, 0x40,
14834
0x03, 0x77, 0x80, 0x06, 0x00, 0x7a, 0x2f, 0xde, 0x40, 0x04, 0x00, 0x40,
14835
0x08, 0x30, 0x00, 0xb9, 0xb0, 0x4a, 0x89, 0xa3, 0x43, 0x4d, 0x00, 0x00,
14836
0x01, 0xb5, 0x04, 0xa4, 0x6a, 0x19, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x91,
14837
0x00, 0x00, 0x00, 0x00, 0x2a, 0x91, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00,
14838
0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00,
14839
0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x2a,
14840
0x91, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x91, 0x00, 0x00, 0x00, 0x00, 0x2a,
14841
0x91, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x91, 0x2a, 0xad, 0x2a, 0x91, 0x32,
14842
0x9a, 0x32, 0x0d, 0x06, 0x8d, 0x00, 0x03, 0xf7, 0x13, 0xd2, 0xf5, 0x54,
14843
0x5b, 0x20, 0x4b, 0x34, 0x40, 0x8a, 0x6b, 0xaa, 0x64, 0xd8, 0x30, 0x9d,
14844
0x8a, 0x9a, 0x52, 0x44, 0x13, 0x46, 0x37, 0xd9, 0x0a, 0x3c, 0xa6, 0xee,
14845
0xe9, 0xee, 0xec, 0x6d, 0x4a, 0x65, 0xc2, 0x32, 0xcb, 0x43, 0x82, 0x48,
14846
0xa1, 0x26, 0xc3, 0x43, 0x11, 0x47, 0x0a, 0x5e, 0xc1, 0x30, 0x55, 0x84,
14847
0xb1, 0x25, 0x7a, 0x2b, 0x86, 0x0e, 0xc8, 0x1a, 0x45, 0x10, 0xf1, 0xa9,
14848
0x19, 0x00, 0x30, 0x3c, 0x2a, 0xeb, 0x16, 0x6a, 0x75, 0x86, 0x60, 0xd0,
14849
0xc7, 0xd0, 0x94, 0x34, 0xf1, 0x6b, 0x49, 0x9f, 0x30, 0x4e, 0x0f, 0x70,
14850
0xbe, 0x12, 0x28, 0xe9, 0x7d, 0x10, 0x80, 0x35, 0x53, 0xaf, 0x72, 0xe1,
14851
0x83, 0x90, 0xb8, 0xf8, 0x4b, 0x1a, 0xa4, 0x29, 0x1b, 0x90, 0xe1, 0x4a,
14852
0x0f, 0xc5, 0xdc, 0x91, 0x4e, 0x14, 0x24, 0x08, 0x03, 0x29, 0xa7, 0x00
14854
const unsigned int poc_len = 252;
14856
int main (int argc, char **argv) {
14860
memset(&bz, 0, sizeof(bz));
14861
bz.next_in = (char *)&poc;
14862
bz.avail_in = poc_len;
14864
bz.avail_out = sizeof(buf);
14865
if(BZ2_bzDecompressInit(&bz, 0, 0)!=BZ_OK)
14868
while((BZ2_bzDecompress(&bz))==BZ_OK) {
14870
bz.avail_out = sizeof(buf);
14872
BZ2_bzDecompressEnd(&bz);
14877
rm -f conftest$ac_exeext
14878
if { (ac_try="$ac_link"
14879
case "(($ac_try" in
14880
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14881
*) ac_try_echo=$ac_try;;
14883
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14884
(eval "$ac_link") 2>&5
14886
echo "$as_me:$LINENO: \$? = $ac_status" >&5
14887
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14888
{ (case "(($ac_try" in
14889
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14890
*) ac_try_echo=$ac_try;;
14892
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14893
(eval "$ac_try") 2>&5
14895
echo "$as_me:$LINENO: \$? = $ac_status" >&5
14896
(exit $ac_status); }; }; then
14897
ac_cv_c_cve_2008_1372=ok
14899
echo "$as_me: program exited with status $ac_status" >&5
14900
echo "$as_me: failed program was:" >&5
14901
sed 's/^/| /' conftest.$ac_ext >&5
14903
( exit $ac_status )
14904
ac_cv_c_cve_2008_1372=bugged
14906
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14910
LDFLAGS="$save_LDFLAGS"
14913
{ echo "$as_me:$LINENO: result: $ac_cv_c_cve_2008_1372" >&5
14914
echo "${ECHO_T}$ac_cv_c_cve_2008_1372" >&6; }
14917
ac_cv_c_cve_2008_1372="no"
14921
if test "$ac_cv_c_cve_2008_1372" = "bugged"; then
14922
{ echo "$as_me:$LINENO: WARNING: ****** bzip2 libraries are affected by the CVE-2008-1372 bug" >&5
14923
echo "$as_me: WARNING: ****** bzip2 libraries are affected by the CVE-2008-1372 bug" >&2;}
14924
{ echo "$as_me:$LINENO: WARNING: ****** We strongly suggest you to update to bzip2 1.0.5." >&5
14925
echo "$as_me: WARNING: ****** We strongly suggest you to update to bzip2 1.0.5." >&2;}
14926
{ echo "$as_me:$LINENO: WARNING: ****** Please do not report stability problems to the ClamAV developers!" >&5
14927
echo "$as_me: WARNING: ****** Please do not report stability problems to the ClamAV developers!" >&2;}
14930
case "$ac_cv_c_cve_2008_1372" in
14932
LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS $LTLIBBZ2"
14450
14934
cat >>confdefs.h <<\_ACEOF
14451
14935
#define HAVE_BZLIB_H 1
14455
{ echo "$as_me:$LINENO: WARNING: ****** bzip2 support disabled" >&5
14940
{ echo "$as_me:$LINENO: WARNING: ****** bzip2 support disabled" >&5
14456
14941
echo "$as_me: WARNING: ****** bzip2 support disabled" >&2;}
14461
14946
{ echo "$as_me:$LINENO: WARNING: ****** bzip2 support disabled" >&5
14482
15060
if test $want_dns = yes; then
14483
{ echo "$as_me:$LINENO: checking for __dn_expand in -lresolv" >&5
14484
echo $ECHO_N "checking for __dn_expand in -lresolv... $ECHO_C" >&6; }
14485
if test "${ac_cv_lib_resolv___dn_expand+set}" = set; then
14486
echo $ECHO_N "(cached) $ECHO_C" >&6
14488
ac_check_lib_save_LIBS=$LIBS
14489
LIBS="-lresolv $LIBS"
14490
cat >conftest.$ac_ext <<_ACEOF
14493
cat confdefs.h >>conftest.$ac_ext
14494
cat >>conftest.$ac_ext <<_ACEOF
14495
/* end confdefs.h. */
14497
/* Override any GCC internal prototype to avoid an error.
14498
Use char because int might match the return type of a GCC
14499
builtin and then its argument prototype would still apply. */
14503
char __dn_expand ();
14507
return __dn_expand ();
14512
rm -f conftest.$ac_objext conftest$ac_exeext
14513
if { (ac_try="$ac_link"
14514
case "(($ac_try" in
14515
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14516
*) ac_try_echo=$ac_try;;
14518
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14519
(eval "$ac_link") 2>conftest.er1
14521
grep -v '^ *+' conftest.er1 >conftest.err
14523
cat conftest.err >&5
14524
echo "$as_me:$LINENO: \$? = $ac_status" >&5
14525
(exit $ac_status); } && {
14526
test -z "$ac_c_werror_flag" ||
14527
test ! -s conftest.err
14528
} && test -s conftest$ac_exeext &&
14529
$as_test_x conftest$ac_exeext; then
14530
ac_cv_lib_resolv___dn_expand=yes
14532
echo "$as_me: failed program was:" >&5
14533
sed 's/^/| /' conftest.$ac_ext >&5
14535
ac_cv_lib_resolv___dn_expand=no
14538
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14539
conftest$ac_exeext conftest.$ac_ext
14540
LIBS=$ac_check_lib_save_LIBS
14542
{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___dn_expand" >&5
14543
echo "${ECHO_T}$ac_cv_lib_resolv___dn_expand" >&6; }
14544
if test $ac_cv_lib_resolv___dn_expand = yes; then
14545
resolv_lib="-lresolv"
14548
if test -z "$resolv_lib"; then
14549
{ echo "$as_me:$LINENO: checking for dn_expand in -lresolv" >&5
14550
echo $ECHO_N "checking for dn_expand in -lresolv... $ECHO_C" >&6; }
14551
if test "${ac_cv_lib_resolv_dn_expand+set}" = set; then
14552
echo $ECHO_N "(cached) $ECHO_C" >&6
14554
ac_check_lib_save_LIBS=$LIBS
14555
LIBS="-lresolv $LIBS"
14556
cat >conftest.$ac_ext <<_ACEOF
14559
cat confdefs.h >>conftest.$ac_ext
14560
cat >>conftest.$ac_ext <<_ACEOF
14561
/* end confdefs.h. */
14563
/* Override any GCC internal prototype to avoid an error.
14564
Use char because int might match the return type of a GCC
14565
builtin and then its argument prototype would still apply. */
14573
return dn_expand ();
14578
rm -f conftest.$ac_objext conftest$ac_exeext
14579
if { (ac_try="$ac_link"
14580
case "(($ac_try" in
14581
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14582
*) ac_try_echo=$ac_try;;
14584
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14585
(eval "$ac_link") 2>conftest.er1
14587
grep -v '^ *+' conftest.er1 >conftest.err
14589
cat conftest.err >&5
14590
echo "$as_me:$LINENO: \$? = $ac_status" >&5
14591
(exit $ac_status); } && {
14592
test -z "$ac_c_werror_flag" ||
14593
test ! -s conftest.err
14594
} && test -s conftest$ac_exeext &&
14595
$as_test_x conftest$ac_exeext; then
14596
ac_cv_lib_resolv_dn_expand=yes
14598
echo "$as_me: failed program was:" >&5
14599
sed 's/^/| /' conftest.$ac_ext >&5
14601
ac_cv_lib_resolv_dn_expand=no
14604
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14605
conftest$ac_exeext conftest.$ac_ext
14606
LIBS=$ac_check_lib_save_LIBS
14608
{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_dn_expand" >&5
14609
echo "${ECHO_T}$ac_cv_lib_resolv_dn_expand" >&6; }
14610
if test $ac_cv_lib_resolv_dn_expand = yes; then
14611
resolv_lib="-lresolv"
15061
ac_cv_have_lresolv=no
14615
15062
{ echo "$as_me:$LINENO: checking for resolv.h" >&5
14616
15063
echo $ECHO_N "checking for resolv.h... $ECHO_C" >&6; }
14617
15064
if test "${ac_cv_header_resolv_h+set}" = set; then
14661
15108
{ echo "$as_me:$LINENO: result: $ac_cv_header_resolv_h" >&5
14662
15109
echo "${ECHO_T}$ac_cv_header_resolv_h" >&6; }
14663
15110
if test $ac_cv_header_resolv_h = yes; then
14664
FRESHCLAM_LIBS="$FRESHCLAM_LIBS $resolv_lib"; CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS $resolv_lib";
15112
{ echo "$as_me:$LINENO: checking for dn_expand in std libs" >&5
15113
echo $ECHO_N "checking for dn_expand in std libs... $ECHO_C" >&6; }
15114
if test "${ac_cv_have_lresolv_std+set}" = set; then
15115
echo $ECHO_N "(cached) $ECHO_C" >&6
15118
ac_cv_have_lresolv_std='no'
15119
cat >conftest.$ac_ext <<_ACEOF
15121
#include <sys/types.h>
15122
#include <netinet/in.h>
15123
#include <arpa/nameser.h>
15124
#include <resolv.h>
15125
int main() { return (long)dn_expand; }
15128
rm -f conftest.$ac_objext conftest$ac_exeext
15129
if { (ac_try="$ac_link"
15130
case "(($ac_try" in
15131
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15132
*) ac_try_echo=$ac_try;;
15134
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15135
(eval "$ac_link") 2>conftest.er1
15137
grep -v '^ *+' conftest.er1 >conftest.err
15139
cat conftest.err >&5
15140
echo "$as_me:$LINENO: \$? = $ac_status" >&5
15141
(exit $ac_status); } && {
15142
test -z "$ac_c_werror_flag" ||
15143
test ! -s conftest.err
15144
} && test -s conftest$ac_exeext &&
15145
$as_test_x conftest$ac_exeext; then
15147
ac_cv_have_lresolv_std='yes'
15148
ac_cv_have_lresolv=''
15151
echo "$as_me: failed program was:" >&5
15152
sed 's/^/| /' conftest.$ac_ext >&5
15157
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15158
conftest$ac_exeext conftest.$ac_ext
15161
{ echo "$as_me:$LINENO: result: $ac_cv_have_lresolv_std" >&5
15162
echo "${ECHO_T}$ac_cv_have_lresolv_std" >&6; }
15163
if test "x$ac_cv_have_lresolv" = "xno"; then
15166
{ echo "$as_me:$LINENO: checking for dn_expand in -lresolv" >&5
15167
echo $ECHO_N "checking for dn_expand in -lresolv... $ECHO_C" >&6; }
15168
if test "${ac_cv_have_lresolv_lresolv+set}" = set; then
15169
echo $ECHO_N "(cached) $ECHO_C" >&6
15172
ac_cv_have_lresolv_lresolv='yes'
15173
cat >conftest.$ac_ext <<_ACEOF
15175
#include <sys/types.h>
15176
#include <netinet/in.h>
15177
#include <arpa/nameser.h>
15178
#include <resolv.h>
15179
int main() { return (long)dn_expand; }
15182
rm -f conftest.$ac_objext conftest$ac_exeext
15183
if { (ac_try="$ac_link"
15184
case "(($ac_try" in
15185
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15186
*) ac_try_echo=$ac_try;;
15188
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15189
(eval "$ac_link") 2>conftest.er1
15191
grep -v '^ *+' conftest.er1 >conftest.err
15193
cat conftest.err >&5
15194
echo "$as_me:$LINENO: \$? = $ac_status" >&5
15195
(exit $ac_status); } && {
15196
test -z "$ac_c_werror_flag" ||
15197
test ! -s conftest.err
15198
} && test -s conftest$ac_exeext &&
15199
$as_test_x conftest$ac_exeext; then
15201
ac_cv_have_lresolv_lresolv='yes'
15202
ac_cv_have_lresolv=' -lresolv'
15205
echo "$as_me: failed program was:" >&5
15206
sed 's/^/| /' conftest.$ac_ext >&5
15211
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15212
conftest$ac_exeext conftest.$ac_ext
15215
{ echo "$as_me:$LINENO: result: $ac_cv_have_lresolv_lresolv" >&5
15216
echo "${ECHO_T}$ac_cv_have_lresolv_lresolv" >&6; }
15221
ac_cv_have_lresolv=no
15225
if test "x$ac_cv_have_lresolv" != "xno"; then
15226
FRESHCLAM_LIBS="$FRESHCLAM_LIBS$ac_cv_have_lresolv"
15227
CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS$ac_cv_have_lresolv"
15229
LIBS=$ac_cv_have_lresolv
14665
15231
cat >>confdefs.h <<\_ACEOF
14666
15232
#define HAVE_RESOLV_H 1
14670
{ echo "$as_me:$LINENO: WARNING: ****** DNS support disabled" >&5
15235
{ echo "$as_me:$LINENO: checking for res_nquery in -lresolv" >&5
15236
echo $ECHO_N "checking for res_nquery in -lresolv... $ECHO_C" >&6; }
15237
if test "${ac_cv_have_lresolv_r+set}" = set; then
15238
echo $ECHO_N "(cached) $ECHO_C" >&6
15241
ac_cv_have_lresolv_r='no'
15242
cat >conftest.$ac_ext <<_ACEOF
15244
#include <sys/types.h>
15245
#include <netinet/in.h>
15246
#include <arpa/nameser.h>
15247
#include <resolv.h>
15248
int main() { return (long)res_nquery; }
15251
rm -f conftest.$ac_objext conftest$ac_exeext
15252
if { (ac_try="$ac_link"
15253
case "(($ac_try" in
15254
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15255
*) ac_try_echo=$ac_try;;
15257
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15258
(eval "$ac_link") 2>conftest.er1
15260
grep -v '^ *+' conftest.er1 >conftest.err
15262
cat conftest.err >&5
15263
echo "$as_me:$LINENO: \$? = $ac_status" >&5
15264
(exit $ac_status); } && {
15265
test -z "$ac_c_werror_flag" ||
15266
test ! -s conftest.err
15267
} && test -s conftest$ac_exeext &&
15268
$as_test_x conftest$ac_exeext; then
15270
ac_cv_have_lresolv_r='yes'
15273
echo "$as_me: failed program was:" >&5
15274
sed 's/^/| /' conftest.$ac_ext >&5
15279
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15280
conftest$ac_exeext conftest.$ac_ext,
15283
{ echo "$as_me:$LINENO: result: $ac_cv_have_lresolv_r" >&5
15284
echo "${ECHO_T}$ac_cv_have_lresolv_r" >&6; }
15286
if test "x$ac_cv_have_lresolv_r" = "xyes"; then
15288
cat >>confdefs.h <<\_ACEOF
15289
#define HAVE_LRESOLV_R 1
15294
{ echo "$as_me:$LINENO: WARNING: ****** DNS support disabled" >&5
14671
15295
echo "$as_me: WARNING: ****** DNS support disabled" >&2;}
14677
15301
# Check whether --enable-clamuko was given.
14678
15302
if test "${enable_clamuko+set}" = set; then
17317
if test "$have_milter" = "yes"; then
17320
# Check whether --with-sendmail was given.
17321
if test "${with_sendmail+set}" = set; then
17322
withval=$with_sendmail; sendmailprog=$with_sendmail
17328
if test "$sendmailprog" = "no" ; then
17329
# Extract the first word of "sendmail", so it can be a program name with args.
17330
set dummy sendmail; ac_word=$2
17331
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17332
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
17333
if test "${ac_cv_path_sendmailprog+set}" = set; then
17334
echo $ECHO_N "(cached) $ECHO_C" >&6
17336
case $sendmailprog in
17338
ac_cv_path_sendmailprog="$sendmailprog" # Let the user override the test with a path.
17341
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17342
as_dummy="$PATH:/sbin:/usr/sbin:/usr/lib:/usr/libexec"
17343
for as_dir in $as_dummy
17346
test -z "$as_dir" && as_dir=.
17347
for ac_exec_ext in '' $ac_executable_extensions; do
17348
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17349
ac_cv_path_sendmailprog="$as_dir/$ac_word$ac_exec_ext"
17350
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17357
test -z "$ac_cv_path_sendmailprog" && ac_cv_path_sendmailprog="no"
17361
sendmailprog=$ac_cv_path_sendmailprog
17362
if test -n "$sendmailprog"; then
17363
{ echo "$as_me:$LINENO: result: $sendmailprog" >&5
17364
echo "${ECHO_T}$sendmailprog" >&6; }
17366
{ echo "$as_me:$LINENO: result: no" >&5
17367
echo "${ECHO_T}no" >&6; }
17374
cat >>confdefs.h <<_ACEOF
17375
#define SENDMAIL_BIN "$sendmailprog"
17380
# Check whether --with-sendmail-version was given.
17381
if test "${with_sendmail_version+set}" = set; then
17382
withval=$with_sendmail_version; sendmailvers=$with_sendmail_version
17388
if test "$sendmailvers" = "no" ; then
17389
sendmailver=`$sendmailprog -d0 < /dev/null | head -1 | awk '{print $2}'`
17392
if test -z "$sendmailver"; then
17394
LDFLAGS="$LDFLAGS $CLAMAV_MILTER_LIBS"
17395
{ echo "$as_me:$LINENO: checking for smfi_opensocket in -lmilter" >&5
17396
echo $ECHO_N "checking for smfi_opensocket in -lmilter... $ECHO_C" >&6; }
17397
if test "${ac_cv_lib_milter_smfi_opensocket+set}" = set; then
17398
echo $ECHO_N "(cached) $ECHO_C" >&6
17400
ac_check_lib_save_LIBS=$LIBS
17401
LIBS="-lmilter $LIBS"
17402
cat >conftest.$ac_ext <<_ACEOF
17405
cat confdefs.h >>conftest.$ac_ext
17406
cat >>conftest.$ac_ext <<_ACEOF
17407
/* end confdefs.h. */
17409
/* Override any GCC internal prototype to avoid an error.
17410
Use char because int might match the return type of a GCC
17411
builtin and then its argument prototype would still apply. */
17415
char smfi_opensocket ();
17419
return smfi_opensocket ();
17424
rm -f conftest.$ac_objext conftest$ac_exeext
17425
if { (ac_try="$ac_link"
17426
case "(($ac_try" in
17427
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17428
*) ac_try_echo=$ac_try;;
17430
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17431
(eval "$ac_link") 2>conftest.er1
17433
grep -v '^ *+' conftest.er1 >conftest.err
17435
cat conftest.err >&5
17436
echo "$as_me:$LINENO: \$? = $ac_status" >&5
17437
(exit $ac_status); } && {
17438
test -z "$ac_c_werror_flag" ||
17439
test ! -s conftest.err
17440
} && test -s conftest$ac_exeext &&
17441
$as_test_x conftest$ac_exeext; then
17442
ac_cv_lib_milter_smfi_opensocket=yes
17444
echo "$as_me: failed program was:" >&5
17445
sed 's/^/| /' conftest.$ac_ext >&5
17447
ac_cv_lib_milter_smfi_opensocket=no
17450
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17451
conftest$ac_exeext conftest.$ac_ext
17452
LIBS=$ac_check_lib_save_LIBS
17454
{ echo "$as_me:$LINENO: result: $ac_cv_lib_milter_smfi_opensocket" >&5
17455
echo "${ECHO_T}$ac_cv_lib_milter_smfi_opensocket" >&6; }
17456
if test $ac_cv_lib_milter_smfi_opensocket = yes; then
17457
sendmailver="8.13.0"
17459
{ echo "$as_me:$LINENO: WARNING: cannot determine sendmail version" >&5
17460
echo "$as_me: WARNING: cannot determine sendmail version" >&2;}
17463
LDFLAGS="$save_LDFLAGS"
17465
if test -n "$sendmailver"; then
17466
sendmailver_a=`echo $sendmailver | awk -F. '{printf $1}'`
17467
sendmailver_b=`echo $sendmailver | awk -F. '{printf $2}'`
17468
sendmailver_c=`echo $sendmailver | awk -F. '{printf $3}'`
17470
case "$sendmailver_a" in
17472
*) sendmailver_a= ;;
17475
case "$sendmailver_b" in
17477
*) sendmailver_b= ;;
17480
case "$sendmailver_c" in
17482
*) sendmailver_c= ;;
17485
if test -n "$sendmailver_a"; then
17487
cat >>confdefs.h <<_ACEOF
17488
#define SENDMAIL_VERSION_A $sendmailver_a
17492
if test -n "$sendmailver_b"; then
17494
cat >>confdefs.h <<_ACEOF
17495
#define SENDMAIL_VERSION_B $sendmailver_b
17499
if test -n "$sendmailver_c"; then
17501
cat >>confdefs.h <<_ACEOF
17502
#define SENDMAIL_VERSION_C $sendmailver_c
17507
if test "x$ac_cv_have_lresolv_r" != "xyes"; then
17508
{ echo "$as_me:$LINENO: WARNING: ****** Your libresolv is not thread safe, SPF queries in clamav-milter will block" >&5
17509
echo "$as_me: WARNING: ****** Your libresolv is not thread safe, SPF queries in clamav-milter will block" >&2;}
16849
17513
if test "$have_pthreads" = "yes"; then
16850
17514
BUILD_CLAMD_TRUE=
16851
17515
BUILD_CLAMD_FALSE='#'
16894
for ac_func in recvmsg sendmsg
16896
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16897
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16898
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16899
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16900
echo $ECHO_N "(cached) $ECHO_C" >&6
16902
cat >conftest.$ac_ext <<_ACEOF
16905
cat confdefs.h >>conftest.$ac_ext
16906
cat >>conftest.$ac_ext <<_ACEOF
16907
/* end confdefs.h. */
16908
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16909
For example, HP-UX 11i <limits.h> declares gettimeofday. */
16910
#define $ac_func innocuous_$ac_func
16912
/* System header to define __stub macros and hopefully few prototypes,
16913
which can conflict with char $ac_func (); below.
16914
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16915
<limits.h> exists even on freestanding compilers. */
16918
# include <limits.h>
16920
# include <assert.h>
16925
/* Override any GCC internal prototype to avoid an error.
16926
Use char because int might match the return type of a GCC
16927
builtin and then its argument prototype would still apply. */
16932
/* The GNU C library defines this for functions which it implements
16933
to always fail with ENOSYS. Some functions are actually named
16934
something starting with __ and the normal name is an alias. */
16935
#if defined __stub_$ac_func || defined __stub___$ac_func
16942
return $ac_func ();
16947
rm -f conftest.$ac_objext conftest$ac_exeext
16948
if { (ac_try="$ac_link"
16949
case "(($ac_try" in
16950
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16951
*) ac_try_echo=$ac_try;;
16953
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16954
(eval "$ac_link") 2>conftest.er1
16956
grep -v '^ *+' conftest.er1 >conftest.err
16958
cat conftest.err >&5
16959
echo "$as_me:$LINENO: \$? = $ac_status" >&5
16960
(exit $ac_status); } && {
16961
test -z "$ac_c_werror_flag" ||
16962
test ! -s conftest.err
16963
} && test -s conftest$ac_exeext &&
16964
$as_test_x conftest$ac_exeext; then
16965
eval "$as_ac_var=yes"
16967
echo "$as_me: failed program was:" >&5
16968
sed 's/^/| /' conftest.$ac_ext >&5
16970
eval "$as_ac_var=no"
16973
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16974
conftest$ac_exeext conftest.$ac_ext
16976
ac_res=`eval echo '${'$as_ac_var'}'`
16977
{ echo "$as_me:$LINENO: result: $ac_res" >&5
16978
echo "${ECHO_T}$ac_res" >&6; }
16979
if test `eval echo '${'$as_ac_var'}'` = yes; then
16980
cat >>confdefs.h <<_ACEOF
16981
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16987
{ echo "$as_me:$LINENO: checking for msg_accrights field in struct msghdr" >&5
16988
echo $ECHO_N "checking for msg_accrights field in struct msghdr... $ECHO_C" >&6; }
16989
if test "${ac_cv_have_accrights_in_msghdr+set}" = set; then
16990
echo $ECHO_N "(cached) $ECHO_C" >&6
16993
cat >conftest.$ac_ext <<_ACEOF
16996
cat confdefs.h >>conftest.$ac_ext
16997
cat >>conftest.$ac_ext <<_ACEOF
16998
/* end confdefs.h. */
17000
#include <sys/types.h>
17001
#include <sys/socket.h>
17002
#include <sys/uio.h>
17008
#ifdef msg_accrights
17009
#error msg_accrights defined
17012
m.msg_accrights = 0;
17020
rm -f conftest.$ac_objext
17021
if { (ac_try="$ac_compile"
17022
case "(($ac_try" in
17023
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17024
*) ac_try_echo=$ac_try;;
17026
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17027
(eval "$ac_compile") 2>conftest.er1
17029
grep -v '^ *+' conftest.er1 >conftest.err
17031
cat conftest.err >&5
17032
echo "$as_me:$LINENO: \$? = $ac_status" >&5
17033
(exit $ac_status); } && {
17034
test -z "$ac_c_werror_flag" ||
17035
test ! -s conftest.err
17036
} && test -s conftest.$ac_objext; then
17037
ac_cv_have_accrights_in_msghdr="yes"
17039
echo "$as_me: failed program was:" >&5
17040
sed 's/^/| /' conftest.$ac_ext >&5
17042
ac_cv_have_accrights_in_msghdr="no"
17045
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17048
{ echo "$as_me:$LINENO: result: $ac_cv_have_accrights_in_msghdr" >&5
17049
echo "${ECHO_T}$ac_cv_have_accrights_in_msghdr" >&6; }
17050
if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
17052
cat >>confdefs.h <<\_ACEOF
17053
#define HAVE_ACCRIGHTS_IN_MSGHDR 1
17058
{ echo "$as_me:$LINENO: checking for msg_control field in struct msghdr" >&5
17059
echo $ECHO_N "checking for msg_control field in struct msghdr... $ECHO_C" >&6; }
17060
if test "${ac_cv_have_control_in_msghdr+set}" = set; then
17061
echo $ECHO_N "(cached) $ECHO_C" >&6
17064
cat >conftest.$ac_ext <<_ACEOF
17067
cat confdefs.h >>conftest.$ac_ext
17068
cat >>conftest.$ac_ext <<_ACEOF
17069
/* end confdefs.h. */
17071
#include <sys/types.h>
17072
#include <sys/socket.h>
17073
#include <sys/uio.h>
17080
#error msg_control defined
17090
rm -f conftest.$ac_objext
17091
if { (ac_try="$ac_compile"
17092
case "(($ac_try" in
17093
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17094
*) ac_try_echo=$ac_try;;
17096
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17097
(eval "$ac_compile") 2>conftest.er1
17099
grep -v '^ *+' conftest.er1 >conftest.err
17101
cat conftest.err >&5
17102
echo "$as_me:$LINENO: \$? = $ac_status" >&5
17103
(exit $ac_status); } && {
17104
test -z "$ac_c_werror_flag" ||
17105
test ! -s conftest.err
17106
} && test -s conftest.$ac_objext; then
17107
ac_cv_have_control_in_msghdr="yes"
17109
echo "$as_me: failed program was:" >&5
17110
sed 's/^/| /' conftest.$ac_ext >&5
17112
ac_cv_have_control_in_msghdr="no"
17115
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17118
{ echo "$as_me:$LINENO: result: $ac_cv_have_control_in_msghdr" >&5
17119
echo "${ECHO_T}$ac_cv_have_control_in_msghdr" >&6; }
17120
if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
17122
cat >>confdefs.h <<\_ACEOF
17123
#define HAVE_CONTROL_IN_MSGHDR 1
17129
17656
# Check whether --with-tcpwrappers was given.
17130
17657
if test "${with_tcpwrappers+set}" = set; then
17131
17658
withval=$with_tcpwrappers; case "$withval" in
18553
19091
{ echo "$as_me:$LINENO: result: $have_signed_rightshift_extended" >&5
18554
19092
echo "${ECHO_T}$have_signed_rightshift_extended" >&6; };
18556
ac_config_files="$ac_config_files libclamunrar/Makefile libclamunrar_iface/Makefile libclamav/Makefile libclamav/lzma/Makefile clamscan/Makefile database/Makefile docs/Makefile clamd/Makefile clamdscan/Makefile clamav-milter/Makefile freshclam/Makefile sigtool/Makefile clamconf/Makefile etc/Makefile test/Makefile Makefile clamav-config libclamav.pc docs/man/clamav-milter.8 docs/man/clamconf.1 docs/man/clamd.8 docs/man/clamd.conf.5 docs/man/clamdscan.1 docs/man/clamscan.1 docs/man/freshclam.1 docs/man/freshclam.conf.5 docs/man/sigtool.1"
19097
for ac_func in recvmsg sendmsg
19099
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19100
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19101
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19102
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
19103
echo $ECHO_N "(cached) $ECHO_C" >&6
19105
cat >conftest.$ac_ext <<_ACEOF
19108
cat confdefs.h >>conftest.$ac_ext
19109
cat >>conftest.$ac_ext <<_ACEOF
19110
/* end confdefs.h. */
19111
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19112
For example, HP-UX 11i <limits.h> declares gettimeofday. */
19113
#define $ac_func innocuous_$ac_func
19115
/* System header to define __stub macros and hopefully few prototypes,
19116
which can conflict with char $ac_func (); below.
19117
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19118
<limits.h> exists even on freestanding compilers. */
19121
# include <limits.h>
19123
# include <assert.h>
19128
/* Override any GCC internal prototype to avoid an error.
19129
Use char because int might match the return type of a GCC
19130
builtin and then its argument prototype would still apply. */
19135
/* The GNU C library defines this for functions which it implements
19136
to always fail with ENOSYS. Some functions are actually named
19137
something starting with __ and the normal name is an alias. */
19138
#if defined __stub_$ac_func || defined __stub___$ac_func
19145
return $ac_func ();
19150
rm -f conftest.$ac_objext conftest$ac_exeext
19151
if { (ac_try="$ac_link"
19152
case "(($ac_try" in
19153
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19154
*) ac_try_echo=$ac_try;;
19156
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19157
(eval "$ac_link") 2>conftest.er1
19159
grep -v '^ *+' conftest.er1 >conftest.err
19161
cat conftest.err >&5
19162
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19163
(exit $ac_status); } && {
19164
test -z "$ac_c_werror_flag" ||
19165
test ! -s conftest.err
19166
} && test -s conftest$ac_exeext &&
19167
$as_test_x conftest$ac_exeext; then
19168
eval "$as_ac_var=yes"
19170
echo "$as_me: failed program was:" >&5
19171
sed 's/^/| /' conftest.$ac_ext >&5
19173
eval "$as_ac_var=no"
19176
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19177
conftest$ac_exeext conftest.$ac_ext
19179
ac_res=`eval echo '${'$as_ac_var'}'`
19180
{ echo "$as_me:$LINENO: result: $ac_res" >&5
19181
echo "${ECHO_T}$ac_res" >&6; }
19182
if test `eval echo '${'$as_ac_var'}'` = yes; then
19183
cat >>confdefs.h <<_ACEOF
19184
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19190
{ echo "$as_me:$LINENO: checking for msg_control field in struct msghdr" >&5
19191
echo $ECHO_N "checking for msg_control field in struct msghdr... $ECHO_C" >&6; }
19192
if test "${ac_cv_have_control_in_msghdr+set}" = set; then
19193
echo $ECHO_N "(cached) $ECHO_C" >&6
19196
cat >conftest.$ac_ext <<_ACEOF
19199
cat confdefs.h >>conftest.$ac_ext
19200
cat >>conftest.$ac_ext <<_ACEOF
19201
/* end confdefs.h. */
19203
#define _XOPEN_SOURCE 500
19204
#ifdef HAVE_SYS_TYPES_H
19205
#include <sys/types.h>
19207
#include <sys/socket.h>
19208
#ifdef HAVE_SYS_UIO_H
19209
#include <sys/uio.h>
19217
#error msg_control defined
19227
rm -f conftest.$ac_objext
19228
if { (ac_try="$ac_compile"
19229
case "(($ac_try" in
19230
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19231
*) ac_try_echo=$ac_try;;
19233
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19234
(eval "$ac_compile") 2>conftest.er1
19236
grep -v '^ *+' conftest.er1 >conftest.err
19238
cat conftest.err >&5
19239
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19240
(exit $ac_status); } && {
19241
test -z "$ac_c_werror_flag" ||
19242
test ! -s conftest.err
19243
} && test -s conftest.$ac_objext; then
19244
ac_cv_have_control_in_msghdr="yes"
19246
echo "$as_me: failed program was:" >&5
19247
sed 's/^/| /' conftest.$ac_ext >&5
19249
ac_cv_have_control_in_msghdr="no"
19252
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19255
{ echo "$as_me:$LINENO: result: $ac_cv_have_control_in_msghdr" >&5
19256
echo "${ECHO_T}$ac_cv_have_control_in_msghdr" >&6; }
19257
if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
19259
cat >>confdefs.h <<\_ACEOF
19260
#define HAVE_CONTROL_IN_MSGHDR 1
19264
{ echo "$as_me:$LINENO: checking BSD 4.4 / RFC2292 style fd passing" >&5
19265
echo $ECHO_N "checking BSD 4.4 / RFC2292 style fd passing... $ECHO_C" >&6; }
19266
# Check whether --enable-fdpassing was given.
19267
if test "${enable_fdpassing+set}" = set; then
19268
enableval=$enable_fdpassing; want_fdpassing=$enableval
19270
want_fdpassing="yes"
19274
if test "x$want_fdpassing" = "xyes"; then
19275
if test "$cross_compiling" = yes; then
19278
cat >conftest.$ac_ext <<_ACEOF
19282
cat confdefs.h >>conftest.$ac_ext
19283
cat >>conftest.$ac_ext <<_ACEOF
19284
/* end confdefs.h. */
19287
#ifdef HAVE_SYS_TYPES_H
19288
#include <sys/types.h>
19290
#include <sys/wait.h>
19292
#include <stdlib.h>
19293
#include <unistd.h>
19294
#include <string.h>
19295
#ifdef HAVE_SYS_UIO_H
19296
#include <sys/uio.h>
19298
#include <signal.h>
19299
#include <sys/socket.h>
19302
#define TEST "test"
19304
static int send_fd(int s, int fd)
19307
struct cmsghdr *cmsg;
19308
unsigned char fdbuf[CMSG_SPACE(sizeof(int))];
19309
struct iovec iov[1];
19312
iov[0].iov_base = dummy;
19313
iov[0].iov_len = 1;
19315
memset(&msg, 0, sizeof(msg));
19316
msg.msg_control = fdbuf;
19317
/* must send/receive at least one byte */
19319
msg.msg_iovlen = 1;
19320
msg.msg_controllen = CMSG_LEN(sizeof(int));
19322
cmsg = CMSG_FIRSTHDR(&msg);
19323
cmsg->cmsg_len = CMSG_LEN(sizeof(int));
19324
cmsg->cmsg_level = SOL_SOCKET;
19325
cmsg->cmsg_type = SCM_RIGHTS;
19326
*(int *)CMSG_DATA(cmsg) = fd;
19328
if (sendmsg(s, &msg, 0) == -1) {
19336
static int testfd(int desc)
19339
if(read(desc, buf, sizeof(buf)) != sizeof(TEST)) {
19340
fprintf(stderr, "test data not received correctly!");
19343
return memcmp(buf, TEST, sizeof(TEST));
19346
static int recv_fd(int desc)
19348
unsigned char buf[CMSG_SPACE(sizeof(int))];
19350
struct cmsghdr *cmsg;
19351
struct iovec iov[1];
19355
memset(&msg, 0, sizeof(msg));
19356
iov[0].iov_base = &dummy;
19357
iov[0].iov_len = 1;
19359
msg.msg_iovlen = 1;
19360
msg.msg_control = buf;
19361
msg.msg_controllen = sizeof(buf);
19363
if (recvmsg(desc, &msg, 0) == -1) {
19364
perror("recvmsg failed!");
19367
if ((msg.msg_flags & MSG_TRUNC) || (msg.msg_flags & MSG_CTRUNC)) {
19368
fprintf(stderr, "control message truncated");
19371
for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL;
19372
cmsg = CMSG_NXTHDR(&msg, cmsg)) {
19373
if (cmsg->cmsg_len == CMSG_LEN(sizeof(int)) &&
19374
cmsg->cmsg_level == SOL_SOCKET &&
19375
cmsg->cmsg_type == SCM_RIGHTS) {
19376
int fd = *(int *)CMSG_DATA(cmsg);
19396
if(socketpair(AF_UNIX, SOCK_STREAM, 0, fd)) {
19397
perror("socketpair");
19401
if((pid=fork()) < 0) {
19404
exit( recv_fd(fd[1]) );
19407
if(send_fd(fd[0], pip[0]) == -1) {
19409
waitpid(pid, NULL, 0);
19412
if(write(pip[1], TEST, sizeof(TEST)) != sizeof(TEST)) {
19417
waitpid(pid, &status, 0);
19424
rm -f conftest$ac_exeext
19425
if { (ac_try="$ac_link"
19426
case "(($ac_try" in
19427
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19428
*) ac_try_echo=$ac_try;;
19430
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19431
(eval "$ac_link") 2>&5
19433
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19434
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19435
{ (case "(($ac_try" in
19436
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19437
*) ac_try_echo=$ac_try;;
19439
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19440
(eval "$ac_try") 2>&5
19442
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19443
(exit $ac_status); }; }; then
19444
have_fdpass=1; fdpass_need_xopen=0
19446
echo "$as_me: program exited with status $ac_status" >&5
19447
echo "$as_me: failed program was:" >&5
19448
sed 's/^/| /' conftest.$ac_ext >&5
19450
( exit $ac_status )
19453
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19458
if test $have_fdpass = 0; then
19459
if test "$cross_compiling" = yes; then
19462
cat >conftest.$ac_ext <<_ACEOF
19466
cat confdefs.h >>conftest.$ac_ext
19467
cat >>conftest.$ac_ext <<_ACEOF
19468
/* end confdefs.h. */
19470
#define _XOPEN_SOURCE 500
19471
#ifdef HAVE_SYS_TYPES_H
19472
#include <sys/types.h>
19474
#include <sys/wait.h>
19476
#include <stdlib.h>
19477
#include <unistd.h>
19478
#include <string.h>
19479
#ifdef HAVE_SYS_UIO_H
19480
#include <sys/uio.h>
19482
#include <signal.h>
19483
#include <sys/socket.h>
19486
#define TEST "test"
19488
static int send_fd(int s, int fd)
19491
struct cmsghdr *cmsg;
19492
unsigned char fdbuf[CMSG_SPACE(sizeof(int))];
19493
struct iovec iov[1];
19496
iov[0].iov_base = dummy;
19497
iov[0].iov_len = 1;
19499
memset(&msg, 0, sizeof(msg));
19500
msg.msg_control = fdbuf;
19501
/* must send/receive at least one byte */
19503
msg.msg_iovlen = 1;
19504
msg.msg_controllen = CMSG_LEN(sizeof(int));
19506
cmsg = CMSG_FIRSTHDR(&msg);
19507
cmsg->cmsg_len = CMSG_LEN(sizeof(int));
19508
cmsg->cmsg_level = SOL_SOCKET;
19509
cmsg->cmsg_type = SCM_RIGHTS;
19510
*(int *)CMSG_DATA(cmsg) = fd;
19512
if (sendmsg(s, &msg, 0) == -1) {
19520
static int testfd(int desc)
19523
if(read(desc, buf, sizeof(buf)) != sizeof(TEST)) {
19524
fprintf(stderr, "test data not received correctly!");
19527
return memcmp(buf, TEST, sizeof(TEST));
19530
static int recv_fd(int desc)
19532
unsigned char buf[CMSG_SPACE(sizeof(int))];
19534
struct cmsghdr *cmsg;
19535
struct iovec iov[1];
19539
memset(&msg, 0, sizeof(msg));
19540
iov[0].iov_base = &dummy;
19541
iov[0].iov_len = 1;
19543
msg.msg_iovlen = 1;
19544
msg.msg_control = buf;
19545
msg.msg_controllen = sizeof(buf);
19547
if (recvmsg(desc, &msg, 0) == -1) {
19548
perror("recvmsg failed!");
19551
if ((msg.msg_flags & MSG_TRUNC) || (msg.msg_flags & MSG_CTRUNC)) {
19552
fprintf(stderr, "control message truncated");
19555
for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL;
19556
cmsg = CMSG_NXTHDR(&msg, cmsg)) {
19557
if (cmsg->cmsg_len == CMSG_LEN(sizeof(int)) &&
19558
cmsg->cmsg_level == SOL_SOCKET &&
19559
cmsg->cmsg_type == SCM_RIGHTS) {
19560
int fd = *(int *)CMSG_DATA(cmsg);
19580
if(socketpair(AF_UNIX, SOCK_STREAM, 0, fd)) {
19581
perror("socketpair");
19585
if((pid=fork()) < 0) {
19588
exit( recv_fd(fd[1]) );
19591
if(send_fd(fd[0], pip[0]) == -1) {
19593
waitpid(pid, NULL, 0);
19596
if(write(pip[1], TEST, sizeof(TEST)) != sizeof(TEST)) {
19601
waitpid(pid, &status, 0);
19608
rm -f conftest$ac_exeext
19609
if { (ac_try="$ac_link"
19610
case "(($ac_try" in
19611
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19612
*) ac_try_echo=$ac_try;;
19614
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19615
(eval "$ac_link") 2>&5
19617
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19618
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19619
{ (case "(($ac_try" in
19620
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19621
*) ac_try_echo=$ac_try;;
19623
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19624
(eval "$ac_try") 2>&5
19626
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19627
(exit $ac_status); }; }; then
19628
have_fdpass=1; fdpass_need_xopen=1
19630
echo "$as_me: program exited with status $ac_status" >&5
19631
echo "$as_me: failed program was:" >&5
19632
sed 's/^/| /' conftest.$ac_ext >&5
19634
( exit $ac_status )
19637
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19643
if test $have_fdpass = 1; then
19645
cat >>confdefs.h <<\_ACEOF
19646
#define HAVE_FD_PASSING 1
19649
if test $fdpass_need_xopen = 1; then
19651
cat >>confdefs.h <<\_ACEOF
19652
#define FDPASS_NEED_XOPEN 1
19655
{ echo "$as_me:$LINENO: result: yes, by defining _XOPEN_SOURCE" >&5
19656
echo "${ECHO_T}yes, by defining _XOPEN_SOURCE" >&6; }
19658
{ echo "$as_me:$LINENO: result: yes" >&5
19659
echo "${ECHO_T}yes" >&6; }
19662
{ echo "$as_me:$LINENO: result: no" >&5
19663
echo "${ECHO_T}no" >&6; }
19667
{ echo "$as_me:$LINENO: result: disabled" >&5
19668
echo "${ECHO_T}disabled" >&6; }
19673
ac_config_files="$ac_config_files libclamunrar/Makefile libclamunrar_iface/Makefile libclamav/Makefile libclamav/lzma/Makefile clamscan/Makefile database/Makefile docs/Makefile clamd/Makefile clamdscan/Makefile clamav-milter/Makefile freshclam/Makefile sigtool/Makefile clamconf/Makefile etc/Makefile test/Makefile unit_tests/Makefile Makefile clamav-config libclamav.pc docs/man/clamav-milter.8 docs/man/clamconf.1 docs/man/clamd.8 docs/man/clamd.conf.5 docs/man/clamdscan.1 docs/man/clamscan.1 docs/man/freshclam.1 docs/man/freshclam.conf.5 docs/man/sigtool.1"
18558
19675
cat >confcache <<\_ACEOF
18559
19676
# This file is a shell script that caches the results of configure