Browse code

AC_CHECK_LIB 3rd argument was empty, and this causes '-lcheck' to be added to LIBS. This caused all executables to be linked against libcheck on some platforms. We only need to link with libcheck the unit-test, so avoid this by specifying a command as 3rd arg. Regenerate configure & Makefiles.

git-svn: trunk@3773

Török Edvin authored on 2008/04/08 21:40:45
Showing 8 changed files
... ...
@@ -165,9 +165,6 @@
165 165
 /* in_port_t is defined */
166 166
 #undef HAVE_IN_PORT_T
167 167
 
168
-/* Define to 1 if you have the `check' library (-lcheck). */
169
-#undef HAVE_LIBCHECK
170
-
171 168
 /* Define if you have the gmp library. */
172 169
 #undef HAVE_LIBGMP
173 170
 
... ...
@@ -1,10 +1,10 @@
1 1
 #! /bin/sh
2 2
 # Attempt to guess a canonical system name.
3 3
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
5
-#   Inc.
4
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
5
+#   Free Software Foundation, Inc.
6 6
 
7
-timestamp='2007-07-22'
7
+timestamp='2008-01-23'
8 8
 
9 9
 # This file is free software; you can redistribute it and/or modify it
10 10
 # under the terms of the GNU General Public License as published by
... ...
@@ -56,8 +56,8 @@ version="\
56 56
 GNU config.guess ($timestamp)
57 57
 
58 58
 Originally written by Per Bothner.
59
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
60
-Free Software Foundation, Inc.
59
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
60
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
61 61
 
62 62
 This is free software; see the source for copying conditions.  There is NO
63 63
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
... ...
@@ -532,7 +532,7 @@ EOF
532 532
 		echo rs6000-ibm-aix3.2
533 533
 	fi
534 534
 	exit ;;
535
-    *:AIX:*:[45])
535
+    *:AIX:*:[456])
536 536
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
537 537
 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
538 538
 		IBM_ARCH=rs6000
... ...
@@ -799,6 +799,9 @@ EOF
799 799
 	    EM64T | authenticamd)
800 800
 		echo x86_64-unknown-interix${UNAME_RELEASE}
801 801
 		exit ;;
802
+	    IA64)
803
+		echo ia64-unknown-interix${UNAME_RELEASE}
804
+		exit ;;
802 805
 	esac ;;
803 806
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
804 807
 	echo i${UNAME_MACHINE}-pc-mks
... ...
@@ -833,7 +836,14 @@ EOF
833 833
 	echo ${UNAME_MACHINE}-pc-minix
834 834
 	exit ;;
835 835
     arm*:Linux:*:*)
836
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
836
+	eval $set_cc_for_build
837
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
838
+	    | grep -q __ARM_EABI__
839
+	then
840
+	    echo ${UNAME_MACHINE}-unknown-linux-gnu
841
+	else
842
+	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
843
+	fi
837 844
 	exit ;;
838 845
     avr32*:Linux:*:*)
839 846
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
... ...
@@ -954,8 +964,8 @@ EOF
954 954
     x86_64:Linux:*:*)
955 955
 	echo x86_64-unknown-linux-gnu
956 956
 	exit ;;
957
-    xtensa:Linux:*:*)
958
-    	echo xtensa-unknown-linux-gnu
957
+    xtensa*:Linux:*:*)
958
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
959 959
 	exit ;;
960 960
     i*86:Linux:*:*)
961 961
 	# The BFD linker knows what the default object file format is, so
... ...
@@ -1474,9 +1484,9 @@ This script, last modified $timestamp, has failed to recognize
1474 1474
 the operating system you are using. It is advised that you
1475 1475
 download the most up to date version of the config scripts from
1476 1476
 
1477
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
1477
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1478 1478
 and
1479
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
1479
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1480 1480
 
1481 1481
 If the version you run ($0) is already up to date, please
1482 1482
 send the following data and any information you think might be
... ...
@@ -1,10 +1,10 @@
1 1
 #! /bin/sh
2 2
 # Configuration validation subroutine script.
3 3
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
5
-#   Inc.
4
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
5
+#   Free Software Foundation, Inc.
6 6
 
7
-timestamp='2007-06-28'
7
+timestamp='2008-01-16'
8 8
 
9 9
 # This file is (in principle) common to ALL GNU software.
10 10
 # The presence of a machine in this file suggests that SOME GNU software
... ...
@@ -72,8 +72,8 @@ Report bugs and patches to <config-patches@gnu.org>."
72 72
 version="\
73 73
 GNU config.sub ($timestamp)
74 74
 
75
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
76
-Free Software Foundation, Inc.
75
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
76
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
77 77
 
78 78
 This is free software; see the source for copying conditions.  There is NO
79 79
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
... ...
@@ -369,10 +369,14 @@ case $basic_machine in
369 369
 	| v850-* | v850e-* | vax-* \
370 370
 	| we32k-* \
371 371
 	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
372
-	| xstormy16-* | xtensa-* \
372
+	| xstormy16-* | xtensa*-* \
373 373
 	| ymp-* \
374 374
 	| z8k-*)
375 375
 		;;
376
+	# Recognize the basic CPU types without company name, with glob match.
377
+	xtensa*)
378
+		basic_machine=$basic_machine-unknown
379
+		;;
376 380
 	# Recognize the various machine names and aliases which stand
377 381
 	# for a CPU type and a company and sometimes even an OS.
378 382
 	386bsd)
