Browse code

Fix linking in a custom OpenSSL. Add Solaris fixes for the stats work.

Shawn Webb authored on 2014/03/11 05:21:51
Showing 50 changed files
... ...
@@ -1,4 +1,4 @@
1
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
1
+# Makefile.in generated by automake 1.14 from Makefile.am.
2 2
 # @configure_input@
3 3
 
4 4
 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
... ...
@@ -145,6 +145,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
145 145
 	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
146 146
 	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
147 147
 	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
148
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
149
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
148 150
 	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
149 151
 	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
150 152
 	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
... ...
@@ -186,8 +188,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
186 186
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
187 187
 	$(top_srcdir)/m4/reorganization/bsd.m4 \
188 188
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
189
-	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
190
-	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
191 189
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
192 190
 	$(top_srcdir)/configure.ac
193 191
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
... ...
@@ -449,6 +449,7 @@ SED = @SED@
449 449
 SET_MAKE = @SET_MAKE@
450 450
 SHELL = @SHELL@
451 451
 SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
452
+SSL_CPPFLAGS = @SSL_CPPFLAGS@
452 453
 STRIP = @STRIP@
453 454
 THREAD_LIBS = @THREAD_LIBS@
454 455
 TH_SAFE = @TH_SAFE@
... ...
@@ -935,10 +936,9 @@ distcheck: dist
935 935
 	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
936 936
 	  && am__cwd=`pwd` \
937 937
 	  && $(am__cd) $(distdir)/_build \
938
-	  && ../configure \
938
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
939 939
 	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
940 940
 	    $(DISTCHECK_CONFIGURE_FLAGS) \
941
-	    --srcdir=.. --prefix="$$dc_install_base" \
942 941
 	  && $(MAKE) $(AM_MAKEFLAGS) \
943 942
 	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
944 943
 	  && $(MAKE) $(AM_MAKEFLAGS) check \
... ...
@@ -1,4 +1,4 @@
1
-# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
1
+# generated automatically by aclocal 1.14 -*- Autoconf -*-
2 2
 
3 3
 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
4 4
 
... ...
@@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
35 35
 [am__api_version='1.14'
36 36
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
37 37
 dnl require some minimum version.  Point them to the right macro.
38
-m4_if([$1], [1.14.1], [],
38
+m4_if([$1], [1.14], [],
39 39
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
40 40
 ])
41 41
 
... ...
@@ -51,7 +51,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
51 51
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
52 52
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
53 53
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
54
-[AM_AUTOMAKE_VERSION([1.14.1])dnl
54
+[AM_AUTOMAKE_VERSION([1.14])dnl
55 55
 m4_ifndef([AC_AUTOCONF_VERSION],
56 56
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
57 57
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
... ...
@@ -1,4 +1,4 @@
1
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
1
+# Makefile.in generated by automake 1.14 from Makefile.am.
2 2
 # @configure_input@
3 3
 
4 4
 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
... ...
@@ -123,6 +123,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
123 123
 	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
124 124
 	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
125 125
 	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
126
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
127
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
126 128
 	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
127 129
 	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
128 130
 	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
... ...
@@ -164,8 +166,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
164 164
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
165 165
 	$(top_srcdir)/m4/reorganization/bsd.m4 \
166 166
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
167
-	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
168
-	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
169 167
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
170 168
 	$(top_srcdir)/configure.ac
171 169
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
... ...
@@ -406,6 +406,7 @@ SED = @SED@
406 406
 SET_MAKE = @SET_MAKE@
407 407
 SHELL = @SHELL@
408 408
 SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
409
+SSL_CPPFLAGS = @SSL_CPPFLAGS@
409 410
 STRIP = @STRIP@
410 411
 THREAD_LIBS = @THREAD_LIBS@
411 412
 TH_SAFE = @TH_SAFE@
... ...
@@ -1,4 +1,4 @@
1
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
1
+# Makefile.in generated by automake 1.14 from Makefile.am.
2 2
 # @configure_input@
3 3
 
4 4
 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
... ...
@@ -104,6 +104,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
104 104
 	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
105 105
 	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
106 106
 	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
107
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
108
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
107 109
 	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
108 110
 	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
109 111
 	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
... ...
@@ -145,8 +147,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
145 145
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
146 146
 	$(top_srcdir)/m4/reorganization/bsd.m4 \
147 147
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
148
-	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
149
-	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
150 148
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
151 149
 	$(top_srcdir)/configure.ac
152 150
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
... ...
@@ -342,6 +342,7 @@ SED = @SED@
342 342
 SET_MAKE = @SET_MAKE@
343 343
 SHELL = @SHELL@
344 344
 SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
345
+SSL_CPPFLAGS = @SSL_CPPFLAGS@
345 346
 STRIP = @STRIP@
346 347
 THREAD_LIBS = @THREAD_LIBS@
347 348
 TH_SAFE = @TH_SAFE@
... ...
@@ -1,4 +1,4 @@
1
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
1
+# Makefile.in generated by automake 1.14 from Makefile.am.
2 2
 # @configure_input@
3 3
 
4 4
 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
... ...
@@ -122,6 +122,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
122 122
 	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
123 123
 	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
124 124
 	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
125
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
126
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
125 127
 	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
126 128
 	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
127 129
 	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
... ...
@@ -163,8 +165,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
163 163
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
164 164
 	$(top_srcdir)/m4/reorganization/bsd.m4 \
165 165
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
166
-	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
167
-	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
168 166
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
169 167
 	$(top_srcdir)/configure.ac
170 168
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
... ...
@@ -360,6 +360,7 @@ SED = @SED@
360 360
 SET_MAKE = @SET_MAKE@
361 361
 SHELL = @SHELL@
362 362
 SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
363
+SSL_CPPFLAGS = @SSL_CPPFLAGS@
363 364
 STRIP = @STRIP@
364 365
 THREAD_LIBS = @THREAD_LIBS@
365 366
 TH_SAFE = @TH_SAFE@
... ...
@@ -53,7 +53,7 @@ AM_CFLAGS=@WERR_CFLAGS@
53 53
 endif
54 54
 
55 55
 LIBS = $(top_builddir)/libclamav/libclamav.la @CLAMD_LIBS@ @THREAD_LIBS@
56
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
56
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav @CLAMD_CPPFLAGS@
57 57
 
58 58
 # it does support --help and --version but with the default config file
59 59
 # it outputs an error message which tells us to edit the config files
... ...
@@ -1,4 +1,4 @@
1
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
1
+# Makefile.in generated by automake 1.14 from Makefile.am.
2 2
 # @configure_input@
3 3
 
4 4
 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
... ...
@@ -122,6 +122,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
122 122
 	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
123 123
 	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
124 124
 	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
125
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
126
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
125 127
 	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
126 128
 	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
127 129
 	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
... ...
@@ -163,8 +165,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
163 163
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
164 164
 	$(top_srcdir)/m4/reorganization/bsd.m4 \
165 165
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
166
-	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
167
-	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
168 166
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
169 167
 	$(top_srcdir)/configure.ac
170 168
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
... ...
@@ -373,6 +373,7 @@ SED = @SED@
373 373
 SET_MAKE = @SET_MAKE@
374 374
 SHELL = @SHELL@
375 375
 SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
376
+SSL_CPPFLAGS = @SSL_CPPFLAGS@
376 377
 STRIP = @STRIP@
377 378
 THREAD_LIBS = @THREAD_LIBS@
378 379
 TH_SAFE = @TH_SAFE@
... ...
@@ -471,7 +472,7 @@ top_srcdir = @top_srcdir@
471 471
 @BUILD_CLAMD_TRUE@    fan.h
472 472
 
473 473
 @BUILD_CLAMD_TRUE@AM_CFLAGS = @WERR_CFLAGS@
474
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
474
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav @CLAMD_CPPFLAGS@
475 475
 
476 476
 # it does support --help and --version but with the default config file
477 477
 # it outputs an error message which tells us to edit the config files
... ...
@@ -44,7 +44,7 @@ endif
44 44
 
45 45
 
46 46
 DEFS = @DEFS@ -DCL_NOTHREADS -DCL_NOLIBCLAMAV
47
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/clamscan -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
47
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/clamscan -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav @CLAMDSCAN_CPPFLAGS@
48 48
 LIBS = $(top_builddir)/libclamav/libclamav_internal_utils_nothreads.la  @CLAMDSCAN_LIBS@
49 49
 
50 50
 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT=clamdscan$(EXEEXT)
... ...
@@ -1,4 +1,4 @@
1
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
1
+# Makefile.in generated by automake 1.14 from Makefile.am.
2 2
 # @configure_input@
3 3
 
4 4
 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
... ...
@@ -122,6 +122,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
122 122
 	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
123 123
 	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
124 124
 	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
125
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
126
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
125 127
 	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
126 128
 	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
127 129
 	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
... ...
@@ -163,8 +165,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
163 163
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
164 164
 	$(top_srcdir)/m4/reorganization/bsd.m4 \
165 165
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
166
-	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
167
-	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
168 166
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
169 167
 	$(top_srcdir)/configure.ac
170 168
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
... ...
@@ -371,6 +371,7 @@ SED = @SED@
371 371
 SET_MAKE = @SET_MAKE@
372 372
 SHELL = @SHELL@
373 373
 SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
374
+SSL_CPPFLAGS = @SSL_CPPFLAGS@
374 375
 STRIP = @STRIP@
375 376
 THREAD_LIBS = @THREAD_LIBS@
376 377
 TH_SAFE = @TH_SAFE@
... ...
@@ -460,7 +461,7 @@ top_srcdir = @top_srcdir@
460 460
 @BUILD_CLAMD_TRUE@    client.h
461 461
 
462 462
 @BUILD_CLAMD_TRUE@AM_CFLAGS = @WERR_CFLAGS@
463
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/clamscan -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
463
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/clamscan -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav @CLAMDSCAN_CPPFLAGS@
464 464
 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = clamdscan$(EXEEXT)
465 465
 CLEANFILES = *.gcda *.gcno
466 466
 all: all-am
... ...
@@ -1,4 +1,4 @@
1
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
1
+# Makefile.in generated by automake 1.14 from Makefile.am.
2 2
 # @configure_input@
3 3
 
4 4
 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
... ...
@@ -104,6 +104,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
104 104
 	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
105 105
 	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
106 106
 	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
107
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
108
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
107 109
 	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
108 110
 	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
109 111
 	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
... ...
@@ -145,8 +147,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
145 145
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
146 146
 	$(top_srcdir)/m4/reorganization/bsd.m4 \
147 147
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
148
-	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
149
-	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
150 148
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
151 149
 	$(top_srcdir)/configure.ac
152 150
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
... ...
@@ -377,6 +377,7 @@ SED = @SED@
377 377
 SET_MAKE = @SET_MAKE@
378 378
 SHELL = @SHELL@
379 379
 SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
380
+SSL_CPPFLAGS = @SSL_CPPFLAGS@
380 381
 STRIP = @STRIP@
381 382
 THREAD_LIBS = @THREAD_LIBS@
382 383
 TH_SAFE = @TH_SAFE@
... ...
@@ -38,6 +38,6 @@ clamscan_SOURCES = \
38 38
 AM_CFLAGS=@WERR_CFLAGS@
39 39
 DEFS = @DEFS@ -DCL_NOTHREADS
40 40
 LIBS = $(top_builddir)/libclamav/libclamav.la @THREAD_LIBS@ @CLAMSCAN_LIBS@
41
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
41
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav @CLAMSCAN_CPPFLAGS@
42 42
 
43 43
 CLEANFILES=*.gcda *.gcno
... ...
@@ -1,4 +1,4 @@
1
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
1
+# Makefile.in generated by automake 1.14 from Makefile.am.
2 2
 # @configure_input@
3 3
 
4 4
 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
... ...
@@ -123,6 +123,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
123 123
 	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
124 124
 	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
125 125
 	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
126
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
127
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
126 128
 	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
127 129
 	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
128 130
 	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
... ...
@@ -164,8 +166,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
164 164
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
165 165
 	$(top_srcdir)/m4/reorganization/bsd.m4 \
166 166
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
167
-	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
168
-	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
169 167
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
170 168
 	$(top_srcdir)/configure.ac
171 169
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
... ...
@@ -362,6 +362,7 @@ SED = @SED@
362 362
 SET_MAKE = @SET_MAKE@
363 363
 SHELL = @SHELL@
364 364
 SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
365
+SSL_CPPFLAGS = @SSL_CPPFLAGS@
365 366
 STRIP = @STRIP@
366 367
 THREAD_LIBS = @THREAD_LIBS@
367 368
 TH_SAFE = @TH_SAFE@
... ...
@@ -448,7 +449,7 @@ clamscan_SOURCES = \
448 448
     manager.h
449 449
 
450 450
 AM_CFLAGS = @WERR_CFLAGS@
451
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
451
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav @CLAMSCAN_CPPFLAGS@
452 452
 CLEANFILES = *.gcda *.gcno
453 453
 all: all-am
454 454
 
... ...
@@ -1,4 +1,4 @@
1
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
1
+# Makefile.in generated by automake 1.14 from Makefile.am.
2 2
 # @configure_input@
3 3
 
4 4
 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
... ...
@@ -122,6 +122,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
122 122
 	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
123 123
 	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
124 124
 	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
125
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
126
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
125 127
 	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
126 128
 	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
127 129
 	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
... ...
@@ -163,8 +165,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
163 163
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
164 164
 	$(top_srcdir)/m4/reorganization/bsd.m4 \
165 165
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
166
-	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
167
-	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
168 166
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
169 167
 	$(top_srcdir)/configure.ac
170 168
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
... ...
@@ -360,6 +360,7 @@ SED = @SED@
360 360
 SET_MAKE = @SET_MAKE@
361 361
 SHELL = @SHELL@
362 362
 SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
363
+SSL_CPPFLAGS = @SSL_CPPFLAGS@
363 364
 STRIP = @STRIP@
364 365
 THREAD_LIBS = @THREAD_LIBS@
365 366
 TH_SAFE = @TH_SAFE@
... ...
@@ -1,14 +1,12 @@
1 1
 #! /bin/sh
2 2
 # Attempt to guess a canonical system name.
3
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5
-#   2011, 2012 Free Software Foundation, Inc.
3
+#   Copyright 1992-2013 Free Software Foundation, Inc.
6 4
 
7
-timestamp='2012-02-10'
5
+timestamp='2013-05-16'
8 6
 
9 7
 # This file is free software; you can redistribute it and/or modify it
10 8
 # under the terms of the GNU General Public License as published by
11
-# the Free Software Foundation; either version 2 of the License, or
9
+# the Free Software Foundation; either version 3 of the License, or
12 10
 # (at your option) any later version.
13 11
 #
14 12
 # This program is distributed in the hope that it will be useful, but
... ...
@@ -22,19 +20,17 @@ timestamp='2012-02-10'
22 22
 # As a special exception to the GNU General Public License, if you
23 23
 # distribute this file as part of a program that contains a
24 24
 # configuration script generated by Autoconf, you may include it under
25
-# the same distribution terms that you use for the rest of that program.
26
-
27
-
28
-# Originally written by Per Bothner.  Please send patches (context
29
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
30
-# entry.
25
+# the same distribution terms that you use for the rest of that
26
+# program.  This Exception is an additional permission under section 7
27
+# of the GNU General Public License, version 3 ("GPLv3").
31 28
 #
32
-# This script attempts to guess a canonical system name similar to
33
-# config.sub.  If it succeeds, it prints the system name on stdout, and
34
-# exits with 0.  Otherwise, it exits with 1.
29
+# Originally written by Per Bothner.
35 30
 #
36 31
 # You can get the latest version of this script from:
37 32
 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
33
+#
34
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
35
+
38 36
 
39 37
 me=`echo "$0" | sed -e 's,.*/,,'`
40 38
 
... ...
@@ -54,9 +50,7 @@ version="\
54 54
 GNU config.guess ($timestamp)
55 55
 
56 56
 Originally written by Per Bothner.
57
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
58
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
59
-Free Software Foundation, Inc.
57
+Copyright 1992-2013 Free Software Foundation, Inc.
60 58
 
61 59
 This is free software; see the source for copying conditions.  There is NO
62 60
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
... ...
@@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
138 138
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
139 139
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
140 140
 
141
+case "${UNAME_SYSTEM}" in
142
+Linux|GNU|GNU/*)
143
+	# If the system lacks a compiler, then just pick glibc.
144
+	# We could probably try harder.
145
+	LIBC=gnu
146
+
147
+	eval $set_cc_for_build
148
+	cat <<-EOF > $dummy.c
149
+	#include <features.h>
150
+	#if defined(__UCLIBC__)
151
+	LIBC=uclibc
152
+	#elif defined(__dietlibc__)
153
+	LIBC=dietlibc
154
+	#else
155
+	LIBC=gnu
156
+	#endif
157
+	EOF
158
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
159
+	;;
160
+esac
161
+
141 162
 # Note: order is significant - the case branches are not exclusive.
142 163
 
143 164
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
... ...
@@ -200,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
200 200
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
201 201
 	echo "${machine}-${os}${release}"
202 202
 	exit ;;
203
+    *:Bitrig:*:*)
204
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
205
+	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
206
+	exit ;;
203 207
     *:OpenBSD:*:*)
204 208
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
205 209
 	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
... ...
@@ -302,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
302 302
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
303 303
 	echo arm-acorn-riscix${UNAME_RELEASE}
304 304
 	exit ;;
305
-    arm:riscos:*:*|arm:RISCOS:*:*)
305
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
306 306
 	echo arm-unknown-riscos
307 307
 	exit ;;
308 308
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
... ...
@@ -791,16 +810,14 @@ EOF
791 791
 	exit ;;
792 792
     *:FreeBSD:*:*)
793 793
 	UNAME_PROCESSOR=`/usr/bin/uname -p`
794
-	case ${UNAME_PROCESSOR} in
795
-	    amd64)
796
-		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
797
-	    *)
798
-		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
799
-	esac
794
+	echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
800 795
 	exit ;;
801 796
     i*:CYGWIN*:*)
802 797
 	echo ${UNAME_MACHINE}-pc-cygwin
803 798
 	exit ;;
799
+    *:MINGW64*:*)
800
+	echo ${UNAME_MACHINE}-pc-mingw64
801
+	exit ;;
804 802
     *:MINGW*:*)
805 803
 	echo ${UNAME_MACHINE}-pc-mingw32
806 804
 	exit ;;
... ...
@@ -852,21 +869,21 @@ EOF
852 852
 	exit ;;
853 853
     *:GNU:*:*)
854 854
 	# the GNU system
855
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
855
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
856 856
 	exit ;;
857 857
     *:GNU/*:*:*)
858 858
 	# other systems with GNU libc and userland
859
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
859
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
860 860
 	exit ;;
861 861
     i*86:Minix:*:*)
862 862
 	echo ${UNAME_MACHINE}-pc-minix
863 863
 	exit ;;
864 864
     aarch64:Linux:*:*)
865
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
865
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
866 866
 	exit ;;
867 867
     aarch64_be:Linux:*:*)
868 868
 	UNAME_MACHINE=aarch64_be
869
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
869
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
870 870
 	exit ;;
871 871
     alpha:Linux:*:*)
872 872
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
... ...
@@ -879,59 +896,54 @@ EOF
879 879
 	  EV68*) UNAME_MACHINE=alphaev68 ;;
880 880
 	esac
881 881
 	objdump --private-headers /bin/sh | grep -q ld.so.1
882
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
883
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
882
+	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
883
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
884
+	exit ;;
885
+    arc:Linux:*:* | arceb:Linux:*:*)
886
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
884 887
 	exit ;;
885 888
     arm*:Linux:*:*)
886 889
 	eval $set_cc_for_build
887 890
 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
888 891
 	    | grep -q __ARM_EABI__
889 892
 	then
890
-	    echo ${UNAME_MACHINE}-unknown-linux-gnu
893
+	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
891 894
 	else
892 895
 	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
893 896
 		| grep -q __ARM_PCS_VFP
894 897
 	    then
895
-		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
898
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
896 899
 	    else
897
-		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
900
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
898 901
 	    fi
899 902
 	fi
900 903
 	exit ;;
901 904
     avr32*:Linux:*:*)
902
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
905
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
903 906
 	exit ;;
904 907
     cris:Linux:*:*)
905
-	echo ${UNAME_MACHINE}-axis-linux-gnu
908
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
906 909
 	exit ;;
907 910
     crisv32:Linux:*:*)
908
-	echo ${UNAME_MACHINE}-axis-linux-gnu
911
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
909 912
 	exit ;;
910 913
     frv:Linux:*:*)
911
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
914
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
912 915
 	exit ;;
913 916
     hexagon:Linux:*:*)
914
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
917
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
915 918
 	exit ;;
916 919
     i*86:Linux:*:*)
917
-	LIBC=gnu
918
-	eval $set_cc_for_build
919
-	sed 's/^	//' << EOF >$dummy.c
920
-	#ifdef __dietlibc__
921
-	LIBC=dietlibc
922
-	#endif
923
-EOF
924
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
925
-	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
920
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
926 921
 	exit ;;
927 922
     ia64:Linux:*:*)
928
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
923
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
929 924
 	exit ;;
930 925
     m32r*:Linux:*:*)
931
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
926
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
932 927
 	exit ;;
933 928
     m68*:Linux:*:*)
934
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
929
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
935 930
 	exit ;;
936 931
     mips:Linux:*:* | mips64:Linux:*:*)
937 932
 	eval $set_cc_for_build
... ...
@@ -950,54 +962,57 @@ EOF
950 950
 	#endif
951 951
 EOF
952 952
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
953
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
953
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
954 954
 	;;
955
+    or1k:Linux:*:*)
956
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
957
+	exit ;;
955 958
     or32:Linux:*:*)
956
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
959
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
957 960
 	exit ;;
958 961
     padre:Linux:*:*)
959
-	echo sparc-unknown-linux-gnu
962
+	echo sparc-unknown-linux-${LIBC}
960 963
 	exit ;;
961 964
     parisc64:Linux:*:* | hppa64:Linux:*:*)
962
-	echo hppa64-unknown-linux-gnu
965
+	echo hppa64-unknown-linux-${LIBC}
963 966
 	exit ;;
964 967
     parisc:Linux:*:* | hppa:Linux:*:*)
965 968
 	# Look for CPU level
966 969
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
967
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
968
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
969
-	  *)    echo hppa-unknown-linux-gnu ;;
970
+	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
971
+	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
972
+	  *)    echo hppa-unknown-linux-${LIBC} ;;
970 973
 	esac
971 974
 	exit ;;
972 975
     ppc64:Linux:*:*)
973
-	echo powerpc64-unknown-linux-gnu
976
+	echo powerpc64-unknown-linux-${LIBC}
974 977
 	exit ;;
975 978
     ppc:Linux:*:*)
976
-	echo powerpc-unknown-linux-gnu
979
+	echo powerpc-unknown-linux-${LIBC}
977 980
 	exit ;;
978 981
     s390:Linux:*:* | s390x:Linux:*:*)
979
-	echo ${UNAME_MACHINE}-ibm-linux
982
+	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
980 983
 	exit ;;
981 984
     sh64*:Linux:*:*)
982
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
985
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
983 986
 	exit ;;
984 987
     sh*:Linux:*:*)
985
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
988
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
986 989
 	exit ;;
987 990
     sparc:Linux:*:* | sparc64:Linux:*:*)
988
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
991
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
989 992
 	exit ;;
990 993
     tile*:Linux:*:*)
991
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
994
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
992 995
 	exit ;;
993 996
     vax:Linux:*:*)
994
-	echo ${UNAME_MACHINE}-dec-linux-gnu
997
+	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
995 998
 	exit ;;
996 999
     x86_64:Linux:*:*)
997
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
1000
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
998 1001
 	exit ;;
999 1002
     xtensa*:Linux:*:*)
1000
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
1003
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1001 1004
 	exit ;;
1002 1005
     i*86:DYNIX/ptx:4*:*)
1003 1006
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
... ...
@@ -1201,6 +1216,9 @@ EOF
1201 1201
     BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
1202 1202
 	echo i586-pc-haiku
1203 1203
 	exit ;;
1204
+    x86_64:Haiku:*:*)
1205
+	echo x86_64-unknown-haiku
1206
+	exit ;;
1204 1207
     SX-4:SUPER-UX:*:*)
1205 1208
 	echo sx4-nec-superux${UNAME_RELEASE}
1206 1209
 	exit ;;
... ...
@@ -1227,19 +1245,21 @@ EOF
1227 1227
 	exit ;;
1228 1228
     *:Darwin:*:*)
1229 1229
 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1230
-	case $UNAME_PROCESSOR in
1231
-	    i386)
1232
-		eval $set_cc_for_build
1233
-		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1234
-		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1235
-		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1236
-		      grep IS_64BIT_ARCH >/dev/null
1237
-		  then
1238
-		      UNAME_PROCESSOR="x86_64"
1239
-		  fi
1240
-		fi ;;
1241
-	    unknown) UNAME_PROCESSOR=powerpc ;;
1242
-	esac
1230
+	eval $set_cc_for_build
1231
+	if test "$UNAME_PROCESSOR" = unknown ; then
1232
+	    UNAME_PROCESSOR=powerpc
1233
+	fi
1234
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1235
+	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1236
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1237
+		grep IS_64BIT_ARCH >/dev/null
1238
+	    then
1239
+		case $UNAME_PROCESSOR in
1240
+		    i386) UNAME_PROCESSOR=x86_64 ;;
1241
+		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
1242
+		esac
1243
+	    fi
1244
+	fi
1243 1245
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1244 1246
 	exit ;;
1245 1247
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
... ...
@@ -1256,7 +1276,7 @@ EOF
1256 1256
     NEO-?:NONSTOP_KERNEL:*:*)
1257 1257
 	echo neo-tandem-nsk${UNAME_RELEASE}
1258 1258
 	exit ;;
1259
-    NSE-?:NONSTOP_KERNEL:*:*)
1259
+    NSE-*:NONSTOP_KERNEL:*:*)
1260 1260
 	echo nse-tandem-nsk${UNAME_RELEASE}
1261 1261
 	exit ;;
1262 1262
     NSR-?:NONSTOP_KERNEL:*:*)
... ...
@@ -1330,9 +1350,6 @@ EOF
1330 1330
 	exit ;;
1331 1331
 esac
1332 1332
 
1333
-#echo '(No uname command or uname output not recognized.)' 1>&2
1334
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1335
-
1336 1333
 eval $set_cc_for_build
1337 1334
 cat >$dummy.c <<EOF
1338 1335
 #ifdef _SEQUENT_
... ...
@@ -1,24 +1,18 @@
1 1
 #! /bin/sh
2 2
 # Configuration validation subroutine script.
3
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5
-#   2011, 2012 Free Software Foundation, Inc.
3
+#   Copyright 1992-2013 Free Software Foundation, Inc.
6 4
 
7
-timestamp='2012-04-18'
5
+timestamp='2013-04-24'
8 6
 
9
-# This file is (in principle) common to ALL GNU software.
10
-# The presence of a machine in this file suggests that SOME GNU software
11
-# can handle that machine.  It does not imply ALL GNU software can.
12
-#
13
-# This file is free software; you can redistribute it and/or modify
14
-# it under the terms of the GNU General Public License as published by
15
-# the Free Software Foundation; either version 2 of the License, or
7
+# This file is free software; you can redistribute it and/or modify it
8
+# under the terms of the GNU General Public License as published by
9
+# the Free Software Foundation; either version 3 of the License, or
16 10
 # (at your option) any later version.
17 11
 #
18
-# This program is distributed in the hope that it will be useful,
19
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
20
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
-# GNU General Public License for more details.
12
+# This program is distributed in the hope that it will be useful, but
13
+# WITHOUT ANY WARRANTY; without even the implied warranty of
14
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
+# General Public License for more details.
22 16
 #
23 17
 # You should have received a copy of the GNU General Public License
24 18
 # along with this program; if not, see <http://www.gnu.org/licenses/>.
... ...
@@ -26,11 +20,12 @@ timestamp='2012-04-18'
26 26
 # As a special exception to the GNU General Public License, if you
27 27
 # distribute this file as part of a program that contains a
28 28
 # configuration script generated by Autoconf, you may include it under
29
-# the same distribution terms that you use for the rest of that program.
29
+# the same distribution terms that you use for the rest of that
30
+# program.  This Exception is an additional permission under section 7
31
+# of the GNU General Public License, version 3 ("GPLv3").
30 32
 
31 33
 
32
-# Please send patches to <config-patches@gnu.org>.  Submit a context
33
-# diff and a properly formatted GNU ChangeLog entry.
34
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
34 35
 #
35 36
 # Configuration subroutine to validate and canonicalize a configuration type.
36 37
 # Supply the specified configuration type as an argument.
... ...
@@ -73,9 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
73 73
 version="\
74 74
 GNU config.sub ($timestamp)
75 75
 
76
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
77
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
78
-Free Software Foundation, Inc.
76
+Copyright 1992-2013 Free Software Foundation, Inc.
79 77
 
80 78
 This is free software; see the source for copying conditions.  There is NO
81 79
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
... ...
@@ -123,7 +116,7 @@ esac
123 123
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
124 124
 case $maybe_os in
125 125
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
126
-  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
126
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
127 127
   knetbsd*-gnu* | netbsd*-gnu* | \
128 128
   kopensolaris*-gnu* | \
129 129
   storm-chaos* | os2-emx* | rtmk-nova*)
... ...
@@ -156,7 +149,7 @@ case $os in
156 156
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
157 157
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
158 158
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
159
-	-apple | -axis | -knuth | -cray | -microblaze)
159
+	-apple | -axis | -knuth | -cray | -microblaze*)
160 160
 		os=
161 161
 		basic_machine=$1
162 162
 		;;
... ...
@@ -259,8 +252,10 @@ case $basic_machine in
259 259
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
260 260
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
261 261
 	| am33_2.0 \
262
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
263
-        | be32 | be64 \
262
+	| arc | arceb \
263
+	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
264
+	| avr | avr32 \
265
+	| be32 | be64 \
264 266
 	| bfin \
265 267
 	| c4x | clipper \
266 268
 	| d10v | d30v | dlx | dsp16xx \
... ...
@@ -273,7 +268,7 @@ case $basic_machine in
273 273
 	| le32 | le64 \
274 274
 	| lm32 \
275 275
 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
276
-	| maxq | mb | microblaze | mcore | mep | metag \
276
+	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
277 277
 	| mips | mipsbe | mipseb | mipsel | mipsle \
278 278
 	| mips16 \
279 279
 	| mips64 | mips64el \
... ...
@@ -291,16 +286,17 @@ case $basic_machine in
291 291
 	| mipsisa64r2 | mipsisa64r2el \
292 292
 	| mipsisa64sb1 | mipsisa64sb1el \
293 293
 	| mipsisa64sr71k | mipsisa64sr71kel \
294
+	| mipsr5900 | mipsr5900el \
294 295
 	| mipstx39 | mipstx39el \
295 296
 	| mn10200 | mn10300 \
296 297
 	| moxie \
297 298
 	| mt \
298 299
 	| msp430 \
299 300
 	| nds32 | nds32le | nds32be \
300
-	| nios | nios2 \
301
+	| nios | nios2 | nios2eb | nios2el \
301 302
 	| ns16k | ns32k \
302 303
 	| open8 \
303
-	| or32 \
304
+	| or1k | or32 \
304 305
 	| pdp10 | pdp11 | pj | pjl \
305 306
 	| powerpc | powerpc64 | powerpc64le | powerpcle \
306 307
 	| pyramid \
... ...
@@ -370,7 +366,7 @@ case $basic_machine in
370 370
 	| aarch64-* | aarch64_be-* \
371 371
 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
372 372
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
373
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
373
+	| alphapca5[67]-* | alpha64pca5[67]-* | amd64-* | arc-* | arceb-* \
374 374
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
375 375
 	| avr-* | avr32-* \
376 376
 	| be32-* | be64-* \
... ...
@@ -389,7 +385,8 @@ case $basic_machine in
389 389
 	| lm32-* \
390 390
 	| m32c-* | m32r-* | m32rle-* \
391 391
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
392
-	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
392
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
393
+	| microblaze-* | microblazeel-* \
393 394
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
394 395
 	| mips16-* \
395 396
 	| mips64-* | mips64el-* \
... ...
@@ -407,12 +404,13 @@ case $basic_machine in
407 407
 	| mipsisa64r2-* | mipsisa64r2el-* \
408 408
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
409 409
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
410
+	| mipsr5900-* | mipsr5900el-* \
410 411
 	| mipstx39-* | mipstx39el-* \
411 412
 	| mmix-* \
412 413
 	| mt-* \
413 414
 	| msp430-* \
414 415
 	| nds32-* | nds32le-* | nds32be-* \
415
-	| nios-* | nios2-* \
416
+	| nios-* | nios2-* | nios2eb-* | nios2el-* \
416 417
 	| none-* | np1-* | ns16k-* | ns32k-* \
417 418
 	| open8-* \
418 419
 	| orion-* \
... ...
@@ -475,12 +473,6 @@ case $basic_machine in
475 475
 		basic_machine=a29k-none
476 476
 		os=-bsd
477 477
 		;;
478
-	amd64)
479
-		basic_machine=x86_64-pc
480
-		;;
481
-	amd64-*)
482
-		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
483
-		;;
484 478
 	amdahl)
485 479
 		basic_machine=580-amdahl
486 480
 		os=-sysv
... ...
@@ -788,9 +780,13 @@ case $basic_machine in
788 788
 		basic_machine=ns32k-utek
789 789
 		os=-sysv
790 790
 		;;
791
-	microblaze)
791
+	microblaze*)
792 792
 		basic_machine=microblaze-xilinx
793 793
 		;;
794
+	mingw64)
795
+		basic_machine=x86_64-pc
796
+		os=-mingw64
797
+		;;
794 798
 	mingw32)
795 799
 		basic_machine=i386-pc
796 800
 		os=-mingw32
... ...
@@ -1019,7 +1015,11 @@ case $basic_machine in
1019 1019
 		basic_machine=i586-unknown
1020 1020
 		os=-pw32
1021 1021
 		;;
1022
-	rdos)
1022
+	rdos | rdos64)
1023
+		basic_machine=x86_64-pc
1024
+		os=-rdos
1025
+		;;
1026
+	rdos32)
1023 1027
 		basic_machine=i386-pc
1024 1028
 		os=-rdos
1025 1029
 		;;
... ...
@@ -1346,21 +1346,21 @@ case $os in
1346 1346
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1347 1347
 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1348 1348
 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1349
-	      | -sym* | -kopensolaris* \
1349
+	      | -sym* | -kopensolaris* | -plan9* \
1350 1350
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1351 1351
 	      | -aos* | -aros* \
1352 1352
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1353 1353
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1354 1354
 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1355
-	      | -openbsd* | -solidbsd* \
1355
+	      | -bitrig* | -openbsd* | -solidbsd* \
1356 1356
 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1357 1357
 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1358 1358
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1359 1359
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1360 1360
 	      | -chorusos* | -chorusrdb* | -cegcc* \
1361 1361
 	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1362
-	      | -mingw32* | -linux-gnu* | -linux-android* \
1363
-	      | -linux-newlib* | -linux-uclibc* \
1362
+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1363
+	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1364 1364
 	      | -uxpv* | -beos* | -mpeix* | -udk* \
1365 1365
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1366 1366
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
... ...
@@ -1492,9 +1492,6 @@ case $os in
1492 1492
 	-aros*)
1493 1493
 		os=-aros
1494 1494
 		;;
1495
-	-kaos*)
1496
-		os=-kaos
1497
-		;;
1498 1495
 	-zvmoe)
1499 1496
 		os=-zvmoe
1500 1497
 		;;
... ...
@@ -1586,6 +1583,9 @@ case $basic_machine in
1586 1586
 	mips*-*)
1587 1587
 		os=-elf
1588 1588
 		;;
1589
+	or1k-*)
1590
+		os=-elf
1591
+		;;
1589 1592
 	or32-*)
1590 1593
 		os=-coff
1591 1594
 		;;
... ...
@@ -1,10 +1,9 @@
1 1
 #! /bin/sh
2 2
 # depcomp - compile a program generating dependencies as side-effects
3 3
 
4
-scriptversion=2012-03-27.16; # UTC
4
+scriptversion=2013-05-30.07; # UTC
5 5
 
6
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
7
-# 2011, 2012 Free Software Foundation, Inc.
6
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
8 7
 
9 8
 # This program is free software; you can redistribute it and/or modify
10 9
 # it under the terms of the GNU General Public License as published by
... ...
@@ -28,9 +27,9 @@ scriptversion=2012-03-27.16; # UTC
28 28
 
29 29
 case $1 in
30 30
   '')
31
-     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
32
-     exit 1;
33
-     ;;
31
+    echo "$0: No command.  Try '$0 --help' for more information." 1>&2
32
+    exit 1;
33
+    ;;
34 34
   -h | --h*)
35 35
     cat <<\EOF
36 36
 Usage: depcomp [--help] [--version] PROGRAM [ARGS]
... ...
@@ -57,11 +56,65 @@ EOF
57 57
     ;;
58 58
 esac
59 59
 
60
+# Get the directory component of the given path, and save it in the
61
+# global variables '$dir'.  Note that this directory component will
62
+# be either empty or ending with a '/' character.  This is deliberate.
63
+set_dir_from ()
64
+{
65
+  case $1 in
66
+    */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
67
+      *) dir=;;
68
+  esac
69
+}
70
+
71
+# Get the suffix-stripped basename of the given path, and save it the
72
+# global variable '$base'.
73
+set_base_from ()
74
+{
75
+  base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
76
+}
77
+
78
+# If no dependency file was actually created by the compiler invocation,
79
+# we still have to create a dummy depfile, to avoid errors with the
80
+# Makefile "include basename.Plo" scheme.
81
+make_dummy_depfile ()
82
+{
83
+  echo "#dummy" > "$depfile"
84
+}
85
+
86
+# Factor out some common post-processing of the generated depfile.
87
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
88
+aix_post_process_depfile ()
89
+{
90
+  # If the compiler actually managed to produce a dependency file,
91
+  # post-process it.
92
+  if test -f "$tmpdepfile"; then
93
+    # Each line is of the form 'foo.o: dependency.h'.
94
+    # Do two passes, one to just change these to
95
+    #   $object: dependency.h
96
+    # and one to simply output
97
+    #   dependency.h:
98
+    # which is needed to avoid the deleted-header problem.
99
+    { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
100
+      sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
101
+    } > "$depfile"
102
+    rm -f "$tmpdepfile"
103
+  else
104
+    make_dummy_depfile
105
+  fi
106
+}
107
+
60 108
 # A tabulation character.
61 109
 tab='	'
62 110
 # A newline character.
63 111
 nl='
64 112
 '
113
+# Character ranges might be problematic outside the C locale.
114
+# These definitions help.
115
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
116
+lower=abcdefghijklmnopqrstuvwxyz
117
+digits=0123456789
118
+alpha=${upper}${lower}
65 119
 
66 120
 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
67 121
   echo "depcomp: Variables source, object and depmode must be set" 1>&2
... ...
@@ -75,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
75 75
 
76 76
 rm -f "$tmpdepfile"
77 77
 
78
+# Avoid interferences from the environment.
79
+gccflag= dashmflag=
80
+
78 81
 # Some modes work just like other modes, but use different flags.  We
79 82
 # parameterize here, but still list the modes in the big case below,
80 83
 # to make depend.m4 easier to write.  Note that we *cannot* use a case
... ...
@@ -86,32 +142,32 @@ if test "$depmode" = hp; then
86 86
 fi
87 87
 
88 88
 if test "$depmode" = dashXmstdout; then
89
-   # This is just like dashmstdout with a different argument.
90
-   dashmflag=-xM
91
-   depmode=dashmstdout
89
+  # This is just like dashmstdout with a different argument.
90
+  dashmflag=-xM
91
+  depmode=dashmstdout
92 92
 fi
93 93
 
94 94
 cygpath_u="cygpath -u -f -"
95 95
 if test "$depmode" = msvcmsys; then
96
-   # This is just like msvisualcpp but w/o cygpath translation.
97
-   # Just convert the backslash-escaped backslashes to single forward
98
-   # slashes to satisfy depend.m4
99
-   cygpath_u='sed s,\\\\,/,g'
100
-   depmode=msvisualcpp
96
+  # This is just like msvisualcpp but w/o cygpath translation.
97
+  # Just convert the backslash-escaped backslashes to single forward
98
+  # slashes to satisfy depend.m4
99
+  cygpath_u='sed s,\\\\,/,g'
100
+  depmode=msvisualcpp
101 101
 fi
102 102
 
103 103
 if test "$depmode" = msvc7msys; then
104
-   # This is just like msvc7 but w/o cygpath translation.
105
-   # Just convert the backslash-escaped backslashes to single forward
106
-   # slashes to satisfy depend.m4
107
-   cygpath_u='sed s,\\\\,/,g'
108
-   depmode=msvc7
104
+  # This is just like msvc7 but w/o cygpath translation.
105
+  # Just convert the backslash-escaped backslashes to single forward
106
+  # slashes to satisfy depend.m4
107
+  cygpath_u='sed s,\\\\,/,g'
108
+  depmode=msvc7
109 109
 fi
110 110
 
111 111
 if test "$depmode" = xlc; then
112
-   # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
113
-   gccflag=-qmakedep=gcc,-MF
114
-   depmode=gcc
112
+  # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
113
+  gccflag=-qmakedep=gcc,-MF
114
+  depmode=gcc
115 115
 fi
116 116
 
117 117
 case "$depmode" in
... ...
@@ -134,8 +190,7 @@ gcc3)
134 134
   done
135 135
   "$@"
136 136
   stat=$?
137
-  if test $stat -eq 0; then :
138
-  else
137
+  if test $stat -ne 0; then
139 138
     rm -f "$tmpdepfile"
140 139
     exit $stat
141 140
   fi
... ...
@@ -143,13 +198,17 @@ gcc3)
143 143
   ;;
144 144
 
145 145
 gcc)
146
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
147
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
148
+## (see the conditional assignment to $gccflag above).
146 149
 ## There are various ways to get dependency output from gcc.  Here's
147 150
 ## why we pick this rather obscure method:
148 151
 ## - Don't want to use -MD because we'd like the dependencies to end
149 152
 ##   up in a subdir.  Having to rename by hand is ugly.
150 153
 ##   (We might end up doing this anyway to support other compilers.)
151 154
 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
152
-##   -MM, not -M (despite what the docs say).
155
+##   -MM, not -M (despite what the docs say).  Also, it might not be
156
+##   supported by the other compilers which use the 'gcc' depmode.
153 157
 ## - Using -M directly means running the compiler twice (even worse
154 158
 ##   than renaming).
155 159
   if test -z "$gccflag"; then
... ...
@@ -157,15 +216,14 @@ gcc)
157 157
   fi
158 158
   "$@" -Wp,"$gccflag$tmpdepfile"
159 159
   stat=$?
160
-  if test $stat -eq 0; then :
161
-  else
160
+  if test $stat -ne 0; then
162 161
     rm -f "$tmpdepfile"
163 162
     exit $stat
164 163
   fi
165 164
   rm -f "$depfile"
166 165
   echo "$object : \\" > "$depfile"
167
-  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
168
-## The second -e expression handles DOS-style file names with drive letters.
166
+  # The second -e expression handles DOS-style file names with drive
167
+  # letters.
169 168
   sed -e 's/^[^:]*: / /' \
170 169
       -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
171 170
 ## This next piece of magic avoids the "deleted header file" problem.
... ...
@@ -174,15 +232,15 @@ gcc)
174 174
 ## typically no way to rebuild the header).  We avoid this by adding
175 175
 ## dummy dependencies for each header file.  Too bad gcc doesn't do
176 176
 ## this for us directly.
177
-  tr ' ' "$nl" < "$tmpdepfile" |
178 177
 ## Some versions of gcc put a space before the ':'.  On the theory
179 178
 ## that the space means something, we add a space to the output as
180 179
 ## well.  hp depmode also adds that space, but also prefixes the VPATH
181 180
 ## to the object.  Take care to not repeat it in the output.
182 181
 ## Some versions of the HPUX 10.20 sed can't process this invocation
183 182
 ## correctly.  Breaking it into two sed invocations is a workaround.
184
-    sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
185
-      | sed -e 's/$/ :/' >> "$depfile"
183
+  tr ' ' "$nl" < "$tmpdepfile" \
184
+    | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
185
+    | sed -e 's/$/ :/' >> "$depfile"
186 186
   rm -f "$tmpdepfile"
187 187
   ;;
188 188
 
... ...
@@ -200,8 +258,7 @@ sgi)
200 200
     "$@" -MDupdate "$tmpdepfile"
201 201
   fi
202 202
   stat=$?
203
-  if test $stat -eq 0; then :
204
-  else
203
+  if test $stat -ne 0; then
205 204
     rm -f "$tmpdepfile"
206 205
     exit $stat
207 206
   fi
... ...
@@ -209,7 +266,6 @@ sgi)
209 209
 
210 210
   if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
211 211
     echo "$object : \\" > "$depfile"
212
-
213 212
     # Clip off the initial element (the dependent).  Don't try to be
214 213
     # clever and replace this with sed code, as IRIX sed won't handle
215 214
     # lines with more than a fixed number of characters (4096 in
... ...
@@ -217,19 +273,15 @@ sgi)
217 217
     # the IRIX cc adds comments like '#:fec' to the end of the
218 218
     # dependency line.
219 219
     tr ' ' "$nl" < "$tmpdepfile" \
220
-    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
221
-    tr "$nl" ' ' >> "$depfile"
220
+      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
221
+      | tr "$nl" ' ' >> "$depfile"
222 222
     echo >> "$depfile"
223
-
224 223
     # The second pass generates a dummy entry for each header file.
225 224
     tr ' ' "$nl" < "$tmpdepfile" \
226
-   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
227
-   >> "$depfile"
225
+      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
226
+      >> "$depfile"
228 227
   else
229
-    # The sourcefile does not contain any dependencies, so just
230
-    # store a dummy comment line, to avoid errors with the Makefile
231
-    # "include basename.Plo" scheme.
232
-    echo "#dummy" > "$depfile"
228
+    make_dummy_depfile
233 229
   fi
234 230
   rm -f "$tmpdepfile"
235 231
   ;;
... ...
@@ -247,9 +299,8 @@ aix)
247 247
   # current directory.  Also, the AIX compiler puts '$object:' at the
248 248
   # start of each line; $object doesn't have directory information.
249 249
   # Version 6 uses the directory in both cases.
250
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
251
-  test "x$dir" = "x$object" && dir=
252
-  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
250
+  set_dir_from "$object"
251
+  set_base_from "$object"
253 252
   if test "$libtool" = yes; then
254 253
     tmpdepfile1=$dir$base.u
255 254
     tmpdepfile2=$base.u
... ...
@@ -262,9 +313,7 @@ aix)
262 262
     "$@" -M
263 263
   fi
264 264
   stat=$?
265
-
266
-  if test $stat -eq 0; then :
267
-  else
265
+  if test $stat -ne 0; then
268 266
     rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
269 267
     exit $stat
270 268
   fi
... ...
@@ -273,65 +322,113 @@ aix)
273 273
   do
274 274
     test -f "$tmpdepfile" && break
275 275
   done
276
-  if test -f "$tmpdepfile"; then
277
-    # Each line is of the form 'foo.o: dependent.h'.
278
-    # Do two passes, one to just change these to
279
-    # '$object: dependent.h' and one to simply 'dependent.h:'.
280
-    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
281
-    sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
282
-  else
283
-    # The sourcefile does not contain any dependencies, so just
284
-    # store a dummy comment line, to avoid errors with the Makefile
285
-    # "include basename.Plo" scheme.
286
-    echo "#dummy" > "$depfile"
276
+  aix_post_process_depfile
277
+  ;;
278
+
279
+tcc)
280
+  # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
281
+  # FIXME: That version still under development at the moment of writing.
282
+  #        Make that this statement remains true also for stable, released
283
+  #        versions.
284
+  # It will wrap lines (doesn't matter whether long or short) with a
285
+  # trailing '\', as in:
286
+  #
287
+  #   foo.o : \
288
+  #    foo.c \
289
+  #    foo.h \
290
+  #
291
+  # It will put a trailing '\' even on the last line, and will use leading
292
+  # spaces rather than leading tabs (at least since its commit 0394caf7
293
+  # "Emit spaces for -MD").
294
+  "$@" -MD -MF "$tmpdepfile"
295
+  stat=$?
296
+  if test $stat -ne 0; then
297
+    rm -f "$tmpdepfile"
298
+    exit $stat
287 299
   fi
300
+  rm -f "$depfile"
301
+  # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
302
+  # We have to change lines of the first kind to '$object: \'.
303
+  sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
304
+  # And for each line of the second kind, we have to emit a 'dep.h:'
305
+  # dummy dependency, to avoid the deleted-header problem.
306
+  sed -n -e 's|^  *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
288 307
   rm -f "$tmpdepfile"
289 308
   ;;
290 309
 
291
-icc)
292
-  # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
293
-  # However on
294
-  #    $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
295
-  # ICC 7.0 will fill foo.d with something like
296
-  #    foo.o: sub/foo.c
297
-  #    foo.o: sub/foo.h
298
-  # which is wrong.  We want
299
-  #    sub/foo.o: sub/foo.c
300
-  #    sub/foo.o: sub/foo.h
301
-  #    sub/foo.c:
302
-  #    sub/foo.h:
303
-  # ICC 7.1 will output
310
+## The order of this option in the case statement is important, since the
311
+## shell code in configure will try each of these formats in the order
312
+## listed in this file.  A plain '-MD' option would be understood by many
313
+## compilers, so we must ensure this comes after the gcc and icc options.
314
+pgcc)
315
+  # Portland's C compiler understands '-MD'.
316
+  # Will always output deps to 'file.d' where file is the root name of the
317
+  # source file under compilation, even if file resides in a subdirectory.
318
+  # The object file name does not affect the name of the '.d' file.
319
+  # pgcc 10.2 will output
304 320
   #    foo.o: sub/foo.c sub/foo.h
305
-  # and will wrap long lines using '\':
321
+  # and will wrap long lines using '\' :
306 322
   #    foo.o: sub/foo.c ... \
307 323
   #     sub/foo.h ... \
308 324
   #     ...
309
-  # tcc 0.9.26 (FIXME still under development at the moment of writing)
310
-  # will emit a similar output, but also prepend the continuation lines
311
-  # with horizontal tabulation characters.
312
-  "$@" -MD -MF "$tmpdepfile"
313
-  stat=$?
314
-  if test $stat -eq 0; then :
315
-  else
325
+  set_dir_from "$object"
326
+  # Use the source, not the object, to determine the base name, since
327
+  # that's sadly what pgcc will do too.
328
+  set_base_from "$source"
329
+  tmpdepfile=$base.d
330
+
331
+  # For projects that build the same source file twice into different object
332
+  # files, the pgcc approach of using the *source* file root name can cause
333
+  # problems in parallel builds.  Use a locking strategy to avoid stomping on
334
+  # the same $tmpdepfile.
335
+  lockdir=$base.d-lock
336
+  trap "
337
+    echo '$0: caught signal, cleaning up...' >&2
338
+    rmdir '$lockdir'
339
+    exit 1
340
+  " 1 2 13 15
341
+  numtries=100
342
+  i=$numtries
343
+  while test $i -gt 0; do
344
+    # mkdir is a portable test-and-set.
345
+    if mkdir "$lockdir" 2>/dev/null; then
346
+      # This process acquired the lock.
347
+      "$@" -MD
348
+      stat=$?
349
+      # Release the lock.
350
+      rmdir "$lockdir"
351
+      break
352
+    else
353
+      # If the lock is being held by a different process, wait
354
+      # until the winning process is done or we timeout.
355
+      while test -d "$lockdir" && test $i -gt 0; do
356
+        sleep 1
357
+        i=`expr $i - 1`
358
+      done
359
+    fi
360
+    i=`expr $i - 1`
361
+  done
362
+  trap - 1 2 13 15
363
+  if test $i -le 0; then
364
+    echo "$0: failed to acquire lock after $numtries attempts" >&2
365
+    echo "$0: check lockdir '$lockdir'" >&2
366
+    exit 1
367
+  fi
368
+
369
+  if test $stat -ne 0; then
316 370
     rm -f "$tmpdepfile"
317 371
     exit $stat
318 372
   fi
319 373
   rm -f "$depfile"
320
-  # Each line is of the form 'foo.o: dependent.h',
321
-  # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
374
+  # Each line is of the form `foo.o: dependent.h',
375
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
322 376
   # Do two passes, one to just change these to
323
-  # '$object: dependent.h' and one to simply 'dependent.h:'.
324
-  sed -e "s/^[ $tab][ $tab]*/  /" -e "s,^[^:]*:,$object :," \
325
-    < "$tmpdepfile" > "$depfile"
326
-  sed '
327
-    s/[ '"$tab"'][ '"$tab"']*/ /g
328
-    s/^ *//
329
-    s/ *\\*$//
330
-    s/^[^:]*: *//
331
-    /^$/d
332
-    /:$/d
333
-    s/$/ :/
334
-  ' < "$tmpdepfile" >> "$depfile"
377
+  # `$object: dependent.h' and one to simply `dependent.h:'.
378
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
379
+  # Some versions of the HPUX 10.20 sed can't process this invocation
380
+  # correctly.  Breaking it into two sed invocations is a workaround.
381
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
382
+    | sed -e 's/$/ :/' >> "$depfile"
335 383
   rm -f "$tmpdepfile"
336 384
   ;;
337 385
 
... ...
@@ -342,9 +439,8 @@ hp2)
342 342
   # 'foo.d', which lands next to the object file, wherever that
343 343
   # happens to be.
344 344
   # Much of this is similar to the tru64 case; see comments there.
345
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
346
-  test "x$dir" = "x$object" && dir=
347
-  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
345
+  set_dir_from  "$object"
346
+  set_base_from "$object"
348 347
   if test "$libtool" = yes; then
349 348
     tmpdepfile1=$dir$base.d
350 349
     tmpdepfile2=$dir.libs/$base.d
... ...
@@ -355,8 +451,7 @@ hp2)
355 355
     "$@" +Maked
356 356
   fi
357 357
   stat=$?
358
-  if test $stat -eq 0; then :
359
-  else
358
+  if test $stat -ne 0; then
360 359
      rm -f "$tmpdepfile1" "$tmpdepfile2"
361 360
      exit $stat
362 361
   fi
... ...
@@ -366,76 +461,61 @@ hp2)
366 366
     test -f "$tmpdepfile" && break
367 367
   done
368 368
   if test -f "$tmpdepfile"; then
369
-    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
369
+    sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
370 370
     # Add 'dependent.h:' lines.
371 371
     sed -ne '2,${
372
-	       s/^ *//
373
-	       s/ \\*$//
374
-	       s/$/:/
375
-	       p
376
-	     }' "$tmpdepfile" >> "$depfile"
372
+               s/^ *//
373
+               s/ \\*$//
374
+               s/$/:/
375
+               p
376
+             }' "$tmpdepfile" >> "$depfile"
377 377
   else
378
-    echo "#dummy" > "$depfile"
378
+    make_dummy_depfile
379 379
   fi
380 380
   rm -f "$tmpdepfile" "$tmpdepfile2"
381 381
   ;;
382 382
 
383 383
 tru64)
384
-   # The Tru64 compiler uses -MD to generate dependencies as a side
385
-   # effect.  'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
386
-   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
387
-   # dependencies in 'foo.d' instead, so we check for that too.
388
-   # Subdirectories are respected.
389
-   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
390
-   test "x$dir" = "x$object" && dir=
391
-   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
392
-
393
-   if test "$libtool" = yes; then
394
-      # With Tru64 cc, shared objects can also be used to make a
395
-      # static library.  This mechanism is used in libtool 1.4 series to
396
-      # handle both shared and static libraries in a single compilation.
397
-      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
398
-      #
399
-      # With libtool 1.5 this exception was removed, and libtool now
400
-      # generates 2 separate objects for the 2 libraries.  These two
401
-      # compilations output dependencies in $dir.libs/$base.o.d and
402
-      # in $dir$base.o.d.  We have to check for both files, because
403
-      # one of the two compilations can be disabled.  We should prefer
404
-      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
405
-      # automatically cleaned when .libs/ is deleted, while ignoring
406
-      # the former would cause a distcleancheck panic.
407
-      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
408
-      tmpdepfile2=$dir$base.o.d          # libtool 1.5
409
-      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
410
-      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
411
-      "$@" -Wc,-MD
412
-   else
413
-      tmpdepfile1=$dir$base.o.d
414
-      tmpdepfile2=$dir$base.d
415
-      tmpdepfile3=$dir$base.d
416
-      tmpdepfile4=$dir$base.d
417
-      "$@" -MD
418
-   fi
419
-
420
-   stat=$?
421
-   if test $stat -eq 0; then :
422
-   else
423
-      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
424
-      exit $stat
425
-   fi
426
-
427
-   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
428
-   do
429
-     test -f "$tmpdepfile" && break
430
-   done
431
-   if test -f "$tmpdepfile"; then
432
-      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
433
-      sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
434
-   else
435
-      echo "#dummy" > "$depfile"
436
-   fi
437
-   rm -f "$tmpdepfile"
438
-   ;;
384
+  # The Tru64 compiler uses -MD to generate dependencies as a side
385
+  # effect.  'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
386
+  # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
387
+  # dependencies in 'foo.d' instead, so we check for that too.
388
+  # Subdirectories are respected.
389
+  set_dir_from  "$object"
390
+  set_base_from "$object"
391
+
392
+  if test "$libtool" = yes; then
393
+    # Libtool generates 2 separate objects for the 2 libraries.  These
394
+    # two compilations output dependencies in $dir.libs/$base.o.d and
395
+    # in $dir$base.o.d.  We have to check for both files, because
396
+    # one of the two compilations can be disabled.  We should prefer
397
+    # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
398
+    # automatically cleaned when .libs/ is deleted, while ignoring
399
+    # the former would cause a distcleancheck panic.
400
+    tmpdepfile1=$dir$base.o.d          # libtool 1.5
401
+    tmpdepfile2=$dir.libs/$base.o.d    # Likewise.
402
+    tmpdepfile3=$dir.libs/$base.d      # Compaq CCC V6.2-504
403
+    "$@" -Wc,-MD
404
+  else
405
+    tmpdepfile1=$dir$base.d
406
+    tmpdepfile2=$dir$base.d
407
+    tmpdepfile3=$dir$base.d
408
+    "$@" -MD
409
+  fi
410
+
411
+  stat=$?
412
+  if test $stat -ne 0; then
413
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
414
+    exit $stat
415
+  fi
416
+
417
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
418
+  do
419
+    test -f "$tmpdepfile" && break
420
+  done
421
+  # Same post-processing that is required for AIX mode.
422
+  aix_post_process_depfile
423
+  ;;
439 424
 
440 425
 msvc7)
441 426
   if test "$libtool" = yes; then
... ...
@@ -446,8 +526,7 @@ msvc7)
446 446
   "$@" $showIncludes > "$tmpdepfile"
447 447
   stat=$?
448 448
   grep -v '^Note: including file: ' "$tmpdepfile"
449
-  if test "$stat" = 0; then :
450
-  else
449
+  if test $stat -ne 0; then
451 450
     rm -f "$tmpdepfile"
452 451
     exit $stat
453 452
   fi
... ...
@@ -473,6 +552,7 @@ $ {
473 473
   G
474 474
   p
475 475
 }' >> "$depfile"
476
+  echo >> "$depfile" # make sure the fragment doesn't end with a backslash
476 477
   rm -f "$tmpdepfile"
477 478
   ;;
478 479
 
... ...
@@ -524,13 +604,14 @@ dashmstdout)
524 524
   # in the target name.  This is to cope with DOS-style filenames:
525 525
   # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
526 526
   "$@" $dashmflag |
527
-    sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
527
+    sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
528 528
   rm -f "$depfile"
529 529
   cat < "$tmpdepfile" > "$depfile"
530
-  tr ' ' "$nl" < "$tmpdepfile" | \
531
-## Some versions of the HPUX 10.20 sed can't process this invocation
532
-## correctly.  Breaking it into two sed invocations is a workaround.
533
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
530
+  # Some versions of the HPUX 10.20 sed can't process this sed invocation
531
+  # correctly.  Breaking it into two sed invocations is a workaround.
532
+  tr ' ' "$nl" < "$tmpdepfile" \
533
+    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
534
+    | sed -e 's/$/ :/' >> "$depfile"
534 535
   rm -f "$tmpdepfile"
535 536
   ;;
536 537
 
... ...
@@ -583,10 +664,12 @@ makedepend)
583 583
   # makedepend may prepend the VPATH from the source file name to the object.
584 584
   # No need to regex-escape $object, excess matching of '.' is harmless.
585 585
   sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
586
-  sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
587
-## Some versions of the HPUX 10.20 sed can't process this invocation
588
-## correctly.  Breaking it into two sed invocations is a workaround.
589
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
586
+  # Some versions of the HPUX 10.20 sed can't process the last invocation
587
+  # correctly.  Breaking it into two sed invocations is a workaround.
588
+  sed '1,2d' "$tmpdepfile" \
589
+    | tr ' ' "$nl" \
590
+    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
591
+    | sed -e 's/$/ :/' >> "$depfile"
590 592
   rm -f "$tmpdepfile" "$tmpdepfile".bak
591 593
   ;;
592 594
 
... ...
@@ -622,10 +705,10 @@ cpp)
622 622
     esac
623 623
   done
624 624
 
625
-  "$@" -E |
626
-    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
627
-       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
628
-    sed '$ s: \\$::' > "$tmpdepfile"
625
+  "$@" -E \
626
+    | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
627
+             -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
628
+    | sed '$ s: \\$::' > "$tmpdepfile"
629 629
   rm -f "$depfile"
630 630
   echo "$object : \\" > "$depfile"
631 631
   cat < "$tmpdepfile" >> "$depfile"
... ...
@@ -657,15 +740,15 @@ msvisualcpp)
657 657
       shift
658 658
       ;;
659 659
     "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
660
-	set fnord "$@"
661
-	shift
662
-	shift
663
-	;;
660
+        set fnord "$@"
661
+        shift
662
+        shift
663
+        ;;
664 664
     *)
665
-	set fnord "$@" "$arg"
666
-	shift
667
-	shift
668
-	;;
665
+        set fnord "$@" "$arg"
666
+        shift
667
+        shift
668
+        ;;
669 669
     esac
670 670
   done
671 671
   "$@" -E 2>/dev/null |
... ...
@@ -1,7 +1,7 @@
1 1
 #!/bin/sh
2 2
 # install - install a program, script, or datafile
3 3
 
4
-scriptversion=2011-01-19.21; # UTC
4
+scriptversion=2011-11-20.07; # UTC
5 5
 
6 6
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
7 7
 # later released in X11R6 (xc/config/util/install.sh) with the
... ...
@@ -35,7 +35,7 @@ scriptversion=2011-01-19.21; # UTC
35 35
 # FSF changes to this file are in the public domain.
36 36
 #
37 37
 # Calling this script install-sh is preferred over install.sh, to prevent
38
-# `make' implicit rules from creating a file called install from it
38
+# 'make' implicit rules from creating a file called install from it
39 39
 # when there is no Makefile.
40 40
 #
41 41
 # This script is compatible with the BSD install script, but was written
... ...
@@ -156,7 +156,7 @@ while test $# -ne 0; do
156 156
     -s) stripcmd=$stripprog;;
157 157
 
158 158
     -t) dst_arg=$2
159
-	# Protect names problematic for `test' and other utilities.
159
+	# Protect names problematic for 'test' and other utilities.
160 160
 	case $dst_arg in
161 161
 	  -* | [=\(\)!]) dst_arg=./$dst_arg;;
162 162
 	esac
... ...
@@ -190,7 +190,7 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
190 190
     fi
191 191
     shift # arg
192 192
     dst_arg=$arg
193
-    # Protect names problematic for `test' and other utilities.
193
+    # Protect names problematic for 'test' and other utilities.
194 194
     case $dst_arg in
195 195
       -* | [=\(\)!]) dst_arg=./$dst_arg;;
196 196
     esac
... ...
@@ -202,7 +202,7 @@ if test $# -eq 0; then
202 202
     echo "$0: no input file specified." >&2
203 203
     exit 1
204 204
   fi
205
-  # It's OK to call `install-sh -d' without argument.
205
+  # It's OK to call 'install-sh -d' without argument.
206 206
   # This can happen when creating conditional directories.
207 207
   exit 0
208 208
 fi
... ...
@@ -240,7 +240,7 @@ fi
240 240
 
241 241
 for src
242 242
 do
243
-  # Protect names problematic for `test' and other utilities.
243
+  # Protect names problematic for 'test' and other utilities.
244 244
   case $src in
245 245
     -* | [=\(\)!]) src=./$src;;
246 246
   esac
... ...
@@ -354,7 +354,7 @@ do
354 354
 	      if test -z "$dir_arg" || {
355 355
 		   # Check for POSIX incompatibilities with -m.
356 356
 		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
357
-		   # other-writeable bit of parent directory when it shouldn't.
357
+		   # other-writable bit of parent directory when it shouldn't.
358 358
 		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
359 359
 		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
360 360
 		   case $ls_ld_tmpdir in
... ...
@@ -70,7 +70,7 @@
70 70
 #         compiler:		$LTCC
71 71
 #         compiler flags:		$LTCFLAGS
72 72
 #         linker:		$LD (gnu? $with_gnu_ld)
73
-#         $progname:	(GNU libtool) 2.4.2 Debian-2.4.2-1.1
73
+#         $progname:	(GNU libtool) 2.4.2
74 74
 #         automake:	$automake_version
75 75
 #         autoconf:	$autoconf_version
76 76
 #
... ...
@@ -80,7 +80,7 @@
80 80
 
81 81
 PROGRAM=libtool
82 82
 PACKAGE=libtool
83
-VERSION="2.4.2 Debian-2.4.2-1.1"
83
+VERSION=2.4.2
84 84
 TIMESTAMP=""
85 85
 package_revision=1.3337
86 86
 
... ...
@@ -1375,6 +1375,21 @@ func_replace_sysroot ()
1375 1375
 func_infer_tag ()
1376 1376
 {
1377 1377
     $opt_debug
1378
+
1379
+    # FreeBSD-specific: where we install compilers with non-standard names
1380
+    tag_compilers_CC="*cc cc* *gcc gcc* clang*"
1381
+    tag_compilers_CXX="*c++ c++* *g++ g++* clang++*"
1382
+    base_compiler=`set -- "$@"; echo $1`
1383
+
1384
+    # If $tagname isn't set, then try to infer if the default "CC" tag applies
1385
+    if test -z "$tagname"; then
1386
+      for zp in $tag_compilers_CC; do
1387
+        case $base_compiler in
1388
+	 $zp) tagname="CC"; break;;
1389
+	esac
1390
+      done
1391
+    fi
1392
+
1378 1393
     if test -n "$available_tags" && test -z "$tagname"; then
1379 1394
       CC_quoted=
1380 1395
       for arg in $CC; do
... ...
@@ -1411,7 +1426,22 @@ func_infer_tag ()
1411 1411
 	      break
1412 1412
 	      ;;
1413 1413
 	    esac
1414
-	  fi
1414
+
1415
+	    # FreeBSD-specific: try compilers based on inferred tag
1416
+	    if test -z "$tagname"; then
1417
+	      eval "tag_compilers=\$tag_compilers_${z}"
1418
+	      if test -n "$tag_compilers"; then
1419
+		for zp in $tag_compilers; do
1420
+		  case $base_compiler in   
1421
+		    $zp) tagname=$z; break;;
1422
+		  esac
1423
+		done
1424
+		if test -n "$tagname"; then
1425
+		  break
1426
+		fi
1427
+	      fi
1428
+            fi
1429
+          fi
1415 1430
 	done
1416 1431
 	# If $tagname still isn't set, then no tagged configuration
1417 1432
 	# was found and let the user know that the "--tag" command
... ...
@@ -3517,6 +3547,9 @@ static const void *lt_preloaded_setup() {
3517 3517
 	  ;;
3518 3518
 	esac
3519 3519
 	;;
3520
+      *-*-freebsd*)
3521
+	# FreeBSD doesn't need this...
3522
+	;;
3520 3523
       *)
3521 3524
 	func_fatal_error "unknown suffix for \`$my_dlsyms'"
3522 3525
 	;;
... ...
@@ -5595,6 +5628,7 @@ func_mode_link ()
5595 5595
 	  esac
5596 5596
 	  ;;
5597 5597
 	esac
5598
+	deplibs="$deplibs $arg"
5598 5599
 	continue
5599 5600
 	;;
5600 5601
 
... ...
@@ -6124,10 +6158,7 @@ func_mode_link ()
6124 6124
 	case $pass in
6125 6125
 	dlopen) libs="$dlfiles" ;;
6126 6126
 	dlpreopen) libs="$dlprefiles" ;;
6127
-	link)
6128
-	  libs="$deplibs %DEPLIBS%"
6129
-	  test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
6130
-	  ;;
6127
+	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
6131 6128
 	esac
6132 6129
       fi
6133 6130
       if test "$linkmode,$pass" = "lib,dlpreopen"; then
... ...
@@ -6170,13 +6201,30 @@ func_mode_link ()
6170 6170
 	    finalize_deplibs="$deplib $finalize_deplibs"
6171 6171
 	  else
6172 6172
 	    func_append compiler_flags " $deplib"
6173
-	    if test "$linkmode" = lib ; then
6174
-		case "$new_inherited_linker_flags " in
6175
-		    *" $deplib "*) ;;
6176
-		    * ) func_append new_inherited_linker_flags " $deplib" ;;
6177
-		esac
6178
-	    fi
6179 6173
 	  fi
6174
+
6175
+	  case $linkmode in
6176
+	  lib)
6177
+	    deplibs="$deplib $deplibs"
6178
+	    test "$pass" = conv && continue
6179
+	    newdependency_libs="$deplib $newdependency_libs"
6180
+	    ;;
6181
+	  prog)
6182
+	    if test "$pass" = conv; then
6183
+	      deplibs="$deplib $deplibs"
6184
+	      continue
6185
+	    fi
6186
+	    if test "$pass" = scan; then
6187
+	      deplibs="$deplib $deplibs"
6188
+	    else
6189
+	      compile_deplibs="$deplib $compile_deplibs"
6190
+	      finalize_deplibs="$deplib $finalize_deplibs"
6191
+	    fi
6192
+	    ;;
6193
+	  *)
6194
+	    ;;
6195
+	  esac # linkmode
6196
+
6180 6197
 	  continue
6181 6198
 	  ;;
6182 6199
 	-l*)
... ...
@@ -6447,19 +6495,19 @@ func_mode_link ()
6447 6447
 	    # It is a libtool convenience library, so add in its objects.
6448 6448
 	    func_append convenience " $ladir/$objdir/$old_library"
6449 6449
 	    func_append old_convenience " $ladir/$objdir/$old_library"
6450
-	    tmp_libs=
6451
-	    for deplib in $dependency_libs; do
6452
-	      deplibs="$deplib $deplibs"
6453
-	      if $opt_preserve_dup_deps ; then
6454
-		case "$tmp_libs " in
6455
-		*" $deplib "*) func_append specialdeplibs " $deplib" ;;
6456
-		esac
6457
-	      fi
6458
-	      func_append tmp_libs " $deplib"
6459
-	    done
6460 6450
 	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
6461 6451
 	    func_fatal_error "\`$lib' is not a convenience library"
6462 6452
 	  fi
6453
+	  tmp_libs=
6454
+	  for deplib in $dependency_libs; do
6455
+	    deplibs="$deplib $deplibs"
6456
+	    if $opt_preserve_dup_deps ; then
6457
+	      case "$tmp_libs " in
6458
+	      *" $deplib "*) func_append specialdeplibs " $deplib" ;;
6459
+	      esac
6460
+	    fi
6461
+	    func_append tmp_libs " $deplib"
6462
+	  done
6463 6463
 	  continue
6464 6464
 	fi # $pass = conv
6465 6465
 
... ...
@@ -7352,9 +7400,6 @@ func_mode_link ()
7352 7352
 	    revision="$number_minor"
7353 7353
 	    lt_irix_increment=no
7354 7354
 	    ;;
7355
-	  *)
7356
-	    func_fatal_configuration "$modename: unknown library version type \`$version_type'"
7357
-	    ;;
7358 7355
 	  esac
7359 7356
 	  ;;
7360 7357
 	no)
... ...
@@ -1,11 +1,10 @@
1 1
 #! /bin/sh
2
-# Common stub for a few missing GNU programs while installing.
2
+# Common wrapper for a few potentially missing GNU programs.
3 3
 
4
-scriptversion=2012-01-06.13; # UTC
4
+scriptversion=2012-06-26.16; # UTC
5 5
 
6
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
7
-# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
8
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
6
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
7
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
9 8
 
10 9
 # This program is free software; you can redistribute it and/or modify
11 10
 # it under the terms of the GNU General Public License as published by
... ...
@@ -26,68 +25,40 @@ scriptversion=2012-01-06.13; # UTC
26 26
 # the same distribution terms that you use for the rest of that program.
27 27
 
28 28
 if test $# -eq 0; then
29
-  echo 1>&2 "Try \`$0 --help' for more information"
29
+  echo 1>&2 "Try '$0 --help' for more information"
30 30
   exit 1
31 31
 fi
32 32
 
33
-run=:
34
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
35
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
36
-
37
-# In the cases where this matters, `missing' is being run in the
38
-# srcdir already.
39
-if test -f configure.ac; then
40
-  configure_ac=configure.ac
41
-else
42
-  configure_ac=configure.in
43
-fi
33
+case $1 in
44 34
 
45
-msg="missing on your system"
35
+  --is-lightweight)
36
+    # Used by our autoconf macros to check whether the available missing
37
+    # script is modern enough.
38
+    exit 0
39
+    ;;
46 40
 
47
-case $1 in
48
-  # Try to run requested program, and just exit if it succeeds.
49
-  run=
50
-  shift
51
-  "$@" && exit 0
52
-  # Exit code 63 means version mismatch.  This often happens
53
-  # when the user try to use an ancient version of a tool on
54
-  # a file that requires a minimum version.  In this case we
55
-  # we should proceed has if the program had been absent, or
56
-  # if --run hadn't been passed.
57
-  if test $? = 63; then
58
-    run=:
59
-    msg="probably too old"
60
-  fi
61
-  ;;
41
+  --run)
42
+    # Back-compat with the calling convention used by older automake.
43
+    shift
44
+    ;;
62 45
 
63 46
   -h|--h|--he|--hel|--help)
64 47
     echo "\
65 48
 $0 [OPTION]... PROGRAM [ARGUMENT]...
66 49
 
67
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
68
-error status if there is no known handling for PROGRAM.
50
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
51
+to PROGRAM being missing or too old.
69 52
 
70 53
 Options:
71 54
   -h, --help      display this help and exit
72 55
   -v, --version   output version information and exit
73
-  --run           try to run the given command, and emulate it if it fails
74 56
 
75 57
 Supported PROGRAM values:
76
-  aclocal      touch file \`aclocal.m4'
77
-  autoconf     touch file \`configure'
78
-  autoheader   touch file \`config.h.in'
79
-  autom4te     touch the output file, or create a stub one
80
-  automake     touch all \`Makefile.in' files
81
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
82
-  flex         create \`lex.yy.c', if possible, from existing .c
83
-  help2man     touch the output file
84
-  lex          create \`lex.yy.c', if possible, from existing .c
85
-  makeinfo     touch the output file
86
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
58
+  aclocal   autoconf  autoheader   autom4te  automake  makeinfo
59
+  bison     yacc      flex         lex       help2man
87 60
 
88
-Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
89
-\`g' are ignored when checking the name.
61
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
62
+'g' are ignored when checking the name.
90 63
 
91 64
 Send bug reports to <bug-automake@gnu.org>."
92 65
     exit $?
... ...
@@ -99,228 +70,141 @@ Send bug reports to <bug-automake@gnu.org>."
99 99
     ;;
100 100
 
101 101
   -*)
102
-    echo 1>&2 "$0: Unknown \`$1' option"
103
-    echo 1>&2 "Try \`$0 --help' for more information"
102
+    echo 1>&2 "$0: unknown '$1' option"
103
+    echo 1>&2 "Try '$0 --help' for more information"
104 104
     exit 1
105 105
     ;;
106 106
 
107 107
 esac
108 108
 
109
-# normalize program name to check for.
110
-program=`echo "$1" | sed '
111
-  s/^gnu-//; t
112
-  s/^gnu//; t
113
-  s/^g//; t'`
114
-
115
-# Now exit if we have it, but it failed.  Also exit now if we
116
-# don't have it and --version was passed (most likely to detect
117
-# the program).  This is about non-GNU programs, so use $1 not
118
-# $program.
119
-case $1 in
120
-  lex*|yacc*)
121
-    # Not GNU programs, they don't have --version.
122
-    ;;
123
-
124
-  *)
125
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
126
-       # We have it, but it failed.
127
-       exit 1
128
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
129
-       # Could not run --version or --help.  This is probably someone
130
-       # running `$TOOL --version' or `$TOOL --help' to check whether
131
-       # $TOOL exists and not knowing $TOOL uses missing.
132
-       exit 1
133
-    fi
134
-    ;;
135
-esac
136
-
137
-# If it does not exist, or fails to run (possibly an outdated version),
138
-# try to emulate it.
139
-case $program in
140
-  aclocal*)
141
-    echo 1>&2 "\
142
-WARNING: \`$1' is $msg.  You should only need it if
143
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
144
-         to install the \`Automake' and \`Perl' packages.  Grab them from
145
-         any GNU archive site."
146
-    touch aclocal.m4
147
-    ;;
148
-
149
-  autoconf*)
150
-    echo 1>&2 "\
151
-WARNING: \`$1' is $msg.  You should only need it if
152
-         you modified \`${configure_ac}'.  You might want to install the
153
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
154
-         archive site."
155
-    touch configure
156
-    ;;
157
-
158
-  autoheader*)
159
-    echo 1>&2 "\
160
-WARNING: \`$1' is $msg.  You should only need it if
161
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
162
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
163
-         from any GNU archive site."
164
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
165
-    test -z "$files" && files="config.h"
166
-    touch_files=
167
-    for f in $files; do
168
-      case $f in
169
-      *:*) touch_files="$touch_files "`echo "$f" |
170
-				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
171
-      *) touch_files="$touch_files $f.in";;
172
-      esac
173
-    done
174
-    touch $touch_files
175
-    ;;
176
-
177
-  automake*)
178
-    echo 1>&2 "\
179
-WARNING: \`$1' is $msg.  You should only need it if
180
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
181
-         You might want to install the \`Automake' and \`Perl' packages.
182
-         Grab them from any GNU archive site."
183
-    find . -type f -name Makefile.am -print |
184
-	   sed 's/\.am$/.in/' |
185
-	   while read f; do touch "$f"; done
186
-    ;;
187
-
188
-  autom4te*)
189
-    echo 1>&2 "\
190
-WARNING: \`$1' is needed, but is $msg.
191
-         You might have modified some files without having the
192
-         proper tools for further handling them.
193
-         You can get \`$1' as part of \`Autoconf' from any GNU
194
-         archive site."
195
-
196
-    file=`echo "$*" | sed -n "$sed_output"`
197
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
198
-    if test -f "$file"; then
199
-	touch $file
200
-    else
201
-	test -z "$file" || exec >$file
202
-	echo "#! /bin/sh"
203
-	echo "# Created by GNU Automake missing as a replacement of"
204
-	echo "#  $ $@"
205
-	echo "exit 0"
206
-	chmod +x $file
207
-	exit 1
208
-    fi
209
-    ;;
210
-
211
-  bison*|yacc*)
212
-    echo 1>&2 "\
213
-WARNING: \`$1' $msg.  You should only need it if
214
-         you modified a \`.y' file.  You may need the \`Bison' package
215
-         in order for those modifications to take effect.  You can get
216
-         \`Bison' from any GNU archive site."
217
-    rm -f y.tab.c y.tab.h
218
-    if test $# -ne 1; then
219
-        eval LASTARG=\${$#}
220
-	case $LASTARG in
221
-	*.y)
222
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
223
-	    if test -f "$SRCFILE"; then
224
-	         cp "$SRCFILE" y.tab.c
225
-	    fi
226
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
227
-	    if test -f "$SRCFILE"; then
228
-	         cp "$SRCFILE" y.tab.h
229
-	    fi
230
-	  ;;
231
-	esac
232
-    fi
233
-    if test ! -f y.tab.h; then
234
-	echo >y.tab.h
235
-    fi
236
-    if test ! -f y.tab.c; then
237
-	echo 'main() { return 0; }' >y.tab.c
238
-    fi
239
-    ;;
240
-
241
-  lex*|flex*)
242
-    echo 1>&2 "\
243
-WARNING: \`$1' is $msg.  You should only need it if
244
-         you modified a \`.l' file.  You may need the \`Flex' package
245
-         in order for those modifications to take effect.  You can get
246
-         \`Flex' from any GNU archive site."
247
-    rm -f lex.yy.c
248
-    if test $# -ne 1; then
249
-        eval LASTARG=\${$#}
250
-	case $LASTARG in
251
-	*.l)
252
-	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
253
-	    if test -f "$SRCFILE"; then
254
-	         cp "$SRCFILE" lex.yy.c
255
-	    fi
256
-	  ;;
257
-	esac
258
-    fi
259
-    if test ! -f lex.yy.c; then
260
-	echo 'main() { return 0; }' >lex.yy.c
261
-    fi
262
-    ;;
263
-
264
-  help2man*)
265
-    echo 1>&2 "\
266
-WARNING: \`$1' is $msg.  You should only need it if
267
-	 you modified a dependency of a manual page.  You may need the
268
-	 \`Help2man' package in order for those modifications to take
269
-	 effect.  You can get \`Help2man' from any GNU archive site."
270
-
271
-    file=`echo "$*" | sed -n "$sed_output"`
272
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
273
-    if test -f "$file"; then
274
-	touch $file
275
-    else
276
-	test -z "$file" || exec >$file
277
-	echo ".ab help2man is required to generate this page"
278
-	exit $?
279
-    fi
280
-    ;;
281
-
282
-  makeinfo*)
283
-    echo 1>&2 "\
284
-WARNING: \`$1' is $msg.  You should only need it if
285
-         you modified a \`.texi' or \`.texinfo' file, or any other file
286
-         indirectly affecting the aspect of the manual.  The spurious
287
-         call might also be the consequence of using a buggy \`make' (AIX,
288
-         DU, IRIX).  You might want to install the \`Texinfo' package or
289
-         the \`GNU make' package.  Grab either from any GNU archive site."
290
-    # The file to touch is that specified with -o ...
291
-    file=`echo "$*" | sed -n "$sed_output"`
292
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
293
-    if test -z "$file"; then
294
-      # ... or it is the one specified with @setfilename ...
295
-      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
296
-      file=`sed -n '
297
-	/^@setfilename/{
298
-	  s/.* \([^ ]*\) *$/\1/
299
-	  p
300
-	  q
301
-	}' $infile`
302
-      # ... or it is derived from the source name (dir/f.texi becomes f.info)
303
-      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
304
-    fi
305
-    # If the file does not exist, the user really needs makeinfo;
306
-    # let's fail without touching anything.
307
-    test -f $file || exit 1
308
-    touch $file
309
-    ;;
109
+# Run the given program, remember its exit status.
110
+"$@"; st=$?
111
+
112
+# If it succeeded, we are done.
113
+test $st -eq 0 && exit 0
114
+
115
+# Also exit now if we it failed (or wasn't found), and '--version' was
116
+# passed; such an option is passed most likely to detect whether the
117
+# program is present and works.
118
+case $2 in --version|--help) exit $st;; esac
119
+
120
+# Exit code 63 means version mismatch.  This often happens when the user
121
+# tries to use an ancient version of a tool on a file that requires a
122
+# minimum version.
123
+if test $st -eq 63; then
124
+  msg="probably too old"
125
+elif test $st -eq 127; then
126
+  # Program was missing.
127
+  msg="missing on your system"
128
+else
129
+  # Program was found and executed, but failed.  Give up.
130
+  exit $st
131
+fi
310 132
 
311
-  *)
312
-    echo 1>&2 "\
313
-WARNING: \`$1' is needed, and is $msg.
314
-         You might have modified some files without having the
315
-         proper tools for further handling them.  Check the \`README' file,
316
-         it often tells you about the needed prerequisites for installing
317
-         this package.  You may also peek at any GNU archive site, in case
318
-         some other package would contain this missing \`$1' program."
319
-    exit 1
133
+perl_URL=http://www.perl.org/
134
+flex_URL=http://flex.sourceforge.net/
135
+gnu_software_URL=http://www.gnu.org/software
136
+
137
+program_details ()
138
+{
139
+  case $1 in
140
+    aclocal|automake)
141
+      echo "The '$1' program is part of the GNU Automake package:"
142
+      echo "<$gnu_software_URL/automake>"
143
+      echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
144
+      echo "<$gnu_software_URL/autoconf>"
145
+      echo "<$gnu_software_URL/m4/>"
146
+      echo "<$perl_URL>"
147
+      ;;
148
+    autoconf|autom4te|autoheader)
149
+      echo "The '$1' program is part of the GNU Autoconf package:"
150
+      echo "<$gnu_software_URL/autoconf/>"
151
+      echo "It also requires GNU m4 and Perl in order to run:"
152
+      echo "<$gnu_software_URL/m4/>"
153
+      echo "<$perl_URL>"
154
+      ;;
155
+  esac
156
+}
157
+
158
+give_advice ()
159
+{
160
+  # Normalize program name to check for.
161
+  normalized_program=`echo "$1" | sed '
162
+    s/^gnu-//; t
163
+    s/^gnu//; t
164
+    s/^g//; t'`
165
+
166
+  printf '%s\n' "'$1' is $msg."
167
+
168
+  configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
169
+  case $normalized_program in
170
+    autoconf*)
171
+      echo "You should only need it if you modified 'configure.ac',"
172
+      echo "or m4 files included by it."
173
+      program_details 'autoconf'
174
+      ;;
175
+    autoheader*)
176
+      echo "You should only need it if you modified 'acconfig.h' or"
177
+      echo "$configure_deps."
178
+      program_details 'autoheader'
179
+      ;;
180
+    automake*)
181
+      echo "You should only need it if you modified 'Makefile.am' or"
182
+      echo "$configure_deps."
183
+      program_details 'automake'
184
+      ;;
185
+    aclocal*)
186
+      echo "You should only need it if you modified 'acinclude.m4' or"
187
+      echo "$configure_deps."
188
+      program_details 'aclocal'
189
+      ;;
190
+   autom4te*)
191
+      echo "You might have modified some maintainer files that require"
192
+      echo "the 'automa4te' program to be rebuilt."
193
+      program_details 'autom4te'
194
+      ;;
195
+    bison*|yacc*)
196
+      echo "You should only need it if you modified a '.y' file."
197
+      echo "You may want to install the GNU Bison package:"
198
+      echo "<$gnu_software_URL/bison/>"
199
+      ;;
200
+    lex*|flex*)
201
+      echo "You should only need it if you modified a '.l' file."
202
+      echo "You may want to install the Fast Lexical Analyzer package:"
203
+      echo "<$flex_URL>"
204
+      ;;
205
+    help2man*)
206
+      echo "You should only need it if you modified a dependency" \
207
+           "of a man page."
208
+      echo "You may want to install the GNU Help2man package:"
209
+      echo "<$gnu_software_URL/help2man/>"
320 210
     ;;
321
-esac
322
-
323
-exit 0
211
+    makeinfo*)
212
+      echo "You should only need it if you modified a '.texi' file, or"
213
+      echo "any other file indirectly affecting the aspect of the manual."
214
+      echo "You might want to install the Texinfo package:"
215
+      echo "<$gnu_software_URL/texinfo/>"
216
+      echo "The spurious makeinfo call might also be the consequence of"
217
+      echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
218
+      echo "want to install GNU make:"
219
+      echo "<$gnu_software_URL/make/>"
220
+      ;;
221
+    *)
222
+      echo "You might have modified some files without having the proper"
223
+      echo "tools for further handling them.  Check the 'README' file, it"
224
+      echo "often tells you about the needed prerequisites for installing"
225
+      echo "this package.  You may also peek at any GNU archive site, in"
226
+      echo "case some other package contains this missing '$1' program."
227
+      ;;
228
+  esac
229
+}
230
+
231
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
232
+                       -e '2,$s/^/         /' >&2
233
+
234
+# Propagate the correct exit status (expected to be 127 for a program
235
+# not found, 63 for a program that failed due to version mismatch).
236
+exit $st
324 237
 
325 238
 # Local variables:
326 239
 # eval: (add-hook 'write-file-hooks 'time-stamp)
... ...
@@ -1,7 +1,7 @@
1 1
 #! /bin/sh
2 2
 # test-driver - basic testsuite driver script.
3 3
 
4
-scriptversion=2013-07-13.22; # UTC
4
+scriptversion=2012-06-27.10; # UTC
5 5
 
6 6
 # Copyright (C) 2011-2013 Free Software Foundation, Inc.
7 7
 #
... ...
@@ -44,12 +44,13 @@ print_usage ()
44 44
 Usage:
45 45
   test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
46 46
               [--expect-failure={yes|no}] [--color-tests={yes|no}]
47
-              [--enable-hard-errors={yes|no}] [--]
48
-              TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
47
+              [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT
49 48
 The '--test-name', '--log-file' and '--trs-file' options are mandatory.
50 49
 END
51 50
 }
52 51
 
52
+# TODO: better error handling in option parsing (in particular, ensure
53
+# TODO: $log_file, $trs_file and $test_name are defined).
53 54
 test_name= # Used for reporting.
54 55
 log_file=  # Where to save the output of the test script.
55 56
 trs_file=  # Where to save the metadata of the test run.
... ...
@@ -68,23 +69,10 @@ while test $# -gt 0; do
68 68
   --enable-hard-errors) enable_hard_errors=$2; shift;;
69 69
   --) shift; break;;
70 70
   -*) usage_error "invalid option: '$1'";;
71
-   *) break;;
72 71
   esac
73 72
   shift
74 73
 done
75 74
 
76
-missing_opts=
77
-test x"$test_name" = x && missing_opts="$missing_opts --test-name"
78
-test x"$log_file"  = x && missing_opts="$missing_opts --log-file"
79
-test x"$trs_file"  = x && missing_opts="$missing_opts --trs-file"
80
-if test x"$missing_opts" != x; then
81
-  usage_error "the following mandatory options are missing:$missing_opts"
82
-fi
83
-
84
-if test $# -eq 0; then
85
-  usage_error "missing argument"
86
-fi
87
-
88 75
 if test $color_tests = yes; then
89 76
   # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
90 77
   red='' # Red.
... ...
@@ -656,6 +656,7 @@ CLAMAV_MILTER_LIBS
656 656
 CLAMMEM_LIBS
657 657
 CLAMD_LIBS
658 658
 LIBCLAMAV_LIBS
659
+SSL_CPPFLAGS
659 660
 LIBCLAMSHARED_CPPFLAGS
660 661
 CLAMBC_CPPFLAGS
661 662
 CLAMDTOP_CPPFLAGS
... ...
@@ -668,8 +669,6 @@ CLAMD_CPPFLAGS
668 668
 CLAMDSCAN_CPPFLAGS
669 669
 CLAMSCAN_CPPFLAGS
670 670
 FRESHCLAM_CPPFLAGS
671
-XML_LIBS
672
-XML_CPPFLAGS
673 671
 CLAMSUBMIT_CFLAGS
674 672
 CLAMSUBMIT_LIBS
675 673
 subdirs
... ...
@@ -698,6 +697,8 @@ LIBBZ2
698 698
 MAINT
699 699
 MAINTAINER_MODE_FALSE
700 700
 MAINTAINER_MODE_TRUE
701
+XML_LIBS
702
+XML_CPPFLAGS
701 703
 ENABLE_COVERAGE_FALSE
702 704
 ENABLE_COVERAGE_TRUE
703 705
 GENHTML
... ...
@@ -871,6 +872,9 @@ enable_check
871 871
 enable_rpath
872 872
 with_libcheck_prefix
873 873
 enable_coverage
874
+enable_xml
875
+with_xml
876
+with_openssl
874 877
 enable_maintainer_mode
875 878
 with_zlib
876 879
 enable_zlib_vcheck
... ...
@@ -903,9 +907,6 @@ enable_distcheck_werror
903 903
 enable_llvm
904 904
 enable_sha_collector_for_internal_use
905 905
 with_libcurl
906
-enable_xml
907
-with_xml
908
-with_openssl
909 906
 '
910 907
       ac_precious_vars='build_alias
911 908
 host_alias
... ...
@@ -1554,6 +1555,7 @@ Optional Features:
1554 1554
   --enable-check           Enable 'check' unit tests (default=auto)
1555 1555
   --disable-rpath         do not hardcode runtime library paths
1556 1556
   --enable-coverage       turn on test coverage [default=no]
1557
+  --disable-xml	  disable DMG and XAR support
1557 1558
   --enable-maintainer-mode enable make rules and dependencies not useful
1558 1559
                           (and sometimes confusing) to the casual installer
1559 1560
   --disable-zlib-vcheck	  do not check for buggy zlib version
... ...
@@ -1579,7 +1581,6 @@ Optional Features:
1579 1579
                           enable warnings as error for distcheck [default=no]
1580 1580
   --enable-llvm           Enable 'llvm' JIT/verifier support [default=auto]
1581 1581
 
1582
-  --disable-xml	  disable DMG and XAR support
1583 1582
 
1584 1583
 Optional Packages:
1585 1584
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
... ...
@@ -1595,6 +1596,10 @@ Optional Packages:
1595 1595
   --with-gnu-ld           assume the C compiler uses GNU ld default=no
1596 1596
   --with-libcheck-prefix[=DIR]  search for libcheck in DIR/include and DIR/lib
1597 1597
   --without-libcheck-prefix     don't search for libcheck in includedir and libdir
1598
+  --with-xml=DIR	  path to directory containing libxml2 library (default=
1599
+			  /usr/local or /usr if not found in /usr/local)
1600
+  --with-openssl=DIR   path to directory containing openssl (default=
1601
+    /usr/local or /usr if not found in /usr/local)
1598 1602
   --with-zlib=DIR	  path to directory containing zlib library (default=
1599 1603
 			  /usr/local or /usr if not found in /usr/local)
1600 1604
   --with-libbz2-prefix[=DIR]  search for libbz2 in DIR/include and DIR/lib
... ...
@@ -1610,10 +1615,6 @@ Optional Packages:
1610 1610
   --without-libpdcurses-prefix     don't search for libpdcurses in includedir and libdir
1611 1611
   --with-libcurl=DIR   path to directory containing libcurl (default=
1612 1612
     /usr/local or /usr if not found in /usr/local)
1613
-  --with-xml=DIR	  path to directory containing libxml2 library (default=
1614
-			  /usr/local or /usr if not found in /usr/local)
1615
-  --with-openssl=DIR   path to directory containing openssl (default=
1616
-    /usr/local or /usr if not found in /usr/local)
1617 1613
 
1618 1614
 Some influential environment variables:
1619 1615
   CC          C compiler command
... ...
@@ -5866,6 +5867,10 @@ freebsd* | dragonfly*)
5866 5866
   fi
5867 5867
   ;;
5868 5868
 
5869
+gnu*)
5870
+  lt_cv_deplibs_check_method=pass_all
5871
+  ;;
5872
+
5869 5873
 haiku*)
5870 5874
   lt_cv_deplibs_check_method=pass_all
5871 5875
   ;;
... ...
@@ -5904,11 +5909,11 @@ irix5* | irix6* | nonstopux*)
5904 5904
   ;;
5905 5905
 
5906 5906
 # This must be glibc/ELF.
5907
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5907
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
5908 5908
   lt_cv_deplibs_check_method=pass_all
5909 5909
   ;;
5910 5910
 
5911
-netbsd* | netbsdelf*-gnu)
5911
+netbsd*)
5912 5912
   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5913 5913
     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5914 5914
   else
... ...
@@ -8829,7 +8834,7 @@ lt_prog_compiler_static=
8829 8829
       lt_prog_compiler_static='-non_shared'
8830 8830
       ;;
8831 8831
 
8832
-    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8832
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
8833 8833
       case $cc_basename in
8834 8834
       # old Intel for x86_64 which still supported -KPIC.
8835 8835
       ecc*)
... ...
@@ -9307,9 +9312,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
9307 9307
   openbsd*)
9308 9308
     with_gnu_ld=no
9309 9309
     ;;
9310
-  linux* | k*bsd*-gnu | gnu*)
9311
-    link_all_deplibs=no
9312
-    ;;
9313 9310
   esac
9314 9311
 
9315 9312
   ld_shlibs=yes
... ...
@@ -9531,7 +9533,7 @@ _LT_EOF
9531 9531
       fi
9532 9532
       ;;
9533 9533
 
9534
-    netbsd* | netbsdelf*-gnu)
9534
+    netbsd*)
9535 9535
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9536 9536
 	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
9537 9537
 	wlarc=
... ...
@@ -9708,7 +9710,6 @@ _LT_EOF
9708 9708
 	if test "$aix_use_runtimelinking" = yes; then
9709 9709
 	  shared_flag="$shared_flag "'${wl}-G'
9710 9710
 	fi
9711
-	link_all_deplibs=no
9712 9711
       else
9713 9712
 	# not using gcc
9714 9713
 	if test "$host_cpu" = ia64; then
... ...
@@ -10162,7 +10163,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
10162 10162
       link_all_deplibs=yes
10163 10163
       ;;
10164 10164
 
10165
-    netbsd* | netbsdelf*-gnu)
10165
+    netbsd*)
10166 10166
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
10167 10167
 	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
10168 10168
       else
... ...
@@ -10999,6 +11000,17 @@ freebsd* | dragonfly*)
10999 10999
   esac
11000 11000
   ;;
11001 11001
 
11002
+gnu*)
11003
+  version_type=linux # correct to gnu/linux during the next big refactor
11004
+  need_lib_prefix=no
11005
+  need_version=no
11006
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
11007
+  soname_spec='${libname}${release}${shared_ext}$major'
11008
+  shlibpath_var=LD_LIBRARY_PATH
11009
+  shlibpath_overrides_runpath=no
11010
+  hardcode_into_libs=yes
11011
+  ;;
11012
+
11002 11013
 haiku*)
11003 11014
   version_type=linux # correct to gnu/linux during the next big refactor
11004 11015
   need_lib_prefix=no
... ...
@@ -11115,7 +11127,7 @@ linux*oldld* | linux*aout* | linux*coff*)
11115 11115
   ;;
11116 11116
 
11117 11117
 # This must be glibc/ELF.
11118
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
11118
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
11119 11119
   version_type=linux # correct to gnu/linux during the next big refactor
11120 11120
   need_lib_prefix=no
11121 11121
   need_version=no
... ...
@@ -11179,18 +11191,6 @@ fi
11179 11179
   dynamic_linker='GNU/Linux ld.so'
11180 11180
   ;;
11181 11181
 
11182
-netbsdelf*-gnu)
11183
-  version_type=linux
11184
-  need_lib_prefix=no
11185
-  need_version=no
11186
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
11187
-  soname_spec='${libname}${release}${shared_ext}$major'
11188
-  shlibpath_var=LD_LIBRARY_PATH
11189
-  shlibpath_overrides_runpath=no
11190
-  hardcode_into_libs=yes
11191
-  dynamic_linker='NetBSD ld.elf_so'
11192
-  ;;
11193
-
11194 11182
 netbsd*)
11195 11183
   version_type=sunos
11196 11184
   need_lib_prefix=no
... ...
@@ -12771,7 +12771,7 @@ else
12771 12771
     # at 6.2 and later dlopen does load deplibs.
12772 12772
     lt_cv_sys_dlopen_deplibs=yes
12773 12773
     ;;
12774
-  netbsd* | netbsdelf*-gnu)
12774
+  netbsd*)
12775 12775
     lt_cv_sys_dlopen_deplibs=yes
12776 12776
     ;;
12777 12777
   openbsd*)
... ...
@@ -16648,6 +16648,307 @@ fi
16648 16648
 
16649 16649
 
16650 16650
 
16651
+
16652
+want_xml="auto"
16653
+# Check whether --enable-xml was given.
16654
+if test "${enable_xml+set}" = set; then :
16655
+  enableval=$enable_xml; want_xml=$enableval
16656
+else
16657
+  want_xml="auto"
16658
+fi
16659
+
16660
+
16661
+XML_HOME=""
16662
+if test "X$want_xml" != "Xno"; then
16663
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml2 installation" >&5
16664
+$as_echo_n "checking for libxml2 installation... " >&6; }
16665
+
16666
+# Check whether --with-xml was given.
16667
+if test "${with_xml+set}" = set; then :
16668
+  withval=$with_xml;
16669
+  if test "$withval"
16670
+  then
16671
+    XML_HOME="$withval"
16672
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $XML_HOME" >&5
16673
+$as_echo "using $XML_HOME" >&6; }
16674
+  else
16675
+    as_fn_error $? "cannot assign blank value to --with-xml" "$LINENO" 5
16676
+  fi
16677
+
16678
+else
16679
+
16680
+  XML_HOME=/usr/local
16681
+  if test ! -x "$XML_HOME/bin/xml2-config"
16682
+  then
16683
+    XML_HOME=/usr
16684
+    if test ! -x "$XML_HOME/bin/xml2-config"
16685
+    then
16686
+      XML_HOME=""
16687
+    fi
16688
+  fi
16689
+  if test "x$XML_HOME" != "x"; then
16690
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML_HOME" >&5
16691
+$as_echo "$XML_HOME" >&6; }
16692
+  else
16693
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16694
+$as_echo "not found" >&6; }
16695
+  fi
16696
+
16697
+fi
16698
+
16699
+fi
16700
+
16701
+found_xml="no"
16702
+XMLCONF_VERSION=""
16703
+XML_CPPFLAGS=""
16704
+XML_LIBS=""
16705
+if test "x$XML_HOME" != "x"; then
16706
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking xml2-config version" >&5
16707
+$as_echo_n "checking xml2-config version... " >&6; }
16708
+  XMLCONF_VERSION="`$XML_HOME/bin/xml2-config --version`"
16709
+  if test "x%XMLCONF_VERSION" != "x"; then
16710
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLCONF_VERSION" >&5
16711
+$as_echo "$XMLCONF_VERSION" >&6; }
16712
+    found_xml="yes"
16713
+    XML_CPPFLAGS="`$XML_HOME/bin/xml2-config --cflags`"
16714
+    XML_LIBS="`$XML_HOME/bin/xml2-config --libs`"
16715
+  else
16716
+    as_fn_error $? "xml2-config failed" "$LINENO" 5
16717
+  fi
16718
+fi
16719
+
16720
+working_xml="no"
16721
+if test "X$found_xml" != "Xno"; then
16722
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlreader.h in $XML_HOME" >&5
16723
+$as_echo_n "checking for xmlreader.h in $XML_HOME... " >&6; }
16724
+
16725
+  if test ! -f "$XML_HOME/include/libxml2/libxml/xmlreader.h"; then
16726
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16727
+$as_echo "not found" >&6; }
16728
+  else
16729
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
16730
+$as_echo "found" >&6; }
16731
+    save_LIBS="$LIBS"
16732
+    save_CPPFLAGS="$CPPFLAGS"
16733
+    CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
16734
+    save_LDFLAGS="$LDFLAGS"
16735
+    LDFLAGS="$LDFLAGS $XML_LIBS"
16736
+
16737
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlTextReaderRead in -lxml2" >&5
16738
+$as_echo_n "checking for xmlTextReaderRead in -lxml2... " >&6; }
16739
+if ${ac_cv_lib_xml2_xmlTextReaderRead+:} false; then :
16740
+  $as_echo_n "(cached) " >&6
16741
+else
16742
+  ac_check_lib_save_LIBS=$LIBS
16743
+LIBS="-lxml2  $LIBS"
16744
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16745
+/* end confdefs.h.  */
16746
+
16747
+/* Override any GCC internal prototype to avoid an error.
16748
+   Use char because int might match the return type of a GCC
16749
+   builtin and then its argument prototype would still apply.  */
16750
+#ifdef __cplusplus
16751
+extern "C"
16752
+#endif
16753
+char xmlTextReaderRead ();
16754
+int
16755
+main ()
16756
+{
16757
+return xmlTextReaderRead ();
16758
+  ;
16759
+  return 0;
16760
+}
16761
+_ACEOF
16762
+if ac_fn_c_try_link "$LINENO"; then :
16763
+  ac_cv_lib_xml2_xmlTextReaderRead=yes
16764
+else
16765
+  ac_cv_lib_xml2_xmlTextReaderRead=no
16766
+fi
16767
+rm -f core conftest.err conftest.$ac_objext \
16768
+    conftest$ac_exeext conftest.$ac_ext
16769
+LIBS=$ac_check_lib_save_LIBS
16770
+fi
16771
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlTextReaderRead" >&5
16772
+$as_echo "$ac_cv_lib_xml2_xmlTextReaderRead" >&6; }
16773
+if test "x$ac_cv_lib_xml2_xmlTextReaderRead" = xyes; then :
16774
+  working_xml="yes"
16775
+else
16776
+  working_xml="no"
16777
+fi
16778
+
16779
+
16780
+    CPPFLAGS="$save_CPPFLAGS"
16781
+    LDFLAGS="$save_LDFLAGS"
16782
+    LIBS="$save_LIBS"
16783
+  fi
16784
+fi
16785
+
16786
+if test "$working_xml" = "yes"; then
16787
+
16788
+$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
16789
+
16790
+
16791
+
16792
+  { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling and linking with libxml2 from $XML_HOME" >&5
16793
+$as_echo "$as_me: Compiling and linking with libxml2 from $XML_HOME" >&6;}
16794
+else
16795
+  if test "$want_xml" = "yes"; then
16796
+     as_fn_error $? "****** Please install libxml2 packages!" "$LINENO" 5
16797
+  else
16798
+    if test "$want_xml" != "no"; then
16799
+      { $as_echo "$as_me:${as_lineno-$LINENO}: ****** libxml2 support unavailable" >&5
16800
+$as_echo "$as_me: ****** libxml2 support unavailable" >&6;}
16801
+    fi
16802
+  fi
16803
+  XML_CPPFLAGS=""
16804
+  XML_LIBS=""
16805
+
16806
+
16807
+fi
16808
+
16809
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL installation" >&5
16810
+$as_echo_n "checking for OpenSSL installation... " >&6; }
16811
+
16812
+
16813
+# Check whether --with-openssl was given.
16814
+if test "${with_openssl+set}" = set; then :
16815
+  withval=$with_openssl;
16816
+if test "$withval"; then
16817
+    LIBSSL_HOME="$withval"
16818
+fi
16819
+
16820
+else
16821
+
16822
+LIBSSL_HOME=/usr/local
16823
+if test ! -f "$LIBSSL_HOME/include/openssl/ssl.h"
16824
+then
16825
+    LIBSSL_HOME=/usr
16826
+fi
16827
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBSSL_HOME" >&5
16828
+$as_echo "$LIBSSL_HOME" >&6; }
16829
+
16830
+fi
16831
+
16832
+
16833
+if test ! -f "$LIBSSL_HOME/include/openssl/ssl.h"
16834
+then
16835
+    as_fn_error $? "OpenSSL not found." "$LINENO" 5
16836
+fi
16837
+
16838
+SSL_LDFLAGS="-L$LIBSSL_HOME/lib -lssl -lcrypto"
16839
+SSL_CPPFLAGS="-I$LIBSSL_HOME/include"
16840
+
16841
+save_LDFLAGS="$LDFLAGS"
16842
+LDFLAGS="-L$LIBSSL_HOME/lib -lssl -lcrypto"
16843
+
16844
+have_ssl="no"
16845
+have_crypto="no"
16846
+
16847
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
16848
+$as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
16849
+if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
16850
+  $as_echo_n "(cached) " >&6
16851
+else
16852
+  ac_check_lib_save_LIBS=$LIBS
16853
+LIBS="-lssl  $LIBS"
16854
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16855
+/* end confdefs.h.  */
16856
+
16857
+/* Override any GCC internal prototype to avoid an error.
16858
+   Use char because int might match the return type of a GCC
16859
+   builtin and then its argument prototype would still apply.  */
16860
+#ifdef __cplusplus
16861
+extern "C"
16862
+#endif
16863
+char SSL_library_init ();
16864
+int
16865
+main ()
16866
+{
16867
+return SSL_library_init ();
16868
+  ;
16869
+  return 0;
16870
+}
16871
+_ACEOF
16872
+if ac_fn_c_try_link "$LINENO"; then :
16873
+  ac_cv_lib_ssl_SSL_library_init=yes
16874
+else
16875
+  ac_cv_lib_ssl_SSL_library_init=no
16876
+fi
16877
+rm -f core conftest.err conftest.$ac_objext \
16878
+    conftest$ac_exeext conftest.$ac_ext
16879
+LIBS=$ac_check_lib_save_LIBS
16880
+fi
16881
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
16882
+$as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
16883
+if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
16884
+  have_ssl="yes"
16885
+else
16886
+  as_fn_error $? "Your OpenSSL installation is misconfigured or missing" "$LINENO" 5
16887
+fi
16888
+
16889
+
16890
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_EncryptInit in -lcrypto" >&5
16891
+$as_echo_n "checking for EVP_EncryptInit in -lcrypto... " >&6; }
16892
+if ${ac_cv_lib_crypto_EVP_EncryptInit+:} false; then :
16893
+  $as_echo_n "(cached) " >&6
16894
+else
16895
+  ac_check_lib_save_LIBS=$LIBS
16896
+LIBS="-lcrypto  $LIBS"
16897
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16898
+/* end confdefs.h.  */
16899
+
16900
+/* Override any GCC internal prototype to avoid an error.
16901
+   Use char because int might match the return type of a GCC
16902
+   builtin and then its argument prototype would still apply.  */
16903
+#ifdef __cplusplus
16904
+extern "C"
16905
+#endif
16906
+char EVP_EncryptInit ();
16907
+int
16908
+main ()
16909
+{
16910
+return EVP_EncryptInit ();
16911
+  ;
16912
+  return 0;
16913
+}
16914
+_ACEOF
16915
+if ac_fn_c_try_link "$LINENO"; then :
16916
+  ac_cv_lib_crypto_EVP_EncryptInit=yes
16917
+else
16918
+  ac_cv_lib_crypto_EVP_EncryptInit=no
16919
+fi
16920
+rm -f core conftest.err conftest.$ac_objext \
16921
+    conftest$ac_exeext conftest.$ac_ext
16922
+LIBS=$ac_check_lib_save_LIBS
16923
+fi
16924
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_EncryptInit" >&5
16925
+$as_echo "$ac_cv_lib_crypto_EVP_EncryptInit" >&6; }
16926
+if test "x$ac_cv_lib_crypto_EVP_EncryptInit" = xyes; then :
16927
+  have_crypto="yes"
16928
+else
16929
+  as_fn_error $? "Your OpenSSL installation is misconfigured or missing" "$LINENO" 5
16930
+fi
16931
+
16932
+
16933
+if test "x$have_ssl" = "xyes"; then
16934
+    LIBCLAMAV_LIBS="$SSL_LDFLAGS $LIBCLAMAV_LIBS"
16935
+    CLAMSCAN_LIBS="$SSL_LDFLAGS $CLAMSCAN_LIBS"
16936
+    FRESHCLAM_LIBS="$SSL_LDFLAGS $FRESHCLAM_LIBS"
16937
+    CLAMD_LIBS="$SSL_LDFLAGS $CLAMD_LIBS"
16938
+    CLAMDSCAN_LIBS="$SSL_LDFLAGS $CLAMDSCAN_LIBS"
16939
+    SIGTOOL_LIBS="$SSL_LDFLAGS $SIGTOOL_LIBS"
16940
+
16941
+    LIBCLAMAV_CPPFLAGS="$SSL_CPPFLAGS $LIBCLAMAV_CPPFLAGS"
16942
+    CLAMSCAN_CPPFLAGS="$SSL_CPPFLAGS $CLAMSCAN_CPPFLAGS"
16943
+    FRESHCLAM_CPPFLAGS="$SSL_CPPFLAGS $FRESHCLAM_CPPFLAGS"
16944
+    CLAMD_CPPFLAGS="$SSL_CPPFLAGS $CLAMD_CPPFLAGS"
16945
+    CLAMDSCAN_CPPFLAGS="$SSL_CPPFLAGS $CLAMDSCAN_CPPFLAGS"
16946
+    SIGTOOL_CPPFLAGS="$SSL_CPPFLAGS $SIGTOOL_CPPFLAGS"
16947
+fi
16948
+
16949
+LDFLAGS="$save_LDFLAGS"
16950
+
16951
+
16651 16952
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
16652 16953
 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
16653 16954
     # Check whether --enable-maintainer-mode was given.
... ...
@@ -21841,287 +22142,6 @@ fi
21841 21841
 
21842 21842
 
21843 21843
 
21844
-want_xml="auto"
21845
-# Check whether --enable-xml was given.
21846
-if test "${enable_xml+set}" = set; then :
21847
-  enableval=$enable_xml; want_xml=$enableval
21848
-else
21849
-  want_xml="auto"
21850
-fi
21851
-
21852
-
21853
-XML_HOME=""
21854
-if test "X$want_xml" != "Xno"; then
21855
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml2 installation" >&5
21856
-$as_echo_n "checking for libxml2 installation... " >&6; }
21857
-
21858
-# Check whether --with-xml was given.
21859
-if test "${with_xml+set}" = set; then :
21860
-  withval=$with_xml;
21861
-  if test "$withval"
21862
-  then
21863
-    XML_HOME="$withval"
21864
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $XML_HOME" >&5
21865
-$as_echo "using $XML_HOME" >&6; }
21866
-  else
21867
-    as_fn_error $? "cannot assign blank value to --with-xml" "$LINENO" 5
21868
-  fi
21869
-
21870
-else
21871
-
21872
-  XML_HOME=/usr/local
21873
-  if test ! -x "$XML_HOME/bin/xml2-config"
21874
-  then
21875
-    XML_HOME=/usr
21876
-    if test ! -x "$XML_HOME/bin/xml2-config"
21877
-    then
21878
-      XML_HOME=""
21879
-    fi
21880
-  fi
21881
-  if test "x$XML_HOME" != "x"; then
21882
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML_HOME" >&5
21883
-$as_echo "$XML_HOME" >&6; }
21884
-  else
21885
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21886
-$as_echo "not found" >&6; }
21887
-  fi
21888
-
21889
-fi
21890
-
21891
-fi
21892
-
21893
-found_xml="no"
21894
-XMLCONF_VERSION=""
21895
-XML_CPPFLAGS=""
21896
-XML_LIBS=""
21897
-if test "x$XML_HOME" != "x"; then
21898
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking xml2-config version" >&5
21899
-$as_echo_n "checking xml2-config version... " >&6; }
21900
-  XMLCONF_VERSION="`$XML_HOME/bin/xml2-config --version`"
21901
-  if test "x%XMLCONF_VERSION" != "x"; then
21902
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLCONF_VERSION" >&5
21903
-$as_echo "$XMLCONF_VERSION" >&6; }
21904
-    found_xml="yes"
21905
-    XML_CPPFLAGS="`$XML_HOME/bin/xml2-config --cflags`"
21906
-    XML_LIBS="`$XML_HOME/bin/xml2-config --libs`"
21907
-  else
21908
-    as_fn_error $? "xml2-config failed" "$LINENO" 5
21909
-  fi
21910
-fi
21911
-
21912
-working_xml="no"
21913
-if test "X$found_xml" != "Xno"; then
21914
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlreader.h in $XML_HOME" >&5
21915
-$as_echo_n "checking for xmlreader.h in $XML_HOME... " >&6; }
21916
-
21917
-  if test ! -f "$XML_HOME/include/libxml2/libxml/xmlreader.h"; then
21918
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21919
-$as_echo "not found" >&6; }
21920
-  else
21921
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
21922
-$as_echo "found" >&6; }
21923
-    save_LIBS="$LIBS"
21924
-    save_CPPFLAGS="$CPPFLAGS"
21925
-    CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
21926
-    save_LDFLAGS="$LDFLAGS"
21927
-    LDFLAGS="$LDFLAGS $XML_LIBS"
21928
-
21929
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlTextReaderRead in -lxml2" >&5
21930
-$as_echo_n "checking for xmlTextReaderRead in -lxml2... " >&6; }
21931
-if ${ac_cv_lib_xml2_xmlTextReaderRead+:} false; then :
21932
-  $as_echo_n "(cached) " >&6
21933
-else
21934
-  ac_check_lib_save_LIBS=$LIBS
21935
-LIBS="-lxml2  $LIBS"
21936
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21937
-/* end confdefs.h.  */
21938
-
21939
-/* Override any GCC internal prototype to avoid an error.
21940
-   Use char because int might match the return type of a GCC
21941
-   builtin and then its argument prototype would still apply.  */
21942
-#ifdef __cplusplus
21943
-extern "C"
21944
-#endif
21945
-char xmlTextReaderRead ();
21946
-int
21947
-main ()
21948
-{
21949
-return xmlTextReaderRead ();
21950
-  ;
21951
-  return 0;
21952
-}
21953
-_ACEOF
21954
-if ac_fn_c_try_link "$LINENO"; then :
21955
-  ac_cv_lib_xml2_xmlTextReaderRead=yes
21956
-else
21957
-  ac_cv_lib_xml2_xmlTextReaderRead=no
21958
-fi
21959
-rm -f core conftest.err conftest.$ac_objext \
21960
-    conftest$ac_exeext conftest.$ac_ext
21961
-LIBS=$ac_check_lib_save_LIBS
21962
-fi
21963
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlTextReaderRead" >&5
21964
-$as_echo "$ac_cv_lib_xml2_xmlTextReaderRead" >&6; }
21965
-if test "x$ac_cv_lib_xml2_xmlTextReaderRead" = xyes; then :
21966
-  working_xml="yes"
21967
-else
21968
-  working_xml="no"
21969
-fi
21970
-
21971
-
21972
-    CPPFLAGS="$save_CPPFLAGS"
21973
-    LDFLAGS="$save_LDFLAGS"
21974
-    LIBS="$save_LIBS"
21975
-  fi
21976
-fi
21977
-
21978
-if test "$working_xml" = "yes"; then
21979
-
21980
-$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
21981
-
21982
-
21983
-
21984
-  { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling and linking with libxml2 from $XML_HOME" >&5
21985
-$as_echo "$as_me: Compiling and linking with libxml2 from $XML_HOME" >&6;}
21986
-else
21987
-  if test "$want_xml" = "yes"; then
21988
-     as_fn_error $? "****** Please install libxml2 packages!" "$LINENO" 5
21989
-  else
21990
-    if test "$want_xml" != "no"; then
21991
-      { $as_echo "$as_me:${as_lineno-$LINENO}: ****** libxml2 support unavailable" >&5
21992
-$as_echo "$as_me: ****** libxml2 support unavailable" >&6;}
21993
-    fi
21994
-  fi
21995
-  XML_CPPFLAGS=""
21996
-  XML_LIBS=""
21997
-
21998
-
21999
-fi
22000
-
22001
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL installation" >&5
22002
-$as_echo_n "checking for OpenSSL installation... " >&6; }
22003
-
22004
-
22005
-# Check whether --with-openssl was given.
22006
-if test "${with_openssl+set}" = set; then :
22007
-  withval=$with_openssl;
22008
-if test "$withval"; then
22009
-    LIBSSL_HOME="$withval"
22010
-fi
22011
-
22012
-else
22013
-
22014
-LIBSSL_HOME=/usr/local
22015
-if test ! -f "$LIBSSL_HOME/include/openssl/ssl.h"
22016
-then
22017
-    LIBSSL_HOME=/usr
22018
-fi
22019
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBSSL_HOME" >&5
22020
-$as_echo "$LIBSSL_HOME" >&6; }
22021
-
22022
-fi
22023
-
22024
-
22025
-if test ! -f "$LIBSSL_HOME/include/openssl/ssl.h"
22026
-then
22027
-    as_fn_error $? "OpenSSL not found." "$LINENO" 5
22028
-fi
22029
-
22030
-SSL_LDFLAGS="-L$LIBSSL_HOME/lib -lssl"
22031
-SSL_CPPFLAGS="-I$LIBSSL_HOME/include"
22032
-
22033
-save_LDFLAGS="$LDFLAGS"
22034
-LDFLAGS="-L$LIBSSL_HOME/lib -lssl"
22035
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
22036
-$as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
22037
-if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
22038
-  $as_echo_n "(cached) " >&6
22039
-else
22040
-  ac_check_lib_save_LIBS=$LIBS
22041
-LIBS="-lssl  $LIBS"
22042
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22043
-/* end confdefs.h.  */
22044
-
22045
-/* Override any GCC internal prototype to avoid an error.
22046
-   Use char because int might match the return type of a GCC
22047
-   builtin and then its argument prototype would still apply.  */
22048
-#ifdef __cplusplus
22049
-extern "C"
22050
-#endif
22051
-char SSL_library_init ();
22052
-int
22053
-main ()
22054
-{
22055
-return SSL_library_init ();
22056
-  ;
22057
-  return 0;
22058
-}
22059
-_ACEOF
22060
-if ac_fn_c_try_link "$LINENO"; then :
22061
-  ac_cv_lib_ssl_SSL_library_init=yes
22062
-else
22063
-  ac_cv_lib_ssl_SSL_library_init=no
22064
-fi
22065
-rm -f core conftest.err conftest.$ac_objext \
22066
-    conftest$ac_exeext conftest.$ac_ext
22067
-LIBS=$ac_check_lib_save_LIBS
22068
-fi
22069
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
22070
-$as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
22071
-if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
22072
-  LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS $SSL_LDFLAGS";CLAMSCAN_LIBS="$CLAMSCAN_LIBS $SSL_LDFLAGS";FRESHCLAM_LIBS="$FRESHCLAM_LIBS $SSL_LDFLAGS";CLAMD_LIBS="$CLAMD_LIBS $SSL_LDFLAGS";SIGTOOL_LIBS="$SIGTOOL_LIBS $SSL_LDFLAGS"
22073
-else
22074
-  as_fn_error $? "Your OpenSSL is misconfigured" "$LINENO" 5
22075
-fi
22076
-
22077
-
22078
-LDFLAGS="-L$LIBSSL_HOME/lib -lcrypto"
22079
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_EncryptInit in -lcrypto" >&5
22080
-$as_echo_n "checking for EVP_EncryptInit in -lcrypto... " >&6; }
22081
-if ${ac_cv_lib_crypto_EVP_EncryptInit+:} false; then :
22082
-  $as_echo_n "(cached) " >&6
22083
-else
22084
-  ac_check_lib_save_LIBS=$LIBS
22085
-LIBS="-lcrypto  $LIBS"
22086
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22087
-/* end confdefs.h.  */
22088
-
22089
-/* Override any GCC internal prototype to avoid an error.
22090
-   Use char because int might match the return type of a GCC
22091
-   builtin and then its argument prototype would still apply.  */
22092
-#ifdef __cplusplus
22093
-extern "C"
22094
-#endif
22095
-char EVP_EncryptInit ();
22096
-int
22097
-main ()
22098
-{
22099
-return EVP_EncryptInit ();
22100
-  ;
22101
-  return 0;
22102
-}
22103
-_ACEOF
22104
-if ac_fn_c_try_link "$LINENO"; then :
22105
-  ac_cv_lib_crypto_EVP_EncryptInit=yes
22106
-else
22107
-  ac_cv_lib_crypto_EVP_EncryptInit=no
22108
-fi
22109
-rm -f core conftest.err conftest.$ac_objext \
22110
-    conftest$ac_exeext conftest.$ac_ext
22111
-LIBS=$ac_check_lib_save_LIBS
22112
-fi
22113
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_EncryptInit" >&5
22114
-$as_echo "$ac_cv_lib_crypto_EVP_EncryptInit" >&6; }
22115
-if test "x$ac_cv_lib_crypto_EVP_EncryptInit" = xyes; then :
22116
-  LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -lcrypto";CLAMSCAN_LIBS="$CLAMSCAN_LIBS -lcrypto";FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lcrypto";CLAMD_LIBS="$CLAMD_LIBS -lcrypto";SIGTOOL_LIBS="$SIGTOOL_LIBS $SSL_LDFLAGS"
22117
-else
22118
-  as_fn_error $? "Your OpenSSL installation is misconfigured" "$LINENO" 5
22119
-fi
22120
-
22121
-
22122
-LDFLAGS="$save_LDFLAGS"
22123
-
22124
-
22125 21844
 
22126 21845
 
22127 21846
 
... ...
@@ -76,6 +76,10 @@ m4_include([m4/reorganization/code_checks/mpool.m4])
76 76
 m4_include([m4/reorganization/code_checks/unit_tests.m4])
77 77
 m4_include([m4/reorganization/code_checks/coverage.m4])
78 78
 
79
+dnl libclamav dependencies
80
+m4_include([m4/reorganization/libs/xml.m4])
81
+m4_include([m4/reorganization/libs/openssl.m4])
82
+
79 83
 AM_MAINTAINER_MODE
80 84
 m4_include([m4/reorganization/libs/libz.m4])
81 85
 m4_include([m4/reorganization/libs/bzip.m4])
... ...
@@ -122,10 +126,6 @@ m4_include([m4/reorganization/bsd.m4])
122 122
 dnl Freshclam dependencies
123 123
 m4_include([m4/reorganization/libs/curl.m4])
124 124
 
125
-dnl libclamav dependencies
126
-m4_include([m4/reorganization/libs/xml.m4])
127
-m4_include([m4/reorganization/libs/openssl.m4])
128
-
129 125
 m4_include([m4/reorganization/substitutions.m4])
130 126
 
131 127
 AM_CONDITIONAL([ENABLE_CLAMSUBMIT], [test "$have_curl" = "yes"])
... ...
@@ -1,4 +1,4 @@
1
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
1
+# Makefile.in generated by automake 1.14 from Makefile.am.
2 2
 # @configure_input@
3 3
 
4 4
 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
... ...
@@ -120,6 +120,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
120 120
 	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
121 121
 	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
122 122
 	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
123
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
124
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
123 125
 	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
124 126
 	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
125 127
 	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
... ...
@@ -161,8 +163,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
161 161
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
162 162
 	$(top_srcdir)/m4/reorganization/bsd.m4 \
163 163
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
164
-	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
165
-	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
166 164
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
167 165
 	$(top_srcdir)/configure.ac
168 166
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
... ...
@@ -308,6 +308,7 @@ SED = @SED@
308 308
 SET_MAKE = @SET_MAKE@
309 309
 SHELL = @SHELL@
310 310
 SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
311
+SSL_CPPFLAGS = @SSL_CPPFLAGS@
311 312
 STRIP = @STRIP@
312 313
 THREAD_LIBS = @THREAD_LIBS@
313 314
 TH_SAFE = @TH_SAFE@
... ...
@@ -1,4 +1,4 @@
1
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
1
+# Makefile.in generated by automake 1.14 from Makefile.am.
2 2
 # @configure_input@
3 3
 
4 4
 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
... ...
@@ -119,6 +119,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
119 119
 	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
120 120
 	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
121 121
 	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
122
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
123
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
122 124
 	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
123 125
 	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
124 126
 	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
... ...
@@ -160,8 +162,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
160 160
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
161 161
 	$(top_srcdir)/m4/reorganization/bsd.m4 \
162 162
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
163
-	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
164
-	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
165 163
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
166 164
 	$(top_srcdir)/configure.ac
167 165
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
... ...
@@ -341,6 +341,7 @@ SED = @SED@
341 341
 SET_MAKE = @SET_MAKE@
342 342
 SHELL = @SHELL@
343 343
 SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
344
+SSL_CPPFLAGS = @SSL_CPPFLAGS@
344 345
 STRIP = @STRIP@
345 346
 THREAD_LIBS = @THREAD_LIBS@
346 347
 TH_SAFE = @TH_SAFE@
... ...
@@ -1,4 +1,4 @@
1
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
1
+# Makefile.in generated by automake 1.14 from Makefile.am.
2 2
 # @configure_input@
3 3
 
4 4
 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
... ...
@@ -121,6 +121,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
121 121
 	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
122 122
 	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
123 123
 	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
124
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
125
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
124 126
 	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
125 127
 	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
126 128
 	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
... ...
@@ -162,8 +164,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
162 162
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
163 163
 	$(top_srcdir)/m4/reorganization/bsd.m4 \
164 164
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
165
-	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
166
-	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
167 165
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
168 166
 	$(top_srcdir)/configure.ac
169 167
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
... ...
@@ -338,6 +338,7 @@ SED = @SED@
338 338
 SET_MAKE = @SET_MAKE@
339 339
 SHELL = @SHELL@
340 340
 SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
341
+SSL_CPPFLAGS = @SSL_CPPFLAGS@
341 342
 STRIP = @STRIP@
342 343
 THREAD_LIBS = @THREAD_LIBS@
343 344
 TH_SAFE = @TH_SAFE@
... ...
@@ -51,7 +51,7 @@ freshclam_SOURCES = \
51 51
 
52 52
 AM_CFLAGS=@WERR_CFLAGS@
53 53
 DEFS = @DEFS@ -DCL_NOTHREADS
54
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
54
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav @FRESHCLAM_CPPFLAGS@
55 55
 LIBS = $(top_builddir)/libclamav/libclamav.la @FRESHCLAM_LIBS@ @THREAD_LIBS@
56 56
 
57 57
 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT=freshclam$(EXEEXT)
... ...
@@ -1,4 +1,4 @@
1
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
1
+# Makefile.in generated by automake 1.14 from Makefile.am.
2 2
 # @configure_input@
3 3
 
4 4
 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
... ...
@@ -123,6 +123,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
123 123
 	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
124 124
 	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
125 125
 	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
126
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
127
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
126 128
 	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
127 129
 	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
128 130
 	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
... ...
@@ -164,8 +166,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
164 164
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
165 165
 	$(top_srcdir)/m4/reorganization/bsd.m4 \
166 166
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
167
-	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
168
-	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
169 167
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
170 168
 	$(top_srcdir)/configure.ac
171 169
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
... ...
@@ -364,6 +364,7 @@ SED = @SED@
364 364
 SET_MAKE = @SET_MAKE@
365 365
 SHELL = @SHELL@
366 366
 SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
367
+SSL_CPPFLAGS = @SSL_CPPFLAGS@
367 368
 STRIP = @STRIP@
368 369
 THREAD_LIBS = @THREAD_LIBS@
369 370
 TH_SAFE = @TH_SAFE@
... ...
@@ -464,7 +465,7 @@ freshclam_SOURCES = \
464 464
     mirman.h
465 465
 
466 466
 AM_CFLAGS = @WERR_CFLAGS@
467
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
467
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav @FRESHCLAM_CPPFLAGS@
468 468
 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = freshclam$(EXEEXT)
469 469
 CLEANFILES = *.gcda *.gcno
470 470
 all: all-am
... ...
@@ -95,7 +95,7 @@ libclamav_internal_utils_la_SOURCES=str.c\
95 95
 				    regex/utils.h
96 96
 
97 97
 libclamav_internal_utils_la_LDFLAGS=-static @LIBCLAMAV_LIBS@
98
-libclamav_internal_utils_la_CFLAGS=$(AM_CFLAGS)  -fPIC -DPIC
98
+libclamav_internal_utils_la_CFLAGS=$(AM_CFLAGS)  -fPIC -DPIC @LIBCLAMAV_CPPFLAGS@
99 99
 
100 100
 libclamav_internal_utils_nothreads_la_SOURCES=str.c\
101 101
 					conv.c \
... ...
@@ -121,7 +121,7 @@ libclamav_internal_utils_nothreads_la_SOURCES=str.c\
121 121
 				    regex/utils.h
122 122
 
123 123
 libclamav_internal_utils_nothreads_la_LDFLAGS=-static @LIBCLAMAV_LIBS@
124
-libclamav_internal_utils_nothreads_la_CFLAGS=$(AM_CFLAGS) -DCL_NOTHREADS
124
+libclamav_internal_utils_nothreads_la_CFLAGS=$(AM_CFLAGS) -DCL_NOTHREADS @LIBCLAMAV_CPPFLAGS@
125 125
 
126 126
 if ENABLE_LLVM
127 127
 LLVMLIBADD=c++/libclamavcxx.la -lstdc++ -lm
... ...
@@ -137,10 +137,10 @@ endif
137 137
 
138 138
 libclamav_nocxx_la_SOURCES = bytecode_nojit.c
139 139
 
140
-libclamav_la_LIBADD = @LIBLTDL@ $(IFACELIBADD) $(LLVMLIBADD) libclamav_internal_utils.la @LIBCLAMAV_LIBS@ @THREAD_LIBS@ @LIBM@
140
+libclamav_la_LIBADD = @LIBCLAMAV_LIBS@ @LIBLTDL@ $(IFACELIBADD) $(LLVMLIBADD) libclamav_internal_utils.la @THREAD_LIBS@ @LIBM@
141 141
 libclamav_la_DEPENDENCIES =  @LTDLDEPS@ $(IFACEDEP) $(LLVMDEP) libclamav_internal_utils.la
142
-libclamav_la_CFLAGS =$(AM_CFLAGS) $(XML_CPPFLAGS) -DSEARCH_LIBDIR=\"$(libdir)\"
143
-libclamav_la_LDFLAGS = @TH_SAFE@ $(XML_LIBS) -version-info @LIBCLAMAV_VERSION@ -no-undefined
142
+libclamav_la_CFLAGS =$(AM_CFLAGS) $(XML_CPPFLAGS) -DSEARCH_LIBDIR=\"$(libdir)\" @LIBCLAMAV_CPPFLAGS@
143
+libclamav_la_LDFLAGS = @LIBCLAMAV_LIBS@ @TH_SAFE@ $(XML_LIBS) -version-info @LIBCLAMAV_VERSION@ -no-undefined
144 144
 
145 145
 if VERSIONSCRIPT
146 146
 libclamav_la_LDFLAGS += -Wl,@VERSIONSCRIPTFLAG@,@top_srcdir@/libclamav/libclamav.map
... ...
@@ -1,4 +1,4 @@
1
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
1
+# Makefile.in generated by automake 1.14 from Makefile.am.
2 2
 # @configure_input@
3 3
 
4 4
 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
... ...
@@ -132,6 +132,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
132 132
 	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
133 133
 	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
134 134
 	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
135
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
136
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
135 137
 	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
136 138
 	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
137 139
 	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
... ...
@@ -173,8 +175,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
173 173
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
174 174
 	$(top_srcdir)/m4/reorganization/bsd.m4 \
175 175
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
176
-	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
177
-	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
178 176
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
179 177
 	$(top_srcdir)/configure.ac
180 178
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
... ...
@@ -640,6 +640,7 @@ SED = @SED@
640 640
 SET_MAKE = @SET_MAKE@
641 641
 SHELL = @SHELL@
642 642
 SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
643
+SSL_CPPFLAGS = @SSL_CPPFLAGS@
643 644
 STRIP = @STRIP@
644 645
 THREAD_LIBS = @THREAD_LIBS@
645 646
 TH_SAFE = @TH_SAFE@
... ...
@@ -775,7 +776,7 @@ libclamav_internal_utils_la_SOURCES = str.c\
775 775
 				    regex/utils.h
776 776
 
777 777
 libclamav_internal_utils_la_LDFLAGS = -static @LIBCLAMAV_LIBS@
778
-libclamav_internal_utils_la_CFLAGS = $(AM_CFLAGS)  -fPIC -DPIC
778
+libclamav_internal_utils_la_CFLAGS = $(AM_CFLAGS)  -fPIC -DPIC @LIBCLAMAV_CPPFLAGS@
779 779
 libclamav_internal_utils_nothreads_la_SOURCES = str.c\
780 780
 					conv.c \
781 781
 					conv.h \
... ...
@@ -800,18 +801,19 @@ libclamav_internal_utils_nothreads_la_SOURCES = str.c\
800 800
 				    regex/utils.h
801 801
 
802 802
 libclamav_internal_utils_nothreads_la_LDFLAGS = -static @LIBCLAMAV_LIBS@
803
-libclamav_internal_utils_nothreads_la_CFLAGS = $(AM_CFLAGS) -DCL_NOTHREADS
803
+libclamav_internal_utils_nothreads_la_CFLAGS = $(AM_CFLAGS) -DCL_NOTHREADS @LIBCLAMAV_CPPFLAGS@
804 804
 @ENABLE_LLVM_FALSE@LLVMLIBADD = libclamav_nocxx.la
805 805
 @ENABLE_LLVM_TRUE@LLVMLIBADD = c++/libclamavcxx.la -lstdc++ -lm
806 806
 @ENABLE_LLVM_FALSE@LLVMDEP = libclamav_nocxx.la
807 807
 @ENABLE_LLVM_TRUE@LLVMDEP = c++/libclamavcxx.la
808 808
 @ENABLE_LLVM_TRUE@SUBDIRS = c++
809 809
 libclamav_nocxx_la_SOURCES = bytecode_nojit.c
810
-libclamav_la_LIBADD = @LIBLTDL@ $(IFACELIBADD) $(LLVMLIBADD) libclamav_internal_utils.la @LIBCLAMAV_LIBS@ @THREAD_LIBS@ @LIBM@
810
+libclamav_la_LIBADD = @LIBCLAMAV_LIBS@ @LIBLTDL@ $(IFACELIBADD) $(LLVMLIBADD) libclamav_internal_utils.la @THREAD_LIBS@ @LIBM@
811 811
 libclamav_la_DEPENDENCIES = @LTDLDEPS@ $(IFACEDEP) $(LLVMDEP) libclamav_internal_utils.la
812
-libclamav_la_CFLAGS = $(AM_CFLAGS) $(XML_CPPFLAGS) -DSEARCH_LIBDIR=\"$(libdir)\"
813
-libclamav_la_LDFLAGS = @TH_SAFE@ $(XML_LIBS) -version-info \
814
-	@LIBCLAMAV_VERSION@ -no-undefined $(am__append_6)
812
+libclamav_la_CFLAGS = $(AM_CFLAGS) $(XML_CPPFLAGS) -DSEARCH_LIBDIR=\"$(libdir)\" @LIBCLAMAV_CPPFLAGS@
813
+libclamav_la_LDFLAGS = @LIBCLAMAV_LIBS@ @TH_SAFE@ $(XML_LIBS) \
814
+	-version-info @LIBCLAMAV_VERSION@ -no-undefined \
815
+	$(am__append_6)
815 816
 include_HEADERS = clamav.h
816 817
 libclamav_la_SOURCES = matcher-ac.c matcher-ac.h matcher-bm.c \
817 818
 	matcher-bm.h matcher-hash.c matcher-hash.h matcher.c matcher.h \
... ...
@@ -1,4 +1,4 @@
1
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
1
+# Makefile.in generated by automake 1.14 from Makefile.am.
2 2
 # @configure_input@
3 3
 
4 4
 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
... ...
@@ -5655,10 +5655,9 @@ distcheck: dist
5655 5655
 	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
5656 5656
 	  && am__cwd=`pwd` \
5657 5657
 	  && $(am__cd) $(distdir)/_build \
5658
-	  && ../configure \
5658
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
5659 5659
 	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
5660 5660
 	    $(DISTCHECK_CONFIGURE_FLAGS) \
5661
-	    --srcdir=.. --prefix="$$dc_install_base" \
5662 5661
 	  && $(MAKE) $(AM_MAKEFLAGS) \
5663 5662
 	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
5664 5663
 	  && $(MAKE) $(AM_MAKEFLAGS) check \
... ...
@@ -5748,8 +5747,8 @@ maintainer-clean-generic:
5748 5748
 	@echo "This command is intended for maintainers to use"
5749 5749
 	@echo "it deletes files that may require special tools to rebuild."
5750 5750
 	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
5751
-@BUILD_EXTERNAL_LLVM_TRUE@clean-local:
5752 5751
 @BUILD_EXTERNAL_LLVM_TRUE@distclean-local:
5752
+@BUILD_EXTERNAL_LLVM_TRUE@clean-local:
5753 5753
 clean: clean-am
5754 5754
 
5755 5755
 clean-am: clean-generic clean-libtool clean-local \
... ...
@@ -1,4 +1,4 @@
1
-# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
1
+# generated automatically by aclocal 1.14 -*- Autoconf -*-
2 2
 
3 3
 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
4 4
 
... ...
@@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
35 35
 [am__api_version='1.14'
36 36
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
37 37
 dnl require some minimum version.  Point them to the right macro.
38
-m4_if([$1], [1.14.1], [],
38
+m4_if([$1], [1.14], [],
39 39
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
40 40
 ])
41 41
 
... ...
@@ -51,7 +51,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
51 51
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
52 52
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
53 53
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
54
-[AM_AUTOMAKE_VERSION([1.14.1])dnl
54
+[AM_AUTOMAKE_VERSION([1.14])dnl
55 55
 m4_ifndef([AC_AUTOCONF_VERSION],
56 56
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
57 57
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
... ...
@@ -1,14 +1,12 @@
1 1
 #! /bin/sh
2 2
 # Attempt to guess a canonical system name.
3
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5
-#   2011, 2012 Free Software Foundation, Inc.
3
+#   Copyright 1992-2013 Free Software Foundation, Inc.
6 4
 
7
-timestamp='2012-02-10'
5
+timestamp='2013-05-16'
8 6
 
9 7
 # This file is free software; you can redistribute it and/or modify it
10 8
 # under the terms of the GNU General Public License as published by
11
-# the Free Software Foundation; either version 2 of the License, or
9
+# the Free Software Foundation; either version 3 of the License, or
12 10
 # (at your option) any later version.
13 11
 #
14 12
 # This program is distributed in the hope that it will be useful, but
... ...
@@ -22,19 +20,17 @@ timestamp='2012-02-10'
22 22
 # As a special exception to the GNU General Public License, if you
23 23
 # distribute this file as part of a program that contains a
24 24
 # configuration script generated by Autoconf, you may include it under
25
-# the same distribution terms that you use for the rest of that program.
26
-
27
-
28
-# Originally written by Per Bothner.  Please send patches (context
29
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
30
-# entry.
25
+# the same distribution terms that you use for the rest of that
26
+# program.  This Exception is an additional permission under section 7
27
+# of the GNU General Public License, version 3 ("GPLv3").
31 28
 #
32
-# This script attempts to guess a canonical system name similar to
33
-# config.sub.  If it succeeds, it prints the system name on stdout, and
34
-# exits with 0.  Otherwise, it exits with 1.
29
+# Originally written by Per Bothner.
35 30
 #
36 31
 # You can get the latest version of this script from:
37 32
 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
33
+#
34
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
35
+
38 36
 
39 37
 me=`echo "$0" | sed -e 's,.*/,,'`
40 38
 
... ...
@@ -54,9 +50,7 @@ version="\
54 54
 GNU config.guess ($timestamp)
55 55
 
56 56
 Originally written by Per Bothner.
57
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
58
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
59
-Free Software Foundation, Inc.
57
+Copyright 1992-2013 Free Software Foundation, Inc.
60 58
 
61 59
 This is free software; see the source for copying conditions.  There is NO
62 60
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
... ...
@@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
138 138
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
139 139
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
140 140
 
141
+case "${UNAME_SYSTEM}" in
142
+Linux|GNU|GNU/*)
143
+	# If the system lacks a compiler, then just pick glibc.
144
+	# We could probably try harder.
145
+	LIBC=gnu
146
+
147
+	eval $set_cc_for_build
148
+	cat <<-EOF > $dummy.c
149
+	#include <features.h>
150
+	#if defined(__UCLIBC__)
151
+	LIBC=uclibc
152
+	#elif defined(__dietlibc__)
153
+	LIBC=dietlibc
154
+	#else
155
+	LIBC=gnu
156
+	#endif
157
+	EOF
158
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
159
+	;;
160
+esac
161
+
141 162
 # Note: order is significant - the case branches are not exclusive.
142 163
 
143 164
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
... ...
@@ -200,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
200 200
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
201 201
 	echo "${machine}-${os}${release}"
202 202
 	exit ;;
203
+    *:Bitrig:*:*)
204
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
205
+	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
206
+	exit ;;
203 207
     *:OpenBSD:*:*)
204 208
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
205 209
 	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
... ...
@@ -302,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
302 302
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
303 303
 	echo arm-acorn-riscix${UNAME_RELEASE}
304 304
 	exit ;;
305
-    arm:riscos:*:*|arm:RISCOS:*:*)
305
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
306 306
 	echo arm-unknown-riscos
307 307
 	exit ;;
308 308
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
... ...
@@ -791,16 +810,14 @@ EOF
791 791
 	exit ;;
792 792
     *:FreeBSD:*:*)
793 793
 	UNAME_PROCESSOR=`/usr/bin/uname -p`
794
-	case ${UNAME_PROCESSOR} in
795
-	    amd64)
796
-		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
797
-	    *)
798
-		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
799
-	esac
794
+	echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
800 795
 	exit ;;
801 796
     i*:CYGWIN*:*)
802 797
 	echo ${UNAME_MACHINE}-pc-cygwin
803 798
 	exit ;;
799
+    *:MINGW64*:*)
800
+	echo ${UNAME_MACHINE}-pc-mingw64
801
+	exit ;;
804 802
     *:MINGW*:*)
805 803
 	echo ${UNAME_MACHINE}-pc-mingw32
806 804
 	exit ;;
... ...
@@ -852,21 +869,21 @@ EOF
852 852
 	exit ;;
853 853
     *:GNU:*:*)
854 854
 	# the GNU system
855
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
855
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
856 856
 	exit ;;
857 857
     *:GNU/*:*:*)
858 858
 	# other systems with GNU libc and userland
859
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
859
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
860 860
 	exit ;;
861 861
     i*86:Minix:*:*)
862 862
 	echo ${UNAME_MACHINE}-pc-minix
863 863
 	exit ;;
864 864
     aarch64:Linux:*:*)
865
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
865
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
866 866
 	exit ;;
867 867
     aarch64_be:Linux:*:*)
868 868
 	UNAME_MACHINE=aarch64_be
869
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
869
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
870 870
 	exit ;;
871 871
     alpha:Linux:*:*)
872 872
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
... ...
@@ -879,59 +896,54 @@ EOF
879 879
 	  EV68*) UNAME_MACHINE=alphaev68 ;;
880 880
 	esac
881 881
 	objdump --private-headers /bin/sh | grep -q ld.so.1
882
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
883
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
882
+	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
883
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
884
+	exit ;;
885
+    arc:Linux:*:* | arceb:Linux:*:*)
886
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
884 887
 	exit ;;
885 888
     arm*:Linux:*:*)
886 889
 	eval $set_cc_for_build
887 890
 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
888 891
 	    | grep -q __ARM_EABI__
889 892
 	then
890
-	    echo ${UNAME_MACHINE}-unknown-linux-gnu
893
+	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
891 894
 	else
892 895
 	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
893 896
 		| grep -q __ARM_PCS_VFP
894 897
 	    then
895
-		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
898
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
896 899
 	    else
897
-		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
900
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
898 901
 	    fi
899 902
 	fi
900 903
 	exit ;;
901 904
     avr32*:Linux:*:*)
902
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
905
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
903 906
 	exit ;;
904 907
     cris:Linux:*:*)
905
-	echo ${UNAME_MACHINE}-axis-linux-gnu
908
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
906 909
 	exit ;;
907 910
     crisv32:Linux:*:*)
908
-	echo ${UNAME_MACHINE}-axis-linux-gnu
911
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
909 912
 	exit ;;
910 913
     frv:Linux:*:*)
911
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
914
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
912 915
 	exit ;;
913 916
     hexagon:Linux:*:*)
914
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
917
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
915 918
 	exit ;;
916 919
     i*86:Linux:*:*)
917
-	LIBC=gnu
918
-	eval $set_cc_for_build
919
-	sed 's/^	//' << EOF >$dummy.c
920
-	#ifdef __dietlibc__
921
-	LIBC=dietlibc
922
-	#endif
923
-EOF
924
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
925
-	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
920
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
926 921
 	exit ;;
927 922
     ia64:Linux:*:*)
928
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
923
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
929 924
 	exit ;;
930 925
     m32r*:Linux:*:*)
931
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
926
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
932 927
 	exit ;;
933 928
     m68*:Linux:*:*)
934
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
929
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
935 930
 	exit ;;
936 931
     mips:Linux:*:* | mips64:Linux:*:*)
937 932
 	eval $set_cc_for_build
... ...
@@ -950,54 +962,57 @@ EOF
950 950
 	#endif
951 951
 EOF
952 952
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
953
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
953
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
954 954
 	;;
955
+    or1k:Linux:*:*)
956
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
957
+	exit ;;
955 958
     or32:Linux:*:*)
956
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
959
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
957 960
 	exit ;;
958 961
     padre:Linux:*:*)
959
-	echo sparc-unknown-linux-gnu
962
+	echo sparc-unknown-linux-${LIBC}
960 963
 	exit ;;
961 964
     parisc64:Linux:*:* | hppa64:Linux:*:*)
962
-	echo hppa64-unknown-linux-gnu
965
+	echo hppa64-unknown-linux-${LIBC}
963 966
 	exit ;;
964 967
     parisc:Linux:*:* | hppa:Linux:*:*)
965 968
 	# Look for CPU level
966 969
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
967
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
968
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
969
-	  *)    echo hppa-unknown-linux-gnu ;;
970
+	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
971
+	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
972
+	  *)    echo hppa-unknown-linux-${LIBC} ;;
970 973
 	esac
971 974
 	exit ;;
972 975
     ppc64:Linux:*:*)
973
-	echo powerpc64-unknown-linux-gnu
976
+	echo powerpc64-unknown-linux-${LIBC}
974 977
 	exit ;;
975 978
     ppc:Linux:*:*)
976
-	echo powerpc-unknown-linux-gnu
979
+	echo powerpc-unknown-linux-${LIBC}
977 980
 	exit ;;
978 981
     s390:Linux:*:* | s390x:Linux:*:*)
979
-	echo ${UNAME_MACHINE}-ibm-linux
982
+	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
980 983
 	exit ;;
981 984
     sh64*:Linux:*:*)
982
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
985
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
983 986
 	exit ;;
984 987
     sh*:Linux:*:*)
985
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
988
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
986 989
 	exit ;;
987 990
     sparc:Linux:*:* | sparc64:Linux:*:*)
988
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
991
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
989 992
 	exit ;;
990 993
     tile*:Linux:*:*)
991
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
994
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
992 995
 	exit ;;
993 996
     vax:Linux:*:*)
994
-	echo ${UNAME_MACHINE}-dec-linux-gnu
997
+	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
995 998
 	exit ;;
996 999
     x86_64:Linux:*:*)
997
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
1000
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
998 1001
 	exit ;;
999 1002
     xtensa*:Linux:*:*)
1000
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
1003
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1001 1004
 	exit ;;
1002 1005
     i*86:DYNIX/ptx:4*:*)
1003 1006
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
... ...
@@ -1201,6 +1216,9 @@ EOF
1201 1201
     BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
1202 1202
 	echo i586-pc-haiku
1203 1203
 	exit ;;
1204
+    x86_64:Haiku:*:*)
1205
+	echo x86_64-unknown-haiku
1206
+	exit ;;
1204 1207
     SX-4:SUPER-UX:*:*)
1205 1208
 	echo sx4-nec-superux${UNAME_RELEASE}
1206 1209
 	exit ;;
... ...
@@ -1227,19 +1245,21 @@ EOF
1227 1227
 	exit ;;
1228 1228
     *:Darwin:*:*)
1229 1229
 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1230
-	case $UNAME_PROCESSOR in
1231
-	    i386)
1232
-		eval $set_cc_for_build
1233
-		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1234
-		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1235
-		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1236
-		      grep IS_64BIT_ARCH >/dev/null
1237
-		  then
1238
-		      UNAME_PROCESSOR="x86_64"
1239
-		  fi
1240
-		fi ;;
1241
-	    unknown) UNAME_PROCESSOR=powerpc ;;
1242
-	esac
1230
+	eval $set_cc_for_build
1231
+	if test "$UNAME_PROCESSOR" = unknown ; then
1232
+	    UNAME_PROCESSOR=powerpc
1233
+	fi
1234
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1235
+	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1236
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1237
+		grep IS_64BIT_ARCH >/dev/null
1238
+	    then
1239
+		case $UNAME_PROCESSOR in
1240
+		    i386) UNAME_PROCESSOR=x86_64 ;;
1241
+		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
1242
+		esac
1243
+	    fi
1244
+	fi
1243 1245
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1244 1246
 	exit ;;
1245 1247
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
... ...
@@ -1256,7 +1276,7 @@ EOF
1256 1256
     NEO-?:NONSTOP_KERNEL:*:*)
1257 1257
 	echo neo-tandem-nsk${UNAME_RELEASE}
1258 1258
 	exit ;;
1259
-    NSE-?:NONSTOP_KERNEL:*:*)
1259
+    NSE-*:NONSTOP_KERNEL:*:*)
1260 1260
 	echo nse-tandem-nsk${UNAME_RELEASE}
1261 1261
 	exit ;;
1262 1262
     NSR-?:NONSTOP_KERNEL:*:*)
... ...
@@ -1330,9 +1350,6 @@ EOF
1330 1330
 	exit ;;
1331 1331
 esac
1332 1332
 
1333
-#echo '(No uname command or uname output not recognized.)' 1>&2
1334
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1335
-
1336 1333
 eval $set_cc_for_build
1337 1334
 cat >$dummy.c <<EOF
1338 1335
 #ifdef _SEQUENT_
... ...
@@ -1,24 +1,18 @@
1 1
 #! /bin/sh
2 2
 # Configuration validation subroutine script.
3
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5
-#   2011, 2012 Free Software Foundation, Inc.
3
+#   Copyright 1992-2013 Free Software Foundation, Inc.
6 4
 
7
-timestamp='2012-04-18'
5
+timestamp='2013-04-24'
8 6
 
9
-# This file is (in principle) common to ALL GNU software.
10
-# The presence of a machine in this file suggests that SOME GNU software
11
-# can handle that machine.  It does not imply ALL GNU software can.
12
-#
13
-# This file is free software; you can redistribute it and/or modify
14
-# it under the terms of the GNU General Public License as published by
15
-# the Free Software Foundation; either version 2 of the License, or
7
+# This file is free software; you can redistribute it and/or modify it
8
+# under the terms of the GNU General Public License as published by
9
+# the Free Software Foundation; either version 3 of the License, or
16 10
 # (at your option) any later version.
17 11
 #
18
-# This program is distributed in the hope that it will be useful,
19
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
20
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
-# GNU General Public License for more details.
12
+# This program is distributed in the hope that it will be useful, but
13
+# WITHOUT ANY WARRANTY; without even the implied warranty of
14
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
+# General Public License for more details.
22 16
 #
23 17
 # You should have received a copy of the GNU General Public License
24 18
 # along with this program; if not, see <http://www.gnu.org/licenses/>.
... ...
@@ -26,11 +20,12 @@ timestamp='2012-04-18'
26 26
 # As a special exception to the GNU General Public License, if you
27 27
 # distribute this file as part of a program that contains a
28 28
 # configuration script generated by Autoconf, you may include it under
29
-# the same distribution terms that you use for the rest of that program.
29
+# the same distribution terms that you use for the rest of that
30
+# program.  This Exception is an additional permission under section 7
31
+# of the GNU General Public License, version 3 ("GPLv3").
30 32
 
31 33
 
32
-# Please send patches to <config-patches@gnu.org>.  Submit a context
33
-# diff and a properly formatted GNU ChangeLog entry.
34
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
34 35
 #
35 36
 # Configuration subroutine to validate and canonicalize a configuration type.
36 37
 # Supply the specified configuration type as an argument.
... ...
@@ -73,9 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
73 73
 version="\
74 74
 GNU config.sub ($timestamp)
75 75
 
76
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
77
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
78
-Free Software Foundation, Inc.
76
+Copyright 1992-2013 Free Software Foundation, Inc.
79 77
 
80 78
 This is free software; see the source for copying conditions.  There is NO
81 79
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
... ...
@@ -123,7 +116,7 @@ esac
123 123
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
124 124
 case $maybe_os in
125 125
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
126
-  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
126
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
127 127
   knetbsd*-gnu* | netbsd*-gnu* | \
128 128
   kopensolaris*-gnu* | \
129 129
   storm-chaos* | os2-emx* | rtmk-nova*)
... ...
@@ -156,7 +149,7 @@ case $os in
156 156
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
157 157
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
158 158
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
159
-	-apple | -axis | -knuth | -cray | -microblaze)
159
+	-apple | -axis | -knuth | -cray | -microblaze*)
160 160
 		os=
161 161
 		basic_machine=$1
162 162
 		;;
... ...
@@ -259,8 +252,10 @@ case $basic_machine in
259 259
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
260 260
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
261 261
 	| am33_2.0 \
262
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
263
-        | be32 | be64 \
262
+	| arc | arceb \
263
+	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
264
+	| avr | avr32 \
265
+	| be32 | be64 \
264 266
 	| bfin \
265 267
 	| c4x | clipper \
266 268
 	| d10v | d30v | dlx | dsp16xx \
... ...
@@ -273,7 +268,7 @@ case $basic_machine in
273 273
 	| le32 | le64 \
274 274
 	| lm32 \
275 275
 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
276
-	| maxq | mb | microblaze | mcore | mep | metag \
276
+	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
277 277
 	| mips | mipsbe | mipseb | mipsel | mipsle \
278 278
 	| mips16 \
279 279
 	| mips64 | mips64el \
... ...
@@ -291,16 +286,17 @@ case $basic_machine in
291 291
 	| mipsisa64r2 | mipsisa64r2el \
292 292
 	| mipsisa64sb1 | mipsisa64sb1el \
293 293
 	| mipsisa64sr71k | mipsisa64sr71kel \
294
+	| mipsr5900 | mipsr5900el \
294 295
 	| mipstx39 | mipstx39el \
295 296
 	| mn10200 | mn10300 \
296 297
 	| moxie \
297 298
 	| mt \
298 299
 	| msp430 \
299 300
 	| nds32 | nds32le | nds32be \
300
-	| nios | nios2 \
301
+	| nios | nios2 | nios2eb | nios2el \
301 302
 	| ns16k | ns32k \
302 303
 	| open8 \
303
-	| or32 \
304
+	| or1k | or32 \
304 305
 	| pdp10 | pdp11 | pj | pjl \
305 306
 	| powerpc | powerpc64 | powerpc64le | powerpcle \
306 307
 	| pyramid \
... ...
@@ -370,7 +366,7 @@ case $basic_machine in
370 370
 	| aarch64-* | aarch64_be-* \
371 371
 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
372 372
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
373
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
373
+	| alphapca5[67]-* | alpha64pca5[67]-* | amd64-* | arc-* | arceb-* \
374 374
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
375 375
 	| avr-* | avr32-* \
376 376
 	| be32-* | be64-* \
... ...
@@ -389,7 +385,8 @@ case $basic_machine in
389 389
 	| lm32-* \
390 390
 	| m32c-* | m32r-* | m32rle-* \
391 391
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
392
-	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
392
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
393
+	| microblaze-* | microblazeel-* \
393 394
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
394 395
 	| mips16-* \
395 396
 	| mips64-* | mips64el-* \
... ...
@@ -407,12 +404,13 @@ case $basic_machine in
407 407
 	| mipsisa64r2-* | mipsisa64r2el-* \
408 408
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
409 409
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
410
+	| mipsr5900-* | mipsr5900el-* \
410 411
 	| mipstx39-* | mipstx39el-* \
411 412
 	| mmix-* \
412 413
 	| mt-* \
413 414
 	| msp430-* \
414 415
 	| nds32-* | nds32le-* | nds32be-* \
415
-	| nios-* | nios2-* \
416
+	| nios-* | nios2-* | nios2eb-* | nios2el-* \
416 417
 	| none-* | np1-* | ns16k-* | ns32k-* \
417 418
 	| open8-* \
418 419
 	| orion-* \
... ...
@@ -475,12 +473,6 @@ case $basic_machine in
475 475
 		basic_machine=a29k-none
476 476
 		os=-bsd
477 477
 		;;
478
-	amd64)
479
-		basic_machine=x86_64-pc
480
-		;;
481
-	amd64-*)
482
-		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
483
-		;;
484 478
 	amdahl)
485 479
 		basic_machine=580-amdahl
486 480
 		os=-sysv
... ...
@@ -788,9 +780,13 @@ case $basic_machine in
788 788
 		basic_machine=ns32k-utek
789 789
 		os=-sysv
790 790
 		;;
791
-	microblaze)
791
+	microblaze*)
792 792
 		basic_machine=microblaze-xilinx
793 793
 		;;
794
+	mingw64)
795
+		basic_machine=x86_64-pc
796
+		os=-mingw64
797
+		;;
794 798
 	mingw32)
795 799
 		basic_machine=i386-pc
796 800
 		os=-mingw32
... ...
@@ -1019,7 +1015,11 @@ case $basic_machine in
1019 1019
 		basic_machine=i586-unknown
1020 1020
 		os=-pw32
1021 1021
 		;;
1022
-	rdos)
1022
+	rdos | rdos64)
1023
+		basic_machine=x86_64-pc
1024
+		os=-rdos
1025
+		;;
1026
+	rdos32)
1023 1027
 		basic_machine=i386-pc
1024 1028
 		os=-rdos
1025 1029
 		;;
... ...
@@ -1346,21 +1346,21 @@ case $os in
1346 1346
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1347 1347
 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1348 1348
 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1349
-	      | -sym* | -kopensolaris* \
1349
+	      | -sym* | -kopensolaris* | -plan9* \
1350 1350
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1351 1351
 	      | -aos* | -aros* \
1352 1352
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1353 1353
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1354 1354
 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1355
-	      | -openbsd* | -solidbsd* \
1355
+	      | -bitrig* | -openbsd* | -solidbsd* \
1356 1356
 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1357 1357
 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1358 1358
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1359 1359
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1360 1360
 	      | -chorusos* | -chorusrdb* | -cegcc* \
1361 1361
 	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1362
-	      | -mingw32* | -linux-gnu* | -linux-android* \
1363
-	      | -linux-newlib* | -linux-uclibc* \
1362
+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1363
+	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1364 1364
 	      | -uxpv* | -beos* | -mpeix* | -udk* \
1365 1365
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1366 1366
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
... ...
@@ -1492,9 +1492,6 @@ case $os in
1492 1492
 	-aros*)
1493 1493
 		os=-aros
1494 1494
 		;;
1495
-	-kaos*)
1496
-		os=-kaos
1497
-		;;
1498 1495
 	-zvmoe)
1499 1496
 		os=-zvmoe
1500 1497
 		;;
... ...
@@ -1586,6 +1583,9 @@ case $basic_machine in
1586 1586
 	mips*-*)
1587 1587
 		os=-elf
1588 1588
 		;;
1589
+	or1k-*)
1590
+		os=-elf
1591
+		;;
1589 1592
 	or32-*)
1590 1593
 		os=-coff
1591 1594
 		;;
... ...
@@ -1,10 +1,9 @@
1 1
 #! /bin/sh
2 2
 # depcomp - compile a program generating dependencies as side-effects
3 3
 
4
-scriptversion=2012-03-27.16; # UTC
4
+scriptversion=2013-05-30.07; # UTC
5 5
 
6
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
7
-# 2011, 2012 Free Software Foundation, Inc.
6
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
8 7
 
9 8
 # This program is free software; you can redistribute it and/or modify
10 9
 # it under the terms of the GNU General Public License as published by
... ...
@@ -28,9 +27,9 @@ scriptversion=2012-03-27.16; # UTC
28 28
 
29 29
 case $1 in
30 30
   '')
31
-     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
32
-     exit 1;
33
-     ;;
31
+    echo "$0: No command.  Try '$0 --help' for more information." 1>&2
32
+    exit 1;
33
+    ;;
34 34
   -h | --h*)
35 35
     cat <<\EOF
36 36
 Usage: depcomp [--help] [--version] PROGRAM [ARGS]
... ...
@@ -57,11 +56,65 @@ EOF
57 57
     ;;
58 58
 esac
59 59
 
60
+# Get the directory component of the given path, and save it in the
61
+# global variables '$dir'.  Note that this directory component will
62
+# be either empty or ending with a '/' character.  This is deliberate.
63
+set_dir_from ()
64
+{
65
+  case $1 in
66
+    */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
67
+      *) dir=;;
68
+  esac
69
+}
70
+
71
+# Get the suffix-stripped basename of the given path, and save it the
72
+# global variable '$base'.
73
+set_base_from ()
74
+{
75
+  base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
76
+}
77
+
78
+# If no dependency file was actually created by the compiler invocation,
79
+# we still have to create a dummy depfile, to avoid errors with the
80
+# Makefile "include basename.Plo" scheme.
81
+make_dummy_depfile ()
82
+{
83
+  echo "#dummy" > "$depfile"
84
+}
85
+
86
+# Factor out some common post-processing of the generated depfile.
87
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
88
+aix_post_process_depfile ()
89
+{
90
+  # If the compiler actually managed to produce a dependency file,
91
+  # post-process it.
92
+  if test -f "$tmpdepfile"; then
93
+    # Each line is of the form 'foo.o: dependency.h'.
94
+    # Do two passes, one to just change these to
95
+    #   $object: dependency.h
96
+    # and one to simply output
97
+    #   dependency.h:
98
+    # which is needed to avoid the deleted-header problem.
99
+    { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
100
+      sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
101
+    } > "$depfile"
102
+    rm -f "$tmpdepfile"
103
+  else
104
+    make_dummy_depfile
105
+  fi
106
+}
107
+
60 108
 # A tabulation character.
61 109
 tab='	'
62 110
 # A newline character.
63 111
 nl='
64 112
 '
113
+# Character ranges might be problematic outside the C locale.
114
+# These definitions help.
115
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
116
+lower=abcdefghijklmnopqrstuvwxyz
117
+digits=0123456789
118
+alpha=${upper}${lower}
65 119
 
66 120
 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
67 121
   echo "depcomp: Variables source, object and depmode must be set" 1>&2
... ...
@@ -75,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
75 75
 
76 76
 rm -f "$tmpdepfile"
77 77
 
78
+# Avoid interferences from the environment.
79
+gccflag= dashmflag=
80
+
78 81
 # Some modes work just like other modes, but use different flags.  We
79 82
 # parameterize here, but still list the modes in the big case below,
80 83
 # to make depend.m4 easier to write.  Note that we *cannot* use a case
... ...
@@ -86,32 +142,32 @@ if test "$depmode" = hp; then
86 86
 fi
87 87
 
88 88
 if test "$depmode" = dashXmstdout; then
89
-   # This is just like dashmstdout with a different argument.
90
-   dashmflag=-xM
91
-   depmode=dashmstdout
89
+  # This is just like dashmstdout with a different argument.
90
+  dashmflag=-xM
91
+  depmode=dashmstdout
92 92
 fi
93 93
 
94 94
 cygpath_u="cygpath -u -f -"
95 95
 if test "$depmode" = msvcmsys; then
96
-   # This is just like msvisualcpp but w/o cygpath translation.
97
-   # Just convert the backslash-escaped backslashes to single forward
98
-   # slashes to satisfy depend.m4
99
-   cygpath_u='sed s,\\\\,/,g'
100
-   depmode=msvisualcpp
96
+  # This is just like msvisualcpp but w/o cygpath translation.
97
+  # Just convert the backslash-escaped backslashes to single forward
98
+  # slashes to satisfy depend.m4
99
+  cygpath_u='sed s,\\\\,/,g'
100
+  depmode=msvisualcpp
101 101
 fi
102 102
 
103 103
 if test "$depmode" = msvc7msys; then
104
-   # This is just like msvc7 but w/o cygpath translation.
105
-   # Just convert the backslash-escaped backslashes to single forward
106
-   # slashes to satisfy depend.m4
107
-   cygpath_u='sed s,\\\\,/,g'
108
-   depmode=msvc7
104
+  # This is just like msvc7 but w/o cygpath translation.
105
+  # Just convert the backslash-escaped backslashes to single forward
106
+  # slashes to satisfy depend.m4
107
+  cygpath_u='sed s,\\\\,/,g'
108
+  depmode=msvc7
109 109
 fi
110 110
 
111 111
 if test "$depmode" = xlc; then
112
-   # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
113
-   gccflag=-qmakedep=gcc,-MF
114
-   depmode=gcc
112
+  # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
113
+  gccflag=-qmakedep=gcc,-MF
114
+  depmode=gcc
115 115
 fi
116 116
 
117 117
 case "$depmode" in
... ...
@@ -134,8 +190,7 @@ gcc3)
134 134
   done
135 135
   "$@"
136 136
   stat=$?
137
-  if test $stat -eq 0; then :
138
-  else
137
+  if test $stat -ne 0; then
139 138
     rm -f "$tmpdepfile"
140 139
     exit $stat
141 140
   fi
... ...
@@ -143,13 +198,17 @@ gcc3)
143 143
   ;;
144 144
 
145 145
 gcc)
146
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
147
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
148
+## (see the conditional assignment to $gccflag above).
146 149
 ## There are various ways to get dependency output from gcc.  Here's
147 150
 ## why we pick this rather obscure method:
148 151
 ## - Don't want to use -MD because we'd like the dependencies to end
149 152
 ##   up in a subdir.  Having to rename by hand is ugly.
150 153
 ##   (We might end up doing this anyway to support other compilers.)
151 154
 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
152
-##   -MM, not -M (despite what the docs say).
155
+##   -MM, not -M (despite what the docs say).  Also, it might not be
156
+##   supported by the other compilers which use the 'gcc' depmode.
153 157
 ## - Using -M directly means running the compiler twice (even worse
154 158
 ##   than renaming).
155 159
   if test -z "$gccflag"; then
... ...
@@ -157,15 +216,14 @@ gcc)
157 157
   fi
158 158
   "$@" -Wp,"$gccflag$tmpdepfile"
159 159
   stat=$?
160
-  if test $stat -eq 0; then :
161
-  else
160
+  if test $stat -ne 0; then
162 161
     rm -f "$tmpdepfile"
163 162
     exit $stat
164 163
   fi
165 164
   rm -f "$depfile"
166 165
   echo "$object : \\" > "$depfile"
167
-  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
168
-## The second -e expression handles DOS-style file names with drive letters.
166
+  # The second -e expression handles DOS-style file names with drive
167
+  # letters.
169 168
   sed -e 's/^[^:]*: / /' \
170 169
       -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
171 170
 ## This next piece of magic avoids the "deleted header file" problem.
... ...
@@ -174,15 +232,15 @@ gcc)
174 174
 ## typically no way to rebuild the header).  We avoid this by adding
175 175
 ## dummy dependencies for each header file.  Too bad gcc doesn't do
176 176
 ## this for us directly.
177
-  tr ' ' "$nl" < "$tmpdepfile" |
178 177
 ## Some versions of gcc put a space before the ':'.  On the theory
179 178
 ## that the space means something, we add a space to the output as
180 179
 ## well.  hp depmode also adds that space, but also prefixes the VPATH
181 180
 ## to the object.  Take care to not repeat it in the output.
182 181
 ## Some versions of the HPUX 10.20 sed can't process this invocation
183 182
 ## correctly.  Breaking it into two sed invocations is a workaround.
184
-    sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
185
-      | sed -e 's/$/ :/' >> "$depfile"
183
+  tr ' ' "$nl" < "$tmpdepfile" \
184
+    | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
185
+    | sed -e 's/$/ :/' >> "$depfile"
186 186
   rm -f "$tmpdepfile"
187 187
   ;;
188 188
 
... ...
@@ -200,8 +258,7 @@ sgi)
200 200
     "$@" -MDupdate "$tmpdepfile"
201 201
   fi
202 202
   stat=$?
203
-  if test $stat -eq 0; then :
204
-  else
203
+  if test $stat -ne 0; then
205 204
     rm -f "$tmpdepfile"
206 205
     exit $stat
207 206
   fi
... ...
@@ -209,7 +266,6 @@ sgi)
209 209
 
210 210
   if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
211 211
     echo "$object : \\" > "$depfile"
212
-
213 212
     # Clip off the initial element (the dependent).  Don't try to be
214 213
     # clever and replace this with sed code, as IRIX sed won't handle
215 214
     # lines with more than a fixed number of characters (4096 in
... ...
@@ -217,19 +273,15 @@ sgi)
217 217
     # the IRIX cc adds comments like '#:fec' to the end of the
218 218
     # dependency line.
219 219
     tr ' ' "$nl" < "$tmpdepfile" \
220
-    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
221
-    tr "$nl" ' ' >> "$depfile"
220
+      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
221
+      | tr "$nl" ' ' >> "$depfile"
222 222
     echo >> "$depfile"
223
-
224 223
     # The second pass generates a dummy entry for each header file.
225 224
     tr ' ' "$nl" < "$tmpdepfile" \
226
-   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
227
-   >> "$depfile"
225
+      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
226
+      >> "$depfile"
228 227
   else
229
-    # The sourcefile does not contain any dependencies, so just
230
-    # store a dummy comment line, to avoid errors with the Makefile
231
-    # "include basename.Plo" scheme.
232
-    echo "#dummy" > "$depfile"
228
+    make_dummy_depfile
233 229
   fi
234 230
   rm -f "$tmpdepfile"
235 231
   ;;
... ...
@@ -247,9 +299,8 @@ aix)
247 247
   # current directory.  Also, the AIX compiler puts '$object:' at the
248 248
   # start of each line; $object doesn't have directory information.
249 249
   # Version 6 uses the directory in both cases.
250
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
251
-  test "x$dir" = "x$object" && dir=
252
-  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
250
+  set_dir_from "$object"
251
+  set_base_from "$object"
253 252
   if test "$libtool" = yes; then
254 253
     tmpdepfile1=$dir$base.u
255 254
     tmpdepfile2=$base.u
... ...
@@ -262,9 +313,7 @@ aix)
262 262
     "$@" -M
263 263
   fi
264 264
   stat=$?
265
-
266
-  if test $stat -eq 0; then :
267
-  else
265
+  if test $stat -ne 0; then
268 266
     rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
269 267
     exit $stat
270 268
   fi
... ...
@@ -273,65 +322,113 @@ aix)
273 273
   do
274 274
     test -f "$tmpdepfile" && break
275 275
   done
276
-  if test -f "$tmpdepfile"; then
277
-    # Each line is of the form 'foo.o: dependent.h'.
278
-    # Do two passes, one to just change these to
279
-    # '$object: dependent.h' and one to simply 'dependent.h:'.
280
-    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
281
-    sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
282
-  else
283
-    # The sourcefile does not contain any dependencies, so just
284
-    # store a dummy comment line, to avoid errors with the Makefile
285
-    # "include basename.Plo" scheme.
286
-    echo "#dummy" > "$depfile"
276
+  aix_post_process_depfile
277
+  ;;
278
+
279
+tcc)
280
+  # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
281
+  # FIXME: That version still under development at the moment of writing.
282
+  #        Make that this statement remains true also for stable, released
283
+  #        versions.
284
+  # It will wrap lines (doesn't matter whether long or short) with a
285
+  # trailing '\', as in:
286
+  #
287
+  #   foo.o : \
288
+  #    foo.c \
289
+  #    foo.h \
290
+  #
291
+  # It will put a trailing '\' even on the last line, and will use leading
292
+  # spaces rather than leading tabs (at least since its commit 0394caf7
293
+  # "Emit spaces for -MD").
294
+  "$@" -MD -MF "$tmpdepfile"
295
+  stat=$?
296
+  if test $stat -ne 0; then
297
+    rm -f "$tmpdepfile"
298
+    exit $stat
287 299
   fi
300
+  rm -f "$depfile"
301
+  # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
302
+  # We have to change lines of the first kind to '$object: \'.
303
+  sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
304
+  # And for each line of the second kind, we have to emit a 'dep.h:'
305
+  # dummy dependency, to avoid the deleted-header problem.
306
+  sed -n -e 's|^  *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
288 307
   rm -f "$tmpdepfile"
289 308
   ;;
290 309
 
291
-icc)
292
-  # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
293
-  # However on
294
-  #    $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
295
-  # ICC 7.0 will fill foo.d with something like
296
-  #    foo.o: sub/foo.c
297
-  #    foo.o: sub/foo.h
298
-  # which is wrong.  We want
299
-  #    sub/foo.o: sub/foo.c
300
-  #    sub/foo.o: sub/foo.h
301
-  #    sub/foo.c:
302
-  #    sub/foo.h:
303
-  # ICC 7.1 will output
310
+## The order of this option in the case statement is important, since the
311
+## shell code in configure will try each of these formats in the order
312
+## listed in this file.  A plain '-MD' option would be understood by many
313
+## compilers, so we must ensure this comes after the gcc and icc options.
314
+pgcc)
315
+  # Portland's C compiler understands '-MD'.
316
+  # Will always output deps to 'file.d' where file is the root name of the
317
+  # source file under compilation, even if file resides in a subdirectory.
318
+  # The object file name does not affect the name of the '.d' file.
319
+  # pgcc 10.2 will output
304 320
   #    foo.o: sub/foo.c sub/foo.h
305
-  # and will wrap long lines using '\':
321
+  # and will wrap long lines using '\' :
306 322
   #    foo.o: sub/foo.c ... \
307 323
   #     sub/foo.h ... \
308 324
   #     ...
309
-  # tcc 0.9.26 (FIXME still under development at the moment of writing)
310
-  # will emit a similar output, but also prepend the continuation lines
311
-  # with horizontal tabulation characters.
312
-  "$@" -MD -MF "$tmpdepfile"
313
-  stat=$?
314
-  if test $stat -eq 0; then :
315
-  else
325
+  set_dir_from "$object"
326
+  # Use the source, not the object, to determine the base name, since
327
+  # that's sadly what pgcc will do too.
328
+  set_base_from "$source"
329
+  tmpdepfile=$base.d
330
+
331
+  # For projects that build the same source file twice into different object
332
+  # files, the pgcc approach of using the *source* file root name can cause
333
+  # problems in parallel builds.  Use a locking strategy to avoid stomping on
334
+  # the same $tmpdepfile.
335
+  lockdir=$base.d-lock
336
+  trap "
337
+    echo '$0: caught signal, cleaning up...' >&2
338
+    rmdir '$lockdir'
339
+    exit 1
340
+  " 1 2 13 15
341
+  numtries=100
342
+  i=$numtries
343
+  while test $i -gt 0; do
344
+    # mkdir is a portable test-and-set.
345
+    if mkdir "$lockdir" 2>/dev/null; then
346
+      # This process acquired the lock.
347
+      "$@" -MD
348
+      stat=$?
349
+      # Release the lock.
350
+      rmdir "$lockdir"
351
+      break
352
+    else
353
+      # If the lock is being held by a different process, wait
354
+      # until the winning process is done or we timeout.
355
+      while test -d "$lockdir" && test $i -gt 0; do
356
+        sleep 1
357
+        i=`expr $i - 1`
358
+      done
359
+    fi
360
+    i=`expr $i - 1`
361
+  done
362
+  trap - 1 2 13 15
363
+  if test $i -le 0; then
364
+    echo "$0: failed to acquire lock after $numtries attempts" >&2
365
+    echo "$0: check lockdir '$lockdir'" >&2
366
+    exit 1
367
+  fi
368
+
369
+  if test $stat -ne 0; then
316 370
     rm -f "$tmpdepfile"
317 371
     exit $stat
318 372
   fi
319 373
   rm -f "$depfile"
320
-  # Each line is of the form 'foo.o: dependent.h',
321
-  # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
374
+  # Each line is of the form `foo.o: dependent.h',
375
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
322 376
   # Do two passes, one to just change these to
323
-  # '$object: dependent.h' and one to simply 'dependent.h:'.
324
-  sed -e "s/^[ $tab][ $tab]*/  /" -e "s,^[^:]*:,$object :," \
325
-    < "$tmpdepfile" > "$depfile"
326
-  sed '
327
-    s/[ '"$tab"'][ '"$tab"']*/ /g
328
-    s/^ *//
329
-    s/ *\\*$//
330
-    s/^[^:]*: *//
331
-    /^$/d
332
-    /:$/d
333
-    s/$/ :/
334
-  ' < "$tmpdepfile" >> "$depfile"
377
+  # `$object: dependent.h' and one to simply `dependent.h:'.
378
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
379
+  # Some versions of the HPUX 10.20 sed can't process this invocation
380
+  # correctly.  Breaking it into two sed invocations is a workaround.
381
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
382
+    | sed -e 's/$/ :/' >> "$depfile"
335 383
   rm -f "$tmpdepfile"
336 384
   ;;
337 385
 
... ...
@@ -342,9 +439,8 @@ hp2)
342 342
   # 'foo.d', which lands next to the object file, wherever that
343 343
   # happens to be.
344 344
   # Much of this is similar to the tru64 case; see comments there.
345
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
346
-  test "x$dir" = "x$object" && dir=
347
-  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
345
+  set_dir_from  "$object"
346
+  set_base_from "$object"
348 347
   if test "$libtool" = yes; then
349 348
     tmpdepfile1=$dir$base.d
350 349
     tmpdepfile2=$dir.libs/$base.d
... ...
@@ -355,8 +451,7 @@ hp2)
355 355
     "$@" +Maked
356 356
   fi
357 357
   stat=$?
358
-  if test $stat -eq 0; then :
359
-  else
358
+  if test $stat -ne 0; then
360 359
      rm -f "$tmpdepfile1" "$tmpdepfile2"
361 360
      exit $stat
362 361
   fi
... ...
@@ -366,76 +461,61 @@ hp2)
366 366
     test -f "$tmpdepfile" && break
367 367
   done
368 368
   if test -f "$tmpdepfile"; then
369
-    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
369
+    sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
370 370
     # Add 'dependent.h:' lines.
371 371
     sed -ne '2,${
372
-	       s/^ *//
373
-	       s/ \\*$//
374
-	       s/$/:/
375
-	       p
376
-	     }' "$tmpdepfile" >> "$depfile"
372
+               s/^ *//
373
+               s/ \\*$//
374
+               s/$/:/
375
+               p
376
+             }' "$tmpdepfile" >> "$depfile"
377 377
   else
378
-    echo "#dummy" > "$depfile"
378
+    make_dummy_depfile
379 379
   fi
380 380
   rm -f "$tmpdepfile" "$tmpdepfile2"
381 381
   ;;
382 382
 
383 383
 tru64)
384
-   # The Tru64 compiler uses -MD to generate dependencies as a side
385
-   # effect.  'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
386
-   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
387
-   # dependencies in 'foo.d' instead, so we check for that too.
388
-   # Subdirectories are respected.
389
-   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
390
-   test "x$dir" = "x$object" && dir=
391
-   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
392
-
393
-   if test "$libtool" = yes; then
394
-      # With Tru64 cc, shared objects can also be used to make a
395
-      # static library.  This mechanism is used in libtool 1.4 series to
396
-      # handle both shared and static libraries in a single compilation.
397
-      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
398
-      #
399
-      # With libtool 1.5 this exception was removed, and libtool now
400
-      # generates 2 separate objects for the 2 libraries.  These two
401
-      # compilations output dependencies in $dir.libs/$base.o.d and
402
-      # in $dir$base.o.d.  We have to check for both files, because
403
-      # one of the two compilations can be disabled.  We should prefer
404
-      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
405
-      # automatically cleaned when .libs/ is deleted, while ignoring
406
-      # the former would cause a distcleancheck panic.
407
-      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
408
-      tmpdepfile2=$dir$base.o.d          # libtool 1.5
409
-      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
410
-      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
411
-      "$@" -Wc,-MD
412
-   else
413
-      tmpdepfile1=$dir$base.o.d
414
-      tmpdepfile2=$dir$base.d
415
-      tmpdepfile3=$dir$base.d
416
-      tmpdepfile4=$dir$base.d
417
-      "$@" -MD
418
-   fi
419
-
420
-   stat=$?
421
-   if test $stat -eq 0; then :
422
-   else
423
-      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
424
-      exit $stat
425
-   fi
426
-
427
-   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
428
-   do
429
-     test -f "$tmpdepfile" && break
430
-   done
431
-   if test -f "$tmpdepfile"; then
432
-      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
433
-      sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
434
-   else
435
-      echo "#dummy" > "$depfile"
436
-   fi
437
-   rm -f "$tmpdepfile"
438
-   ;;
384
+  # The Tru64 compiler uses -MD to generate dependencies as a side
385
+  # effect.  'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
386
+  # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
387
+  # dependencies in 'foo.d' instead, so we check for that too.
388
+  # Subdirectories are respected.
389
+  set_dir_from  "$object"
390
+  set_base_from "$object"
391
+
392
+  if test "$libtool" = yes; then
393
+    # Libtool generates 2 separate objects for the 2 libraries.  These
394
+    # two compilations output dependencies in $dir.libs/$base.o.d and
395
+    # in $dir$base.o.d.  We have to check for both files, because
396
+    # one of the two compilations can be disabled.  We should prefer
397
+    # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
398
+    # automatically cleaned when .libs/ is deleted, while ignoring
399
+    # the former would cause a distcleancheck panic.
400
+    tmpdepfile1=$dir$base.o.d          # libtool 1.5
401
+    tmpdepfile2=$dir.libs/$base.o.d    # Likewise.
402
+    tmpdepfile3=$dir.libs/$base.d      # Compaq CCC V6.2-504
403
+    "$@" -Wc,-MD
404
+  else
405
+    tmpdepfile1=$dir$base.d
406
+    tmpdepfile2=$dir$base.d
407
+    tmpdepfile3=$dir$base.d
408
+    "$@" -MD
409
+  fi
410
+
411
+  stat=$?
412
+  if test $stat -ne 0; then
413
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
414
+    exit $stat
415
+  fi
416
+
417
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
418
+  do
419
+    test -f "$tmpdepfile" && break
420
+  done
421
+  # Same post-processing that is required for AIX mode.
422
+  aix_post_process_depfile
423
+  ;;
439 424
 
440 425
 msvc7)
441 426
   if test "$libtool" = yes; then
... ...
@@ -446,8 +526,7 @@ msvc7)
446 446
   "$@" $showIncludes > "$tmpdepfile"
447 447
   stat=$?
448 448
   grep -v '^Note: including file: ' "$tmpdepfile"
449
-  if test "$stat" = 0; then :
450
-  else
449
+  if test $stat -ne 0; then
451 450
     rm -f "$tmpdepfile"
452 451
     exit $stat
453 452
   fi
... ...
@@ -473,6 +552,7 @@ $ {
473 473
   G
474 474
   p
475 475
 }' >> "$depfile"
476
+  echo >> "$depfile" # make sure the fragment doesn't end with a backslash
476 477
   rm -f "$tmpdepfile"
477 478
   ;;
478 479
 
... ...
@@ -524,13 +604,14 @@ dashmstdout)
524 524
   # in the target name.  This is to cope with DOS-style filenames:
525 525
   # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
526 526
   "$@" $dashmflag |
527
-    sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
527
+    sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
528 528
   rm -f "$depfile"
529 529
   cat < "$tmpdepfile" > "$depfile"
530
-  tr ' ' "$nl" < "$tmpdepfile" | \
531
-## Some versions of the HPUX 10.20 sed can't process this invocation
532
-## correctly.  Breaking it into two sed invocations is a workaround.
533
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
530
+  # Some versions of the HPUX 10.20 sed can't process this sed invocation
531
+  # correctly.  Breaking it into two sed invocations is a workaround.
532
+  tr ' ' "$nl" < "$tmpdepfile" \
533
+    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
534
+    | sed -e 's/$/ :/' >> "$depfile"
534 535
   rm -f "$tmpdepfile"
535 536
   ;;
536 537
 
... ...
@@ -583,10 +664,12 @@ makedepend)
583 583
   # makedepend may prepend the VPATH from the source file name to the object.
584 584
   # No need to regex-escape $object, excess matching of '.' is harmless.
585 585
   sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
586
-  sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
587
-## Some versions of the HPUX 10.20 sed can't process this invocation
588
-## correctly.  Breaking it into two sed invocations is a workaround.
589
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
586
+  # Some versions of the HPUX 10.20 sed can't process the last invocation
587
+  # correctly.  Breaking it into two sed invocations is a workaround.
588
+  sed '1,2d' "$tmpdepfile" \
589
+    | tr ' ' "$nl" \
590
+    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
591
+    | sed -e 's/$/ :/' >> "$depfile"
590 592
   rm -f "$tmpdepfile" "$tmpdepfile".bak
591 593
   ;;
592 594
 
... ...
@@ -622,10 +705,10 @@ cpp)
622 622
     esac
623 623
   done
624 624
 
625
-  "$@" -E |
626
-    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
627
-       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
628
-    sed '$ s: \\$::' > "$tmpdepfile"
625
+  "$@" -E \
626
+    | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
627
+             -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
628
+    | sed '$ s: \\$::' > "$tmpdepfile"
629 629
   rm -f "$depfile"
630 630
   echo "$object : \\" > "$depfile"
631 631
   cat < "$tmpdepfile" >> "$depfile"
... ...
@@ -657,15 +740,15 @@ msvisualcpp)
657 657
       shift
658 658
       ;;
659 659
     "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
660
-	set fnord "$@"
661
-	shift
662
-	shift
663
-	;;
660
+        set fnord "$@"
661
+        shift
662
+        shift
663
+        ;;
664 664
     *)
665
-	set fnord "$@" "$arg"
666
-	shift
667
-	shift
668
-	;;
665
+        set fnord "$@" "$arg"
666
+        shift
667
+        shift
668
+        ;;
669 669
     esac
670 670
   done
671 671
   "$@" -E 2>/dev/null |
... ...
@@ -1,7 +1,7 @@
1 1
 #!/bin/sh
2 2
 # install - install a program, script, or datafile
3 3
 
4
-scriptversion=2011-01-19.21; # UTC
4
+scriptversion=2011-11-20.07; # UTC
5 5
 
6 6
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
7 7
 # later released in X11R6 (xc/config/util/install.sh) with the
... ...
@@ -35,7 +35,7 @@ scriptversion=2011-01-19.21; # UTC
35 35
 # FSF changes to this file are in the public domain.
36 36
 #
37 37
 # Calling this script install-sh is preferred over install.sh, to prevent
38
-# `make' implicit rules from creating a file called install from it
38
+# 'make' implicit rules from creating a file called install from it
39 39
 # when there is no Makefile.
40 40
 #
41 41
 # This script is compatible with the BSD install script, but was written
... ...
@@ -156,7 +156,7 @@ while test $# -ne 0; do
156 156
     -s) stripcmd=$stripprog;;
157 157
 
158 158
     -t) dst_arg=$2
159
-	# Protect names problematic for `test' and other utilities.
159
+	# Protect names problematic for 'test' and other utilities.
160 160
 	case $dst_arg in
161 161
 	  -* | [=\(\)!]) dst_arg=./$dst_arg;;
162 162
 	esac
... ...
@@ -190,7 +190,7 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
190 190
     fi
191 191
     shift # arg
192 192
     dst_arg=$arg
193
-    # Protect names problematic for `test' and other utilities.
193
+    # Protect names problematic for 'test' and other utilities.
194 194
     case $dst_arg in
195 195
       -* | [=\(\)!]) dst_arg=./$dst_arg;;
196 196
     esac
... ...
@@ -202,7 +202,7 @@ if test $# -eq 0; then
202 202
     echo "$0: no input file specified." >&2
203 203
     exit 1
204 204
   fi
205
-  # It's OK to call `install-sh -d' without argument.
205
+  # It's OK to call 'install-sh -d' without argument.
206 206
   # This can happen when creating conditional directories.
207 207
   exit 0
208 208
 fi
... ...
@@ -240,7 +240,7 @@ fi
240 240
 
241 241
 for src
242 242
 do
243
-  # Protect names problematic for `test' and other utilities.
243
+  # Protect names problematic for 'test' and other utilities.
244 244
   case $src in
245 245
     -* | [=\(\)!]) src=./$src;;
246 246
   esac
... ...
@@ -354,7 +354,7 @@ do
354 354
 	      if test -z "$dir_arg" || {
355 355
 		   # Check for POSIX incompatibilities with -m.
356 356
 		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
357
-		   # other-writeable bit of parent directory when it shouldn't.
357
+		   # other-writable bit of parent directory when it shouldn't.
358 358
 		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
359 359
 		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
360 360
 		   case $ls_ld_tmpdir in
... ...
@@ -70,7 +70,7 @@
70 70
 #         compiler:		$LTCC
71 71
 #         compiler flags:		$LTCFLAGS
72 72
 #         linker:		$LD (gnu? $with_gnu_ld)
73
-#         $progname:	(GNU libtool) 2.4.2 Debian-2.4.2-1.1
73
+#         $progname:	(GNU libtool) 2.4.2
74 74
 #         automake:	$automake_version
75 75
 #         autoconf:	$autoconf_version
76 76
 #
... ...
@@ -80,7 +80,7 @@
80 80
 
81 81
 PROGRAM=libtool
82 82
 PACKAGE=libtool
83
-VERSION="2.4.2 Debian-2.4.2-1.1"
83
+VERSION=2.4.2
84 84
 TIMESTAMP=""
85 85
 package_revision=1.3337
86 86
 
... ...
@@ -1375,6 +1375,21 @@ func_replace_sysroot ()
1375 1375
 func_infer_tag ()
1376 1376
 {
1377 1377
     $opt_debug
1378
+
1379
+    # FreeBSD-specific: where we install compilers with non-standard names
1380
+    tag_compilers_CC="*cc cc* *gcc gcc* clang*"
1381
+    tag_compilers_CXX="*c++ c++* *g++ g++* clang++*"
1382
+    base_compiler=`set -- "$@"; echo $1`
1383
+
1384
+    # If $tagname isn't set, then try to infer if the default "CC" tag applies
1385
+    if test -z "$tagname"; then
1386
+      for zp in $tag_compilers_CC; do
1387
+        case $base_compiler in
1388
+	 $zp) tagname="CC"; break;;
1389
+	esac
1390
+      done
1391
+    fi
1392
+
1378 1393
     if test -n "$available_tags" && test -z "$tagname"; then
1379 1394
       CC_quoted=
1380 1395
       for arg in $CC; do
... ...
@@ -1411,7 +1426,22 @@ func_infer_tag ()
1411 1411
 	      break
1412 1412
 	      ;;
1413 1413
 	    esac
1414
-	  fi
1414
+
1415
+	    # FreeBSD-specific: try compilers based on inferred tag
1416
+	    if test -z "$tagname"; then
1417
+	      eval "tag_compilers=\$tag_compilers_${z}"
1418
+	      if test -n "$tag_compilers"; then
1419
+		for zp in $tag_compilers; do
1420
+		  case $base_compiler in   
1421
+		    $zp) tagname=$z; break;;
1422
+		  esac
1423
+		done
1424
+		if test -n "$tagname"; then
1425
+		  break
1426
+		fi
1427
+	      fi
1428
+            fi
1429
+          fi
1415 1430
 	done
1416 1431
 	# If $tagname still isn't set, then no tagged configuration
1417 1432
 	# was found and let the user know that the "--tag" command
... ...
@@ -3517,6 +3547,9 @@ static const void *lt_preloaded_setup() {
3517 3517
 	  ;;
3518 3518
 	esac
3519 3519
 	;;
3520
+      *-*-freebsd*)
3521
+	# FreeBSD doesn't need this...
3522
+	;;
3520 3523
       *)
3521 3524
 	func_fatal_error "unknown suffix for \`$my_dlsyms'"
3522 3525
 	;;
... ...
@@ -5595,6 +5628,7 @@ func_mode_link ()
5595 5595
 	  esac
5596 5596
 	  ;;
5597 5597
 	esac
5598
+	deplibs="$deplibs $arg"
5598 5599
 	continue
5599 5600
 	;;
5600 5601
 
... ...
@@ -6124,10 +6158,7 @@ func_mode_link ()
6124 6124
 	case $pass in
6125 6125
 	dlopen) libs="$dlfiles" ;;
6126 6126
 	dlpreopen) libs="$dlprefiles" ;;
6127
-	link)
6128
-	  libs="$deplibs %DEPLIBS%"
6129
-	  test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
6130
-	  ;;
6127
+	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
6131 6128
 	esac
6132 6129
       fi
6133 6130
       if test "$linkmode,$pass" = "lib,dlpreopen"; then
... ...
@@ -6170,13 +6201,30 @@ func_mode_link ()
6170 6170
 	    finalize_deplibs="$deplib $finalize_deplibs"
6171 6171
 	  else
6172 6172
 	    func_append compiler_flags " $deplib"
6173
-	    if test "$linkmode" = lib ; then
6174
-		case "$new_inherited_linker_flags " in
6175
-		    *" $deplib "*) ;;
6176
-		    * ) func_append new_inherited_linker_flags " $deplib" ;;
6177
-		esac
6178
-	    fi
6179 6173
 	  fi
6174
+
6175
+	  case $linkmode in
6176
+	  lib)
6177
+	    deplibs="$deplib $deplibs"
6178
+	    test "$pass" = conv && continue
6179
+	    newdependency_libs="$deplib $newdependency_libs"
6180
+	    ;;
6181
+	  prog)
6182
+	    if test "$pass" = conv; then
6183
+	      deplibs="$deplib $deplibs"
6184
+	      continue
6185
+	    fi
6186
+	    if test "$pass" = scan; then
6187
+	      deplibs="$deplib $deplibs"
6188
+	    else
6189
+	      compile_deplibs="$deplib $compile_deplibs"
6190
+	      finalize_deplibs="$deplib $finalize_deplibs"
6191
+	    fi
6192
+	    ;;
6193
+	  *)
6194
+	    ;;
6195
+	  esac # linkmode
6196
+
6180 6197
 	  continue
6181 6198
 	  ;;
6182 6199
 	-l*)
... ...
@@ -6447,19 +6495,19 @@ func_mode_link ()
6447 6447
 	    # It is a libtool convenience library, so add in its objects.
6448 6448
 	    func_append convenience " $ladir/$objdir/$old_library"
6449 6449
 	    func_append old_convenience " $ladir/$objdir/$old_library"
6450
-	    tmp_libs=
6451
-	    for deplib in $dependency_libs; do
6452
-	      deplibs="$deplib $deplibs"
6453
-	      if $opt_preserve_dup_deps ; then
6454
-		case "$tmp_libs " in
6455
-		*" $deplib "*) func_append specialdeplibs " $deplib" ;;
6456
-		esac
6457
-	      fi
6458
-	      func_append tmp_libs " $deplib"
6459
-	    done
6460 6450
 	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
6461 6451
 	    func_fatal_error "\`$lib' is not a convenience library"
6462 6452
 	  fi
6453
+	  tmp_libs=
6454
+	  for deplib in $dependency_libs; do
6455
+	    deplibs="$deplib $deplibs"
6456
+	    if $opt_preserve_dup_deps ; then
6457
+	      case "$tmp_libs " in
6458
+	      *" $deplib "*) func_append specialdeplibs " $deplib" ;;
6459
+	      esac
6460
+	    fi
6461
+	    func_append tmp_libs " $deplib"
6462
+	  done
6463 6463
 	  continue
6464 6464
 	fi # $pass = conv
6465 6465
 
... ...
@@ -7352,9 +7400,6 @@ func_mode_link ()
7352 7352
 	    revision="$number_minor"
7353 7353
 	    lt_irix_increment=no
7354 7354
 	    ;;
7355
-	  *)
7356
-	    func_fatal_configuration "$modename: unknown library version type \`$version_type'"
7357
-	    ;;
7358 7355
 	  esac
7359 7356
 	  ;;
7360 7357
 	no)
... ...
@@ -1,11 +1,10 @@
1 1
 #! /bin/sh
2
-# Common stub for a few missing GNU programs while installing.
2
+# Common wrapper for a few potentially missing GNU programs.
3 3
 
4
-scriptversion=2012-01-06.13; # UTC
4
+scriptversion=2012-06-26.16; # UTC
5 5
 
6
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
7
-# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
8
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
6
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
7
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
9 8
 
10 9
 # This program is free software; you can redistribute it and/or modify
11 10
 # it under the terms of the GNU General Public License as published by
... ...
@@ -26,68 +25,40 @@ scriptversion=2012-01-06.13; # UTC
26 26
 # the same distribution terms that you use for the rest of that program.
27 27
 
28 28
 if test $# -eq 0; then
29
-  echo 1>&2 "Try \`$0 --help' for more information"
29
+  echo 1>&2 "Try '$0 --help' for more information"
30 30
   exit 1
31 31
 fi
32 32
 
33
-run=:
34
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
35
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
36
-
37
-# In the cases where this matters, `missing' is being run in the
38
-# srcdir already.
39
-if test -f configure.ac; then
40
-  configure_ac=configure.ac
41
-else
42
-  configure_ac=configure.in
43
-fi
33
+case $1 in
44 34
 
45
-msg="missing on your system"
35
+  --is-lightweight)
36
+    # Used by our autoconf macros to check whether the available missing
37
+    # script is modern enough.
38
+    exit 0
39
+    ;;
46 40
 
47
-case $1 in
48
-  # Try to run requested program, and just exit if it succeeds.
49
-  run=
50
-  shift
51
-  "$@" && exit 0
52
-  # Exit code 63 means version mismatch.  This often happens
53
-  # when the user try to use an ancient version of a tool on
54
-  # a file that requires a minimum version.  In this case we
55
-  # we should proceed has if the program had been absent, or
56
-  # if --run hadn't been passed.
57
-  if test $? = 63; then
58
-    run=:
59
-    msg="probably too old"
60
-  fi
61
-  ;;
41
+  --run)
42
+    # Back-compat with the calling convention used by older automake.
43
+    shift
44
+    ;;
62 45
 
63 46
   -h|--h|--he|--hel|--help)
64 47
     echo "\
65 48
 $0 [OPTION]... PROGRAM [ARGUMENT]...
66 49
 
67
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
68
-error status if there is no known handling for PROGRAM.
50
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
51
+to PROGRAM being missing or too old.
69 52
 
70 53
 Options:
71 54
   -h, --help      display this help and exit
72 55
   -v, --version   output version information and exit
73
-  --run           try to run the given command, and emulate it if it fails
74 56
 
75 57
 Supported PROGRAM values:
76
-  aclocal      touch file \`aclocal.m4'
77
-  autoconf     touch file \`configure'
78
-  autoheader   touch file \`config.h.in'
79
-  autom4te     touch the output file, or create a stub one
80
-  automake     touch all \`Makefile.in' files
81
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
82
-  flex         create \`lex.yy.c', if possible, from existing .c
83
-  help2man     touch the output file
84
-  lex          create \`lex.yy.c', if possible, from existing .c
85
-  makeinfo     touch the output file
86
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
58
+  aclocal   autoconf  autoheader   autom4te  automake  makeinfo
59
+  bison     yacc      flex         lex       help2man
87 60
 
88
-Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
89
-\`g' are ignored when checking the name.
61
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
62
+'g' are ignored when checking the name.
90 63
 
91 64
 Send bug reports to <bug-automake@gnu.org>."
92 65
     exit $?
... ...
@@ -99,228 +70,141 @@ Send bug reports to <bug-automake@gnu.org>."
99 99
     ;;
100 100
 
101 101
   -*)
102
-    echo 1>&2 "$0: Unknown \`$1' option"
103
-    echo 1>&2 "Try \`$0 --help' for more information"
102
+    echo 1>&2 "$0: unknown '$1' option"
103
+    echo 1>&2 "Try '$0 --help' for more information"
104 104
     exit 1
105 105
     ;;
106 106
 
107 107
 esac
108 108
 
109
-# normalize program name to check for.
110
-program=`echo "$1" | sed '
111
-  s/^gnu-//; t
112
-  s/^gnu//; t
113
-  s/^g//; t'`
114
-
115
-# Now exit if we have it, but it failed.  Also exit now if we
116
-# don't have it and --version was passed (most likely to detect
117
-# the program).  This is about non-GNU programs, so use $1 not
118
-# $program.
119
-case $1 in
120
-  lex*|yacc*)
121
-    # Not GNU programs, they don't have --version.
122
-    ;;
123
-
124
-  *)
125
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
126
-       # We have it, but it failed.
127
-       exit 1
128
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
129
-       # Could not run --version or --help.  This is probably someone
130
-       # running `$TOOL --version' or `$TOOL --help' to check whether
131
-       # $TOOL exists and not knowing $TOOL uses missing.
132
-       exit 1
133
-    fi
134
-    ;;
135
-esac
136
-
137
-# If it does not exist, or fails to run (possibly an outdated version),
138
-# try to emulate it.
139
-case $program in
140
-  aclocal*)
141
-    echo 1>&2 "\
142
-WARNING: \`$1' is $msg.  You should only need it if
143
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
144
-         to install the \`Automake' and \`Perl' packages.  Grab them from
145
-         any GNU archive site."
146
-    touch aclocal.m4
147
-    ;;
148
-
149
-  autoconf*)
150
-    echo 1>&2 "\
151
-WARNING: \`$1' is $msg.  You should only need it if
152
-         you modified \`${configure_ac}'.  You might want to install the
153
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
154
-         archive site."
155
-    touch configure
156
-    ;;
157
-
158
-  autoheader*)
159
-    echo 1>&2 "\
160
-WARNING: \`$1' is $msg.  You should only need it if
161
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
162
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
163
-         from any GNU archive site."
164
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
165
-    test -z "$files" && files="config.h"
166
-    touch_files=
167
-    for f in $files; do
168
-      case $f in
169
-      *:*) touch_files="$touch_files "`echo "$f" |
170
-				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
171
-      *) touch_files="$touch_files $f.in";;
172
-      esac
173
-    done
174
-    touch $touch_files
175
-    ;;
176
-
177
-  automake*)
178
-    echo 1>&2 "\
179
-WARNING: \`$1' is $msg.  You should only need it if
180
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
181
-         You might want to install the \`Automake' and \`Perl' packages.
182
-         Grab them from any GNU archive site."
183
-    find . -type f -name Makefile.am -print |
184
-	   sed 's/\.am$/.in/' |
185
-	   while read f; do touch "$f"; done
186
-    ;;
187
-
188
-  autom4te*)
189
-    echo 1>&2 "\
190
-WARNING: \`$1' is needed, but is $msg.
191
-         You might have modified some files without having the
192
-         proper tools for further handling them.
193
-         You can get \`$1' as part of \`Autoconf' from any GNU
194
-         archive site."
195
-
196
-    file=`echo "$*" | sed -n "$sed_output"`
197
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
198
-    if test -f "$file"; then
199
-	touch $file
200
-    else
201
-	test -z "$file" || exec >$file
202
-	echo "#! /bin/sh"
203
-	echo "# Created by GNU Automake missing as a replacement of"
204
-	echo "#  $ $@"
205
-	echo "exit 0"
206
-	chmod +x $file
207
-	exit 1
208
-    fi
209
-    ;;
210
-
211
-  bison*|yacc*)
212
-    echo 1>&2 "\
213
-WARNING: \`$1' $msg.  You should only need it if
214
-         you modified a \`.y' file.  You may need the \`Bison' package
215
-         in order for those modifications to take effect.  You can get
216
-         \`Bison' from any GNU archive site."
217
-    rm -f y.tab.c y.tab.h
218
-    if test $# -ne 1; then
219
-        eval LASTARG=\${$#}
220
-	case $LASTARG in
221
-	*.y)
222
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
223
-	    if test -f "$SRCFILE"; then
224
-	         cp "$SRCFILE" y.tab.c
225
-	    fi
226
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
227
-	    if test -f "$SRCFILE"; then
228
-	         cp "$SRCFILE" y.tab.h
229
-	    fi
230
-	  ;;
231
-	esac
232
-    fi
233
-    if test ! -f y.tab.h; then
234
-	echo >y.tab.h
235
-    fi
236
-    if test ! -f y.tab.c; then
237
-	echo 'main() { return 0; }' >y.tab.c
238
-    fi
239
-    ;;
240
-
241
-  lex*|flex*)
242
-    echo 1>&2 "\
243
-WARNING: \`$1' is $msg.  You should only need it if
244
-         you modified a \`.l' file.  You may need the \`Flex' package
245
-         in order for those modifications to take effect.  You can get
246
-         \`Flex' from any GNU archive site."
247
-    rm -f lex.yy.c
248
-    if test $# -ne 1; then
249
-        eval LASTARG=\${$#}
250
-	case $LASTARG in
251
-	*.l)
252
-	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
253
-	    if test -f "$SRCFILE"; then
254
-	         cp "$SRCFILE" lex.yy.c
255
-	    fi
256
-	  ;;
257
-	esac
258
-    fi
259
-    if test ! -f lex.yy.c; then
260
-	echo 'main() { return 0; }' >lex.yy.c
261
-    fi
262
-    ;;
263
-
264
-  help2man*)
265
-    echo 1>&2 "\
266
-WARNING: \`$1' is $msg.  You should only need it if
267
-	 you modified a dependency of a manual page.  You may need the
268
-	 \`Help2man' package in order for those modifications to take
269
-	 effect.  You can get \`Help2man' from any GNU archive site."
270
-
271
-    file=`echo "$*" | sed -n "$sed_output"`
272
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
273
-    if test -f "$file"; then
274
-	touch $file
275
-    else
276
-	test -z "$file" || exec >$file
277
-	echo ".ab help2man is required to generate this page"
278
-	exit $?
279
-    fi
280
-    ;;
281
-
282
-  makeinfo*)
283
-    echo 1>&2 "\
284
-WARNING: \`$1' is $msg.  You should only need it if
285
-         you modified a \`.texi' or \`.texinfo' file, or any other file
286
-         indirectly affecting the aspect of the manual.  The spurious
287
-         call might also be the consequence of using a buggy \`make' (AIX,
288
-         DU, IRIX).  You might want to install the \`Texinfo' package or
289
-         the \`GNU make' package.  Grab either from any GNU archive site."
290
-    # The file to touch is that specified with -o ...
291
-    file=`echo "$*" | sed -n "$sed_output"`
292
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
293
-    if test -z "$file"; then
294
-      # ... or it is the one specified with @setfilename ...
295
-      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
296
-      file=`sed -n '
297
-	/^@setfilename/{
298
-	  s/.* \([^ ]*\) *$/\1/
299
-	  p
300
-	  q
301
-	}' $infile`
302
-      # ... or it is derived from the source name (dir/f.texi becomes f.info)
303
-      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
304
-    fi
305
-    # If the file does not exist, the user really needs makeinfo;
306
-    # let's fail without touching anything.
307
-    test -f $file || exit 1
308
-    touch $file
309
-    ;;
109
+# Run the given program, remember its exit status.
110
+"$@"; st=$?
111
+
112
+# If it succeeded, we are done.
113
+test $st -eq 0 && exit 0
114
+
115
+# Also exit now if we it failed (or wasn't found), and '--version' was
116
+# passed; such an option is passed most likely to detect whether the
117
+# program is present and works.
118
+case $2 in --version|--help) exit $st;; esac
119
+
120
+# Exit code 63 means version mismatch.  This often happens when the user
121
+# tries to use an ancient version of a tool on a file that requires a
122
+# minimum version.
123
+if test $st -eq 63; then
124
+  msg="probably too old"
125
+elif test $st -eq 127; then
126
+  # Program was missing.
127
+  msg="missing on your system"
128
+else
129
+  # Program was found and executed, but failed.  Give up.
130
+  exit $st
131
+fi
310 132
 
311
-  *)
312
-    echo 1>&2 "\
313
-WARNING: \`$1' is needed, and is $msg.
314
-         You might have modified some files without having the
315
-         proper tools for further handling them.  Check the \`README' file,
316
-         it often tells you about the needed prerequisites for installing
317
-         this package.  You may also peek at any GNU archive site, in case
318
-         some other package would contain this missing \`$1' program."
319
-    exit 1
133
+perl_URL=http://www.perl.org/
134
+flex_URL=http://flex.sourceforge.net/
135
+gnu_software_URL=http://www.gnu.org/software
136
+
137
+program_details ()
138
+{
139
+  case $1 in
140
+    aclocal|automake)
141
+      echo "The '$1' program is part of the GNU Automake package:"
142
+      echo "<$gnu_software_URL/automake>"
143
+      echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
144
+      echo "<$gnu_software_URL/autoconf>"
145
+      echo "<$gnu_software_URL/m4/>"
146
+      echo "<$perl_URL>"
147
+      ;;
148
+    autoconf|autom4te|autoheader)
149
+      echo "The '$1' program is part of the GNU Autoconf package:"
150
+      echo "<$gnu_software_URL/autoconf/>"
151
+      echo "It also requires GNU m4 and Perl in order to run:"
152
+      echo "<$gnu_software_URL/m4/>"
153
+      echo "<$perl_URL>"
154
+      ;;
155
+  esac
156
+}
157
+
158
+give_advice ()
159
+{
160
+  # Normalize program name to check for.
161
+  normalized_program=`echo "$1" | sed '
162
+    s/^gnu-//; t
163
+    s/^gnu//; t
164
+    s/^g//; t'`
165
+
166
+  printf '%s\n' "'$1' is $msg."
167
+
168
+  configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
169
+  case $normalized_program in
170
+    autoconf*)
171
+      echo "You should only need it if you modified 'configure.ac',"
172
+      echo "or m4 files included by it."
173
+      program_details 'autoconf'
174
+      ;;
175
+    autoheader*)
176
+      echo "You should only need it if you modified 'acconfig.h' or"
177
+      echo "$configure_deps."
178
+      program_details 'autoheader'
179
+      ;;
180
+    automake*)
181
+      echo "You should only need it if you modified 'Makefile.am' or"
182
+      echo "$configure_deps."
183
+      program_details 'automake'
184
+      ;;
185
+    aclocal*)
186
+      echo "You should only need it if you modified 'acinclude.m4' or"
187
+      echo "$configure_deps."
188
+      program_details 'aclocal'
189
+      ;;
190
+   autom4te*)
191
+      echo "You might have modified some maintainer files that require"
192
+      echo "the 'automa4te' program to be rebuilt."
193
+      program_details 'autom4te'
194
+      ;;
195
+    bison*|yacc*)
196
+      echo "You should only need it if you modified a '.y' file."
197
+      echo "You may want to install the GNU Bison package:"
198
+      echo "<$gnu_software_URL/bison/>"
199
+      ;;
200
+    lex*|flex*)
201
+      echo "You should only need it if you modified a '.l' file."
202
+      echo "You may want to install the Fast Lexical Analyzer package:"
203
+      echo "<$flex_URL>"
204
+      ;;
205
+    help2man*)
206
+      echo "You should only need it if you modified a dependency" \
207
+           "of a man page."
208
+      echo "You may want to install the GNU Help2man package:"
209
+      echo "<$gnu_software_URL/help2man/>"
320 210
     ;;
321
-esac
322
-
323
-exit 0
211
+    makeinfo*)
212
+      echo "You should only need it if you modified a '.texi' file, or"
213
+      echo "any other file indirectly affecting the aspect of the manual."
214
+      echo "You might want to install the Texinfo package:"
215
+      echo "<$gnu_software_URL/texinfo/>"
216
+      echo "The spurious makeinfo call might also be the consequence of"
217
+      echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
218
+      echo "want to install GNU make:"
219
+      echo "<$gnu_software_URL/make/>"
220
+      ;;
221
+    *)
222
+      echo "You might have modified some files without having the proper"
223
+      echo "tools for further handling them.  Check the 'README' file, it"
224
+      echo "often tells you about the needed prerequisites for installing"
225
+      echo "this package.  You may also peek at any GNU archive site, in"
226
+      echo "case some other package contains this missing '$1' program."
227
+      ;;
228
+  esac
229
+}
230
+
231
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
232
+                       -e '2,$s/^/         /' >&2
233
+
234
+# Propagate the correct exit status (expected to be 127 for a program
235
+# not found, 63 for a program that failed due to version mismatch).
236
+exit $st
324 237
 
325 238
 # Local variables:
326 239
 # eval: (add-hook 'write-file-hooks 'time-stamp)
... ...
@@ -6336,6 +6336,10 @@ freebsd* | dragonfly*)
6336 6336
   fi
6337 6337
   ;;
6338 6338
 
6339
+gnu*)
6340
+  lt_cv_deplibs_check_method=pass_all
6341
+  ;;
6342
+
6339 6343
 haiku*)
6340 6344
   lt_cv_deplibs_check_method=pass_all
6341 6345
   ;;
... ...
@@ -6374,11 +6378,11 @@ irix5* | irix6* | nonstopux*)
6374 6374
   ;;
6375 6375
 
6376 6376
 # This must be glibc/ELF.
6377
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6377
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
6378 6378
   lt_cv_deplibs_check_method=pass_all
6379 6379
   ;;
6380 6380
 
6381
-netbsd* | netbsdelf*-gnu)
6381
+netbsd*)
6382 6382
   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6383 6383
     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6384 6384
   else
... ...
@@ -9043,7 +9047,7 @@ lt_prog_compiler_static=
9043 9043
       lt_prog_compiler_static='-non_shared'
9044 9044
       ;;
9045 9045
 
9046
-    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
9046
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
9047 9047
       case $cc_basename in
9048 9048
       # old Intel for x86_64 which still supported -KPIC.
9049 9049
       ecc*)
... ...
@@ -9521,9 +9525,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
9521 9521
   openbsd*)
9522 9522
     with_gnu_ld=no
9523 9523
     ;;
9524
-  linux* | k*bsd*-gnu | gnu*)
9525
-    link_all_deplibs=no
9526
-    ;;
9527 9524
   esac
9528 9525
 
9529 9526
   ld_shlibs=yes
... ...
@@ -9745,7 +9746,7 @@ _LT_EOF
9745 9745
       fi
9746 9746
       ;;
9747 9747
 
9748
-    netbsd* | netbsdelf*-gnu)
9748
+    netbsd*)
9749 9749
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9750 9750
 	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
9751 9751
 	wlarc=
... ...
@@ -9922,7 +9923,6 @@ _LT_EOF
9922 9922
 	if test "$aix_use_runtimelinking" = yes; then
9923 9923
 	  shared_flag="$shared_flag "'${wl}-G'
9924 9924
 	fi
9925
-	link_all_deplibs=no
9926 9925
       else
9927 9926
 	# not using gcc
9928 9927
 	if test "$host_cpu" = ia64; then
... ...
@@ -10376,7 +10376,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
10376 10376
       link_all_deplibs=yes
10377 10377
       ;;
10378 10378
 
10379
-    netbsd* | netbsdelf*-gnu)
10379
+    netbsd*)
10380 10380
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
10381 10381
 	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
10382 10382
       else
... ...
@@ -11213,6 +11213,17 @@ freebsd* | dragonfly*)
11213 11213
   esac
11214 11214
   ;;
11215 11215
 
11216
+gnu*)
11217
+  version_type=linux # correct to gnu/linux during the next big refactor
11218
+  need_lib_prefix=no
11219
+  need_version=no
11220
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
11221
+  soname_spec='${libname}${release}${shared_ext}$major'
11222
+  shlibpath_var=LD_LIBRARY_PATH
11223
+  shlibpath_overrides_runpath=no
11224
+  hardcode_into_libs=yes
11225
+  ;;
11226
+
11216 11227
 haiku*)
11217 11228
   version_type=linux # correct to gnu/linux during the next big refactor
11218 11229
   need_lib_prefix=no
... ...
@@ -11329,7 +11340,7 @@ linux*oldld* | linux*aout* | linux*coff*)
11329 11329
   ;;
11330 11330
 
11331 11331
 # This must be glibc/ELF.
11332
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
11332
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
11333 11333
   version_type=linux # correct to gnu/linux during the next big refactor
11334 11334
   need_lib_prefix=no
11335 11335
   need_version=no
... ...
@@ -11393,18 +11404,6 @@ fi
11393 11393
   dynamic_linker='GNU/Linux ld.so'
11394 11394
   ;;
11395 11395
 
11396
-netbsdelf*-gnu)
11397
-  version_type=linux
11398
-  need_lib_prefix=no
11399
-  need_version=no
11400
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
11401
-  soname_spec='${libname}${release}${shared_ext}$major'
11402
-  shlibpath_var=LD_LIBRARY_PATH
11403
-  shlibpath_overrides_runpath=no
11404
-  hardcode_into_libs=yes
11405
-  dynamic_linker='NetBSD ld.elf_so'
11406
-  ;;
11407
-
11408 11396
 netbsd*)
11409 11397
   version_type=sunos
11410 11398
   need_lib_prefix=no
... ...
@@ -13152,6 +13151,9 @@ fi
13152 13152
         ld_shlibs_CXX=yes
13153 13153
         ;;
13154 13154
 
13155
+      gnu*)
13156
+        ;;
13157
+
13155 13158
       haiku*)
13156 13159
         archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
13157 13160
         link_all_deplibs_CXX=yes
... ...
@@ -13313,7 +13315,7 @@ fi
13313 13313
         inherit_rpath_CXX=yes
13314 13314
         ;;
13315 13315
 
13316
-      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13316
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
13317 13317
         case $cc_basename in
13318 13318
           KCC*)
13319 13319
 	    # Kuck and Associates, Inc. (KAI) C++ Compiler
... ...
@@ -14173,7 +14175,7 @@ lt_prog_compiler_static_CXX=
14173 14173
 	    ;;
14174 14174
 	esac
14175 14175
 	;;
14176
-      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
14176
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
14177 14177
 	case $cc_basename in
14178 14178
 	  KCC*)
14179 14179
 	    # KAI C++ Compiler
... ...
@@ -14237,7 +14239,7 @@ lt_prog_compiler_static_CXX=
14237 14237
 	    ;;
14238 14238
 	esac
14239 14239
 	;;
14240
-      netbsd* | netbsdelf*-gnu)
14240
+      netbsd*)
14241 14241
 	;;
14242 14242
       *qnx* | *nto*)
14243 14243
         # QNX uses GNU C++, but need to define -shared option too, otherwise
... ...
@@ -14608,9 +14610,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
14608 14608
       ;;
14609 14609
     esac
14610 14610
     ;;
14611
-  linux* | k*bsd*-gnu | gnu*)
14612
-    link_all_deplibs_CXX=no
14613
-    ;;
14614 14611
   *)
14615 14612
     export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
14616 14613
     ;;
... ...
@@ -15045,6 +15044,17 @@ freebsd* | dragonfly*)
15045 15045
   esac
15046 15046
   ;;
15047 15047
 
15048
+gnu*)
15049
+  version_type=linux # correct to gnu/linux during the next big refactor
15050
+  need_lib_prefix=no
15051
+  need_version=no
15052
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
15053
+  soname_spec='${libname}${release}${shared_ext}$major'
15054
+  shlibpath_var=LD_LIBRARY_PATH
15055
+  shlibpath_overrides_runpath=no
15056
+  hardcode_into_libs=yes
15057
+  ;;
15058
+
15048 15059
 haiku*)
15049 15060
   version_type=linux # correct to gnu/linux during the next big refactor
15050 15061
   need_lib_prefix=no
... ...
@@ -15161,7 +15171,7 @@ linux*oldld* | linux*aout* | linux*coff*)
15161 15161
   ;;
15162 15162
 
15163 15163
 # This must be glibc/ELF.
15164
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
15164
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
15165 15165
   version_type=linux # correct to gnu/linux during the next big refactor
15166 15166
   need_lib_prefix=no
15167 15167
   need_version=no
... ...
@@ -15225,18 +15235,6 @@ fi
15225 15225
   dynamic_linker='GNU/Linux ld.so'
15226 15226
   ;;
15227 15227
 
15228
-netbsdelf*-gnu)
15229
-  version_type=linux
15230
-  need_lib_prefix=no
15231
-  need_version=no
15232
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15233
-  soname_spec='${libname}${release}${shared_ext}$major'
15234
-  shlibpath_var=LD_LIBRARY_PATH
15235
-  shlibpath_overrides_runpath=no
15236
-  hardcode_into_libs=yes
15237
-  dynamic_linker='NetBSD ld.elf_so'
15238
-  ;;
15239
-
15240 15228
 netbsd*)
15241 15229
   version_type=sunos
15242 15230
   need_lib_prefix=no
... ...
@@ -2512,6 +2512,17 @@ freebsd* | dragonfly*)
2512 2512
   esac
2513 2513
   ;;
2514 2514
 
2515
+gnu*)
2516
+  version_type=linux # correct to gnu/linux during the next big refactor
2517
+  need_lib_prefix=no
2518
+  need_version=no
2519
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2520
+  soname_spec='${libname}${release}${shared_ext}$major'
2521
+  shlibpath_var=LD_LIBRARY_PATH
2522
+  shlibpath_overrides_runpath=no
2523
+  hardcode_into_libs=yes
2524
+  ;;
2525
+
2515 2526
 haiku*)
2516 2527
   version_type=linux # correct to gnu/linux during the next big refactor
2517 2528
   need_lib_prefix=no
... ...
@@ -2628,7 +2639,7 @@ linux*oldld* | linux*aout* | linux*coff*)
2628 2628
   ;;
2629 2629
 
2630 2630
 # This must be glibc/ELF.
2631
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2631
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
2632 2632
   version_type=linux # correct to gnu/linux during the next big refactor
2633 2633
   need_lib_prefix=no
2634 2634
   need_version=no
... ...
@@ -2673,18 +2684,6 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2673 2673
   dynamic_linker='GNU/Linux ld.so'
2674 2674
   ;;
2675 2675
 
2676
-netbsdelf*-gnu)
2677
-  version_type=linux
2678
-  need_lib_prefix=no
2679
-  need_version=no
2680
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2681
-  soname_spec='${libname}${release}${shared_ext}$major'
2682
-  shlibpath_var=LD_LIBRARY_PATH
2683
-  shlibpath_overrides_runpath=no
2684
-  hardcode_into_libs=yes
2685
-  dynamic_linker='NetBSD ld.elf_so'
2686
-  ;;
2687
-
2688 2676
 netbsd*)
2689 2677
   version_type=sunos
2690 2678
   need_lib_prefix=no
... ...
@@ -3244,6 +3243,10 @@ freebsd* | dragonfly*)
3244 3244
   fi
3245 3245
   ;;
3246 3246
 
3247
+gnu*)
3248
+  lt_cv_deplibs_check_method=pass_all
3249
+  ;;
3250
+
3247 3251
 haiku*)
3248 3252
   lt_cv_deplibs_check_method=pass_all
3249 3253
   ;;
... ...
@@ -3282,11 +3285,11 @@ irix5* | irix6* | nonstopux*)
3282 3282
   ;;
3283 3283
 
3284 3284
 # This must be glibc/ELF.
3285
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3285
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
3286 3286
   lt_cv_deplibs_check_method=pass_all
3287 3287
   ;;
3288 3288
 
3289
-netbsd* | netbsdelf*-gnu)
3289
+netbsd*)
3290 3290
   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3291 3291
     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3292 3292
   else
... ...
@@ -4034,7 +4037,7 @@ m4_if([$1], [CXX], [
4034 4034
 	    ;;
4035 4035
 	esac
4036 4036
 	;;
4037
-      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4037
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
4038 4038
 	case $cc_basename in
4039 4039
 	  KCC*)
4040 4040
 	    # KAI C++ Compiler
... ...
@@ -4098,7 +4101,7 @@ m4_if([$1], [CXX], [
4098 4098
 	    ;;
4099 4099
 	esac
4100 4100
 	;;
4101
-      netbsd* | netbsdelf*-gnu)
4101
+      netbsd*)
4102 4102
 	;;
4103 4103
       *qnx* | *nto*)
4104 4104
         # QNX uses GNU C++, but need to define -shared option too, otherwise
... ...
@@ -4333,7 +4336,7 @@ m4_if([$1], [CXX], [
4333 4333
       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4334 4334
       ;;
4335 4335
 
4336
-    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4336
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
4337 4337
       case $cc_basename in
4338 4338
       # old Intel for x86_64 which still supported -KPIC.
4339 4339
       ecc*)
... ...
@@ -4575,9 +4578,6 @@ m4_if([$1], [CXX], [
4575 4575
       ;;
4576 4576
     esac
4577 4577
     ;;
4578
-  linux* | k*bsd*-gnu | gnu*)
4579
-    _LT_TAGVAR(link_all_deplibs, $1)=no
4580
-    ;;
4581 4578
   *)
4582 4579
     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4583 4580
     ;;
... ...
@@ -4640,9 +4640,6 @@ dnl Note also adjust exclude_expsyms for C++ above.
4640 4640
   openbsd*)
4641 4641
     with_gnu_ld=no
4642 4642
     ;;
4643
-  linux* | k*bsd*-gnu | gnu*)
4644
-    _LT_TAGVAR(link_all_deplibs, $1)=no
4645
-    ;;
4646 4643
   esac
4647 4644
 
4648 4645
   _LT_TAGVAR(ld_shlibs, $1)=yes
... ...
@@ -4864,7 +4861,7 @@ _LT_EOF
4864 4864
       fi
4865 4865
       ;;
4866 4866
 
4867
-    netbsd* | netbsdelf*-gnu)
4867
+    netbsd*)
4868 4868
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4869 4869
 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4870 4870
 	wlarc=
... ...
@@ -5041,7 +5038,6 @@ _LT_EOF
5041 5041
 	if test "$aix_use_runtimelinking" = yes; then
5042 5042
 	  shared_flag="$shared_flag "'${wl}-G'
5043 5043
 	fi
5044
-	_LT_TAGVAR(link_all_deplibs, $1)=no
5045 5044
       else
5046 5045
 	# not using gcc
5047 5046
 	if test "$host_cpu" = ia64; then
... ...
@@ -5346,7 +5342,7 @@ _LT_EOF
5346 5346
       _LT_TAGVAR(link_all_deplibs, $1)=yes
5347 5347
       ;;
5348 5348
 
5349
-    netbsd* | netbsdelf*-gnu)
5349
+    netbsd*)
5350 5350
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5351 5351
 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5352 5352
       else
... ...
@@ -6226,6 +6222,9 @@ if test "$_lt_caught_CXX_error" != yes; then
6226 6226
         _LT_TAGVAR(ld_shlibs, $1)=yes
6227 6227
         ;;
6228 6228
 
6229
+      gnu*)
6230
+        ;;
6231
+
6229 6232
       haiku*)
6230 6233
         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6231 6234
         _LT_TAGVAR(link_all_deplibs, $1)=yes
... ...
@@ -6387,7 +6386,7 @@ if test "$_lt_caught_CXX_error" != yes; then
6387 6387
         _LT_TAGVAR(inherit_rpath, $1)=yes
6388 6388
         ;;
6389 6389
 
6390
-      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6390
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
6391 6391
         case $cc_basename in
6392 6392
           KCC*)
6393 6393
 	    # Kuck and Associates, Inc. (KAI) C++ Compiler
... ...
@@ -31,7 +31,11 @@
31 31
 
32 32
 #include <sys/types.h>
33 33
 #if !defined(_WIN32)
34
+#if defined(C_SOLARIS)
35
+#include <sys/utsname.h>
36
+#else
34 37
 #include <sys/sysctl.h>
38
+#endif
35 39
 #include <dlfcn.h>
36 40
 #else
37 41
 #include <Windows.h>
... ...
@@ -550,6 +554,18 @@ char *clamav_stats_get_hostid(void *cbdata)
550 550
 
551 551
     return strdup(HwProfInfo.szHwProfileGuid);
552 552
 }
553
+#elif defined(C_SOLARIS)
554
+char *clamav_stats_get_hostid(void *cbdata)
555
+{
556
+    struct utsname utsnm;
557
+    int ret;
558
+
559
+    ret = uname(&utsnm);
560
+    if (ret != -1)
561
+        return strdup(utsnm.nodename);
562
+
563
+    return strdup(STATS_ANON_UUID);
564
+}
553 565
 #else
554 566
 char *clamav_stats_get_hostid(void *cbdata)
555 567
 {
... ...
@@ -137,12 +137,6 @@ CLEANFILES		       += libltdl.la \
137 137
 CLEANFILES	       += $(ltdl_LIBOBJS) $(ltdl_LTLIBOBJS)
138 138
 
139 139
 EXTRA_DIST	       += COPYING.LIB \
140
-			   \
141
-			   \
142
-			   \
143
-			   \
144
-			   \
145
-			   \
146 140
 			  README
147 141
 
148 142
 ## --------------------------- ##
... ...
@@ -157,6 +151,7 @@ EXTRA_DIST	+= argz_.h \
157 157
 # doesn't have one that works with the given compiler.
158 158
 all-local $(lib_OBJECTS): $(ARGZ_H)
159 159
 argz.h: argz_.h
160
+	$(mkinstalldirs) . 
160 161
 	cp $(srcdir)/argz_.h $@-t
161 162
 	mv $@-t $@
162 163
 MOSTLYCLEANFILES += argz.h \
... ...
@@ -1,4 +1,4 @@
1
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
1
+# Makefile.in generated by automake 1.14 from Makefile.am.
2 2
 # @configure_input@
3 3
 
4 4
 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
... ...
@@ -110,6 +110,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
110 110
 	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
111 111
 	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
112 112
 	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
113
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
114
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
113 115
 	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
114 116
 	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
115 117
 	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
... ...
@@ -151,8 +153,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
151 151
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
152 152
 	$(top_srcdir)/m4/reorganization/bsd.m4 \
153 153
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
154
-	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
155
-	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
156 154
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
157 155
 	$(top_srcdir)/configure.ac
158 156
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
... ...
@@ -439,6 +439,7 @@ SED = @SED@
439 439
 SET_MAKE = @SET_MAKE@
440 440
 SHELL = @SHELL@
441 441
 SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
442
+SSL_CPPFLAGS = @SSL_CPPFLAGS@
442 443
 STRIP = @STRIP@
443 444
 THREAD_LIBS = @THREAD_LIBS@
444 445
 TH_SAFE = @TH_SAFE@
... ...
@@ -1119,6 +1120,7 @@ uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \
1119 1119
 # doesn't have one that works with the given compiler.
1120 1120
 all-local $(lib_OBJECTS): $(ARGZ_H)
1121 1121
 argz.h: argz_.h
1122
+	$(mkinstalldirs) . 
1122 1123
 	cp $(srcdir)/argz_.h $@-t
1123 1124
 	mv $@-t $@
1124 1125
 
... ...
@@ -2512,6 +2512,17 @@ freebsd* | dragonfly*)
2512 2512
   esac
2513 2513
   ;;
2514 2514
 
2515
+gnu*)
2516
+  version_type=linux # correct to gnu/linux during the next big refactor
2517
+  need_lib_prefix=no
2518
+  need_version=no
2519
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2520
+  soname_spec='${libname}${release}${shared_ext}$major'
2521
+  shlibpath_var=LD_LIBRARY_PATH
2522
+  shlibpath_overrides_runpath=no
2523
+  hardcode_into_libs=yes
2524
+  ;;
2525
+
2515 2526
 haiku*)
2516 2527
   version_type=linux # correct to gnu/linux during the next big refactor
2517 2528
   need_lib_prefix=no
... ...
@@ -2628,7 +2639,7 @@ linux*oldld* | linux*aout* | linux*coff*)
2628 2628
   ;;
2629 2629
 
2630 2630
 # This must be glibc/ELF.
2631
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2631
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
2632 2632
   version_type=linux # correct to gnu/linux during the next big refactor
2633 2633
   need_lib_prefix=no
2634 2634
   need_version=no
... ...
@@ -2673,18 +2684,6 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2673 2673
   dynamic_linker='GNU/Linux ld.so'
2674 2674
   ;;
2675 2675
 
2676
-netbsdelf*-gnu)
2677
-  version_type=linux
2678
-  need_lib_prefix=no
2679
-  need_version=no
2680
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2681
-  soname_spec='${libname}${release}${shared_ext}$major'
2682
-  shlibpath_var=LD_LIBRARY_PATH
2683
-  shlibpath_overrides_runpath=no
2684
-  hardcode_into_libs=yes
2685
-  dynamic_linker='NetBSD ld.elf_so'
2686
-  ;;
2687
-
2688 2676
 netbsd*)
2689 2677
   version_type=sunos
2690 2678
   need_lib_prefix=no
... ...
@@ -3244,6 +3243,10 @@ freebsd* | dragonfly*)
3244 3244
   fi
3245 3245
   ;;
3246 3246
 
3247
+gnu*)
3248
+  lt_cv_deplibs_check_method=pass_all
3249
+  ;;
3250
+
3247 3251
 haiku*)
3248 3252
   lt_cv_deplibs_check_method=pass_all
3249 3253
   ;;
... ...
@@ -3282,11 +3285,11 @@ irix5* | irix6* | nonstopux*)
3282 3282
   ;;
3283 3283
 
3284 3284
 # This must be glibc/ELF.
3285
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3285
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
3286 3286
   lt_cv_deplibs_check_method=pass_all
3287 3287
   ;;
3288 3288
 
3289
-netbsd* | netbsdelf*-gnu)
3289
+netbsd*)
3290 3290
   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3291 3291
     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3292 3292
   else
... ...
@@ -4034,7 +4037,7 @@ m4_if([$1], [CXX], [
4034 4034
 	    ;;
4035 4035
 	esac
4036 4036
 	;;
4037
-      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4037
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
4038 4038
 	case $cc_basename in
4039 4039
 	  KCC*)
4040 4040
 	    # KAI C++ Compiler
... ...
@@ -4098,7 +4101,7 @@ m4_if([$1], [CXX], [
4098 4098
 	    ;;
4099 4099
 	esac
4100 4100
 	;;
4101
-      netbsd* | netbsdelf*-gnu)
4101
+      netbsd*)
4102 4102
 	;;
4103 4103
       *qnx* | *nto*)
4104 4104
         # QNX uses GNU C++, but need to define -shared option too, otherwise
... ...
@@ -4333,7 +4336,7 @@ m4_if([$1], [CXX], [
4333 4333
       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4334 4334
       ;;
4335 4335
 
4336
-    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4336
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
4337 4337
       case $cc_basename in
4338 4338
       # old Intel for x86_64 which still supported -KPIC.
4339 4339
       ecc*)
... ...
@@ -4575,9 +4578,6 @@ m4_if([$1], [CXX], [
4575 4575
       ;;
4576 4576
     esac
4577 4577
     ;;
4578
-  linux* | k*bsd*-gnu | gnu*)
4579
-    _LT_TAGVAR(link_all_deplibs, $1)=no
4580
-    ;;
4581 4578
   *)
4582 4579
     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4583 4580
     ;;
... ...
@@ -4640,9 +4640,6 @@ dnl Note also adjust exclude_expsyms for C++ above.
4640 4640
   openbsd*)
4641 4641
     with_gnu_ld=no
4642 4642
     ;;
4643
-  linux* | k*bsd*-gnu | gnu*)
4644
-    _LT_TAGVAR(link_all_deplibs, $1)=no
4645
-    ;;
4646 4643
   esac
4647 4644
 
4648 4645
   _LT_TAGVAR(ld_shlibs, $1)=yes
... ...
@@ -4864,7 +4861,7 @@ _LT_EOF
4864 4864
       fi
4865 4865
       ;;
4866 4866
 
4867
-    netbsd* | netbsdelf*-gnu)
4867
+    netbsd*)
4868 4868
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4869 4869
 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4870 4870
 	wlarc=
... ...
@@ -5041,7 +5038,6 @@ _LT_EOF
5041 5041
 	if test "$aix_use_runtimelinking" = yes; then
5042 5042
 	  shared_flag="$shared_flag "'${wl}-G'
5043 5043
 	fi
5044
-	_LT_TAGVAR(link_all_deplibs, $1)=no
5045 5044
       else
5046 5045
 	# not using gcc
5047 5046
 	if test "$host_cpu" = ia64; then
... ...
@@ -5346,7 +5342,7 @@ _LT_EOF
5346 5346
       _LT_TAGVAR(link_all_deplibs, $1)=yes
5347 5347
       ;;
5348 5348
 
5349
-    netbsd* | netbsdelf*-gnu)
5349
+    netbsd*)
5350 5350
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5351 5351
 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5352 5352
       else
... ...
@@ -6226,6 +6222,9 @@ if test "$_lt_caught_CXX_error" != yes; then
6226 6226
         _LT_TAGVAR(ld_shlibs, $1)=yes
6227 6227
         ;;
6228 6228
 
6229
+      gnu*)
6230
+        ;;
6231
+
6229 6232
       haiku*)
6230 6233
         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6231 6234
         _LT_TAGVAR(link_all_deplibs, $1)=yes
... ...
@@ -6387,7 +6386,7 @@ if test "$_lt_caught_CXX_error" != yes; then
6387 6387
         _LT_TAGVAR(inherit_rpath, $1)=yes
6388 6388
         ;;
6389 6389
 
6390
-      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6390
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
6391 6391
         case $cc_basename in
6392 6392
           KCC*)
6393 6393
 	    # Kuck and Associates, Inc. (KAI) C++ Compiler
... ...
@@ -493,7 +493,7 @@ AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
493 493
     # at 6.2 and later dlopen does load deplibs.
494 494
     lt_cv_sys_dlopen_deplibs=yes
495 495
     ;;
496
-  netbsd* | netbsdelf*-gnu)
496
+  netbsd*)
497 497
     lt_cv_sys_dlopen_deplibs=yes
498 498
     ;;
499 499
   openbsd*)
... ...
@@ -22,16 +22,33 @@ then
22 22
     AC_MSG_ERROR([OpenSSL not found.])
23 23
 fi
24 24
 
25
-SSL_LDFLAGS="-L$LIBSSL_HOME/lib -lssl"
25
+SSL_LDFLAGS="-L$LIBSSL_HOME/lib -lssl -lcrypto"
26 26
 SSL_CPPFLAGS="-I$LIBSSL_HOME/include"
27 27
 
28 28
 save_LDFLAGS="$LDFLAGS"
29
-LDFLAGS="-L$LIBSSL_HOME/lib -lssl"
30
-AC_CHECK_LIB([ssl], [SSL_library_init], [LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS $SSL_LDFLAGS";CLAMSCAN_LIBS="$CLAMSCAN_LIBS $SSL_LDFLAGS";FRESHCLAM_LIBS="$FRESHCLAM_LIBS $SSL_LDFLAGS";CLAMD_LIBS="$CLAMD_LIBS $SSL_LDFLAGS";SIGTOOL_LIBS="$SIGTOOL_LIBS $SSL_LDFLAGS"],
31
-        [AC_MSG_ERROR([Your OpenSSL is misconfigured])])
29
+LDFLAGS="-L$LIBSSL_HOME/lib -lssl -lcrypto"
32 30
 
33
-LDFLAGS="-L$LIBSSL_HOME/lib -lcrypto"
34
-AC_CHECK_LIB([crypto], [EVP_EncryptInit], [LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -lcrypto";CLAMSCAN_LIBS="$CLAMSCAN_LIBS -lcrypto";FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lcrypto";CLAMD_LIBS="$CLAMD_LIBS -lcrypto";SIGTOOL_LIBS="$SIGTOOL_LIBS $SSL_LDFLAGS"],
35
-        [AC_MSG_ERROR([Your OpenSSL installation is misconfigured])])
31
+have_ssl="no"
32
+have_crypto="no"
33
+
34
+AC_CHECK_LIB([ssl], [SSL_library_init], [have_ssl="yes"], [AC_MSG_ERROR([Your OpenSSL installation is misconfigured or missing])])
35
+
36
+AC_CHECK_LIB([crypto], [EVP_EncryptInit], [have_crypto="yes"], [AC_MSG_ERROR([Your OpenSSL installation is misconfigured or missing])])
37
+
38
+if test "x$have_ssl" = "xyes"; then
39
+    LIBCLAMAV_LIBS="$SSL_LDFLAGS $LIBCLAMAV_LIBS"
40
+    CLAMSCAN_LIBS="$SSL_LDFLAGS $CLAMSCAN_LIBS"
41
+    FRESHCLAM_LIBS="$SSL_LDFLAGS $FRESHCLAM_LIBS"
42
+    CLAMD_LIBS="$SSL_LDFLAGS $CLAMD_LIBS"
43
+    CLAMDSCAN_LIBS="$SSL_LDFLAGS $CLAMDSCAN_LIBS"
44
+    SIGTOOL_LIBS="$SSL_LDFLAGS $SIGTOOL_LIBS"
45
+
46
+    LIBCLAMAV_CPPFLAGS="$SSL_CPPFLAGS $LIBCLAMAV_CPPFLAGS"
47
+    CLAMSCAN_CPPFLAGS="$SSL_CPPFLAGS $CLAMSCAN_CPPFLAGS"
48
+    FRESHCLAM_CPPFLAGS="$SSL_CPPFLAGS $FRESHCLAM_CPPFLAGS"
49
+    CLAMD_CPPFLAGS="$SSL_CPPFLAGS $CLAMD_CPPFLAGS"
50
+    CLAMDSCAN_CPPFLAGS="$SSL_CPPFLAGS $CLAMDSCAN_CPPFLAGS"
51
+    SIGTOOL_CPPFLAGS="$SSL_CPPFLAGS $SIGTOOL_CPPFLAGS"
52
+fi
36 53
 
37 54
 LDFLAGS="$save_LDFLAGS"
... ...
@@ -10,6 +10,7 @@ AC_SUBST([CLAMCONF_CPPFLAGS])
10 10
 AC_SUBST([CLAMDTOP_CPPFLAGS])
11 11
 AC_SUBST([CLAMBC_CPPFLAGS])
12 12
 AC_SUBST([LIBCLAMSHARED_CPPFLAGS])
13
+AC_SUBST([SSL_CPPFLAGS])
13 14
 
14 15
 AC_SUBST([LIBCLAMAV_LIBS])
15 16
 AC_SUBST([CLAMD_LIBS])
... ...
@@ -37,6 +37,6 @@ sigtool_SOURCES = \
37 37
 
38 38
 AM_CFLAGS=@WERR_CFLAGS@
39 39
 DEFS = @DEFS@ -DCL_NOTHREADS
40
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
40
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav @SIGTOOL_CPPFLAGS@
41 41
 LIBS = $(top_builddir)/libclamav/libclamav.la @FRESHCLAM_LIBS@ @THREAD_LIBS@
42 42
 CLEANFILES=*.gcda *.gcno
... ...
@@ -1,4 +1,4 @@
1
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
1
+# Makefile.in generated by automake 1.14 from Makefile.am.
2 2
 # @configure_input@
3 3
 
4 4
 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
... ...
@@ -122,6 +122,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
122 122
 	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
123 123
 	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
124 124
 	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
125
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
126
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
125 127
 	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
126 128
 	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
127 129
 	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
... ...
@@ -163,8 +165,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
163 163
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
164 164
 	$(top_srcdir)/m4/reorganization/bsd.m4 \
165 165
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
166
-	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
167
-	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
168 166
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
169 167
 	$(top_srcdir)/configure.ac
170 168
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
... ...
@@ -361,6 +361,7 @@ SED = @SED@
361 361
 SET_MAKE = @SET_MAKE@
362 362
 SHELL = @SHELL@
363 363
 SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
364
+SSL_CPPFLAGS = @SSL_CPPFLAGS@
364 365
 STRIP = @STRIP@
365 366
 THREAD_LIBS = @THREAD_LIBS@
366 367
 TH_SAFE = @TH_SAFE@
... ...
@@ -448,7 +449,7 @@ sigtool_SOURCES = \
448 448
     sigtool.c
449 449
 
450 450
 AM_CFLAGS = @WERR_CFLAGS@
451
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
451
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav @SIGTOOL_CPPFLAGS@
452 452
 CLEANFILES = *.gcda *.gcno
453 453
 all: all-am
454 454
 
... ...
@@ -1,4 +1,4 @@
1
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
1
+# Makefile.in generated by automake 1.14 from Makefile.am.
2 2
 # @configure_input@
3 3
 
4 4
 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
... ...
@@ -102,6 +102,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
102 102
 	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
103 103
 	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
104 104
 	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
105
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
106
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
105 107
 	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
106 108
 	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
107 109
 	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
... ...
@@ -143,8 +145,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
143 143
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
144 144
 	$(top_srcdir)/m4/reorganization/bsd.m4 \
145 145
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
146
-	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
147
-	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
148 146
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
149 147
 	$(top_srcdir)/configure.ac
150 148
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
... ...
@@ -290,6 +290,7 @@ SED = @SED@
290 290
 SET_MAKE = @SET_MAKE@
291 291
 SHELL = @SHELL@
292 292
 SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
293
+SSL_CPPFLAGS = @SSL_CPPFLAGS@
293 294
 STRIP = @STRIP@
294 295
 THREAD_LIBS = @THREAD_LIBS@
295 296
 TH_SAFE = @TH_SAFE@
... ...
@@ -1,4 +1,4 @@
1
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
1
+# Makefile.in generated by automake 1.14 from Makefile.am.
2 2
 # @configure_input@
3 3
 
4 4
 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
... ...
@@ -105,6 +105,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
105 105
 	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
106 106
 	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
107 107
 	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
108
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
109
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
108 110
 	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
109 111
 	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
110 112
 	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
... ...
@@ -146,8 +148,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
146 146
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
147 147
 	$(top_srcdir)/m4/reorganization/bsd.m4 \
148 148
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
149
-	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
150
-	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
151 149
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
152 150
 	$(top_srcdir)/configure.ac
153 151
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
... ...
@@ -578,6 +578,7 @@ SED = @SED@
578 578
 SET_MAKE = @SET_MAKE@
579 579
 SHELL = @SHELL@
580 580
 SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
581
+SSL_CPPFLAGS = @SSL_CPPFLAGS@
581 582
 STRIP = @STRIP@
582 583
 THREAD_LIBS = @THREAD_LIBS@
583 584
 TH_SAFE = @TH_SAFE@