... ...
@@ -443,6 +447,14 @@ case $basic_machine in
443 443
 		basic_machine=ns32k-sequent
444 444
 		os=-dynix
445 445
 		;;
446
+	blackfin)
447
+		basic_machine=bfin-unknown
448
+		os=-linux
449
+		;;
450
+	blackfin-*)
451
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
452
+		os=-linux
453
+		;;
446 454
 	c90)
447 455
 		basic_machine=c90-cray
448 456
 		os=-unicos
... ...
@@ -668,6 +680,14 @@ case $basic_machine in
668 668
 		basic_machine=m68k-isi
669 669
 		os=-sysv
670 670
 		;;
671
+	m68knommu)
672
+		basic_machine=m68k-unknown
673
+		os=-linux
674
+		;;
675
+	m68knommu-*)
676
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
677
+		os=-linux
678
+		;;
671 679
 	m88k-omron*)
672 680
 		basic_machine=m88k-omron
673 681
 		;;
... ...
@@ -813,6 +833,14 @@ case $basic_machine in
813 813
 		basic_machine=i860-intel
814 814
 		os=-osf
815 815
 		;;
816
+	parisc)
817
+		basic_machine=hppa-unknown
818
+		os=-linux
819
+		;;
820
+	parisc-*)
821
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
822
+		os=-linux
823
+		;;
816 824
 	pbd)
817 825
 		basic_machine=sparc-tti
818 826
 		;;
... ...
@@ -1021,6 +1049,10 @@ case $basic_machine in
1021 1021
 		basic_machine=tic6x-unknown
1022 1022
 		os=-coff
1023 1023
 		;;
1024
+	tile*)
1025
+		basic_machine=tile-unknown
1026
+		os=-linux-gnu
1027
+		;;
1024 1028
 	tx39)
1025 1029
 		basic_machine=mipstx39-unknown
1026 1030
 		;;
... ...
@@ -13194,8 +13194,7 @@ fi
13194 13194
 
13195 13195
 done
13196 13196
 
13197
-
13198
-{ echo "$as_me:$LINENO: checking for srunner_create in -lcheck" >&5
13197
+    { echo "$as_me:$LINENO: checking for srunner_create in -lcheck" >&5
13199 13198
 echo $ECHO_N "checking for srunner_create in -lcheck... $ECHO_C" >&6; }
13200 13199
 if test "${ac_cv_lib_check_srunner_create+set}" = set; then
13201 13200
   echo $ECHO_N "(cached) $ECHO_C" >&6
... ...
@@ -13257,12 +13256,7 @@ fi
13257 13257
 { echo "$as_me:$LINENO: result: $ac_cv_lib_check_srunner_create" >&5
13258 13258
 echo "${ECHO_T}$ac_cv_lib_check_srunner_create" >&6; }
13259 13259
 if test $ac_cv_lib_check_srunner_create = yes; then
13260
-  cat >>confdefs.h <<_ACEOF
13261
-#define HAVE_LIBCHECK 1
13262
-_ACEOF
13263
-
13264
-  LIBS="-lcheck $LIBS"
13265
-
13260
+  LCHECK="yes"
13266 13261
 else
13267 13262
   LCHECK="no"
13268 13263
 fi
... ...
@@ -324,7 +324,7 @@ dnl    CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
324 324
 dnl    LDFLAGS="$LDFLAGS -lgcov"
325 325
     AC_DEFINE([HAVE_CHECK], 1, [Enable 'check' unit tests])
326 326
     AC_CHECK_HEADERS(check.h)
327
-    AC_CHECK_LIB(check, srunner_create, , LCHECK="no")
327
+    AC_CHECK_LIB(check, srunner_create, LCHECK="yes", LCHECK="no")
328 328
 fi
329 329
 
330 330
 if test "$LCHECK" = "no"; then
... ...
@@ -55,7 +55,7 @@ target_triplet = @target@
55 55
 @VERSIONSCRIPT_TRUE@am__append_1 = -Wl,@VERSIONSCRIPTFLAG@,@top_srcdir@/libclamav/libclamav.map
56 56
 subdir = libclamav
57 57
 DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
58
-	$(srcdir)/Makefile.in COPYING
58
+	$(srcdir)/Makefile.in
59 59
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
60 60
 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
61 61
 	$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
... ...
@@ -2,4 +2,4 @@ TESTS = check_clamav
2 2
 bin_PROGRAMS = check_clamav
3 3
 check_clamav_SOURCES = check_clamav.c $(top_builddir)/libclamav/clamav.h
4 4
 check_clamav_CFLAGS = 
5
-check_clamav_LDADD = $(top_builddir)/libclamav/libclamav.la @THREAD_LIBS@
5
+check_clamav_LDADD = $(top_builddir)/libclamav/libclamav.la @THREAD_LIBS@ -lcheck
... ...
@@ -200,7 +200,7 @@ top_builddir = @top_builddir@
200 200
 top_srcdir = @top_srcdir@
201 201
 check_clamav_SOURCES = check_clamav.c $(top_builddir)/libclamav/clamav.h
202 202
 check_clamav_CFLAGS = 
203
-check_clamav_LDADD = $(top_builddir)/libclamav/libclamav.la @THREAD_LIBS@
203
+check_clamav_LDADD = $(top_builddir)/libclamav/libclamav.la @THREAD_LIBS@ -lcheck
204 204
 all: all-am
205 205
 
206 206
 .SUFFIXES: