Browse code

build system modernization: (based on suggestion from Markus Elfring <Markus.Elfring*web.de> in bb #452) * use AC_CONFIG_HEADER, since AM_CONFIG_HEADER is obsolete * put configure files into auxiliary directory * fix main declaration in FD_SETSIZE test * check for failure on fopen in FD_SETSIZE test * move version from AM_INIT_AUTOMAKE to AC_INIT, old form was obsolete * eliminate automake warnings, update Makefile.am * rename .splitted to .split (requested by aCaB)

git-svn: trunk@3563

Török Edvin authored on 2008/01/31 06:06:36
Showing 71 changed files
... ...
@@ -1,10 +1,23 @@
1
+Wed Jan 30 22:42:39 EET 2008 (edwin)
2
+------------------------------------
3
+ * build system modernization: (based on suggestion from
4
+		  Markus Elfring <Markus.Elfring*web.de> in bb #452)
5
+	* use AC_CONFIG_HEADER, since AM_CONFIG_HEADER is obsolete
6
+	* put configure files into auxiliary directory
7
+	* fix main declaration in FD_SETSIZE test
8
+	* check for failure on fopen in FD_SETSIZE test
9
+	* move version from AM_INIT_AUTOMAKE to AC_INIT, old form was obsolete
10
+	* eliminate automake warnings, update Makefile.am
11
+	* rename .splitted to .split (requested by aCaB)
12
+
13
+
1 14
 Wed Jan 30 20:45:38 CET 2008 (tk)
2 15
 ---------------------------------
3 16
   * libclamav/readdb.c: make the parser more sensitive to syntax errors (bb#238)
4 17
 
5 18
 Wed Jan 30 20:23:20 EET 2008 (edwin)
6 19
 ------------------------------------
7
-  * libclamav/phishcheck.c, regex_list.c: when domain matchers, preserve full
20
+  * libclamav/phishcheck.c, regex_list.c: when domain matches, preserve full
8 21
   subdomain(bb #721)
9 22
 
10 23
 Tue Jan 29 17:50:05 GMT 2008 (njh)
... ...
@@ -66,8 +66,9 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
66 66
 	$(top_srcdir)/docs/man/freshclam.1.in \
67 67
 	$(top_srcdir)/docs/man/freshclam.conf.5.in \
68 68
 	$(top_srcdir)/docs/man/sigtool.1.in AUTHORS COPYING ChangeLog \
69
-	INSTALL NEWS config.guess config.sub depcomp install-sh \
70
-	ltmain.sh missing mkinstalldirs
69
+	INSTALL NEWS config/config.guess config/config.sub \
70
+	config/depcomp config/install-sh config/ltmain.sh \
71
+	config/missing mkinstalldirs
71 72
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
72 73
 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
73 74
 	$(top_srcdir)/configure.in
... ...
@@ -75,7 +76,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
75 75
 	$(ACLOCAL_M4)
76 76
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
77 77
  configure.lineno config.status.lineno
78
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
78
+mkinstalldirs = $(install_sh) -d
79 79
 CONFIG_HEADER = clamav-config.h
80 80
 CONFIG_CLEAN_FILES = clamav-config libclamav.pc \
81 81
 	docs/man/clamav-milter.8 docs/man/clamconf.1 docs/man/clamd.8 \
... ...
@@ -114,7 +115,7 @@ am__remove_distdir = \
114 114
   { test ! -d $(distdir) \
115 115
     || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
116 116
          && rm -fr $(distdir); }; }
117
-DIST_ARCHIVES = $(distdir).tar.gz
117
+DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
118 118
 GZIP_ENV = --best
119 119
 distuninstallcheck_listfiles = find . -type f -print
120 120
 distcleancheck_listfiles = find . -type f -print
... ...
@@ -250,15 +251,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
250 250
 	@for dep in $?; do \
251 251
 	  case '$(am__configure_deps)' in \
252 252
 	    *$$dep*) \
253
-	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
254
-	      cd $(srcdir) && $(AUTOMAKE) --gnu  \
253
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
254
+	      cd $(srcdir) && $(AUTOMAKE) --foreign  \
255 255
 		&& exit 0; \
256 256
 	      exit 1;; \
257 257
 	  esac; \
258 258
 	done; \
259
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
259
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  Makefile'; \
260 260
 	cd $(top_srcdir) && \
261
-	  $(AUTOMAKE) --gnu  Makefile
261
+	  $(AUTOMAKE) --foreign  Makefile
262 262
 .PRECIOUS: Makefile
263 263
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
264 264
 	@case '$?' in \
... ...
@@ -546,7 +547,6 @@ distdir: $(DISTFILES)
546 546
 dist-gzip: distdir
547 547
 	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
548 548
 	$(am__remove_distdir)
549
-
550 549
 dist-bzip2: distdir
551 550
 	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
552 551
 	$(am__remove_distdir)
... ...
@@ -566,6 +566,7 @@ dist-zip: distdir
566 566
 
567 567
 dist dist-all: distdir
568 568
 	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
569
+	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
569 570
 	$(am__remove_distdir)
570 571
 
571 572
 # This target untars the dist file and tries a VPATH configuration.  Then
... ...
@@ -6946,18 +6946,6 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
6946 6946
      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
6947 6947
 ])
6948 6948
 
6949
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
6950
-# Free Software Foundation, Inc.
6951
-#
6952
-# This file is free software; the Free Software Foundation
6953
-# gives unlimited permission to copy and/or distribute it,
6954
-# with or without modifications, as long as this notice is preserved.
6955
-
6956
-# serial 8
6957
-
6958
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
6959
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
6960
-
6961 6949
 # Do all the work for Automake.                             -*- Autoconf -*-
6962 6950
 
6963 6951
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
... ...
@@ -306,7 +306,7 @@
306 306
 /* "no fd_set" */
307 307
 #undef NO_FD_SET
308 308
 
309
-/* Name of package */
309
+/* package name */
310 310
 #undef PACKAGE
311 311
 
312 312
 /* Define to the address where bug reports for this package should be sent. */
... ...
@@ -360,7 +360,7 @@
360 360
 /* use syslog */
361 361
 #undef USE_SYSLOG
362 362
 
363
-/* Version number of package */
363
+/* package version */
364 364
 #undef VERSION
365 365
 
366 366
 /* tcpwrappers support */
... ...
@@ -41,5 +41,5 @@ endif
41 41
 endif
42 42
 
43 43
 LIBS = $(top_builddir)/libclamav/libclamav.la @CLAMAV_MILTER_LIBS@ @THREAD_LIBS@
44
-INCLUDES = -I$(top_srcdir)/clamd -I$(top_srcdir)/libclamav -I$(top_srcdir)/shared -I$(top_srcdir)
44
+AM_CPPFLAGS = -I$(top_srcdir)/clamd -I$(top_srcdir)/libclamav -I$(top_srcdir)/shared -I$(top_srcdir)
45 45
 EXTRA_DIST = clamav-milter.c INSTALL
... ...
@@ -60,7 +60,7 @@ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
60 60
 	$(top_srcdir)/configure.in
61 61
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
62 62
 	$(ACLOCAL_M4)
63
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
63
+mkinstalldirs = $(install_sh) -d
64 64
 CONFIG_HEADER = $(top_builddir)/clamav-config.h
65 65
 CONFIG_CLEAN_FILES =
66 66
 am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"
... ...
@@ -82,7 +82,7 @@ am__clamav_milter_SOURCES_DIST = $(top_srcdir)/shared/cfgparser.c \
82 82
 clamav_milter_OBJECTS = $(am_clamav_milter_OBJECTS)
83 83
 clamav_milter_LDADD = $(LDADD)
84 84
 DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
85
-depcomp = $(SHELL) $(top_srcdir)/depcomp
85
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
86 86
 am__depfiles_maybe = depfiles
87 87
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
88 88
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
... ...
@@ -232,7 +232,7 @@ top_srcdir = @top_srcdir@
232 232
 @BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@    clamav-milter.c
233 233
 
234 234
 @BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@man_MANS = $(top_builddir)/docs/man/clamav-milter.8
235
-INCLUDES = -I$(top_srcdir)/clamd -I$(top_srcdir)/libclamav -I$(top_srcdir)/shared -I$(top_srcdir)
235
+AM_CPPFLAGS = -I$(top_srcdir)/clamd -I$(top_srcdir)/libclamav -I$(top_srcdir)/shared -I$(top_srcdir)
236 236
 EXTRA_DIST = clamav-milter.c INSTALL
237 237
 all: all-am
238 238
 
... ...
@@ -247,9 +247,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
247 247
 	      exit 1;; \
248 248
 	  esac; \
249 249
 	done; \
250
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  clamav-milter/Makefile'; \
250
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  clamav-milter/Makefile'; \
251 251
 	cd $(top_srcdir) && \
252
-	  $(AUTOMAKE) --gnu  clamav-milter/Makefile
252
+	  $(AUTOMAKE) --foreign  clamav-milter/Makefile
253 253
 .PRECIOUS: Makefile
254 254
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
255 255
 	@case '$?' in \
... ...
@@ -28,5 +28,5 @@ clamconf_SOURCES = \
28 28
     clamconf.c
29 29
 
30 30
 DEFS = @DEFS@ -DCL_NOTHREADS
31
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
31
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
32 32
 LIBS = $(top_builddir)/libclamav/libclamav.la @THREAD_LIBS@
... ...
@@ -59,7 +59,7 @@ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
59 59
 	$(top_srcdir)/configure.in
60 60
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
61 61
 	$(ACLOCAL_M4)
62
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
62
+mkinstalldirs = $(install_sh) -d
63 63
 CONFIG_HEADER = $(top_builddir)/clamav-config.h
64 64
 CONFIG_CLEAN_FILES =
65 65
 am__installdirs = "$(DESTDIR)$(bindir)"
... ...
@@ -70,7 +70,7 @@ am_clamconf_OBJECTS = cfgparser.$(OBJEXT) misc.$(OBJEXT) \
70 70
 clamconf_OBJECTS = $(am_clamconf_OBJECTS)
71 71
 clamconf_LDADD = $(LDADD)
72 72
 DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
73
-depcomp = $(SHELL) $(top_srcdir)/depcomp
73
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
74 74
 am__depfiles_maybe = depfiles
75 75
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
76 76
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
... ...
@@ -212,7 +212,7 @@ clamconf_SOURCES = \
212 212
     $(top_srcdir)/shared/getopt.h \
213 213
     clamconf.c
214 214
 
215
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
215
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
216 216
 all: all-am
217 217
 
218 218
 .SUFFIXES:
... ...
@@ -226,9 +226,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
226 226
 	      exit 1;; \
227 227
 	  esac; \
228 228
 	done; \
229
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  clamconf/Makefile'; \
229
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  clamconf/Makefile'; \
230 230
 	cd $(top_srcdir) && \
231
-	  $(AUTOMAKE) --gnu  clamconf/Makefile
231
+	  $(AUTOMAKE) --foreign  clamconf/Makefile
232 232
 .PRECIOUS: Makefile
233 233
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
234 234
 	@case '$?' in \
... ...
@@ -61,4 +61,4 @@ clamd_SOURCES = \
61 61
 endif
62 62
 
63 63
 LIBS = $(top_builddir)/libclamav/libclamav.la @CLAMD_LIBS@ @THREAD_LIBS@
64
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
64
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
... ...
@@ -59,7 +59,7 @@ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
59 59
 	$(top_srcdir)/configure.in
60 60
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
61 61
 	$(ACLOCAL_M4)
62
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
62
+mkinstalldirs = $(install_sh) -d
63 63
 CONFIG_HEADER = $(top_builddir)/clamav-config.h
64 64
 CONFIG_CLEAN_FILES =
65 65
 am__installdirs = "$(DESTDIR)$(sbindir)"
... ...
@@ -90,7 +90,7 @@ am__clamd_SOURCES_DIST = $(top_srcdir)/shared/output.c \
90 90
 clamd_OBJECTS = $(am_clamd_OBJECTS)
91 91
 clamd_LDADD = $(LDADD)
92 92
 DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
93
-depcomp = $(SHELL) $(top_srcdir)/depcomp
93
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
94 94
 am__depfiles_maybe = depfiles
95 95
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
96 96
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
... ...
@@ -261,7 +261,7 @@ top_srcdir = @top_srcdir@
261 261
 @BUILD_CLAMD_TRUE@    dazukoio_xp.h \
262 262
 @BUILD_CLAMD_TRUE@    shared.h
263 263
 
264
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
264
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
265 265
 all: all-am
266 266
 
267 267
 .SUFFIXES:
... ...
@@ -275,9 +275,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
275 275
 	      exit 1;; \
276 276
 	  esac; \
277 277
 	done; \
278
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  clamd/Makefile'; \
278
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  clamd/Makefile'; \
279 279
 	cd $(top_srcdir) && \
280
-	  $(AUTOMAKE) --gnu  clamd/Makefile
280
+	  $(AUTOMAKE) --foreign  clamd/Makefile
281 281
 .PRECIOUS: Makefile
282 282
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
283 283
 	@case '$?' in \
... ...
@@ -39,5 +39,5 @@ clamdscan_SOURCES = \
39 39
 endif
40 40
 
41 41
 DEFS = @DEFS@ -DCL_NOTHREADS -DCL_NOLIBCLAMAV
42
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/clamscan -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
42
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/clamscan -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
43 43
 LIBS = $(top_builddir)/libclamav/libclamav_internal_utils.la @FRESHCLAM_LIBS@
... ...
@@ -59,7 +59,7 @@ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
59 59
 	$(top_srcdir)/configure.in
60 60
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
61 61
 	$(ACLOCAL_M4)
62
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
62
+mkinstalldirs = $(install_sh) -d
63 63
 CONFIG_HEADER = $(top_builddir)/clamav-config.h
64 64
 CONFIG_CLEAN_FILES =
65 65
 am__installdirs = "$(DESTDIR)$(bindir)"
... ...
@@ -79,7 +79,7 @@ am__clamdscan_SOURCES_DIST = $(top_srcdir)/shared/output.c \
79 79
 clamdscan_OBJECTS = $(am_clamdscan_OBJECTS)
80 80
 clamdscan_LDADD = $(LDADD)
81 81
 DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
82
-depcomp = $(SHELL) $(top_srcdir)/depcomp
82
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
83 83
 am__depfiles_maybe = depfiles
84 84
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
85 85
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
... ...
@@ -228,7 +228,7 @@ top_srcdir = @top_srcdir@
228 228
 @BUILD_CLAMD_TRUE@    client.h \
229 229
 @BUILD_CLAMD_TRUE@    defaults.h
230 230
 
231
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/clamscan -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
231
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/clamscan -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
232 232
 all: all-am
233 233
 
234 234
 .SUFFIXES:
... ...
@@ -242,9 +242,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
242 242
 	      exit 1;; \
243 243
 	  esac; \
244 244
 	done; \
245
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  clamdscan/Makefile'; \
245
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  clamdscan/Makefile'; \
246 246
 	cd $(top_srcdir) && \
247
-	  $(AUTOMAKE) --gnu  clamdscan/Makefile
247
+	  $(AUTOMAKE) --foreign  clamdscan/Makefile
248 248
 .PRECIOUS: Makefile
249 249
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
250 250
 	@case '$?' in \
... ...
@@ -42,4 +42,4 @@ clamscan_SOURCES = \
42 42
 
43 43
 DEFS = @DEFS@ -DCL_NOTHREADS
44 44
 LIBS = $(top_builddir)/libclamav/libclamav.la @THREAD_LIBS@
45
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
45
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
... ...
@@ -60,7 +60,7 @@ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
60 60
 	$(top_srcdir)/configure.in
61 61
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
62 62
 	$(ACLOCAL_M4)
63
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
63
+mkinstalldirs = $(install_sh) -d
64 64
 CONFIG_HEADER = $(top_builddir)/clamav-config.h
65 65
 CONFIG_CLEAN_FILES =
66 66
 am__installdirs = "$(DESTDIR)$(bindir)"
... ...
@@ -73,7 +73,7 @@ am_clamscan_OBJECTS = output.$(OBJEXT) getopt.$(OBJEXT) \
73 73
 clamscan_OBJECTS = $(am_clamscan_OBJECTS)
74 74
 clamscan_LDADD = $(LDADD)
75 75
 DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
76
-depcomp = $(SHELL) $(top_srcdir)/depcomp
76
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
77 77
 am__depfiles_maybe = depfiles
78 78
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
79 79
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
... ...
@@ -227,7 +227,7 @@ clamscan_SOURCES = \
227 227
     treewalk.c \
228 228
     treewalk.h
229 229
 
230
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
230
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
231 231
 all: all-am
232 232
 
233 233
 .SUFFIXES:
... ...
@@ -241,9 +241,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
241 241
 	      exit 1;; \
242 242
 	  esac; \
243 243
 	done; \
244
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  clamscan/Makefile'; \
244
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  clamscan/Makefile'; \
245 245
 	cd $(top_srcdir) && \
246
-	  $(AUTOMAKE) --gnu  clamscan/Makefile
246
+	  $(AUTOMAKE) --foreign  clamscan/Makefile
247 247
 .PRECIOUS: Makefile
248 248
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
249 249
 	@case '$?' in \
250 250
deleted file mode 100755
... ...
@@ -1,1516 +0,0 @@
1
-#! /bin/sh
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 Free Software Foundation,
5
-#   Inc.
6
-
7
-timestamp='2007-07-22'
8
-
9
-# This file is free software; you can redistribute it and/or modify it
10
-# under the terms of the GNU General Public License as published by
11
-# the Free Software Foundation; either version 2 of the License, or
12
-# (at your option) any later version.
13
-#
14
-# This program is distributed in the hope that it will be useful, but
15
-# WITHOUT ANY WARRANTY; without even the implied warranty of
16
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17
-# General Public License for more details.
18
-#
19
-# You should have received a copy of the GNU General Public License
20
-# along with this program; if not, write to the Free Software
21
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
22
-# 02110-1301, USA.
23
-#
24
-# As a special exception to the GNU General Public License, if you
25
-# distribute this file as part of a program that contains a
26
-# configuration script generated by Autoconf, you may include it under
27
-# the same distribution terms that you use for the rest of that program.
28
-
29
-
30
-# Originally written by Per Bothner <per@bothner.com>.
31
-# Please send patches to <config-patches@gnu.org>.  Submit a context
32
-# diff and a properly formatted ChangeLog entry.
33
-#
34
-# This script attempts to guess a canonical system name similar to
35
-# config.sub.  If it succeeds, it prints the system name on stdout, and
36
-# exits with 0.  Otherwise, it exits with 1.
37
-#
38
-# The plan is that this can be called by configure scripts if you
39
-# don't specify an explicit build system type.
40
-
41
-me=`echo "$0" | sed -e 's,.*/,,'`
42
-
43
-usage="\
44
-Usage: $0 [OPTION]
45
-
46
-Output the configuration name of the system \`$me' is run on.
47
-
48
-Operation modes:
49
-  -h, --help         print this help, then exit
50
-  -t, --time-stamp   print date of last modification, then exit
51
-  -v, --version      print version number, then exit
52
-
53
-Report bugs and patches to <config-patches@gnu.org>."
54
-
55
-version="\
56
-GNU config.guess ($timestamp)
57
-
58
-Originally written by Per Bothner.
59
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
60
-Free Software Foundation, Inc.
61
-
62
-This is free software; see the source for copying conditions.  There is NO
63
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
64
-
65
-help="
66
-Try \`$me --help' for more information."
67
-
68
-# Parse command line
69
-while test $# -gt 0 ; do
70
-  case $1 in
71
-    --time-stamp | --time* | -t )
72
-       echo "$timestamp" ; exit ;;
73
-    --version | -v )
74
-       echo "$version" ; exit ;;
75
-    --help | --h* | -h )
76
-       echo "$usage"; exit ;;
77
-    -- )     # Stop option processing
78
-       shift; break ;;
79
-    - )	# Use stdin as input.
80
-       break ;;
81
-    -* )
82
-       echo "$me: invalid option $1$help" >&2
83
-       exit 1 ;;
84
-    * )
85
-       break ;;
86
-  esac
87
-done
88
-
89
-if test $# != 0; then
90
-  echo "$me: too many arguments$help" >&2
91
-  exit 1
92
-fi
93
-
94
-trap 'exit 1' 1 2 15
95
-
96
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
97
-# compiler to aid in system detection is discouraged as it requires
98
-# temporary files to be created and, as you can see below, it is a
99
-# headache to deal with in a portable fashion.
100
-
101
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
102
-# use `HOST_CC' if defined, but it is deprecated.
103
-
104
-# Portable tmp directory creation inspired by the Autoconf team.
105
-
106
-set_cc_for_build='
107
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
108
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
109
-: ${TMPDIR=/tmp} ;
110
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
111
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
112
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
113
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
114
-dummy=$tmp/dummy ;
115
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
116
-case $CC_FOR_BUILD,$HOST_CC,$CC in
117
- ,,)    echo "int x;" > $dummy.c ;
118
-	for c in cc gcc c89 c99 ; do
119
-	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
120
-	     CC_FOR_BUILD="$c"; break ;
121
-	  fi ;
122
-	done ;
123
-	if test x"$CC_FOR_BUILD" = x ; then
124
-	  CC_FOR_BUILD=no_compiler_found ;
125
-	fi
126
-	;;
127
- ,,*)   CC_FOR_BUILD=$CC ;;
128
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
129
-esac ; set_cc_for_build= ;'
130
-
131
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
132
-# (ghazi@noc.rutgers.edu 1994-08-24)
133
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
134
-	PATH=$PATH:/.attbin ; export PATH
135
-fi
136
-
137
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
138
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
139
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
140
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
141
-
142
-# Note: order is significant - the case branches are not exclusive.
143
-
144
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
145
-    *:NetBSD:*:*)
146
-	# NetBSD (nbsd) targets should (where applicable) match one or
147
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
148
-	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
149
-	# switched to ELF, *-*-netbsd* would select the old
150
-	# object file format.  This provides both forward
151
-	# compatibility and a consistent mechanism for selecting the
152
-	# object file format.
153
-	#
154
-	# Note: NetBSD doesn't particularly care about the vendor
155
-	# portion of the name.  We always set it to "unknown".
156
-	sysctl="sysctl -n hw.machine_arch"
157
-	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
158
-	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
159
-	case "${UNAME_MACHINE_ARCH}" in
160
-	    armeb) machine=armeb-unknown ;;
161
-	    arm*) machine=arm-unknown ;;
162
-	    sh3el) machine=shl-unknown ;;
163
-	    sh3eb) machine=sh-unknown ;;
164
-	    sh5el) machine=sh5le-unknown ;;
165
-	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
166
-	esac
167
-	# The Operating System including object format, if it has switched
168
-	# to ELF recently, or will in the future.
169
-	case "${UNAME_MACHINE_ARCH}" in
170
-	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
171
-		eval $set_cc_for_build
172
-		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
173
-			| grep __ELF__ >/dev/null
174
-		then
175
-		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
176
-		    # Return netbsd for either.  FIX?
177
-		    os=netbsd
178
-		else
179
-		    os=netbsdelf
180
-		fi
181
-		;;
182
-	    *)
183
-	        os=netbsd
184
-		;;
185
-	esac
186
-	# The OS release
187
-	# Debian GNU/NetBSD machines have a different userland, and
188
-	# thus, need a distinct triplet. However, they do not need
189
-	# kernel version information, so it can be replaced with a
190
-	# suitable tag, in the style of linux-gnu.
191
-	case "${UNAME_VERSION}" in
192
-	    Debian*)
193
-		release='-gnu'
194
-		;;
195
-	    *)
196
-		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
197
-		;;
198
-	esac
199
-	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
200
-	# contains redundant information, the shorter form:
201
-	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
202
-	echo "${machine}-${os}${release}"
203
-	exit ;;
204
-    *:OpenBSD:*:*)
205
-	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
206
-	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
207
-	exit ;;
208
-    *:ekkoBSD:*:*)
209
-	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
210
-	exit ;;
211
-    *:SolidBSD:*:*)
212
-	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
213
-	exit ;;
214
-    macppc:MirBSD:*:*)
215
-	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
216
-	exit ;;
217
-    *:MirBSD:*:*)
218
-	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
219
-	exit ;;
220
-    alpha:OSF1:*:*)
221
-	case $UNAME_RELEASE in
222
-	*4.0)
223
-		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
224
-		;;
225
-	*5.*)
226
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
227
-		;;
228
-	esac
229
-	# According to Compaq, /usr/sbin/psrinfo has been available on
230
-	# OSF/1 and Tru64 systems produced since 1995.  I hope that
231
-	# covers most systems running today.  This code pipes the CPU
232
-	# types through head -n 1, so we only detect the type of CPU 0.
233
-	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
234
-	case "$ALPHA_CPU_TYPE" in
235
-	    "EV4 (21064)")
236
-		UNAME_MACHINE="alpha" ;;
237
-	    "EV4.5 (21064)")
238
-		UNAME_MACHINE="alpha" ;;
239
-	    "LCA4 (21066/21068)")
240
-		UNAME_MACHINE="alpha" ;;
241
-	    "EV5 (21164)")
242
-		UNAME_MACHINE="alphaev5" ;;
243
-	    "EV5.6 (21164A)")
244
-		UNAME_MACHINE="alphaev56" ;;
245
-	    "EV5.6 (21164PC)")
246
-		UNAME_MACHINE="alphapca56" ;;
247
-	    "EV5.7 (21164PC)")
248
-		UNAME_MACHINE="alphapca57" ;;
249
-	    "EV6 (21264)")
250
-		UNAME_MACHINE="alphaev6" ;;
251
-	    "EV6.7 (21264A)")
252
-		UNAME_MACHINE="alphaev67" ;;
253
-	    "EV6.8CB (21264C)")
254
-		UNAME_MACHINE="alphaev68" ;;
255
-	    "EV6.8AL (21264B)")
256
-		UNAME_MACHINE="alphaev68" ;;
257
-	    "EV6.8CX (21264D)")
258
-		UNAME_MACHINE="alphaev68" ;;
259
-	    "EV6.9A (21264/EV69A)")
260
-		UNAME_MACHINE="alphaev69" ;;
261
-	    "EV7 (21364)")
262
-		UNAME_MACHINE="alphaev7" ;;
263
-	    "EV7.9 (21364A)")
264
-		UNAME_MACHINE="alphaev79" ;;
265
-	esac
266
-	# A Pn.n version is a patched version.
267
-	# A Vn.n version is a released version.
268
-	# A Tn.n version is a released field test version.
269
-	# A Xn.n version is an unreleased experimental baselevel.
270
-	# 1.2 uses "1.2" for uname -r.
271
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
272
-	exit ;;
273
-    Alpha\ *:Windows_NT*:*)
274
-	# How do we know it's Interix rather than the generic POSIX subsystem?
275
-	# Should we change UNAME_MACHINE based on the output of uname instead
276
-	# of the specific Alpha model?
277
-	echo alpha-pc-interix
278
-	exit ;;
279
-    21064:Windows_NT:50:3)
280
-	echo alpha-dec-winnt3.5
281
-	exit ;;
282
-    Amiga*:UNIX_System_V:4.0:*)
283
-	echo m68k-unknown-sysv4
284
-	exit ;;
285
-    *:[Aa]miga[Oo][Ss]:*:*)
286
-	echo ${UNAME_MACHINE}-unknown-amigaos
287
-	exit ;;
288
-    *:[Mm]orph[Oo][Ss]:*:*)
289
-	echo ${UNAME_MACHINE}-unknown-morphos
290
-	exit ;;
291
-    *:OS/390:*:*)
292
-	echo i370-ibm-openedition
293
-	exit ;;
294
-    *:z/VM:*:*)
295
-	echo s390-ibm-zvmoe
296
-	exit ;;
297
-    *:OS400:*:*)
298
-        echo powerpc-ibm-os400
299
-	exit ;;
300
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
301
-	echo arm-acorn-riscix${UNAME_RELEASE}
302
-	exit ;;
303
-    arm:riscos:*:*|arm:RISCOS:*:*)
304
-	echo arm-unknown-riscos
305
-	exit ;;
306
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
307
-	echo hppa1.1-hitachi-hiuxmpp
308
-	exit ;;
309
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
310
-	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
311
-	if test "`(/bin/universe) 2>/dev/null`" = att ; then
312
-		echo pyramid-pyramid-sysv3
313
-	else
314
-		echo pyramid-pyramid-bsd
315
-	fi
316
-	exit ;;
317
-    NILE*:*:*:dcosx)
318
-	echo pyramid-pyramid-svr4
319
-	exit ;;
320
-    DRS?6000:unix:4.0:6*)
321
-	echo sparc-icl-nx6
322
-	exit ;;
323
-    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
324
-	case `/usr/bin/uname -p` in
325
-	    sparc) echo sparc-icl-nx7; exit ;;
326
-	esac ;;
327
-    sun4H:SunOS:5.*:*)
328
-	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
329
-	exit ;;
330
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
331
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
332
-	exit ;;
333
-    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
334
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
335
-	exit ;;
336
-    sun4*:SunOS:6*:*)
337
-	# According to config.sub, this is the proper way to canonicalize
338
-	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
339
-	# it's likely to be more like Solaris than SunOS4.
340
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
341
-	exit ;;
342
-    sun4*:SunOS:*:*)
343
-	case "`/usr/bin/arch -k`" in
344
-	    Series*|S4*)
345
-		UNAME_RELEASE=`uname -v`
346
-		;;
347
-	esac
348
-	# Japanese Language versions have a version number like `4.1.3-JL'.
349
-	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
350
-	exit ;;
351
-    sun3*:SunOS:*:*)
352
-	echo m68k-sun-sunos${UNAME_RELEASE}
353
-	exit ;;
354
-    sun*:*:4.2BSD:*)
355
-	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
356
-	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
357
-	case "`/bin/arch`" in
358
-	    sun3)
359
-		echo m68k-sun-sunos${UNAME_RELEASE}
360
-		;;
361
-	    sun4)
362
-		echo sparc-sun-sunos${UNAME_RELEASE}
363
-		;;
364
-	esac
365
-	exit ;;
366
-    aushp:SunOS:*:*)
367
-	echo sparc-auspex-sunos${UNAME_RELEASE}
368
-	exit ;;
369
-    # The situation for MiNT is a little confusing.  The machine name
370
-    # can be virtually everything (everything which is not
371
-    # "atarist" or "atariste" at least should have a processor
372
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
373
-    # to the lowercase version "mint" (or "freemint").  Finally
374
-    # the system name "TOS" denotes a system which is actually not
375
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
376
-    # be no problem.
377
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
378
-        echo m68k-atari-mint${UNAME_RELEASE}
379
-	exit ;;
380
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
381
-	echo m68k-atari-mint${UNAME_RELEASE}
382
-        exit ;;
383
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
384
-        echo m68k-atari-mint${UNAME_RELEASE}
385
-	exit ;;
386
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
387
-        echo m68k-milan-mint${UNAME_RELEASE}
388
-        exit ;;
389
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
390
-        echo m68k-hades-mint${UNAME_RELEASE}
391
-        exit ;;
392
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
393
-        echo m68k-unknown-mint${UNAME_RELEASE}
394
-        exit ;;
395
-    m68k:machten:*:*)
396
-	echo m68k-apple-machten${UNAME_RELEASE}
397
-	exit ;;
398
-    powerpc:machten:*:*)
399
-	echo powerpc-apple-machten${UNAME_RELEASE}
400
-	exit ;;
401
-    RISC*:Mach:*:*)
402
-	echo mips-dec-mach_bsd4.3
403
-	exit ;;
404
-    RISC*:ULTRIX:*:*)
405
-	echo mips-dec-ultrix${UNAME_RELEASE}
406
-	exit ;;
407
-    VAX*:ULTRIX*:*:*)
408
-	echo vax-dec-ultrix${UNAME_RELEASE}
409
-	exit ;;
410
-    2020:CLIX:*:* | 2430:CLIX:*:*)
411
-	echo clipper-intergraph-clix${UNAME_RELEASE}
412
-	exit ;;
413
-    mips:*:*:UMIPS | mips:*:*:RISCos)
414
-	eval $set_cc_for_build
415
-	sed 's/^	//' << EOF >$dummy.c
416
-#ifdef __cplusplus
417
-#include <stdio.h>  /* for printf() prototype */
418
-	int main (int argc, char *argv[]) {
419
-#else
420
-	int main (argc, argv) int argc; char *argv[]; {
421
-#endif
422
-	#if defined (host_mips) && defined (MIPSEB)
423
-	#if defined (SYSTYPE_SYSV)
424
-	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
425
-	#endif
426
-	#if defined (SYSTYPE_SVR4)
427
-	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
428
-	#endif
429
-	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
430
-	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
431
-	#endif
432
-	#endif
433
-	  exit (-1);
434
-	}
435
-EOF
436
-	$CC_FOR_BUILD -o $dummy $dummy.c &&
437
-	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
438
-	  SYSTEM_NAME=`$dummy $dummyarg` &&
439
-	    { echo "$SYSTEM_NAME"; exit; }
440
-	echo mips-mips-riscos${UNAME_RELEASE}
441
-	exit ;;
442
-    Motorola:PowerMAX_OS:*:*)
443
-	echo powerpc-motorola-powermax
444
-	exit ;;
445
-    Motorola:*:4.3:PL8-*)
446
-	echo powerpc-harris-powermax
447
-	exit ;;
448
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
449
-	echo powerpc-harris-powermax
450
-	exit ;;
451
-    Night_Hawk:Power_UNIX:*:*)
452
-	echo powerpc-harris-powerunix
453
-	exit ;;
454
-    m88k:CX/UX:7*:*)
455
-	echo m88k-harris-cxux7
456
-	exit ;;
457
-    m88k:*:4*:R4*)
458
-	echo m88k-motorola-sysv4
459
-	exit ;;
460
-    m88k:*:3*:R3*)
461
-	echo m88k-motorola-sysv3
462
-	exit ;;
463
-    AViiON:dgux:*:*)
464
-        # DG/UX returns AViiON for all architectures
465
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
466
-	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
467
-	then
468
-	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
469
-	       [ ${TARGET_BINARY_INTERFACE}x = x ]
470
-	    then
471
-		echo m88k-dg-dgux${UNAME_RELEASE}
472
-	    else
473
-		echo m88k-dg-dguxbcs${UNAME_RELEASE}
474
-	    fi
475
-	else
476
-	    echo i586-dg-dgux${UNAME_RELEASE}
477
-	fi
478
- 	exit ;;
479
-    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
480
-	echo m88k-dolphin-sysv3
481
-	exit ;;
482
-    M88*:*:R3*:*)
483
-	# Delta 88k system running SVR3
484
-	echo m88k-motorola-sysv3
485
-	exit ;;
486
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
487
-	echo m88k-tektronix-sysv3
488
-	exit ;;
489
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
490
-	echo m68k-tektronix-bsd
491
-	exit ;;
492
-    *:IRIX*:*:*)
493
-	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
494
-	exit ;;
495
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
496
-	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
497
-	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
498
-    i*86:AIX:*:*)
499
-	echo i386-ibm-aix
500
-	exit ;;
501
-    ia64:AIX:*:*)
502
-	if [ -x /usr/bin/oslevel ] ; then
503
-		IBM_REV=`/usr/bin/oslevel`
504
-	else
505
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
506
-	fi
507
-	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
508
-	exit ;;
509
-    *:AIX:2:3)
510
-	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
511
-		eval $set_cc_for_build
512
-		sed 's/^		//' << EOF >$dummy.c
513
-		#include <sys/systemcfg.h>
514
-
515
-		main()
516
-			{
517
-			if (!__power_pc())
518
-				exit(1);
519
-			puts("powerpc-ibm-aix3.2.5");
520
-			exit(0);
521
-			}
522
-EOF
523
-		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
524
-		then
525
-			echo "$SYSTEM_NAME"
526
-		else
527
-			echo rs6000-ibm-aix3.2.5
528
-		fi
529
-	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
530
-		echo rs6000-ibm-aix3.2.4
531
-	else
532
-		echo rs6000-ibm-aix3.2
533
-	fi
534
-	exit ;;
535
-    *:AIX:*:[45])
536
-	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
537
-	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
538
-		IBM_ARCH=rs6000
539
-	else
540
-		IBM_ARCH=powerpc
541
-	fi
542
-	if [ -x /usr/bin/oslevel ] ; then
543
-		IBM_REV=`/usr/bin/oslevel`
544
-	else
545
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
546
-	fi
547
-	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
548
-	exit ;;
549
-    *:AIX:*:*)
550
-	echo rs6000-ibm-aix
551
-	exit ;;
552
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
553
-	echo romp-ibm-bsd4.4
554
-	exit ;;
555
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
556
-	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
557
-	exit ;;                             # report: romp-ibm BSD 4.3
558
-    *:BOSX:*:*)
559
-	echo rs6000-bull-bosx
560
-	exit ;;
561
-    DPX/2?00:B.O.S.:*:*)
562
-	echo m68k-bull-sysv3
563
-	exit ;;
564
-    9000/[34]??:4.3bsd:1.*:*)
565
-	echo m68k-hp-bsd
566
-	exit ;;
567
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
568
-	echo m68k-hp-bsd4.4
569
-	exit ;;
570
-    9000/[34678]??:HP-UX:*:*)
571
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
572
-	case "${UNAME_MACHINE}" in
573
-	    9000/31? )            HP_ARCH=m68000 ;;
574
-	    9000/[34]?? )         HP_ARCH=m68k ;;
575
-	    9000/[678][0-9][0-9])
576
-		if [ -x /usr/bin/getconf ]; then
577
-		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
578
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
579
-                    case "${sc_cpu_version}" in
580
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
581
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
582
-                      532)                      # CPU_PA_RISC2_0
583
-                        case "${sc_kernel_bits}" in
584
-                          32) HP_ARCH="hppa2.0n" ;;
585
-                          64) HP_ARCH="hppa2.0w" ;;
586
-			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
587
-                        esac ;;
588
-                    esac
589
-		fi
590
-		if [ "${HP_ARCH}" = "" ]; then
591
-		    eval $set_cc_for_build
592
-		    sed 's/^              //' << EOF >$dummy.c
593
-
594
-              #define _HPUX_SOURCE
595
-              #include <stdlib.h>
596
-              #include <unistd.h>
597
-
598
-              int main ()
599
-              {
600
-              #if defined(_SC_KERNEL_BITS)
601
-                  long bits = sysconf(_SC_KERNEL_BITS);
602
-              #endif
603
-                  long cpu  = sysconf (_SC_CPU_VERSION);
604
-
605
-                  switch (cpu)
606
-              	{
607
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
608
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
609
-              	case CPU_PA_RISC2_0:
610
-              #if defined(_SC_KERNEL_BITS)
611
-              	    switch (bits)
612
-              		{
613
-              		case 64: puts ("hppa2.0w"); break;
614
-              		case 32: puts ("hppa2.0n"); break;
615
-              		default: puts ("hppa2.0"); break;
616
-              		} break;
617
-              #else  /* !defined(_SC_KERNEL_BITS) */
618
-              	    puts ("hppa2.0"); break;
619
-              #endif
620
-              	default: puts ("hppa1.0"); break;
621
-              	}
622
-                  exit (0);
623
-              }
624
-EOF
625
-		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
626
-		    test -z "$HP_ARCH" && HP_ARCH=hppa
627
-		fi ;;
628
-	esac
629
-	if [ ${HP_ARCH} = "hppa2.0w" ]
630
-	then
631
-	    eval $set_cc_for_build
632
-
633
-	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
634
-	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
635
-	    # generating 64-bit code.  GNU and HP use different nomenclature:
636
-	    #
637
-	    # $ CC_FOR_BUILD=cc ./config.guess
638
-	    # => hppa2.0w-hp-hpux11.23
639
-	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
640
-	    # => hppa64-hp-hpux11.23
641
-
642
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
643
-		grep __LP64__ >/dev/null
644
-	    then
645
-		HP_ARCH="hppa2.0w"
646
-	    else
647
-		HP_ARCH="hppa64"
648
-	    fi
649
-	fi
650
-	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
651
-	exit ;;
652
-    ia64:HP-UX:*:*)
653
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
654
-	echo ia64-hp-hpux${HPUX_REV}
655
-	exit ;;
656
-    3050*:HI-UX:*:*)
657
-	eval $set_cc_for_build
658
-	sed 's/^	//' << EOF >$dummy.c
659
-	#include <unistd.h>
660
-	int
661
-	main ()
662
-	{
663
-	  long cpu = sysconf (_SC_CPU_VERSION);
664
-	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
665
-	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
666
-	     results, however.  */
667
-	  if (CPU_IS_PA_RISC (cpu))
668
-	    {
669
-	      switch (cpu)
670
-		{
671
-		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
672
-		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
673
-		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
674
-		  default: puts ("hppa-hitachi-hiuxwe2"); break;
675
-		}
676
-	    }
677
-	  else if (CPU_IS_HP_MC68K (cpu))
678
-	    puts ("m68k-hitachi-hiuxwe2");
679
-	  else puts ("unknown-hitachi-hiuxwe2");
680
-	  exit (0);
681
-	}
682
-EOF
683
-	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
684
-		{ echo "$SYSTEM_NAME"; exit; }
685
-	echo unknown-hitachi-hiuxwe2
686
-	exit ;;
687
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
688
-	echo hppa1.1-hp-bsd
689
-	exit ;;
690
-    9000/8??:4.3bsd:*:*)
691
-	echo hppa1.0-hp-bsd
692
-	exit ;;
693
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
694
-	echo hppa1.0-hp-mpeix
695
-	exit ;;
696
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
697
-	echo hppa1.1-hp-osf
698
-	exit ;;
699
-    hp8??:OSF1:*:*)
700
-	echo hppa1.0-hp-osf
701
-	exit ;;
702
-    i*86:OSF1:*:*)
703
-	if [ -x /usr/sbin/sysversion ] ; then
704
-	    echo ${UNAME_MACHINE}-unknown-osf1mk
705
-	else
706
-	    echo ${UNAME_MACHINE}-unknown-osf1
707
-	fi
708
-	exit ;;
709
-    parisc*:Lites*:*:*)
710
-	echo hppa1.1-hp-lites
711
-	exit ;;
712
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
713
-	echo c1-convex-bsd
714
-        exit ;;
715
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
716
-	if getsysinfo -f scalar_acc
717
-	then echo c32-convex-bsd
718
-	else echo c2-convex-bsd
719
-	fi
720
-        exit ;;
721
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
722
-	echo c34-convex-bsd
723
-        exit ;;
724
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
725
-	echo c38-convex-bsd
726
-        exit ;;
727
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
728
-	echo c4-convex-bsd
729
-        exit ;;
730
-    CRAY*Y-MP:*:*:*)
731
-	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
732
-	exit ;;
733
-    CRAY*[A-Z]90:*:*:*)
734
-	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
735
-	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
736
-	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
737
-	      -e 's/\.[^.]*$/.X/'
738
-	exit ;;
739
-    CRAY*TS:*:*:*)
740
-	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
741
-	exit ;;
742
-    CRAY*T3E:*:*:*)
743
-	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
744
-	exit ;;
745
-    CRAY*SV1:*:*:*)
746
-	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
747
-	exit ;;
748
-    *:UNICOS/mp:*:*)
749
-	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
750
-	exit ;;
751
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
752
-	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
753
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
754
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
755
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
756
-        exit ;;
757
-    5000:UNIX_System_V:4.*:*)
758
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
759
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
760
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
761
-	exit ;;
762
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
763
-	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
764
-	exit ;;
765
-    sparc*:BSD/OS:*:*)
766
-	echo sparc-unknown-bsdi${UNAME_RELEASE}
767
-	exit ;;
768
-    *:BSD/OS:*:*)
769
-	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
770
-	exit ;;
771
-    *:FreeBSD:*:*)
772
-	case ${UNAME_MACHINE} in
773
-	    pc98)
774
-		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
775
-	    amd64)
776
-		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
777
-	    *)
778
-		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
779
-	esac
780
-	exit ;;
781
-    i*:CYGWIN*:*)
782
-	echo ${UNAME_MACHINE}-pc-cygwin
783
-	exit ;;
784
-    *:MINGW*:*)
785
-	echo ${UNAME_MACHINE}-pc-mingw32
786
-	exit ;;
787
-    i*:windows32*:*)
788
-    	# uname -m includes "-pc" on this system.
789
-    	echo ${UNAME_MACHINE}-mingw32
790
-	exit ;;
791
-    i*:PW*:*)
792
-	echo ${UNAME_MACHINE}-pc-pw32
793
-	exit ;;
794
-    *:Interix*:[3456]*)
795
-    	case ${UNAME_MACHINE} in
796
-	    x86)
797
-		echo i586-pc-interix${UNAME_RELEASE}
798
-		exit ;;
799
-	    EM64T | authenticamd)
800
-		echo x86_64-unknown-interix${UNAME_RELEASE}
801
-		exit ;;
802
-	esac ;;
803
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
804
-	echo i${UNAME_MACHINE}-pc-mks
805
-	exit ;;
806
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
807
-	# How do we know it's Interix rather than the generic POSIX subsystem?
808
-	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
809
-	# UNAME_MACHINE based on the output of uname instead of i386?
810
-	echo i586-pc-interix
811
-	exit ;;
812
-    i*:UWIN*:*)
813
-	echo ${UNAME_MACHINE}-pc-uwin
814
-	exit ;;
815
-    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
816
-	echo x86_64-unknown-cygwin
817
-	exit ;;
818
-    p*:CYGWIN*:*)
819
-	echo powerpcle-unknown-cygwin
820
-	exit ;;
821
-    prep*:SunOS:5.*:*)
822
-	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
823
-	exit ;;
824
-    *:GNU:*:*)
825
-	# the GNU system
826
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
827
-	exit ;;
828
-    *:GNU/*:*:*)
829
-	# other systems with GNU libc and userland
830
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
831
-	exit ;;
832
-    i*86:Minix:*:*)
833
-	echo ${UNAME_MACHINE}-pc-minix
834
-	exit ;;
835
-    arm*:Linux:*:*)
836
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
837
-	exit ;;
838
-    avr32*:Linux:*:*)
839
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
840
-	exit ;;
841
-    cris:Linux:*:*)
842
-	echo cris-axis-linux-gnu
843
-	exit ;;
844
-    crisv32:Linux:*:*)
845
-	echo crisv32-axis-linux-gnu
846
-	exit ;;
847
-    frv:Linux:*:*)
848
-    	echo frv-unknown-linux-gnu
849
-	exit ;;
850
-    ia64:Linux:*:*)
851
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
852
-	exit ;;
853
-    m32r*:Linux:*:*)
854
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
855
-	exit ;;
856
-    m68*:Linux:*:*)
857
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
858
-	exit ;;
859
-    mips:Linux:*:*)
860
-	eval $set_cc_for_build
861
-	sed 's/^	//' << EOF >$dummy.c
862
-	#undef CPU
863
-	#undef mips
864
-	#undef mipsel
865
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
866
-	CPU=mipsel
867
-	#else
868
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
869
-	CPU=mips
870
-	#else
871
-	CPU=
872
-	#endif
873
-	#endif
874
-EOF
875
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
876
-	    /^CPU/{
877
-		s: ::g
878
-		p
879
-	    }'`"
880
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
881
-	;;
882
-    mips64:Linux:*:*)
883
-	eval $set_cc_for_build
884
-	sed 's/^	//' << EOF >$dummy.c
885
-	#undef CPU
886
-	#undef mips64
887
-	#undef mips64el
888
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
889
-	CPU=mips64el
890
-	#else
891
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
892
-	CPU=mips64
893
-	#else
894
-	CPU=
895
-	#endif
896
-	#endif
897
-EOF
898
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
899
-	    /^CPU/{
900
-		s: ::g
901
-		p
902
-	    }'`"
903
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
904
-	;;
905
-    or32:Linux:*:*)
906
-	echo or32-unknown-linux-gnu
907
-	exit ;;
908
-    ppc:Linux:*:*)
909
-	echo powerpc-unknown-linux-gnu
910
-	exit ;;
911
-    ppc64:Linux:*:*)
912
-	echo powerpc64-unknown-linux-gnu
913
-	exit ;;
914
-    alpha:Linux:*:*)
915
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
916
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
917
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
918
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
919
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
920
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
921
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
922
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
923
-        esac
924
-	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
925
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
926
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
927
-	exit ;;
928
-    parisc:Linux:*:* | hppa:Linux:*:*)
929
-	# Look for CPU level
930
-	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
931
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
932
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
933
-	  *)    echo hppa-unknown-linux-gnu ;;
934
-	esac
935
-	exit ;;
936
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
937
-	echo hppa64-unknown-linux-gnu
938
-	exit ;;
939
-    s390:Linux:*:* | s390x:Linux:*:*)
940
-	echo ${UNAME_MACHINE}-ibm-linux
941
-	exit ;;
942
-    sh64*:Linux:*:*)
943
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
944
-	exit ;;
945
-    sh*:Linux:*:*)
946
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
947
-	exit ;;
948
-    sparc:Linux:*:* | sparc64:Linux:*:*)
949
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
950
-	exit ;;
951
-    vax:Linux:*:*)
952
-	echo ${UNAME_MACHINE}-dec-linux-gnu
953
-	exit ;;
954
-    x86_64:Linux:*:*)
955
-	echo x86_64-unknown-linux-gnu
956
-	exit ;;
957
-    xtensa:Linux:*:*)
958
-    	echo xtensa-unknown-linux-gnu
959
-	exit ;;
960
-    i*86:Linux:*:*)
961
-	# The BFD linker knows what the default object file format is, so
962
-	# first see if it will tell us. cd to the root directory to prevent
963
-	# problems with other programs or directories called `ld' in the path.
964
-	# Set LC_ALL=C to ensure ld outputs messages in English.
965
-	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
966
-			 | sed -ne '/supported targets:/!d
967
-				    s/[ 	][ 	]*/ /g
968
-				    s/.*supported targets: *//
969
-				    s/ .*//
970
-				    p'`
971
-        case "$ld_supported_targets" in
972
-	  elf32-i386)
973
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
974
-		;;
975
-	  a.out-i386-linux)
976
-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
977
-		exit ;;
978
-	  coff-i386)
979
-		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
980
-		exit ;;
981
-	  "")
982
-		# Either a pre-BFD a.out linker (linux-gnuoldld) or
983
-		# one that does not give us useful --help.
984
-		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
985
-		exit ;;
986
-	esac
987
-	# Determine whether the default compiler is a.out or elf
988
-	eval $set_cc_for_build
989
-	sed 's/^	//' << EOF >$dummy.c
990
-	#include <features.h>
991
-	#ifdef __ELF__
992
-	# ifdef __GLIBC__
993
-	#  if __GLIBC__ >= 2
994
-	LIBC=gnu
995
-	#  else
996
-	LIBC=gnulibc1
997
-	#  endif
998
-	# else
999
-	LIBC=gnulibc1
1000
-	# endif
1001
-	#else
1002
-	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
1003
-	LIBC=gnu
1004
-	#else
1005
-	LIBC=gnuaout
1006
-	#endif
1007
-	#endif
1008
-	#ifdef __dietlibc__
1009
-	LIBC=dietlibc
1010
-	#endif
1011
-EOF
1012
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1013
-	    /^LIBC/{
1014
-		s: ::g
1015
-		p
1016
-	    }'`"
1017
-	test x"${LIBC}" != x && {
1018
-		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1019
-		exit
1020
-	}
1021
-	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
1022
-	;;
1023
-    i*86:DYNIX/ptx:4*:*)
1024
-	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1025
-	# earlier versions are messed up and put the nodename in both
1026
-	# sysname and nodename.
1027
-	echo i386-sequent-sysv4
1028
-	exit ;;
1029
-    i*86:UNIX_SV:4.2MP:2.*)
1030
-        # Unixware is an offshoot of SVR4, but it has its own version
1031
-        # number series starting with 2...
1032
-        # I am not positive that other SVR4 systems won't match this,
1033
-	# I just have to hope.  -- rms.
1034
-        # Use sysv4.2uw... so that sysv4* matches it.
1035
-	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1036
-	exit ;;
1037
-    i*86:OS/2:*:*)
1038
-	# If we were able to find `uname', then EMX Unix compatibility
1039
-	# is probably installed.
1040
-	echo ${UNAME_MACHINE}-pc-os2-emx
1041
-	exit ;;
1042
-    i*86:XTS-300:*:STOP)
1043
-	echo ${UNAME_MACHINE}-unknown-stop
1044
-	exit ;;
1045
-    i*86:atheos:*:*)
1046
-	echo ${UNAME_MACHINE}-unknown-atheos
1047
-	exit ;;
1048
-    i*86:syllable:*:*)
1049
-	echo ${UNAME_MACHINE}-pc-syllable
1050
-	exit ;;
1051
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1052
-	echo i386-unknown-lynxos${UNAME_RELEASE}
1053
-	exit ;;
1054
-    i*86:*DOS:*:*)
1055
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
1056
-	exit ;;
1057
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1058
-	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1059
-	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1060
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1061
-	else
1062
-		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1063
-	fi
1064
-	exit ;;
1065
-    i*86:*:5:[678]*)
1066
-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
1067
-	case `/bin/uname -X | grep "^Machine"` in
1068
-	    *486*)	     UNAME_MACHINE=i486 ;;
1069
-	    *Pentium)	     UNAME_MACHINE=i586 ;;
1070
-	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1071
-	esac
1072
-	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1073
-	exit ;;
1074
-    i*86:*:3.2:*)
1075
-	if test -f /usr/options/cb.name; then
1076
-		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1077
-		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1078
-	elif /bin/uname -X 2>/dev/null >/dev/null ; then
1079
-		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1080
-		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1081
-		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1082
-			&& UNAME_MACHINE=i586
1083
-		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1084
-			&& UNAME_MACHINE=i686
1085
-		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1086
-			&& UNAME_MACHINE=i686
1087
-		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1088
-	else
1089
-		echo ${UNAME_MACHINE}-pc-sysv32
1090
-	fi
1091
-	exit ;;
1092
-    pc:*:*:*)
1093
-	# Left here for compatibility:
1094
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
1095
-        # the processor, so we play safe by assuming i386.
1096
-	echo i386-pc-msdosdjgpp
1097
-        exit ;;
1098
-    Intel:Mach:3*:*)
1099
-	echo i386-pc-mach3
1100
-	exit ;;
1101
-    paragon:*:*:*)
1102
-	echo i860-intel-osf1
1103
-	exit ;;
1104
-    i860:*:4.*:*) # i860-SVR4
1105
-	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1106
-	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1107
-	else # Add other i860-SVR4 vendors below as they are discovered.
1108
-	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
1109
-	fi
1110
-	exit ;;
1111
-    mini*:CTIX:SYS*5:*)
1112
-	# "miniframe"
1113
-	echo m68010-convergent-sysv
1114
-	exit ;;
1115
-    mc68k:UNIX:SYSTEM5:3.51m)
1116
-	echo m68k-convergent-sysv
1117
-	exit ;;
1118
-    M680?0:D-NIX:5.3:*)
1119
-	echo m68k-diab-dnix
1120
-	exit ;;
1121
-    M68*:*:R3V[5678]*:*)
1122
-	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1123
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
1124
-	OS_REL=''
1125
-	test -r /etc/.relid \
1126
-	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1127
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1128
-	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1129
-	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1130
-	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1131
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1132
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1133
-          && { echo i486-ncr-sysv4; exit; } ;;
1134
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1135
-	echo m68k-unknown-lynxos${UNAME_RELEASE}
1136
-	exit ;;
1137
-    mc68030:UNIX_System_V:4.*:*)
1138
-	echo m68k-atari-sysv4
1139
-	exit ;;
1140
-    TSUNAMI:LynxOS:2.*:*)
1141
-	echo sparc-unknown-lynxos${UNAME_RELEASE}
1142
-	exit ;;
1143
-    rs6000:LynxOS:2.*:*)
1144
-	echo rs6000-unknown-lynxos${UNAME_RELEASE}
1145
-	exit ;;
1146
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1147
-	echo powerpc-unknown-lynxos${UNAME_RELEASE}
1148
-	exit ;;
1149
-    SM[BE]S:UNIX_SV:*:*)
1150
-	echo mips-dde-sysv${UNAME_RELEASE}
1151
-	exit ;;
1152
-    RM*:ReliantUNIX-*:*:*)
1153
-	echo mips-sni-sysv4
1154
-	exit ;;
1155
-    RM*:SINIX-*:*:*)
1156
-	echo mips-sni-sysv4
1157
-	exit ;;
1158
-    *:SINIX-*:*:*)
1159
-	if uname -p 2>/dev/null >/dev/null ; then
1160
-		UNAME_MACHINE=`(uname -p) 2>/dev/null`
1161
-		echo ${UNAME_MACHINE}-sni-sysv4
1162
-	else
1163
-		echo ns32k-sni-sysv
1164
-	fi
1165
-	exit ;;
1166
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1167
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
1168
-        echo i586-unisys-sysv4
1169
-        exit ;;
1170
-    *:UNIX_System_V:4*:FTX*)
1171
-	# From Gerald Hewes <hewes@openmarket.com>.
1172
-	# How about differentiating between stratus architectures? -djm
1173
-	echo hppa1.1-stratus-sysv4
1174
-	exit ;;
1175
-    *:*:*:FTX*)
1176
-	# From seanf@swdc.stratus.com.
1177
-	echo i860-stratus-sysv4
1178
-	exit ;;
1179
-    i*86:VOS:*:*)
1180
-	# From Paul.Green@stratus.com.
1181
-	echo ${UNAME_MACHINE}-stratus-vos
1182
-	exit ;;
1183
-    *:VOS:*:*)
1184
-	# From Paul.Green@stratus.com.
1185
-	echo hppa1.1-stratus-vos
1186
-	exit ;;
1187
-    mc68*:A/UX:*:*)
1188
-	echo m68k-apple-aux${UNAME_RELEASE}
1189
-	exit ;;
1190
-    news*:NEWS-OS:6*:*)
1191
-	echo mips-sony-newsos6
1192
-	exit ;;
1193
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1194
-	if [ -d /usr/nec ]; then
1195
-	        echo mips-nec-sysv${UNAME_RELEASE}
1196
-	else
1197
-	        echo mips-unknown-sysv${UNAME_RELEASE}
1198
-	fi
1199
-        exit ;;
1200
-    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
1201
-	echo powerpc-be-beos
1202
-	exit ;;
1203
-    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
1204
-	echo powerpc-apple-beos
1205
-	exit ;;
1206
-    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
1207
-	echo i586-pc-beos
1208
-	exit ;;
1209
-    SX-4:SUPER-UX:*:*)
1210
-	echo sx4-nec-superux${UNAME_RELEASE}
1211
-	exit ;;
1212
-    SX-5:SUPER-UX:*:*)
1213
-	echo sx5-nec-superux${UNAME_RELEASE}
1214
-	exit ;;
1215
-    SX-6:SUPER-UX:*:*)
1216
-	echo sx6-nec-superux${UNAME_RELEASE}
1217
-	exit ;;
1218
-    SX-7:SUPER-UX:*:*)
1219
-	echo sx7-nec-superux${UNAME_RELEASE}
1220
-	exit ;;
1221
-    SX-8:SUPER-UX:*:*)
1222
-	echo sx8-nec-superux${UNAME_RELEASE}
1223
-	exit ;;
1224
-    SX-8R:SUPER-UX:*:*)
1225
-	echo sx8r-nec-superux${UNAME_RELEASE}
1226
-	exit ;;
1227
-    Power*:Rhapsody:*:*)
1228
-	echo powerpc-apple-rhapsody${UNAME_RELEASE}
1229
-	exit ;;
1230
-    *:Rhapsody:*:*)
1231
-	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1232
-	exit ;;
1233
-    *:Darwin:*:*)
1234
-	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1235
-	case $UNAME_PROCESSOR in
1236
-	    unknown) UNAME_PROCESSOR=powerpc ;;
1237
-	esac
1238
-	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1239
-	exit ;;
1240
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
1241
-	UNAME_PROCESSOR=`uname -p`
1242
-	if test "$UNAME_PROCESSOR" = "x86"; then
1243
-		UNAME_PROCESSOR=i386
1244
-		UNAME_MACHINE=pc
1245
-	fi
1246
-	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1247
-	exit ;;
1248
-    *:QNX:*:4*)
1249
-	echo i386-pc-qnx
1250
-	exit ;;
1251
-    NSE-?:NONSTOP_KERNEL:*:*)
1252
-	echo nse-tandem-nsk${UNAME_RELEASE}
1253
-	exit ;;
1254
-    NSR-?:NONSTOP_KERNEL:*:*)
1255
-	echo nsr-tandem-nsk${UNAME_RELEASE}
1256
-	exit ;;
1257
-    *:NonStop-UX:*:*)
1258
-	echo mips-compaq-nonstopux
1259
-	exit ;;
1260
-    BS2000:POSIX*:*:*)
1261
-	echo bs2000-siemens-sysv
1262
-	exit ;;
1263
-    DS/*:UNIX_System_V:*:*)
1264
-	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1265
-	exit ;;
1266
-    *:Plan9:*:*)
1267
-	# "uname -m" is not consistent, so use $cputype instead. 386
1268
-	# is converted to i386 for consistency with other x86
1269
-	# operating systems.
1270
-	if test "$cputype" = "386"; then
1271
-	    UNAME_MACHINE=i386
1272
-	else
1273
-	    UNAME_MACHINE="$cputype"
1274
-	fi
1275
-	echo ${UNAME_MACHINE}-unknown-plan9
1276
-	exit ;;
1277
-    *:TOPS-10:*:*)
1278
-	echo pdp10-unknown-tops10
1279
-	exit ;;
1280
-    *:TENEX:*:*)
1281
-	echo pdp10-unknown-tenex
1282
-	exit ;;
1283
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1284
-	echo pdp10-dec-tops20
1285
-	exit ;;
1286
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1287
-	echo pdp10-xkl-tops20
1288
-	exit ;;
1289
-    *:TOPS-20:*:*)
1290
-	echo pdp10-unknown-tops20
1291
-	exit ;;
1292
-    *:ITS:*:*)
1293
-	echo pdp10-unknown-its
1294
-	exit ;;
1295
-    SEI:*:*:SEIUX)
1296
-        echo mips-sei-seiux${UNAME_RELEASE}
1297
-	exit ;;
1298
-    *:DragonFly:*:*)
1299
-	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1300
-	exit ;;
1301
-    *:*VMS:*:*)
1302
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
1303
-	case "${UNAME_MACHINE}" in
1304
-	    A*) echo alpha-dec-vms ; exit ;;
1305
-	    I*) echo ia64-dec-vms ; exit ;;
1306
-	    V*) echo vax-dec-vms ; exit ;;
1307
-	esac ;;
1308
-    *:XENIX:*:SysV)
1309
-	echo i386-pc-xenix
1310
-	exit ;;
1311
-    i*86:skyos:*:*)
1312
-	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1313
-	exit ;;
1314
-    i*86:rdos:*:*)
1315
-	echo ${UNAME_MACHINE}-pc-rdos
1316
-	exit ;;
1317
-esac
1318
-
1319
-#echo '(No uname command or uname output not recognized.)' 1>&2
1320
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1321
-
1322
-eval $set_cc_for_build
1323
-cat >$dummy.c <<EOF
1324
-#ifdef _SEQUENT_
1325
-# include <sys/types.h>
1326
-# include <sys/utsname.h>
1327
-#endif
1328
-main ()
1329
-{
1330
-#if defined (sony)
1331
-#if defined (MIPSEB)
1332
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
1333
-     I don't know....  */
1334
-  printf ("mips-sony-bsd\n"); exit (0);
1335
-#else
1336
-#include <sys/param.h>
1337
-  printf ("m68k-sony-newsos%s\n",
1338
-#ifdef NEWSOS4
1339
-          "4"
1340
-#else
1341
-	  ""
1342
-#endif
1343
-         ); exit (0);
1344
-#endif
1345
-#endif
1346
-
1347
-#if defined (__arm) && defined (__acorn) && defined (__unix)
1348
-  printf ("arm-acorn-riscix\n"); exit (0);
1349
-#endif
1350
-
1351
-#if defined (hp300) && !defined (hpux)
1352
-  printf ("m68k-hp-bsd\n"); exit (0);
1353
-#endif
1354
-
1355
-#if defined (NeXT)
1356
-#if !defined (__ARCHITECTURE__)
1357
-#define __ARCHITECTURE__ "m68k"
1358
-#endif
1359
-  int version;
1360
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1361
-  if (version < 4)
1362
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1363
-  else
1364
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1365
-  exit (0);
1366
-#endif
1367
-
1368
-#if defined (MULTIMAX) || defined (n16)
1369
-#if defined (UMAXV)
1370
-  printf ("ns32k-encore-sysv\n"); exit (0);
1371
-#else
1372
-#if defined (CMU)
1373
-  printf ("ns32k-encore-mach\n"); exit (0);
1374
-#else
1375
-  printf ("ns32k-encore-bsd\n"); exit (0);
1376
-#endif
1377
-#endif
1378
-#endif
1379
-
1380
-#if defined (__386BSD__)
1381
-  printf ("i386-pc-bsd\n"); exit (0);
1382
-#endif
1383
-
1384
-#if defined (sequent)
1385
-#if defined (i386)
1386
-  printf ("i386-sequent-dynix\n"); exit (0);
1387
-#endif
1388
-#if defined (ns32000)
1389
-  printf ("ns32k-sequent-dynix\n"); exit (0);
1390
-#endif
1391
-#endif
1392
-
1393
-#if defined (_SEQUENT_)
1394
-    struct utsname un;
1395
-
1396
-    uname(&un);
1397
-
1398
-    if (strncmp(un.version, "V2", 2) == 0) {
1399
-	printf ("i386-sequent-ptx2\n"); exit (0);
1400
-    }
1401
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1402
-	printf ("i386-sequent-ptx1\n"); exit (0);
1403
-    }
1404
-    printf ("i386-sequent-ptx\n"); exit (0);
1405
-
1406
-#endif
1407
-
1408
-#if defined (vax)
1409
-# if !defined (ultrix)
1410
-#  include <sys/param.h>
1411
-#  if defined (BSD)
1412
-#   if BSD == 43
1413
-      printf ("vax-dec-bsd4.3\n"); exit (0);
1414
-#   else
1415
-#    if BSD == 199006
1416
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
1417
-#    else
1418
-      printf ("vax-dec-bsd\n"); exit (0);
1419
-#    endif
1420
-#   endif
1421
-#  else
1422
-    printf ("vax-dec-bsd\n"); exit (0);
1423
-#  endif
1424
-# else
1425
-    printf ("vax-dec-ultrix\n"); exit (0);
1426
-# endif
1427
-#endif
1428
-
1429
-#if defined (alliant) && defined (i860)
1430
-  printf ("i860-alliant-bsd\n"); exit (0);
1431
-#endif
1432
-
1433
-  exit (1);
1434
-}
1435
-EOF
1436
-
1437
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1438
-	{ echo "$SYSTEM_NAME"; exit; }
1439
-
1440
-# Apollos put the system type in the environment.
1441
-
1442
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1443
-
1444
-# Convex versions that predate uname can use getsysinfo(1)
1445
-
1446
-if [ -x /usr/convex/getsysinfo ]
1447
-then
1448
-    case `getsysinfo -f cpu_type` in
1449
-    c1*)
1450
-	echo c1-convex-bsd
1451
-	exit ;;
1452
-    c2*)
1453
-	if getsysinfo -f scalar_acc
1454
-	then echo c32-convex-bsd
1455
-	else echo c2-convex-bsd
1456
-	fi
1457
-	exit ;;
1458
-    c34*)
1459
-	echo c34-convex-bsd
1460
-	exit ;;
1461
-    c38*)
1462
-	echo c38-convex-bsd
1463
-	exit ;;
1464
-    c4*)
1465
-	echo c4-convex-bsd
1466
-	exit ;;
1467
-    esac
1468
-fi
1469
-
1470
-cat >&2 <<EOF
1471
-$0: unable to guess system type
1472
-
1473
-This script, last modified $timestamp, has failed to recognize
1474
-the operating system you are using. It is advised that you
1475
-download the most up to date version of the config scripts from
1476
-
1477
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
1478
-and
1479
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
1480
-
1481
-If the version you run ($0) is already up to date, please
1482
-send the following data and any information you think might be
1483
-pertinent to <config-patches@gnu.org> in order to provide the needed
1484
-information to handle your system.
1485
-
1486
-config.guess timestamp = $timestamp
1487
-
1488
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
1489
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
1490
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
1491
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
1492
-
1493
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1494
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
1495
-
1496
-hostinfo               = `(hostinfo) 2>/dev/null`
1497
-/bin/universe          = `(/bin/universe) 2>/dev/null`
1498
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
1499
-/bin/arch              = `(/bin/arch) 2>/dev/null`
1500
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
1501
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1502
-
1503
-UNAME_MACHINE = ${UNAME_MACHINE}
1504
-UNAME_RELEASE = ${UNAME_RELEASE}
1505
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
1506
-UNAME_VERSION = ${UNAME_VERSION}
1507
-EOF
1508
-
1509
-exit 1
1510
-
1511
-# Local variables:
1512
-# eval: (add-hook 'write-file-hooks 'time-stamp)
1513
-# time-stamp-start: "timestamp='"
1514
-# time-stamp-format: "%:y-%02m-%02d"
1515
-# time-stamp-end: "'"
1516
-# End:
1517 1
deleted file mode 100755
... ...
@@ -1,1626 +0,0 @@
1
-#! /bin/sh
2
-# Configuration validation subroutine script.
3
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
5
-#   Inc.
6
-
7
-timestamp='2007-06-28'
8
-
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
16
-# (at your option) any later version.
17
-#
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.
22
-#
23
-# You should have received a copy of the GNU General Public License
24
-# along with this program; if not, write to the Free Software
25
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
26
-# 02110-1301, USA.
27
-#
28
-# As a special exception to the GNU General Public License, if you
29
-# distribute this file as part of a program that contains a
30
-# configuration script generated by Autoconf, you may include it under
31
-# the same distribution terms that you use for the rest of that program.
32
-
33
-
34
-# Please send patches to <config-patches@gnu.org>.  Submit a context
35
-# diff and a properly formatted ChangeLog entry.
36
-#
37
-# Configuration subroutine to validate and canonicalize a configuration type.
38
-# Supply the specified configuration type as an argument.
39
-# If it is invalid, we print an error message on stderr and exit with code 1.
40
-# Otherwise, we print the canonical config type on stdout and succeed.
41
-
42
-# This file is supposed to be the same for all GNU packages
43
-# and recognize all the CPU types, system types and aliases
44
-# that are meaningful with *any* GNU software.
45
-# Each package is responsible for reporting which valid configurations
46
-# it does not support.  The user should be able to distinguish
47
-# a failure to support a valid configuration from a meaningless
48
-# configuration.
49
-
50
-# The goal of this file is to map all the various variations of a given
51
-# machine specification into a single specification in the form:
52
-#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
53
-# or in some cases, the newer four-part form:
54
-#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
55
-# It is wrong to echo any other type of specification.
56
-
57
-me=`echo "$0" | sed -e 's,.*/,,'`
58
-
59
-usage="\
60
-Usage: $0 [OPTION] CPU-MFR-OPSYS
61
-       $0 [OPTION] ALIAS
62
-
63
-Canonicalize a configuration name.
64
-
65
-Operation modes:
66
-  -h, --help         print this help, then exit
67
-  -t, --time-stamp   print date of last modification, then exit
68
-  -v, --version      print version number, then exit
69
-
70
-Report bugs and patches to <config-patches@gnu.org>."
71
-
72
-version="\
73
-GNU config.sub ($timestamp)
74
-
75
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
76
-Free Software Foundation, Inc.
77
-
78
-This is free software; see the source for copying conditions.  There is NO
79
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
80
-
81
-help="
82
-Try \`$me --help' for more information."
83
-
84
-# Parse command line
85
-while test $# -gt 0 ; do
86
-  case $1 in
87
-    --time-stamp | --time* | -t )
88
-       echo "$timestamp" ; exit ;;
89
-    --version | -v )
90
-       echo "$version" ; exit ;;
91
-    --help | --h* | -h )
92
-       echo "$usage"; exit ;;
93
-    -- )     # Stop option processing
94
-       shift; break ;;
95
-    - )	# Use stdin as input.
96
-       break ;;
97
-    -* )
98
-       echo "$me: invalid option $1$help"
99
-       exit 1 ;;
100
-
101
-    *local*)
102
-       # First pass through any local machine types.
103
-       echo $1
104
-       exit ;;
105
-
106
-    * )
107
-       break ;;
108
-  esac
109
-done
110
-
111
-case $# in
112
- 0) echo "$me: missing argument$help" >&2
113
-    exit 1;;
114
- 1) ;;
115
- *) echo "$me: too many arguments$help" >&2
116
-    exit 1;;
117
-esac
118
-
119
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
120
-# Here we must recognize all the valid KERNEL-OS combinations.
121
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
122
-case $maybe_os in
123
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
124
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
125
-  storm-chaos* | os2-emx* | rtmk-nova*)
126
-    os=-$maybe_os
127
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
128
-    ;;
129
-  *)
130
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
131
-    if [ $basic_machine != $1 ]
132
-    then os=`echo $1 | sed 's/.*-/-/'`
133
-    else os=; fi
134
-    ;;
135
-esac
136
-
137
-### Let's recognize common machines as not being operating systems so
138
-### that things like config.sub decstation-3100 work.  We also
139
-### recognize some manufacturers as not being operating systems, so we
140
-### can provide default operating systems below.
141
-case $os in
142
-	-sun*os*)
143
-		# Prevent following clause from handling this invalid input.
144
-		;;
145
-	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
146
-	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
147
-	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
148
-	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
149
-	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
150
-	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
151
-	-apple | -axis | -knuth | -cray)
152
-		os=
153
-		basic_machine=$1
154
-		;;
155
-	-sim | -cisco | -oki | -wec | -winbond)
156
-		os=
157
-		basic_machine=$1
158
-		;;
159
-	-scout)
160
-		;;
161
-	-wrs)
162
-		os=-vxworks
163
-		basic_machine=$1
164
-		;;
165
-	-chorusos*)
166
-		os=-chorusos
167
-		basic_machine=$1
168
-		;;
169
- 	-chorusrdb)
170
- 		os=-chorusrdb
171
-		basic_machine=$1
172
- 		;;
173
-	-hiux*)
174
-		os=-hiuxwe2
175
-		;;
176
-	-sco6)
177
-		os=-sco5v6
178
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
179
-		;;
180
-	-sco5)
181
-		os=-sco3.2v5
182
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
183
-		;;
184
-	-sco4)
185
-		os=-sco3.2v4
186
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
187
-		;;
188
-	-sco3.2.[4-9]*)
189
-		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
190
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
191
-		;;
192
-	-sco3.2v[4-9]*)
193
-		# Don't forget version if it is 3.2v4 or newer.
194
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
195
-		;;
196
-	-sco5v6*)
197
-		# Don't forget version if it is 3.2v4 or newer.
198
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
199
-		;;
200
-	-sco*)
201
-		os=-sco3.2v2
202
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
203
-		;;
204
-	-udk*)
205
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
206
-		;;
207
-	-isc)
208
-		os=-isc2.2
209
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
210
-		;;
211
-	-clix*)
212
-		basic_machine=clipper-intergraph
213
-		;;
214
-	-isc*)
215
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
216
-		;;
217
-	-lynx*)
218
-		os=-lynxos
219
-		;;
220
-	-ptx*)
221
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
222
-		;;
223
-	-windowsnt*)
224
-		os=`echo $os | sed -e 's/windowsnt/winnt/'`
225
-		;;
226
-	-psos*)
227
-		os=-psos
228
-		;;
229
-	-mint | -mint[0-9]*)
230
-		basic_machine=m68k-atari
231
-		os=-mint
232
-		;;
233
-esac
234
-
235
-# Decode aliases for certain CPU-COMPANY combinations.
236
-case $basic_machine in
237
-	# Recognize the basic CPU types without company name.
238
-	# Some are omitted here because they have special meanings below.
239
-	1750a | 580 \
240
-	| a29k \
241
-	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
242
-	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
243
-	| am33_2.0 \
244
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
245
-	| bfin \
246
-	| c4x | clipper \
247
-	| d10v | d30v | dlx | dsp16xx \
248
-	| fido | fr30 | frv \
249
-	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
250
-	| i370 | i860 | i960 | ia64 \
251
-	| ip2k | iq2000 \
252
-	| m32c | m32r | m32rle | m68000 | m68k | m88k \
253
-	| maxq | mb | microblaze | mcore | mep \
254
-	| mips | mipsbe | mipseb | mipsel | mipsle \
255
-	| mips16 \
256
-	| mips64 | mips64el \
257
-	| mips64vr | mips64vrel \
258
-	| mips64orion | mips64orionel \
259
-	| mips64vr4100 | mips64vr4100el \
260
-	| mips64vr4300 | mips64vr4300el \
261
-	| mips64vr5000 | mips64vr5000el \
262
-	| mips64vr5900 | mips64vr5900el \
263
-	| mipsisa32 | mipsisa32el \
264
-	| mipsisa32r2 | mipsisa32r2el \
265
-	| mipsisa64 | mipsisa64el \
266
-	| mipsisa64r2 | mipsisa64r2el \
267
-	| mipsisa64sb1 | mipsisa64sb1el \
268
-	| mipsisa64sr71k | mipsisa64sr71kel \
269
-	| mipstx39 | mipstx39el \
270
-	| mn10200 | mn10300 \
271
-	| mt \
272
-	| msp430 \
273
-	| nios | nios2 \
274
-	| ns16k | ns32k \
275
-	| or32 \
276
-	| pdp10 | pdp11 | pj | pjl \
277
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
278
-	| pyramid \
279
-	| score \
280
-	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
281
-	| sh64 | sh64le \
282
-	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
283
-	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
284
-	| spu | strongarm \
285
-	| tahoe | thumb | tic4x | tic80 | tron \
286
-	| v850 | v850e \
287
-	| we32k \
288
-	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
289
-	| z8k)
290
-		basic_machine=$basic_machine-unknown
291
-		;;
292
-	m6811 | m68hc11 | m6812 | m68hc12)
293
-		# Motorola 68HC11/12.
294
-		basic_machine=$basic_machine-unknown
295
-		os=-none
296
-		;;
297
-	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
298
-		;;
299
-	ms1)
300
-		basic_machine=mt-unknown
301
-		;;
302
-
303
-	# We use `pc' rather than `unknown'
304
-	# because (1) that's what they normally are, and
305
-	# (2) the word "unknown" tends to confuse beginning users.
306
-	i*86 | x86_64)
307
-	  basic_machine=$basic_machine-pc
308
-	  ;;
309
-	# Object if more than one company name word.
310
-	*-*-*)
311
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
312
-		exit 1
313
-		;;
314
-	# Recognize the basic CPU types with company name.
315
-	580-* \
316
-	| a29k-* \
317
-	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
318
-	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
319
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
320
-	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
321
-	| avr-* | avr32-* \
322
-	| bfin-* | bs2000-* \
323
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
324
-	| clipper-* | craynv-* | cydra-* \
325
-	| d10v-* | d30v-* | dlx-* \
326
-	| elxsi-* \
327
-	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
328
-	| h8300-* | h8500-* \
329
-	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
330
-	| i*86-* | i860-* | i960-* | ia64-* \
331
-	| ip2k-* | iq2000-* \
332
-	| m32c-* | m32r-* | m32rle-* \
333
-	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
334
-	| m88110-* | m88k-* | maxq-* | mcore-* \
335
-	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
336
-	| mips16-* \
337
-	| mips64-* | mips64el-* \
338
-	| mips64vr-* | mips64vrel-* \
339
-	| mips64orion-* | mips64orionel-* \
340
-	| mips64vr4100-* | mips64vr4100el-* \
341
-	| mips64vr4300-* | mips64vr4300el-* \
342
-	| mips64vr5000-* | mips64vr5000el-* \
343
-	| mips64vr5900-* | mips64vr5900el-* \
344
-	| mipsisa32-* | mipsisa32el-* \
345
-	| mipsisa32r2-* | mipsisa32r2el-* \
346
-	| mipsisa64-* | mipsisa64el-* \
347
-	| mipsisa64r2-* | mipsisa64r2el-* \
348
-	| mipsisa64sb1-* | mipsisa64sb1el-* \
349
-	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
350
-	| mipstx39-* | mipstx39el-* \
351
-	| mmix-* \
352
-	| mt-* \
353
-	| msp430-* \
354
-	| nios-* | nios2-* \
355
-	| none-* | np1-* | ns16k-* | ns32k-* \
356
-	| orion-* \
357
-	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
358
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
359
-	| pyramid-* \
360
-	| romp-* | rs6000-* \
361
-	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
362
-	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
363
-	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
364
-	| sparclite-* \
365
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
366
-	| tahoe-* | thumb-* \
367
-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
368
-	| tron-* \
369
-	| v850-* | v850e-* | vax-* \
370
-	| we32k-* \
371
-	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
372
-	| xstormy16-* | xtensa-* \
373
-	| ymp-* \
374
-	| z8k-*)
375
-		;;
376
-	# Recognize the various machine names and aliases which stand
377
-	# for a CPU type and a company and sometimes even an OS.
378
-	386bsd)
379
-		basic_machine=i386-unknown
380
-		os=-bsd
381
-		;;
382
-	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
383
-		basic_machine=m68000-att
384
-		;;
385
-	3b*)
386
-		basic_machine=we32k-att
387
-		;;
388
-	a29khif)
389
-		basic_machine=a29k-amd
390
-		os=-udi
391
-		;;
392
-    	abacus)
393
-		basic_machine=abacus-unknown
394
-		;;
395
-	adobe68k)
396
-		basic_machine=m68010-adobe
397
-		os=-scout
398
-		;;
399
-	alliant | fx80)
400
-		basic_machine=fx80-alliant
401
-		;;
402
-	altos | altos3068)
403
-		basic_machine=m68k-altos
404
-		;;
405
-	am29k)
406
-		basic_machine=a29k-none
407
-		os=-bsd
408
-		;;
409
-	amd64)
410
-		basic_machine=x86_64-pc
411
-		;;
412
-	amd64-*)
413
-		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
414
-		;;
415
-	amdahl)
416
-		basic_machine=580-amdahl
417
-		os=-sysv
418
-		;;
419
-	amiga | amiga-*)
420
-		basic_machine=m68k-unknown
421
-		;;
422
-	amigaos | amigados)
423
-		basic_machine=m68k-unknown
424
-		os=-amigaos
425
-		;;
426
-	amigaunix | amix)
427
-		basic_machine=m68k-unknown
428
-		os=-sysv4
429
-		;;
430
-	apollo68)
431
-		basic_machine=m68k-apollo
432
-		os=-sysv
433
-		;;
434
-	apollo68bsd)
435
-		basic_machine=m68k-apollo
436
-		os=-bsd
437
-		;;
438
-	aux)
439
-		basic_machine=m68k-apple
440
-		os=-aux
441
-		;;
442
-	balance)
443
-		basic_machine=ns32k-sequent
444
-		os=-dynix
445
-		;;
446
-	c90)
447
-		basic_machine=c90-cray
448
-		os=-unicos
449
-		;;
450
-	convex-c1)
451
-		basic_machine=c1-convex
452
-		os=-bsd
453
-		;;
454
-	convex-c2)
455
-		basic_machine=c2-convex
456
-		os=-bsd
457
-		;;
458
-	convex-c32)
459
-		basic_machine=c32-convex
460
-		os=-bsd
461
-		;;
462
-	convex-c34)
463
-		basic_machine=c34-convex
464
-		os=-bsd
465
-		;;
466
-	convex-c38)
467
-		basic_machine=c38-convex
468
-		os=-bsd
469
-		;;
470
-	cray | j90)
471
-		basic_machine=j90-cray
472
-		os=-unicos
473
-		;;
474
-	craynv)
475
-		basic_machine=craynv-cray
476
-		os=-unicosmp
477
-		;;
478
-	cr16)
479
-		basic_machine=cr16-unknown
480
-		os=-elf
481
-		;;
482
-	crds | unos)
483
-		basic_machine=m68k-crds
484
-		;;
485
-	crisv32 | crisv32-* | etraxfs*)
486
-		basic_machine=crisv32-axis
487
-		;;
488
-	cris | cris-* | etrax*)
489
-		basic_machine=cris-axis
490
-		;;
491
-	crx)
492
-		basic_machine=crx-unknown
493
-		os=-elf
494
-		;;
495
-	da30 | da30-*)
496
-		basic_machine=m68k-da30
497
-		;;
498
-	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
499
-		basic_machine=mips-dec
500
-		;;
501
-	decsystem10* | dec10*)
502
-		basic_machine=pdp10-dec
503
-		os=-tops10
504
-		;;
505
-	decsystem20* | dec20*)
506
-		basic_machine=pdp10-dec
507
-		os=-tops20
508
-		;;
509
-	delta | 3300 | motorola-3300 | motorola-delta \
510
-	      | 3300-motorola | delta-motorola)
511
-		basic_machine=m68k-motorola
512
-		;;
513
-	delta88)
514
-		basic_machine=m88k-motorola
515
-		os=-sysv3
516
-		;;
517
-	djgpp)
518
-		basic_machine=i586-pc
519
-		os=-msdosdjgpp
520
-		;;
521
-	dpx20 | dpx20-*)
522
-		basic_machine=rs6000-bull
523
-		os=-bosx
524
-		;;
525
-	dpx2* | dpx2*-bull)
526
-		basic_machine=m68k-bull
527
-		os=-sysv3
528
-		;;
529
-	ebmon29k)
530
-		basic_machine=a29k-amd
531
-		os=-ebmon
532
-		;;
533
-	elxsi)
534
-		basic_machine=elxsi-elxsi
535
-		os=-bsd
536
-		;;
537
-	encore | umax | mmax)
538
-		basic_machine=ns32k-encore
539
-		;;
540
-	es1800 | OSE68k | ose68k | ose | OSE)
541
-		basic_machine=m68k-ericsson
542
-		os=-ose
543
-		;;
544
-	fx2800)
545
-		basic_machine=i860-alliant
546
-		;;
547
-	genix)
548
-		basic_machine=ns32k-ns
549
-		;;
550
-	gmicro)
551
-		basic_machine=tron-gmicro
552
-		os=-sysv
553
-		;;
554
-	go32)
555
-		basic_machine=i386-pc
556
-		os=-go32
557
-		;;
558
-	h3050r* | hiux*)
559
-		basic_machine=hppa1.1-hitachi
560
-		os=-hiuxwe2
561
-		;;
562
-	h8300hms)
563
-		basic_machine=h8300-hitachi
564
-		os=-hms
565
-		;;
566
-	h8300xray)
567
-		basic_machine=h8300-hitachi
568
-		os=-xray
569
-		;;
570
-	h8500hms)
571
-		basic_machine=h8500-hitachi
572
-		os=-hms
573
-		;;
574
-	harris)
575
-		basic_machine=m88k-harris
576
-		os=-sysv3
577
-		;;
578
-	hp300-*)
579
-		basic_machine=m68k-hp
580
-		;;
581
-	hp300bsd)
582
-		basic_machine=m68k-hp
583
-		os=-bsd
584
-		;;
585
-	hp300hpux)
586
-		basic_machine=m68k-hp
587
-		os=-hpux
588
-		;;
589
-	hp3k9[0-9][0-9] | hp9[0-9][0-9])
590
-		basic_machine=hppa1.0-hp
591
-		;;
592
-	hp9k2[0-9][0-9] | hp9k31[0-9])
593
-		basic_machine=m68000-hp
594
-		;;
595
-	hp9k3[2-9][0-9])
596
-		basic_machine=m68k-hp
597
-		;;
598
-	hp9k6[0-9][0-9] | hp6[0-9][0-9])
599
-		basic_machine=hppa1.0-hp
600
-		;;
601
-	hp9k7[0-79][0-9] | hp7[0-79][0-9])
602
-		basic_machine=hppa1.1-hp
603
-		;;
604
-	hp9k78[0-9] | hp78[0-9])
605
-		# FIXME: really hppa2.0-hp
606
-		basic_machine=hppa1.1-hp
607
-		;;
608
-	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
609
-		# FIXME: really hppa2.0-hp
610
-		basic_machine=hppa1.1-hp
611
-		;;
612
-	hp9k8[0-9][13679] | hp8[0-9][13679])
613
-		basic_machine=hppa1.1-hp
614
-		;;
615
-	hp9k8[0-9][0-9] | hp8[0-9][0-9])
616
-		basic_machine=hppa1.0-hp
617
-		;;
618
-	hppa-next)
619
-		os=-nextstep3
620
-		;;
621
-	hppaosf)
622
-		basic_machine=hppa1.1-hp
623
-		os=-osf
624
-		;;
625
-	hppro)
626
-		basic_machine=hppa1.1-hp
627
-		os=-proelf
628
-		;;
629
-	i370-ibm* | ibm*)
630
-		basic_machine=i370-ibm
631
-		;;
632
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
633
-	i*86v32)
634
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
635
-		os=-sysv32
636
-		;;
637
-	i*86v4*)
638
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
639
-		os=-sysv4
640
-		;;
641
-	i*86v)
642
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
643
-		os=-sysv
644
-		;;
645
-	i*86sol2)
646
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
647
-		os=-solaris2
648
-		;;
649
-	i386mach)
650
-		basic_machine=i386-mach
651
-		os=-mach
652
-		;;
653
-	i386-vsta | vsta)
654
-		basic_machine=i386-unknown
655
-		os=-vsta
656
-		;;
657
-	iris | iris4d)
658
-		basic_machine=mips-sgi
659
-		case $os in
660
-		    -irix*)
661
-			;;
662
-		    *)
663
-			os=-irix4
664
-			;;
665
-		esac
666
-		;;
667
-	isi68 | isi)
668
-		basic_machine=m68k-isi
669
-		os=-sysv
670
-		;;
671
-	m88k-omron*)
672
-		basic_machine=m88k-omron
673
-		;;
674
-	magnum | m3230)
675
-		basic_machine=mips-mips
676
-		os=-sysv
677
-		;;
678
-	merlin)
679
-		basic_machine=ns32k-utek
680
-		os=-sysv
681
-		;;
682
-	mingw32)
683
-		basic_machine=i386-pc
684
-		os=-mingw32
685
-		;;
686
-	mingw32ce)
687
-		basic_machine=arm-unknown
688
-		os=-mingw32ce
689
-		;;
690
-	miniframe)
691
-		basic_machine=m68000-convergent
692
-		;;
693
-	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
694
-		basic_machine=m68k-atari
695
-		os=-mint
696
-		;;
697
-	mips3*-*)
698
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
699
-		;;
700
-	mips3*)
701
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
702
-		;;
703
-	monitor)
704
-		basic_machine=m68k-rom68k
705
-		os=-coff
706
-		;;
707
-	morphos)
708
-		basic_machine=powerpc-unknown
709
-		os=-morphos
710
-		;;
711
-	msdos)
712
-		basic_machine=i386-pc
713
-		os=-msdos
714
-		;;
715
-	ms1-*)
716
-		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
717
-		;;
718
-	mvs)
719
-		basic_machine=i370-ibm
720
-		os=-mvs
721
-		;;
722
-	ncr3000)
723
-		basic_machine=i486-ncr
724
-		os=-sysv4
725
-		;;
726
-	netbsd386)
727
-		basic_machine=i386-unknown
728
-		os=-netbsd
729
-		;;
730
-	netwinder)
731
-		basic_machine=armv4l-rebel
732
-		os=-linux
733
-		;;
734
-	news | news700 | news800 | news900)
735
-		basic_machine=m68k-sony
736
-		os=-newsos
737
-		;;
738
-	news1000)
739
-		basic_machine=m68030-sony
740
-		os=-newsos
741
-		;;
742
-	news-3600 | risc-news)
743
-		basic_machine=mips-sony
744
-		os=-newsos
745
-		;;
746
-	necv70)
747
-		basic_machine=v70-nec
748
-		os=-sysv
749
-		;;
750
-	next | m*-next )
751
-		basic_machine=m68k-next
752
-		case $os in
753
-		    -nextstep* )
754
-			;;
755
-		    -ns2*)
756
-		      os=-nextstep2
757
-			;;
758
-		    *)
759
-		      os=-nextstep3
760
-			;;
761
-		esac
762
-		;;
763
-	nh3000)
764
-		basic_machine=m68k-harris
765
-		os=-cxux
766
-		;;
767
-	nh[45]000)
768
-		basic_machine=m88k-harris
769
-		os=-cxux
770
-		;;
771
-	nindy960)
772
-		basic_machine=i960-intel
773
-		os=-nindy
774
-		;;
775
-	mon960)
776
-		basic_machine=i960-intel
777
-		os=-mon960
778
-		;;
779
-	nonstopux)
780
-		basic_machine=mips-compaq
781
-		os=-nonstopux
782
-		;;
783
-	np1)
784
-		basic_machine=np1-gould
785
-		;;
786
-	nsr-tandem)
787
-		basic_machine=nsr-tandem
788
-		;;
789
-	op50n-* | op60c-*)
790
-		basic_machine=hppa1.1-oki
791
-		os=-proelf
792
-		;;
793
-	openrisc | openrisc-*)
794
-		basic_machine=or32-unknown
795
-		;;
796
-	os400)
797
-		basic_machine=powerpc-ibm
798
-		os=-os400
799
-		;;
800
-	OSE68000 | ose68000)
801
-		basic_machine=m68000-ericsson
802
-		os=-ose
803
-		;;
804
-	os68k)
805
-		basic_machine=m68k-none
806
-		os=-os68k
807
-		;;
808
-	pa-hitachi)
809
-		basic_machine=hppa1.1-hitachi
810
-		os=-hiuxwe2
811
-		;;
812
-	paragon)
813
-		basic_machine=i860-intel
814
-		os=-osf
815
-		;;
816
-	pbd)
817
-		basic_machine=sparc-tti
818
-		;;
819
-	pbb)
820
-		basic_machine=m68k-tti
821
-		;;
822
-	pc532 | pc532-*)
823
-		basic_machine=ns32k-pc532
824
-		;;
825
-	pc98)
826
-		basic_machine=i386-pc
827
-		;;
828
-	pc98-*)
829
-		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
830
-		;;
831
-	pentium | p5 | k5 | k6 | nexgen | viac3)
832
-		basic_machine=i586-pc
833
-		;;
834
-	pentiumpro | p6 | 6x86 | athlon | athlon_*)
835
-		basic_machine=i686-pc
836
-		;;
837
-	pentiumii | pentium2 | pentiumiii | pentium3)
838
-		basic_machine=i686-pc
839
-		;;
840
-	pentium4)
841
-		basic_machine=i786-pc
842
-		;;
843
-	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
844
-		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
845
-		;;
846
-	pentiumpro-* | p6-* | 6x86-* | athlon-*)
847
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
848
-		;;
849
-	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
850
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
851
-		;;
852
-	pentium4-*)
853
-		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
854
-		;;
855
-	pn)
856
-		basic_machine=pn-gould
857
-		;;
858
-	power)	basic_machine=power-ibm
859
-		;;
860
-	ppc)	basic_machine=powerpc-unknown
861
-		;;
862
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
863
-		;;
864
-	ppcle | powerpclittle | ppc-le | powerpc-little)
865
-		basic_machine=powerpcle-unknown
866
-		;;
867
-	ppcle-* | powerpclittle-*)
868
-		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
869
-		;;
870
-	ppc64)	basic_machine=powerpc64-unknown
871
-		;;
872
-	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
873
-		;;
874
-	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
875
-		basic_machine=powerpc64le-unknown
876
-		;;
877
-	ppc64le-* | powerpc64little-*)
878
-		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
879
-		;;
880
-	ps2)
881
-		basic_machine=i386-ibm
882
-		;;
883
-	pw32)
884
-		basic_machine=i586-unknown
885
-		os=-pw32
886
-		;;
887
-	rdos)
888
-		basic_machine=i386-pc
889
-		os=-rdos
890
-		;;
891
-	rom68k)
892
-		basic_machine=m68k-rom68k
893
-		os=-coff
894
-		;;
895
-	rm[46]00)
896
-		basic_machine=mips-siemens
897
-		;;
898
-	rtpc | rtpc-*)
899
-		basic_machine=romp-ibm
900
-		;;
901
-	s390 | s390-*)
902
-		basic_machine=s390-ibm
903
-		;;
904
-	s390x | s390x-*)
905
-		basic_machine=s390x-ibm
906
-		;;
907
-	sa29200)
908
-		basic_machine=a29k-amd
909
-		os=-udi
910
-		;;
911
-	sb1)
912
-		basic_machine=mipsisa64sb1-unknown
913
-		;;
914
-	sb1el)
915
-		basic_machine=mipsisa64sb1el-unknown
916
-		;;
917
-	sde)
918
-		basic_machine=mipsisa32-sde
919
-		os=-elf
920
-		;;
921
-	sei)
922
-		basic_machine=mips-sei
923
-		os=-seiux
924
-		;;
925
-	sequent)
926
-		basic_machine=i386-sequent
927
-		;;
928
-	sh)
929
-		basic_machine=sh-hitachi
930
-		os=-hms
931
-		;;
932
-	sh5el)
933
-		basic_machine=sh5le-unknown
934
-		;;
935
-	sh64)
936
-		basic_machine=sh64-unknown
937
-		;;
938
-	sparclite-wrs | simso-wrs)
939
-		basic_machine=sparclite-wrs
940
-		os=-vxworks
941
-		;;
942
-	sps7)
943
-		basic_machine=m68k-bull
944
-		os=-sysv2
945
-		;;
946
-	spur)
947
-		basic_machine=spur-unknown
948
-		;;
949
-	st2000)
950
-		basic_machine=m68k-tandem
951
-		;;
952
-	stratus)
953
-		basic_machine=i860-stratus
954
-		os=-sysv4
955
-		;;
956
-	sun2)
957
-		basic_machine=m68000-sun
958
-		;;
959
-	sun2os3)
960
-		basic_machine=m68000-sun
961
-		os=-sunos3
962
-		;;
963
-	sun2os4)
964
-		basic_machine=m68000-sun
965
-		os=-sunos4
966
-		;;
967
-	sun3os3)
968
-		basic_machine=m68k-sun
969
-		os=-sunos3
970
-		;;
971
-	sun3os4)
972
-		basic_machine=m68k-sun
973
-		os=-sunos4
974
-		;;
975
-	sun4os3)
976
-		basic_machine=sparc-sun
977
-		os=-sunos3
978
-		;;
979
-	sun4os4)
980
-		basic_machine=sparc-sun
981
-		os=-sunos4
982
-		;;
983
-	sun4sol2)
984
-		basic_machine=sparc-sun
985
-		os=-solaris2
986
-		;;
987
-	sun3 | sun3-*)
988
-		basic_machine=m68k-sun
989
-		;;
990
-	sun4)
991
-		basic_machine=sparc-sun
992
-		;;
993
-	sun386 | sun386i | roadrunner)
994
-		basic_machine=i386-sun
995
-		;;
996
-	sv1)
997
-		basic_machine=sv1-cray
998
-		os=-unicos
999
-		;;
1000
-	symmetry)
1001
-		basic_machine=i386-sequent
1002
-		os=-dynix
1003
-		;;
1004
-	t3e)
1005
-		basic_machine=alphaev5-cray
1006
-		os=-unicos
1007
-		;;
1008
-	t90)
1009
-		basic_machine=t90-cray
1010
-		os=-unicos
1011
-		;;
1012
-	tic54x | c54x*)
1013
-		basic_machine=tic54x-unknown
1014
-		os=-coff
1015
-		;;
1016
-	tic55x | c55x*)
1017
-		basic_machine=tic55x-unknown
1018
-		os=-coff
1019
-		;;
1020
-	tic6x | c6x*)
1021
-		basic_machine=tic6x-unknown
1022
-		os=-coff
1023
-		;;
1024
-	tx39)
1025
-		basic_machine=mipstx39-unknown
1026
-		;;
1027
-	tx39el)
1028
-		basic_machine=mipstx39el-unknown
1029
-		;;
1030
-	toad1)
1031
-		basic_machine=pdp10-xkl
1032
-		os=-tops20
1033
-		;;
1034
-	tower | tower-32)
1035
-		basic_machine=m68k-ncr
1036
-		;;
1037
-	tpf)
1038
-		basic_machine=s390x-ibm
1039
-		os=-tpf
1040
-		;;
1041
-	udi29k)
1042
-		basic_machine=a29k-amd
1043
-		os=-udi
1044
-		;;
1045
-	ultra3)
1046
-		basic_machine=a29k-nyu
1047
-		os=-sym1
1048
-		;;
1049
-	v810 | necv810)
1050
-		basic_machine=v810-nec
1051
-		os=-none
1052
-		;;
1053
-	vaxv)
1054
-		basic_machine=vax-dec
1055
-		os=-sysv
1056
-		;;
1057
-	vms)
1058
-		basic_machine=vax-dec
1059
-		os=-vms
1060
-		;;
1061
-	vpp*|vx|vx-*)
1062
-		basic_machine=f301-fujitsu
1063
-		;;
1064
-	vxworks960)
1065
-		basic_machine=i960-wrs
1066
-		os=-vxworks
1067
-		;;
1068
-	vxworks68)
1069
-		basic_machine=m68k-wrs
1070
-		os=-vxworks
1071
-		;;
1072
-	vxworks29k)
1073
-		basic_machine=a29k-wrs
1074
-		os=-vxworks
1075
-		;;
1076
-	w65*)
1077
-		basic_machine=w65-wdc
1078
-		os=-none
1079
-		;;
1080
-	w89k-*)
1081
-		basic_machine=hppa1.1-winbond
1082
-		os=-proelf
1083
-		;;
1084
-	xbox)
1085
-		basic_machine=i686-pc
1086
-		os=-mingw32
1087
-		;;
1088
-	xps | xps100)
1089
-		basic_machine=xps100-honeywell
1090
-		;;
1091
-	ymp)
1092
-		basic_machine=ymp-cray
1093
-		os=-unicos
1094
-		;;
1095
-	z8k-*-coff)
1096
-		basic_machine=z8k-unknown
1097
-		os=-sim
1098
-		;;
1099
-	none)
1100
-		basic_machine=none-none
1101
-		os=-none
1102
-		;;
1103
-
1104
-# Here we handle the default manufacturer of certain CPU types.  It is in
1105
-# some cases the only manufacturer, in others, it is the most popular.
1106
-	w89k)
1107
-		basic_machine=hppa1.1-winbond
1108
-		;;
1109
-	op50n)
1110
-		basic_machine=hppa1.1-oki
1111
-		;;
1112
-	op60c)
1113
-		basic_machine=hppa1.1-oki
1114
-		;;
1115
-	romp)
1116
-		basic_machine=romp-ibm
1117
-		;;
1118
-	mmix)
1119
-		basic_machine=mmix-knuth
1120
-		;;
1121
-	rs6000)
1122
-		basic_machine=rs6000-ibm
1123
-		;;
1124
-	vax)
1125
-		basic_machine=vax-dec
1126
-		;;
1127
-	pdp10)
1128
-		# there are many clones, so DEC is not a safe bet
1129
-		basic_machine=pdp10-unknown
1130
-		;;
1131
-	pdp11)
1132
-		basic_machine=pdp11-dec
1133
-		;;
1134
-	we32k)
1135
-		basic_machine=we32k-att
1136
-		;;
1137
-	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
1138
-		basic_machine=sh-unknown
1139
-		;;
1140
-	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1141
-		basic_machine=sparc-sun
1142
-		;;
1143
-	cydra)
1144
-		basic_machine=cydra-cydrome
1145
-		;;
1146
-	orion)
1147
-		basic_machine=orion-highlevel
1148
-		;;
1149
-	orion105)
1150
-		basic_machine=clipper-highlevel
1151
-		;;
1152
-	mac | mpw | mac-mpw)
1153
-		basic_machine=m68k-apple
1154
-		;;
1155
-	pmac | pmac-mpw)
1156
-		basic_machine=powerpc-apple
1157
-		;;
1158
-	*-unknown)
1159
-		# Make sure to match an already-canonicalized machine name.
1160
-		;;
1161
-	*)
1162
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1163
-		exit 1
1164
-		;;
1165
-esac
1166
-
1167
-# Here we canonicalize certain aliases for manufacturers.
1168
-case $basic_machine in
1169
-	*-digital*)
1170
-		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1171
-		;;
1172
-	*-commodore*)
1173
-		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1174
-		;;
1175
-	*)
1176
-		;;
1177
-esac
1178
-
1179
-# Decode manufacturer-specific aliases for certain operating systems.
1180
-
1181
-if [ x"$os" != x"" ]
1182
-then
1183
-case $os in
1184
-        # First match some system type aliases
1185
-        # that might get confused with valid system types.
1186
-	# -solaris* is a basic system type, with this one exception.
1187
-	-solaris1 | -solaris1.*)
1188
-		os=`echo $os | sed -e 's|solaris1|sunos4|'`
1189
-		;;
1190
-	-solaris)
1191
-		os=-solaris2
1192
-		;;
1193
-	-svr4*)
1194
-		os=-sysv4
1195
-		;;
1196
-	-unixware*)
1197
-		os=-sysv4.2uw
1198
-		;;
1199
-	-gnu/linux*)
1200
-		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1201
-		;;
1202
-	# First accept the basic system types.
1203
-	# The portable systems comes first.
1204
-	# Each alternative MUST END IN A *, to match a version number.
1205
-	# -sysv* is not here because it comes later, after sysvr4.
1206
-	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1207
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1208
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1209
-	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1210
-	      | -aos* \
1211
-	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1212
-	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1213
-	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1214
-	      | -openbsd* | -solidbsd* \
1215
-	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1216
-	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1217
-	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1218
-	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1219
-	      | -chorusos* | -chorusrdb* \
1220
-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1221
-	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1222
-	      | -uxpv* | -beos* | -mpeix* | -udk* \
1223
-	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1224
-	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1225
-	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1226
-	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1227
-	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1228
-	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1229
-	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
1230
-	# Remember, each alternative MUST END IN *, to match a version number.
1231
-		;;
1232
-	-qnx*)
1233
-		case $basic_machine in
1234
-		    x86-* | i*86-*)
1235
-			;;
1236
-		    *)
1237
-			os=-nto$os
1238
-			;;
1239
-		esac
1240
-		;;
1241
-	-nto-qnx*)
1242
-		;;
1243
-	-nto*)
1244
-		os=`echo $os | sed -e 's|nto|nto-qnx|'`
1245
-		;;
1246
-	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1247
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1248
-	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1249
-		;;
1250
-	-mac*)
1251
-		os=`echo $os | sed -e 's|mac|macos|'`
1252
-		;;
1253
-	-linux-dietlibc)
1254
-		os=-linux-dietlibc
1255
-		;;
1256
-	-linux*)
1257
-		os=`echo $os | sed -e 's|linux|linux-gnu|'`
1258
-		;;
1259
-	-sunos5*)
1260
-		os=`echo $os | sed -e 's|sunos5|solaris2|'`
1261
-		;;
1262
-	-sunos6*)
1263
-		os=`echo $os | sed -e 's|sunos6|solaris3|'`
1264
-		;;
1265
-	-opened*)
1266
-		os=-openedition
1267
-		;;
1268
-        -os400*)
1269
-		os=-os400
1270
-		;;
1271
-	-wince*)
1272
-		os=-wince
1273
-		;;
1274
-	-osfrose*)
1275
-		os=-osfrose
1276
-		;;
1277
-	-osf*)
1278
-		os=-osf
1279
-		;;
1280
-	-utek*)
1281
-		os=-bsd
1282
-		;;
1283
-	-dynix*)
1284
-		os=-bsd
1285
-		;;
1286
-	-acis*)
1287
-		os=-aos
1288
-		;;
1289
-	-atheos*)
1290
-		os=-atheos
1291
-		;;
1292
-	-syllable*)
1293
-		os=-syllable
1294
-		;;
1295
-	-386bsd)
1296
-		os=-bsd
1297
-		;;
1298
-	-ctix* | -uts*)
1299
-		os=-sysv
1300
-		;;
1301
-	-nova*)
1302
-		os=-rtmk-nova
1303
-		;;
1304
-	-ns2 )
1305
-		os=-nextstep2
1306
-		;;
1307
-	-nsk*)
1308
-		os=-nsk
1309
-		;;
1310
-	# Preserve the version number of sinix5.
1311
-	-sinix5.*)
1312
-		os=`echo $os | sed -e 's|sinix|sysv|'`
1313
-		;;
1314
-	-sinix*)
1315
-		os=-sysv4
1316
-		;;
1317
-        -tpf*)
1318
-		os=-tpf
1319
-		;;
1320
-	-triton*)
1321
-		os=-sysv3
1322
-		;;
1323
-	-oss*)
1324
-		os=-sysv3
1325
-		;;
1326
-	-svr4)
1327
-		os=-sysv4
1328
-		;;
1329
-	-svr3)
1330
-		os=-sysv3
1331
-		;;
1332
-	-sysvr4)
1333
-		os=-sysv4
1334
-		;;
1335
-	# This must come after -sysvr4.
1336
-	-sysv*)
1337
-		;;
1338
-	-ose*)
1339
-		os=-ose
1340
-		;;
1341
-	-es1800*)
1342
-		os=-ose
1343
-		;;
1344
-	-xenix)
1345
-		os=-xenix
1346
-		;;
1347
-	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1348
-		os=-mint
1349
-		;;
1350
-	-aros*)
1351
-		os=-aros
1352
-		;;
1353
-	-kaos*)
1354
-		os=-kaos
1355
-		;;
1356
-	-zvmoe)
1357
-		os=-zvmoe
1358
-		;;
1359
-	-none)
1360
-		;;
1361
-	*)
1362
-		# Get rid of the `-' at the beginning of $os.
1363
-		os=`echo $os | sed 's/[^-]*-//'`
1364
-		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1365
-		exit 1
1366
-		;;
1367
-esac
1368
-else
1369
-
1370
-# Here we handle the default operating systems that come with various machines.
1371
-# The value should be what the vendor currently ships out the door with their
1372
-# machine or put another way, the most popular os provided with the machine.
1373
-
1374
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
1375
-# "-sun"), then you have to tell the case statement up towards the top
1376
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
1377
-# will signal an error saying that MANUFACTURER isn't an operating
1378
-# system, and we'll never get to this point.
1379
-
1380
-case $basic_machine in
1381
-        score-*)
1382
-		os=-elf
1383
-		;;
1384
-        spu-*)
1385
-		os=-elf
1386
-		;;
1387
-	*-acorn)
1388
-		os=-riscix1.2
1389
-		;;
1390
-	arm*-rebel)
1391
-		os=-linux
1392
-		;;
1393
-	arm*-semi)
1394
-		os=-aout
1395
-		;;
1396
-        c4x-* | tic4x-*)
1397
-        	os=-coff
1398
-		;;
1399
-	# This must come before the *-dec entry.
1400
-	pdp10-*)
1401
-		os=-tops20
1402
-		;;
1403
-	pdp11-*)
1404
-		os=-none
1405
-		;;
1406
-	*-dec | vax-*)
1407
-		os=-ultrix4.2
1408
-		;;
1409
-	m68*-apollo)
1410
-		os=-domain
1411
-		;;
1412
-	i386-sun)
1413
-		os=-sunos4.0.2
1414
-		;;
1415
-	m68000-sun)
1416
-		os=-sunos3
1417
-		# This also exists in the configure program, but was not the
1418
-		# default.
1419
-		# os=-sunos4
1420
-		;;
1421
-	m68*-cisco)
1422
-		os=-aout
1423
-		;;
1424
-        mep-*)
1425
-		os=-elf
1426
-		;;
1427
-	mips*-cisco)
1428
-		os=-elf
1429
-		;;
1430
-	mips*-*)
1431
-		os=-elf
1432
-		;;
1433
-	or32-*)
1434
-		os=-coff
1435
-		;;
1436
-	*-tti)	# must be before sparc entry or we get the wrong os.
1437
-		os=-sysv3
1438
-		;;
1439
-	sparc-* | *-sun)
1440
-		os=-sunos4.1.1
1441
-		;;
1442
-	*-be)
1443
-		os=-beos
1444
-		;;
1445
-	*-haiku)
1446
-		os=-haiku
1447
-		;;
1448
-	*-ibm)
1449
-		os=-aix
1450
-		;;
1451
-    	*-knuth)
1452
-		os=-mmixware
1453
-		;;
1454
-	*-wec)
1455
-		os=-proelf
1456
-		;;
1457
-	*-winbond)
1458
-		os=-proelf
1459
-		;;
1460
-	*-oki)
1461
-		os=-proelf
1462
-		;;
1463
-	*-hp)
1464
-		os=-hpux
1465
-		;;
1466
-	*-hitachi)
1467
-		os=-hiux
1468
-		;;
1469
-	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1470
-		os=-sysv
1471
-		;;
1472
-	*-cbm)
1473
-		os=-amigaos
1474
-		;;
1475
-	*-dg)
1476
-		os=-dgux
1477
-		;;
1478
-	*-dolphin)
1479
-		os=-sysv3
1480
-		;;
1481
-	m68k-ccur)
1482
-		os=-rtu
1483
-		;;
1484
-	m88k-omron*)
1485
-		os=-luna
1486
-		;;
1487
-	*-next )
1488
-		os=-nextstep
1489
-		;;
1490
-	*-sequent)
1491
-		os=-ptx
1492
-		;;
1493
-	*-crds)
1494
-		os=-unos
1495
-		;;
1496
-	*-ns)
1497
-		os=-genix
1498
-		;;
1499
-	i370-*)
1500
-		os=-mvs
1501
-		;;
1502
-	*-next)
1503
-		os=-nextstep3
1504
-		;;
1505
-	*-gould)
1506
-		os=-sysv
1507
-		;;
1508
-	*-highlevel)
1509
-		os=-bsd
1510
-		;;
1511
-	*-encore)
1512
-		os=-bsd
1513
-		;;
1514
-	*-sgi)
1515
-		os=-irix
1516
-		;;
1517
-	*-siemens)
1518
-		os=-sysv4
1519
-		;;
1520
-	*-masscomp)
1521
-		os=-rtu
1522
-		;;
1523
-	f30[01]-fujitsu | f700-fujitsu)
1524
-		os=-uxpv
1525
-		;;
1526
-	*-rom68k)
1527
-		os=-coff
1528
-		;;
1529
-	*-*bug)
1530
-		os=-coff
1531
-		;;
1532
-	*-apple)
1533
-		os=-macos
1534
-		;;
1535
-	*-atari*)
1536
-		os=-mint
1537
-		;;
1538
-	*)
1539
-		os=-none
1540
-		;;
1541
-esac
1542
-fi
1543
-
1544
-# Here we handle the case where we know the os, and the CPU type, but not the
1545
-# manufacturer.  We pick the logical manufacturer.
1546
-vendor=unknown
1547
-case $basic_machine in
1548
-	*-unknown)
1549
-		case $os in
1550
-			-riscix*)
1551
-				vendor=acorn
1552
-				;;
1553
-			-sunos*)
1554
-				vendor=sun
1555
-				;;
1556
-			-aix*)
1557
-				vendor=ibm
1558
-				;;
1559
-			-beos*)
1560
-				vendor=be
1561
-				;;
1562
-			-hpux*)
1563
-				vendor=hp
1564
-				;;
1565
-			-mpeix*)
1566
-				vendor=hp
1567
-				;;
1568
-			-hiux*)
1569
-				vendor=hitachi
1570
-				;;
1571
-			-unos*)
1572
-				vendor=crds
1573
-				;;
1574
-			-dgux*)
1575
-				vendor=dg
1576
-				;;
1577
-			-luna*)
1578
-				vendor=omron
1579
-				;;
1580
-			-genix*)
1581
-				vendor=ns
1582
-				;;
1583
-			-mvs* | -opened*)
1584
-				vendor=ibm
1585
-				;;
1586
-			-os400*)
1587
-				vendor=ibm
1588
-				;;
1589
-			-ptx*)
1590
-				vendor=sequent
1591
-				;;
1592
-			-tpf*)
1593
-				vendor=ibm
1594
-				;;
1595
-			-vxsim* | -vxworks* | -windiss*)
1596
-				vendor=wrs
1597
-				;;
1598
-			-aux*)
1599
-				vendor=apple
1600
-				;;
1601
-			-hms*)
1602
-				vendor=hitachi
1603
-				;;
1604
-			-mpw* | -macos*)
1605
-				vendor=apple
1606
-				;;
1607
-			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1608
-				vendor=atari
1609
-				;;
1610
-			-vos*)
1611
-				vendor=stratus
1612
-				;;
1613
-		esac
1614
-		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1615
-		;;
1616
-esac
1617
-
1618
-echo $basic_machine$os
1619
-exit
1620
-
1621
-# Local variables:
1622
-# eval: (add-hook 'write-file-hooks 'time-stamp)
1623
-# time-stamp-start: "timestamp='"
1624
-# time-stamp-format: "%:y-%02m-%02d"
1625
-# time-stamp-end: "'"
1626
-# End:
1627 1
new file mode 100755
... ...
@@ -0,0 +1,1516 @@
0
+#! /bin/sh
1
+# Attempt to guess a canonical system name.
2
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
4
+#   Inc.
5
+
6
+timestamp='2007-07-22'
7
+
8
+# This file is free software; you can redistribute it and/or modify it
9
+# under the terms of the GNU General Public License as published by
10
+# the Free Software Foundation; either version 2 of the License, or
11
+# (at your option) any later version.
12
+#
13
+# This program is distributed in the hope that it will be useful, but
14
+# WITHOUT ANY WARRANTY; without even the implied warranty of
15
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
+# General Public License for more details.
17
+#
18
+# You should have received a copy of the GNU General Public License
19
+# along with this program; if not, write to the Free Software
20
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
21
+# 02110-1301, USA.
22
+#
23
+# As a special exception to the GNU General Public License, if you
24
+# distribute this file as part of a program that contains a
25
+# configuration script generated by Autoconf, you may include it under
26
+# the same distribution terms that you use for the rest of that program.
27
+
28
+
29
+# Originally written by Per Bothner <per@bothner.com>.
30
+# Please send patches to <config-patches@gnu.org>.  Submit a context
31
+# diff and a properly formatted ChangeLog entry.
32
+#
33
+# This script attempts to guess a canonical system name similar to
34
+# config.sub.  If it succeeds, it prints the system name on stdout, and
35
+# exits with 0.  Otherwise, it exits with 1.
36
+#
37
+# The plan is that this can be called by configure scripts if you
38
+# don't specify an explicit build system type.
39
+
40
+me=`echo "$0" | sed -e 's,.*/,,'`
41
+
42
+usage="\
43
+Usage: $0 [OPTION]
44
+
45
+Output the configuration name of the system \`$me' is run on.
46
+
47
+Operation modes:
48
+  -h, --help         print this help, then exit
49
+  -t, --time-stamp   print date of last modification, then exit
50
+  -v, --version      print version number, then exit
51
+
52
+Report bugs and patches to <config-patches@gnu.org>."
53
+
54
+version="\
55
+GNU config.guess ($timestamp)
56
+
57
+Originally written by Per Bothner.
58
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
59
+Free Software Foundation, Inc.
60
+
61
+This is free software; see the source for copying conditions.  There is NO
62
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
63
+
64
+help="
65
+Try \`$me --help' for more information."
66
+
67
+# Parse command line
68
+while test $# -gt 0 ; do
69
+  case $1 in
70
+    --time-stamp | --time* | -t )
71
+       echo "$timestamp" ; exit ;;
72
+    --version | -v )
73
+       echo "$version" ; exit ;;
74
+    --help | --h* | -h )
75
+       echo "$usage"; exit ;;
76
+    -- )     # Stop option processing
77
+       shift; break ;;
78
+    - )	# Use stdin as input.
79
+       break ;;
80
+    -* )
81
+       echo "$me: invalid option $1$help" >&2
82
+       exit 1 ;;
83
+    * )
84
+       break ;;
85
+  esac
86
+done
87
+
88
+if test $# != 0; then
89
+  echo "$me: too many arguments$help" >&2
90
+  exit 1
91
+fi
92
+
93
+trap 'exit 1' 1 2 15
94
+
95
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
96
+# compiler to aid in system detection is discouraged as it requires
97
+# temporary files to be created and, as you can see below, it is a
98
+# headache to deal with in a portable fashion.
99
+
100
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
101
+# use `HOST_CC' if defined, but it is deprecated.
102
+
103
+# Portable tmp directory creation inspired by the Autoconf team.
104
+
105
+set_cc_for_build='
106
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
107
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
108
+: ${TMPDIR=/tmp} ;
109
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
110
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
111
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
112
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
113
+dummy=$tmp/dummy ;
114
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
115
+case $CC_FOR_BUILD,$HOST_CC,$CC in
116
+ ,,)    echo "int x;" > $dummy.c ;
117
+	for c in cc gcc c89 c99 ; do
118
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
119
+	     CC_FOR_BUILD="$c"; break ;
120
+	  fi ;
121
+	done ;
122
+	if test x"$CC_FOR_BUILD" = x ; then
123
+	  CC_FOR_BUILD=no_compiler_found ;
124
+	fi
125
+	;;
126
+ ,,*)   CC_FOR_BUILD=$CC ;;
127
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
128
+esac ; set_cc_for_build= ;'
129
+
130
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
131
+# (ghazi@noc.rutgers.edu 1994-08-24)
132
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
133
+	PATH=$PATH:/.attbin ; export PATH
134
+fi
135
+
136
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
137
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
138
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
139
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
140
+
141
+# Note: order is significant - the case branches are not exclusive.
142
+
143
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
144
+    *:NetBSD:*:*)
145
+	# NetBSD (nbsd) targets should (where applicable) match one or
146
+	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
147
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
148
+	# switched to ELF, *-*-netbsd* would select the old
149
+	# object file format.  This provides both forward
150
+	# compatibility and a consistent mechanism for selecting the
151
+	# object file format.
152
+	#
153
+	# Note: NetBSD doesn't particularly care about the vendor
154
+	# portion of the name.  We always set it to "unknown".
155
+	sysctl="sysctl -n hw.machine_arch"
156
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
157
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
158
+	case "${UNAME_MACHINE_ARCH}" in
159
+	    armeb) machine=armeb-unknown ;;
160
+	    arm*) machine=arm-unknown ;;
161
+	    sh3el) machine=shl-unknown ;;
162
+	    sh3eb) machine=sh-unknown ;;
163
+	    sh5el) machine=sh5le-unknown ;;
164
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
165
+	esac
166
+	# The Operating System including object format, if it has switched
167
+	# to ELF recently, or will in the future.
168
+	case "${UNAME_MACHINE_ARCH}" in
169
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
170
+		eval $set_cc_for_build
171
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
172
+			| grep __ELF__ >/dev/null
173
+		then
174
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
175
+		    # Return netbsd for either.  FIX?
176
+		    os=netbsd
177
+		else
178
+		    os=netbsdelf
179
+		fi
180
+		;;
181
+	    *)
182
+	        os=netbsd
183
+		;;
184
+	esac
185
+	# The OS release
186
+	# Debian GNU/NetBSD machines have a different userland, and
187
+	# thus, need a distinct triplet. However, they do not need
188
+	# kernel version information, so it can be replaced with a
189
+	# suitable tag, in the style of linux-gnu.
190
+	case "${UNAME_VERSION}" in
191
+	    Debian*)
192
+		release='-gnu'
193
+		;;
194
+	    *)
195
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
196
+		;;
197
+	esac
198
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
199
+	# contains redundant information, the shorter form:
200
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
201
+	echo "${machine}-${os}${release}"
202
+	exit ;;
203
+    *:OpenBSD:*:*)
204
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
205
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
206
+	exit ;;
207
+    *:ekkoBSD:*:*)
208
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
209
+	exit ;;
210
+    *:SolidBSD:*:*)
211
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
212
+	exit ;;
213
+    macppc:MirBSD:*:*)
214
+	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
215
+	exit ;;
216
+    *:MirBSD:*:*)
217
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
218
+	exit ;;
219
+    alpha:OSF1:*:*)
220
+	case $UNAME_RELEASE in
221
+	*4.0)
222
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
223
+		;;
224
+	*5.*)
225
+	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
226
+		;;
227
+	esac
228
+	# According to Compaq, /usr/sbin/psrinfo has been available on
229
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
230
+	# covers most systems running today.  This code pipes the CPU
231
+	# types through head -n 1, so we only detect the type of CPU 0.
232
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
233
+	case "$ALPHA_CPU_TYPE" in
234
+	    "EV4 (21064)")
235
+		UNAME_MACHINE="alpha" ;;
236
+	    "EV4.5 (21064)")
237
+		UNAME_MACHINE="alpha" ;;
238
+	    "LCA4 (21066/21068)")
239
+		UNAME_MACHINE="alpha" ;;
240
+	    "EV5 (21164)")
241
+		UNAME_MACHINE="alphaev5" ;;
242
+	    "EV5.6 (21164A)")
243
+		UNAME_MACHINE="alphaev56" ;;
244
+	    "EV5.6 (21164PC)")
245
+		UNAME_MACHINE="alphapca56" ;;
246
+	    "EV5.7 (21164PC)")
247
+		UNAME_MACHINE="alphapca57" ;;
248
+	    "EV6 (21264)")
249
+		UNAME_MACHINE="alphaev6" ;;
250
+	    "EV6.7 (21264A)")
251
+		UNAME_MACHINE="alphaev67" ;;
252
+	    "EV6.8CB (21264C)")
253
+		UNAME_MACHINE="alphaev68" ;;
254
+	    "EV6.8AL (21264B)")
255
+		UNAME_MACHINE="alphaev68" ;;
256
+	    "EV6.8CX (21264D)")
257
+		UNAME_MACHINE="alphaev68" ;;
258
+	    "EV6.9A (21264/EV69A)")
259
+		UNAME_MACHINE="alphaev69" ;;
260
+	    "EV7 (21364)")
261
+		UNAME_MACHINE="alphaev7" ;;
262
+	    "EV7.9 (21364A)")
263
+		UNAME_MACHINE="alphaev79" ;;
264
+	esac
265
+	# A Pn.n version is a patched version.
266
+	# A Vn.n version is a released version.
267
+	# A Tn.n version is a released field test version.
268
+	# A Xn.n version is an unreleased experimental baselevel.
269
+	# 1.2 uses "1.2" for uname -r.
270
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
271
+	exit ;;
272
+    Alpha\ *:Windows_NT*:*)
273
+	# How do we know it's Interix rather than the generic POSIX subsystem?
274
+	# Should we change UNAME_MACHINE based on the output of uname instead
275
+	# of the specific Alpha model?
276
+	echo alpha-pc-interix
277
+	exit ;;
278
+    21064:Windows_NT:50:3)
279
+	echo alpha-dec-winnt3.5
280
+	exit ;;
281
+    Amiga*:UNIX_System_V:4.0:*)
282
+	echo m68k-unknown-sysv4
283
+	exit ;;
284
+    *:[Aa]miga[Oo][Ss]:*:*)
285
+	echo ${UNAME_MACHINE}-unknown-amigaos
286
+	exit ;;
287
+    *:[Mm]orph[Oo][Ss]:*:*)
288
+	echo ${UNAME_MACHINE}-unknown-morphos
289
+	exit ;;
290
+    *:OS/390:*:*)
291
+	echo i370-ibm-openedition
292
+	exit ;;
293
+    *:z/VM:*:*)
294
+	echo s390-ibm-zvmoe
295
+	exit ;;
296
+    *:OS400:*:*)
297
+        echo powerpc-ibm-os400
298
+	exit ;;
299
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
300
+	echo arm-acorn-riscix${UNAME_RELEASE}
301
+	exit ;;
302
+    arm:riscos:*:*|arm:RISCOS:*:*)
303
+	echo arm-unknown-riscos
304
+	exit ;;
305
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
306
+	echo hppa1.1-hitachi-hiuxmpp
307
+	exit ;;
308
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
309
+	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
310
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
311
+		echo pyramid-pyramid-sysv3
312
+	else
313
+		echo pyramid-pyramid-bsd
314
+	fi
315
+	exit ;;
316
+    NILE*:*:*:dcosx)
317
+	echo pyramid-pyramid-svr4
318
+	exit ;;
319
+    DRS?6000:unix:4.0:6*)
320
+	echo sparc-icl-nx6
321
+	exit ;;
322
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
323
+	case `/usr/bin/uname -p` in
324
+	    sparc) echo sparc-icl-nx7; exit ;;
325
+	esac ;;
326
+    sun4H:SunOS:5.*:*)
327
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
328
+	exit ;;
329
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
330
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
331
+	exit ;;
332
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
333
+	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
334
+	exit ;;
335
+    sun4*:SunOS:6*:*)
336
+	# According to config.sub, this is the proper way to canonicalize
337
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
338
+	# it's likely to be more like Solaris than SunOS4.
339
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
340
+	exit ;;
341
+    sun4*:SunOS:*:*)
342
+	case "`/usr/bin/arch -k`" in
343
+	    Series*|S4*)
344
+		UNAME_RELEASE=`uname -v`
345
+		;;
346
+	esac
347
+	# Japanese Language versions have a version number like `4.1.3-JL'.
348
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
349
+	exit ;;
350
+    sun3*:SunOS:*:*)
351
+	echo m68k-sun-sunos${UNAME_RELEASE}
352
+	exit ;;
353
+    sun*:*:4.2BSD:*)
354
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
355
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
356
+	case "`/bin/arch`" in
357
+	    sun3)
358
+		echo m68k-sun-sunos${UNAME_RELEASE}
359
+		;;
360
+	    sun4)
361
+		echo sparc-sun-sunos${UNAME_RELEASE}
362
+		;;
363
+	esac
364
+	exit ;;
365
+    aushp:SunOS:*:*)
366
+	echo sparc-auspex-sunos${UNAME_RELEASE}
367
+	exit ;;
368
+    # The situation for MiNT is a little confusing.  The machine name
369
+    # can be virtually everything (everything which is not
370
+    # "atarist" or "atariste" at least should have a processor
371
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
372
+    # to the lowercase version "mint" (or "freemint").  Finally
373
+    # the system name "TOS" denotes a system which is actually not
374
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
375
+    # be no problem.
376
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
377
+        echo m68k-atari-mint${UNAME_RELEASE}
378
+	exit ;;
379
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
380
+	echo m68k-atari-mint${UNAME_RELEASE}
381
+        exit ;;
382
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
383
+        echo m68k-atari-mint${UNAME_RELEASE}
384
+	exit ;;
385
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
386
+        echo m68k-milan-mint${UNAME_RELEASE}
387
+        exit ;;
388
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
389
+        echo m68k-hades-mint${UNAME_RELEASE}
390
+        exit ;;
391
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
392
+        echo m68k-unknown-mint${UNAME_RELEASE}
393
+        exit ;;
394
+    m68k:machten:*:*)
395
+	echo m68k-apple-machten${UNAME_RELEASE}
396
+	exit ;;
397
+    powerpc:machten:*:*)
398
+	echo powerpc-apple-machten${UNAME_RELEASE}
399
+	exit ;;
400
+    RISC*:Mach:*:*)
401
+	echo mips-dec-mach_bsd4.3
402
+	exit ;;
403
+    RISC*:ULTRIX:*:*)
404
+	echo mips-dec-ultrix${UNAME_RELEASE}
405
+	exit ;;
406
+    VAX*:ULTRIX*:*:*)
407
+	echo vax-dec-ultrix${UNAME_RELEASE}
408
+	exit ;;
409
+    2020:CLIX:*:* | 2430:CLIX:*:*)
410
+	echo clipper-intergraph-clix${UNAME_RELEASE}
411
+	exit ;;
412
+    mips:*:*:UMIPS | mips:*:*:RISCos)
413
+	eval $set_cc_for_build
414
+	sed 's/^	//' << EOF >$dummy.c
415
+#ifdef __cplusplus
416
+#include <stdio.h>  /* for printf() prototype */
417
+	int main (int argc, char *argv[]) {
418
+#else
419
+	int main (argc, argv) int argc; char *argv[]; {
420
+#endif
421
+	#if defined (host_mips) && defined (MIPSEB)
422
+	#if defined (SYSTYPE_SYSV)
423
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
424
+	#endif
425
+	#if defined (SYSTYPE_SVR4)
426
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
427
+	#endif
428
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
429
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
430
+	#endif
431
+	#endif
432
+	  exit (-1);
433
+	}
434
+EOF
435
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
436
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
437
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
438
+	    { echo "$SYSTEM_NAME"; exit; }
439
+	echo mips-mips-riscos${UNAME_RELEASE}
440
+	exit ;;
441
+    Motorola:PowerMAX_OS:*:*)
442
+	echo powerpc-motorola-powermax
443
+	exit ;;
444
+    Motorola:*:4.3:PL8-*)
445
+	echo powerpc-harris-powermax
446
+	exit ;;
447
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
448
+	echo powerpc-harris-powermax
449
+	exit ;;
450
+    Night_Hawk:Power_UNIX:*:*)
451
+	echo powerpc-harris-powerunix
452
+	exit ;;
453
+    m88k:CX/UX:7*:*)
454
+	echo m88k-harris-cxux7
455
+	exit ;;
456
+    m88k:*:4*:R4*)
457
+	echo m88k-motorola-sysv4
458
+	exit ;;
459
+    m88k:*:3*:R3*)
460
+	echo m88k-motorola-sysv3
461
+	exit ;;
462
+    AViiON:dgux:*:*)
463
+        # DG/UX returns AViiON for all architectures
464
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
465
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
466
+	then
467
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
468
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
469
+	    then
470
+		echo m88k-dg-dgux${UNAME_RELEASE}
471
+	    else
472
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
473
+	    fi
474
+	else
475
+	    echo i586-dg-dgux${UNAME_RELEASE}
476
+	fi
477
+ 	exit ;;
478
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
479
+	echo m88k-dolphin-sysv3
480
+	exit ;;
481
+    M88*:*:R3*:*)
482
+	# Delta 88k system running SVR3
483
+	echo m88k-motorola-sysv3
484
+	exit ;;
485
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
486
+	echo m88k-tektronix-sysv3
487
+	exit ;;
488
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
489
+	echo m68k-tektronix-bsd
490
+	exit ;;
491
+    *:IRIX*:*:*)
492
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
493
+	exit ;;
494
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
495
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
496
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
497
+    i*86:AIX:*:*)
498
+	echo i386-ibm-aix
499
+	exit ;;
500
+    ia64:AIX:*:*)
501
+	if [ -x /usr/bin/oslevel ] ; then
502
+		IBM_REV=`/usr/bin/oslevel`
503
+	else
504
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
505
+	fi
506
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
507
+	exit ;;
508
+    *:AIX:2:3)
509
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
510
+		eval $set_cc_for_build
511
+		sed 's/^		//' << EOF >$dummy.c
512
+		#include <sys/systemcfg.h>
513
+
514
+		main()
515
+			{
516
+			if (!__power_pc())
517
+				exit(1);
518
+			puts("powerpc-ibm-aix3.2.5");
519
+			exit(0);
520
+			}
521
+EOF
522
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
523
+		then
524
+			echo "$SYSTEM_NAME"
525
+		else
526
+			echo rs6000-ibm-aix3.2.5
527
+		fi
528
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
529
+		echo rs6000-ibm-aix3.2.4
530
+	else
531
+		echo rs6000-ibm-aix3.2
532
+	fi
533
+	exit ;;
534
+    *:AIX:*:[45])
535
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
536
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
537
+		IBM_ARCH=rs6000
538
+	else
539
+		IBM_ARCH=powerpc
540
+	fi
541
+	if [ -x /usr/bin/oslevel ] ; then
542
+		IBM_REV=`/usr/bin/oslevel`
543
+	else
544
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
545
+	fi
546
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
547
+	exit ;;
548
+    *:AIX:*:*)
549
+	echo rs6000-ibm-aix
550
+	exit ;;
551
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
552
+	echo romp-ibm-bsd4.4
553
+	exit ;;
554
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
555
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
556
+	exit ;;                             # report: romp-ibm BSD 4.3
557
+    *:BOSX:*:*)
558
+	echo rs6000-bull-bosx
559
+	exit ;;
560
+    DPX/2?00:B.O.S.:*:*)
561
+	echo m68k-bull-sysv3
562
+	exit ;;
563
+    9000/[34]??:4.3bsd:1.*:*)
564
+	echo m68k-hp-bsd
565
+	exit ;;
566
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
567
+	echo m68k-hp-bsd4.4
568
+	exit ;;
569
+    9000/[34678]??:HP-UX:*:*)
570
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
571
+	case "${UNAME_MACHINE}" in
572
+	    9000/31? )            HP_ARCH=m68000 ;;
573
+	    9000/[34]?? )         HP_ARCH=m68k ;;
574
+	    9000/[678][0-9][0-9])
575
+		if [ -x /usr/bin/getconf ]; then
576
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
577
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
578
+                    case "${sc_cpu_version}" in
579
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
580
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
581
+                      532)                      # CPU_PA_RISC2_0
582
+                        case "${sc_kernel_bits}" in
583
+                          32) HP_ARCH="hppa2.0n" ;;
584
+                          64) HP_ARCH="hppa2.0w" ;;
585
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
586
+                        esac ;;
587
+                    esac
588
+		fi
589
+		if [ "${HP_ARCH}" = "" ]; then
590
+		    eval $set_cc_for_build
591
+		    sed 's/^              //' << EOF >$dummy.c
592
+
593
+              #define _HPUX_SOURCE
594
+              #include <stdlib.h>
595
+              #include <unistd.h>
596
+
597
+              int main ()
598
+              {
599
+              #if defined(_SC_KERNEL_BITS)
600
+                  long bits = sysconf(_SC_KERNEL_BITS);
601
+              #endif
602
+                  long cpu  = sysconf (_SC_CPU_VERSION);
603
+
604
+                  switch (cpu)
605
+              	{
606
+              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
607
+              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
608
+              	case CPU_PA_RISC2_0:
609
+              #if defined(_SC_KERNEL_BITS)
610
+              	    switch (bits)
611
+              		{
612
+              		case 64: puts ("hppa2.0w"); break;
613
+              		case 32: puts ("hppa2.0n"); break;
614
+              		default: puts ("hppa2.0"); break;
615
+              		} break;
616
+              #else  /* !defined(_SC_KERNEL_BITS) */
617
+              	    puts ("hppa2.0"); break;
618
+              #endif
619
+              	default: puts ("hppa1.0"); break;
620
+              	}
621
+                  exit (0);
622
+              }
623
+EOF
624
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
625
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
626
+		fi ;;
627
+	esac
628
+	if [ ${HP_ARCH} = "hppa2.0w" ]
629
+	then
630
+	    eval $set_cc_for_build
631
+
632
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
633
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
634
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
635
+	    #
636
+	    # $ CC_FOR_BUILD=cc ./config.guess
637
+	    # => hppa2.0w-hp-hpux11.23
638
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
639
+	    # => hppa64-hp-hpux11.23
640
+
641
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
642
+		grep __LP64__ >/dev/null
643
+	    then
644
+		HP_ARCH="hppa2.0w"
645
+	    else
646
+		HP_ARCH="hppa64"
647
+	    fi
648
+	fi
649
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
650
+	exit ;;
651
+    ia64:HP-UX:*:*)
652
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
653
+	echo ia64-hp-hpux${HPUX_REV}
654
+	exit ;;
655
+    3050*:HI-UX:*:*)
656
+	eval $set_cc_for_build
657
+	sed 's/^	//' << EOF >$dummy.c
658
+	#include <unistd.h>
659
+	int
660
+	main ()
661
+	{
662
+	  long cpu = sysconf (_SC_CPU_VERSION);
663
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
664
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
665
+	     results, however.  */
666
+	  if (CPU_IS_PA_RISC (cpu))
667
+	    {
668
+	      switch (cpu)
669
+		{
670
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
671
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
672
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
673
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
674
+		}
675
+	    }
676
+	  else if (CPU_IS_HP_MC68K (cpu))
677
+	    puts ("m68k-hitachi-hiuxwe2");
678
+	  else puts ("unknown-hitachi-hiuxwe2");
679
+	  exit (0);
680
+	}
681
+EOF
682
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
683
+		{ echo "$SYSTEM_NAME"; exit; }
684
+	echo unknown-hitachi-hiuxwe2
685
+	exit ;;
686
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
687
+	echo hppa1.1-hp-bsd
688
+	exit ;;
689
+    9000/8??:4.3bsd:*:*)
690
+	echo hppa1.0-hp-bsd
691
+	exit ;;
692
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
693
+	echo hppa1.0-hp-mpeix
694
+	exit ;;
695
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
696
+	echo hppa1.1-hp-osf
697
+	exit ;;
698
+    hp8??:OSF1:*:*)
699
+	echo hppa1.0-hp-osf
700
+	exit ;;
701
+    i*86:OSF1:*:*)
702
+	if [ -x /usr/sbin/sysversion ] ; then
703
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
704
+	else
705
+	    echo ${UNAME_MACHINE}-unknown-osf1
706
+	fi
707
+	exit ;;
708
+    parisc*:Lites*:*:*)
709
+	echo hppa1.1-hp-lites
710
+	exit ;;
711
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
712
+	echo c1-convex-bsd
713
+        exit ;;
714
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
715
+	if getsysinfo -f scalar_acc
716
+	then echo c32-convex-bsd
717
+	else echo c2-convex-bsd
718
+	fi
719
+        exit ;;
720
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
721
+	echo c34-convex-bsd
722
+        exit ;;
723
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
724
+	echo c38-convex-bsd
725
+        exit ;;
726
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
727
+	echo c4-convex-bsd
728
+        exit ;;
729
+    CRAY*Y-MP:*:*:*)
730
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
731
+	exit ;;
732
+    CRAY*[A-Z]90:*:*:*)
733
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
734
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
735
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
736
+	      -e 's/\.[^.]*$/.X/'
737
+	exit ;;
738
+    CRAY*TS:*:*:*)
739
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
740
+	exit ;;
741
+    CRAY*T3E:*:*:*)
742
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
743
+	exit ;;
744
+    CRAY*SV1:*:*:*)
745
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
746
+	exit ;;
747
+    *:UNICOS/mp:*:*)
748
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
749
+	exit ;;
750
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
751
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
752
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
753
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
754
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
755
+        exit ;;
756
+    5000:UNIX_System_V:4.*:*)
757
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
758
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
759
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
760
+	exit ;;
761
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
762
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
763
+	exit ;;
764
+    sparc*:BSD/OS:*:*)
765
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
766
+	exit ;;
767
+    *:BSD/OS:*:*)
768
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
769
+	exit ;;
770
+    *:FreeBSD:*:*)
771
+	case ${UNAME_MACHINE} in
772
+	    pc98)
773
+		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
774
+	    amd64)
775
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
776
+	    *)
777
+		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
778
+	esac
779
+	exit ;;
780
+    i*:CYGWIN*:*)
781
+	echo ${UNAME_MACHINE}-pc-cygwin
782
+	exit ;;
783
+    *:MINGW*:*)
784
+	echo ${UNAME_MACHINE}-pc-mingw32
785
+	exit ;;
786
+    i*:windows32*:*)
787
+    	# uname -m includes "-pc" on this system.
788
+    	echo ${UNAME_MACHINE}-mingw32
789
+	exit ;;
790
+    i*:PW*:*)
791
+	echo ${UNAME_MACHINE}-pc-pw32
792
+	exit ;;
793
+    *:Interix*:[3456]*)
794
+    	case ${UNAME_MACHINE} in
795
+	    x86)
796
+		echo i586-pc-interix${UNAME_RELEASE}
797
+		exit ;;
798
+	    EM64T | authenticamd)
799
+		echo x86_64-unknown-interix${UNAME_RELEASE}
800
+		exit ;;
801
+	esac ;;
802
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
803
+	echo i${UNAME_MACHINE}-pc-mks
804
+	exit ;;
805
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
806
+	# How do we know it's Interix rather than the generic POSIX subsystem?
807
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
808
+	# UNAME_MACHINE based on the output of uname instead of i386?
809
+	echo i586-pc-interix
810
+	exit ;;
811
+    i*:UWIN*:*)
812
+	echo ${UNAME_MACHINE}-pc-uwin
813
+	exit ;;
814
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
815
+	echo x86_64-unknown-cygwin
816
+	exit ;;
817
+    p*:CYGWIN*:*)
818
+	echo powerpcle-unknown-cygwin
819
+	exit ;;
820
+    prep*:SunOS:5.*:*)
821
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
822
+	exit ;;
823
+    *:GNU:*:*)
824
+	# the GNU system
825
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
826
+	exit ;;
827
+    *:GNU/*:*:*)
828
+	# other systems with GNU libc and userland
829
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
830
+	exit ;;
831
+    i*86:Minix:*:*)
832
+	echo ${UNAME_MACHINE}-pc-minix
833
+	exit ;;
834
+    arm*:Linux:*:*)
835
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
836
+	exit ;;
837
+    avr32*:Linux:*:*)
838
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
839
+	exit ;;
840
+    cris:Linux:*:*)
841
+	echo cris-axis-linux-gnu
842
+	exit ;;
843
+    crisv32:Linux:*:*)
844
+	echo crisv32-axis-linux-gnu
845
+	exit ;;
846
+    frv:Linux:*:*)
847
+    	echo frv-unknown-linux-gnu
848
+	exit ;;
849
+    ia64:Linux:*:*)
850
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
851
+	exit ;;
852
+    m32r*:Linux:*:*)
853
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
854
+	exit ;;
855
+    m68*:Linux:*:*)
856
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
857
+	exit ;;
858
+    mips:Linux:*:*)
859
+	eval $set_cc_for_build
860
+	sed 's/^	//' << EOF >$dummy.c
861
+	#undef CPU
862
+	#undef mips
863
+	#undef mipsel
864
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
865
+	CPU=mipsel
866
+	#else
867
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
868
+	CPU=mips
869
+	#else
870
+	CPU=
871
+	#endif
872
+	#endif
873
+EOF
874
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
875
+	    /^CPU/{
876
+		s: ::g
877
+		p
878
+	    }'`"
879
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
880
+	;;
881
+    mips64:Linux:*:*)
882
+	eval $set_cc_for_build
883
+	sed 's/^	//' << EOF >$dummy.c
884
+	#undef CPU
885
+	#undef mips64
886
+	#undef mips64el
887
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
888
+	CPU=mips64el
889
+	#else
890
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
891
+	CPU=mips64
892
+	#else
893
+	CPU=
894
+	#endif
895
+	#endif
896
+EOF
897
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
898
+	    /^CPU/{
899
+		s: ::g
900
+		p
901
+	    }'`"
902
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
903
+	;;
904
+    or32:Linux:*:*)
905
+	echo or32-unknown-linux-gnu
906
+	exit ;;
907
+    ppc:Linux:*:*)
908
+	echo powerpc-unknown-linux-gnu
909
+	exit ;;
910
+    ppc64:Linux:*:*)
911
+	echo powerpc64-unknown-linux-gnu
912
+	exit ;;
913
+    alpha:Linux:*:*)
914
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
915
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
916
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
917
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
918
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
919
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
920
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
921
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
922
+        esac
923
+	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
924
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
925
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
926
+	exit ;;
927
+    parisc:Linux:*:* | hppa:Linux:*:*)
928
+	# Look for CPU level
929
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
930
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
931
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
932
+	  *)    echo hppa-unknown-linux-gnu ;;
933
+	esac
934
+	exit ;;
935
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
936
+	echo hppa64-unknown-linux-gnu
937
+	exit ;;
938
+    s390:Linux:*:* | s390x:Linux:*:*)
939
+	echo ${UNAME_MACHINE}-ibm-linux
940
+	exit ;;
941
+    sh64*:Linux:*:*)
942
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
943
+	exit ;;
944
+    sh*:Linux:*:*)
945
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
946
+	exit ;;
947
+    sparc:Linux:*:* | sparc64:Linux:*:*)
948
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
949
+	exit ;;
950
+    vax:Linux:*:*)
951
+	echo ${UNAME_MACHINE}-dec-linux-gnu
952
+	exit ;;
953
+    x86_64:Linux:*:*)
954
+	echo x86_64-unknown-linux-gnu
955
+	exit ;;
956
+    xtensa:Linux:*:*)
957
+    	echo xtensa-unknown-linux-gnu
958
+	exit ;;
959
+    i*86:Linux:*:*)
960
+	# The BFD linker knows what the default object file format is, so
961
+	# first see if it will tell us. cd to the root directory to prevent
962
+	# problems with other programs or directories called `ld' in the path.
963
+	# Set LC_ALL=C to ensure ld outputs messages in English.
964
+	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
965
+			 | sed -ne '/supported targets:/!d
966
+				    s/[ 	][ 	]*/ /g
967
+				    s/.*supported targets: *//
968
+				    s/ .*//
969
+				    p'`
970
+        case "$ld_supported_targets" in
971
+	  elf32-i386)
972
+		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
973
+		;;
974
+	  a.out-i386-linux)
975
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
976
+		exit ;;
977
+	  coff-i386)
978
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
979
+		exit ;;
980
+	  "")
981
+		# Either a pre-BFD a.out linker (linux-gnuoldld) or
982
+		# one that does not give us useful --help.
983
+		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
984
+		exit ;;
985
+	esac
986
+	# Determine whether the default compiler is a.out or elf
987
+	eval $set_cc_for_build
988
+	sed 's/^	//' << EOF >$dummy.c
989
+	#include <features.h>
990
+	#ifdef __ELF__
991
+	# ifdef __GLIBC__
992
+	#  if __GLIBC__ >= 2
993
+	LIBC=gnu
994
+	#  else
995
+	LIBC=gnulibc1
996
+	#  endif
997
+	# else
998
+	LIBC=gnulibc1
999
+	# endif
1000
+	#else
1001
+	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
1002
+	LIBC=gnu
1003
+	#else
1004
+	LIBC=gnuaout
1005
+	#endif
1006
+	#endif
1007
+	#ifdef __dietlibc__
1008
+	LIBC=dietlibc
1009
+	#endif
1010
+EOF
1011
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1012
+	    /^LIBC/{
1013
+		s: ::g
1014
+		p
1015
+	    }'`"
1016
+	test x"${LIBC}" != x && {
1017
+		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1018
+		exit
1019
+	}
1020
+	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
1021
+	;;
1022
+    i*86:DYNIX/ptx:4*:*)
1023
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1024
+	# earlier versions are messed up and put the nodename in both
1025
+	# sysname and nodename.
1026
+	echo i386-sequent-sysv4
1027
+	exit ;;
1028
+    i*86:UNIX_SV:4.2MP:2.*)
1029
+        # Unixware is an offshoot of SVR4, but it has its own version
1030
+        # number series starting with 2...
1031
+        # I am not positive that other SVR4 systems won't match this,
1032
+	# I just have to hope.  -- rms.
1033
+        # Use sysv4.2uw... so that sysv4* matches it.
1034
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1035
+	exit ;;
1036
+    i*86:OS/2:*:*)
1037
+	# If we were able to find `uname', then EMX Unix compatibility
1038
+	# is probably installed.
1039
+	echo ${UNAME_MACHINE}-pc-os2-emx
1040
+	exit ;;
1041
+    i*86:XTS-300:*:STOP)
1042
+	echo ${UNAME_MACHINE}-unknown-stop
1043
+	exit ;;
1044
+    i*86:atheos:*:*)
1045
+	echo ${UNAME_MACHINE}-unknown-atheos
1046
+	exit ;;
1047
+    i*86:syllable:*:*)
1048
+	echo ${UNAME_MACHINE}-pc-syllable
1049
+	exit ;;
1050
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1051
+	echo i386-unknown-lynxos${UNAME_RELEASE}
1052
+	exit ;;
1053
+    i*86:*DOS:*:*)
1054
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
1055
+	exit ;;
1056
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1057
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1058
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1059
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1060
+	else
1061
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1062
+	fi
1063
+	exit ;;
1064
+    i*86:*:5:[678]*)
1065
+    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
1066
+	case `/bin/uname -X | grep "^Machine"` in
1067
+	    *486*)	     UNAME_MACHINE=i486 ;;
1068
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
1069
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1070
+	esac
1071
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1072
+	exit ;;
1073
+    i*86:*:3.2:*)
1074
+	if test -f /usr/options/cb.name; then
1075
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1076
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1077
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
1078
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1079
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1080
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1081
+			&& UNAME_MACHINE=i586
1082
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1083
+			&& UNAME_MACHINE=i686
1084
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1085
+			&& UNAME_MACHINE=i686
1086
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1087
+	else
1088
+		echo ${UNAME_MACHINE}-pc-sysv32
1089
+	fi
1090
+	exit ;;
1091
+    pc:*:*:*)
1092
+	# Left here for compatibility:
1093
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
1094
+        # the processor, so we play safe by assuming i386.
1095
+	echo i386-pc-msdosdjgpp
1096
+        exit ;;
1097
+    Intel:Mach:3*:*)
1098
+	echo i386-pc-mach3
1099
+	exit ;;
1100
+    paragon:*:*:*)
1101
+	echo i860-intel-osf1
1102
+	exit ;;
1103
+    i860:*:4.*:*) # i860-SVR4
1104
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1105
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1106
+	else # Add other i860-SVR4 vendors below as they are discovered.
1107
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
1108
+	fi
1109
+	exit ;;
1110
+    mini*:CTIX:SYS*5:*)
1111
+	# "miniframe"
1112
+	echo m68010-convergent-sysv
1113
+	exit ;;
1114
+    mc68k:UNIX:SYSTEM5:3.51m)
1115
+	echo m68k-convergent-sysv
1116
+	exit ;;
1117
+    M680?0:D-NIX:5.3:*)
1118
+	echo m68k-diab-dnix
1119
+	exit ;;
1120
+    M68*:*:R3V[5678]*:*)
1121
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1122
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
1123
+	OS_REL=''
1124
+	test -r /etc/.relid \
1125
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1126
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1127
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1128
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1129
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1130
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1131
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1132
+          && { echo i486-ncr-sysv4; exit; } ;;
1133
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1134
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
1135
+	exit ;;
1136
+    mc68030:UNIX_System_V:4.*:*)
1137
+	echo m68k-atari-sysv4
1138
+	exit ;;
1139
+    TSUNAMI:LynxOS:2.*:*)
1140
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
1141
+	exit ;;
1142
+    rs6000:LynxOS:2.*:*)
1143
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
1144
+	exit ;;
1145
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1146
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
1147
+	exit ;;
1148
+    SM[BE]S:UNIX_SV:*:*)
1149
+	echo mips-dde-sysv${UNAME_RELEASE}
1150
+	exit ;;
1151
+    RM*:ReliantUNIX-*:*:*)
1152
+	echo mips-sni-sysv4
1153
+	exit ;;
1154
+    RM*:SINIX-*:*:*)
1155
+	echo mips-sni-sysv4
1156
+	exit ;;
1157
+    *:SINIX-*:*:*)
1158
+	if uname -p 2>/dev/null >/dev/null ; then
1159
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
1160
+		echo ${UNAME_MACHINE}-sni-sysv4
1161
+	else
1162
+		echo ns32k-sni-sysv
1163
+	fi
1164
+	exit ;;
1165
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1166
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
1167
+        echo i586-unisys-sysv4
1168
+        exit ;;
1169
+    *:UNIX_System_V:4*:FTX*)
1170
+	# From Gerald Hewes <hewes@openmarket.com>.
1171
+	# How about differentiating between stratus architectures? -djm
1172
+	echo hppa1.1-stratus-sysv4
1173
+	exit ;;
1174
+    *:*:*:FTX*)
1175
+	# From seanf@swdc.stratus.com.
1176
+	echo i860-stratus-sysv4
1177
+	exit ;;
1178
+    i*86:VOS:*:*)
1179
+	# From Paul.Green@stratus.com.
1180
+	echo ${UNAME_MACHINE}-stratus-vos
1181
+	exit ;;
1182
+    *:VOS:*:*)
1183
+	# From Paul.Green@stratus.com.
1184
+	echo hppa1.1-stratus-vos
1185
+	exit ;;
1186
+    mc68*:A/UX:*:*)
1187
+	echo m68k-apple-aux${UNAME_RELEASE}
1188
+	exit ;;
1189
+    news*:NEWS-OS:6*:*)
1190
+	echo mips-sony-newsos6
1191
+	exit ;;
1192
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1193
+	if [ -d /usr/nec ]; then
1194
+	        echo mips-nec-sysv${UNAME_RELEASE}
1195
+	else
1196
+	        echo mips-unknown-sysv${UNAME_RELEASE}
1197
+	fi
1198
+        exit ;;
1199
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
1200
+	echo powerpc-be-beos
1201
+	exit ;;
1202
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
1203
+	echo powerpc-apple-beos
1204
+	exit ;;
1205
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
1206
+	echo i586-pc-beos
1207
+	exit ;;
1208
+    SX-4:SUPER-UX:*:*)
1209
+	echo sx4-nec-superux${UNAME_RELEASE}
1210
+	exit ;;
1211
+    SX-5:SUPER-UX:*:*)
1212
+	echo sx5-nec-superux${UNAME_RELEASE}
1213
+	exit ;;
1214
+    SX-6:SUPER-UX:*:*)
1215
+	echo sx6-nec-superux${UNAME_RELEASE}
1216
+	exit ;;
1217
+    SX-7:SUPER-UX:*:*)
1218
+	echo sx7-nec-superux${UNAME_RELEASE}
1219
+	exit ;;
1220
+    SX-8:SUPER-UX:*:*)
1221
+	echo sx8-nec-superux${UNAME_RELEASE}
1222
+	exit ;;
1223
+    SX-8R:SUPER-UX:*:*)
1224
+	echo sx8r-nec-superux${UNAME_RELEASE}
1225
+	exit ;;
1226
+    Power*:Rhapsody:*:*)
1227
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
1228
+	exit ;;
1229
+    *:Rhapsody:*:*)
1230
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1231
+	exit ;;
1232
+    *:Darwin:*:*)
1233
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1234
+	case $UNAME_PROCESSOR in
1235
+	    unknown) UNAME_PROCESSOR=powerpc ;;
1236
+	esac
1237
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1238
+	exit ;;
1239
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
1240
+	UNAME_PROCESSOR=`uname -p`
1241
+	if test "$UNAME_PROCESSOR" = "x86"; then
1242
+		UNAME_PROCESSOR=i386
1243
+		UNAME_MACHINE=pc
1244
+	fi
1245
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1246
+	exit ;;
1247
+    *:QNX:*:4*)
1248
+	echo i386-pc-qnx
1249
+	exit ;;
1250
+    NSE-?:NONSTOP_KERNEL:*:*)
1251
+	echo nse-tandem-nsk${UNAME_RELEASE}
1252
+	exit ;;
1253
+    NSR-?:NONSTOP_KERNEL:*:*)
1254
+	echo nsr-tandem-nsk${UNAME_RELEASE}
1255
+	exit ;;
1256
+    *:NonStop-UX:*:*)
1257
+	echo mips-compaq-nonstopux
1258
+	exit ;;
1259
+    BS2000:POSIX*:*:*)
1260
+	echo bs2000-siemens-sysv
1261
+	exit ;;
1262
+    DS/*:UNIX_System_V:*:*)
1263
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1264
+	exit ;;
1265
+    *:Plan9:*:*)
1266
+	# "uname -m" is not consistent, so use $cputype instead. 386
1267
+	# is converted to i386 for consistency with other x86
1268
+	# operating systems.
1269
+	if test "$cputype" = "386"; then
1270
+	    UNAME_MACHINE=i386
1271
+	else
1272
+	    UNAME_MACHINE="$cputype"
1273
+	fi
1274
+	echo ${UNAME_MACHINE}-unknown-plan9
1275
+	exit ;;
1276
+    *:TOPS-10:*:*)
1277
+	echo pdp10-unknown-tops10
1278
+	exit ;;
1279
+    *:TENEX:*:*)
1280
+	echo pdp10-unknown-tenex
1281
+	exit ;;
1282
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1283
+	echo pdp10-dec-tops20
1284
+	exit ;;
1285
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1286
+	echo pdp10-xkl-tops20
1287
+	exit ;;
1288
+    *:TOPS-20:*:*)
1289
+	echo pdp10-unknown-tops20
1290
+	exit ;;
1291
+    *:ITS:*:*)
1292
+	echo pdp10-unknown-its
1293
+	exit ;;
1294
+    SEI:*:*:SEIUX)
1295
+        echo mips-sei-seiux${UNAME_RELEASE}
1296
+	exit ;;
1297
+    *:DragonFly:*:*)
1298
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1299
+	exit ;;
1300
+    *:*VMS:*:*)
1301
+    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
1302
+	case "${UNAME_MACHINE}" in
1303
+	    A*) echo alpha-dec-vms ; exit ;;
1304
+	    I*) echo ia64-dec-vms ; exit ;;
1305
+	    V*) echo vax-dec-vms ; exit ;;
1306
+	esac ;;
1307
+    *:XENIX:*:SysV)
1308
+	echo i386-pc-xenix
1309
+	exit ;;
1310
+    i*86:skyos:*:*)
1311
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1312
+	exit ;;
1313
+    i*86:rdos:*:*)
1314
+	echo ${UNAME_MACHINE}-pc-rdos
1315
+	exit ;;
1316
+esac
1317
+
1318
+#echo '(No uname command or uname output not recognized.)' 1>&2
1319
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1320
+
1321
+eval $set_cc_for_build
1322
+cat >$dummy.c <<EOF
1323
+#ifdef _SEQUENT_
1324
+# include <sys/types.h>
1325
+# include <sys/utsname.h>
1326
+#endif
1327
+main ()
1328
+{
1329
+#if defined (sony)
1330
+#if defined (MIPSEB)
1331
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
1332
+     I don't know....  */
1333
+  printf ("mips-sony-bsd\n"); exit (0);
1334
+#else
1335
+#include <sys/param.h>
1336
+  printf ("m68k-sony-newsos%s\n",
1337
+#ifdef NEWSOS4
1338
+          "4"
1339
+#else
1340
+	  ""
1341
+#endif
1342
+         ); exit (0);
1343
+#endif
1344
+#endif
1345
+
1346
+#if defined (__arm) && defined (__acorn) && defined (__unix)
1347
+  printf ("arm-acorn-riscix\n"); exit (0);
1348
+#endif
1349
+
1350
+#if defined (hp300) && !defined (hpux)
1351
+  printf ("m68k-hp-bsd\n"); exit (0);
1352
+#endif
1353
+
1354
+#if defined (NeXT)
1355
+#if !defined (__ARCHITECTURE__)
1356
+#define __ARCHITECTURE__ "m68k"
1357
+#endif
1358
+  int version;
1359
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1360
+  if (version < 4)
1361
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1362
+  else
1363
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1364
+  exit (0);
1365
+#endif
1366
+
1367
+#if defined (MULTIMAX) || defined (n16)
1368
+#if defined (UMAXV)
1369
+  printf ("ns32k-encore-sysv\n"); exit (0);
1370
+#else
1371
+#if defined (CMU)
1372
+  printf ("ns32k-encore-mach\n"); exit (0);
1373
+#else
1374
+  printf ("ns32k-encore-bsd\n"); exit (0);
1375
+#endif
1376
+#endif
1377
+#endif
1378
+
1379
+#if defined (__386BSD__)
1380
+  printf ("i386-pc-bsd\n"); exit (0);
1381
+#endif
1382
+
1383
+#if defined (sequent)
1384
+#if defined (i386)
1385
+  printf ("i386-sequent-dynix\n"); exit (0);
1386
+#endif
1387
+#if defined (ns32000)
1388
+  printf ("ns32k-sequent-dynix\n"); exit (0);
1389
+#endif
1390
+#endif
1391
+
1392
+#if defined (_SEQUENT_)
1393
+    struct utsname un;
1394
+
1395
+    uname(&un);
1396
+
1397
+    if (strncmp(un.version, "V2", 2) == 0) {
1398
+	printf ("i386-sequent-ptx2\n"); exit (0);
1399
+    }
1400
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1401
+	printf ("i386-sequent-ptx1\n"); exit (0);
1402
+    }
1403
+    printf ("i386-sequent-ptx\n"); exit (0);
1404
+
1405
+#endif
1406
+
1407
+#if defined (vax)
1408
+# if !defined (ultrix)
1409
+#  include <sys/param.h>
1410
+#  if defined (BSD)
1411
+#   if BSD == 43
1412
+      printf ("vax-dec-bsd4.3\n"); exit (0);
1413
+#   else
1414
+#    if BSD == 199006
1415
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
1416
+#    else
1417
+      printf ("vax-dec-bsd\n"); exit (0);
1418
+#    endif
1419
+#   endif
1420
+#  else
1421
+    printf ("vax-dec-bsd\n"); exit (0);
1422
+#  endif
1423
+# else
1424
+    printf ("vax-dec-ultrix\n"); exit (0);
1425
+# endif
1426
+#endif
1427
+
1428
+#if defined (alliant) && defined (i860)
1429
+  printf ("i860-alliant-bsd\n"); exit (0);
1430
+#endif
1431
+
1432
+  exit (1);
1433
+}
1434
+EOF
1435
+
1436
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1437
+	{ echo "$SYSTEM_NAME"; exit; }
1438
+
1439
+# Apollos put the system type in the environment.
1440
+
1441
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1442
+
1443
+# Convex versions that predate uname can use getsysinfo(1)
1444
+
1445
+if [ -x /usr/convex/getsysinfo ]
1446
+then
1447
+    case `getsysinfo -f cpu_type` in
1448
+    c1*)
1449
+	echo c1-convex-bsd
1450
+	exit ;;
1451
+    c2*)
1452
+	if getsysinfo -f scalar_acc
1453
+	then echo c32-convex-bsd
1454
+	else echo c2-convex-bsd
1455
+	fi
1456
+	exit ;;
1457
+    c34*)
1458
+	echo c34-convex-bsd
1459
+	exit ;;
1460
+    c38*)
1461
+	echo c38-convex-bsd
1462
+	exit ;;
1463
+    c4*)
1464
+	echo c4-convex-bsd
1465
+	exit ;;
1466
+    esac
1467
+fi
1468
+
1469
+cat >&2 <<EOF
1470
+$0: unable to guess system type
1471
+
1472
+This script, last modified $timestamp, has failed to recognize
1473
+the operating system you are using. It is advised that you
1474
+download the most up to date version of the config scripts from
1475
+
1476
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
1477
+and
1478
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
1479
+
1480
+If the version you run ($0) is already up to date, please
1481
+send the following data and any information you think might be
1482
+pertinent to <config-patches@gnu.org> in order to provide the needed
1483
+information to handle your system.
1484
+
1485
+config.guess timestamp = $timestamp
1486
+
1487
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
1488
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
1489
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
1490
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
1491
+
1492
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1493
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
1494
+
1495
+hostinfo               = `(hostinfo) 2>/dev/null`
1496
+/bin/universe          = `(/bin/universe) 2>/dev/null`
1497
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
1498
+/bin/arch              = `(/bin/arch) 2>/dev/null`
1499
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
1500
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1501
+
1502
+UNAME_MACHINE = ${UNAME_MACHINE}
1503
+UNAME_RELEASE = ${UNAME_RELEASE}
1504
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
1505
+UNAME_VERSION = ${UNAME_VERSION}
1506
+EOF
1507
+
1508
+exit 1
1509
+
1510
+# Local variables:
1511
+# eval: (add-hook 'write-file-hooks 'time-stamp)
1512
+# time-stamp-start: "timestamp='"
1513
+# time-stamp-format: "%:y-%02m-%02d"
1514
+# time-stamp-end: "'"
1515
+# End:
0 1516
new file mode 100755
... ...
@@ -0,0 +1,1626 @@
0
+#! /bin/sh
1
+# Configuration validation subroutine script.
2
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
4
+#   Inc.
5
+
6
+timestamp='2007-06-28'
7
+
8
+# This file is (in principle) common to ALL GNU software.
9
+# The presence of a machine in this file suggests that SOME GNU software
10
+# can handle that machine.  It does not imply ALL GNU software can.
11
+#
12
+# This file is free software; you can redistribute it and/or modify
13
+# it under the terms of the GNU General Public License as published by
14
+# the Free Software Foundation; either version 2 of the License, or
15
+# (at your option) any later version.
16
+#
17
+# This program is distributed in the hope that it will be useful,
18
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
+# GNU General Public License for more details.
21
+#
22
+# You should have received a copy of the GNU General Public License
23
+# along with this program; if not, write to the Free Software
24
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
25
+# 02110-1301, USA.
26
+#
27
+# As a special exception to the GNU General Public License, if you
28
+# distribute this file as part of a program that contains a
29
+# configuration script generated by Autoconf, you may include it under
30
+# the same distribution terms that you use for the rest of that program.
31
+
32
+
33
+# Please send patches to <config-patches@gnu.org>.  Submit a context
34
+# diff and a properly formatted ChangeLog entry.
35
+#
36
+# Configuration subroutine to validate and canonicalize a configuration type.
37
+# Supply the specified configuration type as an argument.
38
+# If it is invalid, we print an error message on stderr and exit with code 1.
39
+# Otherwise, we print the canonical config type on stdout and succeed.
40
+
41
+# This file is supposed to be the same for all GNU packages
42
+# and recognize all the CPU types, system types and aliases
43
+# that are meaningful with *any* GNU software.
44
+# Each package is responsible for reporting which valid configurations
45
+# it does not support.  The user should be able to distinguish
46
+# a failure to support a valid configuration from a meaningless
47
+# configuration.
48
+
49
+# The goal of this file is to map all the various variations of a given
50
+# machine specification into a single specification in the form:
51
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
52
+# or in some cases, the newer four-part form:
53
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
54
+# It is wrong to echo any other type of specification.
55
+
56
+me=`echo "$0" | sed -e 's,.*/,,'`
57
+
58
+usage="\
59
+Usage: $0 [OPTION] CPU-MFR-OPSYS
60
+       $0 [OPTION] ALIAS
61
+
62
+Canonicalize a configuration name.
63
+
64
+Operation modes:
65
+  -h, --help         print this help, then exit
66
+  -t, --time-stamp   print date of last modification, then exit
67
+  -v, --version      print version number, then exit
68
+
69
+Report bugs and patches to <config-patches@gnu.org>."
70
+
71
+version="\
72
+GNU config.sub ($timestamp)
73
+
74
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
75
+Free Software Foundation, Inc.
76
+
77
+This is free software; see the source for copying conditions.  There is NO
78
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
79
+
80
+help="
81
+Try \`$me --help' for more information."
82
+
83
+# Parse command line
84
+while test $# -gt 0 ; do
85
+  case $1 in
86
+    --time-stamp | --time* | -t )
87
+       echo "$timestamp" ; exit ;;
88
+    --version | -v )
89
+       echo "$version" ; exit ;;
90
+    --help | --h* | -h )
91
+       echo "$usage"; exit ;;
92
+    -- )     # Stop option processing
93
+       shift; break ;;
94
+    - )	# Use stdin as input.
95
+       break ;;
96
+    -* )
97
+       echo "$me: invalid option $1$help"
98
+       exit 1 ;;
99
+
100
+    *local*)
101
+       # First pass through any local machine types.
102
+       echo $1
103
+       exit ;;
104
+
105
+    * )
106
+       break ;;
107
+  esac
108
+done
109
+
110
+case $# in
111
+ 0) echo "$me: missing argument$help" >&2
112
+    exit 1;;
113
+ 1) ;;
114
+ *) echo "$me: too many arguments$help" >&2
115
+    exit 1;;
116
+esac
117
+
118
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
119
+# Here we must recognize all the valid KERNEL-OS combinations.
120
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
121
+case $maybe_os in
122
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
123
+  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
124
+  storm-chaos* | os2-emx* | rtmk-nova*)
125
+    os=-$maybe_os
126
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
127
+    ;;
128
+  *)
129
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
130
+    if [ $basic_machine != $1 ]
131
+    then os=`echo $1 | sed 's/.*-/-/'`
132
+    else os=; fi
133
+    ;;
134
+esac
135
+
136
+### Let's recognize common machines as not being operating systems so
137
+### that things like config.sub decstation-3100 work.  We also
138
+### recognize some manufacturers as not being operating systems, so we
139
+### can provide default operating systems below.
140
+case $os in
141
+	-sun*os*)
142
+		# Prevent following clause from handling this invalid input.
143
+		;;
144
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
145
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
146
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
147
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
148
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
149
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
150
+	-apple | -axis | -knuth | -cray)
151
+		os=
152
+		basic_machine=$1
153
+		;;
154
+	-sim | -cisco | -oki | -wec | -winbond)
155
+		os=
156
+		basic_machine=$1
157
+		;;
158
+	-scout)
159
+		;;
160
+	-wrs)
161
+		os=-vxworks
162
+		basic_machine=$1
163
+		;;
164
+	-chorusos*)
165
+		os=-chorusos
166
+		basic_machine=$1
167
+		;;
168
+ 	-chorusrdb)
169
+ 		os=-chorusrdb
170
+		basic_machine=$1
171
+ 		;;
172
+	-hiux*)
173
+		os=-hiuxwe2
174
+		;;
175
+	-sco6)
176
+		os=-sco5v6
177
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
178
+		;;
179
+	-sco5)
180
+		os=-sco3.2v5
181
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
182
+		;;
183
+	-sco4)
184
+		os=-sco3.2v4
185
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
186
+		;;
187
+	-sco3.2.[4-9]*)
188
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
189
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
190
+		;;
191
+	-sco3.2v[4-9]*)
192
+		# Don't forget version if it is 3.2v4 or newer.
193
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
194
+		;;
195
+	-sco5v6*)
196
+		# Don't forget version if it is 3.2v4 or newer.
197
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
198
+		;;
199
+	-sco*)
200
+		os=-sco3.2v2
201
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
202
+		;;
203
+	-udk*)
204
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
205
+		;;
206
+	-isc)
207
+		os=-isc2.2
208
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
209
+		;;
210
+	-clix*)
211
+		basic_machine=clipper-intergraph
212
+		;;
213
+	-isc*)
214
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
215
+		;;
216
+	-lynx*)
217
+		os=-lynxos
218
+		;;
219
+	-ptx*)
220
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
221
+		;;
222
+	-windowsnt*)
223
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
224
+		;;
225
+	-psos*)
226
+		os=-psos
227
+		;;
228
+	-mint | -mint[0-9]*)
229
+		basic_machine=m68k-atari
230
+		os=-mint
231
+		;;
232
+esac
233
+
234
+# Decode aliases for certain CPU-COMPANY combinations.
235
+case $basic_machine in
236
+	# Recognize the basic CPU types without company name.
237
+	# Some are omitted here because they have special meanings below.
238
+	1750a | 580 \
239
+	| a29k \
240
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
241
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
242
+	| am33_2.0 \
243
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
244
+	| bfin \
245
+	| c4x | clipper \
246
+	| d10v | d30v | dlx | dsp16xx \
247
+	| fido | fr30 | frv \
248
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
249
+	| i370 | i860 | i960 | ia64 \
250
+	| ip2k | iq2000 \
251
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
252
+	| maxq | mb | microblaze | mcore | mep \
253
+	| mips | mipsbe | mipseb | mipsel | mipsle \
254
+	| mips16 \
255
+	| mips64 | mips64el \
256
+	| mips64vr | mips64vrel \
257
+	| mips64orion | mips64orionel \
258
+	| mips64vr4100 | mips64vr4100el \
259
+	| mips64vr4300 | mips64vr4300el \
260
+	| mips64vr5000 | mips64vr5000el \
261
+	| mips64vr5900 | mips64vr5900el \
262
+	| mipsisa32 | mipsisa32el \
263
+	| mipsisa32r2 | mipsisa32r2el \
264
+	| mipsisa64 | mipsisa64el \
265
+	| mipsisa64r2 | mipsisa64r2el \
266
+	| mipsisa64sb1 | mipsisa64sb1el \
267
+	| mipsisa64sr71k | mipsisa64sr71kel \
268
+	| mipstx39 | mipstx39el \
269
+	| mn10200 | mn10300 \
270
+	| mt \
271
+	| msp430 \
272
+	| nios | nios2 \
273
+	| ns16k | ns32k \
274
+	| or32 \
275
+	| pdp10 | pdp11 | pj | pjl \
276
+	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
277
+	| pyramid \
278
+	| score \
279
+	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
280
+	| sh64 | sh64le \
281
+	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
282
+	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
283
+	| spu | strongarm \
284
+	| tahoe | thumb | tic4x | tic80 | tron \
285
+	| v850 | v850e \
286
+	| we32k \
287
+	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
288
+	| z8k)
289
+		basic_machine=$basic_machine-unknown
290
+		;;
291
+	m6811 | m68hc11 | m6812 | m68hc12)
292
+		# Motorola 68HC11/12.
293
+		basic_machine=$basic_machine-unknown
294
+		os=-none
295
+		;;
296
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
297
+		;;
298
+	ms1)
299
+		basic_machine=mt-unknown
300
+		;;
301
+
302
+	# We use `pc' rather than `unknown'
303
+	# because (1) that's what they normally are, and
304
+	# (2) the word "unknown" tends to confuse beginning users.
305
+	i*86 | x86_64)
306
+	  basic_machine=$basic_machine-pc
307
+	  ;;
308
+	# Object if more than one company name word.
309
+	*-*-*)
310
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
311
+		exit 1
312
+		;;
313
+	# Recognize the basic CPU types with company name.
314
+	580-* \
315
+	| a29k-* \
316
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
317
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
318
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
319
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
320
+	| avr-* | avr32-* \
321
+	| bfin-* | bs2000-* \
322
+	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
323
+	| clipper-* | craynv-* | cydra-* \
324
+	| d10v-* | d30v-* | dlx-* \
325
+	| elxsi-* \
326
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
327
+	| h8300-* | h8500-* \
328
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
329
+	| i*86-* | i860-* | i960-* | ia64-* \
330
+	| ip2k-* | iq2000-* \
331
+	| m32c-* | m32r-* | m32rle-* \
332
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
333
+	| m88110-* | m88k-* | maxq-* | mcore-* \
334
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
335
+	| mips16-* \
336
+	| mips64-* | mips64el-* \
337
+	| mips64vr-* | mips64vrel-* \
338
+	| mips64orion-* | mips64orionel-* \
339
+	| mips64vr4100-* | mips64vr4100el-* \
340
+	| mips64vr4300-* | mips64vr4300el-* \
341
+	| mips64vr5000-* | mips64vr5000el-* \
342
+	| mips64vr5900-* | mips64vr5900el-* \
343
+	| mipsisa32-* | mipsisa32el-* \
344
+	| mipsisa32r2-* | mipsisa32r2el-* \
345
+	| mipsisa64-* | mipsisa64el-* \
346
+	| mipsisa64r2-* | mipsisa64r2el-* \
347
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
348
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
349
+	| mipstx39-* | mipstx39el-* \
350
+	| mmix-* \
351
+	| mt-* \
352
+	| msp430-* \
353
+	| nios-* | nios2-* \
354
+	| none-* | np1-* | ns16k-* | ns32k-* \
355
+	| orion-* \
356
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
357
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
358
+	| pyramid-* \
359
+	| romp-* | rs6000-* \
360
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
361
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
362
+	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
363
+	| sparclite-* \
364
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
365
+	| tahoe-* | thumb-* \
366
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
367
+	| tron-* \
368
+	| v850-* | v850e-* | vax-* \
369
+	| we32k-* \
370
+	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
371
+	| xstormy16-* | xtensa-* \
372
+	| ymp-* \
373
+	| z8k-*)
374
+		;;
375
+	# Recognize the various machine names and aliases which stand
376
+	# for a CPU type and a company and sometimes even an OS.
377
+	386bsd)
378
+		basic_machine=i386-unknown
379
+		os=-bsd
380
+		;;
381
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
382
+		basic_machine=m68000-att
383
+		;;
384
+	3b*)
385
+		basic_machine=we32k-att
386
+		;;
387
+	a29khif)
388
+		basic_machine=a29k-amd
389
+		os=-udi
390
+		;;
391
+    	abacus)
392
+		basic_machine=abacus-unknown
393
+		;;
394
+	adobe68k)
395
+		basic_machine=m68010-adobe
396
+		os=-scout
397
+		;;
398
+	alliant | fx80)
399
+		basic_machine=fx80-alliant
400
+		;;
401
+	altos | altos3068)
402
+		basic_machine=m68k-altos
403
+		;;
404
+	am29k)
405
+		basic_machine=a29k-none
406
+		os=-bsd
407
+		;;
408
+	amd64)
409
+		basic_machine=x86_64-pc
410
+		;;
411
+	amd64-*)
412
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
413
+		;;
414
+	amdahl)
415
+		basic_machine=580-amdahl
416
+		os=-sysv
417
+		;;
418
+	amiga | amiga-*)
419
+		basic_machine=m68k-unknown
420
+		;;
421
+	amigaos | amigados)
422
+		basic_machine=m68k-unknown
423
+		os=-amigaos
424
+		;;
425
+	amigaunix | amix)
426
+		basic_machine=m68k-unknown
427
+		os=-sysv4
428
+		;;
429
+	apollo68)
430
+		basic_machine=m68k-apollo
431
+		os=-sysv
432
+		;;
433
+	apollo68bsd)
434
+		basic_machine=m68k-apollo
435
+		os=-bsd
436
+		;;
437
+	aux)
438
+		basic_machine=m68k-apple
439
+		os=-aux
440
+		;;
441
+	balance)
442
+		basic_machine=ns32k-sequent
443
+		os=-dynix
444
+		;;
445
+	c90)
446
+		basic_machine=c90-cray
447
+		os=-unicos
448
+		;;
449
+	convex-c1)
450
+		basic_machine=c1-convex
451
+		os=-bsd
452
+		;;
453
+	convex-c2)
454
+		basic_machine=c2-convex
455
+		os=-bsd
456
+		;;
457
+	convex-c32)
458
+		basic_machine=c32-convex
459
+		os=-bsd
460
+		;;
461
+	convex-c34)
462
+		basic_machine=c34-convex
463
+		os=-bsd
464
+		;;
465
+	convex-c38)
466
+		basic_machine=c38-convex
467
+		os=-bsd
468
+		;;
469
+	cray | j90)
470
+		basic_machine=j90-cray
471
+		os=-unicos
472
+		;;
473
+	craynv)
474
+		basic_machine=craynv-cray
475
+		os=-unicosmp
476
+		;;
477
+	cr16)
478
+		basic_machine=cr16-unknown
479
+		os=-elf
480
+		;;
481
+	crds | unos)
482
+		basic_machine=m68k-crds
483
+		;;
484
+	crisv32 | crisv32-* | etraxfs*)
485
+		basic_machine=crisv32-axis
486
+		;;
487
+	cris | cris-* | etrax*)
488
+		basic_machine=cris-axis
489
+		;;
490
+	crx)
491
+		basic_machine=crx-unknown
492
+		os=-elf
493
+		;;
494
+	da30 | da30-*)
495
+		basic_machine=m68k-da30
496
+		;;
497
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
498
+		basic_machine=mips-dec
499
+		;;
500
+	decsystem10* | dec10*)
501
+		basic_machine=pdp10-dec
502
+		os=-tops10
503
+		;;
504
+	decsystem20* | dec20*)
505
+		basic_machine=pdp10-dec
506
+		os=-tops20
507
+		;;
508
+	delta | 3300 | motorola-3300 | motorola-delta \
509
+	      | 3300-motorola | delta-motorola)
510
+		basic_machine=m68k-motorola
511
+		;;
512
+	delta88)
513
+		basic_machine=m88k-motorola
514
+		os=-sysv3
515
+		;;
516
+	djgpp)
517
+		basic_machine=i586-pc
518
+		os=-msdosdjgpp
519
+		;;
520
+	dpx20 | dpx20-*)
521
+		basic_machine=rs6000-bull
522
+		os=-bosx
523
+		;;
524
+	dpx2* | dpx2*-bull)
525
+		basic_machine=m68k-bull
526
+		os=-sysv3
527
+		;;
528
+	ebmon29k)
529
+		basic_machine=a29k-amd
530
+		os=-ebmon
531
+		;;
532
+	elxsi)
533
+		basic_machine=elxsi-elxsi
534
+		os=-bsd
535
+		;;
536
+	encore | umax | mmax)
537
+		basic_machine=ns32k-encore
538
+		;;
539
+	es1800 | OSE68k | ose68k | ose | OSE)
540
+		basic_machine=m68k-ericsson
541
+		os=-ose
542
+		;;
543
+	fx2800)
544
+		basic_machine=i860-alliant
545
+		;;
546
+	genix)
547
+		basic_machine=ns32k-ns
548
+		;;
549
+	gmicro)
550
+		basic_machine=tron-gmicro
551
+		os=-sysv
552
+		;;
553
+	go32)
554
+		basic_machine=i386-pc
555
+		os=-go32
556
+		;;
557
+	h3050r* | hiux*)
558
+		basic_machine=hppa1.1-hitachi
559
+		os=-hiuxwe2
560
+		;;
561
+	h8300hms)
562
+		basic_machine=h8300-hitachi
563
+		os=-hms
564
+		;;
565
+	h8300xray)
566
+		basic_machine=h8300-hitachi
567
+		os=-xray
568
+		;;
569
+	h8500hms)
570
+		basic_machine=h8500-hitachi
571
+		os=-hms
572
+		;;
573
+	harris)
574
+		basic_machine=m88k-harris
575
+		os=-sysv3
576
+		;;
577
+	hp300-*)
578
+		basic_machine=m68k-hp
579
+		;;
580
+	hp300bsd)
581
+		basic_machine=m68k-hp
582
+		os=-bsd
583
+		;;
584
+	hp300hpux)
585
+		basic_machine=m68k-hp
586
+		os=-hpux
587
+		;;
588
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
589
+		basic_machine=hppa1.0-hp
590
+		;;
591
+	hp9k2[0-9][0-9] | hp9k31[0-9])
592
+		basic_machine=m68000-hp
593
+		;;
594
+	hp9k3[2-9][0-9])
595
+		basic_machine=m68k-hp
596
+		;;
597
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
598
+		basic_machine=hppa1.0-hp
599
+		;;
600
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
601
+		basic_machine=hppa1.1-hp
602
+		;;
603
+	hp9k78[0-9] | hp78[0-9])
604
+		# FIXME: really hppa2.0-hp
605
+		basic_machine=hppa1.1-hp
606
+		;;
607
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
608
+		# FIXME: really hppa2.0-hp
609
+		basic_machine=hppa1.1-hp
610
+		;;
611
+	hp9k8[0-9][13679] | hp8[0-9][13679])
612
+		basic_machine=hppa1.1-hp
613
+		;;
614
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
615
+		basic_machine=hppa1.0-hp
616
+		;;
617
+	hppa-next)
618
+		os=-nextstep3
619
+		;;
620
+	hppaosf)
621
+		basic_machine=hppa1.1-hp
622
+		os=-osf
623
+		;;
624
+	hppro)
625
+		basic_machine=hppa1.1-hp
626
+		os=-proelf
627
+		;;
628
+	i370-ibm* | ibm*)
629
+		basic_machine=i370-ibm
630
+		;;
631
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
632
+	i*86v32)
633
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
634
+		os=-sysv32
635
+		;;
636
+	i*86v4*)
637
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
638
+		os=-sysv4
639
+		;;
640
+	i*86v)
641
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
642
+		os=-sysv
643
+		;;
644
+	i*86sol2)
645
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
646
+		os=-solaris2
647
+		;;
648
+	i386mach)
649
+		basic_machine=i386-mach
650
+		os=-mach
651
+		;;
652
+	i386-vsta | vsta)
653
+		basic_machine=i386-unknown
654
+		os=-vsta
655
+		;;
656
+	iris | iris4d)
657
+		basic_machine=mips-sgi
658
+		case $os in
659
+		    -irix*)
660
+			;;
661
+		    *)
662
+			os=-irix4
663
+			;;
664
+		esac
665
+		;;
666
+	isi68 | isi)
667
+		basic_machine=m68k-isi
668
+		os=-sysv
669
+		;;
670
+	m88k-omron*)
671
+		basic_machine=m88k-omron
672
+		;;
673
+	magnum | m3230)
674
+		basic_machine=mips-mips
675
+		os=-sysv
676
+		;;
677
+	merlin)
678
+		basic_machine=ns32k-utek
679
+		os=-sysv
680
+		;;
681
+	mingw32)
682
+		basic_machine=i386-pc
683
+		os=-mingw32
684
+		;;
685
+	mingw32ce)
686
+		basic_machine=arm-unknown
687
+		os=-mingw32ce
688
+		;;
689
+	miniframe)
690
+		basic_machine=m68000-convergent
691
+		;;
692
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
693
+		basic_machine=m68k-atari
694
+		os=-mint
695
+		;;
696
+	mips3*-*)
697
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
698
+		;;
699
+	mips3*)
700
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
701
+		;;
702
+	monitor)
703
+		basic_machine=m68k-rom68k
704
+		os=-coff
705
+		;;
706
+	morphos)
707
+		basic_machine=powerpc-unknown
708
+		os=-morphos
709
+		;;
710
+	msdos)
711
+		basic_machine=i386-pc
712
+		os=-msdos
713
+		;;
714
+	ms1-*)
715
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
716
+		;;
717
+	mvs)
718
+		basic_machine=i370-ibm
719
+		os=-mvs
720
+		;;
721
+	ncr3000)
722
+		basic_machine=i486-ncr
723
+		os=-sysv4
724
+		;;
725
+	netbsd386)
726
+		basic_machine=i386-unknown
727
+		os=-netbsd
728
+		;;
729
+	netwinder)
730
+		basic_machine=armv4l-rebel
731
+		os=-linux
732
+		;;
733
+	news | news700 | news800 | news900)
734
+		basic_machine=m68k-sony
735
+		os=-newsos
736
+		;;
737
+	news1000)
738
+		basic_machine=m68030-sony
739
+		os=-newsos
740
+		;;
741
+	news-3600 | risc-news)
742
+		basic_machine=mips-sony
743
+		os=-newsos
744
+		;;
745
+	necv70)
746
+		basic_machine=v70-nec
747
+		os=-sysv
748
+		;;
749
+	next | m*-next )
750
+		basic_machine=m68k-next
751
+		case $os in
752
+		    -nextstep* )
753
+			;;
754
+		    -ns2*)
755
+		      os=-nextstep2
756
+			;;
757
+		    *)
758
+		      os=-nextstep3
759
+			;;
760
+		esac
761
+		;;
762
+	nh3000)
763
+		basic_machine=m68k-harris
764
+		os=-cxux
765
+		;;
766
+	nh[45]000)
767
+		basic_machine=m88k-harris
768
+		os=-cxux
769
+		;;
770
+	nindy960)
771
+		basic_machine=i960-intel
772
+		os=-nindy
773
+		;;
774
+	mon960)
775
+		basic_machine=i960-intel
776
+		os=-mon960
777
+		;;
778
+	nonstopux)
779
+		basic_machine=mips-compaq
780
+		os=-nonstopux
781
+		;;
782
+	np1)
783
+		basic_machine=np1-gould
784
+		;;
785
+	nsr-tandem)
786
+		basic_machine=nsr-tandem
787
+		;;
788
+	op50n-* | op60c-*)
789
+		basic_machine=hppa1.1-oki
790
+		os=-proelf
791
+		;;
792
+	openrisc | openrisc-*)
793
+		basic_machine=or32-unknown
794
+		;;
795
+	os400)
796
+		basic_machine=powerpc-ibm
797
+		os=-os400
798
+		;;
799
+	OSE68000 | ose68000)
800
+		basic_machine=m68000-ericsson
801
+		os=-ose
802
+		;;
803
+	os68k)
804
+		basic_machine=m68k-none
805
+		os=-os68k
806
+		;;
807
+	pa-hitachi)
808
+		basic_machine=hppa1.1-hitachi
809
+		os=-hiuxwe2
810
+		;;
811
+	paragon)
812
+		basic_machine=i860-intel
813
+		os=-osf
814
+		;;
815
+	pbd)
816
+		basic_machine=sparc-tti
817
+		;;
818
+	pbb)
819
+		basic_machine=m68k-tti
820
+		;;
821
+	pc532 | pc532-*)
822
+		basic_machine=ns32k-pc532
823
+		;;
824
+	pc98)
825
+		basic_machine=i386-pc
826
+		;;
827
+	pc98-*)
828
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
829
+		;;
830
+	pentium | p5 | k5 | k6 | nexgen | viac3)
831
+		basic_machine=i586-pc
832
+		;;
833
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
834
+		basic_machine=i686-pc
835
+		;;
836
+	pentiumii | pentium2 | pentiumiii | pentium3)
837
+		basic_machine=i686-pc
838
+		;;
839
+	pentium4)
840
+		basic_machine=i786-pc
841
+		;;
842
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
843
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
844
+		;;
845
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
846
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
847
+		;;
848
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
849
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
850
+		;;
851
+	pentium4-*)
852
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
853
+		;;
854
+	pn)
855
+		basic_machine=pn-gould
856
+		;;
857
+	power)	basic_machine=power-ibm
858
+		;;
859
+	ppc)	basic_machine=powerpc-unknown
860
+		;;
861
+	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
862
+		;;
863
+	ppcle | powerpclittle | ppc-le | powerpc-little)
864
+		basic_machine=powerpcle-unknown
865
+		;;
866
+	ppcle-* | powerpclittle-*)
867
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
868
+		;;
869
+	ppc64)	basic_machine=powerpc64-unknown
870
+		;;
871
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
872
+		;;
873
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
874
+		basic_machine=powerpc64le-unknown
875
+		;;
876
+	ppc64le-* | powerpc64little-*)
877
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
878
+		;;
879
+	ps2)
880
+		basic_machine=i386-ibm
881
+		;;
882
+	pw32)
883
+		basic_machine=i586-unknown
884
+		os=-pw32
885
+		;;
886
+	rdos)
887
+		basic_machine=i386-pc
888
+		os=-rdos
889
+		;;
890
+	rom68k)
891
+		basic_machine=m68k-rom68k
892
+		os=-coff
893
+		;;
894
+	rm[46]00)
895
+		basic_machine=mips-siemens
896
+		;;
897
+	rtpc | rtpc-*)
898
+		basic_machine=romp-ibm
899
+		;;
900
+	s390 | s390-*)
901
+		basic_machine=s390-ibm
902
+		;;
903
+	s390x | s390x-*)
904
+		basic_machine=s390x-ibm
905
+		;;
906
+	sa29200)
907
+		basic_machine=a29k-amd
908
+		os=-udi
909
+		;;
910
+	sb1)
911
+		basic_machine=mipsisa64sb1-unknown
912
+		;;
913
+	sb1el)
914
+		basic_machine=mipsisa64sb1el-unknown
915
+		;;
916
+	sde)
917
+		basic_machine=mipsisa32-sde
918
+		os=-elf
919
+		;;
920
+	sei)
921
+		basic_machine=mips-sei
922
+		os=-seiux
923
+		;;
924
+	sequent)
925
+		basic_machine=i386-sequent
926
+		;;
927
+	sh)
928
+		basic_machine=sh-hitachi
929
+		os=-hms
930
+		;;
931
+	sh5el)
932
+		basic_machine=sh5le-unknown
933
+		;;
934
+	sh64)
935
+		basic_machine=sh64-unknown
936
+		;;
937
+	sparclite-wrs | simso-wrs)
938
+		basic_machine=sparclite-wrs
939
+		os=-vxworks
940
+		;;
941
+	sps7)
942
+		basic_machine=m68k-bull
943
+		os=-sysv2
944
+		;;
945
+	spur)
946
+		basic_machine=spur-unknown
947
+		;;
948
+	st2000)
949
+		basic_machine=m68k-tandem
950
+		;;
951
+	stratus)
952
+		basic_machine=i860-stratus
953
+		os=-sysv4
954
+		;;
955
+	sun2)
956
+		basic_machine=m68000-sun
957
+		;;
958
+	sun2os3)
959
+		basic_machine=m68000-sun
960
+		os=-sunos3
961
+		;;
962
+	sun2os4)
963
+		basic_machine=m68000-sun
964
+		os=-sunos4
965
+		;;
966
+	sun3os3)
967
+		basic_machine=m68k-sun
968
+		os=-sunos3
969
+		;;
970
+	sun3os4)
971
+		basic_machine=m68k-sun
972
+		os=-sunos4
973
+		;;
974
+	sun4os3)
975
+		basic_machine=sparc-sun
976
+		os=-sunos3
977
+		;;
978
+	sun4os4)
979
+		basic_machine=sparc-sun
980
+		os=-sunos4
981
+		;;
982
+	sun4sol2)
983
+		basic_machine=sparc-sun
984
+		os=-solaris2
985
+		;;
986
+	sun3 | sun3-*)
987
+		basic_machine=m68k-sun
988
+		;;
989
+	sun4)
990
+		basic_machine=sparc-sun
991
+		;;
992
+	sun386 | sun386i | roadrunner)
993
+		basic_machine=i386-sun
994
+		;;
995
+	sv1)
996
+		basic_machine=sv1-cray
997
+		os=-unicos
998
+		;;
999
+	symmetry)
1000
+		basic_machine=i386-sequent
1001
+		os=-dynix
1002
+		;;
1003
+	t3e)
1004
+		basic_machine=alphaev5-cray
1005
+		os=-unicos
1006
+		;;
1007
+	t90)
1008
+		basic_machine=t90-cray
1009
+		os=-unicos
1010
+		;;
1011
+	tic54x | c54x*)
1012
+		basic_machine=tic54x-unknown
1013
+		os=-coff
1014
+		;;
1015
+	tic55x | c55x*)
1016
+		basic_machine=tic55x-unknown
1017
+		os=-coff
1018
+		;;
1019
+	tic6x | c6x*)
1020
+		basic_machine=tic6x-unknown
1021
+		os=-coff
1022
+		;;
1023
+	tx39)
1024
+		basic_machine=mipstx39-unknown
1025
+		;;
1026
+	tx39el)
1027
+		basic_machine=mipstx39el-unknown
1028
+		;;
1029
+	toad1)
1030
+		basic_machine=pdp10-xkl
1031
+		os=-tops20
1032
+		;;
1033
+	tower | tower-32)
1034
+		basic_machine=m68k-ncr
1035
+		;;
1036
+	tpf)
1037
+		basic_machine=s390x-ibm
1038
+		os=-tpf
1039
+		;;
1040
+	udi29k)
1041
+		basic_machine=a29k-amd
1042
+		os=-udi
1043
+		;;
1044
+	ultra3)
1045
+		basic_machine=a29k-nyu
1046
+		os=-sym1
1047
+		;;
1048
+	v810 | necv810)
1049
+		basic_machine=v810-nec
1050
+		os=-none
1051
+		;;
1052
+	vaxv)
1053
+		basic_machine=vax-dec
1054
+		os=-sysv
1055
+		;;
1056
+	vms)
1057
+		basic_machine=vax-dec
1058
+		os=-vms
1059
+		;;
1060
+	vpp*|vx|vx-*)
1061
+		basic_machine=f301-fujitsu
1062
+		;;
1063
+	vxworks960)
1064
+		basic_machine=i960-wrs
1065
+		os=-vxworks
1066
+		;;
1067
+	vxworks68)
1068
+		basic_machine=m68k-wrs
1069
+		os=-vxworks
1070
+		;;
1071
+	vxworks29k)
1072
+		basic_machine=a29k-wrs
1073
+		os=-vxworks
1074
+		;;
1075
+	w65*)
1076
+		basic_machine=w65-wdc
1077
+		os=-none
1078
+		;;
1079
+	w89k-*)
1080
+		basic_machine=hppa1.1-winbond
1081
+		os=-proelf
1082
+		;;
1083
+	xbox)
1084
+		basic_machine=i686-pc
1085
+		os=-mingw32
1086
+		;;
1087
+	xps | xps100)
1088
+		basic_machine=xps100-honeywell
1089
+		;;
1090
+	ymp)
1091
+		basic_machine=ymp-cray
1092
+		os=-unicos
1093
+		;;
1094
+	z8k-*-coff)
1095
+		basic_machine=z8k-unknown
1096
+		os=-sim
1097
+		;;
1098
+	none)
1099
+		basic_machine=none-none
1100
+		os=-none
1101
+		;;
1102
+
1103
+# Here we handle the default manufacturer of certain CPU types.  It is in
1104
+# some cases the only manufacturer, in others, it is the most popular.
1105
+	w89k)
1106
+		basic_machine=hppa1.1-winbond
1107
+		;;
1108
+	op50n)
1109
+		basic_machine=hppa1.1-oki
1110
+		;;
1111
+	op60c)
1112
+		basic_machine=hppa1.1-oki
1113
+		;;
1114
+	romp)
1115
+		basic_machine=romp-ibm
1116
+		;;
1117
+	mmix)
1118
+		basic_machine=mmix-knuth
1119
+		;;
1120
+	rs6000)
1121
+		basic_machine=rs6000-ibm
1122
+		;;
1123
+	vax)
1124
+		basic_machine=vax-dec
1125
+		;;
1126
+	pdp10)
1127
+		# there are many clones, so DEC is not a safe bet
1128
+		basic_machine=pdp10-unknown
1129
+		;;
1130
+	pdp11)
1131
+		basic_machine=pdp11-dec
1132
+		;;
1133
+	we32k)
1134
+		basic_machine=we32k-att
1135
+		;;
1136
+	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
1137
+		basic_machine=sh-unknown
1138
+		;;
1139
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1140
+		basic_machine=sparc-sun
1141
+		;;
1142
+	cydra)
1143
+		basic_machine=cydra-cydrome
1144
+		;;
1145
+	orion)
1146
+		basic_machine=orion-highlevel
1147
+		;;
1148
+	orion105)
1149
+		basic_machine=clipper-highlevel
1150
+		;;
1151
+	mac | mpw | mac-mpw)
1152
+		basic_machine=m68k-apple
1153
+		;;
1154
+	pmac | pmac-mpw)
1155
+		basic_machine=powerpc-apple
1156
+		;;
1157
+	*-unknown)
1158
+		# Make sure to match an already-canonicalized machine name.
1159
+		;;
1160
+	*)
1161
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1162
+		exit 1
1163
+		;;
1164
+esac
1165
+
1166
+# Here we canonicalize certain aliases for manufacturers.
1167
+case $basic_machine in
1168
+	*-digital*)
1169
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1170
+		;;
1171
+	*-commodore*)
1172
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1173
+		;;
1174
+	*)
1175
+		;;
1176
+esac
1177
+
1178
+# Decode manufacturer-specific aliases for certain operating systems.
1179
+
1180
+if [ x"$os" != x"" ]
1181
+then
1182
+case $os in
1183
+        # First match some system type aliases
1184
+        # that might get confused with valid system types.
1185
+	# -solaris* is a basic system type, with this one exception.
1186
+	-solaris1 | -solaris1.*)
1187
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
1188
+		;;
1189
+	-solaris)
1190
+		os=-solaris2
1191
+		;;
1192
+	-svr4*)
1193
+		os=-sysv4
1194
+		;;
1195
+	-unixware*)
1196
+		os=-sysv4.2uw
1197
+		;;
1198
+	-gnu/linux*)
1199
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1200
+		;;
1201
+	# First accept the basic system types.
1202
+	# The portable systems comes first.
1203
+	# Each alternative MUST END IN A *, to match a version number.
1204
+	# -sysv* is not here because it comes later, after sysvr4.
1205
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1206
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1207
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1208
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1209
+	      | -aos* \
1210
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1211
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1212
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1213
+	      | -openbsd* | -solidbsd* \
1214
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1215
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1216
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1217
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1218
+	      | -chorusos* | -chorusrdb* \
1219
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1220
+	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1221
+	      | -uxpv* | -beos* | -mpeix* | -udk* \
1222
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1223
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1224
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1225
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1226
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1227
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1228
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
1229
+	# Remember, each alternative MUST END IN *, to match a version number.
1230
+		;;
1231
+	-qnx*)
1232
+		case $basic_machine in
1233
+		    x86-* | i*86-*)
1234
+			;;
1235
+		    *)
1236
+			os=-nto$os
1237
+			;;
1238
+		esac
1239
+		;;
1240
+	-nto-qnx*)
1241
+		;;
1242
+	-nto*)
1243
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
1244
+		;;
1245
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1246
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1247
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1248
+		;;
1249
+	-mac*)
1250
+		os=`echo $os | sed -e 's|mac|macos|'`
1251
+		;;
1252
+	-linux-dietlibc)
1253
+		os=-linux-dietlibc
1254
+		;;
1255
+	-linux*)
1256
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
1257
+		;;
1258
+	-sunos5*)
1259
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
1260
+		;;
1261
+	-sunos6*)
1262
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
1263
+		;;
1264
+	-opened*)
1265
+		os=-openedition
1266
+		;;
1267
+        -os400*)
1268
+		os=-os400
1269
+		;;
1270
+	-wince*)
1271
+		os=-wince
1272
+		;;
1273
+	-osfrose*)
1274
+		os=-osfrose
1275
+		;;
1276
+	-osf*)
1277
+		os=-osf
1278
+		;;
1279
+	-utek*)
1280
+		os=-bsd
1281
+		;;
1282
+	-dynix*)
1283
+		os=-bsd
1284
+		;;
1285
+	-acis*)
1286
+		os=-aos
1287
+		;;
1288
+	-atheos*)
1289
+		os=-atheos
1290
+		;;
1291
+	-syllable*)
1292
+		os=-syllable
1293
+		;;
1294
+	-386bsd)
1295
+		os=-bsd
1296
+		;;
1297
+	-ctix* | -uts*)
1298
+		os=-sysv
1299
+		;;
1300
+	-nova*)
1301
+		os=-rtmk-nova
1302
+		;;
1303
+	-ns2 )
1304
+		os=-nextstep2
1305
+		;;
1306
+	-nsk*)
1307
+		os=-nsk
1308
+		;;
1309
+	# Preserve the version number of sinix5.
1310
+	-sinix5.*)
1311
+		os=`echo $os | sed -e 's|sinix|sysv|'`
1312
+		;;
1313
+	-sinix*)
1314
+		os=-sysv4
1315
+		;;
1316
+        -tpf*)
1317
+		os=-tpf
1318
+		;;
1319
+	-triton*)
1320
+		os=-sysv3
1321
+		;;
1322
+	-oss*)
1323
+		os=-sysv3
1324
+		;;
1325
+	-svr4)
1326
+		os=-sysv4
1327
+		;;
1328
+	-svr3)
1329
+		os=-sysv3
1330
+		;;
1331
+	-sysvr4)
1332
+		os=-sysv4
1333
+		;;
1334
+	# This must come after -sysvr4.
1335
+	-sysv*)
1336
+		;;
1337
+	-ose*)
1338
+		os=-ose
1339
+		;;
1340
+	-es1800*)
1341
+		os=-ose
1342
+		;;
1343
+	-xenix)
1344
+		os=-xenix
1345
+		;;
1346
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1347
+		os=-mint
1348
+		;;
1349
+	-aros*)
1350
+		os=-aros
1351
+		;;
1352
+	-kaos*)
1353
+		os=-kaos
1354
+		;;
1355
+	-zvmoe)
1356
+		os=-zvmoe
1357
+		;;
1358
+	-none)
1359
+		;;
1360
+	*)
1361
+		# Get rid of the `-' at the beginning of $os.
1362
+		os=`echo $os | sed 's/[^-]*-//'`
1363
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1364
+		exit 1
1365
+		;;
1366
+esac
1367
+else
1368
+
1369
+# Here we handle the default operating systems that come with various machines.
1370
+# The value should be what the vendor currently ships out the door with their
1371
+# machine or put another way, the most popular os provided with the machine.
1372
+
1373
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
1374
+# "-sun"), then you have to tell the case statement up towards the top
1375
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
1376
+# will signal an error saying that MANUFACTURER isn't an operating
1377
+# system, and we'll never get to this point.
1378
+
1379
+case $basic_machine in
1380
+        score-*)
1381
+		os=-elf
1382
+		;;
1383
+        spu-*)
1384
+		os=-elf
1385
+		;;
1386
+	*-acorn)
1387
+		os=-riscix1.2
1388
+		;;
1389
+	arm*-rebel)
1390
+		os=-linux
1391
+		;;
1392
+	arm*-semi)
1393
+		os=-aout
1394
+		;;
1395
+        c4x-* | tic4x-*)
1396
+        	os=-coff
1397
+		;;
1398
+	# This must come before the *-dec entry.
1399
+	pdp10-*)
1400
+		os=-tops20
1401
+		;;
1402
+	pdp11-*)
1403
+		os=-none
1404
+		;;
1405
+	*-dec | vax-*)
1406
+		os=-ultrix4.2
1407
+		;;
1408
+	m68*-apollo)
1409
+		os=-domain
1410
+		;;
1411
+	i386-sun)
1412
+		os=-sunos4.0.2
1413
+		;;
1414
+	m68000-sun)
1415
+		os=-sunos3
1416
+		# This also exists in the configure program, but was not the
1417
+		# default.
1418
+		# os=-sunos4
1419
+		;;
1420
+	m68*-cisco)
1421
+		os=-aout
1422
+		;;
1423
+        mep-*)
1424
+		os=-elf
1425
+		;;
1426
+	mips*-cisco)
1427
+		os=-elf
1428
+		;;
1429
+	mips*-*)
1430
+		os=-elf
1431
+		;;
1432
+	or32-*)
1433
+		os=-coff
1434
+		;;
1435
+	*-tti)	# must be before sparc entry or we get the wrong os.
1436
+		os=-sysv3
1437
+		;;
1438
+	sparc-* | *-sun)
1439
+		os=-sunos4.1.1
1440
+		;;
1441
+	*-be)
1442
+		os=-beos
1443
+		;;
1444
+	*-haiku)
1445
+		os=-haiku
1446
+		;;
1447
+	*-ibm)
1448
+		os=-aix
1449
+		;;
1450
+    	*-knuth)
1451
+		os=-mmixware
1452
+		;;
1453
+	*-wec)
1454
+		os=-proelf
1455
+		;;
1456
+	*-winbond)
1457
+		os=-proelf
1458
+		;;
1459
+	*-oki)
1460
+		os=-proelf
1461
+		;;
1462
+	*-hp)
1463
+		os=-hpux
1464
+		;;
1465
+	*-hitachi)
1466
+		os=-hiux
1467
+		;;
1468
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1469
+		os=-sysv
1470
+		;;
1471
+	*-cbm)
1472
+		os=-amigaos
1473
+		;;
1474
+	*-dg)
1475
+		os=-dgux
1476
+		;;
1477
+	*-dolphin)
1478
+		os=-sysv3
1479
+		;;
1480
+	m68k-ccur)
1481
+		os=-rtu
1482
+		;;
1483
+	m88k-omron*)
1484
+		os=-luna
1485
+		;;
1486
+	*-next )
1487
+		os=-nextstep
1488
+		;;
1489
+	*-sequent)
1490
+		os=-ptx
1491
+		;;
1492
+	*-crds)
1493
+		os=-unos
1494
+		;;
1495
+	*-ns)
1496
+		os=-genix
1497
+		;;
1498
+	i370-*)
1499
+		os=-mvs
1500
+		;;
1501
+	*-next)
1502
+		os=-nextstep3
1503
+		;;
1504
+	*-gould)
1505
+		os=-sysv
1506
+		;;
1507
+	*-highlevel)
1508
+		os=-bsd
1509
+		;;
1510
+	*-encore)
1511
+		os=-bsd
1512
+		;;
1513
+	*-sgi)
1514
+		os=-irix
1515
+		;;
1516
+	*-siemens)
1517
+		os=-sysv4
1518
+		;;
1519
+	*-masscomp)
1520
+		os=-rtu
1521
+		;;
1522
+	f30[01]-fujitsu | f700-fujitsu)
1523
+		os=-uxpv
1524
+		;;
1525
+	*-rom68k)
1526
+		os=-coff
1527
+		;;
1528
+	*-*bug)
1529
+		os=-coff
1530
+		;;
1531
+	*-apple)
1532
+		os=-macos
1533
+		;;
1534
+	*-atari*)
1535
+		os=-mint
1536
+		;;
1537
+	*)
1538
+		os=-none
1539
+		;;
1540
+esac
1541
+fi
1542
+
1543
+# Here we handle the case where we know the os, and the CPU type, but not the
1544
+# manufacturer.  We pick the logical manufacturer.
1545
+vendor=unknown
1546
+case $basic_machine in
1547
+	*-unknown)
1548
+		case $os in
1549
+			-riscix*)
1550
+				vendor=acorn
1551
+				;;
1552
+			-sunos*)
1553
+				vendor=sun
1554
+				;;
1555
+			-aix*)
1556
+				vendor=ibm
1557
+				;;
1558
+			-beos*)
1559
+				vendor=be
1560
+				;;
1561
+			-hpux*)
1562
+				vendor=hp
1563
+				;;
1564
+			-mpeix*)
1565
+				vendor=hp
1566
+				;;
1567
+			-hiux*)
1568
+				vendor=hitachi
1569
+				;;
1570
+			-unos*)
1571
+				vendor=crds
1572
+				;;
1573
+			-dgux*)
1574
+				vendor=dg
1575
+				;;
1576
+			-luna*)
1577
+				vendor=omron
1578
+				;;
1579
+			-genix*)
1580
+				vendor=ns
1581
+				;;
1582
+			-mvs* | -opened*)
1583
+				vendor=ibm
1584
+				;;
1585
+			-os400*)
1586
+				vendor=ibm
1587
+				;;
1588
+			-ptx*)
1589
+				vendor=sequent
1590
+				;;
1591
+			-tpf*)
1592
+				vendor=ibm
1593
+				;;
1594
+			-vxsim* | -vxworks* | -windiss*)
1595
+				vendor=wrs
1596
+				;;
1597
+			-aux*)
1598
+				vendor=apple
1599
+				;;
1600
+			-hms*)
1601
+				vendor=hitachi
1602
+				;;
1603
+			-mpw* | -macos*)
1604
+				vendor=apple
1605
+				;;
1606
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1607
+				vendor=atari
1608
+				;;
1609
+			-vos*)
1610
+				vendor=stratus
1611
+				;;
1612
+		esac
1613
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1614
+		;;
1615
+esac
1616
+
1617
+echo $basic_machine$os
1618
+exit
1619
+
1620
+# Local variables:
1621
+# eval: (add-hook 'write-file-hooks 'time-stamp)
1622
+# time-stamp-start: "timestamp='"
1623
+# time-stamp-format: "%:y-%02m-%02d"
1624
+# time-stamp-end: "'"
1625
+# End:
0 1626
new file mode 100755
... ...
@@ -0,0 +1,584 @@
0
+#! /bin/sh
1
+# depcomp - compile a program generating dependencies as side-effects
2
+
3
+scriptversion=2006-10-15.18
4
+
5
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
6
+# Foundation, Inc.
7
+
8
+# This program is free software; you can redistribute it and/or modify
9
+# it under the terms of the GNU General Public License as published by
10
+# the Free Software Foundation; either version 2, or (at your option)
11
+# any later version.
12
+
13
+# This program is distributed in the hope that it will be useful,
14
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+# GNU General Public License for more details.
17
+
18
+# You should have received a copy of the GNU General Public License
19
+# along with this program; if not, write to the Free Software
20
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21
+# 02110-1301, USA.
22
+
23
+# As a special exception to the GNU General Public License, if you
24
+# distribute this file as part of a program that contains a
25
+# configuration script generated by Autoconf, you may include it under
26
+# the same distribution terms that you use for the rest of that program.
27
+
28
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
29
+
30
+case $1 in
31
+  '')
32
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
33
+     exit 1;
34
+     ;;
35
+  -h | --h*)
36
+    cat <<\EOF
37
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
38
+
39
+Run PROGRAMS ARGS to compile a file, generating dependencies
40
+as side-effects.
41
+
42
+Environment variables:
43
+  depmode     Dependency tracking mode.
44
+  source      Source file read by `PROGRAMS ARGS'.
45
+  object      Object file output by `PROGRAMS ARGS'.
46
+  DEPDIR      directory where to store dependencies.
47
+  depfile     Dependency file to output.
48
+  tmpdepfile  Temporary file to use when outputing dependencies.
49
+  libtool     Whether libtool is used (yes/no).
50
+
51
+Report bugs to <bug-automake@gnu.org>.
52
+EOF
53
+    exit $?
54
+    ;;
55
+  -v | --v*)
56
+    echo "depcomp $scriptversion"
57
+    exit $?
58
+    ;;
59
+esac
60
+
61
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
62
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
63
+  exit 1
64
+fi
65
+
66
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
67
+depfile=${depfile-`echo "$object" |
68
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
69
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
70
+
71
+rm -f "$tmpdepfile"
72
+
73
+# Some modes work just like other modes, but use different flags.  We
74
+# parameterize here, but still list the modes in the big case below,
75
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
76
+# here, because this file can only contain one case statement.
77
+if test "$depmode" = hp; then
78
+  # HP compiler uses -M and no extra arg.
79
+  gccflag=-M
80
+  depmode=gcc
81
+fi
82
+
83
+if test "$depmode" = dashXmstdout; then
84
+   # This is just like dashmstdout with a different argument.
85
+   dashmflag=-xM
86
+   depmode=dashmstdout
87
+fi
88
+
89
+case "$depmode" in
90
+gcc3)
91
+## gcc 3 implements dependency tracking that does exactly what
92
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
93
+## it if -MD -MP comes after the -MF stuff.  Hmm.
94
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
95
+## the command line argument order; so add the flags where they
96
+## appear in depend2.am.  Note that the slowdown incurred here
97
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
98
+  for arg
99
+  do
100
+    case $arg in
101
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
102
+    *)  set fnord "$@" "$arg" ;;
103
+    esac
104
+    shift # fnord
105
+    shift # $arg
106
+  done
107
+  "$@"
108
+  stat=$?
109
+  if test $stat -eq 0; then :
110
+  else
111
+    rm -f "$tmpdepfile"
112
+    exit $stat
113
+  fi
114
+  mv "$tmpdepfile" "$depfile"
115
+  ;;
116
+
117
+gcc)
118
+## There are various ways to get dependency output from gcc.  Here's
119
+## why we pick this rather obscure method:
120
+## - Don't want to use -MD because we'd like the dependencies to end
121
+##   up in a subdir.  Having to rename by hand is ugly.
122
+##   (We might end up doing this anyway to support other compilers.)
123
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
124
+##   -MM, not -M (despite what the docs say).
125
+## - Using -M directly means running the compiler twice (even worse
126
+##   than renaming).
127
+  if test -z "$gccflag"; then
128
+    gccflag=-MD,
129
+  fi
130
+  "$@" -Wp,"$gccflag$tmpdepfile"
131
+  stat=$?
132
+  if test $stat -eq 0; then :
133
+  else
134
+    rm -f "$tmpdepfile"
135
+    exit $stat
136
+  fi
137
+  rm -f "$depfile"
138
+  echo "$object : \\" > "$depfile"
139
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
140
+## The second -e expression handles DOS-style file names with drive letters.
141
+  sed -e 's/^[^:]*: / /' \
142
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
143
+## This next piece of magic avoids the `deleted header file' problem.
144
+## The problem is that when a header file which appears in a .P file
145
+## is deleted, the dependency causes make to die (because there is
146
+## typically no way to rebuild the header).  We avoid this by adding
147
+## dummy dependencies for each header file.  Too bad gcc doesn't do
148
+## this for us directly.
149
+  tr ' ' '
150
+' < "$tmpdepfile" |
151
+## Some versions of gcc put a space before the `:'.  On the theory
152
+## that the space means something, we add a space to the output as
153
+## well.
154
+## Some versions of the HPUX 10.20 sed can't process this invocation
155
+## correctly.  Breaking it into two sed invocations is a workaround.
156
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
157
+  rm -f "$tmpdepfile"
158
+  ;;
159
+
160
+hp)
161
+  # This case exists only to let depend.m4 do its work.  It works by
162
+  # looking at the text of this script.  This case will never be run,
163
+  # since it is checked for above.
164
+  exit 1
165
+  ;;
166
+
167
+sgi)
168
+  if test "$libtool" = yes; then
169
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
170
+  else
171
+    "$@" -MDupdate "$tmpdepfile"
172
+  fi
173
+  stat=$?
174
+  if test $stat -eq 0; then :
175
+  else
176
+    rm -f "$tmpdepfile"
177
+    exit $stat
178
+  fi
179
+  rm -f "$depfile"
180
+
181
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
182
+    echo "$object : \\" > "$depfile"
183
+
184
+    # Clip off the initial element (the dependent).  Don't try to be
185
+    # clever and replace this with sed code, as IRIX sed won't handle
186
+    # lines with more than a fixed number of characters (4096 in
187
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
188
+    # the IRIX cc adds comments like `#:fec' to the end of the
189
+    # dependency line.
190
+    tr ' ' '
191
+' < "$tmpdepfile" \
192
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
193
+    tr '
194
+' ' ' >> $depfile
195
+    echo >> $depfile
196
+
197
+    # The second pass generates a dummy entry for each header file.
198
+    tr ' ' '
199
+' < "$tmpdepfile" \
200
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
201
+   >> $depfile
202
+  else
203
+    # The sourcefile does not contain any dependencies, so just
204
+    # store a dummy comment line, to avoid errors with the Makefile
205
+    # "include basename.Plo" scheme.
206
+    echo "#dummy" > "$depfile"
207
+  fi
208
+  rm -f "$tmpdepfile"
209
+  ;;
210
+
211
+aix)
212
+  # The C for AIX Compiler uses -M and outputs the dependencies
213
+  # in a .u file.  In older versions, this file always lives in the
214
+  # current directory.  Also, the AIX compiler puts `$object:' at the
215
+  # start of each line; $object doesn't have directory information.
216
+  # Version 6 uses the directory in both cases.
217
+  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
218
+  tmpdepfile="$stripped.u"
219
+  if test "$libtool" = yes; then
220
+    "$@" -Wc,-M
221
+  else
222
+    "$@" -M
223
+  fi
224
+  stat=$?
225
+
226
+  if test -f "$tmpdepfile"; then :
227
+  else
228
+    stripped=`echo "$stripped" | sed 's,^.*/,,'`
229
+    tmpdepfile="$stripped.u"
230
+  fi
231
+
232
+  if test $stat -eq 0; then :
233
+  else
234
+    rm -f "$tmpdepfile"
235
+    exit $stat
236
+  fi
237
+
238
+  if test -f "$tmpdepfile"; then
239
+    outname="$stripped.o"
240
+    # Each line is of the form `foo.o: dependent.h'.
241
+    # Do two passes, one to just change these to
242
+    # `$object: dependent.h' and one to simply `dependent.h:'.
243
+    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
244
+    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
245
+  else
246
+    # The sourcefile does not contain any dependencies, so just
247
+    # store a dummy comment line, to avoid errors with the Makefile
248
+    # "include basename.Plo" scheme.
249
+    echo "#dummy" > "$depfile"
250
+  fi
251
+  rm -f "$tmpdepfile"
252
+  ;;
253
+
254
+icc)
255
+  # Intel's C compiler understands `-MD -MF file'.  However on
256
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
257
+  # ICC 7.0 will fill foo.d with something like
258
+  #    foo.o: sub/foo.c
259
+  #    foo.o: sub/foo.h
260
+  # which is wrong.  We want:
261
+  #    sub/foo.o: sub/foo.c
262
+  #    sub/foo.o: sub/foo.h
263
+  #    sub/foo.c:
264
+  #    sub/foo.h:
265
+  # ICC 7.1 will output
266
+  #    foo.o: sub/foo.c sub/foo.h
267
+  # and will wrap long lines using \ :
268
+  #    foo.o: sub/foo.c ... \
269
+  #     sub/foo.h ... \
270
+  #     ...
271
+
272
+  "$@" -MD -MF "$tmpdepfile"
273
+  stat=$?
274
+  if test $stat -eq 0; then :
275
+  else
276
+    rm -f "$tmpdepfile"
277
+    exit $stat
278
+  fi
279
+  rm -f "$depfile"
280
+  # Each line is of the form `foo.o: dependent.h',
281
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
282
+  # Do two passes, one to just change these to
283
+  # `$object: dependent.h' and one to simply `dependent.h:'.
284
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
285
+  # Some versions of the HPUX 10.20 sed can't process this invocation
286
+  # correctly.  Breaking it into two sed invocations is a workaround.
287
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
288
+    sed -e 's/$/ :/' >> "$depfile"
289
+  rm -f "$tmpdepfile"
290
+  ;;
291
+
292
+hp2)
293
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
294
+  # compilers, which have integrated preprocessors.  The correct option
295
+  # to use with these is +Maked; it writes dependencies to a file named
296
+  # 'foo.d', which lands next to the object file, wherever that
297
+  # happens to be.
298
+  # Much of this is similar to the tru64 case; see comments there.
299
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
300
+  test "x$dir" = "x$object" && dir=
301
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
302
+  if test "$libtool" = yes; then
303
+    tmpdepfile1=$dir$base.d
304
+    tmpdepfile2=$dir.libs/$base.d
305
+    "$@" -Wc,+Maked
306
+  else
307
+    tmpdepfile1=$dir$base.d
308
+    tmpdepfile2=$dir$base.d
309
+    "$@" +Maked
310
+  fi
311
+  stat=$?
312
+  if test $stat -eq 0; then :
313
+  else
314
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
315
+     exit $stat
316
+  fi
317
+
318
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
319
+  do
320
+    test -f "$tmpdepfile" && break
321
+  done
322
+  if test -f "$tmpdepfile"; then
323
+    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
324
+    # Add `dependent.h:' lines.
325
+    sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
326
+  else
327
+    echo "#dummy" > "$depfile"
328
+  fi
329
+  rm -f "$tmpdepfile" "$tmpdepfile2"
330
+  ;;
331
+
332
+tru64)
333
+   # The Tru64 compiler uses -MD to generate dependencies as a side
334
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
335
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
336
+   # dependencies in `foo.d' instead, so we check for that too.
337
+   # Subdirectories are respected.
338
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
339
+   test "x$dir" = "x$object" && dir=
340
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
341
+
342
+   if test "$libtool" = yes; then
343
+      # With Tru64 cc, shared objects can also be used to make a
344
+      # static library.  This mechanism is used in libtool 1.4 series to
345
+      # handle both shared and static libraries in a single compilation.
346
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
347
+      #
348
+      # With libtool 1.5 this exception was removed, and libtool now
349
+      # generates 2 separate objects for the 2 libraries.  These two
350
+      # compilations output dependencies in $dir.libs/$base.o.d and
351
+      # in $dir$base.o.d.  We have to check for both files, because
352
+      # one of the two compilations can be disabled.  We should prefer
353
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
354
+      # automatically cleaned when .libs/ is deleted, while ignoring
355
+      # the former would cause a distcleancheck panic.
356
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
357
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
358
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
359
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
360
+      "$@" -Wc,-MD
361
+   else
362
+      tmpdepfile1=$dir$base.o.d
363
+      tmpdepfile2=$dir$base.d
364
+      tmpdepfile3=$dir$base.d
365
+      tmpdepfile4=$dir$base.d
366
+      "$@" -MD
367
+   fi
368
+
369
+   stat=$?
370
+   if test $stat -eq 0; then :
371
+   else
372
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
373
+      exit $stat
374
+   fi
375
+
376
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
377
+   do
378
+     test -f "$tmpdepfile" && break
379
+   done
380
+   if test -f "$tmpdepfile"; then
381
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
382
+      # That's a tab and a space in the [].
383
+      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
384
+   else
385
+      echo "#dummy" > "$depfile"
386
+   fi
387
+   rm -f "$tmpdepfile"
388
+   ;;
389
+
390
+#nosideeffect)
391
+  # This comment above is used by automake to tell side-effect
392
+  # dependency tracking mechanisms from slower ones.
393
+
394
+dashmstdout)
395
+  # Important note: in order to support this mode, a compiler *must*
396
+  # always write the preprocessed file to stdout, regardless of -o.
397
+  "$@" || exit $?
398
+
399
+  # Remove the call to Libtool.
400
+  if test "$libtool" = yes; then
401
+    while test $1 != '--mode=compile'; do
402
+      shift
403
+    done
404
+    shift
405
+  fi
406
+
407
+  # Remove `-o $object'.
408
+  IFS=" "
409
+  for arg
410
+  do
411
+    case $arg in
412
+    -o)
413
+      shift
414
+      ;;
415
+    $object)
416
+      shift
417
+      ;;
418
+    *)
419
+      set fnord "$@" "$arg"
420
+      shift # fnord
421
+      shift # $arg
422
+      ;;
423
+    esac
424
+  done
425
+
426
+  test -z "$dashmflag" && dashmflag=-M
427
+  # Require at least two characters before searching for `:'
428
+  # in the target name.  This is to cope with DOS-style filenames:
429
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
430
+  "$@" $dashmflag |
431
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
432
+  rm -f "$depfile"
433
+  cat < "$tmpdepfile" > "$depfile"
434
+  tr ' ' '
435
+' < "$tmpdepfile" | \
436
+## Some versions of the HPUX 10.20 sed can't process this invocation
437
+## correctly.  Breaking it into two sed invocations is a workaround.
438
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
439
+  rm -f "$tmpdepfile"
440
+  ;;
441
+
442
+dashXmstdout)
443
+  # This case only exists to satisfy depend.m4.  It is never actually
444
+  # run, as this mode is specially recognized in the preamble.
445
+  exit 1
446
+  ;;
447
+
448
+makedepend)
449
+  "$@" || exit $?
450
+  # Remove any Libtool call
451
+  if test "$libtool" = yes; then
452
+    while test $1 != '--mode=compile'; do
453
+      shift
454
+    done
455
+    shift
456
+  fi
457
+  # X makedepend
458
+  shift
459
+  cleared=no
460
+  for arg in "$@"; do
461
+    case $cleared in
462
+    no)
463
+      set ""; shift
464
+      cleared=yes ;;
465
+    esac
466
+    case "$arg" in
467
+    -D*|-I*)
468
+      set fnord "$@" "$arg"; shift ;;
469
+    # Strip any option that makedepend may not understand.  Remove
470
+    # the object too, otherwise makedepend will parse it as a source file.
471
+    -*|$object)
472
+      ;;
473
+    *)
474
+      set fnord "$@" "$arg"; shift ;;
475
+    esac
476
+  done
477
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
478
+  touch "$tmpdepfile"
479
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
480
+  rm -f "$depfile"
481
+  cat < "$tmpdepfile" > "$depfile"
482
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
483
+' | \
484
+## Some versions of the HPUX 10.20 sed can't process this invocation
485
+## correctly.  Breaking it into two sed invocations is a workaround.
486
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
487
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
488
+  ;;
489
+
490
+cpp)
491
+  # Important note: in order to support this mode, a compiler *must*
492
+  # always write the preprocessed file to stdout.
493
+  "$@" || exit $?
494
+
495
+  # Remove the call to Libtool.
496
+  if test "$libtool" = yes; then
497
+    while test $1 != '--mode=compile'; do
498
+      shift
499
+    done
500
+    shift
501
+  fi
502
+
503
+  # Remove `-o $object'.
504
+  IFS=" "
505
+  for arg
506
+  do
507
+    case $arg in
508
+    -o)
509
+      shift
510
+      ;;
511
+    $object)
512
+      shift
513
+      ;;
514
+    *)
515
+      set fnord "$@" "$arg"
516
+      shift # fnord
517
+      shift # $arg
518
+      ;;
519
+    esac
520
+  done
521
+
522
+  "$@" -E |
523
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
524
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
525
+    sed '$ s: \\$::' > "$tmpdepfile"
526
+  rm -f "$depfile"
527
+  echo "$object : \\" > "$depfile"
528
+  cat < "$tmpdepfile" >> "$depfile"
529
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
530
+  rm -f "$tmpdepfile"
531
+  ;;
532
+
533
+msvisualcpp)
534
+  # Important note: in order to support this mode, a compiler *must*
535
+  # always write the preprocessed file to stdout, regardless of -o,
536
+  # because we must use -o when running libtool.
537
+  "$@" || exit $?
538
+  IFS=" "
539
+  for arg
540
+  do
541
+    case "$arg" in
542
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
543
+	set fnord "$@"
544
+	shift
545
+	shift
546
+	;;
547
+    *)
548
+	set fnord "$@" "$arg"
549
+	shift
550
+	shift
551
+	;;
552
+    esac
553
+  done
554
+  "$@" -E |
555
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
556
+  rm -f "$depfile"
557
+  echo "$object : \\" > "$depfile"
558
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
559
+  echo "	" >> "$depfile"
560
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
561
+  rm -f "$tmpdepfile"
562
+  ;;
563
+
564
+none)
565
+  exec "$@"
566
+  ;;
567
+
568
+*)
569
+  echo "Unknown depmode $depmode" 1>&2
570
+  exit 1
571
+  ;;
572
+esac
573
+
574
+exit 0
575
+
576
+# Local Variables:
577
+# mode: shell-script
578
+# sh-indentation: 2
579
+# eval: (add-hook 'write-file-hooks 'time-stamp)
580
+# time-stamp-start: "scriptversion="
581
+# time-stamp-format: "%:y-%02m-%02d.%02H"
582
+# time-stamp-end: "$"
583
+# End:
0 584
new file mode 100755
... ...
@@ -0,0 +1,507 @@
0
+#!/bin/sh
1
+# install - install a program, script, or datafile
2
+
3
+scriptversion=2006-10-14.15
4
+
5
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
6
+# later released in X11R6 (xc/config/util/install.sh) with the
7
+# following copyright and license.
8
+#
9
+# Copyright (C) 1994 X Consortium
10
+#
11
+# Permission is hereby granted, free of charge, to any person obtaining a copy
12
+# of this software and associated documentation files (the "Software"), to
13
+# deal in the Software without restriction, including without limitation the
14
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
15
+# sell copies of the Software, and to permit persons to whom the Software is
16
+# furnished to do so, subject to the following conditions:
17
+#
18
+# The above copyright notice and this permission notice shall be included in
19
+# all copies or substantial portions of the Software.
20
+#
21
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
24
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
25
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
26
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27
+#
28
+# Except as contained in this notice, the name of the X Consortium shall not
29
+# be used in advertising or otherwise to promote the sale, use or other deal-
30
+# ings in this Software without prior written authorization from the X Consor-
31
+# tium.
32
+#
33
+#
34
+# FSF changes to this file are in the public domain.
35
+#
36
+# Calling this script install-sh is preferred over install.sh, to prevent
37
+# `make' implicit rules from creating a file called install from it
38
+# when there is no Makefile.
39
+#
40
+# This script is compatible with the BSD install script, but was written
41
+# from scratch.
42
+
43
+nl='
44
+'
45
+IFS=" ""	$nl"
46
+
47
+# set DOITPROG to echo to test this script
48
+
49
+# Don't use :- since 4.3BSD and earlier shells don't like it.
50
+doit="${DOITPROG-}"
51
+if test -z "$doit"; then
52
+  doit_exec=exec
53
+else
54
+  doit_exec=$doit
55
+fi
56
+
57
+# Put in absolute file names if you don't have them in your path;
58
+# or use environment vars.
59
+
60
+mvprog="${MVPROG-mv}"
61
+cpprog="${CPPROG-cp}"
62
+chmodprog="${CHMODPROG-chmod}"
63
+chownprog="${CHOWNPROG-chown}"
64
+chgrpprog="${CHGRPPROG-chgrp}"
65
+stripprog="${STRIPPROG-strip}"
66
+rmprog="${RMPROG-rm}"
67
+mkdirprog="${MKDIRPROG-mkdir}"
68
+
69
+posix_glob=
70
+posix_mkdir=
71
+
72
+# Desired mode of installed file.
73
+mode=0755
74
+
75
+chmodcmd=$chmodprog
76
+chowncmd=
77
+chgrpcmd=
78
+stripcmd=
79
+rmcmd="$rmprog -f"
80
+mvcmd="$mvprog"
81
+src=
82
+dst=
83
+dir_arg=
84
+dstarg=
85
+no_target_directory=
86
+
87
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
88
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
89
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
90
+   or: $0 [OPTION]... -d DIRECTORIES...
91
+
92
+In the 1st form, copy SRCFILE to DSTFILE.
93
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
94
+In the 4th, create DIRECTORIES.
95
+
96
+Options:
97
+-c         (ignored)
98
+-d         create directories instead of installing files.
99
+-g GROUP   $chgrpprog installed files to GROUP.
100
+-m MODE    $chmodprog installed files to MODE.
101
+-o USER    $chownprog installed files to USER.
102
+-s         $stripprog installed files.
103
+-t DIRECTORY  install into DIRECTORY.
104
+-T         report an error if DSTFILE is a directory.
105
+--help     display this help and exit.
106
+--version  display version info and exit.
107
+
108
+Environment variables override the default commands:
109
+  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
110
+"
111
+
112
+while test $# -ne 0; do
113
+  case $1 in
114
+    -c) shift
115
+        continue;;
116
+
117
+    -d) dir_arg=true
118
+        shift
119
+        continue;;
120
+
121
+    -g) chgrpcmd="$chgrpprog $2"
122
+        shift
123
+        shift
124
+        continue;;
125
+
126
+    --help) echo "$usage"; exit $?;;
127
+
128
+    -m) mode=$2
129
+        shift
130
+        shift
131
+	case $mode in
132
+	  *' '* | *'	'* | *'
133
+'*	  | *'*'* | *'?'* | *'['*)
134
+	    echo "$0: invalid mode: $mode" >&2
135
+	    exit 1;;
136
+	esac
137
+        continue;;
138
+
139
+    -o) chowncmd="$chownprog $2"
140
+        shift
141
+        shift
142
+        continue;;
143
+
144
+    -s) stripcmd=$stripprog
145
+        shift
146
+        continue;;
147
+
148
+    -t) dstarg=$2
149
+	shift
150
+	shift
151
+	continue;;
152
+
153
+    -T) no_target_directory=true
154
+	shift
155
+	continue;;
156
+
157
+    --version) echo "$0 $scriptversion"; exit $?;;
158
+
159
+    --)	shift
160
+	break;;
161
+
162
+    -*)	echo "$0: invalid option: $1" >&2
163
+	exit 1;;
164
+
165
+    *)  break;;
166
+  esac
167
+done
168
+
169
+if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
170
+  # When -d is used, all remaining arguments are directories to create.
171
+  # When -t is used, the destination is already specified.
172
+  # Otherwise, the last argument is the destination.  Remove it from $@.
173
+  for arg
174
+  do
175
+    if test -n "$dstarg"; then
176
+      # $@ is not empty: it contains at least $arg.
177
+      set fnord "$@" "$dstarg"
178
+      shift # fnord
179
+    fi
180
+    shift # arg
181
+    dstarg=$arg
182
+  done
183
+fi
184
+
185
+if test $# -eq 0; then
186
+  if test -z "$dir_arg"; then
187
+    echo "$0: no input file specified." >&2
188
+    exit 1
189
+  fi
190
+  # It's OK to call `install-sh -d' without argument.
191
+  # This can happen when creating conditional directories.
192
+  exit 0
193
+fi
194
+
195
+if test -z "$dir_arg"; then
196
+  trap '(exit $?); exit' 1 2 13 15
197
+
198
+  # Set umask so as not to create temps with too-generous modes.
199
+  # However, 'strip' requires both read and write access to temps.
200
+  case $mode in
201
+    # Optimize common cases.
202
+    *644) cp_umask=133;;
203
+    *755) cp_umask=22;;
204
+
205
+    *[0-7])
206
+      if test -z "$stripcmd"; then
207
+	u_plus_rw=
208
+      else
209
+	u_plus_rw='% 200'
210
+      fi
211
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
212
+    *)
213
+      if test -z "$stripcmd"; then
214
+	u_plus_rw=
215
+      else
216
+	u_plus_rw=,u+rw
217
+      fi
218
+      cp_umask=$mode$u_plus_rw;;
219
+  esac
220
+fi
221
+
222
+for src
223
+do
224
+  # Protect names starting with `-'.
225
+  case $src in
226
+    -*) src=./$src ;;
227
+  esac
228
+
229
+  if test -n "$dir_arg"; then
230
+    dst=$src
231
+    dstdir=$dst
232
+    test -d "$dstdir"
233
+    dstdir_status=$?
234
+  else
235
+
236
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
237
+    # might cause directories to be created, which would be especially bad
238
+    # if $src (and thus $dsttmp) contains '*'.
239
+    if test ! -f "$src" && test ! -d "$src"; then
240
+      echo "$0: $src does not exist." >&2
241
+      exit 1
242
+    fi
243
+
244
+    if test -z "$dstarg"; then
245
+      echo "$0: no destination specified." >&2
246
+      exit 1
247
+    fi
248
+
249
+    dst=$dstarg
250
+    # Protect names starting with `-'.
251
+    case $dst in
252
+      -*) dst=./$dst ;;
253
+    esac
254
+
255
+    # If destination is a directory, append the input filename; won't work
256
+    # if double slashes aren't ignored.
257
+    if test -d "$dst"; then
258
+      if test -n "$no_target_directory"; then
259
+	echo "$0: $dstarg: Is a directory" >&2
260
+	exit 1
261
+      fi
262
+      dstdir=$dst
263
+      dst=$dstdir/`basename "$src"`
264
+      dstdir_status=0
265
+    else
266
+      # Prefer dirname, but fall back on a substitute if dirname fails.
267
+      dstdir=`
268
+	(dirname "$dst") 2>/dev/null ||
269
+	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
270
+	     X"$dst" : 'X\(//\)[^/]' \| \
271
+	     X"$dst" : 'X\(//\)$' \| \
272
+	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
273
+	echo X"$dst" |
274
+	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
275
+		   s//\1/
276
+		   q
277
+		 }
278
+		 /^X\(\/\/\)[^/].*/{
279
+		   s//\1/
280
+		   q
281
+		 }
282
+		 /^X\(\/\/\)$/{
283
+		   s//\1/
284
+		   q
285
+		 }
286
+		 /^X\(\/\).*/{
287
+		   s//\1/
288
+		   q
289
+		 }
290
+		 s/.*/./; q'
291
+      `
292
+
293
+      test -d "$dstdir"
294
+      dstdir_status=$?
295
+    fi
296
+  fi
297
+
298
+  obsolete_mkdir_used=false
299
+
300
+  if test $dstdir_status != 0; then
301
+    case $posix_mkdir in
302
+      '')
303
+	# Create intermediate dirs using mode 755 as modified by the umask.
304
+	# This is like FreeBSD 'install' as of 1997-10-28.
305
+	umask=`umask`
306
+	case $stripcmd.$umask in
307
+	  # Optimize common cases.
308
+	  *[2367][2367]) mkdir_umask=$umask;;
309
+	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
310
+
311
+	  *[0-7])
312
+	    mkdir_umask=`expr $umask + 22 \
313
+	      - $umask % 100 % 40 + $umask % 20 \
314
+	      - $umask % 10 % 4 + $umask % 2
315
+	    `;;
316
+	  *) mkdir_umask=$umask,go-w;;
317
+	esac
318
+
319
+	# With -d, create the new directory with the user-specified mode.
320
+	# Otherwise, rely on $mkdir_umask.
321
+	if test -n "$dir_arg"; then
322
+	  mkdir_mode=-m$mode
323
+	else
324
+	  mkdir_mode=
325
+	fi
326
+
327
+	posix_mkdir=false
328
+	case $umask in
329
+	  *[123567][0-7][0-7])
330
+	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
331
+	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
332
+	    ;;
333
+	  *)
334
+	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
335
+	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
336
+
337
+	    if (umask $mkdir_umask &&
338
+		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
339
+	    then
340
+	      if test -z "$dir_arg" || {
341
+		   # Check for POSIX incompatibilities with -m.
342
+		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
343
+		   # other-writeable bit of parent directory when it shouldn't.
344
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
345
+		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
346
+		   case $ls_ld_tmpdir in
347
+		     d????-?r-*) different_mode=700;;
348
+		     d????-?--*) different_mode=755;;
349
+		     *) false;;
350
+		   esac &&
351
+		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
352
+		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
353
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
354
+		   }
355
+		 }
356
+	      then posix_mkdir=:
357
+	      fi
358
+	      rmdir "$tmpdir/d" "$tmpdir"
359
+	    else
360
+	      # Remove any dirs left behind by ancient mkdir implementations.
361
+	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
362
+	    fi
363
+	    trap '' 0;;
364
+	esac;;
365
+    esac
366
+
367
+    if
368
+      $posix_mkdir && (
369
+	umask $mkdir_umask &&
370
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
371
+      )
372
+    then :
373
+    else
374
+
375
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
376
+      # or it failed possibly due to a race condition.  Create the
377
+      # directory the slow way, step by step, checking for races as we go.
378
+
379
+      case $dstdir in
380
+	/*) prefix=/ ;;
381
+	-*) prefix=./ ;;
382
+	*)  prefix= ;;
383
+      esac
384
+
385
+      case $posix_glob in
386
+        '')
387
+	  if (set -f) 2>/dev/null; then
388
+	    posix_glob=true
389
+	  else
390
+	    posix_glob=false
391
+	  fi ;;
392
+      esac
393
+
394
+      oIFS=$IFS
395
+      IFS=/
396
+      $posix_glob && set -f
397
+      set fnord $dstdir
398
+      shift
399
+      $posix_glob && set +f
400
+      IFS=$oIFS
401
+
402
+      prefixes=
403
+
404
+      for d
405
+      do
406
+	test -z "$d" && continue
407
+
408
+	prefix=$prefix$d
409
+	if test -d "$prefix"; then
410
+	  prefixes=
411
+	else
412
+	  if $posix_mkdir; then
413
+	    (umask=$mkdir_umask &&
414
+	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
415
+	    # Don't fail if two instances are running concurrently.
416
+	    test -d "$prefix" || exit 1
417
+	  else
418
+	    case $prefix in
419
+	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
420
+	      *) qprefix=$prefix;;
421
+	    esac
422
+	    prefixes="$prefixes '$qprefix'"
423
+	  fi
424
+	fi
425
+	prefix=$prefix/
426
+      done
427
+
428
+      if test -n "$prefixes"; then
429
+	# Don't fail if two instances are running concurrently.
430
+	(umask $mkdir_umask &&
431
+	 eval "\$doit_exec \$mkdirprog $prefixes") ||
432
+	  test -d "$dstdir" || exit 1
433
+	obsolete_mkdir_used=true
434
+      fi
435
+    fi
436
+  fi
437
+
438
+  if test -n "$dir_arg"; then
439
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
440
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
441
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
442
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
443
+  else
444
+
445
+    # Make a couple of temp file names in the proper directory.
446
+    dsttmp=$dstdir/_inst.$$_
447
+    rmtmp=$dstdir/_rm.$$_
448
+
449
+    # Trap to clean up those temp files at exit.
450
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
451
+
452
+    # Copy the file name to the temp name.
453
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
454
+
455
+    # and set any options; do chmod last to preserve setuid bits.
456
+    #
457
+    # If any of these fail, we abort the whole thing.  If we want to
458
+    # ignore errors from any of these, just make sure not to ignore
459
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
460
+    #
461
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
462
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
463
+      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
464
+      && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
465
+
466
+    # Now rename the file to the real destination.
467
+    { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
468
+      || {
469
+	   # The rename failed, perhaps because mv can't rename something else
470
+	   # to itself, or perhaps because mv is so ancient that it does not
471
+	   # support -f.
472
+
473
+	   # Now remove or move aside any old file at destination location.
474
+	   # We try this two ways since rm can't unlink itself on some
475
+	   # systems and the destination file might be busy for other
476
+	   # reasons.  In this case, the final cleanup might fail but the new
477
+	   # file should still install successfully.
478
+	   {
479
+	     if test -f "$dst"; then
480
+	       $doit $rmcmd -f "$dst" 2>/dev/null \
481
+	       || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
482
+		     && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
483
+	       || {
484
+		 echo "$0: cannot unlink or rename $dst" >&2
485
+		 (exit 1); exit 1
486
+	       }
487
+	     else
488
+	       :
489
+	     fi
490
+	   } &&
491
+
492
+	   # Now rename the file to the real destination.
493
+	   $doit $mvcmd "$dsttmp" "$dst"
494
+	 }
495
+    } || exit 1
496
+
497
+    trap '' 0
498
+  fi
499
+done
500
+
501
+# Local variables:
502
+# eval: (add-hook 'write-file-hooks 'time-stamp)
503
+# time-stamp-start: "scriptversion="
504
+# time-stamp-format: "%:y-%02m-%02d.%02H"
505
+# time-stamp-end: "$"
506
+# End:
0 507
new file mode 100644
... ...
@@ -0,0 +1,6938 @@
0
+# ltmain.sh - Provide generalized library-building support services.
1
+# NOTE: Changing this file will not affect anything until you rerun configure.
2
+#
3
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
4
+# 2007  Free Software Foundation, Inc.
5
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6
+#
7
+# This program is free software; you can redistribute it and/or modify
8
+# it under the terms of the GNU General Public License as published by
9
+# the Free Software Foundation; either version 2 of the License, or
10
+# (at your option) any later version.
11
+#
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.
16
+#
17
+# You should have received a copy of the GNU General Public License
18
+# along with this program; if not, write to the Free Software
19
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
+#
21
+# As a special exception to the GNU General Public License, if you
22
+# distribute this file as part of a program that contains a
23
+# configuration script generated by Autoconf, you may include it under
24
+# the same distribution terms that you use for the rest of that program.
25
+
26
+basename="s,^.*/,,g"
27
+
28
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
29
+# is ksh but when the shell is invoked as "sh" and the current value of
30
+# the _XPG environment variable is not equal to 1 (one), the special
31
+# positional parameter $0, within a function call, is the name of the
32
+# function.
33
+progpath="$0"
34
+
35
+# The name of this program:
36
+progname=`echo "$progpath" | $SED $basename`
37
+modename="$progname"
38
+
39
+# Global variables:
40
+EXIT_SUCCESS=0
41
+EXIT_FAILURE=1
42
+
43
+PROGRAM=ltmain.sh
44
+PACKAGE=libtool
45
+VERSION="1.5.24 Debian 1.5.24-2"
46
+TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
47
+
48
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
49
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
50
+  emulate sh
51
+  NULLCMD=:
52
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
53
+  # is contrary to our usage.  Disable this feature.
54
+  alias -g '${1+"$@"}'='"$@"'
55
+  setopt NO_GLOB_SUBST
56
+else
57
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
58
+fi
59
+BIN_SH=xpg4; export BIN_SH # for Tru64
60
+DUALCASE=1; export DUALCASE # for MKS sh
61
+
62
+# Check that we have a working $echo.
63
+if test "X$1" = X--no-reexec; then
64
+  # Discard the --no-reexec flag, and continue.
65
+  shift
66
+elif test "X$1" = X--fallback-echo; then
67
+  # Avoid inline document here, it may be left over
68
+  :
69
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
70
+  # Yippee, $echo works!
71
+  :
72
+else
73
+  # Restart under the correct shell, and then maybe $echo will work.
74
+  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
75
+fi
76
+
77
+if test "X$1" = X--fallback-echo; then
78
+  # used as fallback echo
79
+  shift
80
+  cat <<EOF
81
+$*
82
+EOF
83
+  exit $EXIT_SUCCESS
84
+fi
85
+
86
+default_mode=
87
+help="Try \`$progname --help' for more information."
88
+magic="%%%MAGIC variable%%%"
89
+mkdir="mkdir"
90
+mv="mv -f"
91
+rm="rm -f"
92
+
93
+# Sed substitution that helps us do robust quoting.  It backslashifies
94
+# metacharacters that are still active within double-quoted strings.
95
+Xsed="${SED}"' -e 1s/^X//'
96
+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
97
+# test EBCDIC or ASCII
98
+case `echo X|tr X '\101'` in
99
+ A) # ASCII based system
100
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
101
+  SP2NL='tr \040 \012'
102
+  NL2SP='tr \015\012 \040\040'
103
+  ;;
104
+ *) # EBCDIC based system
105
+  SP2NL='tr \100 \n'
106
+  NL2SP='tr \r\n \100\100'
107
+  ;;
108
+esac
109
+
110
+# NLS nuisances.
111
+# Only set LANG and LC_ALL to C if already set.
112
+# These must not be set unconditionally because not all systems understand
113
+# e.g. LANG=C (notably SCO).
114
+# We save the old values to restore during execute mode.
115
+for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
116
+do
117
+  eval "if test \"\${$lt_var+set}\" = set; then
118
+	  save_$lt_var=\$$lt_var
119
+	  $lt_var=C
120
+	  export $lt_var
121
+	fi"
122
+done
123
+
124
+# Make sure IFS has a sensible default
125
+lt_nl='
126
+'
127
+IFS=" 	$lt_nl"
128
+
129
+if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
130
+  $echo "$modename: not configured to build any kind of library" 1>&2
131
+  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
132
+  exit $EXIT_FAILURE
133
+fi
134
+
135
+# Global variables.
136
+mode=$default_mode
137
+nonopt=
138
+prev=
139
+prevopt=
140
+run=
141
+show="$echo"
142
+show_help=
143
+execute_dlfiles=
144
+duplicate_deps=no
145
+preserve_args=
146
+lo2o="s/\\.lo\$/.${objext}/"
147
+o2lo="s/\\.${objext}\$/.lo/"
148
+extracted_archives=
149
+extracted_serial=0
150
+
151
+#####################################
152
+# Shell function definitions:
153
+# This seems to be the best place for them
154
+
155
+# func_mktempdir [string]
156
+# Make a temporary directory that won't clash with other running
157
+# libtool processes, and avoids race conditions if possible.  If
158
+# given, STRING is the basename for that directory.
159
+func_mktempdir ()
160
+{
161
+    my_template="${TMPDIR-/tmp}/${1-$progname}"
162
+
163
+    if test "$run" = ":"; then
164
+      # Return a directory name, but don't create it in dry-run mode
165
+      my_tmpdir="${my_template}-$$"
166
+    else
167
+
168
+      # If mktemp works, use that first and foremost
169
+      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
170
+
171
+      if test ! -d "$my_tmpdir"; then
172
+	# Failing that, at least try and use $RANDOM to avoid a race
173
+	my_tmpdir="${my_template}-${RANDOM-0}$$"
174
+
175
+	save_mktempdir_umask=`umask`
176
+	umask 0077
177
+	$mkdir "$my_tmpdir"
178
+	umask $save_mktempdir_umask
179
+      fi
180
+
181
+      # If we're not in dry-run mode, bomb out on failure
182
+      test -d "$my_tmpdir" || {
183
+        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
184
+	exit $EXIT_FAILURE
185
+      }
186
+    fi
187
+
188
+    $echo "X$my_tmpdir" | $Xsed
189
+}
190
+
191
+
192
+# func_win32_libid arg
193
+# return the library type of file 'arg'
194
+#
195
+# Need a lot of goo to handle *both* DLLs and import libs
196
+# Has to be a shell function in order to 'eat' the argument
197
+# that is supplied when $file_magic_command is called.
198
+func_win32_libid ()
199
+{
200
+  win32_libid_type="unknown"
201
+  win32_fileres=`file -L $1 2>/dev/null`
202
+  case $win32_fileres in
203
+  *ar\ archive\ import\ library*) # definitely import
204
+    win32_libid_type="x86 archive import"
205
+    ;;
206
+  *ar\ archive*) # could be an import, or static
207
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
208
+      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
209
+      win32_nmres=`eval $NM -f posix -A $1 | \
210
+	$SED -n -e '1,100{
211
+		/ I /{
212
+			s,.*,import,
213
+			p
214
+			q
215
+			}
216
+		}'`
217
+      case $win32_nmres in
218
+      import*)  win32_libid_type="x86 archive import";;
219
+      *)        win32_libid_type="x86 archive static";;
220
+      esac
221
+    fi
222
+    ;;
223
+  *DLL*)
224
+    win32_libid_type="x86 DLL"
225
+    ;;
226
+  *executable*) # but shell scripts are "executable" too...
227
+    case $win32_fileres in
228
+    *MS\ Windows\ PE\ Intel*)
229
+      win32_libid_type="x86 DLL"
230
+      ;;
231
+    esac
232
+    ;;
233
+  esac
234
+  $echo $win32_libid_type
235
+}
236
+
237
+
238
+# func_infer_tag arg
239
+# Infer tagged configuration to use if any are available and
240
+# if one wasn't chosen via the "--tag" command line option.
241
+# Only attempt this if the compiler in the base compile
242
+# command doesn't match the default compiler.
243
+# arg is usually of the form 'gcc ...'
244
+func_infer_tag ()
245
+{
246
+    if test -n "$available_tags" && test -z "$tagname"; then
247
+      CC_quoted=
248
+      for arg in $CC; do
249
+	case $arg in
250
+	  *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
251
+	  arg="\"$arg\""
252
+	  ;;
253
+	esac
254
+	CC_quoted="$CC_quoted $arg"
255
+      done
256
+      case $@ in
257
+      # Blanks in the command may have been stripped by the calling shell,
258
+      # but not from the CC environment variable when configure was run.
259
+      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
260
+      # Blanks at the start of $base_compile will cause this to fail
261
+      # if we don't check for them as well.
262
+      *)
263
+	for z in $available_tags; do
264
+	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
265
+	    # Evaluate the configuration.
266
+	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
267
+	    CC_quoted=
268
+	    for arg in $CC; do
269
+	    # Double-quote args containing other shell metacharacters.
270
+	    case $arg in
271
+	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
272
+	      arg="\"$arg\""
273
+	      ;;
274
+	    esac
275
+	    CC_quoted="$CC_quoted $arg"
276
+	  done
277
+	    case "$@ " in
278
+	      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
279
+	      # The compiler in the base compile command matches
280
+	      # the one in the tagged configuration.
281
+	      # Assume this is the tagged configuration we want.
282
+	      tagname=$z
283
+	      break
284
+	      ;;
285
+	    esac
286
+	  fi
287
+	done
288
+	# If $tagname still isn't set, then no tagged configuration
289
+	# was found and let the user know that the "--tag" command
290
+	# line option must be used.
291
+	if test -z "$tagname"; then
292
+	  $echo "$modename: unable to infer tagged configuration"
293
+	  $echo "$modename: specify a tag with \`--tag'" 1>&2
294
+	  exit $EXIT_FAILURE
295
+#        else
296
+#          $echo "$modename: using $tagname tagged configuration"
297
+	fi
298
+	;;
299
+      esac
300
+    fi
301
+}
302
+
303
+
304
+# func_extract_an_archive dir oldlib
305
+func_extract_an_archive ()
306
+{
307
+    f_ex_an_ar_dir="$1"; shift
308
+    f_ex_an_ar_oldlib="$1"
309
+
310
+    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
311
+    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
312
+    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
313
+     :
314
+    else
315
+      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
316
+      exit $EXIT_FAILURE
317
+    fi
318
+}
319
+
320
+# func_extract_archives gentop oldlib ...
321
+func_extract_archives ()
322
+{
323
+    my_gentop="$1"; shift
324
+    my_oldlibs=${1+"$@"}
325
+    my_oldobjs=""
326
+    my_xlib=""
327
+    my_xabs=""
328
+    my_xdir=""
329
+    my_status=""
330
+
331
+    $show "${rm}r $my_gentop"
332
+    $run ${rm}r "$my_gentop"
333
+    $show "$mkdir $my_gentop"
334
+    $run $mkdir "$my_gentop"
335
+    my_status=$?
336
+    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
337
+      exit $my_status
338
+    fi
339
+
340
+    for my_xlib in $my_oldlibs; do
341
+      # Extract the objects.
342
+      case $my_xlib in
343
+	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
344
+	*) my_xabs=`pwd`"/$my_xlib" ;;
345
+      esac
346
+      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
347
+      my_xlib_u=$my_xlib
348
+      while :; do
349
+        case " $extracted_archives " in
350
+	*" $my_xlib_u "*)
351
+	  extracted_serial=`expr $extracted_serial + 1`
352
+	  my_xlib_u=lt$extracted_serial-$my_xlib ;;
353
+	*) break ;;
354
+	esac
355
+      done
356
+      extracted_archives="$extracted_archives $my_xlib_u"
357
+      my_xdir="$my_gentop/$my_xlib_u"
358
+
359
+      $show "${rm}r $my_xdir"
360
+      $run ${rm}r "$my_xdir"
361
+      $show "$mkdir $my_xdir"
362
+      $run $mkdir "$my_xdir"
363
+      exit_status=$?
364
+      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
365
+	exit $exit_status
366
+      fi
367
+      case $host in
368
+      *-darwin*)
369
+	$show "Extracting $my_xabs"
370
+	# Do not bother doing anything if just a dry run
371
+	if test -z "$run"; then
372
+	  darwin_orig_dir=`pwd`
373
+	  cd $my_xdir || exit $?
374
+	  darwin_archive=$my_xabs
375
+	  darwin_curdir=`pwd`
376
+	  darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
377
+	  darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
378
+	  if test -n "$darwin_arches"; then 
379
+	    darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
380
+	    darwin_arch=
381
+	    $show "$darwin_base_archive has multiple architectures $darwin_arches"
382
+	    for darwin_arch in  $darwin_arches ; do
383
+	      mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
384
+	      lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
385
+	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
386
+	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
387
+	      cd "$darwin_curdir"
388
+	      $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
389
+	    done # $darwin_arches
390
+      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
391
+	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
392
+	    darwin_file=
393
+	    darwin_files=
394
+	    for darwin_file in $darwin_filelist; do
395
+	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
396
+	      lipo -create -output "$darwin_file" $darwin_files
397
+	    done # $darwin_filelist
398
+	    ${rm}r unfat-$$
399
+	    cd "$darwin_orig_dir"
400
+	  else
401
+	    cd "$darwin_orig_dir"
402
+ 	    func_extract_an_archive "$my_xdir" "$my_xabs"
403
+	  fi # $darwin_arches
404
+	fi # $run
405
+	;;
406
+      *)
407
+        func_extract_an_archive "$my_xdir" "$my_xabs"
408
+        ;;
409
+      esac
410
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
411
+    done
412
+    func_extract_archives_result="$my_oldobjs"
413
+}
414
+# End of Shell function definitions
415
+#####################################
416
+
417
+# Darwin sucks
418
+eval std_shrext=\"$shrext_cmds\"
419
+
420
+disable_libs=no
421
+
422
+# Parse our command line options once, thoroughly.
423
+while test "$#" -gt 0
424
+do
425
+  arg="$1"
426
+  shift
427
+
428
+  case $arg in
429
+  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
430
+  *) optarg= ;;
431
+  esac
432
+
433
+  # If the previous option needs an argument, assign it.
434
+  if test -n "$prev"; then
435
+    case $prev in
436
+    execute_dlfiles)
437
+      execute_dlfiles="$execute_dlfiles $arg"
438
+      ;;
439
+    tag)
440
+      tagname="$arg"
441
+      preserve_args="${preserve_args}=$arg"
442
+
443
+      # Check whether tagname contains only valid characters
444
+      case $tagname in
445
+      *[!-_A-Za-z0-9,/]*)
446
+	$echo "$progname: invalid tag name: $tagname" 1>&2
447
+	exit $EXIT_FAILURE
448
+	;;
449
+      esac
450
+
451
+      case $tagname in
452
+      CC)
453
+	# Don't test for the "default" C tag, as we know, it's there, but
454
+	# not specially marked.
455
+	;;
456
+      *)
457
+	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
458
+	  taglist="$taglist $tagname"
459
+	  # Evaluate the configuration.
460
+	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
461
+	else
462
+	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
463
+	fi
464
+	;;
465
+      esac
466
+      ;;
467
+    *)
468
+      eval "$prev=\$arg"
469
+      ;;
470
+    esac
471
+
472
+    prev=
473
+    prevopt=
474
+    continue
475
+  fi
476
+
477
+  # Have we seen a non-optional argument yet?
478
+  case $arg in
479
+  --help)
480
+    show_help=yes
481
+    ;;
482
+
483
+  --version)
484
+    echo "\
485
+$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
486
+
487
+Copyright (C) 2007  Free Software Foundation, Inc.
488
+This is free software; see the source for copying conditions.  There is NO
489
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
490
+    exit $?
491
+    ;;
492
+
493
+  --config)
494
+    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
495
+    # Now print the configurations for the tags.
496
+    for tagname in $taglist; do
497
+      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
498
+    done
499
+    exit $?
500
+    ;;
501
+
502
+  --debug)
503
+    $echo "$progname: enabling shell trace mode"
504
+    set -x
505
+    preserve_args="$preserve_args $arg"
506
+    ;;
507
+
508
+  --dry-run | -n)
509
+    run=:
510
+    ;;
511
+
512
+  --features)
513
+    $echo "host: $host"
514
+    if test "$build_libtool_libs" = yes; then
515
+      $echo "enable shared libraries"
516
+    else
517
+      $echo "disable shared libraries"
518
+    fi
519
+    if test "$build_old_libs" = yes; then
520
+      $echo "enable static libraries"
521
+    else
522
+      $echo "disable static libraries"
523
+    fi
524
+    exit $?
525
+    ;;
526
+
527
+  --finish) mode="finish" ;;
528
+
529
+  --mode) prevopt="--mode" prev=mode ;;
530
+  --mode=*) mode="$optarg" ;;
531
+
532
+  --preserve-dup-deps) duplicate_deps="yes" ;;
533
+
534
+  --quiet | --silent)
535
+    show=:
536
+    preserve_args="$preserve_args $arg"
537
+    ;;
538
+
539
+  --tag)
540
+    prevopt="--tag"
541
+    prev=tag
542
+    preserve_args="$preserve_args --tag"
543
+    ;;
544
+  --tag=*)
545
+    set tag "$optarg" ${1+"$@"}
546
+    shift
547
+    prev=tag
548
+    preserve_args="$preserve_args --tag"
549
+    ;;
550
+
551
+  -dlopen)
552
+    prevopt="-dlopen"
553
+    prev=execute_dlfiles
554
+    ;;
555
+
556
+  -*)
557
+    $echo "$modename: unrecognized option \`$arg'" 1>&2
558
+    $echo "$help" 1>&2
559
+    exit $EXIT_FAILURE
560
+    ;;
561
+
562
+  *)
563
+    nonopt="$arg"
564
+    break
565
+    ;;
566
+  esac
567
+done
568
+
569
+if test -n "$prevopt"; then
570
+  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
571
+  $echo "$help" 1>&2
572
+  exit $EXIT_FAILURE
573
+fi
574
+
575
+case $disable_libs in
576
+no) 
577
+  ;;
578
+shared)
579
+  build_libtool_libs=no
580
+  build_old_libs=yes
581
+  ;;
582
+static)
583
+  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
584
+  ;;
585
+esac
586
+
587
+# If this variable is set in any of the actions, the command in it
588
+# will be execed at the end.  This prevents here-documents from being
589
+# left over by shells.
590
+exec_cmd=
591
+
592
+if test -z "$show_help"; then
593
+
594
+  # Infer the operation mode.
595
+  if test -z "$mode"; then
596
+    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
597
+    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
598
+    case $nonopt in
599
+    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
600
+      mode=link
601
+      for arg
602
+      do
603
+	case $arg in
604
+	-c)
605
+	   mode=compile
606
+	   break
607
+	   ;;
608
+	esac
609
+      done
610
+      ;;
611
+    *db | *dbx | *strace | *truss)
612
+      mode=execute
613
+      ;;
614
+    *install*|cp|mv)
615
+      mode=install
616
+      ;;
617
+    *rm)
618
+      mode=uninstall
619
+      ;;
620
+    *)
621
+      # If we have no mode, but dlfiles were specified, then do execute mode.
622
+      test -n "$execute_dlfiles" && mode=execute
623
+
624
+      # Just use the default operation mode.
625
+      if test -z "$mode"; then
626
+	if test -n "$nonopt"; then
627
+	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
628
+	else
629
+	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
630
+	fi
631
+      fi
632
+      ;;
633
+    esac
634
+  fi
635
+
636
+  # Only execute mode is allowed to have -dlopen flags.
637
+  if test -n "$execute_dlfiles" && test "$mode" != execute; then
638
+    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
639
+    $echo "$help" 1>&2
640
+    exit $EXIT_FAILURE
641
+  fi
642
+
643
+  # Change the help message to a mode-specific one.
644
+  generic_help="$help"
645
+  help="Try \`$modename --help --mode=$mode' for more information."
646
+
647
+  # These modes are in order of execution frequency so that they run quickly.
648
+  case $mode in
649
+  # libtool compile mode
650
+  compile)
651
+    modename="$modename: compile"
652
+    # Get the compilation command and the source file.
653
+    base_compile=
654
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
655
+    suppress_opt=yes
656
+    suppress_output=
657
+    arg_mode=normal
658
+    libobj=
659
+    later=
660
+
661
+    for arg
662
+    do
663
+      case $arg_mode in
664
+      arg  )
665
+	# do not "continue".  Instead, add this to base_compile
666
+	lastarg="$arg"
667
+	arg_mode=normal
668
+	;;
669
+
670
+      target )
671
+	libobj="$arg"
672
+	arg_mode=normal
673
+	continue
674
+	;;
675
+
676
+      normal )
677
+	# Accept any command-line options.
678
+	case $arg in
679
+	-o)
680
+	  if test -n "$libobj" ; then
681
+	    $echo "$modename: you cannot specify \`-o' more than once" 1>&2
682
+	    exit $EXIT_FAILURE
683
+	  fi
684
+	  arg_mode=target
685
+	  continue
686
+	  ;;
687
+
688
+	-static | -prefer-pic | -prefer-non-pic)
689
+	  later="$later $arg"
690
+	  continue
691
+	  ;;
692
+
693
+	-no-suppress)
694
+	  suppress_opt=no
695
+	  continue
696
+	  ;;
697
+
698
+	-Xcompiler)
699
+	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
700
+	  continue      #  The current "srcfile" will either be retained or
701
+	  ;;            #  replaced later.  I would guess that would be a bug.
702
+
703
+	-Wc,*)
704
+	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
705
+	  lastarg=
706
+	  save_ifs="$IFS"; IFS=','
707
+ 	  for arg in $args; do
708
+	    IFS="$save_ifs"
709
+
710
+	    # Double-quote args containing other shell metacharacters.
711
+	    # Many Bourne shells cannot handle close brackets correctly
712
+	    # in scan sets, so we specify it separately.
713
+	    case $arg in
714
+	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
715
+	      arg="\"$arg\""
716
+	      ;;
717
+	    esac
718
+	    lastarg="$lastarg $arg"
719
+	  done
720
+	  IFS="$save_ifs"
721
+	  lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
722
+
723
+	  # Add the arguments to base_compile.
724
+	  base_compile="$base_compile $lastarg"
725
+	  continue
726
+	  ;;
727
+
728
+	* )
729
+	  # Accept the current argument as the source file.
730
+	  # The previous "srcfile" becomes the current argument.
731
+	  #
732
+	  lastarg="$srcfile"
733
+	  srcfile="$arg"
734
+	  ;;
735
+	esac  #  case $arg
736
+	;;
737
+      esac    #  case $arg_mode
738
+
739
+      # Aesthetically quote the previous argument.
740
+      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
741
+
742
+      case $lastarg in
743
+      # Double-quote args containing other shell metacharacters.
744
+      # Many Bourne shells cannot handle close brackets correctly
745
+      # in scan sets, and some SunOS ksh mistreat backslash-escaping
746
+      # in scan sets (worked around with variable expansion),
747
+      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
748
+      # at all, so we specify them separately.
749
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
750
+	lastarg="\"$lastarg\""
751
+	;;
752
+      esac
753
+
754
+      base_compile="$base_compile $lastarg"
755
+    done # for arg
756
+
757
+    case $arg_mode in
758
+    arg)
759
+      $echo "$modename: you must specify an argument for -Xcompile"
760
+      exit $EXIT_FAILURE
761
+      ;;
762
+    target)
763
+      $echo "$modename: you must specify a target with \`-o'" 1>&2
764
+      exit $EXIT_FAILURE
765
+      ;;
766
+    *)
767
+      # Get the name of the library object.
768
+      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
769
+      ;;
770
+    esac
771
+
772
+    # Recognize several different file suffixes.
773
+    # If the user specifies -o file.o, it is replaced with file.lo
774
+    xform='[cCFSifmso]'
775
+    case $libobj in
776
+    *.ada) xform=ada ;;
777
+    *.adb) xform=adb ;;
778
+    *.ads) xform=ads ;;
779
+    *.asm) xform=asm ;;
780
+    *.c++) xform=c++ ;;
781
+    *.cc) xform=cc ;;
782
+    *.ii) xform=ii ;;
783
+    *.class) xform=class ;;
784
+    *.cpp) xform=cpp ;;
785
+    *.cxx) xform=cxx ;;
786
+    *.[fF][09]?) xform=[fF][09]. ;;
787
+    *.for) xform=for ;;
788
+    *.java) xform=java ;;
789
+    *.obj) xform=obj ;;
790
+    esac
791
+
792
+    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
793
+
794
+    case $libobj in
795
+    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
796
+    *)
797
+      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
798
+      exit $EXIT_FAILURE
799
+      ;;
800
+    esac
801
+
802
+    func_infer_tag $base_compile
803
+
804
+    for arg in $later; do
805
+      case $arg in
806
+      -static)
807
+	build_old_libs=yes
808
+	continue
809
+	;;
810
+
811
+      -prefer-pic)
812
+	pic_mode=yes
813
+	continue
814
+	;;
815
+
816
+      -prefer-non-pic)
817
+	pic_mode=no
818
+	continue
819
+	;;
820
+      esac
821
+    done
822
+
823
+    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
824
+    case $qlibobj in
825
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
826
+	qlibobj="\"$qlibobj\"" ;;
827
+    esac
828
+    test "X$libobj" != "X$qlibobj" \
829
+	&& $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' 	&()|`$[]' \
830
+	&& $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
831
+    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
832
+    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
833
+    if test "X$xdir" = "X$obj"; then
834
+      xdir=
835
+    else
836
+      xdir=$xdir/
837
+    fi
838
+    lobj=${xdir}$objdir/$objname
839
+
840
+    if test -z "$base_compile"; then
841
+      $echo "$modename: you must specify a compilation command" 1>&2
842
+      $echo "$help" 1>&2
843
+      exit $EXIT_FAILURE
844
+    fi
845
+
846
+    # Delete any leftover library objects.
847
+    if test "$build_old_libs" = yes; then
848
+      removelist="$obj $lobj $libobj ${libobj}T"
849
+    else
850
+      removelist="$lobj $libobj ${libobj}T"
851
+    fi
852
+
853
+    $run $rm $removelist
854
+    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
855
+
856
+    # On Cygwin there's no "real" PIC flag so we must build both object types
857
+    case $host_os in
858
+    cygwin* | mingw* | pw32* | os2*)
859
+      pic_mode=default
860
+      ;;
861
+    esac
862
+    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
863
+      # non-PIC code in shared libraries is not supported
864
+      pic_mode=default
865
+    fi
866
+
867
+    # Calculate the filename of the output object if compiler does
868
+    # not support -o with -c
869
+    if test "$compiler_c_o" = no; then
870
+      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
871
+      lockfile="$output_obj.lock"
872
+      removelist="$removelist $output_obj $lockfile"
873
+      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
874
+    else
875
+      output_obj=
876
+      need_locks=no
877
+      lockfile=
878
+    fi
879
+
880
+    # Lock this critical section if it is needed
881
+    # We use this script file to make the link, it avoids creating a new file
882
+    if test "$need_locks" = yes; then
883
+      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
884
+	$show "Waiting for $lockfile to be removed"
885
+	sleep 2
886
+      done
887
+    elif test "$need_locks" = warn; then
888
+      if test -f "$lockfile"; then
889
+	$echo "\
890
+*** ERROR, $lockfile exists and contains:
891
+`cat $lockfile 2>/dev/null`
892
+
893
+This indicates that another process is trying to use the same
894
+temporary object file, and libtool could not work around it because
895
+your compiler does not support \`-c' and \`-o' together.  If you
896
+repeat this compilation, it may succeed, by chance, but you had better
897
+avoid parallel builds (make -j) in this platform, or get a better
898
+compiler."
899
+
900
+	$run $rm $removelist
901
+	exit $EXIT_FAILURE
902
+      fi
903
+      $echo "$srcfile" > "$lockfile"
904
+    fi
905
+
906
+    if test -n "$fix_srcfile_path"; then
907
+      eval srcfile=\"$fix_srcfile_path\"
908
+    fi
909
+    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
910
+    case $qsrcfile in
911
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
912
+      qsrcfile="\"$qsrcfile\"" ;;
913
+    esac
914
+
915
+    $run $rm "$libobj" "${libobj}T"
916
+
917
+    # Create a libtool object file (analogous to a ".la" file),
918
+    # but don't create it if we're doing a dry run.
919
+    test -z "$run" && cat > ${libobj}T <<EOF
920
+# $libobj - a libtool object file
921
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
922
+#
923
+# Please DO NOT delete this file!
924
+# It is necessary for linking the library.
925
+
926
+# Name of the PIC object.
927
+EOF
928
+
929
+    # Only build a PIC object if we are building libtool libraries.
930
+    if test "$build_libtool_libs" = yes; then
931
+      # Without this assignment, base_compile gets emptied.
932
+      fbsd_hideous_sh_bug=$base_compile
933
+
934
+      if test "$pic_mode" != no; then
935
+	command="$base_compile $qsrcfile $pic_flag"
936
+      else
937
+	# Don't build PIC code
938
+	command="$base_compile $qsrcfile"
939
+      fi
940
+
941
+      if test ! -d "${xdir}$objdir"; then
942
+	$show "$mkdir ${xdir}$objdir"
943
+	$run $mkdir ${xdir}$objdir
944
+	exit_status=$?
945
+	if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
946
+	  exit $exit_status
947
+	fi
948
+      fi
949
+
950
+      if test -z "$output_obj"; then
951
+	# Place PIC objects in $objdir
952
+	command="$command -o $lobj"
953
+      fi
954
+
955
+      $run $rm "$lobj" "$output_obj"
956
+
957
+      $show "$command"
958
+      if $run eval "$command"; then :
959
+      else
960
+	test -n "$output_obj" && $run $rm $removelist
961
+	exit $EXIT_FAILURE
962
+      fi
963
+
964
+      if test "$need_locks" = warn &&
965
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
966
+	$echo "\
967
+*** ERROR, $lockfile contains:
968
+`cat $lockfile 2>/dev/null`
969
+
970
+but it should contain:
971
+$srcfile
972
+
973
+This indicates that another process is trying to use the same
974
+temporary object file, and libtool could not work around it because
975
+your compiler does not support \`-c' and \`-o' together.  If you
976
+repeat this compilation, it may succeed, by chance, but you had better
977
+avoid parallel builds (make -j) in this platform, or get a better
978
+compiler."
979
+
980
+	$run $rm $removelist
981
+	exit $EXIT_FAILURE
982
+      fi
983
+
984
+      # Just move the object if needed, then go on to compile the next one
985
+      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
986
+	$show "$mv $output_obj $lobj"
987
+	if $run $mv $output_obj $lobj; then :
988
+	else
989
+	  error=$?
990
+	  $run $rm $removelist
991
+	  exit $error
992
+	fi
993
+      fi
994
+
995
+      # Append the name of the PIC object to the libtool object file.
996
+      test -z "$run" && cat >> ${libobj}T <<EOF
997
+pic_object='$objdir/$objname'
998
+
999
+EOF
1000
+
1001
+      # Allow error messages only from the first compilation.
1002
+      if test "$suppress_opt" = yes; then
1003
+        suppress_output=' >/dev/null 2>&1'
1004
+      fi
1005
+    else
1006
+      # No PIC object so indicate it doesn't exist in the libtool
1007
+      # object file.
1008
+      test -z "$run" && cat >> ${libobj}T <<EOF
1009
+pic_object=none
1010
+
1011
+EOF
1012
+    fi
1013
+
1014
+    # Only build a position-dependent object if we build old libraries.
1015
+    if test "$build_old_libs" = yes; then
1016
+      if test "$pic_mode" != yes; then
1017
+	# Don't build PIC code
1018
+	command="$base_compile $qsrcfile"
1019
+      else
1020
+	command="$base_compile $qsrcfile $pic_flag"
1021
+      fi
1022
+      if test "$compiler_c_o" = yes; then
1023
+	command="$command -o $obj"
1024
+      fi
1025
+
1026
+      # Suppress compiler output if we already did a PIC compilation.
1027
+      command="$command$suppress_output"
1028
+      $run $rm "$obj" "$output_obj"
1029
+      $show "$command"
1030
+      if $run eval "$command"; then :
1031
+      else
1032
+	$run $rm $removelist
1033
+	exit $EXIT_FAILURE
1034
+      fi
1035
+
1036
+      if test "$need_locks" = warn &&
1037
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1038
+	$echo "\
1039
+*** ERROR, $lockfile contains:
1040
+`cat $lockfile 2>/dev/null`
1041
+
1042
+but it should contain:
1043
+$srcfile
1044
+
1045
+This indicates that another process is trying to use the same
1046
+temporary object file, and libtool could not work around it because
1047
+your compiler does not support \`-c' and \`-o' together.  If you
1048
+repeat this compilation, it may succeed, by chance, but you had better
1049
+avoid parallel builds (make -j) in this platform, or get a better
1050
+compiler."
1051
+
1052
+	$run $rm $removelist
1053
+	exit $EXIT_FAILURE
1054
+      fi
1055
+
1056
+      # Just move the object if needed
1057
+      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1058
+	$show "$mv $output_obj $obj"
1059
+	if $run $mv $output_obj $obj; then :
1060
+	else
1061
+	  error=$?
1062
+	  $run $rm $removelist
1063
+	  exit $error
1064
+	fi
1065
+      fi
1066
+
1067
+      # Append the name of the non-PIC object the libtool object file.
1068
+      # Only append if the libtool object file exists.
1069
+      test -z "$run" && cat >> ${libobj}T <<EOF
1070
+# Name of the non-PIC object.
1071
+non_pic_object='$objname'
1072
+
1073
+EOF
1074
+    else
1075
+      # Append the name of the non-PIC object the libtool object file.
1076
+      # Only append if the libtool object file exists.
1077
+      test -z "$run" && cat >> ${libobj}T <<EOF
1078
+# Name of the non-PIC object.
1079
+non_pic_object=none
1080
+
1081
+EOF
1082
+    fi
1083
+
1084
+    $run $mv "${libobj}T" "${libobj}"
1085
+
1086
+    # Unlock the critical section if it was locked
1087
+    if test "$need_locks" != no; then
1088
+      $run $rm "$lockfile"
1089
+    fi
1090
+
1091
+    exit $EXIT_SUCCESS
1092
+    ;;
1093
+
1094
+  # libtool link mode
1095
+  link | relink)
1096
+    modename="$modename: link"
1097
+    case $host in
1098
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1099
+      # It is impossible to link a dll without this setting, and
1100
+      # we shouldn't force the makefile maintainer to figure out
1101
+      # which system we are compiling for in order to pass an extra
1102
+      # flag for every libtool invocation.
1103
+      # allow_undefined=no
1104
+
1105
+      # FIXME: Unfortunately, there are problems with the above when trying
1106
+      # to make a dll which has undefined symbols, in which case not
1107
+      # even a static library is built.  For now, we need to specify
1108
+      # -no-undefined on the libtool link line when we can be certain
1109
+      # that all symbols are satisfied, otherwise we get a static library.
1110
+      allow_undefined=yes
1111
+      ;;
1112
+    *)
1113
+      allow_undefined=yes
1114
+      ;;
1115
+    esac
1116
+    libtool_args="$nonopt"
1117
+    base_compile="$nonopt $@"
1118
+    compile_command="$nonopt"
1119
+    finalize_command="$nonopt"
1120
+
1121
+    compile_rpath=
1122
+    finalize_rpath=
1123
+    compile_shlibpath=
1124
+    finalize_shlibpath=
1125
+    convenience=
1126
+    old_convenience=
1127
+    deplibs=
1128
+    old_deplibs=
1129
+    compiler_flags=
1130
+    linker_flags=
1131
+    dllsearchpath=
1132
+    lib_search_path=`pwd`
1133
+    inst_prefix_dir=
1134
+
1135
+    avoid_version=no
1136
+    dlfiles=
1137
+    dlprefiles=
1138
+    dlself=no
1139
+    export_dynamic=no
1140
+    export_symbols=
1141
+    export_symbols_regex=
1142
+    generated=
1143
+    libobjs=
1144
+    ltlibs=
1145
+    module=no
1146
+    no_install=no
1147
+    objs=
1148
+    non_pic_objects=
1149
+    notinst_path= # paths that contain not-installed libtool libraries
1150
+    precious_files_regex=
1151
+    prefer_static_libs=no
1152
+    preload=no
1153
+    prev=
1154
+    prevarg=
1155
+    release=
1156
+    rpath=
1157
+    xrpath=
1158
+    perm_rpath=
1159
+    temp_rpath=
1160
+    thread_safe=no
1161
+    vinfo=
1162
+    vinfo_number=no
1163
+
1164
+    func_infer_tag $base_compile
1165
+
1166
+    # We need to know -static, to get the right output filenames.
1167
+    for arg
1168
+    do
1169
+      case $arg in
1170
+      -all-static | -static | -static-libtool-libs)
1171
+	case $arg in
1172
+	-all-static)
1173
+	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1174
+	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1175
+	  fi
1176
+	  if test -n "$link_static_flag"; then
1177
+	    dlopen_self=$dlopen_self_static
1178
+	  fi
1179
+	  prefer_static_libs=yes
1180
+	  ;;
1181
+	-static)
1182
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
1183
+	    dlopen_self=$dlopen_self_static
1184
+	  fi
1185
+	  prefer_static_libs=built
1186
+	  ;;
1187
+	-static-libtool-libs)
1188
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
1189
+	    dlopen_self=$dlopen_self_static
1190
+	  fi
1191
+	  prefer_static_libs=yes
1192
+	  ;;
1193
+	esac
1194
+	build_libtool_libs=no
1195
+	build_old_libs=yes
1196
+	break
1197
+	;;
1198
+      esac
1199
+    done
1200
+
1201
+    # See if our shared archives depend on static archives.
1202
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
1203
+
1204
+    # Go through the arguments, transforming them on the way.
1205
+    while test "$#" -gt 0; do
1206
+      arg="$1"
1207
+      shift
1208
+      case $arg in
1209
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
1210
+	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1211
+	;;
1212
+      *) qarg=$arg ;;
1213
+      esac
1214
+      libtool_args="$libtool_args $qarg"
1215
+
1216
+      # If the previous option needs an argument, assign it.
1217
+      if test -n "$prev"; then
1218
+	case $prev in
1219
+	output)
1220
+	  compile_command="$compile_command @OUTPUT@"
1221
+	  finalize_command="$finalize_command @OUTPUT@"
1222
+	  ;;
1223
+	esac
1224
+
1225
+	case $prev in
1226
+	dlfiles|dlprefiles)
1227
+	  if test "$preload" = no; then
1228
+	    # Add the symbol object into the linking commands.
1229
+	    compile_command="$compile_command @SYMFILE@"
1230
+	    finalize_command="$finalize_command @SYMFILE@"
1231
+	    preload=yes
1232
+	  fi
1233
+	  case $arg in
1234
+	  *.la | *.lo) ;;  # We handle these cases below.
1235
+	  force)
1236
+	    if test "$dlself" = no; then
1237
+	      dlself=needless
1238
+	      export_dynamic=yes
1239
+	    fi
1240
+	    prev=
1241
+	    continue
1242
+	    ;;
1243
+	  self)
1244
+	    if test "$prev" = dlprefiles; then
1245
+	      dlself=yes
1246
+	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
1247
+	      dlself=yes
1248
+	    else
1249
+	      dlself=needless
1250
+	      export_dynamic=yes
1251
+	    fi
1252
+	    prev=
1253
+	    continue
1254
+	    ;;
1255
+	  *)
1256
+	    if test "$prev" = dlfiles; then
1257
+	      dlfiles="$dlfiles $arg"
1258
+	    else
1259
+	      dlprefiles="$dlprefiles $arg"
1260
+	    fi
1261
+	    prev=
1262
+	    continue
1263
+	    ;;
1264
+	  esac
1265
+	  ;;
1266
+	expsyms)
1267
+	  export_symbols="$arg"
1268
+	  if test ! -f "$arg"; then
1269
+	    $echo "$modename: symbol file \`$arg' does not exist"
1270
+	    exit $EXIT_FAILURE
1271
+	  fi
1272
+	  prev=
1273
+	  continue
1274
+	  ;;
1275
+	expsyms_regex)
1276
+	  export_symbols_regex="$arg"
1277
+	  prev=
1278
+	  continue
1279
+	  ;;
1280
+	inst_prefix)
1281
+	  inst_prefix_dir="$arg"
1282
+	  prev=
1283
+	  continue
1284
+	  ;;
1285
+	precious_regex)
1286
+	  precious_files_regex="$arg"
1287
+	  prev=
1288
+	  continue
1289
+	  ;;
1290
+	release)
1291
+	  release="-$arg"
1292
+	  prev=
1293
+	  continue
1294
+	  ;;
1295
+	objectlist)
1296
+	  if test -f "$arg"; then
1297
+	    save_arg=$arg
1298
+	    moreargs=
1299
+	    for fil in `cat $save_arg`
1300
+	    do
1301
+#	      moreargs="$moreargs $fil"
1302
+	      arg=$fil
1303
+	      # A libtool-controlled object.
1304
+
1305
+	      # Check to see that this really is a libtool object.
1306
+	      if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1307
+		pic_object=
1308
+		non_pic_object=
1309
+
1310
+		# Read the .lo file
1311
+		# If there is no directory component, then add one.
1312
+		case $arg in
1313
+		*/* | *\\*) . $arg ;;
1314
+		*) . ./$arg ;;
1315
+		esac
1316
+
1317
+		if test -z "$pic_object" || \
1318
+		   test -z "$non_pic_object" ||
1319
+		   test "$pic_object" = none && \
1320
+		   test "$non_pic_object" = none; then
1321
+		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1322
+		  exit $EXIT_FAILURE
1323
+		fi
1324
+
1325
+		# Extract subdirectory from the argument.
1326
+		xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1327
+		if test "X$xdir" = "X$arg"; then
1328
+		  xdir=
1329
+		else
1330
+		  xdir="$xdir/"
1331
+		fi
1332
+
1333
+		if test "$pic_object" != none; then
1334
+		  # Prepend the subdirectory the object is found in.
1335
+		  pic_object="$xdir$pic_object"
1336
+
1337
+		  if test "$prev" = dlfiles; then
1338
+		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1339
+		      dlfiles="$dlfiles $pic_object"
1340
+		      prev=
1341
+		      continue
1342
+		    else
1343
+		      # If libtool objects are unsupported, then we need to preload.
1344
+		      prev=dlprefiles
1345
+		    fi
1346
+		  fi
1347
+
1348
+		  # CHECK ME:  I think I busted this.  -Ossama
1349
+		  if test "$prev" = dlprefiles; then
1350
+		    # Preload the old-style object.
1351
+		    dlprefiles="$dlprefiles $pic_object"
1352
+		    prev=
1353
+		  fi
1354
+
1355
+		  # A PIC object.
1356
+		  libobjs="$libobjs $pic_object"
1357
+		  arg="$pic_object"
1358
+		fi
1359
+
1360
+		# Non-PIC object.
1361
+		if test "$non_pic_object" != none; then
1362
+		  # Prepend the subdirectory the object is found in.
1363
+		  non_pic_object="$xdir$non_pic_object"
1364
+
1365
+		  # A standard non-PIC object
1366
+		  non_pic_objects="$non_pic_objects $non_pic_object"
1367
+		  if test -z "$pic_object" || test "$pic_object" = none ; then
1368
+		    arg="$non_pic_object"
1369
+		  fi
1370
+		else
1371
+		  # If the PIC object exists, use it instead.
1372
+		  # $xdir was prepended to $pic_object above.
1373
+		  non_pic_object="$pic_object"
1374
+		  non_pic_objects="$non_pic_objects $non_pic_object"
1375
+		fi
1376
+	      else
1377
+		# Only an error if not doing a dry-run.
1378
+		if test -z "$run"; then
1379
+		  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1380
+		  exit $EXIT_FAILURE
1381
+		else
1382
+		  # Dry-run case.
1383
+
1384
+		  # Extract subdirectory from the argument.
1385
+		  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1386
+		  if test "X$xdir" = "X$arg"; then
1387
+		    xdir=
1388
+		  else
1389
+		    xdir="$xdir/"
1390
+		  fi
1391
+
1392
+		  pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1393
+		  non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1394
+		  libobjs="$libobjs $pic_object"
1395
+		  non_pic_objects="$non_pic_objects $non_pic_object"
1396
+		fi
1397
+	      fi
1398
+	    done
1399
+	  else
1400
+	    $echo "$modename: link input file \`$save_arg' does not exist"
1401
+	    exit $EXIT_FAILURE
1402
+	  fi
1403
+	  arg=$save_arg
1404
+	  prev=
1405
+	  continue
1406
+	  ;;
1407
+	rpath | xrpath)
1408
+	  # We need an absolute path.
1409
+	  case $arg in
1410
+	  [\\/]* | [A-Za-z]:[\\/]*) ;;
1411
+	  *)
1412
+	    $echo "$modename: only absolute run-paths are allowed" 1>&2
1413
+	    exit $EXIT_FAILURE
1414
+	    ;;
1415
+	  esac
1416
+	  if test "$prev" = rpath; then
1417
+	    case "$rpath " in
1418
+	    *" $arg "*) ;;
1419
+	    *) rpath="$rpath $arg" ;;
1420
+	    esac
1421
+	  else
1422
+	    case "$xrpath " in
1423
+	    *" $arg "*) ;;
1424
+	    *) xrpath="$xrpath $arg" ;;
1425
+	    esac
1426
+	  fi
1427
+	  prev=
1428
+	  continue
1429
+	  ;;
1430
+	xcompiler)
1431
+	  compiler_flags="$compiler_flags $qarg"
1432
+	  prev=
1433
+	  compile_command="$compile_command $qarg"
1434
+	  finalize_command="$finalize_command $qarg"
1435
+	  continue
1436
+	  ;;
1437
+	xlinker)
1438
+	  linker_flags="$linker_flags $qarg"
1439
+	  compiler_flags="$compiler_flags $wl$qarg"
1440
+	  prev=
1441
+	  compile_command="$compile_command $wl$qarg"
1442
+	  finalize_command="$finalize_command $wl$qarg"
1443
+	  continue
1444
+	  ;;
1445
+	xcclinker)
1446
+	  linker_flags="$linker_flags $qarg"
1447
+	  compiler_flags="$compiler_flags $qarg"
1448
+	  prev=
1449
+	  compile_command="$compile_command $qarg"
1450
+	  finalize_command="$finalize_command $qarg"
1451
+	  continue
1452
+	  ;;
1453
+	shrext)
1454
+  	  shrext_cmds="$arg"
1455
+	  prev=
1456
+	  continue
1457
+	  ;;
1458
+	darwin_framework|darwin_framework_skip)
1459
+	  test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
1460
+	  compile_command="$compile_command $arg"
1461
+	  finalize_command="$finalize_command $arg"
1462
+	  prev=
1463
+	  continue
1464
+	  ;;
1465
+	*)
1466
+	  eval "$prev=\"\$arg\""
1467
+	  prev=
1468
+	  continue
1469
+	  ;;
1470
+	esac
1471
+      fi # test -n "$prev"
1472
+
1473
+      prevarg="$arg"
1474
+
1475
+      case $arg in
1476
+      -all-static)
1477
+	if test -n "$link_static_flag"; then
1478
+	  compile_command="$compile_command $link_static_flag"
1479
+	  finalize_command="$finalize_command $link_static_flag"
1480
+	fi
1481
+	continue
1482
+	;;
1483
+
1484
+      -allow-undefined)
1485
+	# FIXME: remove this flag sometime in the future.
1486
+	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1487
+	continue
1488
+	;;
1489
+
1490
+      -avoid-version)
1491
+	avoid_version=yes
1492
+	continue
1493
+	;;
1494
+
1495
+      -dlopen)
1496
+	prev=dlfiles
1497
+	continue
1498
+	;;
1499
+
1500
+      -dlpreopen)
1501
+	prev=dlprefiles
1502
+	continue
1503
+	;;
1504
+
1505
+      -export-dynamic)
1506
+	export_dynamic=yes
1507
+	continue
1508
+	;;
1509
+
1510
+      -export-symbols | -export-symbols-regex)
1511
+	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1512
+	  $echo "$modename: more than one -exported-symbols argument is not allowed"
1513
+	  exit $EXIT_FAILURE
1514
+	fi
1515
+	if test "X$arg" = "X-export-symbols"; then
1516
+	  prev=expsyms
1517
+	else
1518
+	  prev=expsyms_regex
1519
+	fi
1520
+	continue
1521
+	;;
1522
+
1523
+      -framework|-arch|-isysroot)
1524
+	case " $CC " in
1525
+	  *" ${arg} ${1} "* | *" ${arg}	${1} "*) 
1526
+		prev=darwin_framework_skip ;;
1527
+	  *) compiler_flags="$compiler_flags $arg"
1528
+	     prev=darwin_framework ;;
1529
+	esac
1530
+	compile_command="$compile_command $arg"
1531
+	finalize_command="$finalize_command $arg"
1532
+	continue
1533
+	;;
1534
+
1535
+      -inst-prefix-dir)
1536
+	prev=inst_prefix
1537
+	continue
1538
+	;;
1539
+
1540
+      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1541
+      # so, if we see these flags be careful not to treat them like -L
1542
+      -L[A-Z][A-Z]*:*)
1543
+	case $with_gcc/$host in
1544
+	no/*-*-irix* | /*-*-irix*)
1545
+	  compile_command="$compile_command $arg"
1546
+	  finalize_command="$finalize_command $arg"
1547
+	  ;;
1548
+	esac
1549
+	continue
1550
+	;;
1551
+
1552
+      -L*)
1553
+	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1554
+	# We need an absolute path.
1555
+	case $dir in
1556
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
1557
+	*)
1558
+	  absdir=`cd "$dir" && pwd`
1559
+	  if test -z "$absdir"; then
1560
+	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1561
+	    absdir="$dir"
1562
+	    notinst_path="$notinst_path $dir"
1563
+	  fi
1564
+	  dir="$absdir"
1565
+	  ;;
1566
+	esac
1567
+	case "$deplibs " in
1568
+	*" -L$dir "*) ;;
1569
+	*)
1570
+	  deplibs="$deplibs -L$dir"
1571
+	  lib_search_path="$lib_search_path $dir"
1572
+	  ;;
1573
+	esac
1574
+	case $host in
1575
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1576
+	  testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
1577
+	  case :$dllsearchpath: in
1578
+	  *":$dir:"*) ;;
1579
+	  *) dllsearchpath="$dllsearchpath:$dir";;
1580
+	  esac
1581
+	  case :$dllsearchpath: in
1582
+	  *":$testbindir:"*) ;;
1583
+	  *) dllsearchpath="$dllsearchpath:$testbindir";;
1584
+	  esac
1585
+	  ;;
1586
+	esac
1587
+	continue
1588
+	;;
1589
+
1590
+      -l*)
1591
+	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
1592
+	  case $host in
1593
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
1594
+	    # These systems don't actually have a C or math library (as such)
1595
+	    continue
1596
+	    ;;
1597
+	  *-*-os2*)
1598
+	    # These systems don't actually have a C library (as such)
1599
+	    test "X$arg" = "X-lc" && continue
1600
+	    ;;
1601
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1602
+	    # Do not include libc due to us having libc/libc_r.
1603
+	    test "X$arg" = "X-lc" && continue
1604
+	    ;;
1605
+	  *-*-rhapsody* | *-*-darwin1.[012])
1606
+	    # Rhapsody C and math libraries are in the System framework
1607
+	    deplibs="$deplibs -framework System"
1608
+	    continue
1609
+	    ;;
1610
+	  *-*-sco3.2v5* | *-*-sco5v6*)
1611
+	    # Causes problems with __ctype
1612
+	    test "X$arg" = "X-lc" && continue
1613
+	    ;;
1614
+	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
1615
+	    # Compiler inserts libc in the correct place for threads to work
1616
+	    test "X$arg" = "X-lc" && continue
1617
+	    ;;
1618
+	  esac
1619
+	elif test "X$arg" = "X-lc_r"; then
1620
+	 case $host in
1621
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1622
+	   # Do not include libc_r directly, use -pthread flag.
1623
+	   continue
1624
+	   ;;
1625
+	 esac
1626
+	fi
1627
+	deplibs="$deplibs $arg"
1628
+	continue
1629
+	;;
1630
+
1631
+      # Tru64 UNIX uses -model [arg] to determine the layout of C++
1632
+      # classes, name mangling, and exception handling.
1633
+      -model)
1634
+	compile_command="$compile_command $arg"
1635
+	compiler_flags="$compiler_flags $arg"
1636
+	finalize_command="$finalize_command $arg"
1637
+	prev=xcompiler
1638
+	continue
1639
+	;;
1640
+
1641
+     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
1642
+	compiler_flags="$compiler_flags $arg"
1643
+	compile_command="$compile_command $arg"
1644
+	finalize_command="$finalize_command $arg"
1645
+	continue
1646
+	;;
1647
+
1648
+      -module)
1649
+	module=yes
1650
+	continue
1651
+	;;
1652
+
1653
+      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
1654
+      # -r[0-9][0-9]* specifies the processor on the SGI compiler
1655
+      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
1656
+      # +DA*, +DD* enable 64-bit mode on the HP compiler
1657
+      # -q* pass through compiler args for the IBM compiler
1658
+      # -m* pass through architecture-specific compiler args for GCC
1659
+      # -m*, -t[45]*, -txscale* pass through architecture-specific
1660
+      # compiler args for GCC
1661
+      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
1662
+      # -F/path gives path to uninstalled frameworks, gcc on darwin
1663
+      # @file GCC response files
1664
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
1665
+      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
1666
+
1667
+	# Unknown arguments in both finalize_command and compile_command need
1668
+	# to be aesthetically quoted because they are evaled later.
1669
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1670
+	case $arg in
1671
+	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
1672
+	  arg="\"$arg\""
1673
+	  ;;
1674
+	esac
1675
+        compile_command="$compile_command $arg"
1676
+        finalize_command="$finalize_command $arg"
1677
+        compiler_flags="$compiler_flags $arg"
1678
+        continue
1679
+        ;;
1680
+
1681
+      -shrext)
1682
+	prev=shrext
1683
+	continue
1684
+	;;
1685
+
1686
+      -no-fast-install)
1687
+	fast_install=no
1688
+	continue
1689
+	;;
1690
+
1691
+      -no-install)
1692
+	case $host in
1693
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
1694
+	  # The PATH hackery in wrapper scripts is required on Windows
1695
+	  # and Darwin in order for the loader to find any dlls it needs.
1696
+	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1697
+	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1698
+	  fast_install=no
1699
+	  ;;
1700
+	*) no_install=yes ;;
1701
+	esac
1702
+	continue
1703
+	;;
1704
+
1705
+      -no-undefined)
1706
+	allow_undefined=no
1707
+	continue
1708
+	;;
1709
+
1710
+      -objectlist)
1711
+	prev=objectlist
1712
+	continue
1713
+	;;
1714
+
1715
+      -o) prev=output ;;
1716
+
1717
+      -precious-files-regex)
1718
+	prev=precious_regex
1719
+	continue
1720
+	;;
1721
+
1722
+      -release)
1723
+	prev=release
1724
+	continue
1725
+	;;
1726
+
1727
+      -rpath)
1728
+	prev=rpath
1729
+	continue
1730
+	;;
1731
+
1732
+      -R)
1733
+	prev=xrpath
1734
+	continue
1735
+	;;
1736
+
1737
+      -R*)
1738
+	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1739
+	# We need an absolute path.
1740
+	case $dir in
1741
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
1742
+	*)
1743
+	  $echo "$modename: only absolute run-paths are allowed" 1>&2
1744
+	  exit $EXIT_FAILURE
1745
+	  ;;
1746
+	esac
1747
+	case "$xrpath " in
1748
+	*" $dir "*) ;;
1749
+	*) xrpath="$xrpath $dir" ;;
1750
+	esac
1751
+	continue
1752
+	;;
1753
+
1754
+      -static | -static-libtool-libs)
1755
+	# The effects of -static are defined in a previous loop.
1756
+	# We used to do the same as -all-static on platforms that
1757
+	# didn't have a PIC flag, but the assumption that the effects
1758
+	# would be equivalent was wrong.  It would break on at least
1759
+	# Digital Unix and AIX.
1760
+	continue
1761
+	;;
1762
+
1763
+      -thread-safe)
1764
+	thread_safe=yes
1765
+	continue
1766
+	;;
1767
+
1768
+      -version-info)
1769
+	prev=vinfo
1770
+	continue
1771
+	;;
1772
+      -version-number)
1773
+	prev=vinfo
1774
+	vinfo_number=yes
1775
+	continue
1776
+	;;
1777
+
1778
+      -Wc,*)
1779
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1780
+	arg=
1781
+	save_ifs="$IFS"; IFS=','
1782
+	for flag in $args; do
1783
+	  IFS="$save_ifs"
1784
+	  case $flag in
1785
+	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
1786
+	    flag="\"$flag\""
1787
+	    ;;
1788
+	  esac
1789
+	  arg="$arg $wl$flag"
1790
+	  compiler_flags="$compiler_flags $flag"
1791
+	done
1792
+	IFS="$save_ifs"
1793
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1794
+	;;
1795
+
1796
+      -Wl,*)
1797
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1798
+	arg=
1799
+	save_ifs="$IFS"; IFS=','
1800
+	for flag in $args; do
1801
+	  IFS="$save_ifs"
1802
+	  case $flag in
1803
+	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
1804
+	    flag="\"$flag\""
1805
+	    ;;
1806
+	  esac
1807
+	  arg="$arg $wl$flag"
1808
+	  compiler_flags="$compiler_flags $wl$flag"
1809
+	  linker_flags="$linker_flags $flag"
1810
+	done
1811
+	IFS="$save_ifs"
1812
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1813
+	;;
1814
+
1815
+      -Xcompiler)
1816
+	prev=xcompiler
1817
+	continue
1818
+	;;
1819
+
1820
+      -Xlinker)
1821
+	prev=xlinker
1822
+	continue
1823
+	;;
1824
+
1825
+      -XCClinker)
1826
+	prev=xcclinker
1827
+	continue
1828
+	;;
1829
+
1830
+      # Some other compiler flag.
1831
+      -* | +*)
1832
+	# Unknown arguments in both finalize_command and compile_command need
1833
+	# to be aesthetically quoted because they are evaled later.
1834
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1835
+	case $arg in
1836
+	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
1837
+	  arg="\"$arg\""
1838
+	  ;;
1839
+	esac
1840
+	;;
1841
+
1842
+      *.$objext)
1843
+	# A standard object.
1844
+	objs="$objs $arg"
1845
+	;;
1846
+
1847
+      *.lo)
1848
+	# A libtool-controlled object.
1849
+
1850
+	# Check to see that this really is a libtool object.
1851
+	if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1852
+	  pic_object=
1853
+	  non_pic_object=
1854
+
1855
+	  # Read the .lo file
1856
+	  # If there is no directory component, then add one.
1857
+	  case $arg in
1858
+	  */* | *\\*) . $arg ;;
1859
+	  *) . ./$arg ;;
1860
+	  esac
1861
+
1862
+	  if test -z "$pic_object" || \
1863
+	     test -z "$non_pic_object" ||
1864
+	     test "$pic_object" = none && \
1865
+	     test "$non_pic_object" = none; then
1866
+	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1867
+	    exit $EXIT_FAILURE
1868
+	  fi
1869
+
1870
+	  # Extract subdirectory from the argument.
1871
+	  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1872
+	  if test "X$xdir" = "X$arg"; then
1873
+	    xdir=
1874
+ 	  else
1875
+	    xdir="$xdir/"
1876
+	  fi
1877
+
1878
+	  if test "$pic_object" != none; then
1879
+	    # Prepend the subdirectory the object is found in.
1880
+	    pic_object="$xdir$pic_object"
1881
+
1882
+	    if test "$prev" = dlfiles; then
1883
+	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1884
+		dlfiles="$dlfiles $pic_object"
1885
+		prev=
1886
+		continue
1887
+	      else
1888
+		# If libtool objects are unsupported, then we need to preload.
1889
+		prev=dlprefiles
1890
+	      fi
1891
+	    fi
1892
+
1893
+	    # CHECK ME:  I think I busted this.  -Ossama
1894
+	    if test "$prev" = dlprefiles; then
1895
+	      # Preload the old-style object.
1896
+	      dlprefiles="$dlprefiles $pic_object"
1897
+	      prev=
1898
+	    fi
1899
+
1900
+	    # A PIC object.
1901
+	    libobjs="$libobjs $pic_object"
1902
+	    arg="$pic_object"
1903
+	  fi
1904
+
1905
+	  # Non-PIC object.
1906
+	  if test "$non_pic_object" != none; then
1907
+	    # Prepend the subdirectory the object is found in.
1908
+	    non_pic_object="$xdir$non_pic_object"
1909
+
1910
+	    # A standard non-PIC object
1911
+	    non_pic_objects="$non_pic_objects $non_pic_object"
1912
+	    if test -z "$pic_object" || test "$pic_object" = none ; then
1913
+	      arg="$non_pic_object"
1914
+	    fi
1915
+	  else
1916
+	    # If the PIC object exists, use it instead.
1917
+	    # $xdir was prepended to $pic_object above.
1918
+	    non_pic_object="$pic_object"
1919
+	    non_pic_objects="$non_pic_objects $non_pic_object"
1920
+	  fi
1921
+	else
1922
+	  # Only an error if not doing a dry-run.
1923
+	  if test -z "$run"; then
1924
+	    $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1925
+	    exit $EXIT_FAILURE
1926
+	  else
1927
+	    # Dry-run case.
1928
+
1929
+	    # Extract subdirectory from the argument.
1930
+	    xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1931
+	    if test "X$xdir" = "X$arg"; then
1932
+	      xdir=
1933
+	    else
1934
+	      xdir="$xdir/"
1935
+	    fi
1936
+
1937
+	    pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1938
+	    non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1939
+	    libobjs="$libobjs $pic_object"
1940
+	    non_pic_objects="$non_pic_objects $non_pic_object"
1941
+	  fi
1942
+	fi
1943
+	;;
1944
+
1945
+      *.$libext)
1946
+	# An archive.
1947
+	deplibs="$deplibs $arg"
1948
+	old_deplibs="$old_deplibs $arg"
1949
+	continue
1950
+	;;
1951
+
1952
+      *.la)
1953
+	# A libtool-controlled library.
1954
+
1955
+	if test "$prev" = dlfiles; then
1956
+	  # This library was specified with -dlopen.
1957
+	  dlfiles="$dlfiles $arg"
1958
+	  prev=
1959
+	elif test "$prev" = dlprefiles; then
1960
+	  # The library was specified with -dlpreopen.
1961
+	  dlprefiles="$dlprefiles $arg"
1962
+	  prev=
1963
+	else
1964
+	  deplibs="$deplibs $arg"
1965
+	fi
1966
+	continue
1967
+	;;
1968
+
1969
+      # Some other compiler argument.
1970
+      *)
1971
+	# Unknown arguments in both finalize_command and compile_command need
1972
+	# to be aesthetically quoted because they are evaled later.
1973
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1974
+	case $arg in
1975
+	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
1976
+	  arg="\"$arg\""
1977
+	  ;;
1978
+	esac
1979
+	;;
1980
+      esac # arg
1981
+
1982
+      # Now actually substitute the argument into the commands.
1983
+      if test -n "$arg"; then
1984
+	compile_command="$compile_command $arg"
1985
+	finalize_command="$finalize_command $arg"
1986
+      fi
1987
+    done # argument parsing loop
1988
+
1989
+    if test -n "$prev"; then
1990
+      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
1991
+      $echo "$help" 1>&2
1992
+      exit $EXIT_FAILURE
1993
+    fi
1994
+
1995
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
1996
+      eval arg=\"$export_dynamic_flag_spec\"
1997
+      compile_command="$compile_command $arg"
1998
+      finalize_command="$finalize_command $arg"
1999
+    fi
2000
+
2001
+    oldlibs=
2002
+    # calculate the name of the file, without its directory
2003
+    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
2004
+    libobjs_save="$libobjs"
2005
+
2006
+    if test -n "$shlibpath_var"; then
2007
+      # get the directories listed in $shlibpath_var
2008
+      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
2009
+    else
2010
+      shlib_search_path=
2011
+    fi
2012
+    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
2013
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
2014
+
2015
+    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2016
+    if test "X$output_objdir" = "X$output"; then
2017
+      output_objdir="$objdir"
2018
+    else
2019
+      output_objdir="$output_objdir/$objdir"
2020
+    fi
2021
+    # Create the object directory.
2022
+    if test ! -d "$output_objdir"; then
2023
+      $show "$mkdir $output_objdir"
2024
+      $run $mkdir $output_objdir
2025
+      exit_status=$?
2026
+      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
2027
+	exit $exit_status
2028
+      fi
2029
+    fi
2030
+
2031
+    # Determine the type of output
2032
+    case $output in
2033
+    "")
2034
+      $echo "$modename: you must specify an output file" 1>&2
2035
+      $echo "$help" 1>&2
2036
+      exit $EXIT_FAILURE
2037
+      ;;
2038
+    *.$libext) linkmode=oldlib ;;
2039
+    *.lo | *.$objext) linkmode=obj ;;
2040
+    *.la) linkmode=lib ;;
2041
+    *) linkmode=prog ;; # Anything else should be a program.
2042
+    esac
2043
+
2044
+    case $host in
2045
+    *cygwin* | *mingw* | *pw32*)
2046
+      # don't eliminate duplications in $postdeps and $predeps
2047
+      duplicate_compiler_generated_deps=yes
2048
+      ;;
2049
+    *)
2050
+      duplicate_compiler_generated_deps=$duplicate_deps
2051
+      ;;
2052
+    esac
2053
+    specialdeplibs=
2054
+
2055
+    libs=
2056
+    # Find all interdependent deplibs by searching for libraries
2057
+    # that are linked more than once (e.g. -la -lb -la)
2058
+    for deplib in $deplibs; do
2059
+      if test "X$duplicate_deps" = "Xyes" ; then
2060
+	case "$libs " in
2061
+	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2062
+	esac
2063
+      fi
2064
+      libs="$libs $deplib"
2065
+    done
2066
+
2067
+    if test "$linkmode" = lib; then
2068
+      libs="$predeps $libs $compiler_lib_search_path $postdeps"
2069
+
2070
+      # Compute libraries that are listed more than once in $predeps
2071
+      # $postdeps and mark them as special (i.e., whose duplicates are
2072
+      # not to be eliminated).
2073
+      pre_post_deps=
2074
+      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2075
+	for pre_post_dep in $predeps $postdeps; do
2076
+	  case "$pre_post_deps " in
2077
+	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
2078
+	  esac
2079
+	  pre_post_deps="$pre_post_deps $pre_post_dep"
2080
+	done
2081
+      fi
2082
+      pre_post_deps=
2083
+    fi
2084
+
2085
+    deplibs=
2086
+    newdependency_libs=
2087
+    newlib_search_path=
2088
+    need_relink=no # whether we're linking any uninstalled libtool libraries
2089
+    notinst_deplibs= # not-installed libtool libraries
2090
+    case $linkmode in
2091
+    lib)
2092
+	passes="conv link"
2093
+	for file in $dlfiles $dlprefiles; do
2094
+	  case $file in
2095
+	  *.la) ;;
2096
+	  *)
2097
+	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2098
+	    exit $EXIT_FAILURE
2099
+	    ;;
2100
+	  esac
2101
+	done
2102
+	;;
2103
+    prog)
2104
+	compile_deplibs=
2105
+	finalize_deplibs=
2106
+	alldeplibs=no
2107
+	newdlfiles=
2108
+	newdlprefiles=
2109
+	passes="conv scan dlopen dlpreopen link"
2110
+	;;
2111
+    *)  passes="conv"
2112
+	;;
2113
+    esac
2114
+    for pass in $passes; do
2115
+      if test "$linkmode,$pass" = "lib,link" ||
2116
+	 test "$linkmode,$pass" = "prog,scan"; then
2117
+	libs="$deplibs"
2118
+	deplibs=
2119
+      fi
2120
+      if test "$linkmode" = prog; then
2121
+	case $pass in
2122
+	dlopen) libs="$dlfiles" ;;
2123
+	dlpreopen) libs="$dlprefiles" ;;
2124
+	link)
2125
+	  libs="$deplibs %DEPLIBS%"
2126
+	  test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
2127
+	  ;;
2128
+	esac
2129
+      fi
2130
+      if test "$pass" = dlopen; then
2131
+	# Collect dlpreopened libraries
2132
+	save_deplibs="$deplibs"
2133
+	deplibs=
2134
+      fi
2135
+      for deplib in $libs; do
2136
+	lib=
2137
+	found=no
2138
+	case $deplib in
2139
+	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
2140
+	  if test "$linkmode,$pass" = "prog,link"; then
2141
+	    compile_deplibs="$deplib $compile_deplibs"
2142
+	    finalize_deplibs="$deplib $finalize_deplibs"
2143
+	  else
2144
+	    compiler_flags="$compiler_flags $deplib"
2145
+	  fi
2146
+	  continue
2147
+	  ;;
2148
+	-l*)
2149
+	  if test "$linkmode" != lib && test "$linkmode" != prog; then
2150
+	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2151
+	    continue
2152
+	  fi
2153
+	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2154
+	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2155
+	    for search_ext in .la $std_shrext .so .a; do
2156
+	      # Search the libtool library
2157
+	      lib="$searchdir/lib${name}${search_ext}"
2158
+	      if test -f "$lib"; then
2159
+		if test "$search_ext" = ".la"; then
2160
+		  found=yes
2161
+		else
2162
+		  found=no
2163
+		fi
2164
+		break 2
2165
+	      fi
2166
+	    done
2167
+	  done
2168
+	  if test "$found" != yes; then
2169
+	    # deplib doesn't seem to be a libtool library
2170
+	    if test "$linkmode,$pass" = "prog,link"; then
2171
+	      compile_deplibs="$deplib $compile_deplibs"
2172
+	      finalize_deplibs="$deplib $finalize_deplibs"
2173
+	    else
2174
+	      deplibs="$deplib $deplibs"
2175
+	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2176
+	    fi
2177
+	    continue
2178
+	  else # deplib is a libtool library
2179
+	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2180
+	    # We need to do some special things here, and not later.
2181
+	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2182
+	      case " $predeps $postdeps " in
2183
+	      *" $deplib "*)
2184
+		if (${SED} -e '2q' $lib |
2185
+                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
2186
+		  library_names=
2187
+		  old_library=
2188
+		  case $lib in
2189
+		  */* | *\\*) . $lib ;;
2190
+		  *) . ./$lib ;;
2191
+		  esac
2192
+		  for l in $old_library $library_names; do
2193
+		    ll="$l"
2194
+		  done
2195
+		  if test "X$ll" = "X$old_library" ; then # only static version available
2196
+		    found=no
2197
+		    ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2198
+		    test "X$ladir" = "X$lib" && ladir="."
2199
+		    lib=$ladir/$old_library
2200
+		    if test "$linkmode,$pass" = "prog,link"; then
2201
+		      compile_deplibs="$deplib $compile_deplibs"
2202
+		      finalize_deplibs="$deplib $finalize_deplibs"
2203
+		    else
2204
+		      deplibs="$deplib $deplibs"
2205
+		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2206
+		    fi
2207
+		    continue
2208
+		  fi
2209
+		fi
2210
+	        ;;
2211
+	      *) ;;
2212
+	      esac
2213
+	    fi
2214
+	  fi
2215
+	  ;; # -l
2216
+	-L*)
2217
+	  case $linkmode in
2218
+	  lib)
2219
+	    deplibs="$deplib $deplibs"
2220
+	    test "$pass" = conv && continue
2221
+	    newdependency_libs="$deplib $newdependency_libs"
2222
+	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2223
+	    ;;
2224
+	  prog)
2225
+	    if test "$pass" = conv; then
2226
+	      deplibs="$deplib $deplibs"
2227
+	      continue
2228
+	    fi
2229
+	    if test "$pass" = scan; then
2230
+	      deplibs="$deplib $deplibs"
2231
+	    else
2232
+	      compile_deplibs="$deplib $compile_deplibs"
2233
+	      finalize_deplibs="$deplib $finalize_deplibs"
2234
+	    fi
2235
+	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2236
+	    ;;
2237
+	  *)
2238
+	    $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2239
+	    ;;
2240
+	  esac # linkmode
2241
+	  continue
2242
+	  ;; # -L
2243
+	-R*)
2244
+	  if test "$pass" = link; then
2245
+	    dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2246
+	    # Make sure the xrpath contains only unique directories.
2247
+	    case "$xrpath " in
2248
+	    *" $dir "*) ;;
2249
+	    *) xrpath="$xrpath $dir" ;;
2250
+	    esac
2251
+	  fi
2252
+	  deplibs="$deplib $deplibs"
2253
+	  continue
2254
+	  ;;
2255
+	*.la) lib="$deplib" ;;
2256
+	*.$libext)
2257
+	  if test "$pass" = conv; then
2258
+	    deplibs="$deplib $deplibs"
2259
+	    continue
2260
+	  fi
2261
+	  case $linkmode in
2262
+	  lib)
2263
+	    valid_a_lib=no
2264
+	    case $deplibs_check_method in
2265
+	      match_pattern*)
2266
+		set dummy $deplibs_check_method
2267
+	        match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2268
+		if eval $echo \"$deplib\" 2>/dev/null \
2269
+		    | $SED 10q \
2270
+		    | $EGREP "$match_pattern_regex" > /dev/null; then
2271
+		  valid_a_lib=yes
2272
+		fi
2273
+		;;
2274
+	      pass_all)
2275
+		valid_a_lib=yes
2276
+		;;
2277
+            esac
2278
+	    if test "$valid_a_lib" != yes; then
2279
+	      $echo
2280
+	      $echo "*** Warning: Trying to link with static lib archive $deplib."
2281
+	      $echo "*** I have the capability to make that library automatically link in when"
2282
+	      $echo "*** you link to this library.  But I can only do this if you have a"
2283
+	      $echo "*** shared version of the library, which you do not appear to have"
2284
+	      $echo "*** because the file extensions .$libext of this argument makes me believe"
2285
+	      $echo "*** that it is just a static archive that I should not used here."
2286
+	    else
2287
+	      $echo
2288
+	      $echo "*** Warning: Linking the shared library $output against the"
2289
+	      $echo "*** static library $deplib is not portable!"
2290
+	      deplibs="$deplib $deplibs"
2291
+	    fi
2292
+	    continue
2293
+	    ;;
2294
+	  prog)
2295
+	    if test "$pass" != link; then
2296
+	      deplibs="$deplib $deplibs"
2297
+	    else
2298
+	      compile_deplibs="$deplib $compile_deplibs"
2299
+	      finalize_deplibs="$deplib $finalize_deplibs"
2300
+	    fi
2301
+	    continue
2302
+	    ;;
2303
+	  esac # linkmode
2304
+	  ;; # *.$libext
2305
+	*.lo | *.$objext)
2306
+	  if test "$pass" = conv; then
2307
+	    deplibs="$deplib $deplibs"
2308
+	  elif test "$linkmode" = prog; then
2309
+	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
2310
+	      # If there is no dlopen support or we're linking statically,
2311
+	      # we need to preload.
2312
+	      newdlprefiles="$newdlprefiles $deplib"
2313
+	      compile_deplibs="$deplib $compile_deplibs"
2314
+	      finalize_deplibs="$deplib $finalize_deplibs"
2315
+	    else
2316
+	      newdlfiles="$newdlfiles $deplib"
2317
+	    fi
2318
+	  fi
2319
+	  continue
2320
+	  ;;
2321
+	%DEPLIBS%)
2322
+	  alldeplibs=yes
2323
+	  continue
2324
+	  ;;
2325
+	esac # case $deplib
2326
+	if test "$found" = yes || test -f "$lib"; then :
2327
+	else
2328
+	  $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
2329
+	  exit $EXIT_FAILURE
2330
+	fi
2331
+
2332
+	# Check to see that this really is a libtool archive.
2333
+	if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
2334
+	else
2335
+	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2336
+	  exit $EXIT_FAILURE
2337
+	fi
2338
+
2339
+	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2340
+	test "X$ladir" = "X$lib" && ladir="."
2341
+
2342
+	dlname=
2343
+	dlopen=
2344
+	dlpreopen=
2345
+	libdir=
2346
+	library_names=
2347
+	old_library=
2348
+	# If the library was installed with an old release of libtool,
2349
+	# it will not redefine variables installed, or shouldnotlink
2350
+	installed=yes
2351
+	shouldnotlink=no
2352
+	avoidtemprpath=
2353
+
2354
+
2355
+	# Read the .la file
2356
+	case $lib in
2357
+	*/* | *\\*) . $lib ;;
2358
+	*) . ./$lib ;;
2359
+	esac
2360
+
2361
+	if test "$linkmode,$pass" = "lib,link" ||
2362
+	   test "$linkmode,$pass" = "prog,scan" ||
2363
+	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
2364
+	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
2365
+	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
2366
+	fi
2367
+
2368
+	if test "$pass" = conv; then
2369
+	  # Only check for convenience libraries
2370
+	  deplibs="$lib $deplibs"
2371
+	  if test -z "$libdir"; then
2372
+	    if test -z "$old_library"; then
2373
+	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2374
+	      exit $EXIT_FAILURE
2375
+	    fi
2376
+	    # It is a libtool convenience library, so add in its objects.
2377
+	    convenience="$convenience $ladir/$objdir/$old_library"
2378
+	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
2379
+	    tmp_libs=
2380
+	    for deplib in $dependency_libs; do
2381
+	      deplibs="$deplib $deplibs"
2382
+              if test "X$duplicate_deps" = "Xyes" ; then
2383
+	        case "$tmp_libs " in
2384
+	        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2385
+	        esac
2386
+              fi
2387
+	      tmp_libs="$tmp_libs $deplib"
2388
+	    done
2389
+	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
2390
+	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
2391
+	    exit $EXIT_FAILURE
2392
+	  fi
2393
+	  continue
2394
+	fi # $pass = conv
2395
+
2396
+
2397
+	# Get the name of the library we link against.
2398
+	linklib=
2399
+	for l in $old_library $library_names; do
2400
+	  linklib="$l"
2401
+	done
2402
+	if test -z "$linklib"; then
2403
+	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2404
+	  exit $EXIT_FAILURE
2405
+	fi
2406
+
2407
+	# This library was specified with -dlopen.
2408
+	if test "$pass" = dlopen; then
2409
+	  if test -z "$libdir"; then
2410
+	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2411
+	    exit $EXIT_FAILURE
2412
+	  fi
2413
+	  if test -z "$dlname" ||
2414
+	     test "$dlopen_support" != yes ||
2415
+	     test "$build_libtool_libs" = no; then
2416
+	    # If there is no dlname, no dlopen support or we're linking
2417
+	    # statically, we need to preload.  We also need to preload any
2418
+	    # dependent libraries so libltdl's deplib preloader doesn't
2419
+	    # bomb out in the load deplibs phase.
2420
+	    dlprefiles="$dlprefiles $lib $dependency_libs"
2421
+	  else
2422
+	    newdlfiles="$newdlfiles $lib"
2423
+	  fi
2424
+	  continue
2425
+	fi # $pass = dlopen
2426
+
2427
+	# We need an absolute path.
2428
+	case $ladir in
2429
+	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
2430
+	*)
2431
+	  abs_ladir=`cd "$ladir" && pwd`
2432
+	  if test -z "$abs_ladir"; then
2433
+	    $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2434
+	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2435
+	    abs_ladir="$ladir"
2436
+	  fi
2437
+	  ;;
2438
+	esac
2439
+	laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2440
+
2441
+	# Find the relevant object directory and library name.
2442
+	if test "X$installed" = Xyes; then
2443
+	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2444
+	    $echo "$modename: warning: library \`$lib' was moved." 1>&2
2445
+	    dir="$ladir"
2446
+	    absdir="$abs_ladir"
2447
+	    libdir="$abs_ladir"
2448
+	  else
2449
+	    dir="$libdir"
2450
+	    absdir="$libdir"
2451
+	  fi
2452
+	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
2453
+	else
2454
+	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2455
+	    dir="$ladir"
2456
+	    absdir="$abs_ladir"
2457
+	    # Remove this search path later
2458
+	    notinst_path="$notinst_path $abs_ladir"
2459
+	  else
2460
+	    dir="$ladir/$objdir"
2461
+	    absdir="$abs_ladir/$objdir"
2462
+	    # Remove this search path later
2463
+	    notinst_path="$notinst_path $abs_ladir"
2464
+	  fi
2465
+	fi # $installed = yes
2466
+	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2467
+
2468
+	# This library was specified with -dlpreopen.
2469
+	if test "$pass" = dlpreopen; then
2470
+	  if test -z "$libdir"; then
2471
+	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2472
+	    exit $EXIT_FAILURE
2473
+	  fi
2474
+	  # Prefer using a static library (so that no silly _DYNAMIC symbols
2475
+	  # are required to link).
2476
+	  if test -n "$old_library"; then
2477
+	    newdlprefiles="$newdlprefiles $dir/$old_library"
2478
+	  # Otherwise, use the dlname, so that lt_dlopen finds it.
2479
+	  elif test -n "$dlname"; then
2480
+	    newdlprefiles="$newdlprefiles $dir/$dlname"
2481
+	  else
2482
+	    newdlprefiles="$newdlprefiles $dir/$linklib"
2483
+	  fi
2484
+	fi # $pass = dlpreopen
2485
+
2486
+	if test -z "$libdir"; then
2487
+	  # Link the convenience library
2488
+	  if test "$linkmode" = lib; then
2489
+	    deplibs="$dir/$old_library $deplibs"
2490
+	  elif test "$linkmode,$pass" = "prog,link"; then
2491
+	    compile_deplibs="$dir/$old_library $compile_deplibs"
2492
+	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
2493
+	  else
2494
+	    deplibs="$lib $deplibs" # used for prog,scan pass
2495
+	  fi
2496
+	  continue
2497
+	fi
2498
+
2499
+
2500
+	if test "$linkmode" = prog && test "$pass" != link; then
2501
+	  newlib_search_path="$newlib_search_path $ladir"
2502
+	  deplibs="$lib $deplibs"
2503
+
2504
+	  linkalldeplibs=no
2505
+	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
2506
+	     test "$build_libtool_libs" = no; then
2507
+	    linkalldeplibs=yes
2508
+	  fi
2509
+
2510
+	  tmp_libs=
2511
+	  for deplib in $dependency_libs; do
2512
+	    case $deplib in
2513
+	    -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2514
+	    esac
2515
+	    # Need to link against all dependency_libs?
2516
+	    if test "$linkalldeplibs" = yes; then
2517
+	      deplibs="$deplib $deplibs"
2518
+	    else
2519
+	      # Need to hardcode shared library paths
2520
+	      # or/and link against static libraries
2521
+	      newdependency_libs="$deplib $newdependency_libs"
2522
+	    fi
2523
+	    if test "X$duplicate_deps" = "Xyes" ; then
2524
+	      case "$tmp_libs " in
2525
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2526
+	      esac
2527
+	    fi
2528
+	    tmp_libs="$tmp_libs $deplib"
2529
+	  done # for deplib
2530
+	  continue
2531
+	fi # $linkmode = prog...
2532
+
2533
+	if test "$linkmode,$pass" = "prog,link"; then
2534
+	  if test -n "$library_names" &&
2535
+	     { { test "$prefer_static_libs" = no ||
2536
+		 test "$prefer_static_libs,$installed" = "built,yes"; } ||
2537
+	       test -z "$old_library"; }; then
2538
+	    # We need to hardcode the library path
2539
+	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2540
+	      # Make sure the rpath contains only unique directories.
2541
+	      case "$temp_rpath " in
2542
+	      *" $dir "*) ;;
2543
+	      *" $absdir "*) ;;
2544
+	      *) temp_rpath="$temp_rpath $absdir" ;;
2545
+	      esac
2546
+	    fi
2547
+
2548
+	    # Hardcode the library path.
2549
+	    # Skip directories that are in the system default run-time
2550
+	    # search path.
2551
+	    case " $sys_lib_dlsearch_path " in
2552
+	    *" $absdir "*) ;;
2553
+	    *)
2554
+	      case "$compile_rpath " in
2555
+	      *" $absdir "*) ;;
2556
+	      *) compile_rpath="$compile_rpath $absdir"
2557
+	      esac
2558
+	      ;;
2559
+	    esac
2560
+	    case " $sys_lib_dlsearch_path " in
2561
+	    *" $libdir "*) ;;
2562
+	    *)
2563
+	      case "$finalize_rpath " in
2564
+	      *" $libdir "*) ;;
2565
+	      *) finalize_rpath="$finalize_rpath $libdir"
2566
+	      esac
2567
+	      ;;
2568
+	    esac
2569
+	  fi # $linkmode,$pass = prog,link...
2570
+
2571
+	  if test "$alldeplibs" = yes &&
2572
+	     { test "$deplibs_check_method" = pass_all ||
2573
+	       { test "$build_libtool_libs" = yes &&
2574
+		 test -n "$library_names"; }; }; then
2575
+	    # We only need to search for static libraries
2576
+	    continue
2577
+	  fi
2578
+	fi
2579
+
2580
+	link_static=no # Whether the deplib will be linked statically
2581
+	use_static_libs=$prefer_static_libs
2582
+	if test "$use_static_libs" = built && test "$installed" = yes ; then
2583
+	  use_static_libs=no
2584
+	fi
2585
+	if test -n "$library_names" &&
2586
+	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
2587
+	  if test "$installed" = no; then
2588
+	    notinst_deplibs="$notinst_deplibs $lib"
2589
+	    need_relink=yes
2590
+	  fi
2591
+	  # This is a shared library
2592
+
2593
+	  # Warn about portability, can't link against -module's on
2594
+	  # some systems (darwin)
2595
+	  if test "$shouldnotlink" = yes && test "$pass" = link ; then
2596
+	    $echo
2597
+	    if test "$linkmode" = prog; then
2598
+	      $echo "*** Warning: Linking the executable $output against the loadable module"
2599
+	    else
2600
+	      $echo "*** Warning: Linking the shared library $output against the loadable module"
2601
+	    fi
2602
+	    $echo "*** $linklib is not portable!"
2603
+	  fi
2604
+	  if test "$linkmode" = lib &&
2605
+	     test "$hardcode_into_libs" = yes; then
2606
+	    # Hardcode the library path.
2607
+	    # Skip directories that are in the system default run-time
2608
+	    # search path.
2609
+	    case " $sys_lib_dlsearch_path " in
2610
+	    *" $absdir "*) ;;
2611
+	    *)
2612
+	      case "$compile_rpath " in
2613
+	      *" $absdir "*) ;;
2614
+	      *) compile_rpath="$compile_rpath $absdir"
2615
+	      esac
2616
+	      ;;
2617
+	    esac
2618
+	    case " $sys_lib_dlsearch_path " in
2619
+	    *" $libdir "*) ;;
2620
+	    *)
2621
+	      case "$finalize_rpath " in
2622
+	      *" $libdir "*) ;;
2623
+	      *) finalize_rpath="$finalize_rpath $libdir"
2624
+	      esac
2625
+	      ;;
2626
+	    esac
2627
+	  fi
2628
+
2629
+	  if test -n "$old_archive_from_expsyms_cmds"; then
2630
+	    # figure out the soname
2631
+	    set dummy $library_names
2632
+	    realname="$2"
2633
+	    shift; shift
2634
+	    libname=`eval \\$echo \"$libname_spec\"`
2635
+	    # use dlname if we got it. it's perfectly good, no?
2636
+	    if test -n "$dlname"; then
2637
+	      soname="$dlname"
2638
+	    elif test -n "$soname_spec"; then
2639
+	      # bleh windows
2640
+	      case $host in
2641
+	      *cygwin* | mingw*)
2642
+		major=`expr $current - $age`
2643
+		versuffix="-$major"
2644
+		;;
2645
+	      esac
2646
+	      eval soname=\"$soname_spec\"
2647
+	    else
2648
+	      soname="$realname"
2649
+	    fi
2650
+
2651
+	    # Make a new name for the extract_expsyms_cmds to use
2652
+	    soroot="$soname"
2653
+	    soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
2654
+	    newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
2655
+
2656
+	    # If the library has no export list, then create one now
2657
+	    if test -f "$output_objdir/$soname-def"; then :
2658
+	    else
2659
+	      $show "extracting exported symbol list from \`$soname'"
2660
+	      save_ifs="$IFS"; IFS='~'
2661
+	      cmds=$extract_expsyms_cmds
2662
+	      for cmd in $cmds; do
2663
+		IFS="$save_ifs"
2664
+		eval cmd=\"$cmd\"
2665
+		$show "$cmd"
2666
+		$run eval "$cmd" || exit $?
2667
+	      done
2668
+	      IFS="$save_ifs"
2669
+	    fi
2670
+
2671
+	    # Create $newlib
2672
+	    if test -f "$output_objdir/$newlib"; then :; else
2673
+	      $show "generating import library for \`$soname'"
2674
+	      save_ifs="$IFS"; IFS='~'
2675
+	      cmds=$old_archive_from_expsyms_cmds
2676
+	      for cmd in $cmds; do
2677
+		IFS="$save_ifs"
2678
+		eval cmd=\"$cmd\"
2679
+		$show "$cmd"
2680
+		$run eval "$cmd" || exit $?
2681
+	      done
2682
+	      IFS="$save_ifs"
2683
+	    fi
2684
+	    # make sure the library variables are pointing to the new library
2685
+	    dir=$output_objdir
2686
+	    linklib=$newlib
2687
+	  fi # test -n "$old_archive_from_expsyms_cmds"
2688
+
2689
+	  if test "$linkmode" = prog || test "$mode" != relink; then
2690
+	    add_shlibpath=
2691
+	    add_dir=
2692
+	    add=
2693
+	    lib_linked=yes
2694
+	    case $hardcode_action in
2695
+	    immediate | unsupported)
2696
+	      if test "$hardcode_direct" = no; then
2697
+		add="$dir/$linklib"
2698
+		case $host in
2699
+		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
2700
+		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
2701
+		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
2702
+		    *-*-unixware7*) add_dir="-L$dir" ;;
2703
+		  *-*-darwin* )
2704
+		    # if the lib is a module then we can not link against
2705
+		    # it, someone is ignoring the new warnings I added
2706
+		    if /usr/bin/file -L $add 2> /dev/null |
2707
+                      $EGREP ": [^:]* bundle" >/dev/null ; then
2708
+		      $echo "** Warning, lib $linklib is a module, not a shared library"
2709
+		      if test -z "$old_library" ; then
2710
+		        $echo
2711
+		        $echo "** And there doesn't seem to be a static archive available"
2712
+		        $echo "** The link will probably fail, sorry"
2713
+		      else
2714
+		        add="$dir/$old_library"
2715
+		      fi
2716
+		    fi
2717
+		esac
2718
+	      elif test "$hardcode_minus_L" = no; then
2719
+		case $host in
2720
+		*-*-sunos*) add_shlibpath="$dir" ;;
2721
+		esac
2722
+		add_dir="-L$dir"
2723
+		add="-l$name"
2724
+	      elif test "$hardcode_shlibpath_var" = no; then
2725
+		add_shlibpath="$dir"
2726
+		add="-l$name"
2727
+	      else
2728
+		lib_linked=no
2729
+	      fi
2730
+	      ;;
2731
+	    relink)
2732
+	      if test "$hardcode_direct" = yes; then
2733
+		add="$dir/$linklib"
2734
+	      elif test "$hardcode_minus_L" = yes; then
2735
+		add_dir="-L$dir"
2736
+		# Try looking first in the location we're being installed to.
2737
+		if test -n "$inst_prefix_dir"; then
2738
+		  case $libdir in
2739
+		    [\\/]*)
2740
+		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
2741
+		      ;;
2742
+		  esac
2743
+		fi
2744
+		add="-l$name"
2745
+	      elif test "$hardcode_shlibpath_var" = yes; then
2746
+		add_shlibpath="$dir"
2747
+		add="-l$name"
2748
+	      else
2749
+		lib_linked=no
2750
+	      fi
2751
+	      ;;
2752
+	    *) lib_linked=no ;;
2753
+	    esac
2754
+
2755
+	    if test "$lib_linked" != yes; then
2756
+	      $echo "$modename: configuration error: unsupported hardcode properties"
2757
+	      exit $EXIT_FAILURE
2758
+	    fi
2759
+
2760
+	    if test -n "$add_shlibpath"; then
2761
+	      case :$compile_shlibpath: in
2762
+	      *":$add_shlibpath:"*) ;;
2763
+	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
2764
+	      esac
2765
+	    fi
2766
+	    if test "$linkmode" = prog; then
2767
+	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
2768
+	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
2769
+	    else
2770
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
2771
+	      test -n "$add" && deplibs="$add $deplibs"
2772
+	      if test "$hardcode_direct" != yes && \
2773
+		 test "$hardcode_minus_L" != yes && \
2774
+		 test "$hardcode_shlibpath_var" = yes; then
2775
+		case :$finalize_shlibpath: in
2776
+		*":$libdir:"*) ;;
2777
+		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2778
+		esac
2779
+	      fi
2780
+	    fi
2781
+	  fi
2782
+
2783
+	  if test "$linkmode" = prog || test "$mode" = relink; then
2784
+	    add_shlibpath=
2785
+	    add_dir=
2786
+	    add=
2787
+	    # Finalize command for both is simple: just hardcode it.
2788
+	    if test "$hardcode_direct" = yes; then
2789
+	      add="$libdir/$linklib"
2790
+	    elif test "$hardcode_minus_L" = yes; then
2791
+	      add_dir="-L$libdir"
2792
+	      add="-l$name"
2793
+	    elif test "$hardcode_shlibpath_var" = yes; then
2794
+	      case :$finalize_shlibpath: in
2795
+	      *":$libdir:"*) ;;
2796
+	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2797
+	      esac
2798
+	      add="-l$name"
2799
+	    elif test "$hardcode_automatic" = yes; then
2800
+	      if test -n "$inst_prefix_dir" &&
2801
+		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
2802
+	        add="$inst_prefix_dir$libdir/$linklib"
2803
+	      else
2804
+	        add="$libdir/$linklib"
2805
+	      fi
2806
+	    else
2807
+	      # We cannot seem to hardcode it, guess we'll fake it.
2808
+	      add_dir="-L$libdir"
2809
+	      # Try looking first in the location we're being installed to.
2810
+	      if test -n "$inst_prefix_dir"; then
2811
+		case $libdir in
2812
+		  [\\/]*)
2813
+		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
2814
+		    ;;
2815
+		esac
2816
+	      fi
2817
+	      add="-l$name"
2818
+	    fi
2819
+
2820
+	    if test "$linkmode" = prog; then
2821
+	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
2822
+	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
2823
+	    else
2824
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
2825
+	      test -n "$add" && deplibs="$add $deplibs"
2826
+	    fi
2827
+	  fi
2828
+	elif test "$linkmode" = prog; then
2829
+	  # Here we assume that one of hardcode_direct or hardcode_minus_L
2830
+	  # is not unsupported.  This is valid on all known static and
2831
+	  # shared platforms.
2832
+	  if test "$hardcode_direct" != unsupported; then
2833
+	    test -n "$old_library" && linklib="$old_library"
2834
+	    compile_deplibs="$dir/$linklib $compile_deplibs"
2835
+	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
2836
+	  else
2837
+	    compile_deplibs="-l$name -L$dir $compile_deplibs"
2838
+	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
2839
+	  fi
2840
+	elif test "$build_libtool_libs" = yes; then
2841
+	  # Not a shared library
2842
+	  if test "$deplibs_check_method" != pass_all; then
2843
+	    # We're trying link a shared library against a static one
2844
+	    # but the system doesn't support it.
2845
+
2846
+	    # Just print a warning and add the library to dependency_libs so
2847
+	    # that the program can be linked against the static library.
2848
+	    $echo
2849
+	    $echo "*** Warning: This system can not link to static lib archive $lib."
2850
+	    $echo "*** I have the capability to make that library automatically link in when"
2851
+	    $echo "*** you link to this library.  But I can only do this if you have a"
2852
+	    $echo "*** shared version of the library, which you do not appear to have."
2853
+	    if test "$module" = yes; then
2854
+	      $echo "*** But as you try to build a module library, libtool will still create "
2855
+	      $echo "*** a static module, that should work as long as the dlopening application"
2856
+	      $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
2857
+	      if test -z "$global_symbol_pipe"; then
2858
+		$echo
2859
+		$echo "*** However, this would only work if libtool was able to extract symbol"
2860
+		$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2861
+		$echo "*** not find such a program.  So, this module is probably useless."
2862
+		$echo "*** \`nm' from GNU binutils and a full rebuild may help."
2863
+	      fi
2864
+	      if test "$build_old_libs" = no; then
2865
+		build_libtool_libs=module
2866
+		build_old_libs=yes
2867
+	      else
2868
+		build_libtool_libs=no
2869
+	      fi
2870
+	    fi
2871
+	  else
2872
+	    deplibs="$dir/$old_library $deplibs"
2873
+	    link_static=yes
2874
+	  fi
2875
+	fi # link shared/static library?
2876
+
2877
+	if test "$linkmode" = lib; then
2878
+	  if test -n "$dependency_libs" &&
2879
+	     { test "$hardcode_into_libs" != yes ||
2880
+	       test "$build_old_libs" = yes ||
2881
+	       test "$link_static" = yes; }; then
2882
+	    # Extract -R from dependency_libs
2883
+	    temp_deplibs=
2884
+	    for libdir in $dependency_libs; do
2885
+	      case $libdir in
2886
+	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
2887
+		   case " $xrpath " in
2888
+		   *" $temp_xrpath "*) ;;
2889
+		   *) xrpath="$xrpath $temp_xrpath";;
2890
+		   esac;;
2891
+	      *) temp_deplibs="$temp_deplibs $libdir";;
2892
+	      esac
2893
+	    done
2894
+	    dependency_libs="$temp_deplibs"
2895
+	  fi
2896
+
2897
+	  newlib_search_path="$newlib_search_path $absdir"
2898
+	  # Link against this library
2899
+	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
2900
+	  # ... and its dependency_libs
2901
+	  tmp_libs=
2902
+	  for deplib in $dependency_libs; do
2903
+	    newdependency_libs="$deplib $newdependency_libs"
2904
+	    if test "X$duplicate_deps" = "Xyes" ; then
2905
+	      case "$tmp_libs " in
2906
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2907
+	      esac
2908
+	    fi
2909
+	    tmp_libs="$tmp_libs $deplib"
2910
+	  done
2911
+
2912
+	  if test "$link_all_deplibs" != no; then
2913
+	    # Add the search paths of all dependency libraries
2914
+	    for deplib in $dependency_libs; do
2915
+	      case $deplib in
2916
+	      -L*) path="$deplib" ;;
2917
+	      *.la)
2918
+		dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
2919
+		test "X$dir" = "X$deplib" && dir="."
2920
+		# We need an absolute path.
2921
+		case $dir in
2922
+		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
2923
+		*)
2924
+		  absdir=`cd "$dir" && pwd`
2925
+		  if test -z "$absdir"; then
2926
+		    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
2927
+		    absdir="$dir"
2928
+		  fi
2929
+		  ;;
2930
+		esac
2931
+		if grep "^installed=no" $deplib > /dev/null; then
2932
+		  path="$absdir/$objdir"
2933
+		else
2934
+		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2935
+		  if test -z "$libdir"; then
2936
+		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2937
+		    exit $EXIT_FAILURE
2938
+		  fi
2939
+		  if test "$absdir" != "$libdir"; then
2940
+		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
2941
+		  fi
2942
+		  path="$absdir"
2943
+		fi
2944
+		depdepl=
2945
+		case $host in
2946
+		*-*-darwin*)
2947
+		  # we do not want to link against static libs,
2948
+		  # but need to link against shared
2949
+		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
2950
+		  if test -n "$deplibrary_names" ; then
2951
+		    for tmp in $deplibrary_names ; do
2952
+		      depdepl=$tmp
2953
+		    done
2954
+		    if test -f "$path/$depdepl" ; then
2955
+		      depdepl="$path/$depdepl"
2956
+		    fi
2957
+		    # do not add paths which are already there
2958
+		    case " $newlib_search_path " in
2959
+		    *" $path "*) ;;
2960
+		    *) newlib_search_path="$newlib_search_path $path";;
2961
+		    esac
2962
+		  fi
2963
+		  path=""
2964
+		  ;;
2965
+		*)
2966
+		  path="-L$path"
2967
+		  ;;
2968
+		esac
2969
+		;;
2970
+	      -l*)
2971
+		case $host in
2972
+		*-*-darwin*)
2973
+		  # Again, we only want to link against shared libraries
2974
+		  eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
2975
+		  for tmp in $newlib_search_path ; do
2976
+		    if test -f "$tmp/lib$tmp_libs.dylib" ; then
2977
+		      eval depdepl="$tmp/lib$tmp_libs.dylib"
2978
+		      break
2979
+		    fi
2980
+		  done
2981
+		  path=""
2982
+		  ;;
2983
+		*) continue ;;
2984
+		esac
2985
+		;;
2986
+	      *) continue ;;
2987
+	      esac
2988
+	      case " $deplibs " in
2989
+	      *" $path "*) ;;
2990
+	      *) deplibs="$path $deplibs" ;;
2991
+	      esac
2992
+	      case " $deplibs " in
2993
+	      *" $depdepl "*) ;;
2994
+	      *) deplibs="$depdepl $deplibs" ;;
2995
+	      esac
2996
+	    done
2997
+	  fi # link_all_deplibs != no
2998
+	fi # linkmode = lib
2999
+      done # for deplib in $libs
3000
+      dependency_libs="$newdependency_libs"
3001
+      if test "$pass" = dlpreopen; then
3002
+	# Link the dlpreopened libraries before other libraries
3003
+	for deplib in $save_deplibs; do
3004
+	  deplibs="$deplib $deplibs"
3005
+	done
3006
+      fi
3007
+      if test "$pass" != dlopen; then
3008
+	if test "$pass" != conv; then
3009
+	  # Make sure lib_search_path contains only unique directories.
3010
+	  lib_search_path=
3011
+	  for dir in $newlib_search_path; do
3012
+	    case "$lib_search_path " in
3013
+	    *" $dir "*) ;;
3014
+	    *) lib_search_path="$lib_search_path $dir" ;;
3015
+	    esac
3016
+	  done
3017
+	  newlib_search_path=
3018
+	fi
3019
+
3020
+	if test "$linkmode,$pass" != "prog,link"; then
3021
+	  vars="deplibs"
3022
+	else
3023
+	  vars="compile_deplibs finalize_deplibs"
3024
+	fi
3025
+	for var in $vars dependency_libs; do
3026
+	  # Add libraries to $var in reverse order
3027
+	  eval tmp_libs=\"\$$var\"
3028
+	  new_libs=
3029
+	  for deplib in $tmp_libs; do
3030
+	    # FIXME: Pedantically, this is the right thing to do, so
3031
+	    #        that some nasty dependency loop isn't accidentally
3032
+	    #        broken:
3033
+	    #new_libs="$deplib $new_libs"
3034
+	    # Pragmatically, this seems to cause very few problems in
3035
+	    # practice:
3036
+	    case $deplib in
3037
+	    -L*) new_libs="$deplib $new_libs" ;;
3038
+	    -R*) ;;
3039
+	    *)
3040
+	      # And here is the reason: when a library appears more
3041
+	      # than once as an explicit dependence of a library, or
3042
+	      # is implicitly linked in more than once by the
3043
+	      # compiler, it is considered special, and multiple
3044
+	      # occurrences thereof are not removed.  Compare this
3045
+	      # with having the same library being listed as a
3046
+	      # dependency of multiple other libraries: in this case,
3047
+	      # we know (pedantically, we assume) the library does not
3048
+	      # need to be listed more than once, so we keep only the
3049
+	      # last copy.  This is not always right, but it is rare
3050
+	      # enough that we require users that really mean to play
3051
+	      # such unportable linking tricks to link the library
3052
+	      # using -Wl,-lname, so that libtool does not consider it
3053
+	      # for duplicate removal.
3054
+	      case " $specialdeplibs " in
3055
+	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
3056
+	      *)
3057
+		case " $new_libs " in
3058
+		*" $deplib "*) ;;
3059
+		*) new_libs="$deplib $new_libs" ;;
3060
+		esac
3061
+		;;
3062
+	      esac
3063
+	      ;;
3064
+	    esac
3065
+	  done
3066
+	  tmp_libs=
3067
+	  for deplib in $new_libs; do
3068
+	    case $deplib in
3069
+	    -L*)
3070
+	      case " $tmp_libs " in
3071
+	      *" $deplib "*) ;;
3072
+	      *) tmp_libs="$tmp_libs $deplib" ;;
3073
+	      esac
3074
+	      ;;
3075
+	    *) tmp_libs="$tmp_libs $deplib" ;;
3076
+	    esac
3077
+	  done
3078
+	  eval $var=\"$tmp_libs\"
3079
+	done # for var
3080
+      fi
3081
+      # Last step: remove runtime libs from dependency_libs
3082
+      # (they stay in deplibs)
3083
+      tmp_libs=
3084
+      for i in $dependency_libs ; do
3085
+	case " $predeps $postdeps $compiler_lib_search_path " in
3086
+	*" $i "*)
3087
+	  i=""
3088
+	  ;;
3089
+	esac
3090
+	if test -n "$i" ; then
3091
+	  tmp_libs="$tmp_libs $i"
3092
+	fi
3093
+      done
3094
+      dependency_libs=$tmp_libs
3095
+    done # for pass
3096
+    if test "$linkmode" = prog; then
3097
+      dlfiles="$newdlfiles"
3098
+      dlprefiles="$newdlprefiles"
3099
+    fi
3100
+
3101
+    case $linkmode in
3102
+    oldlib)
3103
+      if test -n "$deplibs"; then
3104
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3105
+      fi
3106
+
3107
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3108
+	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3109
+      fi
3110
+
3111
+      if test -n "$rpath"; then
3112
+	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3113
+      fi
3114
+
3115
+      if test -n "$xrpath"; then
3116
+	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3117
+      fi
3118
+
3119
+      if test -n "$vinfo"; then
3120
+	$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
3121
+      fi
3122
+
3123
+      if test -n "$release"; then
3124
+	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3125
+      fi
3126
+
3127
+      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
3128
+	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3129
+      fi
3130
+
3131
+      # Now set the variables for building old libraries.
3132
+      build_libtool_libs=no
3133
+      oldlibs="$output"
3134
+      objs="$objs$old_deplibs"
3135
+      ;;
3136
+
3137
+    lib)
3138
+      # Make sure we only generate libraries of the form `libNAME.la'.
3139
+      case $outputname in
3140
+      lib*)
3141
+	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3142
+	eval shared_ext=\"$shrext_cmds\"
3143
+	eval libname=\"$libname_spec\"
3144
+	;;
3145
+      *)
3146
+	if test "$module" = no; then
3147
+	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3148
+	  $echo "$help" 1>&2
3149
+	  exit $EXIT_FAILURE
3150
+	fi
3151
+	if test "$need_lib_prefix" != no; then
3152
+	  # Add the "lib" prefix for modules if required
3153
+	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3154
+	  eval shared_ext=\"$shrext_cmds\"
3155
+	  eval libname=\"$libname_spec\"
3156
+	else
3157
+	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3158
+	fi
3159
+	;;
3160
+      esac
3161
+
3162
+      if test -n "$objs"; then
3163
+	if test "$deplibs_check_method" != pass_all; then
3164
+	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3165
+	  exit $EXIT_FAILURE
3166
+	else
3167
+	  $echo
3168
+	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
3169
+	  $echo "*** objects $objs is not portable!"
3170
+	  libobjs="$libobjs $objs"
3171
+	fi
3172
+      fi
3173
+
3174
+      if test "$dlself" != no; then
3175
+	$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3176
+      fi
3177
+
3178
+      set dummy $rpath
3179
+      if test "$#" -gt 2; then
3180
+	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3181
+      fi
3182
+      install_libdir="$2"
3183
+
3184
+      oldlibs=
3185
+      if test -z "$rpath"; then
3186
+	if test "$build_libtool_libs" = yes; then
3187
+	  # Building a libtool convenience library.
3188
+	  # Some compilers have problems with a `.al' extension so
3189
+	  # convenience libraries should have the same extension an
3190
+	  # archive normally would.
3191
+	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
3192
+	  build_libtool_libs=convenience
3193
+	  build_old_libs=yes
3194
+	fi
3195
+
3196
+	if test -n "$vinfo"; then
3197
+	  $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3198
+	fi
3199
+
3200
+	if test -n "$release"; then
3201
+	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3202
+	fi
3203
+      else
3204
+
3205
+	# Parse the version information argument.
3206
+	save_ifs="$IFS"; IFS=':'
3207
+	set dummy $vinfo 0 0 0
3208
+	IFS="$save_ifs"
3209
+
3210
+	if test -n "$8"; then
3211
+	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
3212
+	  $echo "$help" 1>&2
3213
+	  exit $EXIT_FAILURE
3214
+	fi
3215
+
3216
+	# convert absolute version numbers to libtool ages
3217
+	# this retains compatibility with .la files and attempts
3218
+	# to make the code below a bit more comprehensible
3219
+
3220
+	case $vinfo_number in
3221
+	yes)
3222
+	  number_major="$2"
3223
+	  number_minor="$3"
3224
+	  number_revision="$4"
3225
+	  #
3226
+	  # There are really only two kinds -- those that
3227
+	  # use the current revision as the major version
3228
+	  # and those that subtract age and use age as
3229
+	  # a minor version.  But, then there is irix
3230
+	  # which has an extra 1 added just for fun
3231
+	  #
3232
+	  case $version_type in
3233
+	  darwin|linux|osf|windows|none)
3234
+	    current=`expr $number_major + $number_minor`
3235
+	    age="$number_minor"
3236
+	    revision="$number_revision"
3237
+	    ;;
3238
+	  freebsd-aout|freebsd-elf|sunos)
3239
+	    current="$number_major"
3240
+	    revision="$number_minor"
3241
+	    age="0"
3242
+	    ;;
3243
+	  irix|nonstopux)
3244
+	    current=`expr $number_major + $number_minor`
3245
+	    age="$number_minor"
3246
+	    revision="$number_minor"
3247
+	    lt_irix_increment=no
3248
+	    ;;
3249
+	  *)
3250
+	    $echo "$modename: unknown library version type \`$version_type'" 1>&2
3251
+	    $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
3252
+	    exit $EXIT_FAILURE
3253
+	    ;;
3254
+	  esac
3255
+	  ;;
3256
+	no)
3257
+	  current="$2"
3258
+	  revision="$3"
3259
+	  age="$4"
3260
+	  ;;
3261
+	esac
3262
+
3263
+	# Check that each of the things are valid numbers.
3264
+	case $current in
3265
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
3266
+	*)
3267
+	  $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
3268
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3269
+	  exit $EXIT_FAILURE
3270
+	  ;;
3271
+	esac
3272
+
3273
+	case $revision in
3274
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
3275
+	*)
3276
+	  $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
3277
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3278
+	  exit $EXIT_FAILURE
3279
+	  ;;
3280
+	esac
3281
+
3282
+	case $age in
3283
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
3284
+	*)
3285
+	  $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
3286
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3287
+	  exit $EXIT_FAILURE
3288
+	  ;;
3289
+	esac
3290
+
3291
+	if test "$age" -gt "$current"; then
3292
+	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3293
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3294
+	  exit $EXIT_FAILURE
3295
+	fi
3296
+
3297
+	# Calculate the version variables.
3298
+	major=
3299
+	versuffix=
3300
+	verstring=
3301
+	case $version_type in
3302
+	none) ;;
3303
+
3304
+	darwin)
3305
+	  # Like Linux, but with the current version available in
3306
+	  # verstring for coding it into the library header
3307
+	  major=.`expr $current - $age`
3308
+	  versuffix="$major.$age.$revision"
3309
+	  # Darwin ld doesn't like 0 for these options...
3310
+	  minor_current=`expr $current + 1`
3311
+	  xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
3312
+	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
3313
+	  ;;
3314
+
3315
+	freebsd-aout)
3316
+	  major=".$current"
3317
+	  versuffix=".$current.$revision";
3318
+	  ;;
3319
+
3320
+	freebsd-elf)
3321
+	  major=".$current"
3322
+	  versuffix=".$current";
3323
+	  ;;
3324
+
3325
+	irix | nonstopux)
3326
+	  if test "X$lt_irix_increment" = "Xno"; then
3327
+	    major=`expr $current - $age`
3328
+	  else
3329
+	    major=`expr $current - $age + 1`
3330
+	  fi
3331
+	  case $version_type in
3332
+	    nonstopux) verstring_prefix=nonstopux ;;
3333
+	    *)         verstring_prefix=sgi ;;
3334
+	  esac
3335
+	  verstring="$verstring_prefix$major.$revision"
3336
+
3337
+	  # Add in all the interfaces that we are compatible with.
3338
+	  loop=$revision
3339
+	  while test "$loop" -ne 0; do
3340
+	    iface=`expr $revision - $loop`
3341
+	    loop=`expr $loop - 1`
3342
+	    verstring="$verstring_prefix$major.$iface:$verstring"
3343
+	  done
3344
+
3345
+	  # Before this point, $major must not contain `.'.
3346
+	  major=.$major
3347
+	  versuffix="$major.$revision"
3348
+	  ;;
3349
+
3350
+	linux)
3351
+	  major=.`expr $current - $age`
3352
+	  versuffix="$major.$age.$revision"
3353
+	  ;;
3354
+
3355
+	osf)
3356
+	  major=.`expr $current - $age`
3357
+	  versuffix=".$current.$age.$revision"
3358
+	  verstring="$current.$age.$revision"
3359
+
3360
+	  # Add in all the interfaces that we are compatible with.
3361
+	  loop=$age
3362
+	  while test "$loop" -ne 0; do
3363
+	    iface=`expr $current - $loop`
3364
+	    loop=`expr $loop - 1`
3365
+	    verstring="$verstring:${iface}.0"
3366
+	  done
3367
+
3368
+	  # Make executables depend on our current version.
3369
+	  verstring="$verstring:${current}.0"
3370
+	  ;;
3371
+
3372
+	sunos)
3373
+	  major=".$current"
3374
+	  versuffix=".$current.$revision"
3375
+	  ;;
3376
+
3377
+	windows)
3378
+	  # Use '-' rather than '.', since we only want one
3379
+	  # extension on DOS 8.3 filesystems.
3380
+	  major=`expr $current - $age`
3381
+	  versuffix="-$major"
3382
+	  ;;
3383
+
3384
+	*)
3385
+	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
3386
+	  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
3387
+	  exit $EXIT_FAILURE
3388
+	  ;;
3389
+	esac
3390
+
3391
+	# Clear the version info if we defaulted, and they specified a release.
3392
+	if test -z "$vinfo" && test -n "$release"; then
3393
+	  major=
3394
+	  case $version_type in
3395
+	  darwin)
3396
+	    # we can't check for "0.0" in archive_cmds due to quoting
3397
+	    # problems, so we reset it completely
3398
+	    verstring=
3399
+	    ;;
3400
+	  *)
3401
+	    verstring="0.0"
3402
+	    ;;
3403
+	  esac
3404
+	  if test "$need_version" = no; then
3405
+	    versuffix=
3406
+	  else
3407
+	    versuffix=".0.0"
3408
+	  fi
3409
+	fi
3410
+
3411
+	# Remove version info from name if versioning should be avoided
3412
+	if test "$avoid_version" = yes && test "$need_version" = no; then
3413
+	  major=
3414
+	  versuffix=
3415
+	  verstring=""
3416
+	fi
3417
+
3418
+	# Check to see if the archive will have undefined symbols.
3419
+	if test "$allow_undefined" = yes; then
3420
+	  if test "$allow_undefined_flag" = unsupported; then
3421
+	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3422
+	    build_libtool_libs=no
3423
+	    build_old_libs=yes
3424
+	  fi
3425
+	else
3426
+	  # Don't allow undefined symbols.
3427
+	  allow_undefined_flag="$no_undefined_flag"
3428
+	fi
3429
+      fi
3430
+
3431
+      if test "$mode" != relink; then
3432
+	# Remove our outputs, but don't remove object files since they
3433
+	# may have been created when compiling PIC objects.
3434
+	removelist=
3435
+	tempremovelist=`$echo "$output_objdir/*"`
3436
+	for p in $tempremovelist; do
3437
+	  case $p in
3438
+	    *.$objext)
3439
+	       ;;
3440
+	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
3441
+	       if test "X$precious_files_regex" != "X"; then
3442
+	         if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
3443
+	         then
3444
+		   continue
3445
+		 fi
3446
+	       fi
3447
+	       removelist="$removelist $p"
3448
+	       ;;
3449
+	    *) ;;
3450
+	  esac
3451
+	done
3452
+	if test -n "$removelist"; then
3453
+	  $show "${rm}r $removelist"
3454
+	  $run ${rm}r $removelist
3455
+	fi
3456
+      fi
3457
+
3458
+      # Now set the variables for building old libraries.
3459
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
3460
+	oldlibs="$oldlibs $output_objdir/$libname.$libext"
3461
+
3462
+	# Transform .lo files to .o files.
3463
+	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3464
+      fi
3465
+
3466
+      # Eliminate all temporary directories.
3467
+      #for path in $notinst_path; do
3468
+      #	lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
3469
+      #	deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
3470
+      #	dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
3471
+      #done
3472
+
3473
+      if test -n "$xrpath"; then
3474
+	# If the user specified any rpath flags, then add them.
3475
+	temp_xrpath=
3476
+	for libdir in $xrpath; do
3477
+	  temp_xrpath="$temp_xrpath -R$libdir"
3478
+	  case "$finalize_rpath " in
3479
+	  *" $libdir "*) ;;
3480
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
3481
+	  esac
3482
+	done
3483
+	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
3484
+	  dependency_libs="$temp_xrpath $dependency_libs"
3485
+	fi
3486
+      fi
3487
+
3488
+      # Make sure dlfiles contains only unique files that won't be dlpreopened
3489
+      old_dlfiles="$dlfiles"
3490
+      dlfiles=
3491
+      for lib in $old_dlfiles; do
3492
+	case " $dlprefiles $dlfiles " in
3493
+	*" $lib "*) ;;
3494
+	*) dlfiles="$dlfiles $lib" ;;
3495
+	esac
3496
+      done
3497
+
3498
+      # Make sure dlprefiles contains only unique files
3499
+      old_dlprefiles="$dlprefiles"
3500
+      dlprefiles=
3501
+      for lib in $old_dlprefiles; do
3502
+	case "$dlprefiles " in
3503
+	*" $lib "*) ;;
3504
+	*) dlprefiles="$dlprefiles $lib" ;;
3505
+	esac
3506
+      done
3507
+
3508
+      if test "$build_libtool_libs" = yes; then
3509
+	if test -n "$rpath"; then
3510
+	  case $host in
3511
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
3512
+	    # these systems don't actually have a c library (as such)!
3513
+	    ;;
3514
+	  *-*-rhapsody* | *-*-darwin1.[012])
3515
+	    # Rhapsody C library is in the System framework
3516
+	    deplibs="$deplibs -framework System"
3517
+	    ;;
3518
+	  *-*-netbsd*)
3519
+	    # Don't link with libc until the a.out ld.so is fixed.
3520
+	    ;;
3521
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
3522
+	    # Do not include libc due to us having libc/libc_r.
3523
+	    ;;
3524
+	  *-*-sco3.2v5* | *-*-sco5v6*)
3525
+	    # Causes problems with __ctype
3526
+	    ;;
3527
+	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
3528
+	    # Compiler inserts libc in the correct place for threads to work
3529
+	    ;;
3530
+ 	  *)
3531
+	    # Add libc to deplibs on all other systems if necessary.
3532
+	    if test "$build_libtool_need_lc" = "yes"; then
3533
+	      deplibs="$deplibs -lc"
3534
+	    fi
3535
+	    ;;
3536
+	  esac
3537
+	fi
3538
+
3539
+	# Transform deplibs into only deplibs that can be linked in shared.
3540
+	name_save=$name
3541
+	libname_save=$libname
3542
+	release_save=$release
3543
+	versuffix_save=$versuffix
3544
+	major_save=$major
3545
+	# I'm not sure if I'm treating the release correctly.  I think
3546
+	# release should show up in the -l (ie -lgmp5) so we don't want to
3547
+	# add it in twice.  Is that correct?
3548
+	release=""
3549
+	versuffix=""
3550
+	major=""
3551
+	newdeplibs=
3552
+	droppeddeps=no
3553
+	case $deplibs_check_method in
3554
+	pass_all)
3555
+	  # Don't check for shared/static.  Everything works.
3556
+	  # This might be a little naive.  We might want to check
3557
+	  # whether the library exists or not.  But this is on
3558
+	  # osf3 & osf4 and I'm not really sure... Just
3559
+	  # implementing what was already the behavior.
3560
+	  newdeplibs=$deplibs
3561
+	  ;;
3562
+	test_compile)
3563
+	  # This code stresses the "libraries are programs" paradigm to its
3564
+	  # limits. Maybe even breaks it.  We compile a program, linking it
3565
+	  # against the deplibs as a proxy for the library.  Then we can check
3566
+	  # whether they linked in statically or dynamically with ldd.
3567
+	  $rm conftest.c
3568
+	  cat > conftest.c <<EOF
3569
+	  int main() { return 0; }
3570
+EOF
3571
+	  $rm conftest
3572
+	  if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
3573
+	    ldd_output=`ldd conftest`
3574
+	    for i in $deplibs; do
3575
+	      name=`expr $i : '-l\(.*\)'`
3576
+	      # If $name is empty we are operating on a -L argument.
3577
+              if test "$name" != "" && test "$name" != "0"; then
3578
+		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3579
+		  case " $predeps $postdeps " in
3580
+		  *" $i "*)
3581
+		    newdeplibs="$newdeplibs $i"
3582
+		    i=""
3583
+		    ;;
3584
+		  esac
3585
+	        fi
3586
+		if test -n "$i" ; then
3587
+		  libname=`eval \\$echo \"$libname_spec\"`
3588
+		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
3589
+		  set dummy $deplib_matches
3590
+		  deplib_match=$2
3591
+		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3592
+		    newdeplibs="$newdeplibs $i"
3593
+		  else
3594
+		    droppeddeps=yes
3595
+		    $echo
3596
+		    $echo "*** Warning: dynamic linker does not accept needed library $i."
3597
+		    $echo "*** I have the capability to make that library automatically link in when"
3598
+		    $echo "*** you link to this library.  But I can only do this if you have a"
3599
+		    $echo "*** shared version of the library, which I believe you do not have"
3600
+		    $echo "*** because a test_compile did reveal that the linker did not use it for"
3601
+		    $echo "*** its dynamic dependency list that programs get resolved with at runtime."
3602
+		  fi
3603
+		fi
3604
+	      else
3605
+		newdeplibs="$newdeplibs $i"
3606
+	      fi
3607
+	    done
3608
+	  else
3609
+	    # Error occurred in the first compile.  Let's try to salvage
3610
+	    # the situation: Compile a separate program for each library.
3611
+	    for i in $deplibs; do
3612
+	      name=`expr $i : '-l\(.*\)'`
3613
+	      # If $name is empty we are operating on a -L argument.
3614
+              if test "$name" != "" && test "$name" != "0"; then
3615
+		$rm conftest
3616
+		if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
3617
+		  ldd_output=`ldd conftest`
3618
+		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3619
+		    case " $predeps $postdeps " in
3620
+		    *" $i "*)
3621
+		      newdeplibs="$newdeplibs $i"
3622
+		      i=""
3623
+		      ;;
3624
+		    esac
3625
+		  fi
3626
+		  if test -n "$i" ; then
3627
+		    libname=`eval \\$echo \"$libname_spec\"`
3628
+		    deplib_matches=`eval \\$echo \"$library_names_spec\"`
3629
+		    set dummy $deplib_matches
3630
+		    deplib_match=$2
3631
+		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3632
+		      newdeplibs="$newdeplibs $i"
3633
+		    else
3634
+		      droppeddeps=yes
3635
+		      $echo
3636
+		      $echo "*** Warning: dynamic linker does not accept needed library $i."
3637
+		      $echo "*** I have the capability to make that library automatically link in when"
3638
+		      $echo "*** you link to this library.  But I can only do this if you have a"
3639
+		      $echo "*** shared version of the library, which you do not appear to have"
3640
+		      $echo "*** because a test_compile did reveal that the linker did not use this one"
3641
+		      $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
3642
+		    fi
3643
+		  fi
3644
+		else
3645
+		  droppeddeps=yes
3646
+		  $echo
3647
+		  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
3648
+		  $echo "*** make it link in!  You will probably need to install it or some"
3649
+		  $echo "*** library that it depends on before this library will be fully"
3650
+		  $echo "*** functional.  Installing it before continuing would be even better."
3651
+		fi
3652
+	      else
3653
+		newdeplibs="$newdeplibs $i"
3654
+	      fi
3655
+	    done
3656
+	  fi
3657
+	  ;;
3658
+	file_magic*)
3659
+	  set dummy $deplibs_check_method
3660
+	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3661
+	  for a_deplib in $deplibs; do
3662
+	    name=`expr $a_deplib : '-l\(.*\)'`
3663
+	    # If $name is empty we are operating on a -L argument.
3664
+            if test "$name" != "" && test  "$name" != "0"; then
3665
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3666
+		case " $predeps $postdeps " in
3667
+		*" $a_deplib "*)
3668
+		  newdeplibs="$newdeplibs $a_deplib"
3669
+		  a_deplib=""
3670
+		  ;;
3671
+		esac
3672
+	      fi
3673
+	      if test -n "$a_deplib" ; then
3674
+		libname=`eval \\$echo \"$libname_spec\"`
3675
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3676
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
3677
+		  for potent_lib in $potential_libs; do
3678
+		      # Follow soft links.
3679
+		      if ls -lLd "$potent_lib" 2>/dev/null \
3680
+			 | grep " -> " >/dev/null; then
3681
+			continue
3682
+		      fi
3683
+		      # The statement above tries to avoid entering an
3684
+		      # endless loop below, in case of cyclic links.
3685
+		      # We might still enter an endless loop, since a link
3686
+		      # loop can be closed while we follow links,
3687
+		      # but so what?
3688
+		      potlib="$potent_lib"
3689
+		      while test -h "$potlib" 2>/dev/null; do
3690
+			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
3691
+			case $potliblink in
3692
+			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
3693
+			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
3694
+			esac
3695
+		      done
3696
+		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
3697
+			 | ${SED} 10q \
3698
+			 | $EGREP "$file_magic_regex" > /dev/null; then
3699
+			newdeplibs="$newdeplibs $a_deplib"
3700
+			a_deplib=""
3701
+			break 2
3702
+		      fi
3703
+		  done
3704
+		done
3705
+	      fi
3706
+	      if test -n "$a_deplib" ; then
3707
+		droppeddeps=yes
3708
+		$echo
3709
+		$echo "*** Warning: linker path does not have real file for library $a_deplib."
3710
+		$echo "*** I have the capability to make that library automatically link in when"
3711
+		$echo "*** you link to this library.  But I can only do this if you have a"
3712
+		$echo "*** shared version of the library, which you do not appear to have"
3713
+		$echo "*** because I did check the linker path looking for a file starting"
3714
+		if test -z "$potlib" ; then
3715
+		  $echo "*** with $libname but no candidates were found. (...for file magic test)"
3716
+		else
3717
+		  $echo "*** with $libname and none of the candidates passed a file format test"
3718
+		  $echo "*** using a file magic. Last file checked: $potlib"
3719
+		fi
3720
+	      fi
3721
+	    else
3722
+	      # Add a -L argument.
3723
+	      newdeplibs="$newdeplibs $a_deplib"
3724
+	    fi
3725
+	  done # Gone through all deplibs.
3726
+	  ;;
3727
+	match_pattern*)
3728
+	  set dummy $deplibs_check_method
3729
+	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3730
+	  for a_deplib in $deplibs; do
3731
+	    name=`expr $a_deplib : '-l\(.*\)'`
3732
+	    # If $name is empty we are operating on a -L argument.
3733
+	    if test -n "$name" && test "$name" != "0"; then
3734
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3735
+		case " $predeps $postdeps " in
3736
+		*" $a_deplib "*)
3737
+		  newdeplibs="$newdeplibs $a_deplib"
3738
+		  a_deplib=""
3739
+		  ;;
3740
+		esac
3741
+	      fi
3742
+	      if test -n "$a_deplib" ; then
3743
+		libname=`eval \\$echo \"$libname_spec\"`
3744
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3745
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
3746
+		  for potent_lib in $potential_libs; do
3747
+		    potlib="$potent_lib" # see symlink-check above in file_magic test
3748
+		    if eval $echo \"$potent_lib\" 2>/dev/null \
3749
+		        | ${SED} 10q \
3750
+		        | $EGREP "$match_pattern_regex" > /dev/null; then
3751
+		      newdeplibs="$newdeplibs $a_deplib"
3752
+		      a_deplib=""
3753
+		      break 2
3754
+		    fi
3755
+		  done
3756
+		done
3757
+	      fi
3758
+	      if test -n "$a_deplib" ; then
3759
+		droppeddeps=yes
3760
+		$echo
3761
+		$echo "*** Warning: linker path does not have real file for library $a_deplib."
3762
+		$echo "*** I have the capability to make that library automatically link in when"
3763
+		$echo "*** you link to this library.  But I can only do this if you have a"
3764
+		$echo "*** shared version of the library, which you do not appear to have"
3765
+		$echo "*** because I did check the linker path looking for a file starting"
3766
+		if test -z "$potlib" ; then
3767
+		  $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
3768
+		else
3769
+		  $echo "*** with $libname and none of the candidates passed a file format test"
3770
+		  $echo "*** using a regex pattern. Last file checked: $potlib"
3771
+		fi
3772
+	      fi
3773
+	    else
3774
+	      # Add a -L argument.
3775
+	      newdeplibs="$newdeplibs $a_deplib"
3776
+	    fi
3777
+	  done # Gone through all deplibs.
3778
+	  ;;
3779
+	none | unknown | *)
3780
+	  newdeplibs=""
3781
+	  tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
3782
+	    -e 's/ -[LR][^ ]*//g'`
3783
+	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3784
+	    for i in $predeps $postdeps ; do
3785
+	      # can't use Xsed below, because $i might contain '/'
3786
+	      tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
3787
+	    done
3788
+	  fi
3789
+	  if $echo "X $tmp_deplibs" | $Xsed -e 's/[ 	]//g' \
3790
+	    | grep . >/dev/null; then
3791
+	    $echo
3792
+	    if test "X$deplibs_check_method" = "Xnone"; then
3793
+	      $echo "*** Warning: inter-library dependencies are not supported in this platform."
3794
+	    else
3795
+	      $echo "*** Warning: inter-library dependencies are not known to be supported."
3796
+	    fi
3797
+	    $echo "*** All declared inter-library dependencies are being dropped."
3798
+	    droppeddeps=yes
3799
+	  fi
3800
+	  ;;
3801
+	esac
3802
+	versuffix=$versuffix_save
3803
+	major=$major_save
3804
+	release=$release_save
3805
+	libname=$libname_save
3806
+	name=$name_save
3807
+
3808
+	case $host in
3809
+	*-*-rhapsody* | *-*-darwin1.[012])
3810
+	  # On Rhapsody replace the C library is the System framework
3811
+	  newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
3812
+	  ;;
3813
+	esac
3814
+
3815
+	if test "$droppeddeps" = yes; then
3816
+	  if test "$module" = yes; then
3817
+	    $echo
3818
+	    $echo "*** Warning: libtool could not satisfy all declared inter-library"
3819
+	    $echo "*** dependencies of module $libname.  Therefore, libtool will create"
3820
+	    $echo "*** a static module, that should work as long as the dlopening"
3821
+	    $echo "*** application is linked with the -dlopen flag."
3822
+	    if test -z "$global_symbol_pipe"; then
3823
+	      $echo
3824
+	      $echo "*** However, this would only work if libtool was able to extract symbol"
3825
+	      $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3826
+	      $echo "*** not find such a program.  So, this module is probably useless."
3827
+	      $echo "*** \`nm' from GNU binutils and a full rebuild may help."
3828
+	    fi
3829
+	    if test "$build_old_libs" = no; then
3830
+	      oldlibs="$output_objdir/$libname.$libext"
3831
+	      build_libtool_libs=module
3832
+	      build_old_libs=yes
3833
+	    else
3834
+	      build_libtool_libs=no
3835
+	    fi
3836
+	  else
3837
+	    $echo "*** The inter-library dependencies that have been dropped here will be"
3838
+	    $echo "*** automatically added whenever a program is linked with this library"
3839
+	    $echo "*** or is declared to -dlopen it."
3840
+
3841
+	    if test "$allow_undefined" = no; then
3842
+	      $echo
3843
+	      $echo "*** Since this library must not contain undefined symbols,"
3844
+	      $echo "*** because either the platform does not support them or"
3845
+	      $echo "*** it was explicitly requested with -no-undefined,"
3846
+	      $echo "*** libtool will only create a static version of it."
3847
+	      if test "$build_old_libs" = no; then
3848
+		oldlibs="$output_objdir/$libname.$libext"
3849
+		build_libtool_libs=module
3850
+		build_old_libs=yes
3851
+	      else
3852
+		build_libtool_libs=no
3853
+	      fi
3854
+	    fi
3855
+	  fi
3856
+	fi
3857
+	# Done checking deplibs!
3858
+	deplibs=$newdeplibs
3859
+      fi
3860
+
3861
+
3862
+      # move library search paths that coincide with paths to not yet
3863
+      # installed libraries to the beginning of the library search list
3864
+      new_libs=
3865
+      for path in $notinst_path; do
3866
+	case " $new_libs " in
3867
+	*" -L$path/$objdir "*) ;;
3868
+	*)
3869
+	  case " $deplibs " in
3870
+	  *" -L$path/$objdir "*)
3871
+	    new_libs="$new_libs -L$path/$objdir" ;;
3872
+	  esac
3873
+	  ;;
3874
+	esac
3875
+      done
3876
+      for deplib in $deplibs; do
3877
+	case $deplib in
3878
+	-L*)
3879
+	  case " $new_libs " in
3880
+	  *" $deplib "*) ;;
3881
+	  *) new_libs="$new_libs $deplib" ;;
3882
+	  esac
3883
+	  ;;
3884
+	*) new_libs="$new_libs $deplib" ;;
3885
+	esac
3886
+      done
3887
+      deplibs="$new_libs"
3888
+
3889
+
3890
+      # All the library-specific variables (install_libdir is set above).
3891
+      library_names=
3892
+      old_library=
3893
+      dlname=
3894
+
3895
+      # Test again, we may have decided not to build it any more
3896
+      if test "$build_libtool_libs" = yes; then
3897
+	if test "$hardcode_into_libs" = yes; then
3898
+	  # Hardcode the library paths
3899
+	  hardcode_libdirs=
3900
+	  dep_rpath=
3901
+	  rpath="$finalize_rpath"
3902
+	  test "$mode" != relink && rpath="$compile_rpath$rpath"
3903
+	  for libdir in $rpath; do
3904
+	    if test -n "$hardcode_libdir_flag_spec"; then
3905
+	      if test -n "$hardcode_libdir_separator"; then
3906
+		if test -z "$hardcode_libdirs"; then
3907
+		  hardcode_libdirs="$libdir"
3908
+		else
3909
+		  # Just accumulate the unique libdirs.
3910
+		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3911
+		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3912
+		    ;;
3913
+		  *)
3914
+		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3915
+		    ;;
3916
+		  esac
3917
+		fi
3918
+	      else
3919
+		eval flag=\"$hardcode_libdir_flag_spec\"
3920
+		dep_rpath="$dep_rpath $flag"
3921
+	      fi
3922
+	    elif test -n "$runpath_var"; then
3923
+	      case "$perm_rpath " in
3924
+	      *" $libdir "*) ;;
3925
+	      *) perm_rpath="$perm_rpath $libdir" ;;
3926
+	      esac
3927
+	    fi
3928
+	  done
3929
+	  # Substitute the hardcoded libdirs into the rpath.
3930
+	  if test -n "$hardcode_libdir_separator" &&
3931
+	     test -n "$hardcode_libdirs"; then
3932
+	    libdir="$hardcode_libdirs"
3933
+	    if test -n "$hardcode_libdir_flag_spec_ld"; then
3934
+	      case $archive_cmds in
3935
+	      *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
3936
+	      *)      eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
3937
+	      esac
3938
+	    else
3939
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
3940
+	    fi
3941
+	  fi
3942
+	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
3943
+	    # We should set the runpath_var.
3944
+	    rpath=
3945
+	    for dir in $perm_rpath; do
3946
+	      rpath="$rpath$dir:"
3947
+	    done
3948
+	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
3949
+	  fi
3950
+	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
3951
+	fi
3952
+
3953
+	shlibpath="$finalize_shlibpath"
3954
+	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
3955
+	if test -n "$shlibpath"; then
3956
+	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
3957
+	fi
3958
+
3959
+	# Get the real and link names of the library.
3960
+	eval shared_ext=\"$shrext_cmds\"
3961
+	eval library_names=\"$library_names_spec\"
3962
+	set dummy $library_names
3963
+	realname="$2"
3964
+	shift; shift
3965
+
3966
+	if test -n "$soname_spec"; then
3967
+	  eval soname=\"$soname_spec\"
3968
+	else
3969
+	  soname="$realname"
3970
+	fi
3971
+	if test -z "$dlname"; then
3972
+	  dlname=$soname
3973
+	fi
3974
+
3975
+	lib="$output_objdir/$realname"
3976
+	linknames=
3977
+	for link
3978
+	do
3979
+	  linknames="$linknames $link"
3980
+	done
3981
+
3982
+	# Use standard objects if they are pic
3983
+	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3984
+
3985
+	# Prepare the list of exported symbols
3986
+	if test -z "$export_symbols"; then
3987
+	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
3988
+	    $show "generating symbol list for \`$libname.la'"
3989
+	    export_symbols="$output_objdir/$libname.exp"
3990
+	    $run $rm $export_symbols
3991
+	    cmds=$export_symbols_cmds
3992
+	    save_ifs="$IFS"; IFS='~'
3993
+	    for cmd in $cmds; do
3994
+	      IFS="$save_ifs"
3995
+	      eval cmd=\"$cmd\"
3996
+	      if len=`expr "X$cmd" : ".*"` &&
3997
+	       test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
3998
+	        $show "$cmd"
3999
+	        $run eval "$cmd" || exit $?
4000
+	        skipped_export=false
4001
+	      else
4002
+	        # The command line is too long to execute in one step.
4003
+	        $show "using reloadable object file for export list..."
4004
+	        skipped_export=:
4005
+		# Break out early, otherwise skipped_export may be
4006
+		# set to false by a later but shorter cmd.
4007
+		break
4008
+	      fi
4009
+	    done
4010
+	    IFS="$save_ifs"
4011
+	    if test -n "$export_symbols_regex"; then
4012
+	      $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
4013
+	      $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
4014
+	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
4015
+	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
4016
+	    fi
4017
+	  fi
4018
+	fi
4019
+
4020
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
4021
+	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
4022
+	fi
4023
+
4024
+	tmp_deplibs=
4025
+	for test_deplib in $deplibs; do
4026
+		case " $convenience " in
4027
+		*" $test_deplib "*) ;;
4028
+		*)
4029
+			tmp_deplibs="$tmp_deplibs $test_deplib"
4030
+			;;
4031
+		esac
4032
+	done
4033
+	deplibs="$tmp_deplibs"
4034
+
4035
+	if test -n "$convenience"; then
4036
+	  if test -n "$whole_archive_flag_spec"; then
4037
+	    save_libobjs=$libobjs
4038
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4039
+	  else
4040
+	    gentop="$output_objdir/${outputname}x"
4041
+	    generated="$generated $gentop"
4042
+
4043
+	    func_extract_archives $gentop $convenience
4044
+	    libobjs="$libobjs $func_extract_archives_result"
4045
+	  fi
4046
+	fi
4047
+	
4048
+	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4049
+	  eval flag=\"$thread_safe_flag_spec\"
4050
+	  linker_flags="$linker_flags $flag"
4051
+	fi
4052
+
4053
+	# Make a backup of the uninstalled library when relinking
4054
+	if test "$mode" = relink; then
4055
+	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
4056
+	fi
4057
+
4058
+	# Do each of the archive commands.
4059
+	if test "$module" = yes && test -n "$module_cmds" ; then
4060
+	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4061
+	    eval test_cmds=\"$module_expsym_cmds\"
4062
+	    cmds=$module_expsym_cmds
4063
+	  else
4064
+	    eval test_cmds=\"$module_cmds\"
4065
+	    cmds=$module_cmds
4066
+	  fi
4067
+	else
4068
+	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4069
+	  eval test_cmds=\"$archive_expsym_cmds\"
4070
+	  cmds=$archive_expsym_cmds
4071
+	else
4072
+	  eval test_cmds=\"$archive_cmds\"
4073
+	  cmds=$archive_cmds
4074
+	  fi
4075
+	fi
4076
+
4077
+	if test "X$skipped_export" != "X:" &&
4078
+	   len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4079
+	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
4080
+	  :
4081
+	else
4082
+	  # The command line is too long to link in one step, link piecewise.
4083
+	  $echo "creating reloadable object files..."
4084
+
4085
+	  # Save the value of $output and $libobjs because we want to
4086
+	  # use them later.  If we have whole_archive_flag_spec, we
4087
+	  # want to use save_libobjs as it was before
4088
+	  # whole_archive_flag_spec was expanded, because we can't
4089
+	  # assume the linker understands whole_archive_flag_spec.
4090
+	  # This may have to be revisited, in case too many
4091
+	  # convenience libraries get linked in and end up exceeding
4092
+	  # the spec.
4093
+	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
4094
+	    save_libobjs=$libobjs
4095
+	  fi
4096
+	  save_output=$output
4097
+	  output_la=`$echo "X$output" | $Xsed -e "$basename"`
4098
+
4099
+	  # Clear the reloadable object creation command queue and
4100
+	  # initialize k to one.
4101
+	  test_cmds=
4102
+	  concat_cmds=
4103
+	  objlist=
4104
+	  delfiles=
4105
+	  last_robj=
4106
+	  k=1
4107
+	  output=$output_objdir/$output_la-${k}.$objext
4108
+	  # Loop over the list of objects to be linked.
4109
+	  for obj in $save_libobjs
4110
+	  do
4111
+	    eval test_cmds=\"$reload_cmds $objlist $last_robj\"
4112
+	    if test "X$objlist" = X ||
4113
+	       { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4114
+		 test "$len" -le "$max_cmd_len"; }; then
4115
+	      objlist="$objlist $obj"
4116
+	    else
4117
+	      # The command $test_cmds is almost too long, add a
4118
+	      # command to the queue.
4119
+	      if test "$k" -eq 1 ; then
4120
+		# The first file doesn't have a previous command to add.
4121
+		eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
4122
+	      else
4123
+		# All subsequent reloadable object files will link in
4124
+		# the last one created.
4125
+		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
4126
+	      fi
4127
+	      last_robj=$output_objdir/$output_la-${k}.$objext
4128
+	      k=`expr $k + 1`
4129
+	      output=$output_objdir/$output_la-${k}.$objext
4130
+	      objlist=$obj
4131
+	      len=1
4132
+	    fi
4133
+	  done
4134
+	  # Handle the remaining objects by creating one last
4135
+	  # reloadable object file.  All subsequent reloadable object
4136
+	  # files will link in the last one created.
4137
+	  test -z "$concat_cmds" || concat_cmds=$concat_cmds~
4138
+	  eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
4139
+
4140
+	  if ${skipped_export-false}; then
4141
+	    $show "generating symbol list for \`$libname.la'"
4142
+	    export_symbols="$output_objdir/$libname.exp"
4143
+	    $run $rm $export_symbols
4144
+	    libobjs=$output
4145
+	    # Append the command to create the export file.
4146
+	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
4147
+          fi
4148
+
4149
+	  # Set up a command to remove the reloadable object files
4150
+	  # after they are used.
4151
+	  i=0
4152
+	  while test "$i" -lt "$k"
4153
+	  do
4154
+	    i=`expr $i + 1`
4155
+	    delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
4156
+	  done
4157
+
4158
+	  $echo "creating a temporary reloadable object file: $output"
4159
+
4160
+	  # Loop through the commands generated above and execute them.
4161
+	  save_ifs="$IFS"; IFS='~'
4162
+	  for cmd in $concat_cmds; do
4163
+	    IFS="$save_ifs"
4164
+	    $show "$cmd"
4165
+	    $run eval "$cmd" || exit $?
4166
+	  done
4167
+	  IFS="$save_ifs"
4168
+
4169
+	  libobjs=$output
4170
+	  # Restore the value of output.
4171
+	  output=$save_output
4172
+
4173
+	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4174
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4175
+	  fi
4176
+	  # Expand the library linking commands again to reset the
4177
+	  # value of $libobjs for piecewise linking.
4178
+
4179
+	  # Do each of the archive commands.
4180
+	  if test "$module" = yes && test -n "$module_cmds" ; then
4181
+	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4182
+	      cmds=$module_expsym_cmds
4183
+	    else
4184
+	      cmds=$module_cmds
4185
+	    fi
4186
+	  else
4187
+	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4188
+	    cmds=$archive_expsym_cmds
4189
+	  else
4190
+	    cmds=$archive_cmds
4191
+	    fi
4192
+	  fi
4193
+
4194
+	  # Append the command to remove the reloadable object files
4195
+	  # to the just-reset $cmds.
4196
+	  eval cmds=\"\$cmds~\$rm $delfiles\"
4197
+	fi
4198
+	save_ifs="$IFS"; IFS='~'
4199
+	for cmd in $cmds; do
4200
+	  IFS="$save_ifs"
4201
+	  eval cmd=\"$cmd\"
4202
+	  $show "$cmd"
4203
+	  $run eval "$cmd" || {
4204
+	    lt_exit=$?
4205
+
4206
+	    # Restore the uninstalled library and exit
4207
+	    if test "$mode" = relink; then
4208
+	      $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
4209
+	    fi
4210
+
4211
+	    exit $lt_exit
4212
+	  }
4213
+	done
4214
+	IFS="$save_ifs"
4215
+
4216
+	# Restore the uninstalled library and exit
4217
+	if test "$mode" = relink; then
4218
+	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
4219
+
4220
+	  if test -n "$convenience"; then
4221
+	    if test -z "$whole_archive_flag_spec"; then
4222
+	      $show "${rm}r $gentop"
4223
+	      $run ${rm}r "$gentop"
4224
+	    fi
4225
+	  fi
4226
+
4227
+	  exit $EXIT_SUCCESS
4228
+	fi
4229
+
4230
+	# Create links to the real library.
4231
+	for linkname in $linknames; do
4232
+	  if test "$realname" != "$linkname"; then
4233
+	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4234
+	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
4235
+	  fi
4236
+	done
4237
+
4238
+	# If -module or -export-dynamic was specified, set the dlname.
4239
+	if test "$module" = yes || test "$export_dynamic" = yes; then
4240
+	  # On all known operating systems, these are identical.
4241
+	  dlname="$soname"
4242
+	fi
4243
+      fi
4244
+      ;;
4245
+
4246
+    obj)
4247
+      if test -n "$deplibs"; then
4248
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4249
+      fi
4250
+
4251
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4252
+	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4253
+      fi
4254
+
4255
+      if test -n "$rpath"; then
4256
+	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4257
+      fi
4258
+
4259
+      if test -n "$xrpath"; then
4260
+	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4261
+      fi
4262
+
4263
+      if test -n "$vinfo"; then
4264
+	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4265
+      fi
4266
+
4267
+      if test -n "$release"; then
4268
+	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4269
+      fi
4270
+
4271
+      case $output in
4272
+      *.lo)
4273
+	if test -n "$objs$old_deplibs"; then
4274
+	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4275
+	  exit $EXIT_FAILURE
4276
+	fi
4277
+	libobj="$output"
4278
+	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
4279
+	;;
4280
+      *)
4281
+	libobj=
4282
+	obj="$output"
4283
+	;;
4284
+      esac
4285
+
4286
+      # Delete the old objects.
4287
+      $run $rm $obj $libobj
4288
+
4289
+      # Objects from convenience libraries.  This assumes
4290
+      # single-version convenience libraries.  Whenever we create
4291
+      # different ones for PIC/non-PIC, this we'll have to duplicate
4292
+      # the extraction.
4293
+      reload_conv_objs=
4294
+      gentop=
4295
+      # reload_cmds runs $LD directly, so let us get rid of
4296
+      # -Wl from whole_archive_flag_spec and hope we can get by with
4297
+      # turning comma into space..
4298
+      wl=
4299
+
4300
+      if test -n "$convenience"; then
4301
+	if test -n "$whole_archive_flag_spec"; then
4302
+	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
4303
+	  reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
4304
+	else
4305
+	  gentop="$output_objdir/${obj}x"
4306
+	  generated="$generated $gentop"
4307
+
4308
+	  func_extract_archives $gentop $convenience
4309
+	  reload_conv_objs="$reload_objs $func_extract_archives_result"
4310
+	fi
4311
+      fi
4312
+
4313
+      # Create the old-style object.
4314
+      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
4315
+
4316
+      output="$obj"
4317
+      cmds=$reload_cmds
4318
+      save_ifs="$IFS"; IFS='~'
4319
+      for cmd in $cmds; do
4320
+	IFS="$save_ifs"
4321
+	eval cmd=\"$cmd\"
4322
+	$show "$cmd"
4323
+	$run eval "$cmd" || exit $?
4324
+      done
4325
+      IFS="$save_ifs"
4326
+
4327
+      # Exit if we aren't doing a library object file.
4328
+      if test -z "$libobj"; then
4329
+	if test -n "$gentop"; then
4330
+	  $show "${rm}r $gentop"
4331
+	  $run ${rm}r $gentop
4332
+	fi
4333
+
4334
+	exit $EXIT_SUCCESS
4335
+      fi
4336
+
4337
+      if test "$build_libtool_libs" != yes; then
4338
+	if test -n "$gentop"; then
4339
+	  $show "${rm}r $gentop"
4340
+	  $run ${rm}r $gentop
4341
+	fi
4342
+
4343
+	# Create an invalid libtool object if no PIC, so that we don't
4344
+	# accidentally link it into a program.
4345
+	# $show "echo timestamp > $libobj"
4346
+	# $run eval "echo timestamp > $libobj" || exit $?
4347
+	exit $EXIT_SUCCESS
4348
+      fi
4349
+
4350
+      if test -n "$pic_flag" || test "$pic_mode" != default; then
4351
+	# Only do commands if we really have different PIC objects.
4352
+	reload_objs="$libobjs $reload_conv_objs"
4353
+	output="$libobj"
4354
+	cmds=$reload_cmds
4355
+	save_ifs="$IFS"; IFS='~'
4356
+	for cmd in $cmds; do
4357
+	  IFS="$save_ifs"
4358
+	  eval cmd=\"$cmd\"
4359
+	  $show "$cmd"
4360
+	  $run eval "$cmd" || exit $?
4361
+	done
4362
+	IFS="$save_ifs"
4363
+      fi
4364
+
4365
+      if test -n "$gentop"; then
4366
+	$show "${rm}r $gentop"
4367
+	$run ${rm}r $gentop
4368
+      fi
4369
+
4370
+      exit $EXIT_SUCCESS
4371
+      ;;
4372
+
4373
+    prog)
4374
+      case $host in
4375
+	*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4376
+      esac
4377
+      if test -n "$vinfo"; then
4378
+	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4379
+      fi
4380
+
4381
+      if test -n "$release"; then
4382
+	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4383
+      fi
4384
+
4385
+      if test "$preload" = yes; then
4386
+	if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
4387
+	   test "$dlopen_self_static" = unknown; then
4388
+	  $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4389
+	fi
4390
+      fi
4391
+
4392
+      case $host in
4393
+      *-*-rhapsody* | *-*-darwin1.[012])
4394
+	# On Rhapsody replace the C library is the System framework
4395
+	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4396
+	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4397
+	;;
4398
+      esac
4399
+
4400
+      case $host in
4401
+      *darwin*)
4402
+        # Don't allow lazy linking, it breaks C++ global constructors
4403
+        if test "$tagname" = CXX ; then
4404
+        compile_command="$compile_command ${wl}-bind_at_load"
4405
+        finalize_command="$finalize_command ${wl}-bind_at_load"
4406
+        fi
4407
+        ;;
4408
+      esac
4409
+
4410
+
4411
+      # move library search paths that coincide with paths to not yet
4412
+      # installed libraries to the beginning of the library search list
4413
+      new_libs=
4414
+      for path in $notinst_path; do
4415
+	case " $new_libs " in
4416
+	*" -L$path/$objdir "*) ;;
4417
+	*)
4418
+	  case " $compile_deplibs " in
4419
+	  *" -L$path/$objdir "*)
4420
+	    new_libs="$new_libs -L$path/$objdir" ;;
4421
+	  esac
4422
+	  ;;
4423
+	esac
4424
+      done
4425
+      for deplib in $compile_deplibs; do
4426
+	case $deplib in
4427
+	-L*)
4428
+	  case " $new_libs " in
4429
+	  *" $deplib "*) ;;
4430
+	  *) new_libs="$new_libs $deplib" ;;
4431
+	  esac
4432
+	  ;;
4433
+	*) new_libs="$new_libs $deplib" ;;
4434
+	esac
4435
+      done
4436
+      compile_deplibs="$new_libs"
4437
+
4438
+
4439
+      compile_command="$compile_command $compile_deplibs"
4440
+      finalize_command="$finalize_command $finalize_deplibs"
4441
+
4442
+      if test -n "$rpath$xrpath"; then
4443
+	# If the user specified any rpath flags, then add them.
4444
+	for libdir in $rpath $xrpath; do
4445
+	  # This is the magic to use -rpath.
4446
+	  case "$finalize_rpath " in
4447
+	  *" $libdir "*) ;;
4448
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
4449
+	  esac
4450
+	done
4451
+      fi
4452
+
4453
+      # Now hardcode the library paths
4454
+      rpath=
4455
+      hardcode_libdirs=
4456
+      for libdir in $compile_rpath $finalize_rpath; do
4457
+	if test -n "$hardcode_libdir_flag_spec"; then
4458
+	  if test -n "$hardcode_libdir_separator"; then
4459
+	    if test -z "$hardcode_libdirs"; then
4460
+	      hardcode_libdirs="$libdir"
4461
+	    else
4462
+	      # Just accumulate the unique libdirs.
4463
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4464
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4465
+		;;
4466
+	      *)
4467
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4468
+		;;
4469
+	      esac
4470
+	    fi
4471
+	  else
4472
+	    eval flag=\"$hardcode_libdir_flag_spec\"
4473
+	    rpath="$rpath $flag"
4474
+	  fi
4475
+	elif test -n "$runpath_var"; then
4476
+	  case "$perm_rpath " in
4477
+	  *" $libdir "*) ;;
4478
+	  *) perm_rpath="$perm_rpath $libdir" ;;
4479
+	  esac
4480
+	fi
4481
+	case $host in
4482
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
4483
+	  testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
4484
+	  case :$dllsearchpath: in
4485
+	  *":$libdir:"*) ;;
4486
+	  *) dllsearchpath="$dllsearchpath:$libdir";;
4487
+	  esac
4488
+	  case :$dllsearchpath: in
4489
+	  *":$testbindir:"*) ;;
4490
+	  *) dllsearchpath="$dllsearchpath:$testbindir";;
4491
+	  esac
4492
+	  ;;
4493
+	esac
4494
+      done
4495
+      # Substitute the hardcoded libdirs into the rpath.
4496
+      if test -n "$hardcode_libdir_separator" &&
4497
+	 test -n "$hardcode_libdirs"; then
4498
+	libdir="$hardcode_libdirs"
4499
+	eval rpath=\" $hardcode_libdir_flag_spec\"
4500
+      fi
4501
+      compile_rpath="$rpath"
4502
+
4503
+      rpath=
4504
+      hardcode_libdirs=
4505
+      for libdir in $finalize_rpath; do
4506
+	if test -n "$hardcode_libdir_flag_spec"; then
4507
+	  if test -n "$hardcode_libdir_separator"; then
4508
+	    if test -z "$hardcode_libdirs"; then
4509
+	      hardcode_libdirs="$libdir"
4510
+	    else
4511
+	      # Just accumulate the unique libdirs.
4512
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4513
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4514
+		;;
4515
+	      *)
4516
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4517
+		;;
4518
+	      esac
4519
+	    fi
4520
+	  else
4521
+	    eval flag=\"$hardcode_libdir_flag_spec\"
4522
+	    rpath="$rpath $flag"
4523
+	  fi
4524
+	elif test -n "$runpath_var"; then
4525
+	  case "$finalize_perm_rpath " in
4526
+	  *" $libdir "*) ;;
4527
+	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
4528
+	  esac
4529
+	fi
4530
+      done
4531
+      # Substitute the hardcoded libdirs into the rpath.
4532
+      if test -n "$hardcode_libdir_separator" &&
4533
+	 test -n "$hardcode_libdirs"; then
4534
+	libdir="$hardcode_libdirs"
4535
+	eval rpath=\" $hardcode_libdir_flag_spec\"
4536
+      fi
4537
+      finalize_rpath="$rpath"
4538
+
4539
+      if test -n "$libobjs" && test "$build_old_libs" = yes; then
4540
+	# Transform all the library objects into standard objects.
4541
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4542
+	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4543
+      fi
4544
+
4545
+      dlsyms=
4546
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4547
+	if test -n "$NM" && test -n "$global_symbol_pipe"; then
4548
+	  dlsyms="${outputname}S.c"
4549
+	else
4550
+	  $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4551
+	fi
4552
+      fi
4553
+
4554
+      if test -n "$dlsyms"; then
4555
+	case $dlsyms in
4556
+	"") ;;
4557
+	*.c)
4558
+	  # Discover the nlist of each of the dlfiles.
4559
+	  nlist="$output_objdir/${outputname}.nm"
4560
+
4561
+	  $show "$rm $nlist ${nlist}S ${nlist}T"
4562
+	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
4563
+
4564
+	  # Parse the name list into a source file.
4565
+	  $show "creating $output_objdir/$dlsyms"
4566
+
4567
+	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4568
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4569
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4570
+
4571
+#ifdef __cplusplus
4572
+extern \"C\" {
4573
+#endif
4574
+
4575
+/* Prevent the only kind of declaration conflicts we can make. */
4576
+#define lt_preloaded_symbols some_other_symbol
4577
+
4578
+/* External symbol declarations for the compiler. */\
4579
+"
4580
+
4581
+	  if test "$dlself" = yes; then
4582
+	    $show "generating symbol list for \`$output'"
4583
+
4584
+	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4585
+
4586
+	    # Add our own program objects to the symbol list.
4587
+	    progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4588
+	    for arg in $progfiles; do
4589
+	      $show "extracting global C symbols from \`$arg'"
4590
+	      $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4591
+	    done
4592
+
4593
+	    if test -n "$exclude_expsyms"; then
4594
+	      $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4595
+	      $run eval '$mv "$nlist"T "$nlist"'
4596
+	    fi
4597
+
4598
+	    if test -n "$export_symbols_regex"; then
4599
+	      $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4600
+	      $run eval '$mv "$nlist"T "$nlist"'
4601
+	    fi
4602
+
4603
+	    # Prepare the list of exported symbols
4604
+	    if test -z "$export_symbols"; then
4605
+	      export_symbols="$output_objdir/$outputname.exp"
4606
+	      $run $rm $export_symbols
4607
+	      $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4608
+              case $host in
4609
+              *cygwin* | *mingw* )
4610
+	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4611
+		$run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
4612
+                ;;
4613
+              esac
4614
+	    else
4615
+	      $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4616
+	      $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4617
+	      $run eval 'mv "$nlist"T "$nlist"'
4618
+              case $host in
4619
+              *cygwin* | *mingw* )
4620
+	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4621
+		$run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
4622
+                ;;
4623
+              esac
4624
+	    fi
4625
+	  fi
4626
+
4627
+	  for arg in $dlprefiles; do
4628
+	    $show "extracting global C symbols from \`$arg'"
4629
+	    name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4630
+	    $run eval '$echo ": $name " >> "$nlist"'
4631
+	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4632
+	  done
4633
+
4634
+	  if test -z "$run"; then
4635
+	    # Make sure we have at least an empty file.
4636
+	    test -f "$nlist" || : > "$nlist"
4637
+
4638
+	    if test -n "$exclude_expsyms"; then
4639
+	      $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4640
+	      $mv "$nlist"T "$nlist"
4641
+	    fi
4642
+
4643
+	    # Try sorting and uniquifying the output.
4644
+	    if grep -v "^: " < "$nlist" |
4645
+		if sort -k 3 </dev/null >/dev/null 2>&1; then
4646
+		  sort -k 3
4647
+		else
4648
+		  sort +2
4649
+		fi |
4650
+		uniq > "$nlist"S; then
4651
+	      :
4652
+	    else
4653
+	      grep -v "^: " < "$nlist" > "$nlist"S
4654
+	    fi
4655
+
4656
+	    if test -f "$nlist"S; then
4657
+	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
4658
+	    else
4659
+	      $echo '/* NONE */' >> "$output_objdir/$dlsyms"
4660
+	    fi
4661
+
4662
+	    $echo >> "$output_objdir/$dlsyms" "\
4663
+
4664
+#undef lt_preloaded_symbols
4665
+
4666
+#if defined (__STDC__) && __STDC__
4667
+# define lt_ptr void *
4668
+#else
4669
+# define lt_ptr char *
4670
+# define const
4671
+#endif
4672
+
4673
+/* The mapping between symbol names and symbols. */
4674
+"
4675
+
4676
+	    case $host in
4677
+	    *cygwin* | *mingw* )
4678
+	  $echo >> "$output_objdir/$dlsyms" "\
4679
+/* DATA imports from DLLs on WIN32 can't be const, because
4680
+   runtime relocations are performed -- see ld's documentation
4681
+   on pseudo-relocs */
4682
+struct {
4683
+"
4684
+	      ;;
4685
+	    * )
4686
+	  $echo >> "$output_objdir/$dlsyms" "\
4687
+const struct {
4688
+"
4689
+	      ;;
4690
+	    esac
4691
+
4692
+
4693
+	  $echo >> "$output_objdir/$dlsyms" "\
4694
+  const char *name;
4695
+  lt_ptr address;
4696
+}
4697
+lt_preloaded_symbols[] =
4698
+{\
4699
+"
4700
+
4701
+	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
4702
+
4703
+	    $echo >> "$output_objdir/$dlsyms" "\
4704
+  {0, (lt_ptr) 0}
4705
+};
4706
+
4707
+/* This works around a problem in FreeBSD linker */
4708
+#ifdef FREEBSD_WORKAROUND
4709
+static const void *lt_preloaded_setup() {
4710
+  return lt_preloaded_symbols;
4711
+}
4712
+#endif
4713
+
4714
+#ifdef __cplusplus
4715
+}
4716
+#endif\
4717
+"
4718
+	  fi
4719
+
4720
+	  pic_flag_for_symtable=
4721
+	  case $host in
4722
+	  # compiling the symbol table file with pic_flag works around
4723
+	  # a FreeBSD bug that causes programs to crash when -lm is
4724
+	  # linked before any other PIC object.  But we must not use
4725
+	  # pic_flag when linking with -static.  The problem exists in
4726
+	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
4727
+	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
4728
+	    case "$compile_command " in
4729
+	    *" -static "*) ;;
4730
+	    *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
4731
+	    esac;;
4732
+	  *-*-hpux*)
4733
+	    case "$compile_command " in
4734
+	    *" -static "*) ;;
4735
+	    *) pic_flag_for_symtable=" $pic_flag";;
4736
+	    esac
4737
+	  esac
4738
+
4739
+	  # Now compile the dynamic symbol file.
4740
+	  $show "(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4741
+	  $run eval '(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
4742
+
4743
+	  # Clean up the generated files.
4744
+	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
4745
+	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
4746
+
4747
+	  # Transform the symbol file into the correct name.
4748
+          case $host in
4749
+          *cygwin* | *mingw* )
4750
+            if test -f "$output_objdir/${outputname}.def" ; then
4751
+              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
4752
+              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
4753
+            else
4754
+              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4755
+              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4756
+             fi
4757
+            ;;
4758
+          * )
4759
+            compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4760
+            finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4761
+            ;;
4762
+          esac
4763
+	  ;;
4764
+	*)
4765
+	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
4766
+	  exit $EXIT_FAILURE
4767
+	  ;;
4768
+	esac
4769
+      else
4770
+	# We keep going just in case the user didn't refer to
4771
+	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
4772
+	# really was required.
4773
+
4774
+	# Nullify the symbol file.
4775
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
4776
+	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
4777
+      fi
4778
+
4779
+      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
4780
+	# Replace the output file specification.
4781
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
4782
+	link_command="$compile_command$compile_rpath"
4783
+
4784
+	# We have no uninstalled library dependencies, so finalize right now.
4785
+	$show "$link_command"
4786
+	$run eval "$link_command"
4787
+	exit_status=$?
4788
+
4789
+	# Delete the generated files.
4790
+	if test -n "$dlsyms"; then
4791
+	  $show "$rm $output_objdir/${outputname}S.${objext}"
4792
+	  $run $rm "$output_objdir/${outputname}S.${objext}"
4793
+	fi
4794
+
4795
+	exit $exit_status
4796
+      fi
4797
+
4798
+      if test -n "$shlibpath_var"; then
4799
+	# We should set the shlibpath_var
4800
+	rpath=
4801
+	for dir in $temp_rpath; do
4802
+	  case $dir in
4803
+	  [\\/]* | [A-Za-z]:[\\/]*)
4804
+	    # Absolute path.
4805
+	    rpath="$rpath$dir:"
4806
+	    ;;
4807
+	  *)
4808
+	    # Relative path: add a thisdir entry.
4809
+	    rpath="$rpath\$thisdir/$dir:"
4810
+	    ;;
4811
+	  esac
4812
+	done
4813
+	temp_rpath="$rpath"
4814
+      fi
4815
+
4816
+      if test -n "$compile_shlibpath$finalize_shlibpath"; then
4817
+	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
4818
+      fi
4819
+      if test -n "$finalize_shlibpath"; then
4820
+	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
4821
+      fi
4822
+
4823
+      compile_var=
4824
+      finalize_var=
4825
+      if test -n "$runpath_var"; then
4826
+	if test -n "$perm_rpath"; then
4827
+	  # We should set the runpath_var.
4828
+	  rpath=
4829
+	  for dir in $perm_rpath; do
4830
+	    rpath="$rpath$dir:"
4831
+	  done
4832
+	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
4833
+	fi
4834
+	if test -n "$finalize_perm_rpath"; then
4835
+	  # We should set the runpath_var.
4836
+	  rpath=
4837
+	  for dir in $finalize_perm_rpath; do
4838
+	    rpath="$rpath$dir:"
4839
+	  done
4840
+	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
4841
+	fi
4842
+      fi
4843
+
4844
+      if test "$no_install" = yes; then
4845
+	# We don't need to create a wrapper script.
4846
+	link_command="$compile_var$compile_command$compile_rpath"
4847
+	# Replace the output file specification.
4848
+	link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4849
+	# Delete the old output file.
4850
+	$run $rm $output
4851
+	# Link the executable and exit
4852
+	$show "$link_command"
4853
+	$run eval "$link_command" || exit $?
4854
+	exit $EXIT_SUCCESS
4855
+      fi
4856
+
4857
+      if test "$hardcode_action" = relink; then
4858
+	# Fast installation is not supported
4859
+	link_command="$compile_var$compile_command$compile_rpath"
4860
+	relink_command="$finalize_var$finalize_command$finalize_rpath"
4861
+
4862
+	$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
4863
+	$echo "$modename: \`$output' will be relinked during installation" 1>&2
4864
+      else
4865
+	if test "$fast_install" != no; then
4866
+	  link_command="$finalize_var$compile_command$finalize_rpath"
4867
+	  if test "$fast_install" = yes; then
4868
+	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
4869
+	  else
4870
+	    # fast_install is set to needless
4871
+	    relink_command=
4872
+	  fi
4873
+	else
4874
+	  link_command="$compile_var$compile_command$compile_rpath"
4875
+	  relink_command="$finalize_var$finalize_command$finalize_rpath"
4876
+	fi
4877
+      fi
4878
+
4879
+      # Replace the output file specification.
4880
+      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
4881
+
4882
+      # Delete the old output files.
4883
+      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
4884
+
4885
+      $show "$link_command"
4886
+      $run eval "$link_command" || exit $?
4887
+
4888
+      # Now create the wrapper script.
4889
+      $show "creating $output"
4890
+
4891
+      # Quote the relink command for shipping.
4892
+      if test -n "$relink_command"; then
4893
+	# Preserve any variables that may affect compiler behavior
4894
+	for var in $variables_saved_for_relink; do
4895
+	  if eval test -z \"\${$var+set}\"; then
4896
+	    relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
4897
+	  elif eval var_value=\$$var; test -z "$var_value"; then
4898
+	    relink_command="$var=; export $var; $relink_command"
4899
+	  else
4900
+	    var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
4901
+	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
4902
+	  fi
4903
+	done
4904
+	relink_command="(cd `pwd`; $relink_command)"
4905
+	relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
4906
+      fi
4907
+
4908
+      # Quote $echo for shipping.
4909
+      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
4910
+	case $progpath in
4911
+	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
4912
+	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
4913
+	esac
4914
+	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
4915
+      else
4916
+	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
4917
+      fi
4918
+
4919
+      # Only actually do things if our run command is non-null.
4920
+      if test -z "$run"; then
4921
+	# win32 will think the script is a binary if it has
4922
+	# a .exe suffix, so we strip it off here.
4923
+	case $output in
4924
+	  *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
4925
+	esac
4926
+	# test for cygwin because mv fails w/o .exe extensions
4927
+	case $host in
4928
+	  *cygwin*)
4929
+	    exeext=.exe
4930
+	    outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
4931
+	  *) exeext= ;;
4932
+	esac
4933
+	case $host in
4934
+	  *cygwin* | *mingw* )
4935
+            output_name=`basename $output`
4936
+            output_path=`dirname $output`
4937
+            cwrappersource="$output_path/$objdir/lt-$output_name.c"
4938
+            cwrapper="$output_path/$output_name.exe"
4939
+            $rm $cwrappersource $cwrapper
4940
+            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
4941
+
4942
+	    cat > $cwrappersource <<EOF
4943
+
4944
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4945
+   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4946
+
4947
+   The $output program cannot be directly executed until all the libtool
4948
+   libraries that it depends on are installed.
4949
+
4950
+   This wrapper executable should never be moved out of the build directory.
4951
+   If it is, it will not operate correctly.
4952
+
4953
+   Currently, it simply execs the wrapper *script* "/bin/sh $output",
4954
+   but could eventually absorb all of the scripts functionality and
4955
+   exec $objdir/$outputname directly.
4956
+*/
4957
+EOF
4958
+	    cat >> $cwrappersource<<"EOF"
4959
+#include <stdio.h>
4960
+#include <stdlib.h>
4961
+#include <unistd.h>
4962
+#include <malloc.h>
4963
+#include <stdarg.h>
4964
+#include <assert.h>
4965
+#include <string.h>
4966
+#include <ctype.h>
4967
+#include <sys/stat.h>
4968
+
4969
+#if defined(PATH_MAX)
4970
+# define LT_PATHMAX PATH_MAX
4971
+#elif defined(MAXPATHLEN)
4972
+# define LT_PATHMAX MAXPATHLEN
4973
+#else
4974
+# define LT_PATHMAX 1024
4975
+#endif
4976
+
4977
+#ifndef DIR_SEPARATOR
4978
+# define DIR_SEPARATOR '/'
4979
+# define PATH_SEPARATOR ':'
4980
+#endif
4981
+
4982
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
4983
+  defined (__OS2__)
4984
+# define HAVE_DOS_BASED_FILE_SYSTEM
4985
+# ifndef DIR_SEPARATOR_2
4986
+#  define DIR_SEPARATOR_2 '\\'
4987
+# endif
4988
+# ifndef PATH_SEPARATOR_2
4989
+#  define PATH_SEPARATOR_2 ';'
4990
+# endif
4991
+#endif
4992
+
4993
+#ifndef DIR_SEPARATOR_2
4994
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
4995
+#else /* DIR_SEPARATOR_2 */
4996
+# define IS_DIR_SEPARATOR(ch) \
4997
+        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
4998
+#endif /* DIR_SEPARATOR_2 */
4999
+
5000
+#ifndef PATH_SEPARATOR_2
5001
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
5002
+#else /* PATH_SEPARATOR_2 */
5003
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
5004
+#endif /* PATH_SEPARATOR_2 */
5005
+
5006
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
5007
+#define XFREE(stale) do { \
5008
+  if (stale) { free ((void *) stale); stale = 0; } \
5009
+} while (0)
5010
+
5011
+/* -DDEBUG is fairly common in CFLAGS.  */
5012
+#undef DEBUG
5013
+#if defined DEBUGWRAPPER
5014
+# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
5015
+#else
5016
+# define DEBUG(format, ...)
5017
+#endif
5018
+
5019
+const char *program_name = NULL;
5020
+
5021
+void * xmalloc (size_t num);
5022
+char * xstrdup (const char *string);
5023
+const char * base_name (const char *name);
5024
+char * find_executable(const char *wrapper);
5025
+int    check_executable(const char *path);
5026
+char * strendzap(char *str, const char *pat);
5027
+void lt_fatal (const char *message, ...);
5028
+
5029
+int
5030
+main (int argc, char *argv[])
5031
+{
5032
+  char **newargz;
5033
+  int i;
5034
+
5035
+  program_name = (char *) xstrdup (base_name (argv[0]));
5036
+  DEBUG("(main) argv[0]      : %s\n",argv[0]);
5037
+  DEBUG("(main) program_name : %s\n",program_name);
5038
+  newargz = XMALLOC(char *, argc+2);
5039
+EOF
5040
+
5041
+            cat >> $cwrappersource <<EOF
5042
+  newargz[0] = (char *) xstrdup("$SHELL");
5043
+EOF
5044
+
5045
+            cat >> $cwrappersource <<"EOF"
5046
+  newargz[1] = find_executable(argv[0]);
5047
+  if (newargz[1] == NULL)
5048
+    lt_fatal("Couldn't find %s", argv[0]);
5049
+  DEBUG("(main) found exe at : %s\n",newargz[1]);
5050
+  /* we know the script has the same name, without the .exe */
5051
+  /* so make sure newargz[1] doesn't end in .exe */
5052
+  strendzap(newargz[1],".exe");
5053
+  for (i = 1; i < argc; i++)
5054
+    newargz[i+1] = xstrdup(argv[i]);
5055
+  newargz[argc+1] = NULL;
5056
+
5057
+  for (i=0; i<argc+1; i++)
5058
+  {
5059
+    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
5060
+    ;
5061
+  }
5062
+
5063
+EOF
5064
+
5065
+            case $host_os in
5066
+              mingw*)
5067
+                cat >> $cwrappersource <<EOF
5068
+  execv("$SHELL",(char const **)newargz);
5069
+EOF
5070
+              ;;
5071
+              *)
5072
+                cat >> $cwrappersource <<EOF
5073
+  execv("$SHELL",newargz);
5074
+EOF
5075
+              ;;
5076
+            esac
5077
+
5078
+            cat >> $cwrappersource <<"EOF"
5079
+  return 127;
5080
+}
5081
+
5082
+void *
5083
+xmalloc (size_t num)
5084
+{
5085
+  void * p = (void *) malloc (num);
5086
+  if (!p)
5087
+    lt_fatal ("Memory exhausted");
5088
+
5089
+  return p;
5090
+}
5091
+
5092
+char *
5093
+xstrdup (const char *string)
5094
+{
5095
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5096
+;
5097
+}
5098
+
5099
+const char *
5100
+base_name (const char *name)
5101
+{
5102
+  const char *base;
5103
+
5104
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5105
+  /* Skip over the disk name in MSDOS pathnames. */
5106
+  if (isalpha ((unsigned char)name[0]) && name[1] == ':')
5107
+    name += 2;
5108
+#endif
5109
+
5110
+  for (base = name; *name; name++)
5111
+    if (IS_DIR_SEPARATOR (*name))
5112
+      base = name + 1;
5113
+  return base;
5114
+}
5115
+
5116
+int
5117
+check_executable(const char * path)
5118
+{
5119
+  struct stat st;
5120
+
5121
+  DEBUG("(check_executable)  : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
5122
+  if ((!path) || (!*path))
5123
+    return 0;
5124
+
5125
+  if ((stat (path, &st) >= 0) &&
5126
+      (
5127
+        /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
5128
+#if defined (S_IXOTH)
5129
+       ((st.st_mode & S_IXOTH) == S_IXOTH) ||
5130
+#endif
5131
+#if defined (S_IXGRP)
5132
+       ((st.st_mode & S_IXGRP) == S_IXGRP) ||
5133
+#endif
5134
+       ((st.st_mode & S_IXUSR) == S_IXUSR))
5135
+      )
5136
+    return 1;
5137
+  else
5138
+    return 0;
5139
+}
5140
+
5141
+/* Searches for the full path of the wrapper.  Returns
5142
+   newly allocated full path name if found, NULL otherwise */
5143
+char *
5144
+find_executable (const char* wrapper)
5145
+{
5146
+  int has_slash = 0;
5147
+  const char* p;
5148
+  const char* p_next;
5149
+  /* static buffer for getcwd */
5150
+  char tmp[LT_PATHMAX + 1];
5151
+  int tmp_len;
5152
+  char* concat_name;
5153
+
5154
+  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
5155
+
5156
+  if ((wrapper == NULL) || (*wrapper == '\0'))
5157
+    return NULL;
5158
+
5159
+  /* Absolute path? */
5160
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5161
+  if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
5162
+  {
5163
+    concat_name = xstrdup (wrapper);
5164
+    if (check_executable(concat_name))
5165
+      return concat_name;
5166
+    XFREE(concat_name);
5167
+  }
5168
+  else
5169
+  {
5170
+#endif
5171
+    if (IS_DIR_SEPARATOR (wrapper[0]))
5172
+    {
5173
+      concat_name = xstrdup (wrapper);
5174
+      if (check_executable(concat_name))
5175
+        return concat_name;
5176
+      XFREE(concat_name);
5177
+    }
5178
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5179
+  }
5180
+#endif
5181
+
5182
+  for (p = wrapper; *p; p++)
5183
+    if (*p == '/')
5184
+    {
5185
+      has_slash = 1;
5186
+      break;
5187
+    }
5188
+  if (!has_slash)
5189
+  {
5190
+    /* no slashes; search PATH */
5191
+    const char* path = getenv ("PATH");
5192
+    if (path != NULL)
5193
+    {
5194
+      for (p = path; *p; p = p_next)
5195
+      {
5196
+        const char* q;
5197
+        size_t p_len;
5198
+        for (q = p; *q; q++)
5199
+          if (IS_PATH_SEPARATOR(*q))
5200
+            break;
5201
+        p_len = q - p;
5202
+        p_next = (*q == '\0' ? q : q + 1);
5203
+        if (p_len == 0)
5204
+        {
5205
+          /* empty path: current directory */
5206
+          if (getcwd (tmp, LT_PATHMAX) == NULL)
5207
+            lt_fatal ("getcwd failed");
5208
+          tmp_len = strlen(tmp);
5209
+          concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5210
+          memcpy (concat_name, tmp, tmp_len);
5211
+          concat_name[tmp_len] = '/';
5212
+          strcpy (concat_name + tmp_len + 1, wrapper);
5213
+        }
5214
+        else
5215
+        {
5216
+          concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
5217
+          memcpy (concat_name, p, p_len);
5218
+          concat_name[p_len] = '/';
5219
+          strcpy (concat_name + p_len + 1, wrapper);
5220
+        }
5221
+        if (check_executable(concat_name))
5222
+          return concat_name;
5223
+        XFREE(concat_name);
5224
+      }
5225
+    }
5226
+    /* not found in PATH; assume curdir */
5227
+  }
5228
+  /* Relative path | not found in path: prepend cwd */
5229
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
5230
+    lt_fatal ("getcwd failed");
5231
+  tmp_len = strlen(tmp);
5232
+  concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5233
+  memcpy (concat_name, tmp, tmp_len);
5234
+  concat_name[tmp_len] = '/';
5235
+  strcpy (concat_name + tmp_len + 1, wrapper);
5236
+
5237
+  if (check_executable(concat_name))
5238
+    return concat_name;
5239
+  XFREE(concat_name);
5240
+  return NULL;
5241
+}
5242
+
5243
+char *
5244
+strendzap(char *str, const char *pat)
5245
+{
5246
+  size_t len, patlen;
5247
+
5248
+  assert(str != NULL);
5249
+  assert(pat != NULL);
5250
+
5251
+  len = strlen(str);
5252
+  patlen = strlen(pat);
5253
+
5254
+  if (patlen <= len)
5255
+  {
5256
+    str += len - patlen;
5257
+    if (strcmp(str, pat) == 0)
5258
+      *str = '\0';
5259
+  }
5260
+  return str;
5261
+}
5262
+
5263
+static void
5264
+lt_error_core (int exit_status, const char * mode,
5265
+          const char * message, va_list ap)
5266
+{
5267
+  fprintf (stderr, "%s: %s: ", program_name, mode);
5268
+  vfprintf (stderr, message, ap);
5269
+  fprintf (stderr, ".\n");
5270
+
5271
+  if (exit_status >= 0)
5272
+    exit (exit_status);
5273
+}
5274
+
5275
+void
5276
+lt_fatal (const char *message, ...)
5277
+{
5278
+  va_list ap;
5279
+  va_start (ap, message);
5280
+  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
5281
+  va_end (ap);
5282
+}
5283
+EOF
5284
+          # we should really use a build-platform specific compiler
5285
+          # here, but OTOH, the wrappers (shell script and this C one)
5286
+          # are only useful if you want to execute the "real" binary.
5287
+          # Since the "real" binary is built for $host, then this
5288
+          # wrapper might as well be built for $host, too.
5289
+          $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
5290
+          ;;
5291
+        esac
5292
+        $rm $output
5293
+        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
5294
+
5295
+	$echo > $output "\
5296
+#! $SHELL
5297
+
5298
+# $output - temporary wrapper script for $objdir/$outputname
5299
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5300
+#
5301
+# The $output program cannot be directly executed until all the libtool
5302
+# libraries that it depends on are installed.
5303
+#
5304
+# This wrapper script should never be moved out of the build directory.
5305
+# If it is, it will not operate correctly.
5306
+
5307
+# Sed substitution that helps us do robust quoting.  It backslashifies
5308
+# metacharacters that are still active within double-quoted strings.
5309
+Xsed='${SED} -e 1s/^X//'
5310
+sed_quote_subst='$sed_quote_subst'
5311
+
5312
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
5313
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
5314
+  emulate sh
5315
+  NULLCMD=:
5316
+  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
5317
+  # is contrary to our usage.  Disable this feature.
5318
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
5319
+  setopt NO_GLOB_SUBST
5320
+else
5321
+  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
5322
+fi
5323
+BIN_SH=xpg4; export BIN_SH # for Tru64
5324
+DUALCASE=1; export DUALCASE # for MKS sh
5325
+
5326
+# The HP-UX ksh and POSIX shell print the target directory to stdout
5327
+# if CDPATH is set.
5328
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5329
+
5330
+relink_command=\"$relink_command\"
5331
+
5332
+# This environment variable determines our operation mode.
5333
+if test \"\$libtool_install_magic\" = \"$magic\"; then
5334
+  # install mode needs the following variable:
5335
+  notinst_deplibs='$notinst_deplibs'
5336
+else
5337
+  # When we are sourced in execute mode, \$file and \$echo are already set.
5338
+  if test \"\$libtool_execute_magic\" != \"$magic\"; then
5339
+    echo=\"$qecho\"
5340
+    file=\"\$0\"
5341
+    # Make sure echo works.
5342
+    if test \"X\$1\" = X--no-reexec; then
5343
+      # Discard the --no-reexec flag, and continue.
5344
+      shift
5345
+    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
5346
+      # Yippee, \$echo works!
5347
+      :
5348
+    else
5349
+      # Restart under the correct shell, and then maybe \$echo will work.
5350
+      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
5351
+    fi
5352
+  fi\
5353
+"
5354
+	$echo >> $output "\
5355
+
5356
+  # Find the directory that this script lives in.
5357
+  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
5358
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5359
+
5360
+  # Follow symbolic links until we get to the real thisdir.
5361
+  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
5362
+  while test -n \"\$file\"; do
5363
+    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
5364
+
5365
+    # If there was a directory component, then change thisdir.
5366
+    if test \"x\$destdir\" != \"x\$file\"; then
5367
+      case \"\$destdir\" in
5368
+      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5369
+      *) thisdir=\"\$thisdir/\$destdir\" ;;
5370
+      esac
5371
+    fi
5372
+
5373
+    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
5374
+    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
5375
+  done
5376
+
5377
+  # Try to get the absolute directory name.
5378
+  absdir=\`cd \"\$thisdir\" && pwd\`
5379
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
5380
+"
5381
+
5382
+	if test "$fast_install" = yes; then
5383
+	  $echo >> $output "\
5384
+  program=lt-'$outputname'$exeext
5385
+  progdir=\"\$thisdir/$objdir\"
5386
+
5387
+  if test ! -f \"\$progdir/\$program\" || \\
5388
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5389
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5390
+
5391
+    file=\"\$\$-\$program\"
5392
+
5393
+    if test ! -d \"\$progdir\"; then
5394
+      $mkdir \"\$progdir\"
5395
+    else
5396
+      $rm \"\$progdir/\$file\"
5397
+    fi"
5398
+
5399
+	  $echo >> $output "\
5400
+
5401
+    # relink executable if necessary
5402
+    if test -n \"\$relink_command\"; then
5403
+      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5404
+      else
5405
+	$echo \"\$relink_command_output\" >&2
5406
+	$rm \"\$progdir/\$file\"
5407
+	exit $EXIT_FAILURE
5408
+      fi
5409
+    fi
5410
+
5411
+    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5412
+    { $rm \"\$progdir/\$program\";
5413
+      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5414
+    $rm \"\$progdir/\$file\"
5415
+  fi"
5416
+	else
5417
+	  $echo >> $output "\
5418
+  program='$outputname'
5419
+  progdir=\"\$thisdir/$objdir\"
5420
+"
5421
+	fi
5422
+
5423
+	$echo >> $output "\
5424
+
5425
+  if test -f \"\$progdir/\$program\"; then"
5426
+
5427
+	# Export our shlibpath_var if we have one.
5428
+	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5429
+	  $echo >> $output "\
5430
+    # Add our own library path to $shlibpath_var
5431
+    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5432
+
5433
+    # Some systems cannot cope with colon-terminated $shlibpath_var
5434
+    # The second colon is a workaround for a bug in BeOS R4 sed
5435
+    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
5436
+
5437
+    export $shlibpath_var
5438
+"
5439
+	fi
5440
+
5441
+	# fixup the dll searchpath if we need to.
5442
+	if test -n "$dllsearchpath"; then
5443
+	  $echo >> $output "\
5444
+    # Add the dll search path components to the executable PATH
5445
+    PATH=$dllsearchpath:\$PATH
5446
+"
5447
+	fi
5448
+
5449
+	$echo >> $output "\
5450
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
5451
+      # Run the actual program with our arguments.
5452
+"
5453
+	case $host in
5454
+	# Backslashes separate directories on plain windows
5455
+	*-*-mingw | *-*-os2*)
5456
+	  $echo >> $output "\
5457
+      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
5458
+"
5459
+	  ;;
5460
+
5461
+	*)
5462
+	  $echo >> $output "\
5463
+      exec \"\$progdir/\$program\" \${1+\"\$@\"}
5464
+"
5465
+	  ;;
5466
+	esac
5467
+	$echo >> $output "\
5468
+      \$echo \"\$0: cannot exec \$program \$*\"
5469
+      exit $EXIT_FAILURE
5470
+    fi
5471
+  else
5472
+    # The program doesn't exist.
5473
+    \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
5474
+    \$echo \"This script is just a wrapper for \$program.\" 1>&2
5475
+    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5476
+    exit $EXIT_FAILURE
5477
+  fi
5478
+fi\
5479
+"
5480
+	chmod +x $output
5481
+      fi
5482
+      exit $EXIT_SUCCESS
5483
+      ;;
5484
+    esac
5485
+
5486
+    # See if we need to build an old-fashioned archive.
5487
+    for oldlib in $oldlibs; do
5488
+
5489
+      if test "$build_libtool_libs" = convenience; then
5490
+	oldobjs="$libobjs_save"
5491
+	addlibs="$convenience"
5492
+	build_libtool_libs=no
5493
+      else
5494
+	if test "$build_libtool_libs" = module; then
5495
+	  oldobjs="$libobjs_save"
5496
+	  build_libtool_libs=no
5497
+	else
5498
+	  oldobjs="$old_deplibs $non_pic_objects"
5499
+	fi
5500
+	addlibs="$old_convenience"
5501
+      fi
5502
+
5503
+      if test -n "$addlibs"; then
5504
+	gentop="$output_objdir/${outputname}x"
5505
+	generated="$generated $gentop"
5506
+
5507
+	func_extract_archives $gentop $addlibs
5508
+	oldobjs="$oldobjs $func_extract_archives_result"
5509
+      fi
5510
+
5511
+      # Do each command in the archive commands.
5512
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5513
+       cmds=$old_archive_from_new_cmds
5514
+      else
5515
+	# POSIX demands no paths to be encoded in archives.  We have
5516
+	# to avoid creating archives with duplicate basenames if we
5517
+	# might have to extract them afterwards, e.g., when creating a
5518
+	# static archive out of a convenience library, or when linking
5519
+	# the entirety of a libtool archive into another (currently
5520
+	# not supported by libtool).
5521
+	if (for obj in $oldobjs
5522
+	    do
5523
+	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
5524
+	    done | sort | sort -uc >/dev/null 2>&1); then
5525
+	  :
5526
+	else
5527
+	  $echo "copying selected object files to avoid basename conflicts..."
5528
+
5529
+	  if test -z "$gentop"; then
5530
+	    gentop="$output_objdir/${outputname}x"
5531
+	    generated="$generated $gentop"
5532
+
5533
+	    $show "${rm}r $gentop"
5534
+	    $run ${rm}r "$gentop"
5535
+	    $show "$mkdir $gentop"
5536
+	    $run $mkdir "$gentop"
5537
+	    exit_status=$?
5538
+	    if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
5539
+	      exit $exit_status
5540
+	    fi
5541
+	  fi
5542
+
5543
+	  save_oldobjs=$oldobjs
5544
+	  oldobjs=
5545
+	  counter=1
5546
+	  for obj in $save_oldobjs
5547
+	  do
5548
+	    objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
5549
+	    case " $oldobjs " in
5550
+	    " ") oldobjs=$obj ;;
5551
+	    *[\ /]"$objbase "*)
5552
+	      while :; do
5553
+		# Make sure we don't pick an alternate name that also
5554
+		# overlaps.
5555
+		newobj=lt$counter-$objbase
5556
+		counter=`expr $counter + 1`
5557
+		case " $oldobjs " in
5558
+		*[\ /]"$newobj "*) ;;
5559
+		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
5560
+		esac
5561
+	      done
5562
+	      $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5563
+	      $run ln "$obj" "$gentop/$newobj" ||
5564
+	      $run cp "$obj" "$gentop/$newobj"
5565
+	      oldobjs="$oldobjs $gentop/$newobj"
5566
+	      ;;
5567
+	    *) oldobjs="$oldobjs $obj" ;;
5568
+	    esac
5569
+	  done
5570
+	fi
5571
+
5572
+	eval cmds=\"$old_archive_cmds\"
5573
+
5574
+	if len=`expr "X$cmds" : ".*"` &&
5575
+	     test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5576
+	  cmds=$old_archive_cmds
5577
+	else
5578
+	  # the command line is too long to link in one step, link in parts
5579
+	  $echo "using piecewise archive linking..."
5580
+	  save_RANLIB=$RANLIB
5581
+	  RANLIB=:
5582
+	  objlist=
5583
+	  concat_cmds=
5584
+	  save_oldobjs=$oldobjs
5585
+
5586
+	  # Is there a better way of finding the last object in the list?
5587
+	  for obj in $save_oldobjs
5588
+	  do
5589
+	    last_oldobj=$obj
5590
+	  done
5591
+	  for obj in $save_oldobjs
5592
+	  do
5593
+	    oldobjs="$objlist $obj"
5594
+	    objlist="$objlist $obj"
5595
+	    eval test_cmds=\"$old_archive_cmds\"
5596
+	    if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
5597
+	       test "$len" -le "$max_cmd_len"; then
5598
+	      :
5599
+	    else
5600
+	      # the above command should be used before it gets too long
5601
+	      oldobjs=$objlist
5602
+	      if test "$obj" = "$last_oldobj" ; then
5603
+	        RANLIB=$save_RANLIB
5604
+	      fi
5605
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
5606
+	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
5607
+	      objlist=
5608
+	    fi
5609
+	  done
5610
+	  RANLIB=$save_RANLIB
5611
+	  oldobjs=$objlist
5612
+	  if test "X$oldobjs" = "X" ; then
5613
+	    eval cmds=\"\$concat_cmds\"
5614
+	  else
5615
+	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
5616
+	  fi
5617
+	fi
5618
+      fi
5619
+      save_ifs="$IFS"; IFS='~'
5620
+      for cmd in $cmds; do
5621
+        eval cmd=\"$cmd\"
5622
+	IFS="$save_ifs"
5623
+	$show "$cmd"
5624
+	$run eval "$cmd" || exit $?
5625
+      done
5626
+      IFS="$save_ifs"
5627
+    done
5628
+
5629
+    if test -n "$generated"; then
5630
+      $show "${rm}r$generated"
5631
+      $run ${rm}r$generated
5632
+    fi
5633
+
5634
+    # Now create the libtool archive.
5635
+    case $output in
5636
+    *.la)
5637
+      old_library=
5638
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
5639
+      $show "creating $output"
5640
+
5641
+      # Preserve any variables that may affect compiler behavior
5642
+      for var in $variables_saved_for_relink; do
5643
+	if eval test -z \"\${$var+set}\"; then
5644
+	  relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5645
+	elif eval var_value=\$$var; test -z "$var_value"; then
5646
+	  relink_command="$var=; export $var; $relink_command"
5647
+	else
5648
+	  var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5649
+	  relink_command="$var=\"$var_value\"; export $var; $relink_command"
5650
+	fi
5651
+      done
5652
+      # Quote the link command for shipping.
5653
+      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
5654
+      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
5655
+      if test "$hardcode_automatic" = yes ; then
5656
+	relink_command=
5657
+      fi
5658
+
5659
+
5660
+      # Only create the output if not a dry run.
5661
+      if test -z "$run"; then
5662
+	for installed in no yes; do
5663
+	  if test "$installed" = yes; then
5664
+	    if test -z "$install_libdir"; then
5665
+	      break
5666
+	    fi
5667
+	    output="$output_objdir/$outputname"i
5668
+	    # Replace all uninstalled libtool libraries with the installed ones
5669
+	    newdependency_libs=
5670
+	    for deplib in $dependency_libs; do
5671
+	      case $deplib in
5672
+	      *.la)
5673
+		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
5674
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5675
+		if test -z "$libdir"; then
5676
+		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
5677
+		  exit $EXIT_FAILURE
5678
+		fi
5679
+		newdependency_libs="$newdependency_libs $libdir/$name"
5680
+		;;
5681
+	      *) newdependency_libs="$newdependency_libs $deplib" ;;
5682
+	      esac
5683
+	    done
5684
+	    dependency_libs="$newdependency_libs"
5685
+	    newdlfiles=
5686
+	    for lib in $dlfiles; do
5687
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5688
+	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5689
+	      if test -z "$libdir"; then
5690
+		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5691
+		exit $EXIT_FAILURE
5692
+	      fi
5693
+	      newdlfiles="$newdlfiles $libdir/$name"
5694
+	    done
5695
+	    dlfiles="$newdlfiles"
5696
+	    newdlprefiles=
5697
+	    for lib in $dlprefiles; do
5698
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5699
+	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5700
+	      if test -z "$libdir"; then
5701
+		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5702
+		exit $EXIT_FAILURE
5703
+	      fi
5704
+	      newdlprefiles="$newdlprefiles $libdir/$name"
5705
+	    done
5706
+	    dlprefiles="$newdlprefiles"
5707
+	  else
5708
+	    newdlfiles=
5709
+	    for lib in $dlfiles; do
5710
+	      case $lib in
5711
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5712
+		*) abs=`pwd`"/$lib" ;;
5713
+	      esac
5714
+	      newdlfiles="$newdlfiles $abs"
5715
+	    done
5716
+	    dlfiles="$newdlfiles"
5717
+	    newdlprefiles=
5718
+	    for lib in $dlprefiles; do
5719
+	      case $lib in
5720
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5721
+		*) abs=`pwd`"/$lib" ;;
5722
+	      esac
5723
+	      newdlprefiles="$newdlprefiles $abs"
5724
+	    done
5725
+	    dlprefiles="$newdlprefiles"
5726
+	  fi
5727
+	  $rm $output
5728
+	  # place dlname in correct position for cygwin
5729
+	  tdlname=$dlname
5730
+	  case $host,$output,$installed,$module,$dlname in
5731
+	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
5732
+	  esac
5733
+	  $echo > $output "\
5734
+# $outputname - a libtool library file
5735
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5736
+#
5737
+# Please DO NOT delete this file!
5738
+# It is necessary for linking the library.
5739
+
5740
+# The name that we can dlopen(3).
5741
+dlname='$tdlname'
5742
+
5743
+# Names of this library.
5744
+library_names='$library_names'
5745
+
5746
+# The name of the static archive.
5747
+old_library='$old_library'
5748
+
5749
+# Libraries that this one depends upon.
5750
+dependency_libs='$dependency_libs'
5751
+
5752
+# Version information for $libname.
5753
+current=$current
5754
+age=$age
5755
+revision=$revision
5756
+
5757
+# Is this an already installed library?
5758
+installed=$installed
5759
+
5760
+# Should we warn about portability when linking against -modules?
5761
+shouldnotlink=$module
5762
+
5763
+# Files to dlopen/dlpreopen
5764
+dlopen='$dlfiles'
5765
+dlpreopen='$dlprefiles'
5766
+
5767
+# Directory that this library needs to be installed in:
5768
+libdir='$install_libdir'"
5769
+	  if test "$installed" = no && test "$need_relink" = yes; then
5770
+	    $echo >> $output "\
5771
+relink_command=\"$relink_command\""
5772
+	  fi
5773
+	done
5774
+      fi
5775
+
5776
+      # Do a symbolic link so that the libtool archive can be found in
5777
+      # LD_LIBRARY_PATH before the program is installed.
5778
+      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
5779
+      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
5780
+      ;;
5781
+    esac
5782
+    exit $EXIT_SUCCESS
5783
+    ;;
5784
+
5785
+  # libtool install mode
5786
+  install)
5787
+    modename="$modename: install"
5788
+
5789
+    # There may be an optional sh(1) argument at the beginning of
5790
+    # install_prog (especially on Windows NT).
5791
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
5792
+       # Allow the use of GNU shtool's install command.
5793
+       $echo "X$nonopt" | grep shtool > /dev/null; then
5794
+      # Aesthetically quote it.
5795
+      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5796
+      case $arg in
5797
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
5798
+	arg="\"$arg\""
5799
+	;;
5800
+      esac
5801
+      install_prog="$arg "
5802
+      arg="$1"
5803
+      shift
5804
+    else
5805
+      install_prog=
5806
+      arg=$nonopt
5807
+    fi
5808
+
5809
+    # The real first argument should be the name of the installation program.
5810
+    # Aesthetically quote it.
5811
+    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5812
+    case $arg in
5813
+    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
5814
+      arg="\"$arg\""
5815
+      ;;
5816
+    esac
5817
+    install_prog="$install_prog$arg"
5818
+
5819
+    # We need to accept at least all the BSD install flags.
5820
+    dest=
5821
+    files=
5822
+    opts=
5823
+    prev=
5824
+    install_type=
5825
+    isdir=no
5826
+    stripme=
5827
+    for arg
5828
+    do
5829
+      if test -n "$dest"; then
5830
+	files="$files $dest"
5831
+	dest=$arg
5832
+	continue
5833
+      fi
5834
+
5835
+      case $arg in
5836
+      -d) isdir=yes ;;
5837
+      -f) 
5838
+      	case " $install_prog " in
5839
+	*[\\\ /]cp\ *) ;;
5840
+	*) prev=$arg ;;
5841
+	esac
5842
+	;;
5843
+      -g | -m | -o) prev=$arg ;;
5844
+      -s)
5845
+	stripme=" -s"
5846
+	continue
5847
+	;;
5848
+      -*)
5849
+	;;
5850
+      *)
5851
+	# If the previous option needed an argument, then skip it.
5852
+	if test -n "$prev"; then
5853
+	  prev=
5854
+	else
5855
+	  dest=$arg
5856
+	  continue
5857
+	fi
5858
+	;;
5859
+      esac
5860
+
5861
+      # Aesthetically quote the argument.
5862
+      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5863
+      case $arg in
5864
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
5865
+	arg="\"$arg\""
5866
+	;;
5867
+      esac
5868
+      install_prog="$install_prog $arg"
5869
+    done
5870
+
5871
+    if test -z "$install_prog"; then
5872
+      $echo "$modename: you must specify an install program" 1>&2
5873
+      $echo "$help" 1>&2
5874
+      exit $EXIT_FAILURE
5875
+    fi
5876
+
5877
+    if test -n "$prev"; then
5878
+      $echo "$modename: the \`$prev' option requires an argument" 1>&2
5879
+      $echo "$help" 1>&2
5880
+      exit $EXIT_FAILURE
5881
+    fi
5882
+
5883
+    if test -z "$files"; then
5884
+      if test -z "$dest"; then
5885
+	$echo "$modename: no file or destination specified" 1>&2
5886
+      else
5887
+	$echo "$modename: you must specify a destination" 1>&2
5888
+      fi
5889
+      $echo "$help" 1>&2
5890
+      exit $EXIT_FAILURE
5891
+    fi
5892
+
5893
+    # Strip any trailing slash from the destination.
5894
+    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
5895
+
5896
+    # Check to see that the destination is a directory.
5897
+    test -d "$dest" && isdir=yes
5898
+    if test "$isdir" = yes; then
5899
+      destdir="$dest"
5900
+      destname=
5901
+    else
5902
+      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
5903
+      test "X$destdir" = "X$dest" && destdir=.
5904
+      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
5905
+
5906
+      # Not a directory, so check to see that there is only one file specified.
5907
+      set dummy $files
5908
+      if test "$#" -gt 2; then
5909
+	$echo "$modename: \`$dest' is not a directory" 1>&2
5910
+	$echo "$help" 1>&2
5911
+	exit $EXIT_FAILURE
5912
+      fi
5913
+    fi
5914
+    case $destdir in
5915
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
5916
+    *)
5917
+      for file in $files; do
5918
+	case $file in
5919
+	*.lo) ;;
5920
+	*)
5921
+	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
5922
+	  $echo "$help" 1>&2
5923
+	  exit $EXIT_FAILURE
5924
+	  ;;
5925
+	esac
5926
+      done
5927
+      ;;
5928
+    esac
5929
+
5930
+    # This variable tells wrapper scripts just to set variables rather
5931
+    # than running their programs.
5932
+    libtool_install_magic="$magic"
5933
+
5934
+    staticlibs=
5935
+    future_libdirs=
5936
+    current_libdirs=
5937
+    for file in $files; do
5938
+
5939
+      # Do each installation.
5940
+      case $file in
5941
+      *.$libext)
5942
+	# Do the static libraries later.
5943
+	staticlibs="$staticlibs $file"
5944
+	;;
5945
+
5946
+      *.la)
5947
+	# Check to see that this really is a libtool archive.
5948
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
5949
+	else
5950
+	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
5951
+	  $echo "$help" 1>&2
5952
+	  exit $EXIT_FAILURE
5953
+	fi
5954
+
5955
+	library_names=
5956
+	old_library=
5957
+	relink_command=
5958
+	# If there is no directory component, then add one.
5959
+	case $file in
5960
+	*/* | *\\*) . $file ;;
5961
+	*) . ./$file ;;
5962
+	esac
5963
+
5964
+	# Add the libdir to current_libdirs if it is the destination.
5965
+	if test "X$destdir" = "X$libdir"; then
5966
+	  case "$current_libdirs " in
5967
+	  *" $libdir "*) ;;
5968
+	  *) current_libdirs="$current_libdirs $libdir" ;;
5969
+	  esac
5970
+	else
5971
+	  # Note the libdir as a future libdir.
5972
+	  case "$future_libdirs " in
5973
+	  *" $libdir "*) ;;
5974
+	  *) future_libdirs="$future_libdirs $libdir" ;;
5975
+	  esac
5976
+	fi
5977
+
5978
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
5979
+	test "X$dir" = "X$file/" && dir=
5980
+	dir="$dir$objdir"
5981
+
5982
+	if test -n "$relink_command"; then
5983
+	  # Determine the prefix the user has applied to our future dir.
5984
+	  inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
5985
+
5986
+	  # Don't allow the user to place us outside of our expected
5987
+	  # location b/c this prevents finding dependent libraries that
5988
+	  # are installed to the same prefix.
5989
+	  # At present, this check doesn't affect windows .dll's that
5990
+	  # are installed into $libdir/../bin (currently, that works fine)
5991
+	  # but it's something to keep an eye on.
5992
+	  if test "$inst_prefix_dir" = "$destdir"; then
5993
+	    $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
5994
+	    exit $EXIT_FAILURE
5995
+	  fi
5996
+
5997
+	  if test -n "$inst_prefix_dir"; then
5998
+	    # Stick the inst_prefix_dir data into the link command.
5999
+	    relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
6000
+	  else
6001
+	    relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
6002
+	  fi
6003
+
6004
+	  $echo "$modename: warning: relinking \`$file'" 1>&2
6005
+	  $show "$relink_command"
6006
+	  if $run eval "$relink_command"; then :
6007
+	  else
6008
+	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6009
+	    exit $EXIT_FAILURE
6010
+	  fi
6011
+	fi
6012
+
6013
+	# See the names of the shared library.
6014
+	set dummy $library_names
6015
+	if test -n "$2"; then
6016
+	  realname="$2"
6017
+	  shift
6018
+	  shift
6019
+
6020
+	  srcname="$realname"
6021
+	  test -n "$relink_command" && srcname="$realname"T
6022
+
6023
+	  # Install the shared library and build the symlinks.
6024
+	  $show "$install_prog $dir/$srcname $destdir/$realname"
6025
+	  $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
6026
+	  if test -n "$stripme" && test -n "$striplib"; then
6027
+	    $show "$striplib $destdir/$realname"
6028
+	    $run eval "$striplib $destdir/$realname" || exit $?
6029
+	  fi
6030
+
6031
+	  if test "$#" -gt 0; then
6032
+	    # Delete the old symlinks, and create new ones.
6033
+	    # Try `ln -sf' first, because the `ln' binary might depend on
6034
+	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
6035
+	    # so we also need to try rm && ln -s.
6036
+	    for linkname
6037
+	    do
6038
+	      if test "$linkname" != "$realname"; then
6039
+                $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
6040
+                $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
6041
+	      fi
6042
+	    done
6043
+	  fi
6044
+
6045
+	  # Do each command in the postinstall commands.
6046
+	  lib="$destdir/$realname"
6047
+	  cmds=$postinstall_cmds
6048
+	  save_ifs="$IFS"; IFS='~'
6049
+	  for cmd in $cmds; do
6050
+	    IFS="$save_ifs"
6051
+	    eval cmd=\"$cmd\"
6052
+	    $show "$cmd"
6053
+	    $run eval "$cmd" || {
6054
+	      lt_exit=$?
6055
+
6056
+	      # Restore the uninstalled library and exit
6057
+	      if test "$mode" = relink; then
6058
+		$run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
6059
+	      fi
6060
+
6061
+	      exit $lt_exit
6062
+	    }
6063
+	  done
6064
+	  IFS="$save_ifs"
6065
+	fi
6066
+
6067
+	# Install the pseudo-library for information purposes.
6068
+	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6069
+	instname="$dir/$name"i
6070
+	$show "$install_prog $instname $destdir/$name"
6071
+	$run eval "$install_prog $instname $destdir/$name" || exit $?
6072
+
6073
+	# Maybe install the static library, too.
6074
+	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
6075
+	;;
6076
+
6077
+      *.lo)
6078
+	# Install (i.e. copy) a libtool object.
6079
+
6080
+	# Figure out destination file name, if it wasn't already specified.
6081
+	if test -n "$destname"; then
6082
+	  destfile="$destdir/$destname"
6083
+	else
6084
+	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6085
+	  destfile="$destdir/$destfile"
6086
+	fi
6087
+
6088
+	# Deduce the name of the destination old-style object file.
6089
+	case $destfile in
6090
+	*.lo)
6091
+	  staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
6092
+	  ;;
6093
+	*.$objext)
6094
+	  staticdest="$destfile"
6095
+	  destfile=
6096
+	  ;;
6097
+	*)
6098
+	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
6099
+	  $echo "$help" 1>&2
6100
+	  exit $EXIT_FAILURE
6101
+	  ;;
6102
+	esac
6103
+
6104
+	# Install the libtool object if requested.
6105
+	if test -n "$destfile"; then
6106
+	  $show "$install_prog $file $destfile"
6107
+	  $run eval "$install_prog $file $destfile" || exit $?
6108
+	fi
6109
+
6110
+	# Install the old object if enabled.
6111
+	if test "$build_old_libs" = yes; then
6112
+	  # Deduce the name of the old-style object file.
6113
+	  staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
6114
+
6115
+	  $show "$install_prog $staticobj $staticdest"
6116
+	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
6117
+	fi
6118
+	exit $EXIT_SUCCESS
6119
+	;;
6120
+
6121
+      *)
6122
+	# Figure out destination file name, if it wasn't already specified.
6123
+	if test -n "$destname"; then
6124
+	  destfile="$destdir/$destname"
6125
+	else
6126
+	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6127
+	  destfile="$destdir/$destfile"
6128
+	fi
6129
+
6130
+	# If the file is missing, and there is a .exe on the end, strip it
6131
+	# because it is most likely a libtool script we actually want to
6132
+	# install
6133
+	stripped_ext=""
6134
+	case $file in
6135
+	  *.exe)
6136
+	    if test ! -f "$file"; then
6137
+	      file=`$echo $file|${SED} 's,.exe$,,'`
6138
+	      stripped_ext=".exe"
6139
+	    fi
6140
+	    ;;
6141
+	esac
6142
+
6143
+	# Do a test to see if this is really a libtool program.
6144
+	case $host in
6145
+	*cygwin*|*mingw*)
6146
+	    wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
6147
+	    ;;
6148
+	*)
6149
+	    wrapper=$file
6150
+	    ;;
6151
+	esac
6152
+	if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
6153
+	  notinst_deplibs=
6154
+	  relink_command=
6155
+
6156
+	  # Note that it is not necessary on cygwin/mingw to append a dot to
6157
+	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
6158
+	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
6159
+	  # `FILE.' does not work on cygwin managed mounts.
6160
+	  #
6161
+	  # If there is no directory component, then add one.
6162
+	  case $wrapper in
6163
+	  */* | *\\*) . ${wrapper} ;;
6164
+	  *) . ./${wrapper} ;;
6165
+	  esac
6166
+
6167
+	  # Check the variables that should have been set.
6168
+	  if test -z "$notinst_deplibs"; then
6169
+	    $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
6170
+	    exit $EXIT_FAILURE
6171
+	  fi
6172
+
6173
+	  finalize=yes
6174
+	  for lib in $notinst_deplibs; do
6175
+	    # Check to see that each library is installed.
6176
+	    libdir=
6177
+	    if test -f "$lib"; then
6178
+	      # If there is no directory component, then add one.
6179
+	      case $lib in
6180
+	      */* | *\\*) . $lib ;;
6181
+	      *) . ./$lib ;;
6182
+	      esac
6183
+	    fi
6184
+	    libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
6185
+	    if test -n "$libdir" && test ! -f "$libfile"; then
6186
+	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
6187
+	      finalize=no
6188
+	    fi
6189
+	  done
6190
+
6191
+	  relink_command=
6192
+	  # Note that it is not necessary on cygwin/mingw to append a dot to
6193
+	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
6194
+	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
6195
+	  # `FILE.' does not work on cygwin managed mounts.
6196
+	  #
6197
+	  # If there is no directory component, then add one.
6198
+	  case $wrapper in
6199
+	  */* | *\\*) . ${wrapper} ;;
6200
+	  *) . ./${wrapper} ;;
6201
+	  esac
6202
+
6203
+	  outputname=
6204
+	  if test "$fast_install" = no && test -n "$relink_command"; then
6205
+	    if test "$finalize" = yes && test -z "$run"; then
6206
+	      tmpdir=`func_mktempdir`
6207
+	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6208
+	      outputname="$tmpdir/$file"
6209
+	      # Replace the output file specification.
6210
+	      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
6211
+
6212
+	      $show "$relink_command"
6213
+	      if $run eval "$relink_command"; then :
6214
+	      else
6215
+		$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6216
+		${rm}r "$tmpdir"
6217
+		continue
6218
+	      fi
6219
+	      file="$outputname"
6220
+	    else
6221
+	      $echo "$modename: warning: cannot relink \`$file'" 1>&2
6222
+	    fi
6223
+	  else
6224
+	    # Install the binary that we compiled earlier.
6225
+	    file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6226
+	  fi
6227
+	fi
6228
+
6229
+	# remove .exe since cygwin /usr/bin/install will append another
6230
+	# one anyway 
6231
+	case $install_prog,$host in
6232
+	*/usr/bin/install*,*cygwin*)
6233
+	  case $file:$destfile in
6234
+	  *.exe:*.exe)
6235
+	    # this is ok
6236
+	    ;;
6237
+	  *.exe:*)
6238
+	    destfile=$destfile.exe
6239
+	    ;;
6240
+	  *:*.exe)
6241
+	    destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
6242
+	    ;;
6243
+	  esac
6244
+	  ;;
6245
+	esac
6246
+	$show "$install_prog$stripme $file $destfile"
6247
+	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
6248
+	test -n "$outputname" && ${rm}r "$tmpdir"
6249
+	;;
6250
+      esac
6251
+    done
6252
+
6253
+    for file in $staticlibs; do
6254
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6255
+
6256
+      # Set up the ranlib parameters.
6257
+      oldlib="$destdir/$name"
6258
+
6259
+      $show "$install_prog $file $oldlib"
6260
+      $run eval "$install_prog \$file \$oldlib" || exit $?
6261
+
6262
+      if test -n "$stripme" && test -n "$old_striplib"; then
6263
+	$show "$old_striplib $oldlib"
6264
+	$run eval "$old_striplib $oldlib" || exit $?
6265
+      fi
6266
+
6267
+      # Do each command in the postinstall commands.
6268
+      cmds=$old_postinstall_cmds
6269
+      save_ifs="$IFS"; IFS='~'
6270
+      for cmd in $cmds; do
6271
+	IFS="$save_ifs"
6272
+	eval cmd=\"$cmd\"
6273
+	$show "$cmd"
6274
+	$run eval "$cmd" || exit $?
6275
+      done
6276
+      IFS="$save_ifs"
6277
+    done
6278
+
6279
+    if test -n "$future_libdirs"; then
6280
+      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
6281
+    fi
6282
+
6283
+    if test -n "$current_libdirs"; then
6284
+      # Maybe just do a dry run.
6285
+      test -n "$run" && current_libdirs=" -n$current_libdirs"
6286
+      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
6287
+    else
6288
+      exit $EXIT_SUCCESS
6289
+    fi
6290
+    ;;
6291
+
6292
+  # libtool finish mode
6293
+  finish)
6294
+    modename="$modename: finish"
6295
+    libdirs="$nonopt"
6296
+    admincmds=
6297
+
6298
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
6299
+      for dir
6300
+      do
6301
+	libdirs="$libdirs $dir"
6302
+      done
6303
+
6304
+      for libdir in $libdirs; do
6305
+	if test -n "$finish_cmds"; then
6306
+	  # Do each command in the finish commands.
6307
+	  cmds=$finish_cmds
6308
+	  save_ifs="$IFS"; IFS='~'
6309
+	  for cmd in $cmds; do
6310
+	    IFS="$save_ifs"
6311
+	    eval cmd=\"$cmd\"
6312
+	    $show "$cmd"
6313
+	    $run eval "$cmd" || admincmds="$admincmds
6314
+       $cmd"
6315
+	  done
6316
+	  IFS="$save_ifs"
6317
+	fi
6318
+	if test -n "$finish_eval"; then
6319
+	  # Do the single finish_eval.
6320
+	  eval cmds=\"$finish_eval\"
6321
+	  $run eval "$cmds" || admincmds="$admincmds
6322
+       $cmds"
6323
+	fi
6324
+      done
6325
+    fi
6326
+
6327
+    # Exit here if they wanted silent mode.
6328
+    test "$show" = : && exit $EXIT_SUCCESS
6329
+
6330
+    $echo "X----------------------------------------------------------------------" | $Xsed
6331
+    $echo "Libraries have been installed in:"
6332
+    for libdir in $libdirs; do
6333
+      $echo "   $libdir"
6334
+    done
6335
+    $echo
6336
+    $echo "If you ever happen to want to link against installed libraries"
6337
+    $echo "in a given directory, LIBDIR, you must either use libtool, and"
6338
+    $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6339
+    $echo "flag during linking and do at least one of the following:"
6340
+    if test -n "$shlibpath_var"; then
6341
+      $echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
6342
+      $echo "     during execution"
6343
+    fi
6344
+    if test -n "$runpath_var"; then
6345
+      $echo "   - add LIBDIR to the \`$runpath_var' environment variable"
6346
+      $echo "     during linking"
6347
+    fi
6348
+    if test -n "$hardcode_libdir_flag_spec"; then
6349
+      libdir=LIBDIR
6350
+      eval flag=\"$hardcode_libdir_flag_spec\"
6351
+
6352
+      $echo "   - use the \`$flag' linker flag"
6353
+    fi
6354
+    if test -n "$admincmds"; then
6355
+      $echo "   - have your system administrator run these commands:$admincmds"
6356
+    fi
6357
+    if test -f /etc/ld.so.conf; then
6358
+      $echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6359
+    fi
6360
+    $echo
6361
+    $echo "See any operating system documentation about shared libraries for"
6362
+    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6363
+    $echo "X----------------------------------------------------------------------" | $Xsed
6364
+    exit $EXIT_SUCCESS
6365
+    ;;
6366
+
6367
+  # libtool execute mode
6368
+  execute)
6369
+    modename="$modename: execute"
6370
+
6371
+    # The first argument is the command name.
6372
+    cmd="$nonopt"
6373
+    if test -z "$cmd"; then
6374
+      $echo "$modename: you must specify a COMMAND" 1>&2
6375
+      $echo "$help"
6376
+      exit $EXIT_FAILURE
6377
+    fi
6378
+
6379
+    # Handle -dlopen flags immediately.
6380
+    for file in $execute_dlfiles; do
6381
+      if test ! -f "$file"; then
6382
+	$echo "$modename: \`$file' is not a file" 1>&2
6383
+	$echo "$help" 1>&2
6384
+	exit $EXIT_FAILURE
6385
+      fi
6386
+
6387
+      dir=
6388
+      case $file in
6389
+      *.la)
6390
+	# Check to see that this really is a libtool archive.
6391
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
6392
+	else
6393
+	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6394
+	  $echo "$help" 1>&2
6395
+	  exit $EXIT_FAILURE
6396
+	fi
6397
+
6398
+	# Read the libtool library.
6399
+	dlname=
6400
+	library_names=
6401
+
6402
+	# If there is no directory component, then add one.
6403
+	case $file in
6404
+	*/* | *\\*) . $file ;;
6405
+	*) . ./$file ;;
6406
+	esac
6407
+
6408
+	# Skip this library if it cannot be dlopened.
6409
+	if test -z "$dlname"; then
6410
+	  # Warn if it was a shared library.
6411
+	  test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6412
+	  continue
6413
+	fi
6414
+
6415
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6416
+	test "X$dir" = "X$file" && dir=.
6417
+
6418
+	if test -f "$dir/$objdir/$dlname"; then
6419
+	  dir="$dir/$objdir"
6420
+	else
6421
+	  if test ! -f "$dir/$dlname"; then
6422
+	    $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6423
+	    exit $EXIT_FAILURE
6424
+	  fi
6425
+	fi
6426
+	;;
6427
+
6428
+      *.lo)
6429
+	# Just add the directory containing the .lo file.
6430
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6431
+	test "X$dir" = "X$file" && dir=.
6432
+	;;
6433
+
6434
+      *)
6435
+	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6436
+	continue
6437
+	;;
6438
+      esac
6439
+
6440
+      # Get the absolute pathname.
6441
+      absdir=`cd "$dir" && pwd`
6442
+      test -n "$absdir" && dir="$absdir"
6443
+
6444
+      # Now add the directory to shlibpath_var.
6445
+      if eval "test -z \"\$$shlibpath_var\""; then
6446
+	eval "$shlibpath_var=\"\$dir\""
6447
+      else
6448
+	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6449
+      fi
6450
+    done
6451
+
6452
+    # This variable tells wrapper scripts just to set shlibpath_var
6453
+    # rather than running their programs.
6454
+    libtool_execute_magic="$magic"
6455
+
6456
+    # Check if any of the arguments is a wrapper script.
6457
+    args=
6458
+    for file
6459
+    do
6460
+      case $file in
6461
+      -*) ;;
6462
+      *)
6463
+	# Do a test to see if this is really a libtool program.
6464
+	if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6465
+	  # If there is no directory component, then add one.
6466
+	  case $file in
6467
+	  */* | *\\*) . $file ;;
6468
+	  *) . ./$file ;;
6469
+	  esac
6470
+
6471
+	  # Transform arg to wrapped name.
6472
+	  file="$progdir/$program"
6473
+	fi
6474
+	;;
6475
+      esac
6476
+      # Quote arguments (to preserve shell metacharacters).
6477
+      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6478
+      args="$args \"$file\""
6479
+    done
6480
+
6481
+    if test -z "$run"; then
6482
+      if test -n "$shlibpath_var"; then
6483
+	# Export the shlibpath_var.
6484
+	eval "export $shlibpath_var"
6485
+      fi
6486
+
6487
+      # Restore saved environment variables
6488
+      for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
6489
+      do
6490
+	eval "if test \"\${save_$lt_var+set}\" = set; then
6491
+		$lt_var=\$save_$lt_var; export $lt_var
6492
+	      fi"
6493
+      done
6494
+
6495
+      # Now prepare to actually exec the command.
6496
+      exec_cmd="\$cmd$args"
6497
+    else
6498
+      # Display what would be done.
6499
+      if test -n "$shlibpath_var"; then
6500
+	eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6501
+	$echo "export $shlibpath_var"
6502
+      fi
6503
+      $echo "$cmd$args"
6504
+      exit $EXIT_SUCCESS
6505
+    fi
6506
+    ;;
6507
+
6508
+  # libtool clean and uninstall mode
6509
+  clean | uninstall)
6510
+    modename="$modename: $mode"
6511
+    rm="$nonopt"
6512
+    files=
6513
+    rmforce=
6514
+    exit_status=0
6515
+
6516
+    # This variable tells wrapper scripts just to set variables rather
6517
+    # than running their programs.
6518
+    libtool_install_magic="$magic"
6519
+
6520
+    for arg
6521
+    do
6522
+      case $arg in
6523
+      -f) rm="$rm $arg"; rmforce=yes ;;
6524
+      -*) rm="$rm $arg" ;;
6525
+      *) files="$files $arg" ;;
6526
+      esac
6527
+    done
6528
+
6529
+    if test -z "$rm"; then
6530
+      $echo "$modename: you must specify an RM program" 1>&2
6531
+      $echo "$help" 1>&2
6532
+      exit $EXIT_FAILURE
6533
+    fi
6534
+
6535
+    rmdirs=
6536
+
6537
+    origobjdir="$objdir"
6538
+    for file in $files; do
6539
+      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6540
+      if test "X$dir" = "X$file"; then
6541
+	dir=.
6542
+	objdir="$origobjdir"
6543
+      else
6544
+	objdir="$dir/$origobjdir"
6545
+      fi
6546
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6547
+      test "$mode" = uninstall && objdir="$dir"
6548
+
6549
+      # Remember objdir for removal later, being careful to avoid duplicates
6550
+      if test "$mode" = clean; then
6551
+	case " $rmdirs " in
6552
+	  *" $objdir "*) ;;
6553
+	  *) rmdirs="$rmdirs $objdir" ;;
6554
+	esac
6555
+      fi
6556
+
6557
+      # Don't error if the file doesn't exist and rm -f was used.
6558
+      if (test -L "$file") >/dev/null 2>&1 \
6559
+	|| (test -h "$file") >/dev/null 2>&1 \
6560
+	|| test -f "$file"; then
6561
+	:
6562
+      elif test -d "$file"; then
6563
+	exit_status=1
6564
+	continue
6565
+      elif test "$rmforce" = yes; then
6566
+	continue
6567
+      fi
6568
+
6569
+      rmfiles="$file"
6570
+
6571
+      case $name in
6572
+      *.la)
6573
+	# Possibly a libtool archive, so verify it.
6574
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6575
+	  . $dir/$name
6576
+
6577
+	  # Delete the libtool libraries and symlinks.
6578
+	  for n in $library_names; do
6579
+	    rmfiles="$rmfiles $objdir/$n"
6580
+	  done
6581
+	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
6582
+
6583
+	  case "$mode" in
6584
+	  clean)
6585
+	    case "  $library_names " in
6586
+	    # "  " in the beginning catches empty $dlname
6587
+	    *" $dlname "*) ;;
6588
+	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
6589
+	    esac
6590
+	     test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
6591
+	    ;;
6592
+	  uninstall)
6593
+	    if test -n "$library_names"; then
6594
+	      # Do each command in the postuninstall commands.
6595
+	      cmds=$postuninstall_cmds
6596
+	      save_ifs="$IFS"; IFS='~'
6597
+	      for cmd in $cmds; do
6598
+		IFS="$save_ifs"
6599
+		eval cmd=\"$cmd\"
6600
+		$show "$cmd"
6601
+		$run eval "$cmd"
6602
+		if test "$?" -ne 0 && test "$rmforce" != yes; then
6603
+		  exit_status=1
6604
+		fi
6605
+	      done
6606
+	      IFS="$save_ifs"
6607
+	    fi
6608
+
6609
+	    if test -n "$old_library"; then
6610
+	      # Do each command in the old_postuninstall commands.
6611
+	      cmds=$old_postuninstall_cmds
6612
+	      save_ifs="$IFS"; IFS='~'
6613
+	      for cmd in $cmds; do
6614
+		IFS="$save_ifs"
6615
+		eval cmd=\"$cmd\"
6616
+		$show "$cmd"
6617
+		$run eval "$cmd"
6618
+		if test "$?" -ne 0 && test "$rmforce" != yes; then
6619
+		  exit_status=1
6620
+		fi
6621
+	      done
6622
+	      IFS="$save_ifs"
6623
+	    fi
6624
+	    # FIXME: should reinstall the best remaining shared library.
6625
+	    ;;
6626
+	  esac
6627
+	fi
6628
+	;;
6629
+
6630
+      *.lo)
6631
+	# Possibly a libtool object, so verify it.
6632
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6633
+
6634
+	  # Read the .lo file
6635
+	  . $dir/$name
6636
+
6637
+	  # Add PIC object to the list of files to remove.
6638
+	  if test -n "$pic_object" \
6639
+	     && test "$pic_object" != none; then
6640
+	    rmfiles="$rmfiles $dir/$pic_object"
6641
+	  fi
6642
+
6643
+	  # Add non-PIC object to the list of files to remove.
6644
+	  if test -n "$non_pic_object" \
6645
+	     && test "$non_pic_object" != none; then
6646
+	    rmfiles="$rmfiles $dir/$non_pic_object"
6647
+	  fi
6648
+	fi
6649
+	;;
6650
+
6651
+      *)
6652
+	if test "$mode" = clean ; then
6653
+	  noexename=$name
6654
+	  case $file in
6655
+	  *.exe)
6656
+	    file=`$echo $file|${SED} 's,.exe$,,'`
6657
+	    noexename=`$echo $name|${SED} 's,.exe$,,'`
6658
+	    # $file with .exe has already been added to rmfiles,
6659
+	    # add $file without .exe
6660
+	    rmfiles="$rmfiles $file"
6661
+	    ;;
6662
+	  esac
6663
+	  # Do a test to see if this is a libtool program.
6664
+	  if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6665
+	    relink_command=
6666
+	    . $dir/$noexename
6667
+
6668
+	    # note $name still contains .exe if it was in $file originally
6669
+	    # as does the version of $file that was added into $rmfiles
6670
+	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
6671
+	    if test "$fast_install" = yes && test -n "$relink_command"; then
6672
+	      rmfiles="$rmfiles $objdir/lt-$name"
6673
+	    fi
6674
+	    if test "X$noexename" != "X$name" ; then
6675
+	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
6676
+	    fi
6677
+	  fi
6678
+	fi
6679
+	;;
6680
+      esac
6681
+      $show "$rm $rmfiles"
6682
+      $run $rm $rmfiles || exit_status=1
6683
+    done
6684
+    objdir="$origobjdir"
6685
+
6686
+    # Try to remove the ${objdir}s in the directories where we deleted files
6687
+    for dir in $rmdirs; do
6688
+      if test -d "$dir"; then
6689
+	$show "rmdir $dir"
6690
+	$run rmdir $dir >/dev/null 2>&1
6691
+      fi
6692
+    done
6693
+
6694
+    exit $exit_status
6695
+    ;;
6696
+
6697
+  "")
6698
+    $echo "$modename: you must specify a MODE" 1>&2
6699
+    $echo "$generic_help" 1>&2
6700
+    exit $EXIT_FAILURE
6701
+    ;;
6702
+  esac
6703
+
6704
+  if test -z "$exec_cmd"; then
6705
+    $echo "$modename: invalid operation mode \`$mode'" 1>&2
6706
+    $echo "$generic_help" 1>&2
6707
+    exit $EXIT_FAILURE
6708
+  fi
6709
+fi # test -z "$show_help"
6710
+
6711
+if test -n "$exec_cmd"; then
6712
+  eval exec $exec_cmd
6713
+  exit $EXIT_FAILURE
6714
+fi
6715
+
6716
+# We need to display help for each of the modes.
6717
+case $mode in
6718
+"") $echo \
6719
+"Usage: $modename [OPTION]... [MODE-ARG]...
6720
+
6721
+Provide generalized library-building support services.
6722
+
6723
+    --config          show all configuration variables
6724
+    --debug           enable verbose shell tracing
6725
+-n, --dry-run         display commands without modifying any files
6726
+    --features        display basic configuration information and exit
6727
+    --finish          same as \`--mode=finish'
6728
+    --help            display this help message and exit
6729
+    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
6730
+    --quiet           same as \`--silent'
6731
+    --silent          don't print informational messages
6732
+    --tag=TAG         use configuration variables from tag TAG
6733
+    --version         print version information
6734
+
6735
+MODE must be one of the following:
6736
+
6737
+      clean           remove files from the build directory
6738
+      compile         compile a source file into a libtool object
6739
+      execute         automatically set library path, then run a program
6740
+      finish          complete the installation of libtool libraries
6741
+      install         install libraries or executables
6742
+      link            create a library or an executable
6743
+      uninstall       remove libraries from an installed directory
6744
+
6745
+MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
6746
+a more detailed description of MODE.
6747
+
6748
+Report bugs to <bug-libtool@gnu.org>."
6749
+  exit $EXIT_SUCCESS
6750
+  ;;
6751
+
6752
+clean)
6753
+  $echo \
6754
+"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
6755
+
6756
+Remove files from the build directory.
6757
+
6758
+RM is the name of the program to use to delete files associated with each FILE
6759
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
6760
+to RM.
6761
+
6762
+If FILE is a libtool library, object or program, all the files associated
6763
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
6764
+  ;;
6765
+
6766
+compile)
6767
+  $echo \
6768
+"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
6769
+
6770
+Compile a source file into a libtool library object.
6771
+
6772
+This mode accepts the following additional options:
6773
+
6774
+  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
6775
+  -prefer-pic       try to building PIC objects only
6776
+  -prefer-non-pic   try to building non-PIC objects only
6777
+  -static           always build a \`.o' file suitable for static linking
6778
+
6779
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
6780
+from the given SOURCEFILE.
6781
+
6782
+The output file name is determined by removing the directory component from
6783
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
6784
+library object suffix, \`.lo'."
6785
+  ;;
6786
+
6787
+execute)
6788
+  $echo \
6789
+"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
6790
+
6791
+Automatically set library path, then run a program.
6792
+
6793
+This mode accepts the following additional options:
6794
+
6795
+  -dlopen FILE      add the directory containing FILE to the library path
6796
+
6797
+This mode sets the library path environment variable according to \`-dlopen'
6798
+flags.
6799
+
6800
+If any of the ARGS are libtool executable wrappers, then they are translated
6801
+into their corresponding uninstalled binary, and any of their required library
6802
+directories are added to the library path.
6803
+
6804
+Then, COMMAND is executed, with ARGS as arguments."
6805
+  ;;
6806
+
6807
+finish)
6808
+  $echo \
6809
+"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
6810
+
6811
+Complete the installation of libtool libraries.
6812
+
6813
+Each LIBDIR is a directory that contains libtool libraries.
6814
+
6815
+The commands that this mode executes may require superuser privileges.  Use
6816
+the \`--dry-run' option if you just want to see what would be executed."
6817
+  ;;
6818
+
6819
+install)
6820
+  $echo \
6821
+"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
6822
+
6823
+Install executables or libraries.
6824
+
6825
+INSTALL-COMMAND is the installation command.  The first component should be
6826
+either the \`install' or \`cp' program.
6827
+
6828
+The rest of the components are interpreted as arguments to that command (only
6829
+BSD-compatible install options are recognized)."
6830
+  ;;
6831
+
6832
+link)
6833
+  $echo \
6834
+"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
6835
+
6836
+Link object files or libraries together to form another library, or to
6837
+create an executable program.
6838
+
6839
+LINK-COMMAND is a command using the C compiler that you would use to create
6840
+a program from several object files.
6841
+
6842
+The following components of LINK-COMMAND are treated specially:
6843
+
6844
+  -all-static       do not do any dynamic linking at all
6845
+  -avoid-version    do not add a version suffix if possible
6846
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
6847
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
6848
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
6849
+  -export-symbols SYMFILE
6850
+                    try to export only the symbols listed in SYMFILE
6851
+  -export-symbols-regex REGEX
6852
+                    try to export only the symbols matching REGEX
6853
+  -LLIBDIR          search LIBDIR for required installed libraries
6854
+  -lNAME            OUTPUT-FILE requires the installed library libNAME
6855
+  -module           build a library that can dlopened
6856
+  -no-fast-install  disable the fast-install mode
6857
+  -no-install       link a not-installable executable
6858
+  -no-undefined     declare that a library does not refer to external symbols
6859
+  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
6860
+  -objectlist FILE  Use a list of object files found in FILE to specify objects
6861
+  -precious-files-regex REGEX
6862
+                    don't remove output files matching REGEX
6863
+  -release RELEASE  specify package release information
6864
+  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
6865
+  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
6866
+  -static           do not do any dynamic linking of uninstalled libtool libraries
6867
+  -static-libtool-libs
6868
+                    do not do any dynamic linking of libtool libraries
6869
+  -version-info CURRENT[:REVISION[:AGE]]
6870
+                    specify library version info [each variable defaults to 0]
6871
+
6872
+All other options (arguments beginning with \`-') are ignored.
6873
+
6874
+Every other argument is treated as a filename.  Files ending in \`.la' are
6875
+treated as uninstalled libtool libraries, other files are standard or library
6876
+object files.
6877
+
6878
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
6879
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
6880
+required, except when creating a convenience library.
6881
+
6882
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
6883
+using \`ar' and \`ranlib', or on Windows using \`lib'.
6884
+
6885
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
6886
+is created, otherwise an executable program is created."
6887
+  ;;
6888
+
6889
+uninstall)
6890
+  $echo \
6891
+"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
6892
+
6893
+Remove libraries from an installation directory.
6894
+
6895
+RM is the name of the program to use to delete files associated with each FILE
6896
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
6897
+to RM.
6898
+
6899
+If FILE is a libtool library, all the files associated with it are deleted.
6900
+Otherwise, only FILE itself is deleted using RM."
6901
+  ;;
6902
+
6903
+*)
6904
+  $echo "$modename: invalid operation mode \`$mode'" 1>&2
6905
+  $echo "$help" 1>&2
6906
+  exit $EXIT_FAILURE
6907
+  ;;
6908
+esac
6909
+
6910
+$echo
6911
+$echo "Try \`$modename --help' for more information about other modes."
6912
+
6913
+exit $?
6914
+
6915
+# The TAGs below are defined such that we never get into a situation
6916
+# in which we disable both kinds of libraries.  Given conflicting
6917
+# choices, we go for a static library, that is the most portable,
6918
+# since we can't tell whether shared libraries were disabled because
6919
+# the user asked for that or because the platform doesn't support
6920
+# them.  This is particularly important on AIX, because we don't
6921
+# support having both static and shared libraries enabled at the same
6922
+# time on that platform, so we default to a shared-only configuration.
6923
+# If a disable-shared tag is given, we'll fallback to a static-only
6924
+# configuration.  But we'll never go from static-only to shared-only.
6925
+
6926
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
6927
+disable_libs=shared
6928
+# ### END LIBTOOL TAG CONFIG: disable-shared
6929
+
6930
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
6931
+disable_libs=static
6932
+# ### END LIBTOOL TAG CONFIG: disable-static
6933
+
6934
+# Local Variables:
6935
+# mode:shell-script
6936
+# sh-indentation:2
6937
+# End:
0 6938
new file mode 100755
... ...
@@ -0,0 +1,367 @@
0
+#! /bin/sh
1
+# Common stub for a few missing GNU programs while installing.
2
+
3
+scriptversion=2006-05-10.23
4
+
5
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
6
+#   Free Software Foundation, Inc.
7
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
8
+
9
+# This program is free software; you can redistribute it and/or modify
10
+# it under the terms of the GNU General Public License as published by
11
+# the Free Software Foundation; either version 2, or (at your option)
12
+# any later version.
13
+
14
+# This program is distributed in the hope that it will be useful,
15
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
+# GNU General Public License for more details.
18
+
19
+# You should have received a copy of the GNU General Public License
20
+# along with this program; if not, write to the Free Software
21
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22
+# 02110-1301, USA.
23
+
24
+# As a special exception to the GNU General Public License, if you
25
+# distribute this file as part of a program that contains a
26
+# configuration script generated by Autoconf, you may include it under
27
+# the same distribution terms that you use for the rest of that program.
28
+
29
+if test $# -eq 0; then
30
+  echo 1>&2 "Try \`$0 --help' for more information"
31
+  exit 1
32
+fi
33
+
34
+run=:
35
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
36
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
37
+
38
+# In the cases where this matters, `missing' is being run in the
39
+# srcdir already.
40
+if test -f configure.ac; then
41
+  configure_ac=configure.ac
42
+else
43
+  configure_ac=configure.in
44
+fi
45
+
46
+msg="missing on your system"
47
+
48
+case $1 in
49
+--run)
50
+  # Try to run requested program, and just exit if it succeeds.
51
+  run=
52
+  shift
53
+  "$@" && exit 0
54
+  # Exit code 63 means version mismatch.  This often happens
55
+  # when the user try to use an ancient version of a tool on
56
+  # a file that requires a minimum version.  In this case we
57
+  # we should proceed has if the program had been absent, or
58
+  # if --run hadn't been passed.
59
+  if test $? = 63; then
60
+    run=:
61
+    msg="probably too old"
62
+  fi
63
+  ;;
64
+
65
+  -h|--h|--he|--hel|--help)
66
+    echo "\
67
+$0 [OPTION]... PROGRAM [ARGUMENT]...
68
+
69
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
70
+error status if there is no known handling for PROGRAM.
71
+
72
+Options:
73
+  -h, --help      display this help and exit
74
+  -v, --version   output version information and exit
75
+  --run           try to run the given command, and emulate it if it fails
76
+
77
+Supported PROGRAM values:
78
+  aclocal      touch file \`aclocal.m4'
79
+  autoconf     touch file \`configure'
80
+  autoheader   touch file \`config.h.in'
81
+  autom4te     touch the output file, or create a stub one
82
+  automake     touch all \`Makefile.in' files
83
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
84
+  flex         create \`lex.yy.c', if possible, from existing .c
85
+  help2man     touch the output file
86
+  lex          create \`lex.yy.c', if possible, from existing .c
87
+  makeinfo     touch the output file
88
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
89
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
90
+
91
+Send bug reports to <bug-automake@gnu.org>."
92
+    exit $?
93
+    ;;
94
+
95
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
96
+    echo "missing $scriptversion (GNU Automake)"
97
+    exit $?
98
+    ;;
99
+
100
+  -*)
101
+    echo 1>&2 "$0: Unknown \`$1' option"
102
+    echo 1>&2 "Try \`$0 --help' for more information"
103
+    exit 1
104
+    ;;
105
+
106
+esac
107
+
108
+# Now exit if we have it, but it failed.  Also exit now if we
109
+# don't have it and --version was passed (most likely to detect
110
+# the program).
111
+case $1 in
112
+  lex|yacc)
113
+    # Not GNU programs, they don't have --version.
114
+    ;;
115
+
116
+  tar)
117
+    if test -n "$run"; then
118
+       echo 1>&2 "ERROR: \`tar' requires --run"
119
+       exit 1
120
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
121
+       exit 1
122
+    fi
123
+    ;;
124
+
125
+  *)
126
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
127
+       # We have it, but it failed.
128
+       exit 1
129
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
130
+       # Could not run --version or --help.  This is probably someone
131
+       # running `$TOOL --version' or `$TOOL --help' to check whether
132
+       # $TOOL exists and not knowing $TOOL uses missing.
133
+       exit 1
134
+    fi
135
+    ;;
136
+esac
137
+
138
+# If it does not exist, or fails to run (possibly an outdated version),
139
+# try to emulate it.
140
+case $1 in
141
+  aclocal*)
142
+    echo 1>&2 "\
143
+WARNING: \`$1' is $msg.  You should only need it if
144
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
145
+         to install the \`Automake' and \`Perl' packages.  Grab them from
146
+         any GNU archive site."
147
+    touch aclocal.m4
148
+    ;;
149
+
150
+  autoconf)
151
+    echo 1>&2 "\
152
+WARNING: \`$1' is $msg.  You should only need it if
153
+         you modified \`${configure_ac}'.  You might want to install the
154
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
155
+         archive site."
156
+    touch configure
157
+    ;;
158
+
159
+  autoheader)
160
+    echo 1>&2 "\
161
+WARNING: \`$1' is $msg.  You should only need it if
162
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
163
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
164
+         from any GNU archive site."
165
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
166
+    test -z "$files" && files="config.h"
167
+    touch_files=
168
+    for f in $files; do
169
+      case $f in
170
+      *:*) touch_files="$touch_files "`echo "$f" |
171
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
172
+      *) touch_files="$touch_files $f.in";;
173
+      esac
174
+    done
175
+    touch $touch_files
176
+    ;;
177
+
178
+  automake*)
179
+    echo 1>&2 "\
180
+WARNING: \`$1' is $msg.  You should only need it if
181
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
182
+         You might want to install the \`Automake' and \`Perl' packages.
183
+         Grab them from any GNU archive site."
184
+    find . -type f -name Makefile.am -print |
185
+	   sed 's/\.am$/.in/' |
186
+	   while read f; do touch "$f"; done
187
+    ;;
188
+
189
+  autom4te)
190
+    echo 1>&2 "\
191
+WARNING: \`$1' is needed, but is $msg.
192
+         You might have modified some files without having the
193
+         proper tools for further handling them.
194
+         You can get \`$1' as part of \`Autoconf' from any GNU
195
+         archive site."
196
+
197
+    file=`echo "$*" | sed -n "$sed_output"`
198
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
199
+    if test -f "$file"; then
200
+	touch $file
201
+    else
202
+	test -z "$file" || exec >$file
203
+	echo "#! /bin/sh"
204
+	echo "# Created by GNU Automake missing as a replacement of"
205
+	echo "#  $ $@"
206
+	echo "exit 0"
207
+	chmod +x $file
208
+	exit 1
209
+    fi
210
+    ;;
211
+
212
+  bison|yacc)
213
+    echo 1>&2 "\
214
+WARNING: \`$1' $msg.  You should only need it if
215
+         you modified a \`.y' file.  You may need the \`Bison' package
216
+         in order for those modifications to take effect.  You can get
217
+         \`Bison' from any GNU archive site."
218
+    rm -f y.tab.c y.tab.h
219
+    if test $# -ne 1; then
220
+        eval LASTARG="\${$#}"
221
+	case $LASTARG in
222
+	*.y)
223
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
224
+	    if test -f "$SRCFILE"; then
225
+	         cp "$SRCFILE" y.tab.c
226
+	    fi
227
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
228
+	    if test -f "$SRCFILE"; then
229
+	         cp "$SRCFILE" y.tab.h
230
+	    fi
231
+	  ;;
232
+	esac
233
+    fi
234
+    if test ! -f y.tab.h; then
235
+	echo >y.tab.h
236
+    fi
237
+    if test ! -f y.tab.c; then
238
+	echo 'main() { return 0; }' >y.tab.c
239
+    fi
240
+    ;;
241
+
242
+  lex|flex)
243
+    echo 1>&2 "\
244
+WARNING: \`$1' is $msg.  You should only need it if
245
+         you modified a \`.l' file.  You may need the \`Flex' package
246
+         in order for those modifications to take effect.  You can get
247
+         \`Flex' from any GNU archive site."
248
+    rm -f lex.yy.c
249
+    if test $# -ne 1; then
250
+        eval LASTARG="\${$#}"
251
+	case $LASTARG in
252
+	*.l)
253
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
254
+	    if test -f "$SRCFILE"; then
255
+	         cp "$SRCFILE" lex.yy.c
256
+	    fi
257
+	  ;;
258
+	esac
259
+    fi
260
+    if test ! -f lex.yy.c; then
261
+	echo 'main() { return 0; }' >lex.yy.c
262
+    fi
263
+    ;;
264
+
265
+  help2man)
266
+    echo 1>&2 "\
267
+WARNING: \`$1' is $msg.  You should only need it if
268
+	 you modified a dependency of a manual page.  You may need the
269
+	 \`Help2man' package in order for those modifications to take
270
+	 effect.  You can get \`Help2man' from any GNU archive site."
271
+
272
+    file=`echo "$*" | sed -n "$sed_output"`
273
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
274
+    if test -f "$file"; then
275
+	touch $file
276
+    else
277
+	test -z "$file" || exec >$file
278
+	echo ".ab help2man is required to generate this page"
279
+	exit 1
280
+    fi
281
+    ;;
282
+
283
+  makeinfo)
284
+    echo 1>&2 "\
285
+WARNING: \`$1' is $msg.  You should only need it if
286
+         you modified a \`.texi' or \`.texinfo' file, or any other file
287
+         indirectly affecting the aspect of the manual.  The spurious
288
+         call might also be the consequence of using a buggy \`make' (AIX,
289
+         DU, IRIX).  You might want to install the \`Texinfo' package or
290
+         the \`GNU make' package.  Grab either from any GNU archive site."
291
+    # The file to touch is that specified with -o ...
292
+    file=`echo "$*" | sed -n "$sed_output"`
293
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
294
+    if test -z "$file"; then
295
+      # ... or it is the one specified with @setfilename ...
296
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
297
+      file=`sed -n '
298
+	/^@setfilename/{
299
+	  s/.* \([^ ]*\) *$/\1/
300
+	  p
301
+	  q
302
+	}' $infile`
303
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
304
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
305
+    fi
306
+    # If the file does not exist, the user really needs makeinfo;
307
+    # let's fail without touching anything.
308
+    test -f $file || exit 1
309
+    touch $file
310
+    ;;
311
+
312
+  tar)
313
+    shift
314
+
315
+    # We have already tried tar in the generic part.
316
+    # Look for gnutar/gtar before invocation to avoid ugly error
317
+    # messages.
318
+    if (gnutar --version > /dev/null 2>&1); then
319
+       gnutar "$@" && exit 0
320
+    fi
321
+    if (gtar --version > /dev/null 2>&1); then
322
+       gtar "$@" && exit 0
323
+    fi
324
+    firstarg="$1"
325
+    if shift; then
326
+	case $firstarg in
327
+	*o*)
328
+	    firstarg=`echo "$firstarg" | sed s/o//`
329
+	    tar "$firstarg" "$@" && exit 0
330
+	    ;;
331
+	esac
332
+	case $firstarg in
333
+	*h*)
334
+	    firstarg=`echo "$firstarg" | sed s/h//`
335
+	    tar "$firstarg" "$@" && exit 0
336
+	    ;;
337
+	esac
338
+    fi
339
+
340
+    echo 1>&2 "\
341
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
342
+         You may want to install GNU tar or Free paxutils, or check the
343
+         command line arguments."
344
+    exit 1
345
+    ;;
346
+
347
+  *)
348
+    echo 1>&2 "\
349
+WARNING: \`$1' is needed, and is $msg.
350
+         You might have modified some files without having the
351
+         proper tools for further handling them.  Check the \`README' file,
352
+         it often tells you about the needed prerequisites for installing
353
+         this package.  You may also peek at any GNU archive site, in case
354
+         some other package would contain this missing \`$1' program."
355
+    exit 1
356
+    ;;
357
+esac
358
+
359
+exit 0
360
+
361
+# Local variables:
362
+# eval: (add-hook 'write-file-hooks 'time-stamp)
363
+# time-stamp-start: "scriptversion="
364
+# time-stamp-format: "%:y-%02m-%02d.%02H"
365
+# time-stamp-end: "$"
366
+# End:
... ...
@@ -1,6 +1,8 @@
1 1
 #! /bin/sh
2 2
 # Guess values for system-dependent variables and create Makefiles.
3
-# Generated by GNU Autoconf 2.61.
3
+# Generated by GNU Autoconf 2.61 for clamav devel.
4
+#
5
+# Report bugs to <http://bugs.clamav.net/>.
4 6
 #
5 7
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6 8
 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
... ...
@@ -720,11 +722,11 @@ MAKEFLAGS=
720 720
 SHELL=${CONFIG_SHELL-/bin/sh}
721 721
 
722 722
 # Identity of this package.
723
-PACKAGE_NAME=
724
-PACKAGE_TARNAME=
725
-PACKAGE_VERSION=
726
-PACKAGE_STRING=
727
-PACKAGE_BUGREPORT=
723
+PACKAGE_NAME='clamav'
724
+PACKAGE_TARNAME='clamav'
725
+PACKAGE_VERSION='devel'
726
+PACKAGE_STRING='clamav devel'
727
+PACKAGE_BUGREPORT='http://bugs.clamav.net/'
728 728
 
729 729
 ac_unique_file="clamscan/clamscan.c"
730 730
 # Factoring default headers for most tests.
... ...
@@ -800,6 +802,13 @@ LIBS
800 800
 build_alias
801 801
 host_alias
802 802
 target_alias
803
+CC
804
+CFLAGS
805
+LDFLAGS
806
+CPPFLAGS
807
+ac_ct_CC
808
+EXEEXT
809
+OBJEXT
803 810
 build
804 811
 build_cpu
805 812
 build_vendor
... ...
@@ -834,14 +843,6 @@ am__leading_dot
834 834
 AMTAR
835 835
 am__tar
836 836
 am__untar
837
-LIBCLAMAV_VERSION
838
-CC
839
-CFLAGS
840
-LDFLAGS
841
-CPPFLAGS
842
-ac_ct_CC
843
-EXEEXT
844
-OBJEXT
845 837
 DEPDIR
846 838
 am__include
847 839
 am__quote
... ...
@@ -851,6 +852,7 @@ AMDEPBACKSLASH
851 851
 CCDEPMODE
852 852
 am__fastdepCC_TRUE
853 853
 am__fastdepCC_FALSE
854
+LIBCLAMAV_VERSION
854 855
 LN_S
855 856
 SED
856 857
 GREP
... ...
@@ -934,7 +936,7 @@ sharedstatedir='${prefix}/com'
934 934
 localstatedir='${prefix}/var'
935 935
 includedir='${prefix}/include'
936 936
 oldincludedir='/usr/include'
937
-docdir='${datarootdir}/doc/${PACKAGE}'
937
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
938 938
 infodir='${datarootdir}/info'
939 939
 htmldir='${docdir}'
940 940
 dvidir='${docdir}'
... ...
@@ -1398,7 +1400,7 @@ if test "$ac_init_help" = "long"; then
1398 1398
   # Omit some internal or obsolete options to make the list less imposing.
1399 1399
   # This message is too long to be a string in the A/UX 3.1 sh.
1400 1400
   cat <<_ACEOF
1401
-\`configure' configures this package to adapt to many kinds of systems.
1401
+\`configure' configures clamav devel to adapt to many kinds of systems.
1402 1402
 
1403 1403
 Usage: $0 [OPTION]... [VAR=VALUE]...
1404 1404
 
... ...
@@ -1446,7 +1448,7 @@ Fine tuning of the installation directories:
1446 1446
   --infodir=DIR          info documentation [DATAROOTDIR/info]
1447 1447
   --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1448 1448
   --mandir=DIR           man documentation [DATAROOTDIR/man]
1449
-  --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
1449
+  --docdir=DIR           documentation root [DATAROOTDIR/doc/clamav]
1450 1450
   --htmldir=DIR          html documentation [DOCDIR]
1451 1451
   --dvidir=DIR           dvi documentation [DOCDIR]
1452 1452
   --pdfdir=DIR           pdf documentation [DOCDIR]
... ...
@@ -1468,7 +1470,9 @@ _ACEOF
1468 1468
 fi
1469 1469
 
1470 1470
 if test -n "$ac_init_help"; then
1471
-
1471
+  case $ac_init_help in
1472
+     short | recursive ) echo "Configuration of clamav devel:";;
1473
+   esac
1472 1474
   cat <<\_ACEOF
1473 1475
 
1474 1476
 Optional Features:
... ...
@@ -1533,6 +1537,7 @@ Some influential environment variables:
1533 1533
 Use these variables to override the choices made by `configure' or to help
1534 1534
 it to find libraries and programs with nonstandard names/locations.
1535 1535
 
1536
+Report bugs to <http://bugs.clamav.net/>.
1536 1537
 _ACEOF
1537 1538
 ac_status=$?
1538 1539
 fi
... ...
@@ -1593,7 +1598,7 @@ fi
1593 1593
 test -n "$ac_init_help" && exit $ac_status
1594 1594
 if $ac_init_version; then
1595 1595
   cat <<\_ACEOF
1596
-configure
1596
+clamav configure devel
1597 1597
 generated by GNU Autoconf 2.61
1598 1598
 
1599 1599
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
... ...
@@ -1607,7 +1612,7 @@ cat >config.log <<_ACEOF
1607 1607
 This file contains any messages produced by compilers while
1608 1608
 running configure, to aid debugging if configure makes a mistake.
1609 1609
 
1610
-It was created by $as_me, which was
1610
+It was created by clamav $as_me devel, which was
1611 1611
 generated by GNU Autoconf 2.61.  Invocation command line was
1612 1612
 
1613 1613
   $ $0 $@
... ...
@@ -1945,6 +1950,14 @@ fi
1945 1945
 
1946 1946
 
1947 1947
 
1948
+
1949
+
1950
+
1951
+
1952
+
1953
+
1954
+
1955
+
1948 1956
 ac_ext=c
1949 1957
 ac_cpp='$CPP $CPPFLAGS'
1950 1958
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
... ...
@@ -1952,8 +1965,9 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
1952 1952
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1953 1953
 
1954 1954
 
1955
+
1955 1956
 ac_aux_dir=
1956
-for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
1957
+for ac_dir in config "$srcdir"/config; do
1957 1958
   if test -f "$ac_dir/install-sh"; then
1958 1959
     ac_aux_dir=$ac_dir
1959 1960
     ac_install_sh="$ac_aux_dir/install-sh -c"
... ...
@@ -1969,8 +1983,8 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
1969 1969
   fi
1970 1970
 done
1971 1971
 if test -z "$ac_aux_dir"; then
1972
-  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
1973
-echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
1972
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5
1973
+echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;}
1974 1974
    { (exit 1); exit 1; }; }
1975 1975
 fi
1976 1976
 
... ...
@@ -1983,822 +1997,6 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1983 1983
 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1984 1984
 
1985 1985
 
1986
-# Make sure we can run config.sub.
1987
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
1988
-  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
1989
-echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
1990
-   { (exit 1); exit 1; }; }
1991
-
1992
-{ echo "$as_me:$LINENO: checking build system type" >&5
1993
-echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
1994
-if test "${ac_cv_build+set}" = set; then
1995
-  echo $ECHO_N "(cached) $ECHO_C" >&6
1996
-else
1997
-  ac_build_alias=$build_alias
1998
-test "x$ac_build_alias" = x &&
1999
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2000
-test "x$ac_build_alias" = x &&
2001
-  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2002
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2003
-   { (exit 1); exit 1; }; }
2004
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2005
-  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2006
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2007
-   { (exit 1); exit 1; }; }
2008
-
2009
-fi
2010
-{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2011
-echo "${ECHO_T}$ac_cv_build" >&6; }
2012
-case $ac_cv_build in
2013
-*-*-*) ;;
2014
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2015
-echo "$as_me: error: invalid value of canonical build" >&2;}
2016
-   { (exit 1); exit 1; }; };;
2017
-esac
2018
-build=$ac_cv_build
2019
-ac_save_IFS=$IFS; IFS='-'
2020
-set x $ac_cv_build
2021
-shift
2022
-build_cpu=$1
2023
-build_vendor=$2
2024
-shift; shift
2025
-# Remember, the first character of IFS is used to create $*,
2026
-# except with old shells:
2027
-build_os=$*
2028
-IFS=$ac_save_IFS
2029
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2030
-
2031
-
2032
-{ echo "$as_me:$LINENO: checking host system type" >&5
2033
-echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
2034
-if test "${ac_cv_host+set}" = set; then
2035
-  echo $ECHO_N "(cached) $ECHO_C" >&6
2036
-else
2037
-  if test "x$host_alias" = x; then
2038
-  ac_cv_host=$ac_cv_build
2039
-else
2040
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2041
-    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2042
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2043
-   { (exit 1); exit 1; }; }
2044
-fi
2045
-
2046
-fi
2047
-{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2048
-echo "${ECHO_T}$ac_cv_host" >&6; }
2049
-case $ac_cv_host in
2050
-*-*-*) ;;
2051
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2052
-echo "$as_me: error: invalid value of canonical host" >&2;}
2053
-   { (exit 1); exit 1; }; };;
2054
-esac
2055
-host=$ac_cv_host
2056
-ac_save_IFS=$IFS; IFS='-'
2057
-set x $ac_cv_host
2058
-shift
2059
-host_cpu=$1
2060
-host_vendor=$2
2061
-shift; shift
2062
-# Remember, the first character of IFS is used to create $*,
2063
-# except with old shells:
2064
-host_os=$*
2065
-IFS=$ac_save_IFS
2066
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2067
-
2068
-
2069
-{ echo "$as_me:$LINENO: checking target system type" >&5
2070
-echo $ECHO_N "checking target system type... $ECHO_C" >&6; }
2071
-if test "${ac_cv_target+set}" = set; then
2072
-  echo $ECHO_N "(cached) $ECHO_C" >&6
2073
-else
2074
-  if test "x$target_alias" = x; then
2075
-  ac_cv_target=$ac_cv_host
2076
-else
2077
-  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2078
-    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
2079
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
2080
-   { (exit 1); exit 1; }; }
2081
-fi
2082
-
2083
-fi
2084
-{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5
2085
-echo "${ECHO_T}$ac_cv_target" >&6; }
2086
-case $ac_cv_target in
2087
-*-*-*) ;;
2088
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
2089
-echo "$as_me: error: invalid value of canonical target" >&2;}
2090
-   { (exit 1); exit 1; }; };;
2091
-esac
2092
-target=$ac_cv_target
2093
-ac_save_IFS=$IFS; IFS='-'
2094
-set x $ac_cv_target
2095
-shift
2096
-target_cpu=$1
2097
-target_vendor=$2
2098
-shift; shift
2099
-# Remember, the first character of IFS is used to create $*,
2100
-# except with old shells:
2101
-target_os=$*
2102
-IFS=$ac_save_IFS
2103
-case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2104
-
2105
-
2106
-# The aliases save the names the user supplied, while $host etc.
2107
-# will get canonicalized.
2108
-test -n "$target_alias" &&
2109
-  test "$program_prefix$program_suffix$program_transform_name" = \
2110
-    NONENONEs,x,x, &&
2111
-  program_prefix=${target_alias}-
2112
-
2113
-target_cpu_arch="unknown"
2114
-case $target_cpu in
2115
- i386*|i486*|i586*|i686*|i786*) target_cpu_arch=i386 ;;
2116
- power*)   target_cpu_arch=ppc ;;
2117
- arm*)     target_cpu_arch=arm ;;
2118
- sparc64*) target_cpu_arch=sparc64 ;;
2119
- sparc*)   target_cpu_arch=sparc ;;
2120
- mips64*)  target_cpu_arch=mips64 ;;
2121
- mips*)    target_cpu_arch=mips ;;
2122
- alpha*)   target_cpu_arch=alpha ;;
2123
- hppa1*)   target_cpu_arch=hppa1 ;;
2124
- hppa2*)   target_cpu_arch=hppa2 ;;
2125
- arm*)     target_cpu_arch=arm ;;
2126
- m68???|mcf54??) target_cpu_arch=m68k ;;
2127
- *)        target_cpu_arch="$target_cpu" ;;
2128
-esac
2129
-
2130
-host_cpu_arch="unknown"
2131
-case $host_cpu in
2132
- i386*|i486*|i586*|i686*|i786*) host_cpu_arch=i386 ;;
2133
- power*)   host_cpu_arch=ppc ;;
2134
- arm*)     host_cpu_arch=arm ;;
2135
- sparc64*) host_cpu_arch=sparc64 ;;
2136
- sparc*)   host_cpu_arch=sparc ;;
2137
- mips64*)  host_cpu_arch=mips64 ;;
2138
- mips*)    host_cpu_arch=mips ;;
2139
- alpha*)   host_cpu_arch=alpha ;;
2140
- hppa1*)   host_cpu_arch=hppa1 ;;
2141
- hppa2*)   host_cpu_arch=hppa2 ;;
2142
- arm*)     host_cpu_arch=arm ;;
2143
- m68???|mcf54??) host_cpu_arch=m68k ;;
2144
- *)        host_cpu_arch="$target_cpu" ;;
2145
-esac
2146
-
2147
-ac_need_target_h_file_new=true
2148
-
2149
-
2150
-
2151
-
2152
-ac_need_target_h_file=`echo target.h`
2153
-ac_need_target_h_prefix=`echo target | sed -e 'y:abcdefghijklmnopqrstuvwxyz-:ABCDEFGHIJKLMNOPQRSTUVWXYZ_:' -e 's:[^A-Z0-9_]::g'`
2154
-#
2155
-target_os0=`echo "$target_os"  | sed -e 'y:abcdefghijklmnopqrstuvwxyz.-:ABCDEFGHIJKLMNOPQRSTUVWXYZ__:' -e 's:[^A-Z0-9_]::g'`
2156
-target_os1=`echo "$target_os0" | sed -e 's:\([^0-9]*\).*:\1:' `
2157
-target_os2=`echo "$target_os0" | sed -e 's:\([^_]*\).*:\1:' `
2158
-target_os3=`echo "$target_os2" | sed -e 's:\([^0-9]*\).*:\1:' `
2159
-#
2160
-target_cpu0=`echo "$target_cpu"  | sed -e 'y:abcdefghijklmnopqrstuvwxyz.-:ABCDEFGHIJKLMNOPQRSTUVWXYZ__:' -e 's:[^A-Z0-9_]::g'`
2161
-target_cpu1=`echo "$target_cpu0" | sed -e 's:\([^0-9]*\).*:\1:' `
2162
-target_cpu2=`echo "$target_cpu0" | sed -e 's:\([^_]*\).*:\1:' `
2163
-target_cpu3=`echo "$target_cpu2" | sed -e 's:\([^0-9]*\).*:\1:' `
2164
-#
2165
-target_cpu_arch0=`echo "$target_cpu_arch" | sed -e 'y:abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:'`
2166
-#
2167
-#
2168
-if $ac_need_target_h_file_new ; then
2169
-{ echo "$as_me:$LINENO: result: creating $ac_need_target_h_file - canonical system defines" >&5
2170
-echo "${ECHO_T}creating $ac_need_target_h_file - canonical system defines" >&6; }
2171
-echo /'*' automatically generated by $PACKAGE configure '*'/ >$ac_need_target_h_file
2172
-echo /'*' on `date` '*'/ >>$ac_need_target_h_file
2173
-ac_need_target_h_file_new=false
2174
-fi
2175
-echo /'*' target uppercase defines '*'/ >>$ac_need_target_h_file
2176
-old1=""
2177
-old2=""
2178
-for i in $target_os0 $target_os1 $target_os2 $target_os3 "TYPE"
2179
-do
2180
-  if test "$old1" != "$i"; then
2181
-  if test "$old2" != "$i"; then
2182
-   echo " " >>$ac_need_target_h_file
2183
-   echo "#ifndef "$ac_need_target_h_prefix"_OS_"$i >>$ac_need_target_h_file
2184
-   echo "#define "$ac_need_target_h_prefix"_OS_"$i '"'"$target_os"'"' >>$ac_need_target_h_file
2185
-   echo "#endif" >>$ac_need_target_h_file
2186
-  fi
2187
-  fi
2188
-  old2="$old1"
2189
-  old1="$i"
2190
-done
2191
-#
2192
-old1=""
2193
-old2=""
2194
-for i in $target_cpu0 $target_cpu1 $target_cpu2 $target_cpu3 "TYPE"
2195
-do
2196
-  if test "$old1" != "$i"; then
2197
-  if test "$old2" != "$i"; then
2198
-   echo " " >>$ac_need_target_h_file
2199
-   echo "#ifndef "$ac_need_target_h_prefix"_CPU_"$i >>$ac_need_target_h_file
2200
-   echo "#define "$ac_need_target_h_prefix"_CPU_"$i '"'"$target_cpu"'"' >>$ac_need_target_h_file
2201
-   echo "#endif" >>$ac_need_target_h_file
2202
-  fi
2203
-  fi
2204
-  old2="$old1"
2205
-  old1="$i"
2206
-done
2207
-#
2208
-old1=""
2209
-old2=""
2210
-for i in $target_cpu_arch0 "TYPE"
2211
-do
2212
-  if test "$old1" != "$i"; then
2213
-  if test "$old2" != "$i"; then
2214
-   echo " " >>$ac_need_target_h_file
2215
-   echo "#ifndef "$ac_need_target_h_prefix"_ARCH_"$i >>$ac_need_target_h_file
2216
-   echo "#define "$ac_need_target_h_prefix"_ARCH_"$i '"'"$target_cpu_arch"'"' >>$ac_need_target_h_file
2217
-   echo "#endif" >>$ac_need_target_h_file
2218
-  fi
2219
-  fi
2220
-  old2="$old1"
2221
-  old1="$i"
2222
-done
2223
-
2224
-
2225
-
2226
-ac_need_target_h_file=`echo target.h`
2227
-ac_need_target_h_prefix=`echo host | sed -e 'y:abcdefghijklmnopqrstuvwxyz-:ABCDEFGHIJKLMNOPQRSTUVWXYZ_:' -e 's:[^A-Z0-9_]::g'`
2228
-#
2229
-host_os0=`echo "$host_os"  | sed -e 'y:abcdefghijklmnopqrstuvwxyz.-:ABCDEFGHIJKLMNOPQRSTUVWXYZ__:' -e 's:[^A-Z0-9_]::g'`
2230
-host_os1=`echo "$host_os0" | sed -e 's:\([^0-9]*\).*:\1:' `
2231
-host_os2=`echo "$host_os0" | sed -e 's:\([^_]*\).*:\1:' `
2232
-host_os3=`echo "$host_os2" | sed -e 's:\([^0-9]*\).*:\1:' `
2233
-#
2234
-host_cpu0=`echo "$host_cpu"  | sed -e 'y:abcdefghijklmnopqrstuvwxyz.-:ABCDEFGHIJKLMNOPQRSTUVWXYZ__:' -e 's:[^A-Z0-9]::g'`
2235
-host_cpu1=`echo "$host_cpu0" | sed -e 's:\([^0-9]*\).*:\1:' `
2236
-host_cpu2=`echo "$host_cpu0" | sed -e 's:\([^_]*\).*:\1:' `
2237
-host_cpu3=`echo "$host_cpu2" | sed -e 's:\([^0-9]*\).*:\1:' `
2238
-#
2239
-host_cpu_arch0=`echo "$host_cpu_arch" | sed -e 'y:abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:'`
2240
-#
2241
-#
2242
-if $ac_need_target_h_file_new ; then
2243
-{ echo "$as_me:$LINENO: result: creating $ac_need_target_h_file - canonical system defines" >&5
2244
-echo "${ECHO_T}creating $ac_need_target_h_file - canonical system defines" >&6; }
2245
-echo /'*' automatically generated by $PACKAGE configure '*'/ >$ac_need_target_h_file
2246
-echo /'*' on `date` '*'/ >>$ac_need_target_h_file
2247
-ac_need_target_h_file_new=false
2248
-fi
2249
-echo /'*' host uppercase defines '*'/ >>$ac_need_target_h_file
2250
-old1=""
2251
-old2=""
2252
-for i in $host_os0 $host_os1 $host_os2 $host_os3 "TYPE"
2253
-do
2254
-  if test "$old1" != "$i"; then
2255
-  if test "$old2" != "$i"; then
2256
-   echo " " >>$ac_need_target_h_file
2257
-   echo "#ifndef "$ac_need_target_h_prefix"_OS_"$i >>$ac_need_target_h_file
2258
-   echo "#define "$ac_need_target_h_prefix"_OS_"$i '"'"$host_os"'"' >>$ac_need_target_h_file
2259
-   echo "#endif" >>$ac_need_target_h_file
2260
-  fi
2261
-  fi
2262
-  old2="$old1"
2263
-  old1="$i"
2264
-done
2265
-#
2266
-old1=""
2267
-old2=""
2268
-for i in $host_cpu0 $host_cpu1 $host_cpu2 $host_cpu3 "TYPE"
2269
-do
2270
-  if test "$old1" != "$i"; then
2271
-  if test "$old2" != "$i"; then
2272
-   echo " " >>$ac_need_target_h_file
2273
-   echo "#ifndef "$ac_need_target_h_prefix"_CPU_"$i >>$ac_need_target_h_file
2274
-   echo "#define "$ac_need_target_h_prefix"_CPU_"$i '"'"$host_cpu"'"' >>$ac_need_target_h_file
2275
-   echo "#endif" >>$ac_need_target_h_file
2276
-  fi
2277
-  fi
2278
-  old2="$old1"
2279
-  old1="$i"
2280
-done
2281
-#
2282
-old1=""
2283
-old2=""
2284
-for i in $host_cpu_arch0 "TYPE"
2285
-do
2286
-  if test "$old1" != "$i"; then
2287
-  if test "$old2" != "$i"; then
2288
-   echo " " >>$ac_need_target_h_file
2289
-   echo "#ifndef "$ac_need_target_h_prefix"_ARCH_"$i >>$ac_need_target_h_file
2290
-   echo "#define "$ac_need_target_h_prefix"_ARCH_"$i '"'"$host_cpu_arch"'"' >>$ac_need_target_h_file
2291
-   echo "#endif" >>$ac_need_target_h_file
2292
-  fi
2293
-  fi
2294
-  old2="$old1"
2295
-  old1="$i"
2296
-done
2297
-
2298
-
2299
-am__api_version='1.10'
2300
-
2301
-# Find a good install program.  We prefer a C program (faster),
2302
-# so one script is as good as another.  But avoid the broken or
2303
-# incompatible versions:
2304
-# SysV /etc/install, /usr/sbin/install
2305
-# SunOS /usr/etc/install
2306
-# IRIX /sbin/install
2307
-# AIX /bin/install
2308
-# AmigaOS /C/install, which installs bootblocks on floppy discs
2309
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2310
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2311
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2312
-# OS/2's system install, which has a completely different semantic
2313
-# ./install, which can be erroneously created by make from ./install.sh.
2314
-{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2315
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
2316
-if test -z "$INSTALL"; then
2317
-if test "${ac_cv_path_install+set}" = set; then
2318
-  echo $ECHO_N "(cached) $ECHO_C" >&6
2319
-else
2320
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2321
-for as_dir in $PATH
2322
-do
2323
-  IFS=$as_save_IFS
2324
-  test -z "$as_dir" && as_dir=.
2325
-  # Account for people who put trailing slashes in PATH elements.
2326
-case $as_dir/ in
2327
-  ./ | .// | /cC/* | \
2328
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2329
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
2330
-  /usr/ucb/* ) ;;
2331
-  *)
2332
-    # OSF1 and SCO ODT 3.0 have their own names for install.
2333
-    # Don't use installbsd from OSF since it installs stuff as root
2334
-    # by default.
2335
-    for ac_prog in ginstall scoinst install; do
2336
-      for ac_exec_ext in '' $ac_executable_extensions; do
2337
-	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
2338
-	  if test $ac_prog = install &&
2339
-	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2340
-	    # AIX install.  It has an incompatible calling convention.
2341
-	    :
2342
-	  elif test $ac_prog = install &&
2343
-	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2344
-	    # program-specific install script used by HP pwplus--don't use.
2345
-	    :
2346
-	  else
2347
-	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2348
-	    break 3
2349
-	  fi
2350
-	fi
2351
-      done
2352
-    done
2353
-    ;;
2354
-esac
2355
-done
2356
-IFS=$as_save_IFS
2357
-
2358
-
2359
-fi
2360
-  if test "${ac_cv_path_install+set}" = set; then
2361
-    INSTALL=$ac_cv_path_install
2362
-  else
2363
-    # As a last resort, use the slow shell script.  Don't cache a
2364
-    # value for INSTALL within a source directory, because that will
2365
-    # break other packages using the cache if that directory is
2366
-    # removed, or if the value is a relative name.
2367
-    INSTALL=$ac_install_sh
2368
-  fi
2369
-fi
2370
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
2371
-echo "${ECHO_T}$INSTALL" >&6; }
2372
-
2373
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2374
-# It thinks the first close brace ends the variable substitution.
2375
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2376
-
2377
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2378
-
2379
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2380
-
2381
-{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
2382
-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
2383
-# Just in case
2384
-sleep 1
2385
-echo timestamp > conftest.file
2386
-# Do `set' in a subshell so we don't clobber the current shell's
2387
-# arguments.  Must try -L first in case configure is actually a
2388
-# symlink; some systems play weird games with the mod time of symlinks
2389
-# (eg FreeBSD returns the mod time of the symlink's containing
2390
-# directory).
2391
-if (
2392
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
2393
-   if test "$*" = "X"; then
2394
-      # -L didn't work.
2395
-      set X `ls -t $srcdir/configure conftest.file`
2396
-   fi
2397
-   rm -f conftest.file
2398
-   if test "$*" != "X $srcdir/configure conftest.file" \
2399
-      && test "$*" != "X conftest.file $srcdir/configure"; then
2400
-
2401
-      # If neither matched, then we have a broken ls.  This can happen
2402
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
2403
-      # broken ls alias from the environment.  This has actually
2404
-      # happened.  Such a system could not be considered "sane".
2405
-      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
2406
-alias in your environment" >&5
2407
-echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
2408
-alias in your environment" >&2;}
2409
-   { (exit 1); exit 1; }; }
2410
-   fi
2411
-
2412
-   test "$2" = conftest.file
2413
-   )
2414
-then
2415
-   # Ok.
2416
-   :
2417
-else
2418
-   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
2419
-Check your system clock" >&5
2420
-echo "$as_me: error: newly created file is older than distributed files!
2421
-Check your system clock" >&2;}
2422
-   { (exit 1); exit 1; }; }
2423
-fi
2424
-{ echo "$as_me:$LINENO: result: yes" >&5
2425
-echo "${ECHO_T}yes" >&6; }
2426
-test "$program_prefix" != NONE &&
2427
-  program_transform_name="s&^&$program_prefix&;$program_transform_name"
2428
-# Use a double $ so make ignores it.
2429
-test "$program_suffix" != NONE &&
2430
-  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2431
-# Double any \ or $.  echo might interpret backslashes.
2432
-# By default was `s,x,x', remove it if useless.
2433
-cat <<\_ACEOF >conftest.sed
2434
-s/[\\$]/&&/g;s/;s,x,x,$//
2435
-_ACEOF
2436
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2437
-rm -f conftest.sed
2438
-
2439
-# expand $ac_aux_dir to an absolute path
2440
-am_aux_dir=`cd $ac_aux_dir && pwd`
2441
-
2442
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
2443
-# Use eval to expand $SHELL
2444
-if eval "$MISSING --run true"; then
2445
-  am_missing_run="$MISSING --run "
2446
-else
2447
-  am_missing_run=
2448
-  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
2449
-echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
2450
-fi
2451
-
2452
-{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
2453
-echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
2454
-if test -z "$MKDIR_P"; then
2455
-  if test "${ac_cv_path_mkdir+set}" = set; then
2456
-  echo $ECHO_N "(cached) $ECHO_C" >&6
2457
-else
2458
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2459
-for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
2460
-do
2461
-  IFS=$as_save_IFS
2462
-  test -z "$as_dir" && as_dir=.
2463
-  for ac_prog in mkdir gmkdir; do
2464
-	 for ac_exec_ext in '' $ac_executable_extensions; do
2465
-	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
2466
-	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
2467
-	     'mkdir (GNU coreutils) '* | \
2468
-	     'mkdir (coreutils) '* | \
2469
-	     'mkdir (fileutils) '4.1*)
2470
-	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
2471
-	       break 3;;
2472
-	   esac
2473
-	 done
2474
-       done
2475
-done
2476
-IFS=$as_save_IFS
2477
-
2478
-fi
2479
-
2480
-  if test "${ac_cv_path_mkdir+set}" = set; then
2481
-    MKDIR_P="$ac_cv_path_mkdir -p"
2482
-  else
2483
-    # As a last resort, use the slow shell script.  Don't cache a
2484
-    # value for MKDIR_P within a source directory, because that will
2485
-    # break other packages using the cache if that directory is
2486
-    # removed, or if the value is a relative name.
2487
-    test -d ./--version && rmdir ./--version
2488
-    MKDIR_P="$ac_install_sh -d"
2489
-  fi
2490
-fi
2491
-{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
2492
-echo "${ECHO_T}$MKDIR_P" >&6; }
2493
-
2494
-mkdir_p="$MKDIR_P"
2495
-case $mkdir_p in
2496
-  [\\/$]* | ?:[\\/]*) ;;
2497
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
2498
-esac
2499
-
2500
-for ac_prog in gawk mawk nawk awk
2501
-do
2502
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
2503
-set dummy $ac_prog; ac_word=$2
2504
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2505
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2506
-if test "${ac_cv_prog_AWK+set}" = set; then
2507
-  echo $ECHO_N "(cached) $ECHO_C" >&6
2508
-else
2509
-  if test -n "$AWK"; then
2510
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
2511
-else
2512
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2513
-for as_dir in $PATH
2514
-do
2515
-  IFS=$as_save_IFS
2516
-  test -z "$as_dir" && as_dir=.
2517
-  for ac_exec_ext in '' $ac_executable_extensions; do
2518
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2519
-    ac_cv_prog_AWK="$ac_prog"
2520
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2521
-    break 2
2522
-  fi
2523
-done
2524
-done
2525
-IFS=$as_save_IFS
2526
-
2527
-fi
2528
-fi
2529
-AWK=$ac_cv_prog_AWK
2530
-if test -n "$AWK"; then
2531
-  { echo "$as_me:$LINENO: result: $AWK" >&5
2532
-echo "${ECHO_T}$AWK" >&6; }
2533
-else
2534
-  { echo "$as_me:$LINENO: result: no" >&5
2535
-echo "${ECHO_T}no" >&6; }
2536
-fi
2537
-
2538
-
2539
-  test -n "$AWK" && break
2540
-done
2541
-
2542
-{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2543
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
2544
-set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2545
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
2546
-  echo $ECHO_N "(cached) $ECHO_C" >&6
2547
-else
2548
-  cat >conftest.make <<\_ACEOF
2549
-SHELL = /bin/sh
2550
-all:
2551
-	@echo '@@@%%%=$(MAKE)=@@@%%%'
2552
-_ACEOF
2553
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2554
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
2555
-  *@@@%%%=?*=@@@%%%*)
2556
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
2557
-  *)
2558
-    eval ac_cv_prog_make_${ac_make}_set=no;;
2559
-esac
2560
-rm -f conftest.make
2561
-fi
2562
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2563
-  { echo "$as_me:$LINENO: result: yes" >&5
2564
-echo "${ECHO_T}yes" >&6; }
2565
-  SET_MAKE=
2566
-else
2567
-  { echo "$as_me:$LINENO: result: no" >&5
2568
-echo "${ECHO_T}no" >&6; }
2569
-  SET_MAKE="MAKE=${MAKE-make}"
2570
-fi
2571
-
2572
-rm -rf .tst 2>/dev/null
2573
-mkdir .tst 2>/dev/null
2574
-if test -d .tst; then
2575
-  am__leading_dot=.
2576
-else
2577
-  am__leading_dot=_
2578
-fi
2579
-rmdir .tst 2>/dev/null
2580
-
2581
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
2582
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
2583
-  # is not polluted with repeated "-I."
2584
-  am__isrc=' -I$(srcdir)'
2585
-  # test to see if srcdir already configured
2586
-  if test -f $srcdir/config.status; then
2587
-    { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
2588
-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
2589
-   { (exit 1); exit 1; }; }
2590
-  fi
2591
-fi
2592
-
2593
-# test whether we have cygpath
2594
-if test -z "$CYGPATH_W"; then
2595
-  if (cygpath --version) >/dev/null 2>/dev/null; then
2596
-    CYGPATH_W='cygpath -w'
2597
-  else
2598
-    CYGPATH_W=echo
2599
-  fi
2600
-fi
2601
-
2602
-
2603
-# Define the identity of the package.
2604
- PACKAGE=clamav
2605
- VERSION="devel-`date +%Y%m%d`"
2606
-
2607
-
2608
-cat >>confdefs.h <<_ACEOF
2609
-#define PACKAGE "$PACKAGE"
2610
-_ACEOF
2611
-
2612
-
2613
-cat >>confdefs.h <<_ACEOF
2614
-#define VERSION "$VERSION"
2615
-_ACEOF
2616
-
2617
-# Some tools Automake needs.
2618
-
2619
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
2620
-
2621
-
2622
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
2623
-
2624
-
2625
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
2626
-
2627
-
2628
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
2629
-
2630
-
2631
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
2632
-
2633
-install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
2634
-
2635
-# Installed binaries are usually stripped using `strip' when the user
2636
-# run `make install-strip'.  However `strip' might not be the right
2637
-# tool to use in cross-compilation environments, therefore Automake
2638
-# will honor the `STRIP' environment variable to overrule this program.
2639
-if test "$cross_compiling" != no; then
2640
-  if test -n "$ac_tool_prefix"; then
2641
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2642
-set dummy ${ac_tool_prefix}strip; ac_word=$2
2643
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2644
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2645
-if test "${ac_cv_prog_STRIP+set}" = set; then
2646
-  echo $ECHO_N "(cached) $ECHO_C" >&6
2647
-else
2648
-  if test -n "$STRIP"; then
2649
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2650
-else
2651
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2652
-for as_dir in $PATH
2653
-do
2654
-  IFS=$as_save_IFS
2655
-  test -z "$as_dir" && as_dir=.
2656
-  for ac_exec_ext in '' $ac_executable_extensions; do
2657
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2658
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2659
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2660
-    break 2
2661
-  fi
2662
-done
2663
-done
2664
-IFS=$as_save_IFS
2665
-
2666
-fi
2667
-fi
2668
-STRIP=$ac_cv_prog_STRIP
2669
-if test -n "$STRIP"; then
2670
-  { echo "$as_me:$LINENO: result: $STRIP" >&5
2671
-echo "${ECHO_T}$STRIP" >&6; }
2672
-else
2673
-  { echo "$as_me:$LINENO: result: no" >&5
2674
-echo "${ECHO_T}no" >&6; }
2675
-fi
2676
-
2677
-
2678
-fi
2679
-if test -z "$ac_cv_prog_STRIP"; then
2680
-  ac_ct_STRIP=$STRIP
2681
-  # Extract the first word of "strip", so it can be a program name with args.
2682
-set dummy strip; ac_word=$2
2683
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2684
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2685
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
2686
-  echo $ECHO_N "(cached) $ECHO_C" >&6
2687
-else
2688
-  if test -n "$ac_ct_STRIP"; then
2689
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2690
-else
2691
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2692
-for as_dir in $PATH
2693
-do
2694
-  IFS=$as_save_IFS
2695
-  test -z "$as_dir" && as_dir=.
2696
-  for ac_exec_ext in '' $ac_executable_extensions; do
2697
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2698
-    ac_cv_prog_ac_ct_STRIP="strip"
2699
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2700
-    break 2
2701
-  fi
2702
-done
2703
-done
2704
-IFS=$as_save_IFS
2705
-
2706
-fi
2707
-fi
2708
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2709
-if test -n "$ac_ct_STRIP"; then
2710
-  { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
2711
-echo "${ECHO_T}$ac_ct_STRIP" >&6; }
2712
-else
2713
-  { echo "$as_me:$LINENO: result: no" >&5
2714
-echo "${ECHO_T}no" >&6; }
2715
-fi
2716
-
2717
-  if test "x$ac_ct_STRIP" = x; then
2718
-    STRIP=":"
2719
-  else
2720
-    case $cross_compiling:$ac_tool_warned in
2721
-yes:)
2722
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2723
-whose name does not start with the host triplet.  If you think this
2724
-configuration is useful to you, please write to autoconf@gnu.org." >&5
2725
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2726
-whose name does not start with the host triplet.  If you think this
2727
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2728
-ac_tool_warned=yes ;;
2729
-esac
2730
-    STRIP=$ac_ct_STRIP
2731
-  fi
2732
-else
2733
-  STRIP="$ac_cv_prog_STRIP"
2734
-fi
2735
-
2736
-fi
2737
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2738
-
2739
-# We need awk for the "check" target.  The system "awk" is bad on
2740
-# some platforms.
2741
-# Always define AMTAR for backward compatibility.
2742
-
2743
-AMTAR=${AMTAR-"${am_missing_run}tar"}
2744
-
2745
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
2746
-
2747
-
2748
-
2749
-
2750
-
2751
-ac_config_headers="$ac_config_headers clamav-config.h"
2752
-
2753
-
2754
-LC_CURRENT=3
2755
-LC_REVISION=3
2756
-LC_AGE=0
2757
-LIBCLAMAV_VERSION="$LC_CURRENT":"$LC_REVISION":"$LC_AGE"
2758
-
2759
-
2760
-for ac_prog in gawk mawk nawk awk
2761
-do
2762
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
2763
-set dummy $ac_prog; ac_word=$2
2764
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2765
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2766
-if test "${ac_cv_prog_AWK+set}" = set; then
2767
-  echo $ECHO_N "(cached) $ECHO_C" >&6
2768
-else
2769
-  if test -n "$AWK"; then
2770
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
2771
-else
2772
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2773
-for as_dir in $PATH
2774
-do
2775
-  IFS=$as_save_IFS
2776
-  test -z "$as_dir" && as_dir=.
2777
-  for ac_exec_ext in '' $ac_executable_extensions; do
2778
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2779
-    ac_cv_prog_AWK="$ac_prog"
2780
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2781
-    break 2
2782
-  fi
2783
-done
2784
-done
2785
-IFS=$as_save_IFS
2786
-
2787
-fi
2788
-fi
2789
-AWK=$ac_cv_prog_AWK
2790
-if test -n "$AWK"; then
2791
-  { echo "$as_me:$LINENO: result: $AWK" >&5
2792
-echo "${ECHO_T}$AWK" >&6; }
2793
-else
2794
-  { echo "$as_me:$LINENO: result: no" >&5
2795
-echo "${ECHO_T}no" >&6; }
2796
-fi
2797
-
2798
-
2799
-  test -n "$AWK" && break
2800
-done
2801
-
2802 1986
 ac_ext=c
2803 1987
 ac_cpp='$CPP $CPPFLAGS'
2804 1988
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
... ...
@@ -3717,6 +2915,608 @@ ac_cpp='$CPP $CPPFLAGS'
3717 3717
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3718 3718
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3719 3719
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3720
+
3721
+ac_config_headers="$ac_config_headers clamav-config.h"
3722
+
3723
+
3724
+
3725
+
3726
+# Make sure we can run config.sub.
3727
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3728
+  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
3729
+echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
3730
+   { (exit 1); exit 1; }; }
3731
+
3732
+{ echo "$as_me:$LINENO: checking build system type" >&5
3733
+echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
3734
+if test "${ac_cv_build+set}" = set; then
3735
+  echo $ECHO_N "(cached) $ECHO_C" >&6
3736
+else
3737
+  ac_build_alias=$build_alias
3738
+test "x$ac_build_alias" = x &&
3739
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3740
+test "x$ac_build_alias" = x &&
3741
+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
3742
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
3743
+   { (exit 1); exit 1; }; }
3744
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3745
+  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
3746
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
3747
+   { (exit 1); exit 1; }; }
3748
+
3749
+fi
3750
+{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
3751
+echo "${ECHO_T}$ac_cv_build" >&6; }
3752
+case $ac_cv_build in
3753
+*-*-*) ;;
3754
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
3755
+echo "$as_me: error: invalid value of canonical build" >&2;}
3756
+   { (exit 1); exit 1; }; };;
3757
+esac
3758
+build=$ac_cv_build
3759
+ac_save_IFS=$IFS; IFS='-'
3760
+set x $ac_cv_build
3761
+shift
3762
+build_cpu=$1
3763
+build_vendor=$2
3764
+shift; shift
3765
+# Remember, the first character of IFS is used to create $*,
3766
+# except with old shells:
3767
+build_os=$*
3768
+IFS=$ac_save_IFS
3769
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3770
+
3771
+
3772
+{ echo "$as_me:$LINENO: checking host system type" >&5
3773
+echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
3774
+if test "${ac_cv_host+set}" = set; then
3775
+  echo $ECHO_N "(cached) $ECHO_C" >&6
3776
+else
3777
+  if test "x$host_alias" = x; then
3778
+  ac_cv_host=$ac_cv_build
3779
+else
3780
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3781
+    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
3782
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
3783
+   { (exit 1); exit 1; }; }
3784
+fi
3785
+
3786
+fi
3787
+{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
3788
+echo "${ECHO_T}$ac_cv_host" >&6; }
3789
+case $ac_cv_host in
3790
+*-*-*) ;;
3791
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
3792
+echo "$as_me: error: invalid value of canonical host" >&2;}
3793
+   { (exit 1); exit 1; }; };;
3794
+esac
3795
+host=$ac_cv_host
3796
+ac_save_IFS=$IFS; IFS='-'
3797
+set x $ac_cv_host
3798
+shift
3799
+host_cpu=$1
3800
+host_vendor=$2
3801
+shift; shift
3802
+# Remember, the first character of IFS is used to create $*,
3803
+# except with old shells:
3804
+host_os=$*
3805
+IFS=$ac_save_IFS
3806
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3807
+
3808
+
3809
+{ echo "$as_me:$LINENO: checking target system type" >&5
3810
+echo $ECHO_N "checking target system type... $ECHO_C" >&6; }
3811
+if test "${ac_cv_target+set}" = set; then
3812
+  echo $ECHO_N "(cached) $ECHO_C" >&6
3813
+else
3814
+  if test "x$target_alias" = x; then
3815
+  ac_cv_target=$ac_cv_host
3816
+else
3817
+  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
3818
+    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
3819
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
3820
+   { (exit 1); exit 1; }; }
3821
+fi
3822
+
3823
+fi
3824
+{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5
3825
+echo "${ECHO_T}$ac_cv_target" >&6; }
3826
+case $ac_cv_target in
3827
+*-*-*) ;;
3828
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
3829
+echo "$as_me: error: invalid value of canonical target" >&2;}
3830
+   { (exit 1); exit 1; }; };;
3831
+esac
3832
+target=$ac_cv_target
3833
+ac_save_IFS=$IFS; IFS='-'
3834
+set x $ac_cv_target
3835
+shift
3836
+target_cpu=$1
3837
+target_vendor=$2
3838
+shift; shift
3839
+# Remember, the first character of IFS is used to create $*,
3840
+# except with old shells:
3841
+target_os=$*
3842
+IFS=$ac_save_IFS
3843
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
3844
+
3845
+
3846
+# The aliases save the names the user supplied, while $host etc.
3847
+# will get canonicalized.
3848
+test -n "$target_alias" &&
3849
+  test "$program_prefix$program_suffix$program_transform_name" = \
3850
+    NONENONEs,x,x, &&
3851
+  program_prefix=${target_alias}-
3852
+
3853
+target_cpu_arch="unknown"
3854
+case $target_cpu in
3855
+ i386*|i486*|i586*|i686*|i786*) target_cpu_arch=i386 ;;
3856
+ power*)   target_cpu_arch=ppc ;;
3857
+ arm*)     target_cpu_arch=arm ;;
3858
+ sparc64*) target_cpu_arch=sparc64 ;;
3859
+ sparc*)   target_cpu_arch=sparc ;;
3860
+ mips64*)  target_cpu_arch=mips64 ;;
3861
+ mips*)    target_cpu_arch=mips ;;
3862
+ alpha*)   target_cpu_arch=alpha ;;
3863
+ hppa1*)   target_cpu_arch=hppa1 ;;
3864
+ hppa2*)   target_cpu_arch=hppa2 ;;
3865
+ arm*)     target_cpu_arch=arm ;;
3866
+ m68???|mcf54??) target_cpu_arch=m68k ;;
3867
+ *)        target_cpu_arch="$target_cpu" ;;
3868
+esac
3869
+
3870
+host_cpu_arch="unknown"
3871
+case $host_cpu in
3872
+ i386*|i486*|i586*|i686*|i786*) host_cpu_arch=i386 ;;
3873
+ power*)   host_cpu_arch=ppc ;;
3874
+ arm*)     host_cpu_arch=arm ;;
3875
+ sparc64*) host_cpu_arch=sparc64 ;;
3876
+ sparc*)   host_cpu_arch=sparc ;;
3877
+ mips64*)  host_cpu_arch=mips64 ;;
3878
+ mips*)    host_cpu_arch=mips ;;
3879
+ alpha*)   host_cpu_arch=alpha ;;
3880
+ hppa1*)   host_cpu_arch=hppa1 ;;
3881
+ hppa2*)   host_cpu_arch=hppa2 ;;
3882
+ arm*)     host_cpu_arch=arm ;;
3883
+ m68???|mcf54??) host_cpu_arch=m68k ;;
3884
+ *)        host_cpu_arch="$target_cpu" ;;
3885
+esac
3886
+
3887
+ac_need_target_h_file_new=true
3888
+
3889
+
3890
+
3891
+
3892
+ac_need_target_h_file=`echo target.h`
3893
+ac_need_target_h_prefix=`echo target | sed -e 'y:abcdefghijklmnopqrstuvwxyz-:ABCDEFGHIJKLMNOPQRSTUVWXYZ_:' -e 's:[^A-Z0-9_]::g'`
3894
+#
3895
+target_os0=`echo "$target_os"  | sed -e 'y:abcdefghijklmnopqrstuvwxyz.-:ABCDEFGHIJKLMNOPQRSTUVWXYZ__:' -e 's:[^A-Z0-9_]::g'`
3896
+target_os1=`echo "$target_os0" | sed -e 's:\([^0-9]*\).*:\1:' `
3897
+target_os2=`echo "$target_os0" | sed -e 's:\([^_]*\).*:\1:' `
3898
+target_os3=`echo "$target_os2" | sed -e 's:\([^0-9]*\).*:\1:' `
3899
+#
3900
+target_cpu0=`echo "$target_cpu"  | sed -e 'y:abcdefghijklmnopqrstuvwxyz.-:ABCDEFGHIJKLMNOPQRSTUVWXYZ__:' -e 's:[^A-Z0-9_]::g'`
3901
+target_cpu1=`echo "$target_cpu0" | sed -e 's:\([^0-9]*\).*:\1:' `
3902
+target_cpu2=`echo "$target_cpu0" | sed -e 's:\([^_]*\).*:\1:' `
3903
+target_cpu3=`echo "$target_cpu2" | sed -e 's:\([^0-9]*\).*:\1:' `
3904
+#
3905
+target_cpu_arch0=`echo "$target_cpu_arch" | sed -e 'y:abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:'`
3906
+#
3907
+#
3908
+if $ac_need_target_h_file_new ; then
3909
+{ echo "$as_me:$LINENO: result: creating $ac_need_target_h_file - canonical system defines" >&5
3910
+echo "${ECHO_T}creating $ac_need_target_h_file - canonical system defines" >&6; }
3911
+echo /'*' automatically generated by $PACKAGE configure '*'/ >$ac_need_target_h_file
3912
+echo /'*' on `date` '*'/ >>$ac_need_target_h_file
3913
+ac_need_target_h_file_new=false
3914
+fi
3915
+echo /'*' target uppercase defines '*'/ >>$ac_need_target_h_file
3916
+old1=""
3917
+old2=""
3918
+for i in $target_os0 $target_os1 $target_os2 $target_os3 "TYPE"
3919
+do
3920
+  if test "$old1" != "$i"; then
3921
+  if test "$old2" != "$i"; then
3922
+   echo " " >>$ac_need_target_h_file
3923
+   echo "#ifndef "$ac_need_target_h_prefix"_OS_"$i >>$ac_need_target_h_file
3924
+   echo "#define "$ac_need_target_h_prefix"_OS_"$i '"'"$target_os"'"' >>$ac_need_target_h_file
3925
+   echo "#endif" >>$ac_need_target_h_file
3926
+  fi
3927
+  fi
3928
+  old2="$old1"
3929
+  old1="$i"
3930
+done
3931
+#
3932
+old1=""
3933
+old2=""
3934
+for i in $target_cpu0 $target_cpu1 $target_cpu2 $target_cpu3 "TYPE"
3935
+do
3936
+  if test "$old1" != "$i"; then
3937
+  if test "$old2" != "$i"; then
3938
+   echo " " >>$ac_need_target_h_file
3939
+   echo "#ifndef "$ac_need_target_h_prefix"_CPU_"$i >>$ac_need_target_h_file
3940
+   echo "#define "$ac_need_target_h_prefix"_CPU_"$i '"'"$target_cpu"'"' >>$ac_need_target_h_file
3941
+   echo "#endif" >>$ac_need_target_h_file
3942
+  fi
3943
+  fi
3944
+  old2="$old1"
3945
+  old1="$i"
3946
+done
3947
+#
3948
+old1=""
3949
+old2=""
3950
+for i in $target_cpu_arch0 "TYPE"
3951
+do
3952
+  if test "$old1" != "$i"; then
3953
+  if test "$old2" != "$i"; then
3954
+   echo " " >>$ac_need_target_h_file
3955
+   echo "#ifndef "$ac_need_target_h_prefix"_ARCH_"$i >>$ac_need_target_h_file
3956
+   echo "#define "$ac_need_target_h_prefix"_ARCH_"$i '"'"$target_cpu_arch"'"' >>$ac_need_target_h_file
3957
+   echo "#endif" >>$ac_need_target_h_file
3958
+  fi
3959
+  fi
3960
+  old2="$old1"
3961
+  old1="$i"
3962
+done
3963
+
3964
+
3965
+
3966
+ac_need_target_h_file=`echo target.h`
3967
+ac_need_target_h_prefix=`echo host | sed -e 'y:abcdefghijklmnopqrstuvwxyz-:ABCDEFGHIJKLMNOPQRSTUVWXYZ_:' -e 's:[^A-Z0-9_]::g'`
3968
+#
3969
+host_os0=`echo "$host_os"  | sed -e 'y:abcdefghijklmnopqrstuvwxyz.-:ABCDEFGHIJKLMNOPQRSTUVWXYZ__:' -e 's:[^A-Z0-9_]::g'`
3970
+host_os1=`echo "$host_os0" | sed -e 's:\([^0-9]*\).*:\1:' `
3971
+host_os2=`echo "$host_os0" | sed -e 's:\([^_]*\).*:\1:' `
3972
+host_os3=`echo "$host_os2" | sed -e 's:\([^0-9]*\).*:\1:' `
3973
+#
3974
+host_cpu0=`echo "$host_cpu"  | sed -e 'y:abcdefghijklmnopqrstuvwxyz.-:ABCDEFGHIJKLMNOPQRSTUVWXYZ__:' -e 's:[^A-Z0-9]::g'`
3975
+host_cpu1=`echo "$host_cpu0" | sed -e 's:\([^0-9]*\).*:\1:' `
3976
+host_cpu2=`echo "$host_cpu0" | sed -e 's:\([^_]*\).*:\1:' `
3977
+host_cpu3=`echo "$host_cpu2" | sed -e 's:\([^0-9]*\).*:\1:' `
3978
+#
3979
+host_cpu_arch0=`echo "$host_cpu_arch" | sed -e 'y:abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:'`
3980
+#
3981
+#
3982
+if $ac_need_target_h_file_new ; then
3983
+{ echo "$as_me:$LINENO: result: creating $ac_need_target_h_file - canonical system defines" >&5
3984
+echo "${ECHO_T}creating $ac_need_target_h_file - canonical system defines" >&6; }
3985
+echo /'*' automatically generated by $PACKAGE configure '*'/ >$ac_need_target_h_file
3986
+echo /'*' on `date` '*'/ >>$ac_need_target_h_file
3987
+ac_need_target_h_file_new=false
3988
+fi
3989
+echo /'*' host uppercase defines '*'/ >>$ac_need_target_h_file
3990
+old1=""
3991
+old2=""
3992
+for i in $host_os0 $host_os1 $host_os2 $host_os3 "TYPE"
3993
+do
3994
+  if test "$old1" != "$i"; then
3995
+  if test "$old2" != "$i"; then
3996
+   echo " " >>$ac_need_target_h_file
3997
+   echo "#ifndef "$ac_need_target_h_prefix"_OS_"$i >>$ac_need_target_h_file
3998
+   echo "#define "$ac_need_target_h_prefix"_OS_"$i '"'"$host_os"'"' >>$ac_need_target_h_file
3999
+   echo "#endif" >>$ac_need_target_h_file
4000
+  fi
4001
+  fi
4002
+  old2="$old1"
4003
+  old1="$i"
4004
+done
4005
+#
4006
+old1=""
4007
+old2=""
4008
+for i in $host_cpu0 $host_cpu1 $host_cpu2 $host_cpu3 "TYPE"
4009
+do
4010
+  if test "$old1" != "$i"; then
4011
+  if test "$old2" != "$i"; then
4012
+   echo " " >>$ac_need_target_h_file
4013
+   echo "#ifndef "$ac_need_target_h_prefix"_CPU_"$i >>$ac_need_target_h_file
4014
+   echo "#define "$ac_need_target_h_prefix"_CPU_"$i '"'"$host_cpu"'"' >>$ac_need_target_h_file
4015
+   echo "#endif" >>$ac_need_target_h_file
4016
+  fi
4017
+  fi
4018
+  old2="$old1"
4019
+  old1="$i"
4020
+done
4021
+#
4022
+old1=""
4023
+old2=""
4024
+for i in $host_cpu_arch0 "TYPE"
4025
+do
4026
+  if test "$old1" != "$i"; then
4027
+  if test "$old2" != "$i"; then
4028
+   echo " " >>$ac_need_target_h_file
4029
+   echo "#ifndef "$ac_need_target_h_prefix"_ARCH_"$i >>$ac_need_target_h_file
4030
+   echo "#define "$ac_need_target_h_prefix"_ARCH_"$i '"'"$host_cpu_arch"'"' >>$ac_need_target_h_file
4031
+   echo "#endif" >>$ac_need_target_h_file
4032
+  fi
4033
+  fi
4034
+  old2="$old1"
4035
+  old1="$i"
4036
+done
4037
+
4038
+
4039
+
4040
+am__api_version='1.10'
4041
+
4042
+# Find a good install program.  We prefer a C program (faster),
4043
+# so one script is as good as another.  But avoid the broken or
4044
+# incompatible versions:
4045
+# SysV /etc/install, /usr/sbin/install
4046
+# SunOS /usr/etc/install
4047
+# IRIX /sbin/install
4048
+# AIX /bin/install
4049
+# AmigaOS /C/install, which installs bootblocks on floppy discs
4050
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4051
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4052
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4053
+# OS/2's system install, which has a completely different semantic
4054
+# ./install, which can be erroneously created by make from ./install.sh.
4055
+{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4056
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
4057
+if test -z "$INSTALL"; then
4058
+if test "${ac_cv_path_install+set}" = set; then
4059
+  echo $ECHO_N "(cached) $ECHO_C" >&6
4060
+else
4061
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4062
+for as_dir in $PATH
4063
+do
4064
+  IFS=$as_save_IFS
4065
+  test -z "$as_dir" && as_dir=.
4066
+  # Account for people who put trailing slashes in PATH elements.
4067
+case $as_dir/ in
4068
+  ./ | .// | /cC/* | \
4069
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4070
+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4071
+  /usr/ucb/* ) ;;
4072
+  *)
4073
+    # OSF1 and SCO ODT 3.0 have their own names for install.
4074
+    # Don't use installbsd from OSF since it installs stuff as root
4075
+    # by default.
4076
+    for ac_prog in ginstall scoinst install; do
4077
+      for ac_exec_ext in '' $ac_executable_extensions; do
4078
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4079
+	  if test $ac_prog = install &&
4080
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4081
+	    # AIX install.  It has an incompatible calling convention.
4082
+	    :
4083
+	  elif test $ac_prog = install &&
4084
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4085
+	    # program-specific install script used by HP pwplus--don't use.
4086
+	    :
4087
+	  else
4088
+	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4089
+	    break 3
4090
+	  fi
4091
+	fi
4092
+      done
4093
+    done
4094
+    ;;
4095
+esac
4096
+done
4097
+IFS=$as_save_IFS
4098
+
4099
+
4100
+fi
4101
+  if test "${ac_cv_path_install+set}" = set; then
4102
+    INSTALL=$ac_cv_path_install
4103
+  else
4104
+    # As a last resort, use the slow shell script.  Don't cache a
4105
+    # value for INSTALL within a source directory, because that will
4106
+    # break other packages using the cache if that directory is
4107
+    # removed, or if the value is a relative name.
4108
+    INSTALL=$ac_install_sh
4109
+  fi
4110
+fi
4111
+{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4112
+echo "${ECHO_T}$INSTALL" >&6; }
4113
+
4114
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4115
+# It thinks the first close brace ends the variable substitution.
4116
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4117
+
4118
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4119
+
4120
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4121
+
4122
+{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
4123
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
4124
+# Just in case
4125
+sleep 1
4126
+echo timestamp > conftest.file
4127
+# Do `set' in a subshell so we don't clobber the current shell's
4128
+# arguments.  Must try -L first in case configure is actually a
4129
+# symlink; some systems play weird games with the mod time of symlinks
4130
+# (eg FreeBSD returns the mod time of the symlink's containing
4131
+# directory).
4132
+if (
4133
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
4134
+   if test "$*" = "X"; then
4135
+      # -L didn't work.
4136
+      set X `ls -t $srcdir/configure conftest.file`
4137
+   fi
4138
+   rm -f conftest.file
4139
+   if test "$*" != "X $srcdir/configure conftest.file" \
4140
+      && test "$*" != "X conftest.file $srcdir/configure"; then
4141
+
4142
+      # If neither matched, then we have a broken ls.  This can happen
4143
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
4144
+      # broken ls alias from the environment.  This has actually
4145
+      # happened.  Such a system could not be considered "sane".
4146
+      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
4147
+alias in your environment" >&5
4148
+echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
4149
+alias in your environment" >&2;}
4150
+   { (exit 1); exit 1; }; }
4151
+   fi
4152
+
4153
+   test "$2" = conftest.file
4154
+   )
4155
+then
4156
+   # Ok.
4157
+   :
4158
+else
4159
+   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
4160
+Check your system clock" >&5
4161
+echo "$as_me: error: newly created file is older than distributed files!
4162
+Check your system clock" >&2;}
4163
+   { (exit 1); exit 1; }; }
4164
+fi
4165
+{ echo "$as_me:$LINENO: result: yes" >&5
4166
+echo "${ECHO_T}yes" >&6; }
4167
+test "$program_prefix" != NONE &&
4168
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
4169
+# Use a double $ so make ignores it.
4170
+test "$program_suffix" != NONE &&
4171
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4172
+# Double any \ or $.  echo might interpret backslashes.
4173
+# By default was `s,x,x', remove it if useless.
4174
+cat <<\_ACEOF >conftest.sed
4175
+s/[\\$]/&&/g;s/;s,x,x,$//
4176
+_ACEOF
4177
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
4178
+rm -f conftest.sed
4179
+
4180
+# expand $ac_aux_dir to an absolute path
4181
+am_aux_dir=`cd $ac_aux_dir && pwd`
4182
+
4183
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
4184
+# Use eval to expand $SHELL
4185
+if eval "$MISSING --run true"; then
4186
+  am_missing_run="$MISSING --run "
4187
+else
4188
+  am_missing_run=
4189
+  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
4190
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
4191
+fi
4192
+
4193
+{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
4194
+echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
4195
+if test -z "$MKDIR_P"; then
4196
+  if test "${ac_cv_path_mkdir+set}" = set; then
4197
+  echo $ECHO_N "(cached) $ECHO_C" >&6
4198
+else
4199
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4200
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4201
+do
4202
+  IFS=$as_save_IFS
4203
+  test -z "$as_dir" && as_dir=.
4204
+  for ac_prog in mkdir gmkdir; do
4205
+	 for ac_exec_ext in '' $ac_executable_extensions; do
4206
+	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
4207
+	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
4208
+	     'mkdir (GNU coreutils) '* | \
4209
+	     'mkdir (coreutils) '* | \
4210
+	     'mkdir (fileutils) '4.1*)
4211
+	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
4212
+	       break 3;;
4213
+	   esac
4214
+	 done
4215
+       done
4216
+done
4217
+IFS=$as_save_IFS
4218
+
4219
+fi
4220
+
4221
+  if test "${ac_cv_path_mkdir+set}" = set; then
4222
+    MKDIR_P="$ac_cv_path_mkdir -p"
4223
+  else
4224
+    # As a last resort, use the slow shell script.  Don't cache a
4225
+    # value for MKDIR_P within a source directory, because that will
4226
+    # break other packages using the cache if that directory is
4227
+    # removed, or if the value is a relative name.
4228
+    test -d ./--version && rmdir ./--version
4229
+    MKDIR_P="$ac_install_sh -d"
4230
+  fi
4231
+fi
4232
+{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
4233
+echo "${ECHO_T}$MKDIR_P" >&6; }
4234
+
4235
+mkdir_p="$MKDIR_P"
4236
+case $mkdir_p in
4237
+  [\\/$]* | ?:[\\/]*) ;;
4238
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
4239
+esac
4240
+
4241
+for ac_prog in gawk mawk nawk awk
4242
+do
4243
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
4244
+set dummy $ac_prog; ac_word=$2
4245
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4246
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4247
+if test "${ac_cv_prog_AWK+set}" = set; then
4248
+  echo $ECHO_N "(cached) $ECHO_C" >&6
4249
+else
4250
+  if test -n "$AWK"; then
4251
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
4252
+else
4253
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4254
+for as_dir in $PATH
4255
+do
4256
+  IFS=$as_save_IFS
4257
+  test -z "$as_dir" && as_dir=.
4258
+  for ac_exec_ext in '' $ac_executable_extensions; do
4259
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4260
+    ac_cv_prog_AWK="$ac_prog"
4261
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4262
+    break 2
4263
+  fi
4264
+done
4265
+done
4266
+IFS=$as_save_IFS
4267
+
4268
+fi
4269
+fi
4270
+AWK=$ac_cv_prog_AWK
4271
+if test -n "$AWK"; then
4272
+  { echo "$as_me:$LINENO: result: $AWK" >&5
4273
+echo "${ECHO_T}$AWK" >&6; }
4274
+else
4275
+  { echo "$as_me:$LINENO: result: no" >&5
4276
+echo "${ECHO_T}no" >&6; }
4277
+fi
4278
+
4279
+
4280
+  test -n "$AWK" && break
4281
+done
4282
+
4283
+{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4284
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
4285
+set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4286
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
4287
+  echo $ECHO_N "(cached) $ECHO_C" >&6
4288
+else
4289
+  cat >conftest.make <<\_ACEOF
4290
+SHELL = /bin/sh
4291
+all:
4292
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
4293
+_ACEOF
4294
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4295
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
4296
+  *@@@%%%=?*=@@@%%%*)
4297
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
4298
+  *)
4299
+    eval ac_cv_prog_make_${ac_make}_set=no;;
4300
+esac
4301
+rm -f conftest.make
4302
+fi
4303
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4304
+  { echo "$as_me:$LINENO: result: yes" >&5
4305
+echo "${ECHO_T}yes" >&6; }
4306
+  SET_MAKE=
4307
+else
4308
+  { echo "$as_me:$LINENO: result: no" >&5
4309
+echo "${ECHO_T}no" >&6; }
4310
+  SET_MAKE="MAKE=${MAKE-make}"
4311
+fi
4312
+
4313
+rm -rf .tst 2>/dev/null
4314
+mkdir .tst 2>/dev/null
4315
+if test -d .tst; then
4316
+  am__leading_dot=.
4317
+else
4318
+  am__leading_dot=_
4319
+fi
4320
+rmdir .tst 2>/dev/null
4321
+
3720 4322
 DEPDIR="${am__leading_dot}deps"
3721 4323
 
3722 4324
 ac_config_commands="$ac_config_commands depfiles"
... ...
@@ -3779,6 +3579,165 @@ else
3779 3779
 fi
3780 3780
 
3781 3781
 
3782
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
3783
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3784
+  # is not polluted with repeated "-I."
3785
+  am__isrc=' -I$(srcdir)'
3786
+  # test to see if srcdir already configured
3787
+  if test -f $srcdir/config.status; then
3788
+    { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
3789
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
3790
+   { (exit 1); exit 1; }; }
3791
+  fi
3792
+fi
3793
+
3794
+# test whether we have cygpath
3795
+if test -z "$CYGPATH_W"; then
3796
+  if (cygpath --version) >/dev/null 2>/dev/null; then
3797
+    CYGPATH_W='cygpath -w'
3798
+  else
3799
+    CYGPATH_W=echo
3800
+  fi
3801
+fi
3802
+
3803
+
3804
+# Define the identity of the package.
3805
+ PACKAGE='clamav'
3806
+ VERSION='devel'
3807
+
3808
+
3809
+# Some tools Automake needs.
3810
+
3811
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3812
+
3813
+
3814
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3815
+
3816
+
3817
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3818
+
3819
+
3820
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3821
+
3822
+
3823
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3824
+
3825
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
3826
+
3827
+# Installed binaries are usually stripped using `strip' when the user
3828
+# run `make install-strip'.  However `strip' might not be the right
3829
+# tool to use in cross-compilation environments, therefore Automake
3830
+# will honor the `STRIP' environment variable to overrule this program.
3831
+if test "$cross_compiling" != no; then
3832
+  if test -n "$ac_tool_prefix"; then
3833
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3834
+set dummy ${ac_tool_prefix}strip; ac_word=$2
3835
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3836
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3837
+if test "${ac_cv_prog_STRIP+set}" = set; then
3838
+  echo $ECHO_N "(cached) $ECHO_C" >&6
3839
+else
3840
+  if test -n "$STRIP"; then
3841
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3842
+else
3843
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3844
+for as_dir in $PATH
3845
+do
3846
+  IFS=$as_save_IFS
3847
+  test -z "$as_dir" && as_dir=.
3848
+  for ac_exec_ext in '' $ac_executable_extensions; do
3849
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3850
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3851
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3852
+    break 2
3853
+  fi
3854
+done
3855
+done
3856
+IFS=$as_save_IFS
3857
+
3858
+fi
3859
+fi
3860
+STRIP=$ac_cv_prog_STRIP
3861
+if test -n "$STRIP"; then
3862
+  { echo "$as_me:$LINENO: result: $STRIP" >&5
3863
+echo "${ECHO_T}$STRIP" >&6; }
3864
+else
3865
+  { echo "$as_me:$LINENO: result: no" >&5
3866
+echo "${ECHO_T}no" >&6; }
3867
+fi
3868
+
3869
+
3870
+fi
3871
+if test -z "$ac_cv_prog_STRIP"; then
3872
+  ac_ct_STRIP=$STRIP
3873
+  # Extract the first word of "strip", so it can be a program name with args.
3874
+set dummy strip; ac_word=$2
3875
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3876
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3877
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
3878
+  echo $ECHO_N "(cached) $ECHO_C" >&6
3879
+else
3880
+  if test -n "$ac_ct_STRIP"; then
3881
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3882
+else
3883
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3884
+for as_dir in $PATH
3885
+do
3886
+  IFS=$as_save_IFS
3887
+  test -z "$as_dir" && as_dir=.
3888
+  for ac_exec_ext in '' $ac_executable_extensions; do
3889
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3890
+    ac_cv_prog_ac_ct_STRIP="strip"
3891
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3892
+    break 2
3893
+  fi
3894
+done
3895
+done
3896
+IFS=$as_save_IFS
3897
+
3898
+fi
3899
+fi
3900
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3901
+if test -n "$ac_ct_STRIP"; then
3902
+  { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
3903
+echo "${ECHO_T}$ac_ct_STRIP" >&6; }
3904
+else
3905
+  { echo "$as_me:$LINENO: result: no" >&5
3906
+echo "${ECHO_T}no" >&6; }
3907
+fi
3908
+
3909
+  if test "x$ac_ct_STRIP" = x; then
3910
+    STRIP=":"
3911
+  else
3912
+    case $cross_compiling:$ac_tool_warned in
3913
+yes:)
3914
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3915
+whose name does not start with the host triplet.  If you think this
3916
+configuration is useful to you, please write to autoconf@gnu.org." >&5
3917
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3918
+whose name does not start with the host triplet.  If you think this
3919
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3920
+ac_tool_warned=yes ;;
3921
+esac
3922
+    STRIP=$ac_ct_STRIP
3923
+  fi
3924
+else
3925
+  STRIP="$ac_cv_prog_STRIP"
3926
+fi
3927
+
3928
+fi
3929
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3930
+
3931
+# We need awk for the "check" target.  The system "awk" is bad on
3932
+# some platforms.
3933
+# Always define AMTAR for backward compatibility.
3934
+
3935
+AMTAR=${AMTAR-"${am_missing_run}tar"}
3936
+
3937
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3938
+
3939
+
3940
+
3782 3941
 
3783 3942
 depcc="$CC"   am_compiler_list=
3784 3943
 
... ...
@@ -3888,6 +3847,68 @@ else
3888 3888
 fi
3889 3889
 
3890 3890
 
3891
+
3892
+
3893
+
3894
+cat >>confdefs.h <<\_ACEOF
3895
+#define PACKAGE PACKAGE_NAME
3896
+_ACEOF
3897
+
3898
+
3899
+
3900
+cat >>confdefs.h <<\_ACEOF
3901
+#define VERSION "devel-`date +%Y%m%d`"
3902
+_ACEOF
3903
+
3904
+
3905
+LC_CURRENT=3
3906
+LC_REVISION=3
3907
+LC_AGE=0
3908
+LIBCLAMAV_VERSION="$LC_CURRENT":"$LC_REVISION":"$LC_AGE"
3909
+
3910
+
3911
+for ac_prog in gawk mawk nawk awk
3912
+do
3913
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
3914
+set dummy $ac_prog; ac_word=$2
3915
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3916
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3917
+if test "${ac_cv_prog_AWK+set}" = set; then
3918
+  echo $ECHO_N "(cached) $ECHO_C" >&6
3919
+else
3920
+  if test -n "$AWK"; then
3921
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
3922
+else
3923
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3924
+for as_dir in $PATH
3925
+do
3926
+  IFS=$as_save_IFS
3927
+  test -z "$as_dir" && as_dir=.
3928
+  for ac_exec_ext in '' $ac_executable_extensions; do
3929
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3930
+    ac_cv_prog_AWK="$ac_prog"
3931
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3932
+    break 2
3933
+  fi
3934
+done
3935
+done
3936
+IFS=$as_save_IFS
3937
+
3938
+fi
3939
+fi
3940
+AWK=$ac_cv_prog_AWK
3941
+if test -n "$AWK"; then
3942
+  { echo "$as_me:$LINENO: result: $AWK" >&5
3943
+echo "${ECHO_T}$AWK" >&6; }
3944
+else
3945
+  { echo "$as_me:$LINENO: result: no" >&5
3946
+echo "${ECHO_T}no" >&6; }
3947
+fi
3948
+
3949
+
3950
+  test -n "$AWK" && break
3951
+done
3952
+
3891 3953
 # Find a good install program.  We prefer a C program (faster),
3892 3954
 # so one script is as good as another.  But avoid the broken or
3893 3955
 # incompatible versions:
... ...
@@ -4725,7 +4746,7 @@ ia64-*-hpux*)
4725 4725
   ;;
4726 4726
 *-*-irix6*)
4727 4727
   # Find out which ABI we are using.
4728
-  echo '#line 4728 "configure"' > conftest.$ac_ext
4728
+  echo '#line 4749 "configure"' > conftest.$ac_ext
4729 4729
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4730 4730
   (eval $ac_compile) 2>&5
4731 4731
   ac_status=$?
... ...
@@ -5501,7 +5522,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
5501 5501
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5502 5502
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5503 5503
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5504
-
5504
+    ( cat <<\_ASBOX
5505
+## -------------------------------------- ##
5506
+## Report this to http://bugs.clamav.net/ ##
5507
+## -------------------------------------- ##
5508
+_ASBOX
5509
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
5505 5510
     ;;
5506 5511
 esac
5507 5512
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
... ...
@@ -6495,11 +6521,11 @@ else
6495 6495
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
6496 6496
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
6497 6497
    -e 's:$: $lt_compiler_flag:'`
6498
-   (eval echo "\"\$as_me:6498: $lt_compile\"" >&5)
6498
+   (eval echo "\"\$as_me:6524: $lt_compile\"" >&5)
6499 6499
    (eval "$lt_compile" 2>conftest.err)
6500 6500
    ac_status=$?
6501 6501
    cat conftest.err >&5
6502
-   echo "$as_me:6502: \$? = $ac_status" >&5
6502
+   echo "$as_me:6528: \$? = $ac_status" >&5
6503 6503
    if (exit $ac_status) && test -s "$ac_outfile"; then
6504 6504
      # The compiler can only warn and ignore the option if not recognized
6505 6505
      # So say no if there are warnings other than the usual output.
... ...
@@ -6785,11 +6811,11 @@ else
6785 6785
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
6786 6786
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
6787 6787
    -e 's:$: $lt_compiler_flag:'`
6788
-   (eval echo "\"\$as_me:6788: $lt_compile\"" >&5)
6788
+   (eval echo "\"\$as_me:6814: $lt_compile\"" >&5)
6789 6789
    (eval "$lt_compile" 2>conftest.err)
6790 6790
    ac_status=$?
6791 6791
    cat conftest.err >&5
6792
-   echo "$as_me:6792: \$? = $ac_status" >&5
6792
+   echo "$as_me:6818: \$? = $ac_status" >&5
6793 6793
    if (exit $ac_status) && test -s "$ac_outfile"; then
6794 6794
      # The compiler can only warn and ignore the option if not recognized
6795 6795
      # So say no if there are warnings other than the usual output.
... ...
@@ -6889,11 +6915,11 @@ else
6889 6889
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
6890 6890
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
6891 6891
    -e 's:$: $lt_compiler_flag:'`
6892
-   (eval echo "\"\$as_me:6892: $lt_compile\"" >&5)
6892
+   (eval echo "\"\$as_me:6918: $lt_compile\"" >&5)
6893 6893
    (eval "$lt_compile" 2>out/conftest.err)
6894 6894
    ac_status=$?
6895 6895
    cat out/conftest.err >&5
6896
-   echo "$as_me:6896: \$? = $ac_status" >&5
6896
+   echo "$as_me:6922: \$? = $ac_status" >&5
6897 6897
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
6898 6898
    then
6899 6899
      # The compiler can only warn and ignore the option if not recognized
... ...
@@ -9251,7 +9277,7 @@ else
9251 9251
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
9252 9252
   lt_status=$lt_dlunknown
9253 9253
   cat > conftest.$ac_ext <<EOF
9254
-#line 9254 "configure"
9254
+#line 9280 "configure"
9255 9255
 #include "confdefs.h"
9256 9256
 
9257 9257
 #if HAVE_DLFCN_H
... ...
@@ -9351,7 +9377,7 @@ else
9351 9351
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
9352 9352
   lt_status=$lt_dlunknown
9353 9353
   cat > conftest.$ac_ext <<EOF
9354
-#line 9354 "configure"
9354
+#line 9380 "configure"
9355 9355
 #include "confdefs.h"
9356 9356
 
9357 9357
 #if HAVE_DLFCN_H
... ...
@@ -10658,7 +10684,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
10658 10658
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10659 10659
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10660 10660
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10661
-
10661
+    ( cat <<\_ASBOX
10662
+## -------------------------------------- ##
10663
+## Report this to http://bugs.clamav.net/ ##
10664
+## -------------------------------------- ##
10665
+_ASBOX
10666
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
10662 10667
     ;;
10663 10668
 esac
10664 10669
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
... ...
@@ -10793,7 +10824,12 @@ echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\""
10793 10793
 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
10794 10794
     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
10795 10795
 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
10796
-
10796
+    ( cat <<\_ASBOX
10797
+## -------------------------------------- ##
10798
+## Report this to http://bugs.clamav.net/ ##
10799
+## -------------------------------------- ##
10800
+_ASBOX
10801
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
10797 10802
     ;;
10798 10803
 esac
10799 10804
 { echo "$as_me:$LINENO: checking for syslog.h" >&5
... ...
@@ -11692,7 +11728,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
11692 11692
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11693 11693
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11694 11694
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11695
-
11695
+    ( cat <<\_ASBOX
11696
+## -------------------------------------- ##
11697
+## Report this to http://bugs.clamav.net/ ##
11698
+## -------------------------------------- ##
11699
+_ASBOX
11700
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
11696 11701
     ;;
11697 11702
 esac
11698 11703
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
... ...
@@ -12233,7 +12274,12 @@ echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"
12233 12233
 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
12234 12234
     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
12235 12235
 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
12236
-
12236
+    ( cat <<\_ASBOX
12237
+## -------------------------------------- ##
12238
+## Report this to http://bugs.clamav.net/ ##
12239
+## -------------------------------------- ##
12240
+_ASBOX
12241
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
12237 12242
     ;;
12238 12243
 esac
12239 12244
 { echo "$as_me:$LINENO: checking for pthread.h" >&5
... ...
@@ -12748,7 +12794,12 @@ echo "$as_me: WARNING: bzlib.h:     section \"Present But Cannot Be Compiled\""
12748 12748
 echo "$as_me: WARNING: bzlib.h: proceeding with the preprocessor's result" >&2;}
12749 12749
     { echo "$as_me:$LINENO: WARNING: bzlib.h: in the future, the compiler will take precedence" >&5
12750 12750
 echo "$as_me: WARNING: bzlib.h: in the future, the compiler will take precedence" >&2;}
12751
-
12751
+    ( cat <<\_ASBOX
12752
+## -------------------------------------- ##
12753
+## Report this to http://bugs.clamav.net/ ##
12754
+## -------------------------------------- ##
12755
+_ASBOX
12756
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
12752 12757
     ;;
12753 12758
 esac
12754 12759
 { echo "$as_me:$LINENO: checking for bzlib.h" >&5
... ...
@@ -14526,7 +14577,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
14526 14526
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14527 14527
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14528 14528
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14529
-
14529
+    ( cat <<\_ASBOX
14530
+## -------------------------------------- ##
14531
+## Report this to http://bugs.clamav.net/ ##
14532
+## -------------------------------------- ##
14533
+_ASBOX
14534
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
14530 14535
     ;;
14531 14536
 esac
14532 14537
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
... ...
@@ -14972,7 +15028,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
14972 14972
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14973 14973
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14974 14974
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14975
-
14975
+    ( cat <<\_ASBOX
14976
+## -------------------------------------- ##
14977
+## Report this to http://bugs.clamav.net/ ##
14978
+## -------------------------------------- ##
14979
+_ASBOX
14980
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
14976 14981
     ;;
14977 14982
 esac
14978 14983
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
... ...
@@ -16568,9 +16629,18 @@ cat >>conftest.$ac_ext <<_ACEOF
16568 16568
 #include <sys/time.h>
16569 16569
 #include <sys/select.h>
16570 16570
 #include <sys/types.h>
16571
-main() {
16571
+#include <errno.h>
16572
+int main(void) {
16572 16573
         FILE *fp = fopen("conftestval", "w");
16573
-        fprintf (fp, "%d\n", FD_SETSIZE);
16574
+	if(fp) {
16575
+		if(fprintf (fp, "%d\n", FD_SETSIZE) < 1)  {
16576
+			perror("fprintf failed");
16577
+			return errno;
16578
+		}
16579
+	} else {
16580
+		perror("fopen failed");
16581
+		return errno;
16582
+	}
16574 16583
         exit(0);
16575 16584
 }
16576 16585
 
... ...
@@ -17190,7 +17260,7 @@ exec 6>&1
17190 17190
 # report actual input values of CONFIG_FILES etc. instead of their
17191 17191
 # values after options handling.
17192 17192
 ac_log="
17193
-This file was extended by $as_me, which was
17193
+This file was extended by clamav $as_me devel, which was
17194 17194
 generated by GNU Autoconf 2.61.  Invocation command line was
17195 17195
 
17196 17196
   CONFIG_FILES    = $CONFIG_FILES
... ...
@@ -17243,7 +17313,7 @@ Report bugs to <bug-autoconf@gnu.org>."
17243 17243
 _ACEOF
17244 17244
 cat >>$CONFIG_STATUS <<_ACEOF
17245 17245
 ac_cs_version="\\
17246
-config.status
17246
+clamav config.status devel
17247 17247
 configured by $0, generated by GNU Autoconf 2.61,
17248 17248
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
17249 17249
 
... ...
@@ -17485,6 +17555,13 @@ LIBS!$LIBS$ac_delim
17485 17485
 build_alias!$build_alias$ac_delim
17486 17486
 host_alias!$host_alias$ac_delim
17487 17487
 target_alias!$target_alias$ac_delim
17488
+CC!$CC$ac_delim
17489
+CFLAGS!$CFLAGS$ac_delim
17490
+LDFLAGS!$LDFLAGS$ac_delim
17491
+CPPFLAGS!$CPPFLAGS$ac_delim
17492
+ac_ct_CC!$ac_ct_CC$ac_delim
17493
+EXEEXT!$EXEEXT$ac_delim
17494
+OBJEXT!$OBJEXT$ac_delim
17488 17495
 build!$build$ac_delim
17489 17496
 build_cpu!$build_cpu$ac_delim
17490 17497
 build_vendor!$build_vendor$ac_delim
... ...
@@ -17519,14 +17596,6 @@ am__leading_dot!$am__leading_dot$ac_delim
17519 17519
 AMTAR!$AMTAR$ac_delim
17520 17520
 am__tar!$am__tar$ac_delim
17521 17521
 am__untar!$am__untar$ac_delim
17522
-LIBCLAMAV_VERSION!$LIBCLAMAV_VERSION$ac_delim
17523
-CC!$CC$ac_delim
17524
-CFLAGS!$CFLAGS$ac_delim
17525
-LDFLAGS!$LDFLAGS$ac_delim
17526
-CPPFLAGS!$CPPFLAGS$ac_delim
17527
-ac_ct_CC!$ac_ct_CC$ac_delim
17528
-EXEEXT!$EXEEXT$ac_delim
17529
-OBJEXT!$OBJEXT$ac_delim
17530 17522
 DEPDIR!$DEPDIR$ac_delim
17531 17523
 am__include!$am__include$ac_delim
17532 17524
 am__quote!$am__quote$ac_delim
... ...
@@ -17536,6 +17605,7 @@ AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
17536 17536
 CCDEPMODE!$CCDEPMODE$ac_delim
17537 17537
 am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
17538 17538
 am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
17539
+LIBCLAMAV_VERSION!$LIBCLAMAV_VERSION$ac_delim
17539 17540
 LN_S!$LN_S$ac_delim
17540 17541
 SED!$SED$ac_delim
17541 17542
 GREP!$GREP$ac_delim
... ...
@@ -18,10 +18,30 @@ dnl   along with this program; if not, write to the Free Software
18 18
 dnl   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 19
 dnl   MA 02110-1301, USA.
20 20
 
21
-AC_INIT(clamscan/clamscan.c)
21
+AC_PREREQ(2.59)
22
+dnl For a release change [devel] to the real version [0.xy]
23
+dnl also change VERSION below
24
+AC_INIT([clamav], [devel], [http://bugs.clamav.net/])
25
+
26
+dnl put configure auxiliary into config
27
+AC_CONFIG_AUX_DIR(config)
28
+AC_PROG_CC
29
+AC_CONFIG_HEADER(clamav-config.h)
30
+
31
+dnl safety check, this used to be a parameter to AC_INIT
32
+AC_CONFIG_SRCDIR([clamscan/clamscan.c])
33
+
22 34
 AC_CREATE_TARGET_H(target.h)
23
-AM_INIT_AUTOMAKE(clamav, "devel-`date +%Y%m%d`")
24
-AM_CONFIG_HEADER(clamav-config.h)
35
+
36
+dnl -Wall and -Werror here are NOT CFLAGS, they refer to automake warnings
37
+AM_INIT_AUTOMAKE([-Wall -Werror foreign dist-bzip2 no-define])
38
+
39
+dnl we told automake to not define these, since we want to include
40
+dnl the date in the version
41
+AC_DEFINE(PACKAGE, PACKAGE_NAME, [package name])
42
+
43
+dnl change this on a release
44
+AC_DEFINE(VERSION,["devel-`date +%Y%m%d`"],[package version])
25 45
 
26 46
 LC_CURRENT=3
27 47
 LC_REVISION=3
... ...
@@ -30,7 +50,6 @@ LIBCLAMAV_VERSION="$LC_CURRENT":"$LC_REVISION":"$LC_AGE"
30 30
 AC_SUBST(LIBCLAMAV_VERSION)
31 31
 
32 32
 AC_PROG_AWK
33
-AC_PROG_CC
34 33
 AC_PROG_INSTALL
35 34
 AC_PROG_LN_S
36 35
 AC_PROG_MAKE_SET
... ...
@@ -38,7 +57,7 @@ AC_PROG_MAKE_SET
38 38
 dnl libtool by default brings in check for all the languages/compilers (CXX/F77/...)
39 39
 dnl we don't need them, so avoid tagged configuration
40 40
 dnl libtool-1.6 should already do it right, but thats not stable yet
41
-m4_define([_LT_AC_TAGCONFIG])
41
+AC_DEFUN([_LT_AC_TAGCONFIG])
42 42
 AC_PROG_LIBTOOL
43 43
 
44 44
 AC_DEFINE(SCANBUFF, 131072, [scan buffer size])
... ...
@@ -1288,9 +1307,18 @@ AC_TRY_RUN([
1288 1288
 #include <sys/time.h>
1289 1289
 #include <sys/select.h>
1290 1290
 #include <sys/types.h>
1291
-main() {
1291
+#include <errno.h>
1292
+int main(void) {
1292 1293
         FILE *fp = fopen("conftestval", "w");
1293
-        fprintf (fp, "%d\n", FD_SETSIZE);
1294
+	if(fp) {
1295
+		if(fprintf (fp, "%d\n", FD_SETSIZE) < 1)  {
1296
+			perror("fprintf failed");
1297
+			return errno;
1298
+		}
1299
+	} else {
1300
+		perror("fopen failed");
1301
+		return errno;
1302
+	}
1294 1303
         exit(0);
1295 1304
 }
1296 1305
 ],
... ...
@@ -23,7 +23,7 @@ DBINST = @DBDIR@
23 23
 CLAMAVUSER = @CLAMAVUSER@
24 24
 CLAMAVGROUP = @CLAMAVGROUP@
25 25
  
26
-install:
26
+install-data-local:
27 27
 	$(mkinstalldirs) $(DESTDIR)$(DBINST)
28 28
 #	@test -f $(DESTDIR)$(DBINST)/main.cvd || $(INSTALL_DATA) $(srcdir)/main.cvd $(DESTDIR)$(DBINST)
29 29
 #	@test -f $(DESTDIR)$(DBINST)/daily.cvd || $(INSTALL_DATA) $(srcdir)/daily.cvd $(DESTDIR)$(DBINST)
... ...
@@ -59,7 +59,7 @@ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
59 59
 	$(top_srcdir)/configure.in
60 60
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
61 61
 	$(ACLOCAL_M4)
62
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
62
+mkinstalldirs = $(install_sh) -d
63 63
 CONFIG_HEADER = $(top_builddir)/clamav-config.h
64 64
 CONFIG_CLEAN_FILES =
65 65
 SOURCES =
... ...
@@ -196,9 +196,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
196 196
 	      exit 1;; \
197 197
 	  esac; \
198 198
 	done; \
199
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  database/Makefile'; \
199
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  database/Makefile'; \
200 200
 	cd $(top_srcdir) && \
201
-	  $(AUTOMAKE) --gnu  database/Makefile
201
+	  $(AUTOMAKE) --foreign  database/Makefile
202 202
 .PRECIOUS: Makefile
203 203
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
204 204
 	@case '$?' in \
... ...
@@ -259,6 +259,7 @@ check-am: all-am
259 259
 check: check-am
260 260
 all-am: Makefile
261 261
 installdirs:
262
+install: install-am
262 263
 install-exec: install-exec-am
263 264
 install-data: install-data-am
264 265
 uninstall: uninstall-am
... ...
@@ -300,7 +301,7 @@ info: info-am
300 300
 
301 301
 info-am:
302 302
 
303
-install-data-am:
303
+install-data-am: install-data-local
304 304
 
305 305
 install-dvi: install-dvi-am
306 306
 
... ...
@@ -341,16 +342,17 @@ uninstall-am:
341 341
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
342 342
 	distclean distclean-generic distclean-libtool distdir dvi \
343 343
 	dvi-am html html-am info info-am install install-am \
344
-	install-data install-data-am install-dvi install-dvi-am \
345
-	install-exec install-exec-am install-html install-html-am \
346
-	install-info install-info-am install-man install-pdf \
347
-	install-pdf-am install-ps install-ps-am install-strip \
348
-	installcheck installcheck-am installdirs maintainer-clean \
349
-	maintainer-clean-generic mostlyclean mostlyclean-generic \
350
-	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
344
+	install-data install-data-am install-data-local install-dvi \
345
+	install-dvi-am install-exec install-exec-am install-html \
346
+	install-html-am install-info install-info-am install-man \
347
+	install-pdf install-pdf-am install-ps install-ps-am \
348
+	install-strip installcheck installcheck-am installdirs \
349
+	maintainer-clean maintainer-clean-generic mostlyclean \
350
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
351
+	uninstall uninstall-am
351 352
 
352 353
 
353
-install:
354
+install-data-local:
354 355
 	$(mkinstalldirs) $(DESTDIR)$(DBINST)
355 356
 #	@test -f $(DESTDIR)$(DBINST)/main.cvd || $(INSTALL_DATA) $(srcdir)/main.cvd $(DESTDIR)$(DBINST)
356 357
 #	@test -f $(DESTDIR)$(DBINST)/daily.cvd || $(INSTALL_DATA) $(srcdir)/daily.cvd $(DESTDIR)$(DBINST)
357 358
deleted file mode 100755
... ...
@@ -1,584 +0,0 @@
1
-#! /bin/sh
2
-# depcomp - compile a program generating dependencies as side-effects
3
-
4
-scriptversion=2006-10-15.18
5
-
6
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
7
-# Foundation, Inc.
8
-
9
-# This program is free software; you can redistribute it and/or modify
10
-# it under the terms of the GNU General Public License as published by
11
-# the Free Software Foundation; either version 2, or (at your option)
12
-# any later version.
13
-
14
-# This program is distributed in the hope that it will be useful,
15
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
16
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
-# GNU General Public License for more details.
18
-
19
-# You should have received a copy of the GNU General Public License
20
-# along with this program; if not, write to the Free Software
21
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22
-# 02110-1301, USA.
23
-
24
-# As a special exception to the GNU General Public License, if you
25
-# distribute this file as part of a program that contains a
26
-# configuration script generated by Autoconf, you may include it under
27
-# the same distribution terms that you use for the rest of that program.
28
-
29
-# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
30
-
31
-case $1 in
32
-  '')
33
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
34
-     exit 1;
35
-     ;;
36
-  -h | --h*)
37
-    cat <<\EOF
38
-Usage: depcomp [--help] [--version] PROGRAM [ARGS]
39
-
40
-Run PROGRAMS ARGS to compile a file, generating dependencies
41
-as side-effects.
42
-
43
-Environment variables:
44
-  depmode     Dependency tracking mode.
45
-  source      Source file read by `PROGRAMS ARGS'.
46
-  object      Object file output by `PROGRAMS ARGS'.
47
-  DEPDIR      directory where to store dependencies.
48
-  depfile     Dependency file to output.
49
-  tmpdepfile  Temporary file to use when outputing dependencies.
50
-  libtool     Whether libtool is used (yes/no).
51
-
52
-Report bugs to <bug-automake@gnu.org>.
53
-EOF
54
-    exit $?
55
-    ;;
56
-  -v | --v*)
57
-    echo "depcomp $scriptversion"
58
-    exit $?
59
-    ;;
60
-esac
61
-
62
-if test -z "$depmode" || test -z "$source" || test -z "$object"; then
63
-  echo "depcomp: Variables source, object and depmode must be set" 1>&2
64
-  exit 1
65
-fi
66
-
67
-# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
68
-depfile=${depfile-`echo "$object" |
69
-  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
70
-tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
71
-
72
-rm -f "$tmpdepfile"
73
-
74
-# Some modes work just like other modes, but use different flags.  We
75
-# parameterize here, but still list the modes in the big case below,
76
-# to make depend.m4 easier to write.  Note that we *cannot* use a case
77
-# here, because this file can only contain one case statement.
78
-if test "$depmode" = hp; then
79
-  # HP compiler uses -M and no extra arg.
80
-  gccflag=-M
81
-  depmode=gcc
82
-fi
83
-
84
-if test "$depmode" = dashXmstdout; then
85
-   # This is just like dashmstdout with a different argument.
86
-   dashmflag=-xM
87
-   depmode=dashmstdout
88
-fi
89
-
90
-case "$depmode" in
91
-gcc3)
92
-## gcc 3 implements dependency tracking that does exactly what
93
-## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
94
-## it if -MD -MP comes after the -MF stuff.  Hmm.
95
-## Unfortunately, FreeBSD c89 acceptance of flags depends upon
96
-## the command line argument order; so add the flags where they
97
-## appear in depend2.am.  Note that the slowdown incurred here
98
-## affects only configure: in makefiles, %FASTDEP% shortcuts this.
99
-  for arg
100
-  do
101
-    case $arg in
102
-    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
103
-    *)  set fnord "$@" "$arg" ;;
104
-    esac
105
-    shift # fnord
106
-    shift # $arg
107
-  done
108
-  "$@"
109
-  stat=$?
110
-  if test $stat -eq 0; then :
111
-  else
112
-    rm -f "$tmpdepfile"
113
-    exit $stat
114
-  fi
115
-  mv "$tmpdepfile" "$depfile"
116
-  ;;
117
-
118
-gcc)
119
-## There are various ways to get dependency output from gcc.  Here's
120
-## why we pick this rather obscure method:
121
-## - Don't want to use -MD because we'd like the dependencies to end
122
-##   up in a subdir.  Having to rename by hand is ugly.
123
-##   (We might end up doing this anyway to support other compilers.)
124
-## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
125
-##   -MM, not -M (despite what the docs say).
126
-## - Using -M directly means running the compiler twice (even worse
127
-##   than renaming).
128
-  if test -z "$gccflag"; then
129
-    gccflag=-MD,
130
-  fi
131
-  "$@" -Wp,"$gccflag$tmpdepfile"
132
-  stat=$?
133
-  if test $stat -eq 0; then :
134
-  else
135
-    rm -f "$tmpdepfile"
136
-    exit $stat
137
-  fi
138
-  rm -f "$depfile"
139
-  echo "$object : \\" > "$depfile"
140
-  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
141
-## The second -e expression handles DOS-style file names with drive letters.
142
-  sed -e 's/^[^:]*: / /' \
143
-      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
144
-## This next piece of magic avoids the `deleted header file' problem.
145
-## The problem is that when a header file which appears in a .P file
146
-## is deleted, the dependency causes make to die (because there is
147
-## typically no way to rebuild the header).  We avoid this by adding
148
-## dummy dependencies for each header file.  Too bad gcc doesn't do
149
-## this for us directly.
150
-  tr ' ' '
151
-' < "$tmpdepfile" |
152
-## Some versions of gcc put a space before the `:'.  On the theory
153
-## that the space means something, we add a space to the output as
154
-## well.
155
-## Some versions of the HPUX 10.20 sed can't process this invocation
156
-## correctly.  Breaking it into two sed invocations is a workaround.
157
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
158
-  rm -f "$tmpdepfile"
159
-  ;;
160
-
161
-hp)
162
-  # This case exists only to let depend.m4 do its work.  It works by
163
-  # looking at the text of this script.  This case will never be run,
164
-  # since it is checked for above.
165
-  exit 1
166
-  ;;
167
-
168
-sgi)
169
-  if test "$libtool" = yes; then
170
-    "$@" "-Wp,-MDupdate,$tmpdepfile"
171
-  else
172
-    "$@" -MDupdate "$tmpdepfile"
173
-  fi
174
-  stat=$?
175
-  if test $stat -eq 0; then :
176
-  else
177
-    rm -f "$tmpdepfile"
178
-    exit $stat
179
-  fi
180
-  rm -f "$depfile"
181
-
182
-  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
183
-    echo "$object : \\" > "$depfile"
184
-
185
-    # Clip off the initial element (the dependent).  Don't try to be
186
-    # clever and replace this with sed code, as IRIX sed won't handle
187
-    # lines with more than a fixed number of characters (4096 in
188
-    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
189
-    # the IRIX cc adds comments like `#:fec' to the end of the
190
-    # dependency line.
191
-    tr ' ' '
192
-' < "$tmpdepfile" \
193
-    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
194
-    tr '
195
-' ' ' >> $depfile
196
-    echo >> $depfile
197
-
198
-    # The second pass generates a dummy entry for each header file.
199
-    tr ' ' '
200
-' < "$tmpdepfile" \
201
-   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
202
-   >> $depfile
203
-  else
204
-    # The sourcefile does not contain any dependencies, so just
205
-    # store a dummy comment line, to avoid errors with the Makefile
206
-    # "include basename.Plo" scheme.
207
-    echo "#dummy" > "$depfile"
208
-  fi
209
-  rm -f "$tmpdepfile"
210
-  ;;
211
-
212
-aix)
213
-  # The C for AIX Compiler uses -M and outputs the dependencies
214
-  # in a .u file.  In older versions, this file always lives in the
215
-  # current directory.  Also, the AIX compiler puts `$object:' at the
216
-  # start of each line; $object doesn't have directory information.
217
-  # Version 6 uses the directory in both cases.
218
-  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
219
-  tmpdepfile="$stripped.u"
220
-  if test "$libtool" = yes; then
221
-    "$@" -Wc,-M
222
-  else
223
-    "$@" -M
224
-  fi
225
-  stat=$?
226
-
227
-  if test -f "$tmpdepfile"; then :
228
-  else
229
-    stripped=`echo "$stripped" | sed 's,^.*/,,'`
230
-    tmpdepfile="$stripped.u"
231
-  fi
232
-
233
-  if test $stat -eq 0; then :
234
-  else
235
-    rm -f "$tmpdepfile"
236
-    exit $stat
237
-  fi
238
-
239
-  if test -f "$tmpdepfile"; then
240
-    outname="$stripped.o"
241
-    # Each line is of the form `foo.o: dependent.h'.
242
-    # Do two passes, one to just change these to
243
-    # `$object: dependent.h' and one to simply `dependent.h:'.
244
-    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
245
-    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
246
-  else
247
-    # The sourcefile does not contain any dependencies, so just
248
-    # store a dummy comment line, to avoid errors with the Makefile
249
-    # "include basename.Plo" scheme.
250
-    echo "#dummy" > "$depfile"
251
-  fi
252
-  rm -f "$tmpdepfile"
253
-  ;;
254
-
255
-icc)
256
-  # Intel's C compiler understands `-MD -MF file'.  However on
257
-  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
258
-  # ICC 7.0 will fill foo.d with something like
259
-  #    foo.o: sub/foo.c
260
-  #    foo.o: sub/foo.h
261
-  # which is wrong.  We want:
262
-  #    sub/foo.o: sub/foo.c
263
-  #    sub/foo.o: sub/foo.h
264
-  #    sub/foo.c:
265
-  #    sub/foo.h:
266
-  # ICC 7.1 will output
267
-  #    foo.o: sub/foo.c sub/foo.h
268
-  # and will wrap long lines using \ :
269
-  #    foo.o: sub/foo.c ... \
270
-  #     sub/foo.h ... \
271
-  #     ...
272
-
273
-  "$@" -MD -MF "$tmpdepfile"
274
-  stat=$?
275
-  if test $stat -eq 0; then :
276
-  else
277
-    rm -f "$tmpdepfile"
278
-    exit $stat
279
-  fi
280
-  rm -f "$depfile"
281
-  # Each line is of the form `foo.o: dependent.h',
282
-  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
283
-  # Do two passes, one to just change these to
284
-  # `$object: dependent.h' and one to simply `dependent.h:'.
285
-  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
286
-  # Some versions of the HPUX 10.20 sed can't process this invocation
287
-  # correctly.  Breaking it into two sed invocations is a workaround.
288
-  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
289
-    sed -e 's/$/ :/' >> "$depfile"
290
-  rm -f "$tmpdepfile"
291
-  ;;
292
-
293
-hp2)
294
-  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
295
-  # compilers, which have integrated preprocessors.  The correct option
296
-  # to use with these is +Maked; it writes dependencies to a file named
297
-  # 'foo.d', which lands next to the object file, wherever that
298
-  # happens to be.
299
-  # Much of this is similar to the tru64 case; see comments there.
300
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
301
-  test "x$dir" = "x$object" && dir=
302
-  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
303
-  if test "$libtool" = yes; then
304
-    tmpdepfile1=$dir$base.d
305
-    tmpdepfile2=$dir.libs/$base.d
306
-    "$@" -Wc,+Maked
307
-  else
308
-    tmpdepfile1=$dir$base.d
309
-    tmpdepfile2=$dir$base.d
310
-    "$@" +Maked
311
-  fi
312
-  stat=$?
313
-  if test $stat -eq 0; then :
314
-  else
315
-     rm -f "$tmpdepfile1" "$tmpdepfile2"
316
-     exit $stat
317
-  fi
318
-
319
-  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
320
-  do
321
-    test -f "$tmpdepfile" && break
322
-  done
323
-  if test -f "$tmpdepfile"; then
324
-    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
325
-    # Add `dependent.h:' lines.
326
-    sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
327
-  else
328
-    echo "#dummy" > "$depfile"
329
-  fi
330
-  rm -f "$tmpdepfile" "$tmpdepfile2"
331
-  ;;
332
-
333
-tru64)
334
-   # The Tru64 compiler uses -MD to generate dependencies as a side
335
-   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
336
-   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
337
-   # dependencies in `foo.d' instead, so we check for that too.
338
-   # Subdirectories are respected.
339
-   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
340
-   test "x$dir" = "x$object" && dir=
341
-   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
342
-
343
-   if test "$libtool" = yes; then
344
-      # With Tru64 cc, shared objects can also be used to make a
345
-      # static library.  This mechanism is used in libtool 1.4 series to
346
-      # handle both shared and static libraries in a single compilation.
347
-      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
348
-      #
349
-      # With libtool 1.5 this exception was removed, and libtool now
350
-      # generates 2 separate objects for the 2 libraries.  These two
351
-      # compilations output dependencies in $dir.libs/$base.o.d and
352
-      # in $dir$base.o.d.  We have to check for both files, because
353
-      # one of the two compilations can be disabled.  We should prefer
354
-      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
355
-      # automatically cleaned when .libs/ is deleted, while ignoring
356
-      # the former would cause a distcleancheck panic.
357
-      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
358
-      tmpdepfile2=$dir$base.o.d          # libtool 1.5
359
-      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
360
-      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
361
-      "$@" -Wc,-MD
362
-   else
363
-      tmpdepfile1=$dir$base.o.d
364
-      tmpdepfile2=$dir$base.d
365
-      tmpdepfile3=$dir$base.d
366
-      tmpdepfile4=$dir$base.d
367
-      "$@" -MD
368
-   fi
369
-
370
-   stat=$?
371
-   if test $stat -eq 0; then :
372
-   else
373
-      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
374
-      exit $stat
375
-   fi
376
-
377
-   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
378
-   do
379
-     test -f "$tmpdepfile" && break
380
-   done
381
-   if test -f "$tmpdepfile"; then
382
-      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
383
-      # That's a tab and a space in the [].
384
-      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
385
-   else
386
-      echo "#dummy" > "$depfile"
387
-   fi
388
-   rm -f "$tmpdepfile"
389
-   ;;
390
-
391
-#nosideeffect)
392
-  # This comment above is used by automake to tell side-effect
393
-  # dependency tracking mechanisms from slower ones.
394
-
395
-dashmstdout)
396
-  # Important note: in order to support this mode, a compiler *must*
397
-  # always write the preprocessed file to stdout, regardless of -o.
398
-  "$@" || exit $?
399
-
400
-  # Remove the call to Libtool.
401
-  if test "$libtool" = yes; then
402
-    while test $1 != '--mode=compile'; do
403
-      shift
404
-    done
405
-    shift
406
-  fi
407
-
408
-  # Remove `-o $object'.
409
-  IFS=" "
410
-  for arg
411
-  do
412
-    case $arg in
413
-    -o)
414
-      shift
415
-      ;;
416
-    $object)
417
-      shift
418
-      ;;
419
-    *)
420
-      set fnord "$@" "$arg"
421
-      shift # fnord
422
-      shift # $arg
423
-      ;;
424
-    esac
425
-  done
426
-
427
-  test -z "$dashmflag" && dashmflag=-M
428
-  # Require at least two characters before searching for `:'
429
-  # in the target name.  This is to cope with DOS-style filenames:
430
-  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
431
-  "$@" $dashmflag |
432
-    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
433
-  rm -f "$depfile"
434
-  cat < "$tmpdepfile" > "$depfile"
435
-  tr ' ' '
436
-' < "$tmpdepfile" | \
437
-## Some versions of the HPUX 10.20 sed can't process this invocation
438
-## correctly.  Breaking it into two sed invocations is a workaround.
439
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
440
-  rm -f "$tmpdepfile"
441
-  ;;
442
-
443
-dashXmstdout)
444
-  # This case only exists to satisfy depend.m4.  It is never actually
445
-  # run, as this mode is specially recognized in the preamble.
446
-  exit 1
447
-  ;;
448
-
449
-makedepend)
450
-  "$@" || exit $?
451
-  # Remove any Libtool call
452
-  if test "$libtool" = yes; then
453
-    while test $1 != '--mode=compile'; do
454
-      shift
455
-    done
456
-    shift
457
-  fi
458
-  # X makedepend
459
-  shift
460
-  cleared=no
461
-  for arg in "$@"; do
462
-    case $cleared in
463
-    no)
464
-      set ""; shift
465
-      cleared=yes ;;
466
-    esac
467
-    case "$arg" in
468
-    -D*|-I*)
469
-      set fnord "$@" "$arg"; shift ;;
470
-    # Strip any option that makedepend may not understand.  Remove
471
-    # the object too, otherwise makedepend will parse it as a source file.
472
-    -*|$object)
473
-      ;;
474
-    *)
475
-      set fnord "$@" "$arg"; shift ;;
476
-    esac
477
-  done
478
-  obj_suffix="`echo $object | sed 's/^.*\././'`"
479
-  touch "$tmpdepfile"
480
-  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
481
-  rm -f "$depfile"
482
-  cat < "$tmpdepfile" > "$depfile"
483
-  sed '1,2d' "$tmpdepfile" | tr ' ' '
484
-' | \
485
-## Some versions of the HPUX 10.20 sed can't process this invocation
486
-## correctly.  Breaking it into two sed invocations is a workaround.
487
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
488
-  rm -f "$tmpdepfile" "$tmpdepfile".bak
489
-  ;;
490
-
491
-cpp)
492
-  # Important note: in order to support this mode, a compiler *must*
493
-  # always write the preprocessed file to stdout.
494
-  "$@" || exit $?
495
-
496
-  # Remove the call to Libtool.
497
-  if test "$libtool" = yes; then
498
-    while test $1 != '--mode=compile'; do
499
-      shift
500
-    done
501
-    shift
502
-  fi
503
-
504
-  # Remove `-o $object'.
505
-  IFS=" "
506
-  for arg
507
-  do
508
-    case $arg in
509
-    -o)
510
-      shift
511
-      ;;
512
-    $object)
513
-      shift
514
-      ;;
515
-    *)
516
-      set fnord "$@" "$arg"
517
-      shift # fnord
518
-      shift # $arg
519
-      ;;
520
-    esac
521
-  done
522
-
523
-  "$@" -E |
524
-    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
525
-       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
526
-    sed '$ s: \\$::' > "$tmpdepfile"
527
-  rm -f "$depfile"
528
-  echo "$object : \\" > "$depfile"
529
-  cat < "$tmpdepfile" >> "$depfile"
530
-  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
531
-  rm -f "$tmpdepfile"
532
-  ;;
533
-
534
-msvisualcpp)
535
-  # Important note: in order to support this mode, a compiler *must*
536
-  # always write the preprocessed file to stdout, regardless of -o,
537
-  # because we must use -o when running libtool.
538
-  "$@" || exit $?
539
-  IFS=" "
540
-  for arg
541
-  do
542
-    case "$arg" in
543
-    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
544
-	set fnord "$@"
545
-	shift
546
-	shift
547
-	;;
548
-    *)
549
-	set fnord "$@" "$arg"
550
-	shift
551
-	shift
552
-	;;
553
-    esac
554
-  done
555
-  "$@" -E |
556
-  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
557
-  rm -f "$depfile"
558
-  echo "$object : \\" > "$depfile"
559
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
560
-  echo "	" >> "$depfile"
561
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
562
-  rm -f "$tmpdepfile"
563
-  ;;
564
-
565
-none)
566
-  exec "$@"
567
-  ;;
568
-
569
-*)
570
-  echo "Unknown depmode $depmode" 1>&2
571
-  exit 1
572
-  ;;
573
-esac
574
-
575
-exit 0
576
-
577
-# Local Variables:
578
-# mode: shell-script
579
-# sh-indentation: 2
580
-# eval: (add-hook 'write-file-hooks 'time-stamp)
581
-# time-stamp-start: "scriptversion="
582
-# time-stamp-format: "%:y-%02m-%02d.%02H"
583
-# time-stamp-end: "$"
584
-# End:
... ...
@@ -16,5 +16,5 @@
16 16
 #  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 17
 #  MA 02110-1301, USA.
18 18
 
19
-EXTRA_DIST = html man/*.in clamdoc.pdf clamdoc.tex clamav-mirror-howto.pdf clamav-mirror-howto.tex signatures.pdf signatures.tex clam.eps
19
+EXTRA_DIST = html $(top_srcdir)/docs/man/*.in clamdoc.pdf clamdoc.tex clamav-mirror-howto.pdf clamav-mirror-howto.tex phishsigs_howto.tex phishsigs_howto.pdf signatures.pdf signatures.tex clam.eps
20 20
 man_MANS = man/clamscan.1 man/freshclam.1 man/sigtool.1 man/clamd.8 man/clamd.conf.5 man/clamdscan.1 man/clamav-milter.8 man/freshclam.conf.5 man/clamconf.1
... ...
@@ -57,7 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
57 57
 	$(top_srcdir)/configure.in
58 58
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
59 59
 	$(ACLOCAL_M4)
60
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
60
+mkinstalldirs = $(install_sh) -d
61 61
 CONFIG_HEADER = $(top_builddir)/clamav-config.h
62 62
 CONFIG_CLEAN_FILES =
63 63
 SOURCES =
... ...
@@ -187,7 +187,7 @@ target_os = @target_os@
187 187
 target_vendor = @target_vendor@
188 188
 top_builddir = @top_builddir@
189 189
 top_srcdir = @top_srcdir@
190
-EXTRA_DIST = html man/*.in clamdoc.pdf clamdoc.tex clamav-mirror-howto.pdf clamav-mirror-howto.tex signatures.pdf signatures.tex clam.eps
190
+EXTRA_DIST = html $(top_srcdir)/docs/man/*.in clamdoc.pdf clamdoc.tex clamav-mirror-howto.pdf clamav-mirror-howto.tex phishsigs_howto.tex phishsigs_howto.pdf signatures.pdf signatures.tex clam.eps
191 191
 man_MANS = man/clamscan.1 man/freshclam.1 man/sigtool.1 man/clamd.8 man/clamd.conf.5 man/clamdscan.1 man/clamav-milter.8 man/freshclam.conf.5 man/clamconf.1
192 192
 all: all-am
193 193
 
... ...
@@ -201,9 +201,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
201 201
 	      exit 1;; \
202 202
 	  esac; \
203 203
 	done; \
204
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  docs/Makefile'; \
204
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  docs/Makefile'; \
205 205
 	cd $(top_srcdir) && \
206
-	  $(AUTOMAKE) --gnu  docs/Makefile
206
+	  $(AUTOMAKE) --foreign  docs/Makefile
207 207
 .PRECIOUS: Makefile
208 208
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
209 209
 	@case '$?' in \
... ...
@@ -19,7 +19,7 @@
19 19
 EXTRA_DIST = clamd.conf freshclam.conf
20 20
 CFGINST = @CFGDIR@
21 21
  
22
-install:
22
+install-data-local:
23 23
 	$(mkinstalldirs) $(DESTDIR)$(CFGINST)
24 24
 	@test -f $(DESTDIR)$(CFGINST)/clamd.conf || \
25 25
 	$(INSTALL_DATA) $(srcdir)/clamd.conf $(DESTDIR)$(CFGINST)
... ...
@@ -57,7 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
57 57
 	$(top_srcdir)/configure.in
58 58
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
59 59
 	$(ACLOCAL_M4)
60
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
60
+mkinstalldirs = $(install_sh) -d
61 61
 CONFIG_HEADER = $(top_builddir)/clamav-config.h
62 62
 CONFIG_CLEAN_FILES =
63 63
 SOURCES =
... ...
@@ -194,9 +194,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
194 194
 	      exit 1;; \
195 195
 	  esac; \
196 196
 	done; \
197
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  etc/Makefile'; \
197
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  etc/Makefile'; \
198 198
 	cd $(top_srcdir) && \
199
-	  $(AUTOMAKE) --gnu  etc/Makefile
199
+	  $(AUTOMAKE) --foreign  etc/Makefile
200 200
 .PRECIOUS: Makefile
201 201
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
202 202
 	@case '$?' in \
... ...
@@ -257,6 +257,7 @@ check-am: all-am
257 257
 check: check-am
258 258
 all-am: Makefile
259 259
 installdirs:
260
+install: install-am
260 261
 install-exec: install-exec-am
261 262
 install-data: install-data-am
262 263
 uninstall: uninstall-am
... ...
@@ -298,7 +299,7 @@ info: info-am
298 298
 
299 299
 info-am:
300 300
 
301
-install-data-am:
301
+install-data-am: install-data-local
302 302
 
303 303
 install-dvi: install-dvi-am
304 304
 
... ...
@@ -339,16 +340,17 @@ uninstall-am:
339 339
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
340 340
 	distclean distclean-generic distclean-libtool distdir dvi \
341 341
 	dvi-am html html-am info info-am install install-am \
342
-	install-data install-data-am install-dvi install-dvi-am \
343
-	install-exec install-exec-am install-html install-html-am \
344
-	install-info install-info-am install-man install-pdf \
345
-	install-pdf-am install-ps install-ps-am install-strip \
346
-	installcheck installcheck-am installdirs maintainer-clean \
347
-	maintainer-clean-generic mostlyclean mostlyclean-generic \
348
-	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
342
+	install-data install-data-am install-data-local install-dvi \
343
+	install-dvi-am install-exec install-exec-am install-html \
344
+	install-html-am install-info install-info-am install-man \
345
+	install-pdf install-pdf-am install-ps install-ps-am \
346
+	install-strip installcheck installcheck-am installdirs \
347
+	maintainer-clean maintainer-clean-generic mostlyclean \
348
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
349
+	uninstall uninstall-am
349 350
 
350 351
 
351
-install:
352
+install-data-local:
352 353
 	$(mkinstalldirs) $(DESTDIR)$(CFGINST)
353 354
 	@test -f $(DESTDIR)$(CFGINST)/clamd.conf || \
354 355
 	$(INSTALL_DATA) $(srcdir)/clamd.conf $(DESTDIR)$(CFGINST)
... ...
@@ -50,5 +50,5 @@ freshclam_SOURCES = \
50 50
     mirman.h
51 51
 
52 52
 DEFS = @DEFS@ -DCL_NOTHREADS
53
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
53
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
54 54
 LIBS = $(top_builddir)/libclamav/libclamav.la @FRESHCLAM_LIBS@ @THREAD_LIBS@
... ...
@@ -60,7 +60,7 @@ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
60 60
 	$(top_srcdir)/configure.in
61 61
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
62 62
 	$(ACLOCAL_M4)
63
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
63
+mkinstalldirs = $(install_sh) -d
64 64
 CONFIG_HEADER = $(top_builddir)/clamav-config.h
65 65
 CONFIG_CLEAN_FILES =
66 66
 am__installdirs = "$(DESTDIR)$(bindir)"
... ...
@@ -75,7 +75,7 @@ am_freshclam_OBJECTS = output.$(OBJEXT) cfgparser.$(OBJEXT) \
75 75
 freshclam_OBJECTS = $(am_freshclam_OBJECTS)
76 76
 freshclam_LDADD = $(LDADD)
77 77
 DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
78
-depcomp = $(SHELL) $(top_srcdir)/depcomp
78
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
79 79
 am__depfiles_maybe = depfiles
80 80
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
81 81
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
... ...
@@ -238,7 +238,7 @@ freshclam_SOURCES = \
238 238
     mirman.c \
239 239
     mirman.h
240 240
 
241
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
241
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
242 242
 all: all-am
243 243
 
244 244
 .SUFFIXES:
... ...
@@ -252,9 +252,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
252 252
 	      exit 1;; \
253 253
 	  esac; \
254 254
 	done; \
255
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  freshclam/Makefile'; \
255
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  freshclam/Makefile'; \
256 256
 	cd $(top_srcdir) && \
257
-	  $(AUTOMAKE) --gnu  freshclam/Makefile
257
+	  $(AUTOMAKE) --foreign  freshclam/Makefile
258 258
 .PRECIOUS: Makefile
259 259
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
260 260
 	@case '$?' in \
261 261
deleted file mode 100755
... ...
@@ -1,507 +0,0 @@
1
-#!/bin/sh
2
-# install - install a program, script, or datafile
3
-
4
-scriptversion=2006-10-14.15
5
-
6
-# This originates from X11R5 (mit/util/scripts/install.sh), which was
7
-# later released in X11R6 (xc/config/util/install.sh) with the
8
-# following copyright and license.
9
-#
10
-# Copyright (C) 1994 X Consortium
11
-#
12
-# Permission is hereby granted, free of charge, to any person obtaining a copy
13
-# of this software and associated documentation files (the "Software"), to
14
-# deal in the Software without restriction, including without limitation the
15
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
16
-# sell copies of the Software, and to permit persons to whom the Software is
17
-# furnished to do so, subject to the following conditions:
18
-#
19
-# The above copyright notice and this permission notice shall be included in
20
-# all copies or substantial portions of the Software.
21
-#
22
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
25
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
26
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
27
-# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
-#
29
-# Except as contained in this notice, the name of the X Consortium shall not
30
-# be used in advertising or otherwise to promote the sale, use or other deal-
31
-# ings in this Software without prior written authorization from the X Consor-
32
-# tium.
33
-#
34
-#
35
-# FSF changes to this file are in the public domain.
36
-#
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
39
-# when there is no Makefile.
40
-#
41
-# This script is compatible with the BSD install script, but was written
42
-# from scratch.
43
-
44
-nl='
45
-'
46
-IFS=" ""	$nl"
47
-
48
-# set DOITPROG to echo to test this script
49
-
50
-# Don't use :- since 4.3BSD and earlier shells don't like it.
51
-doit="${DOITPROG-}"
52
-if test -z "$doit"; then
53
-  doit_exec=exec
54
-else
55
-  doit_exec=$doit
56
-fi
57
-
58
-# Put in absolute file names if you don't have them in your path;
59
-# or use environment vars.
60
-
61
-mvprog="${MVPROG-mv}"
62
-cpprog="${CPPROG-cp}"
63
-chmodprog="${CHMODPROG-chmod}"
64
-chownprog="${CHOWNPROG-chown}"
65
-chgrpprog="${CHGRPPROG-chgrp}"
66
-stripprog="${STRIPPROG-strip}"
67
-rmprog="${RMPROG-rm}"
68
-mkdirprog="${MKDIRPROG-mkdir}"
69
-
70
-posix_glob=
71
-posix_mkdir=
72
-
73
-# Desired mode of installed file.
74
-mode=0755
75
-
76
-chmodcmd=$chmodprog
77
-chowncmd=
78
-chgrpcmd=
79
-stripcmd=
80
-rmcmd="$rmprog -f"
81
-mvcmd="$mvprog"
82
-src=
83
-dst=
84
-dir_arg=
85
-dstarg=
86
-no_target_directory=
87
-
88
-usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
89
-   or: $0 [OPTION]... SRCFILES... DIRECTORY
90
-   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
91
-   or: $0 [OPTION]... -d DIRECTORIES...
92
-
93
-In the 1st form, copy SRCFILE to DSTFILE.
94
-In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
95
-In the 4th, create DIRECTORIES.
96
-
97
-Options:
98
--c         (ignored)
99
--d         create directories instead of installing files.
100
--g GROUP   $chgrpprog installed files to GROUP.
101
--m MODE    $chmodprog installed files to MODE.
102
--o USER    $chownprog installed files to USER.
103
--s         $stripprog installed files.
104
--t DIRECTORY  install into DIRECTORY.
105
--T         report an error if DSTFILE is a directory.
106
-
107
-Environment variables override the default commands:
108
-  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
109
-"
110
-
111
-while test $# -ne 0; do
112
-  case $1 in
113
-    -c) shift
114
-        continue;;
115
-
116
-    -d) dir_arg=true
117
-        shift
118
-        continue;;
119
-
120
-    -g) chgrpcmd="$chgrpprog $2"
121
-        shift
122
-        shift
123
-        continue;;
124
-
125
-    --help) echo "$usage"; exit $?;;
126
-
127
-    -m) mode=$2
128
-        shift
129
-        shift
130
-	case $mode in
131
-	  *' '* | *'	'* | *'
132
-'*	  | *'*'* | *'?'* | *'['*)
133
-	    echo "$0: invalid mode: $mode" >&2
134
-	    exit 1;;
135
-	esac
136
-        continue;;
137
-
138
-    -o) chowncmd="$chownprog $2"
139
-        shift
140
-        shift
141
-        continue;;
142
-
143
-    -s) stripcmd=$stripprog
144
-        shift
145
-        continue;;
146
-
147
-    -t) dstarg=$2
148
-	shift
149
-	shift
150
-	continue;;
151
-
152
-    -T) no_target_directory=true
153
-	shift
154
-	continue;;
155
-
156
-    --version) echo "$0 $scriptversion"; exit $?;;
157
-
158
-    --)	shift
159
-	break;;
160
-
161
-    -*)	echo "$0: invalid option: $1" >&2
162
-	exit 1;;
163
-
164
-    *)  break;;
165
-  esac
166
-done
167
-
168
-if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
169
-  # When -d is used, all remaining arguments are directories to create.
170
-  # When -t is used, the destination is already specified.
171
-  # Otherwise, the last argument is the destination.  Remove it from $@.
172
-  for arg
173
-  do
174
-    if test -n "$dstarg"; then
175
-      # $@ is not empty: it contains at least $arg.
176
-      set fnord "$@" "$dstarg"
177
-      shift # fnord
178
-    fi
179
-    shift # arg
180
-    dstarg=$arg
181
-  done
182
-fi
183
-
184
-if test $# -eq 0; then
185
-  if test -z "$dir_arg"; then
186
-    echo "$0: no input file specified." >&2
187
-    exit 1
188
-  fi
189
-  # It's OK to call `install-sh -d' without argument.
190
-  # This can happen when creating conditional directories.
191
-  exit 0
192
-fi
193
-
194
-if test -z "$dir_arg"; then
195
-  trap '(exit $?); exit' 1 2 13 15
196
-
197
-  # Set umask so as not to create temps with too-generous modes.
198
-  # However, 'strip' requires both read and write access to temps.
199
-  case $mode in
200
-    # Optimize common cases.
201
-    *644) cp_umask=133;;
202
-    *755) cp_umask=22;;
203
-
204
-    *[0-7])
205
-      if test -z "$stripcmd"; then
206
-	u_plus_rw=
207
-      else
208
-	u_plus_rw='% 200'
209
-      fi
210
-      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
211
-    *)
212
-      if test -z "$stripcmd"; then
213
-	u_plus_rw=
214
-      else
215
-	u_plus_rw=,u+rw
216
-      fi
217
-      cp_umask=$mode$u_plus_rw;;
218
-  esac
219
-fi
220
-
221
-for src
222
-do
223
-  # Protect names starting with `-'.
224
-  case $src in
225
-    -*) src=./$src ;;
226
-  esac
227
-
228
-  if test -n "$dir_arg"; then
229
-    dst=$src
230
-    dstdir=$dst
231
-    test -d "$dstdir"
232
-    dstdir_status=$?
233
-  else
234
-
235
-    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
236
-    # might cause directories to be created, which would be especially bad
237
-    # if $src (and thus $dsttmp) contains '*'.
238
-    if test ! -f "$src" && test ! -d "$src"; then
239
-      echo "$0: $src does not exist." >&2
240
-      exit 1
241
-    fi
242
-
243
-    if test -z "$dstarg"; then
244
-      echo "$0: no destination specified." >&2
245
-      exit 1
246
-    fi
247
-
248
-    dst=$dstarg
249
-    # Protect names starting with `-'.
250
-    case $dst in
251
-      -*) dst=./$dst ;;
252
-    esac
253
-
254
-    # If destination is a directory, append the input filename; won't work
255
-    # if double slashes aren't ignored.
256
-    if test -d "$dst"; then
257
-      if test -n "$no_target_directory"; then
258
-	echo "$0: $dstarg: Is a directory" >&2
259
-	exit 1
260
-      fi
261
-      dstdir=$dst
262
-      dst=$dstdir/`basename "$src"`
263
-      dstdir_status=0
264
-    else
265
-      # Prefer dirname, but fall back on a substitute if dirname fails.
266
-      dstdir=`
267
-	(dirname "$dst") 2>/dev/null ||
268
-	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
269
-	     X"$dst" : 'X\(//\)[^/]' \| \
270
-	     X"$dst" : 'X\(//\)$' \| \
271
-	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
272
-	echo X"$dst" |
273
-	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
274
-		   s//\1/
275
-		   q
276
-		 }
277
-		 /^X\(\/\/\)[^/].*/{
278
-		   s//\1/
279
-		   q
280
-		 }
281
-		 /^X\(\/\/\)$/{
282
-		   s//\1/
283
-		   q
284
-		 }
285
-		 /^X\(\/\).*/{
286
-		   s//\1/
287
-		   q
288
-		 }
289
-		 s/.*/./; q'
290
-      `
291
-
292
-      test -d "$dstdir"
293
-      dstdir_status=$?
294
-    fi
295
-  fi
296
-
297
-  obsolete_mkdir_used=false
298
-
299
-  if test $dstdir_status != 0; then
300
-    case $posix_mkdir in
301
-      '')
302
-	# Create intermediate dirs using mode 755 as modified by the umask.
303
-	# This is like FreeBSD 'install' as of 1997-10-28.
304
-	umask=`umask`
305
-	case $stripcmd.$umask in
306
-	  # Optimize common cases.
307
-	  *[2367][2367]) mkdir_umask=$umask;;
308
-	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
309
-
310
-	  *[0-7])
311
-	    mkdir_umask=`expr $umask + 22 \
312
-	      - $umask % 100 % 40 + $umask % 20 \
313
-	      - $umask % 10 % 4 + $umask % 2
314
-	    `;;
315
-	  *) mkdir_umask=$umask,go-w;;
316
-	esac
317
-
318
-	# With -d, create the new directory with the user-specified mode.
319
-	# Otherwise, rely on $mkdir_umask.
320
-	if test -n "$dir_arg"; then
321
-	  mkdir_mode=-m$mode
322
-	else
323
-	  mkdir_mode=
324
-	fi
325
-
326
-	posix_mkdir=false
327
-	case $umask in
328
-	  *[123567][0-7][0-7])
329
-	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
330
-	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
331
-	    ;;
332
-	  *)
333
-	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
334
-	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
335
-
336
-	    if (umask $mkdir_umask &&
337
-		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
338
-	    then
339
-	      if test -z "$dir_arg" || {
340
-		   # Check for POSIX incompatibilities with -m.
341
-		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
342
-		   # other-writeable bit of parent directory when it shouldn't.
343
-		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
344
-		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
345
-		   case $ls_ld_tmpdir in
346
-		     d????-?r-*) different_mode=700;;
347
-		     d????-?--*) different_mode=755;;
348
-		     *) false;;
349
-		   esac &&
350
-		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
351
-		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
352
-		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
353
-		   }
354
-		 }
355
-	      then posix_mkdir=:
356
-	      fi
357
-	      rmdir "$tmpdir/d" "$tmpdir"
358
-	    else
359
-	      # Remove any dirs left behind by ancient mkdir implementations.
360
-	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
361
-	    fi
362
-	    trap '' 0;;
363
-	esac;;
364
-    esac
365
-
366
-    if
367
-      $posix_mkdir && (
368
-	umask $mkdir_umask &&
369
-	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
370
-      )
371
-    then :
372
-    else
373
-
374
-      # The umask is ridiculous, or mkdir does not conform to POSIX,
375
-      # or it failed possibly due to a race condition.  Create the
376
-      # directory the slow way, step by step, checking for races as we go.
377
-
378
-      case $dstdir in
379
-	/*) prefix=/ ;;
380
-	-*) prefix=./ ;;
381
-	*)  prefix= ;;
382
-      esac
383
-
384
-      case $posix_glob in
385
-        '')
386
-	  if (set -f) 2>/dev/null; then
387
-	    posix_glob=true
388
-	  else
389
-	    posix_glob=false
390
-	  fi ;;
391
-      esac
392
-
393
-      oIFS=$IFS
394
-      IFS=/
395
-      $posix_glob && set -f
396
-      set fnord $dstdir
397
-      shift
398
-      $posix_glob && set +f
399
-      IFS=$oIFS
400
-
401
-      prefixes=
402
-
403
-      for d
404
-      do
405
-	test -z "$d" && continue
406
-
407
-	prefix=$prefix$d
408
-	if test -d "$prefix"; then
409
-	  prefixes=
410
-	else
411
-	  if $posix_mkdir; then
412
-	    (umask=$mkdir_umask &&
413
-	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
414
-	    # Don't fail if two instances are running concurrently.
415
-	    test -d "$prefix" || exit 1
416
-	  else
417
-	    case $prefix in
418
-	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
419
-	      *) qprefix=$prefix;;
420
-	    esac
421
-	    prefixes="$prefixes '$qprefix'"
422
-	  fi
423
-	fi
424
-	prefix=$prefix/
425
-      done
426
-
427
-      if test -n "$prefixes"; then
428
-	# Don't fail if two instances are running concurrently.
429
-	(umask $mkdir_umask &&
430
-	 eval "\$doit_exec \$mkdirprog $prefixes") ||
431
-	  test -d "$dstdir" || exit 1
432
-	obsolete_mkdir_used=true
433
-      fi
434
-    fi
435
-  fi
436
-
437
-  if test -n "$dir_arg"; then
438
-    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
439
-    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
440
-    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
441
-      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
442
-  else
443
-
444
-    # Make a couple of temp file names in the proper directory.
445
-    dsttmp=$dstdir/_inst.$$_
446
-    rmtmp=$dstdir/_rm.$$_
447
-
448
-    # Trap to clean up those temp files at exit.
449
-    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
450
-
451
-    # Copy the file name to the temp name.
452
-    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
453
-
454
-    # and set any options; do chmod last to preserve setuid bits.
455
-    #
456
-    # If any of these fail, we abort the whole thing.  If we want to
457
-    # ignore errors from any of these, just make sure not to ignore
458
-    # errors from the above "$doit $cpprog $src $dsttmp" command.
459
-    #
460
-    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
461
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
462
-      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
463
-      && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
464
-
465
-    # Now rename the file to the real destination.
466
-    { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
467
-      || {
468
-	   # The rename failed, perhaps because mv can't rename something else
469
-	   # to itself, or perhaps because mv is so ancient that it does not
470
-	   # support -f.
471
-
472
-	   # Now remove or move aside any old file at destination location.
473
-	   # We try this two ways since rm can't unlink itself on some
474
-	   # systems and the destination file might be busy for other
475
-	   # reasons.  In this case, the final cleanup might fail but the new
476
-	   # file should still install successfully.
477
-	   {
478
-	     if test -f "$dst"; then
479
-	       $doit $rmcmd -f "$dst" 2>/dev/null \
480
-	       || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
481
-		     && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
482
-	       || {
483
-		 echo "$0: cannot unlink or rename $dst" >&2
484
-		 (exit 1); exit 1
485
-	       }
486
-	     else
487
-	       :
488
-	     fi
489
-	   } &&
490
-
491
-	   # Now rename the file to the real destination.
492
-	   $doit $mvcmd "$dsttmp" "$dst"
493
-	 }
494
-    } || exit 1
495
-
496
-    trap '' 0
497
-  fi
498
-done
499
-
500
-# Local variables:
501
-# eval: (add-hook 'write-file-hooks 'time-stamp)
502
-# time-stamp-start: "scriptversion="
503
-# time-stamp-format: "%:y-%02m-%02d.%02H"
504
-# time-stamp-end: "$"
505
-# End:
... ...
@@ -18,7 +18,7 @@
18 18
 
19 19
 SUBDIRS = lzma .
20 20
 
21
-INCLUDES = -I$(top_srcdir) -I@srcdir@/nsis -I@srcdir@/lzma
21
+AM_CPPFLAGS = -I$(top_srcdir) -I@srcdir@/nsis -I@srcdir@/lzma
22 22
 
23 23
 if ENABLE_UNRAR
24 24
 libclamav_la_LIBADD = @LIBCLAMAV_LIBS@ @THREAD_LIBS@ lzma/liblzma.la $(top_builddir)/libclamunrar_iface/libclamunrar_iface.la
... ...
@@ -55,13 +55,13 @@ target_triplet = @target@
55 55
 @VERSIONSCRIPT_TRUE@am__append_1 = -Wl,@VERSIONSCRIPTFLAG@,@top_srcdir@/libclamav/libclamav.map
56 56
 subdir = libclamav
57 57
 DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
58
-	$(srcdir)/Makefile.in
58
+	$(srcdir)/Makefile.in COPYING
59 59
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
60 60
 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
61 61
 	$(top_srcdir)/configure.in
62 62
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
63 63
 	$(ACLOCAL_M4)
64
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
64
+mkinstalldirs = $(install_sh) -d
65 65
 CONFIG_HEADER = $(top_builddir)/clamav-config.h
66 66
 CONFIG_CLEAN_FILES =
67 67
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
... ...
@@ -104,7 +104,7 @@ libclamav_internal_utils_la_LINK = $(LIBTOOL) --tag=CC \
104 104
 	$(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) \
105 105
 	$(libclamav_internal_utils_la_LDFLAGS) $(LDFLAGS) -o $@
106 106
 DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
107
-depcomp = $(SHELL) $(top_srcdir)/depcomp
107
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
108 108
 am__depfiles_maybe = depfiles
109 109
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
110 110
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
... ...
@@ -252,7 +252,7 @@ target_vendor = @target_vendor@
252 252
 top_builddir = @top_builddir@
253 253
 top_srcdir = @top_srcdir@
254 254
 SUBDIRS = lzma .
255
-INCLUDES = -I$(top_srcdir) -I@srcdir@/nsis -I@srcdir@/lzma
255
+AM_CPPFLAGS = -I$(top_srcdir) -I@srcdir@/nsis -I@srcdir@/lzma
256 256
 @ENABLE_UNRAR_FALSE@libclamav_la_LIBADD = @LIBCLAMAV_LIBS@ @THREAD_LIBS@ lzma/liblzma.la
257 257
 @ENABLE_UNRAR_TRUE@libclamav_la_LIBADD = @LIBCLAMAV_LIBS@ @THREAD_LIBS@ lzma/liblzma.la $(top_builddir)/libclamunrar_iface/libclamunrar_iface.la
258 258
 libclamav_la_LDFLAGS = @TH_SAFE@ -version-info @LIBCLAMAV_VERSION@ \
... ...
@@ -429,9 +429,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
429 429
 	      exit 1;; \
430 430
 	  esac; \
431 431
 	done; \
432
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  libclamav/Makefile'; \
432
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  libclamav/Makefile'; \
433 433
 	cd $(top_srcdir) && \
434
-	  $(AUTOMAKE) --gnu  libclamav/Makefile
434
+	  $(AUTOMAKE) --foreign  libclamav/Makefile
435 435
 .PRECIOUS: Makefile
436 436
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
437 437
 	@case '$?' in \
... ...
@@ -59,7 +59,7 @@ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
59 59
 	$(top_srcdir)/configure.in
60 60
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
61 61
 	$(ACLOCAL_M4)
62
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
62
+mkinstalldirs = $(install_sh) -d
63 63
 CONFIG_HEADER = $(top_builddir)/clamav-config.h
64 64
 CONFIG_CLEAN_FILES =
65 65
 LTLIBRARIES = $(noinst_LTLIBRARIES)
... ...
@@ -67,7 +67,7 @@ liblzma_la_LIBADD =
67 67
 am_liblzma_la_OBJECTS = LzmaStateDecode.lo
68 68
 liblzma_la_OBJECTS = $(am_liblzma_la_OBJECTS)
69 69
 DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
70
-depcomp = $(SHELL) $(top_srcdir)/depcomp
70
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
71 71
 am__depfiles_maybe = depfiles
72 72
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
73 73
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
... ...
@@ -219,9 +219,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
219 219
 	      exit 1;; \
220 220
 	  esac; \
221 221
 	done; \
222
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  libclamav/lzma/Makefile'; \
222
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  libclamav/lzma/Makefile'; \
223 223
 	cd $(top_srcdir) && \
224
-	  $(AUTOMAKE) --gnu  libclamav/lzma/Makefile
224
+	  $(AUTOMAKE) --foreign  libclamav/lzma/Makefile
225 225
 .PRECIOUS: Makefile
226 226
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
227 227
 	@case '$?' in \
... ...
@@ -4,7 +4,7 @@
4 4
 
5 5
 if ENABLE_UNRAR
6 6
 
7
-INCLUDES = -I$(top_srcdir)
7
+AM_CPPFLAGS = -I$(top_srcdir)
8 8
 
9 9
 libclamunrar_la_LDFLAGS = @TH_SAFE@ -version-info @LIBCLAMAV_VERSION@ -no-undefined
10 10
 
... ...
@@ -45,7 +45,7 @@ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
45 45
 	$(top_srcdir)/configure.in
46 46
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
47 47
 	$(ACLOCAL_M4)
48
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
48
+mkinstalldirs = $(install_sh) -d
49 49
 CONFIG_HEADER = $(top_builddir)/clamav-config.h
50 50
 CONFIG_CLEAN_FILES =
51 51
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
... ...
@@ -71,7 +71,7 @@ libclamunrar_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
71 71
 	$(libclamunrar_la_LDFLAGS) $(LDFLAGS) -o $@
72 72
 @ENABLE_UNRAR_TRUE@am_libclamunrar_la_rpath = -rpath $(libdir)
73 73
 DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
74
-depcomp = $(SHELL) $(top_srcdir)/depcomp
74
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
75 75
 am__depfiles_maybe = depfiles
76 76
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
77 77
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
... ...
@@ -204,7 +204,7 @@ target_os = @target_os@
204 204
 target_vendor = @target_vendor@
205 205
 top_builddir = @top_builddir@
206 206
 top_srcdir = @top_srcdir@
207
-@ENABLE_UNRAR_TRUE@INCLUDES = -I$(top_srcdir)
207
+@ENABLE_UNRAR_TRUE@AM_CPPFLAGS = -I$(top_srcdir)
208 208
 @ENABLE_UNRAR_TRUE@libclamunrar_la_LDFLAGS = @TH_SAFE@ -version-info \
209 209
 @ENABLE_UNRAR_TRUE@	@LIBCLAMAV_VERSION@ -no-undefined \
210 210
 @ENABLE_UNRAR_TRUE@	$(am__append_1)
... ...
@@ -242,9 +242,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
242 242
 	      exit 1;; \
243 243
 	  esac; \
244 244
 	done; \
245
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  libclamunrar/Makefile'; \
245
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  libclamunrar/Makefile'; \
246 246
 	cd $(top_srcdir) && \
247
-	  $(AUTOMAKE) --gnu  libclamunrar/Makefile
247
+	  $(AUTOMAKE) --foreign  libclamunrar/Makefile
248 248
 .PRECIOUS: Makefile
249 249
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
250 250
 	@case '$?' in \
... ...
@@ -4,7 +4,7 @@
4 4
 
5 5
 if ENABLE_UNRAR
6 6
 
7
-INCLUDES = -I$(top_srcdir)
7
+AM_CPPFLAGS = -I$(top_srcdir)
8 8
 
9 9
 libclamunrar_iface_la_LIBADD = $(top_builddir)/libclamunrar/libclamunrar.la
10 10
 
... ...
@@ -45,7 +45,7 @@ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
45 45
 	$(top_srcdir)/configure.in
46 46
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
47 47
 	$(ACLOCAL_M4)
48
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
48
+mkinstalldirs = $(install_sh) -d
49 49
 CONFIG_HEADER = $(top_builddir)/clamav-config.h
50 50
 CONFIG_CLEAN_FILES =
51 51
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
... ...
@@ -66,7 +66,7 @@ libclamunrar_iface_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
66 66
 	$(libclamunrar_iface_la_LDFLAGS) $(LDFLAGS) -o $@
67 67
 @ENABLE_UNRAR_TRUE@am_libclamunrar_iface_la_rpath = -rpath $(libdir)
68 68
 DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
69
-depcomp = $(SHELL) $(top_srcdir)/depcomp
69
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
70 70
 am__depfiles_maybe = depfiles
71 71
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
72 72
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
... ...
@@ -199,7 +199,7 @@ target_os = @target_os@
199 199
 target_vendor = @target_vendor@
200 200
 top_builddir = @top_builddir@
201 201
 top_srcdir = @top_srcdir@
202
-@ENABLE_UNRAR_TRUE@INCLUDES = -I$(top_srcdir)
202
+@ENABLE_UNRAR_TRUE@AM_CPPFLAGS = -I$(top_srcdir)
203 203
 @ENABLE_UNRAR_TRUE@libclamunrar_iface_la_LIBADD = $(top_builddir)/libclamunrar/libclamunrar.la
204 204
 @ENABLE_UNRAR_TRUE@libclamunrar_iface_la_LDFLAGS = @TH_SAFE@ \
205 205
 @ENABLE_UNRAR_TRUE@	-version-info @LIBCLAMAV_VERSION@ \
... ...
@@ -223,9 +223,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
223 223
 	      exit 1;; \
224 224
 	  esac; \
225 225
 	done; \
226
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  libclamunrar_iface/Makefile'; \
226
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  libclamunrar_iface/Makefile'; \
227 227
 	cd $(top_srcdir) && \
228
-	  $(AUTOMAKE) --gnu  libclamunrar_iface/Makefile
228
+	  $(AUTOMAKE) --foreign  libclamunrar_iface/Makefile
229 229
 .PRECIOUS: Makefile
230 230
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
231 231
 	@case '$?' in \
232 232
deleted file mode 100644
... ...
@@ -1,6938 +0,0 @@
1
-# ltmain.sh - Provide generalized library-building support services.
2
-# NOTE: Changing this file will not affect anything until you rerun configure.
3
-#
4
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
5
-# 2007  Free Software Foundation, Inc.
6
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7
-#
8
-# This program is free software; you can redistribute it and/or modify
9
-# it under the terms of the GNU General Public License as published by
10
-# the Free Software Foundation; either version 2 of the License, or
11
-# (at your option) any later version.
12
-#
13
-# This program is distributed in the hope that it will be useful, but
14
-# WITHOUT ANY WARRANTY; without even the implied warranty of
15
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
-# General Public License for more details.
17
-#
18
-# You should have received a copy of the GNU General Public License
19
-# along with this program; if not, write to the Free Software
20
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
-#
22
-# As a special exception to the GNU General Public License, if you
23
-# distribute this file as part of a program that contains a
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
-basename="s,^.*/,,g"
28
-
29
-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
30
-# is ksh but when the shell is invoked as "sh" and the current value of
31
-# the _XPG environment variable is not equal to 1 (one), the special
32
-# positional parameter $0, within a function call, is the name of the
33
-# function.
34
-progpath="$0"
35
-
36
-# The name of this program:
37
-progname=`echo "$progpath" | $SED $basename`
38
-modename="$progname"
39
-
40
-# Global variables:
41
-EXIT_SUCCESS=0
42
-EXIT_FAILURE=1
43
-
44
-PROGRAM=ltmain.sh
45
-PACKAGE=libtool
46
-VERSION="1.5.24 Debian 1.5.24-2"
47
-TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
48
-
49
-# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
50
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
51
-  emulate sh
52
-  NULLCMD=:
53
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
54
-  # is contrary to our usage.  Disable this feature.
55
-  alias -g '${1+"$@"}'='"$@"'
56
-  setopt NO_GLOB_SUBST
57
-else
58
-  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
59
-fi
60
-BIN_SH=xpg4; export BIN_SH # for Tru64
61
-DUALCASE=1; export DUALCASE # for MKS sh
62
-
63
-# Check that we have a working $echo.
64
-if test "X$1" = X--no-reexec; then
65
-  # Discard the --no-reexec flag, and continue.
66
-  shift
67
-elif test "X$1" = X--fallback-echo; then
68
-  # Avoid inline document here, it may be left over
69
-  :
70
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
71
-  # Yippee, $echo works!
72
-  :
73
-else
74
-  # Restart under the correct shell, and then maybe $echo will work.
75
-  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
76
-fi
77
-
78
-if test "X$1" = X--fallback-echo; then
79
-  # used as fallback echo
80
-  shift
81
-  cat <<EOF
82
-$*
83
-EOF
84
-  exit $EXIT_SUCCESS
85
-fi
86
-
87
-default_mode=
88
-help="Try \`$progname --help' for more information."
89
-magic="%%%MAGIC variable%%%"
90
-mkdir="mkdir"
91
-mv="mv -f"
92
-rm="rm -f"
93
-
94
-# Sed substitution that helps us do robust quoting.  It backslashifies
95
-# metacharacters that are still active within double-quoted strings.
96
-Xsed="${SED}"' -e 1s/^X//'
97
-sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
98
-# test EBCDIC or ASCII
99
-case `echo X|tr X '\101'` in
100
- A) # ASCII based system
101
-    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
102
-  SP2NL='tr \040 \012'
103
-  NL2SP='tr \015\012 \040\040'
104
-  ;;
105
- *) # EBCDIC based system
106
-  SP2NL='tr \100 \n'
107
-  NL2SP='tr \r\n \100\100'
108
-  ;;
109
-esac
110
-
111
-# NLS nuisances.
112
-# Only set LANG and LC_ALL to C if already set.
113
-# These must not be set unconditionally because not all systems understand
114
-# e.g. LANG=C (notably SCO).
115
-# We save the old values to restore during execute mode.
116
-for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
117
-do
118
-  eval "if test \"\${$lt_var+set}\" = set; then
119
-	  save_$lt_var=\$$lt_var
120
-	  $lt_var=C
121
-	  export $lt_var
122
-	fi"
123
-done
124
-
125
-# Make sure IFS has a sensible default
126
-lt_nl='
127
-'
128
-IFS=" 	$lt_nl"
129
-
130
-if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
131
-  $echo "$modename: not configured to build any kind of library" 1>&2
132
-  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
133
-  exit $EXIT_FAILURE
134
-fi
135
-
136
-# Global variables.
137
-mode=$default_mode
138
-nonopt=
139
-prev=
140
-prevopt=
141
-run=
142
-show="$echo"
143
-show_help=
144
-execute_dlfiles=
145
-duplicate_deps=no
146
-preserve_args=
147
-lo2o="s/\\.lo\$/.${objext}/"
148
-o2lo="s/\\.${objext}\$/.lo/"
149
-extracted_archives=
150
-extracted_serial=0
151
-
152
-#####################################
153
-# Shell function definitions:
154
-# This seems to be the best place for them
155
-
156
-# func_mktempdir [string]
157
-# Make a temporary directory that won't clash with other running
158
-# libtool processes, and avoids race conditions if possible.  If
159
-# given, STRING is the basename for that directory.
160
-func_mktempdir ()
161
-{
162
-    my_template="${TMPDIR-/tmp}/${1-$progname}"
163
-
164
-    if test "$run" = ":"; then
165
-      # Return a directory name, but don't create it in dry-run mode
166
-      my_tmpdir="${my_template}-$$"
167
-    else
168
-
169
-      # If mktemp works, use that first and foremost
170
-      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
171
-
172
-      if test ! -d "$my_tmpdir"; then
173
-	# Failing that, at least try and use $RANDOM to avoid a race
174
-	my_tmpdir="${my_template}-${RANDOM-0}$$"
175
-
176
-	save_mktempdir_umask=`umask`
177
-	umask 0077
178
-	$mkdir "$my_tmpdir"
179
-	umask $save_mktempdir_umask
180
-      fi
181
-
182
-      # If we're not in dry-run mode, bomb out on failure
183
-      test -d "$my_tmpdir" || {
184
-        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
185
-	exit $EXIT_FAILURE
186
-      }
187
-    fi
188
-
189
-    $echo "X$my_tmpdir" | $Xsed
190
-}
191
-
192
-
193
-# func_win32_libid arg
194
-# return the library type of file 'arg'
195
-#
196
-# Need a lot of goo to handle *both* DLLs and import libs
197
-# Has to be a shell function in order to 'eat' the argument
198
-# that is supplied when $file_magic_command is called.
199
-func_win32_libid ()
200
-{
201
-  win32_libid_type="unknown"
202
-  win32_fileres=`file -L $1 2>/dev/null`
203
-  case $win32_fileres in
204
-  *ar\ archive\ import\ library*) # definitely import
205
-    win32_libid_type="x86 archive import"
206
-    ;;
207
-  *ar\ archive*) # could be an import, or static
208
-    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
209
-      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
210
-      win32_nmres=`eval $NM -f posix -A $1 | \
211
-	$SED -n -e '1,100{
212
-		/ I /{
213
-			s,.*,import,
214
-			p
215
-			q
216
-			}
217
-		}'`
218
-      case $win32_nmres in
219
-      import*)  win32_libid_type="x86 archive import";;
220
-      *)        win32_libid_type="x86 archive static";;
221
-      esac
222
-    fi
223
-    ;;
224
-  *DLL*)
225
-    win32_libid_type="x86 DLL"
226
-    ;;
227
-  *executable*) # but shell scripts are "executable" too...
228
-    case $win32_fileres in
229
-    *MS\ Windows\ PE\ Intel*)
230
-      win32_libid_type="x86 DLL"
231
-      ;;
232
-    esac
233
-    ;;
234
-  esac
235
-  $echo $win32_libid_type
236
-}
237
-
238
-
239
-# func_infer_tag arg
240
-# Infer tagged configuration to use if any are available and
241
-# if one wasn't chosen via the "--tag" command line option.
242
-# Only attempt this if the compiler in the base compile
243
-# command doesn't match the default compiler.
244
-# arg is usually of the form 'gcc ...'
245
-func_infer_tag ()
246
-{
247
-    if test -n "$available_tags" && test -z "$tagname"; then
248
-      CC_quoted=
249
-      for arg in $CC; do
250
-	case $arg in
251
-	  *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
252
-	  arg="\"$arg\""
253
-	  ;;
254
-	esac
255
-	CC_quoted="$CC_quoted $arg"
256
-      done
257
-      case $@ in
258
-      # Blanks in the command may have been stripped by the calling shell,
259
-      # but not from the CC environment variable when configure was run.
260
-      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
261
-      # Blanks at the start of $base_compile will cause this to fail
262
-      # if we don't check for them as well.
263
-      *)
264
-	for z in $available_tags; do
265
-	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
266
-	    # Evaluate the configuration.
267
-	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
268
-	    CC_quoted=
269
-	    for arg in $CC; do
270
-	    # Double-quote args containing other shell metacharacters.
271
-	    case $arg in
272
-	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
273
-	      arg="\"$arg\""
274
-	      ;;
275
-	    esac
276
-	    CC_quoted="$CC_quoted $arg"
277
-	  done
278
-	    case "$@ " in
279
-	      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
280
-	      # The compiler in the base compile command matches
281
-	      # the one in the tagged configuration.
282
-	      # Assume this is the tagged configuration we want.
283
-	      tagname=$z
284
-	      break
285
-	      ;;
286
-	    esac
287
-	  fi
288
-	done
289
-	# If $tagname still isn't set, then no tagged configuration
290
-	# was found and let the user know that the "--tag" command
291
-	# line option must be used.
292
-	if test -z "$tagname"; then
293
-	  $echo "$modename: unable to infer tagged configuration"
294
-	  $echo "$modename: specify a tag with \`--tag'" 1>&2
295
-	  exit $EXIT_FAILURE
296
-#        else
297
-#          $echo "$modename: using $tagname tagged configuration"
298
-	fi
299
-	;;
300
-      esac
301
-    fi
302
-}
303
-
304
-
305
-# func_extract_an_archive dir oldlib
306
-func_extract_an_archive ()
307
-{
308
-    f_ex_an_ar_dir="$1"; shift
309
-    f_ex_an_ar_oldlib="$1"
310
-
311
-    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
312
-    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
313
-    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
314
-     :
315
-    else
316
-      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
317
-      exit $EXIT_FAILURE
318
-    fi
319
-}
320
-
321
-# func_extract_archives gentop oldlib ...
322
-func_extract_archives ()
323
-{
324
-    my_gentop="$1"; shift
325
-    my_oldlibs=${1+"$@"}
326
-    my_oldobjs=""
327
-    my_xlib=""
328
-    my_xabs=""
329
-    my_xdir=""
330
-    my_status=""
331
-
332
-    $show "${rm}r $my_gentop"
333
-    $run ${rm}r "$my_gentop"
334
-    $show "$mkdir $my_gentop"
335
-    $run $mkdir "$my_gentop"
336
-    my_status=$?
337
-    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
338
-      exit $my_status
339
-    fi
340
-
341
-    for my_xlib in $my_oldlibs; do
342
-      # Extract the objects.
343
-      case $my_xlib in
344
-	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
345
-	*) my_xabs=`pwd`"/$my_xlib" ;;
346
-      esac
347
-      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
348
-      my_xlib_u=$my_xlib
349
-      while :; do
350
-        case " $extracted_archives " in
351
-	*" $my_xlib_u "*)
352
-	  extracted_serial=`expr $extracted_serial + 1`
353
-	  my_xlib_u=lt$extracted_serial-$my_xlib ;;
354
-	*) break ;;
355
-	esac
356
-      done
357
-      extracted_archives="$extracted_archives $my_xlib_u"
358
-      my_xdir="$my_gentop/$my_xlib_u"
359
-
360
-      $show "${rm}r $my_xdir"
361
-      $run ${rm}r "$my_xdir"
362
-      $show "$mkdir $my_xdir"
363
-      $run $mkdir "$my_xdir"
364
-      exit_status=$?
365
-      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
366
-	exit $exit_status
367
-      fi
368
-      case $host in
369
-      *-darwin*)
370
-	$show "Extracting $my_xabs"
371
-	# Do not bother doing anything if just a dry run
372
-	if test -z "$run"; then
373
-	  darwin_orig_dir=`pwd`
374
-	  cd $my_xdir || exit $?
375
-	  darwin_archive=$my_xabs
376
-	  darwin_curdir=`pwd`
377
-	  darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
378
-	  darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
379
-	  if test -n "$darwin_arches"; then 
380
-	    darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
381
-	    darwin_arch=
382
-	    $show "$darwin_base_archive has multiple architectures $darwin_arches"
383
-	    for darwin_arch in  $darwin_arches ; do
384
-	      mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
385
-	      lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
386
-	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
387
-	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
388
-	      cd "$darwin_curdir"
389
-	      $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
390
-	    done # $darwin_arches
391
-      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
392
-	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
393
-	    darwin_file=
394
-	    darwin_files=
395
-	    for darwin_file in $darwin_filelist; do
396
-	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
397
-	      lipo -create -output "$darwin_file" $darwin_files
398
-	    done # $darwin_filelist
399
-	    ${rm}r unfat-$$
400
-	    cd "$darwin_orig_dir"
401
-	  else
402
-	    cd "$darwin_orig_dir"
403
- 	    func_extract_an_archive "$my_xdir" "$my_xabs"
404
-	  fi # $darwin_arches
405
-	fi # $run
406
-	;;
407
-      *)
408
-        func_extract_an_archive "$my_xdir" "$my_xabs"
409
-        ;;
410
-      esac
411
-      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
412
-    done
413
-    func_extract_archives_result="$my_oldobjs"
414
-}
415
-# End of Shell function definitions
416
-#####################################
417
-
418
-# Darwin sucks
419
-eval std_shrext=\"$shrext_cmds\"
420
-
421
-disable_libs=no
422
-
423
-# Parse our command line options once, thoroughly.
424
-while test "$#" -gt 0
425
-do
426
-  arg="$1"
427
-  shift
428
-
429
-  case $arg in
430
-  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
431
-  *) optarg= ;;
432
-  esac
433
-
434
-  # If the previous option needs an argument, assign it.
435
-  if test -n "$prev"; then
436
-    case $prev in
437
-    execute_dlfiles)
438
-      execute_dlfiles="$execute_dlfiles $arg"
439
-      ;;
440
-    tag)
441
-      tagname="$arg"
442
-      preserve_args="${preserve_args}=$arg"
443
-
444
-      # Check whether tagname contains only valid characters
445
-      case $tagname in
446
-      *[!-_A-Za-z0-9,/]*)
447
-	$echo "$progname: invalid tag name: $tagname" 1>&2
448
-	exit $EXIT_FAILURE
449
-	;;
450
-      esac
451
-
452
-      case $tagname in
453
-      CC)
454
-	# Don't test for the "default" C tag, as we know, it's there, but
455
-	# not specially marked.
456
-	;;
457
-      *)
458
-	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
459
-	  taglist="$taglist $tagname"
460
-	  # Evaluate the configuration.
461
-	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
462
-	else
463
-	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
464
-	fi
465
-	;;
466
-      esac
467
-      ;;
468
-    *)
469
-      eval "$prev=\$arg"
470
-      ;;
471
-    esac
472
-
473
-    prev=
474
-    prevopt=
475
-    continue
476
-  fi
477
-
478
-  # Have we seen a non-optional argument yet?
479
-  case $arg in
480
-  --help)
481
-    show_help=yes
482
-    ;;
483
-
484
-  --version)
485
-    echo "\
486
-$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
487
-
488
-Copyright (C) 2007  Free Software Foundation, Inc.
489
-This is free software; see the source for copying conditions.  There is NO
490
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
491
-    exit $?
492
-    ;;
493
-
494
-  --config)
495
-    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
496
-    # Now print the configurations for the tags.
497
-    for tagname in $taglist; do
498
-      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
499
-    done
500
-    exit $?
501
-    ;;
502
-
503
-  --debug)
504
-    $echo "$progname: enabling shell trace mode"
505
-    set -x
506
-    preserve_args="$preserve_args $arg"
507
-    ;;
508
-
509
-  --dry-run | -n)
510
-    run=:
511
-    ;;
512
-
513
-  --features)
514
-    $echo "host: $host"
515
-    if test "$build_libtool_libs" = yes; then
516
-      $echo "enable shared libraries"
517
-    else
518
-      $echo "disable shared libraries"
519
-    fi
520
-    if test "$build_old_libs" = yes; then
521
-      $echo "enable static libraries"
522
-    else
523
-      $echo "disable static libraries"
524
-    fi
525
-    exit $?
526
-    ;;
527
-
528
-  --finish) mode="finish" ;;
529
-
530
-  --mode) prevopt="--mode" prev=mode ;;
531
-  --mode=*) mode="$optarg" ;;
532
-
533
-  --preserve-dup-deps) duplicate_deps="yes" ;;
534
-
535
-  --quiet | --silent)
536
-    show=:
537
-    preserve_args="$preserve_args $arg"
538
-    ;;
539
-
540
-  --tag)
541
-    prevopt="--tag"
542
-    prev=tag
543
-    preserve_args="$preserve_args --tag"
544
-    ;;
545
-  --tag=*)
546
-    set tag "$optarg" ${1+"$@"}
547
-    shift
548
-    prev=tag
549
-    preserve_args="$preserve_args --tag"
550
-    ;;
551
-
552
-  -dlopen)
553
-    prevopt="-dlopen"
554
-    prev=execute_dlfiles
555
-    ;;
556
-
557
-  -*)
558
-    $echo "$modename: unrecognized option \`$arg'" 1>&2
559
-    $echo "$help" 1>&2
560
-    exit $EXIT_FAILURE
561
-    ;;
562
-
563
-  *)
564
-    nonopt="$arg"
565
-    break
566
-    ;;
567
-  esac
568
-done
569
-
570
-if test -n "$prevopt"; then
571
-  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
572
-  $echo "$help" 1>&2
573
-  exit $EXIT_FAILURE
574
-fi
575
-
576
-case $disable_libs in
577
-no) 
578
-  ;;
579
-shared)
580
-  build_libtool_libs=no
581
-  build_old_libs=yes
582
-  ;;
583
-static)
584
-  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
585
-  ;;
586
-esac
587
-
588
-# If this variable is set in any of the actions, the command in it
589
-# will be execed at the end.  This prevents here-documents from being
590
-# left over by shells.
591
-exec_cmd=
592
-
593
-if test -z "$show_help"; then
594
-
595
-  # Infer the operation mode.
596
-  if test -z "$mode"; then
597
-    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
598
-    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
599
-    case $nonopt in
600
-    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
601
-      mode=link
602
-      for arg
603
-      do
604
-	case $arg in
605
-	-c)
606
-	   mode=compile
607
-	   break
608
-	   ;;
609
-	esac
610
-      done
611
-      ;;
612
-    *db | *dbx | *strace | *truss)
613
-      mode=execute
614
-      ;;
615
-    *install*|cp|mv)
616
-      mode=install
617
-      ;;
618
-    *rm)
619
-      mode=uninstall
620
-      ;;
621
-    *)
622
-      # If we have no mode, but dlfiles were specified, then do execute mode.
623
-      test -n "$execute_dlfiles" && mode=execute
624
-
625
-      # Just use the default operation mode.
626
-      if test -z "$mode"; then
627
-	if test -n "$nonopt"; then
628
-	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
629
-	else
630
-	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
631
-	fi
632
-      fi
633
-      ;;
634
-    esac
635
-  fi
636
-
637
-  # Only execute mode is allowed to have -dlopen flags.
638
-  if test -n "$execute_dlfiles" && test "$mode" != execute; then
639
-    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
640
-    $echo "$help" 1>&2
641
-    exit $EXIT_FAILURE
642
-  fi
643
-
644
-  # Change the help message to a mode-specific one.
645
-  generic_help="$help"
646
-  help="Try \`$modename --help --mode=$mode' for more information."
647
-
648
-  # These modes are in order of execution frequency so that they run quickly.
649
-  case $mode in
650
-  # libtool compile mode
651
-  compile)
652
-    modename="$modename: compile"
653
-    # Get the compilation command and the source file.
654
-    base_compile=
655
-    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
656
-    suppress_opt=yes
657
-    suppress_output=
658
-    arg_mode=normal
659
-    libobj=
660
-    later=
661
-
662
-    for arg
663
-    do
664
-      case $arg_mode in
665
-      arg  )
666
-	# do not "continue".  Instead, add this to base_compile
667
-	lastarg="$arg"
668
-	arg_mode=normal
669
-	;;
670
-
671
-      target )
672
-	libobj="$arg"
673
-	arg_mode=normal
674
-	continue
675
-	;;
676
-
677
-      normal )
678
-	# Accept any command-line options.
679
-	case $arg in
680
-	-o)
681
-	  if test -n "$libobj" ; then
682
-	    $echo "$modename: you cannot specify \`-o' more than once" 1>&2
683
-	    exit $EXIT_FAILURE
684
-	  fi
685
-	  arg_mode=target
686
-	  continue
687
-	  ;;
688
-
689
-	-static | -prefer-pic | -prefer-non-pic)
690
-	  later="$later $arg"
691
-	  continue
692
-	  ;;
693
-
694
-	-no-suppress)
695
-	  suppress_opt=no
696
-	  continue
697
-	  ;;
698
-
699
-	-Xcompiler)
700
-	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
701
-	  continue      #  The current "srcfile" will either be retained or
702
-	  ;;            #  replaced later.  I would guess that would be a bug.
703
-
704
-	-Wc,*)
705
-	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
706
-	  lastarg=
707
-	  save_ifs="$IFS"; IFS=','
708
- 	  for arg in $args; do
709
-	    IFS="$save_ifs"
710
-
711
-	    # Double-quote args containing other shell metacharacters.
712
-	    # Many Bourne shells cannot handle close brackets correctly
713
-	    # in scan sets, so we specify it separately.
714
-	    case $arg in
715
-	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
716
-	      arg="\"$arg\""
717
-	      ;;
718
-	    esac
719
-	    lastarg="$lastarg $arg"
720
-	  done
721
-	  IFS="$save_ifs"
722
-	  lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
723
-
724
-	  # Add the arguments to base_compile.
725
-	  base_compile="$base_compile $lastarg"
726
-	  continue
727
-	  ;;
728
-
729
-	* )
730
-	  # Accept the current argument as the source file.
731
-	  # The previous "srcfile" becomes the current argument.
732
-	  #
733
-	  lastarg="$srcfile"
734
-	  srcfile="$arg"
735
-	  ;;
736
-	esac  #  case $arg
737
-	;;
738
-      esac    #  case $arg_mode
739
-
740
-      # Aesthetically quote the previous argument.
741
-      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
742
-
743
-      case $lastarg in
744
-      # Double-quote args containing other shell metacharacters.
745
-      # Many Bourne shells cannot handle close brackets correctly
746
-      # in scan sets, and some SunOS ksh mistreat backslash-escaping
747
-      # in scan sets (worked around with variable expansion),
748
-      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
749
-      # at all, so we specify them separately.
750
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
751
-	lastarg="\"$lastarg\""
752
-	;;
753
-      esac
754
-
755
-      base_compile="$base_compile $lastarg"
756
-    done # for arg
757
-
758
-    case $arg_mode in
759
-    arg)
760
-      $echo "$modename: you must specify an argument for -Xcompile"
761
-      exit $EXIT_FAILURE
762
-      ;;
763
-    target)
764
-      $echo "$modename: you must specify a target with \`-o'" 1>&2
765
-      exit $EXIT_FAILURE
766
-      ;;
767
-    *)
768
-      # Get the name of the library object.
769
-      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
770
-      ;;
771
-    esac
772
-
773
-    # Recognize several different file suffixes.
774
-    # If the user specifies -o file.o, it is replaced with file.lo
775
-    xform='[cCFSifmso]'
776
-    case $libobj in
777
-    *.ada) xform=ada ;;
778
-    *.adb) xform=adb ;;
779
-    *.ads) xform=ads ;;
780
-    *.asm) xform=asm ;;
781
-    *.c++) xform=c++ ;;
782
-    *.cc) xform=cc ;;
783
-    *.ii) xform=ii ;;
784
-    *.class) xform=class ;;
785
-    *.cpp) xform=cpp ;;
786
-    *.cxx) xform=cxx ;;
787
-    *.[fF][09]?) xform=[fF][09]. ;;
788
-    *.for) xform=for ;;
789
-    *.java) xform=java ;;
790
-    *.obj) xform=obj ;;
791
-    esac
792
-
793
-    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
794
-
795
-    case $libobj in
796
-    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
797
-    *)
798
-      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
799
-      exit $EXIT_FAILURE
800
-      ;;
801
-    esac
802
-
803
-    func_infer_tag $base_compile
804
-
805
-    for arg in $later; do
806
-      case $arg in
807
-      -static)
808
-	build_old_libs=yes
809
-	continue
810
-	;;
811
-
812
-      -prefer-pic)
813
-	pic_mode=yes
814
-	continue
815
-	;;
816
-
817
-      -prefer-non-pic)
818
-	pic_mode=no
819
-	continue
820
-	;;
821
-      esac
822
-    done
823
-
824
-    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
825
-    case $qlibobj in
826
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
827
-	qlibobj="\"$qlibobj\"" ;;
828
-    esac
829
-    test "X$libobj" != "X$qlibobj" \
830
-	&& $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' 	&()|`$[]' \
831
-	&& $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
832
-    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
833
-    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
834
-    if test "X$xdir" = "X$obj"; then
835
-      xdir=
836
-    else
837
-      xdir=$xdir/
838
-    fi
839
-    lobj=${xdir}$objdir/$objname
840
-
841
-    if test -z "$base_compile"; then
842
-      $echo "$modename: you must specify a compilation command" 1>&2
843
-      $echo "$help" 1>&2
844
-      exit $EXIT_FAILURE
845
-    fi
846
-
847
-    # Delete any leftover library objects.
848
-    if test "$build_old_libs" = yes; then
849
-      removelist="$obj $lobj $libobj ${libobj}T"
850
-    else
851
-      removelist="$lobj $libobj ${libobj}T"
852
-    fi
853
-
854
-    $run $rm $removelist
855
-    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
856
-
857
-    # On Cygwin there's no "real" PIC flag so we must build both object types
858
-    case $host_os in
859
-    cygwin* | mingw* | pw32* | os2*)
860
-      pic_mode=default
861
-      ;;
862
-    esac
863
-    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
864
-      # non-PIC code in shared libraries is not supported
865
-      pic_mode=default
866
-    fi
867
-
868
-    # Calculate the filename of the output object if compiler does
869
-    # not support -o with -c
870
-    if test "$compiler_c_o" = no; then
871
-      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
872
-      lockfile="$output_obj.lock"
873
-      removelist="$removelist $output_obj $lockfile"
874
-      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
875
-    else
876
-      output_obj=
877
-      need_locks=no
878
-      lockfile=
879
-    fi
880
-
881
-    # Lock this critical section if it is needed
882
-    # We use this script file to make the link, it avoids creating a new file
883
-    if test "$need_locks" = yes; then
884
-      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
885
-	$show "Waiting for $lockfile to be removed"
886
-	sleep 2
887
-      done
888
-    elif test "$need_locks" = warn; then
889
-      if test -f "$lockfile"; then
890
-	$echo "\
891
-*** ERROR, $lockfile exists and contains:
892
-`cat $lockfile 2>/dev/null`
893
-
894
-This indicates that another process is trying to use the same
895
-temporary object file, and libtool could not work around it because
896
-your compiler does not support \`-c' and \`-o' together.  If you
897
-repeat this compilation, it may succeed, by chance, but you had better
898
-avoid parallel builds (make -j) in this platform, or get a better
899
-compiler."
900
-
901
-	$run $rm $removelist
902
-	exit $EXIT_FAILURE
903
-      fi
904
-      $echo "$srcfile" > "$lockfile"
905
-    fi
906
-
907
-    if test -n "$fix_srcfile_path"; then
908
-      eval srcfile=\"$fix_srcfile_path\"
909
-    fi
910
-    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
911
-    case $qsrcfile in
912
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
913
-      qsrcfile="\"$qsrcfile\"" ;;
914
-    esac
915
-
916
-    $run $rm "$libobj" "${libobj}T"
917
-
918
-    # Create a libtool object file (analogous to a ".la" file),
919
-    # but don't create it if we're doing a dry run.
920
-    test -z "$run" && cat > ${libobj}T <<EOF
921
-# $libobj - a libtool object file
922
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
923
-#
924
-# Please DO NOT delete this file!
925
-# It is necessary for linking the library.
926
-
927
-# Name of the PIC object.
928
-EOF
929
-
930
-    # Only build a PIC object if we are building libtool libraries.
931
-    if test "$build_libtool_libs" = yes; then
932
-      # Without this assignment, base_compile gets emptied.
933
-      fbsd_hideous_sh_bug=$base_compile
934
-
935
-      if test "$pic_mode" != no; then
936
-	command="$base_compile $qsrcfile $pic_flag"
937
-      else
938
-	# Don't build PIC code
939
-	command="$base_compile $qsrcfile"
940
-      fi
941
-
942
-      if test ! -d "${xdir}$objdir"; then
943
-	$show "$mkdir ${xdir}$objdir"
944
-	$run $mkdir ${xdir}$objdir
945
-	exit_status=$?
946
-	if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
947
-	  exit $exit_status
948
-	fi
949
-      fi
950
-
951
-      if test -z "$output_obj"; then
952
-	# Place PIC objects in $objdir
953
-	command="$command -o $lobj"
954
-      fi
955
-
956
-      $run $rm "$lobj" "$output_obj"
957
-
958
-      $show "$command"
959
-      if $run eval "$command"; then :
960
-      else
961
-	test -n "$output_obj" && $run $rm $removelist
962
-	exit $EXIT_FAILURE
963
-      fi
964
-
965
-      if test "$need_locks" = warn &&
966
-	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
967
-	$echo "\
968
-*** ERROR, $lockfile contains:
969
-`cat $lockfile 2>/dev/null`
970
-
971
-but it should contain:
972
-$srcfile
973
-
974
-This indicates that another process is trying to use the same
975
-temporary object file, and libtool could not work around it because
976
-your compiler does not support \`-c' and \`-o' together.  If you
977
-repeat this compilation, it may succeed, by chance, but you had better
978
-avoid parallel builds (make -j) in this platform, or get a better
979
-compiler."
980
-
981
-	$run $rm $removelist
982
-	exit $EXIT_FAILURE
983
-      fi
984
-
985
-      # Just move the object if needed, then go on to compile the next one
986
-      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
987
-	$show "$mv $output_obj $lobj"
988
-	if $run $mv $output_obj $lobj; then :
989
-	else
990
-	  error=$?
991
-	  $run $rm $removelist
992
-	  exit $error
993
-	fi
994
-      fi
995
-
996
-      # Append the name of the PIC object to the libtool object file.
997
-      test -z "$run" && cat >> ${libobj}T <<EOF
998
-pic_object='$objdir/$objname'
999
-
1000
-EOF
1001
-
1002
-      # Allow error messages only from the first compilation.
1003
-      if test "$suppress_opt" = yes; then
1004
-        suppress_output=' >/dev/null 2>&1'
1005
-      fi
1006
-    else
1007
-      # No PIC object so indicate it doesn't exist in the libtool
1008
-      # object file.
1009
-      test -z "$run" && cat >> ${libobj}T <<EOF
1010
-pic_object=none
1011
-
1012
-EOF
1013
-    fi
1014
-
1015
-    # Only build a position-dependent object if we build old libraries.
1016
-    if test "$build_old_libs" = yes; then
1017
-      if test "$pic_mode" != yes; then
1018
-	# Don't build PIC code
1019
-	command="$base_compile $qsrcfile"
1020
-      else
1021
-	command="$base_compile $qsrcfile $pic_flag"
1022
-      fi
1023
-      if test "$compiler_c_o" = yes; then
1024
-	command="$command -o $obj"
1025
-      fi
1026
-
1027
-      # Suppress compiler output if we already did a PIC compilation.
1028
-      command="$command$suppress_output"
1029
-      $run $rm "$obj" "$output_obj"
1030
-      $show "$command"
1031
-      if $run eval "$command"; then :
1032
-      else
1033
-	$run $rm $removelist
1034
-	exit $EXIT_FAILURE
1035
-      fi
1036
-
1037
-      if test "$need_locks" = warn &&
1038
-	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1039
-	$echo "\
1040
-*** ERROR, $lockfile contains:
1041
-`cat $lockfile 2>/dev/null`
1042
-
1043
-but it should contain:
1044
-$srcfile
1045
-
1046
-This indicates that another process is trying to use the same
1047
-temporary object file, and libtool could not work around it because
1048
-your compiler does not support \`-c' and \`-o' together.  If you
1049
-repeat this compilation, it may succeed, by chance, but you had better
1050
-avoid parallel builds (make -j) in this platform, or get a better
1051
-compiler."
1052
-
1053
-	$run $rm $removelist
1054
-	exit $EXIT_FAILURE
1055
-      fi
1056
-
1057
-      # Just move the object if needed
1058
-      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1059
-	$show "$mv $output_obj $obj"
1060
-	if $run $mv $output_obj $obj; then :
1061
-	else
1062
-	  error=$?
1063
-	  $run $rm $removelist
1064
-	  exit $error
1065
-	fi
1066
-      fi
1067
-
1068
-      # Append the name of the non-PIC object the libtool object file.
1069
-      # Only append if the libtool object file exists.
1070
-      test -z "$run" && cat >> ${libobj}T <<EOF
1071
-# Name of the non-PIC object.
1072
-non_pic_object='$objname'
1073
-
1074
-EOF
1075
-    else
1076
-      # Append the name of the non-PIC object the libtool object file.
1077
-      # Only append if the libtool object file exists.
1078
-      test -z "$run" && cat >> ${libobj}T <<EOF
1079
-# Name of the non-PIC object.
1080
-non_pic_object=none
1081
-
1082
-EOF
1083
-    fi
1084
-
1085
-    $run $mv "${libobj}T" "${libobj}"
1086
-
1087
-    # Unlock the critical section if it was locked
1088
-    if test "$need_locks" != no; then
1089
-      $run $rm "$lockfile"
1090
-    fi
1091
-
1092
-    exit $EXIT_SUCCESS
1093
-    ;;
1094
-
1095
-  # libtool link mode
1096
-  link | relink)
1097
-    modename="$modename: link"
1098
-    case $host in
1099
-    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1100
-      # It is impossible to link a dll without this setting, and
1101
-      # we shouldn't force the makefile maintainer to figure out
1102
-      # which system we are compiling for in order to pass an extra
1103
-      # flag for every libtool invocation.
1104
-      # allow_undefined=no
1105
-
1106
-      # FIXME: Unfortunately, there are problems with the above when trying
1107
-      # to make a dll which has undefined symbols, in which case not
1108
-      # even a static library is built.  For now, we need to specify
1109
-      # -no-undefined on the libtool link line when we can be certain
1110
-      # that all symbols are satisfied, otherwise we get a static library.
1111
-      allow_undefined=yes
1112
-      ;;
1113
-    *)
1114
-      allow_undefined=yes
1115
-      ;;
1116
-    esac
1117
-    libtool_args="$nonopt"
1118
-    base_compile="$nonopt $@"
1119
-    compile_command="$nonopt"
1120
-    finalize_command="$nonopt"
1121
-
1122
-    compile_rpath=
1123
-    finalize_rpath=
1124
-    compile_shlibpath=
1125
-    finalize_shlibpath=
1126
-    convenience=
1127
-    old_convenience=
1128
-    deplibs=
1129
-    old_deplibs=
1130
-    compiler_flags=
1131
-    linker_flags=
1132
-    dllsearchpath=
1133
-    lib_search_path=`pwd`
1134
-    inst_prefix_dir=
1135
-
1136
-    avoid_version=no
1137
-    dlfiles=
1138
-    dlprefiles=
1139
-    dlself=no
1140
-    export_dynamic=no
1141
-    export_symbols=
1142
-    export_symbols_regex=
1143
-    generated=
1144
-    libobjs=
1145
-    ltlibs=
1146
-    module=no
1147
-    no_install=no
1148
-    objs=
1149
-    non_pic_objects=
1150
-    notinst_path= # paths that contain not-installed libtool libraries
1151
-    precious_files_regex=
1152
-    prefer_static_libs=no
1153
-    preload=no
1154
-    prev=
1155
-    prevarg=
1156
-    release=
1157
-    rpath=
1158
-    xrpath=
1159
-    perm_rpath=
1160
-    temp_rpath=
1161
-    thread_safe=no
1162
-    vinfo=
1163
-    vinfo_number=no
1164
-
1165
-    func_infer_tag $base_compile
1166
-
1167
-    # We need to know -static, to get the right output filenames.
1168
-    for arg
1169
-    do
1170
-      case $arg in
1171
-      -all-static | -static | -static-libtool-libs)
1172
-	case $arg in
1173
-	-all-static)
1174
-	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1175
-	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1176
-	  fi
1177
-	  if test -n "$link_static_flag"; then
1178
-	    dlopen_self=$dlopen_self_static
1179
-	  fi
1180
-	  prefer_static_libs=yes
1181
-	  ;;
1182
-	-static)
1183
-	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
1184
-	    dlopen_self=$dlopen_self_static
1185
-	  fi
1186
-	  prefer_static_libs=built
1187
-	  ;;
1188
-	-static-libtool-libs)
1189
-	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
1190
-	    dlopen_self=$dlopen_self_static
1191
-	  fi
1192
-	  prefer_static_libs=yes
1193
-	  ;;
1194
-	esac
1195
-	build_libtool_libs=no
1196
-	build_old_libs=yes
1197
-	break
1198
-	;;
1199
-      esac
1200
-    done
1201
-
1202
-    # See if our shared archives depend on static archives.
1203
-    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
1204
-
1205
-    # Go through the arguments, transforming them on the way.
1206
-    while test "$#" -gt 0; do
1207
-      arg="$1"
1208
-      shift
1209
-      case $arg in
1210
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
1211
-	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1212
-	;;
1213
-      *) qarg=$arg ;;
1214
-      esac
1215
-      libtool_args="$libtool_args $qarg"
1216
-
1217
-      # If the previous option needs an argument, assign it.
1218
-      if test -n "$prev"; then
1219
-	case $prev in
1220
-	output)
1221
-	  compile_command="$compile_command @OUTPUT@"
1222
-	  finalize_command="$finalize_command @OUTPUT@"
1223
-	  ;;
1224
-	esac
1225
-
1226
-	case $prev in
1227
-	dlfiles|dlprefiles)
1228
-	  if test "$preload" = no; then
1229
-	    # Add the symbol object into the linking commands.
1230
-	    compile_command="$compile_command @SYMFILE@"
1231
-	    finalize_command="$finalize_command @SYMFILE@"
1232
-	    preload=yes
1233
-	  fi
1234
-	  case $arg in
1235
-	  *.la | *.lo) ;;  # We handle these cases below.
1236
-	  force)
1237
-	    if test "$dlself" = no; then
1238
-	      dlself=needless
1239
-	      export_dynamic=yes
1240
-	    fi
1241
-	    prev=
1242
-	    continue
1243
-	    ;;
1244
-	  self)
1245
-	    if test "$prev" = dlprefiles; then
1246
-	      dlself=yes
1247
-	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
1248
-	      dlself=yes
1249
-	    else
1250
-	      dlself=needless
1251
-	      export_dynamic=yes
1252
-	    fi
1253
-	    prev=
1254
-	    continue
1255
-	    ;;
1256
-	  *)
1257
-	    if test "$prev" = dlfiles; then
1258
-	      dlfiles="$dlfiles $arg"
1259
-	    else
1260
-	      dlprefiles="$dlprefiles $arg"
1261
-	    fi
1262
-	    prev=
1263
-	    continue
1264
-	    ;;
1265
-	  esac
1266
-	  ;;
1267
-	expsyms)
1268
-	  export_symbols="$arg"
1269
-	  if test ! -f "$arg"; then
1270
-	    $echo "$modename: symbol file \`$arg' does not exist"
1271
-	    exit $EXIT_FAILURE
1272
-	  fi
1273
-	  prev=
1274
-	  continue
1275
-	  ;;
1276
-	expsyms_regex)
1277
-	  export_symbols_regex="$arg"
1278
-	  prev=
1279
-	  continue
1280
-	  ;;
1281
-	inst_prefix)
1282
-	  inst_prefix_dir="$arg"
1283
-	  prev=
1284
-	  continue
1285
-	  ;;
1286
-	precious_regex)
1287
-	  precious_files_regex="$arg"
1288
-	  prev=
1289
-	  continue
1290
-	  ;;
1291
-	release)
1292
-	  release="-$arg"
1293
-	  prev=
1294
-	  continue
1295
-	  ;;
1296
-	objectlist)
1297
-	  if test -f "$arg"; then
1298
-	    save_arg=$arg
1299
-	    moreargs=
1300
-	    for fil in `cat $save_arg`
1301
-	    do
1302
-#	      moreargs="$moreargs $fil"
1303
-	      arg=$fil
1304
-	      # A libtool-controlled object.
1305
-
1306
-	      # Check to see that this really is a libtool object.
1307
-	      if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1308
-		pic_object=
1309
-		non_pic_object=
1310
-
1311
-		# Read the .lo file
1312
-		# If there is no directory component, then add one.
1313
-		case $arg in
1314
-		*/* | *\\*) . $arg ;;
1315
-		*) . ./$arg ;;
1316
-		esac
1317
-
1318
-		if test -z "$pic_object" || \
1319
-		   test -z "$non_pic_object" ||
1320
-		   test "$pic_object" = none && \
1321
-		   test "$non_pic_object" = none; then
1322
-		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1323
-		  exit $EXIT_FAILURE
1324
-		fi
1325
-
1326
-		# Extract subdirectory from the argument.
1327
-		xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1328
-		if test "X$xdir" = "X$arg"; then
1329
-		  xdir=
1330
-		else
1331
-		  xdir="$xdir/"
1332
-		fi
1333
-
1334
-		if test "$pic_object" != none; then
1335
-		  # Prepend the subdirectory the object is found in.
1336
-		  pic_object="$xdir$pic_object"
1337
-
1338
-		  if test "$prev" = dlfiles; then
1339
-		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1340
-		      dlfiles="$dlfiles $pic_object"
1341
-		      prev=
1342
-		      continue
1343
-		    else
1344
-		      # If libtool objects are unsupported, then we need to preload.
1345
-		      prev=dlprefiles
1346
-		    fi
1347
-		  fi
1348
-
1349
-		  # CHECK ME:  I think I busted this.  -Ossama
1350
-		  if test "$prev" = dlprefiles; then
1351
-		    # Preload the old-style object.
1352
-		    dlprefiles="$dlprefiles $pic_object"
1353
-		    prev=
1354
-		  fi
1355
-
1356
-		  # A PIC object.
1357
-		  libobjs="$libobjs $pic_object"
1358
-		  arg="$pic_object"
1359
-		fi
1360
-
1361
-		# Non-PIC object.
1362
-		if test "$non_pic_object" != none; then
1363
-		  # Prepend the subdirectory the object is found in.
1364
-		  non_pic_object="$xdir$non_pic_object"
1365
-
1366
-		  # A standard non-PIC object
1367
-		  non_pic_objects="$non_pic_objects $non_pic_object"
1368
-		  if test -z "$pic_object" || test "$pic_object" = none ; then
1369
-		    arg="$non_pic_object"
1370
-		  fi
1371
-		else
1372
-		  # If the PIC object exists, use it instead.
1373
-		  # $xdir was prepended to $pic_object above.
1374
-		  non_pic_object="$pic_object"
1375
-		  non_pic_objects="$non_pic_objects $non_pic_object"
1376
-		fi
1377
-	      else
1378
-		# Only an error if not doing a dry-run.
1379
-		if test -z "$run"; then
1380
-		  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1381
-		  exit $EXIT_FAILURE
1382
-		else
1383
-		  # Dry-run case.
1384
-
1385
-		  # Extract subdirectory from the argument.
1386
-		  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1387
-		  if test "X$xdir" = "X$arg"; then
1388
-		    xdir=
1389
-		  else
1390
-		    xdir="$xdir/"
1391
-		  fi
1392
-
1393
-		  pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1394
-		  non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1395
-		  libobjs="$libobjs $pic_object"
1396
-		  non_pic_objects="$non_pic_objects $non_pic_object"
1397
-		fi
1398
-	      fi
1399
-	    done
1400
-	  else
1401
-	    $echo "$modename: link input file \`$save_arg' does not exist"
1402
-	    exit $EXIT_FAILURE
1403
-	  fi
1404
-	  arg=$save_arg
1405
-	  prev=
1406
-	  continue
1407
-	  ;;
1408
-	rpath | xrpath)
1409
-	  # We need an absolute path.
1410
-	  case $arg in
1411
-	  [\\/]* | [A-Za-z]:[\\/]*) ;;
1412
-	  *)
1413
-	    $echo "$modename: only absolute run-paths are allowed" 1>&2
1414
-	    exit $EXIT_FAILURE
1415
-	    ;;
1416
-	  esac
1417
-	  if test "$prev" = rpath; then
1418
-	    case "$rpath " in
1419
-	    *" $arg "*) ;;
1420
-	    *) rpath="$rpath $arg" ;;
1421
-	    esac
1422
-	  else
1423
-	    case "$xrpath " in
1424
-	    *" $arg "*) ;;
1425
-	    *) xrpath="$xrpath $arg" ;;
1426
-	    esac
1427
-	  fi
1428
-	  prev=
1429
-	  continue
1430
-	  ;;
1431
-	xcompiler)
1432
-	  compiler_flags="$compiler_flags $qarg"
1433
-	  prev=
1434
-	  compile_command="$compile_command $qarg"
1435
-	  finalize_command="$finalize_command $qarg"
1436
-	  continue
1437
-	  ;;
1438
-	xlinker)
1439
-	  linker_flags="$linker_flags $qarg"
1440
-	  compiler_flags="$compiler_flags $wl$qarg"
1441
-	  prev=
1442
-	  compile_command="$compile_command $wl$qarg"
1443
-	  finalize_command="$finalize_command $wl$qarg"
1444
-	  continue
1445
-	  ;;
1446
-	xcclinker)
1447
-	  linker_flags="$linker_flags $qarg"
1448
-	  compiler_flags="$compiler_flags $qarg"
1449
-	  prev=
1450
-	  compile_command="$compile_command $qarg"
1451
-	  finalize_command="$finalize_command $qarg"
1452
-	  continue
1453
-	  ;;
1454
-	shrext)
1455
-  	  shrext_cmds="$arg"
1456
-	  prev=
1457
-	  continue
1458
-	  ;;
1459
-	darwin_framework|darwin_framework_skip)
1460
-	  test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
1461
-	  compile_command="$compile_command $arg"
1462
-	  finalize_command="$finalize_command $arg"
1463
-	  prev=
1464
-	  continue
1465
-	  ;;
1466
-	*)
1467
-	  eval "$prev=\"\$arg\""
1468
-	  prev=
1469
-	  continue
1470
-	  ;;
1471
-	esac
1472
-      fi # test -n "$prev"
1473
-
1474
-      prevarg="$arg"
1475
-
1476
-      case $arg in
1477
-      -all-static)
1478
-	if test -n "$link_static_flag"; then
1479
-	  compile_command="$compile_command $link_static_flag"
1480
-	  finalize_command="$finalize_command $link_static_flag"
1481
-	fi
1482
-	continue
1483
-	;;
1484
-
1485
-      -allow-undefined)
1486
-	# FIXME: remove this flag sometime in the future.
1487
-	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1488
-	continue
1489
-	;;
1490
-
1491
-      -avoid-version)
1492
-	avoid_version=yes
1493
-	continue
1494
-	;;
1495
-
1496
-      -dlopen)
1497
-	prev=dlfiles
1498
-	continue
1499
-	;;
1500
-
1501
-      -dlpreopen)
1502
-	prev=dlprefiles
1503
-	continue
1504
-	;;
1505
-
1506
-      -export-dynamic)
1507
-	export_dynamic=yes
1508
-	continue
1509
-	;;
1510
-
1511
-      -export-symbols | -export-symbols-regex)
1512
-	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1513
-	  $echo "$modename: more than one -exported-symbols argument is not allowed"
1514
-	  exit $EXIT_FAILURE
1515
-	fi
1516
-	if test "X$arg" = "X-export-symbols"; then
1517
-	  prev=expsyms
1518
-	else
1519
-	  prev=expsyms_regex
1520
-	fi
1521
-	continue
1522
-	;;
1523
-
1524
-      -framework|-arch|-isysroot)
1525
-	case " $CC " in
1526
-	  *" ${arg} ${1} "* | *" ${arg}	${1} "*) 
1527
-		prev=darwin_framework_skip ;;
1528
-	  *) compiler_flags="$compiler_flags $arg"
1529
-	     prev=darwin_framework ;;
1530
-	esac
1531
-	compile_command="$compile_command $arg"
1532
-	finalize_command="$finalize_command $arg"
1533
-	continue
1534
-	;;
1535
-
1536
-      -inst-prefix-dir)
1537
-	prev=inst_prefix
1538
-	continue
1539
-	;;
1540
-
1541
-      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1542
-      # so, if we see these flags be careful not to treat them like -L
1543
-      -L[A-Z][A-Z]*:*)
1544
-	case $with_gcc/$host in
1545
-	no/*-*-irix* | /*-*-irix*)
1546
-	  compile_command="$compile_command $arg"
1547
-	  finalize_command="$finalize_command $arg"
1548
-	  ;;
1549
-	esac
1550
-	continue
1551
-	;;
1552
-
1553
-      -L*)
1554
-	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1555
-	# We need an absolute path.
1556
-	case $dir in
1557
-	[\\/]* | [A-Za-z]:[\\/]*) ;;
1558
-	*)
1559
-	  absdir=`cd "$dir" && pwd`
1560
-	  if test -z "$absdir"; then
1561
-	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1562
-	    absdir="$dir"
1563
-	    notinst_path="$notinst_path $dir"
1564
-	  fi
1565
-	  dir="$absdir"
1566
-	  ;;
1567
-	esac
1568
-	case "$deplibs " in
1569
-	*" -L$dir "*) ;;
1570
-	*)
1571
-	  deplibs="$deplibs -L$dir"
1572
-	  lib_search_path="$lib_search_path $dir"
1573
-	  ;;
1574
-	esac
1575
-	case $host in
1576
-	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1577
-	  testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
1578
-	  case :$dllsearchpath: in
1579
-	  *":$dir:"*) ;;
1580
-	  *) dllsearchpath="$dllsearchpath:$dir";;
1581
-	  esac
1582
-	  case :$dllsearchpath: in
1583
-	  *":$testbindir:"*) ;;
1584
-	  *) dllsearchpath="$dllsearchpath:$testbindir";;
1585
-	  esac
1586
-	  ;;
1587
-	esac
1588
-	continue
1589
-	;;
1590
-
1591
-      -l*)
1592
-	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
1593
-	  case $host in
1594
-	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
1595
-	    # These systems don't actually have a C or math library (as such)
1596
-	    continue
1597
-	    ;;
1598
-	  *-*-os2*)
1599
-	    # These systems don't actually have a C library (as such)
1600
-	    test "X$arg" = "X-lc" && continue
1601
-	    ;;
1602
-	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1603
-	    # Do not include libc due to us having libc/libc_r.
1604
-	    test "X$arg" = "X-lc" && continue
1605
-	    ;;
1606
-	  *-*-rhapsody* | *-*-darwin1.[012])
1607
-	    # Rhapsody C and math libraries are in the System framework
1608
-	    deplibs="$deplibs -framework System"
1609
-	    continue
1610
-	    ;;
1611
-	  *-*-sco3.2v5* | *-*-sco5v6*)
1612
-	    # Causes problems with __ctype
1613
-	    test "X$arg" = "X-lc" && continue
1614
-	    ;;
1615
-	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
1616
-	    # Compiler inserts libc in the correct place for threads to work
1617
-	    test "X$arg" = "X-lc" && continue
1618
-	    ;;
1619
-	  esac
1620
-	elif test "X$arg" = "X-lc_r"; then
1621
-	 case $host in
1622
-	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1623
-	   # Do not include libc_r directly, use -pthread flag.
1624
-	   continue
1625
-	   ;;
1626
-	 esac
1627
-	fi
1628
-	deplibs="$deplibs $arg"
1629
-	continue
1630
-	;;
1631
-
1632
-      # Tru64 UNIX uses -model [arg] to determine the layout of C++
1633
-      # classes, name mangling, and exception handling.
1634
-      -model)
1635
-	compile_command="$compile_command $arg"
1636
-	compiler_flags="$compiler_flags $arg"
1637
-	finalize_command="$finalize_command $arg"
1638
-	prev=xcompiler
1639
-	continue
1640
-	;;
1641
-
1642
-     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
1643
-	compiler_flags="$compiler_flags $arg"
1644
-	compile_command="$compile_command $arg"
1645
-	finalize_command="$finalize_command $arg"
1646
-	continue
1647
-	;;
1648
-
1649
-      -module)
1650
-	module=yes
1651
-	continue
1652
-	;;
1653
-
1654
-      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
1655
-      # -r[0-9][0-9]* specifies the processor on the SGI compiler
1656
-      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
1657
-      # +DA*, +DD* enable 64-bit mode on the HP compiler
1658
-      # -q* pass through compiler args for the IBM compiler
1659
-      # -m* pass through architecture-specific compiler args for GCC
1660
-      # -m*, -t[45]*, -txscale* pass through architecture-specific
1661
-      # compiler args for GCC
1662
-      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
1663
-      # -F/path gives path to uninstalled frameworks, gcc on darwin
1664
-      # @file GCC response files
1665
-      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
1666
-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
1667
-
1668
-	# Unknown arguments in both finalize_command and compile_command need
1669
-	# to be aesthetically quoted because they are evaled later.
1670
-	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1671
-	case $arg in
1672
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
1673
-	  arg="\"$arg\""
1674
-	  ;;
1675
-	esac
1676
-        compile_command="$compile_command $arg"
1677
-        finalize_command="$finalize_command $arg"
1678
-        compiler_flags="$compiler_flags $arg"
1679
-        continue
1680
-        ;;
1681
-
1682
-      -shrext)
1683
-	prev=shrext
1684
-	continue
1685
-	;;
1686
-
1687
-      -no-fast-install)
1688
-	fast_install=no
1689
-	continue
1690
-	;;
1691
-
1692
-      -no-install)
1693
-	case $host in
1694
-	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
1695
-	  # The PATH hackery in wrapper scripts is required on Windows
1696
-	  # and Darwin in order for the loader to find any dlls it needs.
1697
-	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1698
-	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1699
-	  fast_install=no
1700
-	  ;;
1701
-	*) no_install=yes ;;
1702
-	esac
1703
-	continue
1704
-	;;
1705
-
1706
-      -no-undefined)
1707
-	allow_undefined=no
1708
-	continue
1709
-	;;
1710
-
1711
-      -objectlist)
1712
-	prev=objectlist
1713
-	continue
1714
-	;;
1715
-
1716
-      -o) prev=output ;;
1717
-
1718
-      -precious-files-regex)
1719
-	prev=precious_regex
1720
-	continue
1721
-	;;
1722
-
1723
-      -release)
1724
-	prev=release
1725
-	continue
1726
-	;;
1727
-
1728
-      -rpath)
1729
-	prev=rpath
1730
-	continue
1731
-	;;
1732
-
1733
-      -R)
1734
-	prev=xrpath
1735
-	continue
1736
-	;;
1737
-
1738
-      -R*)
1739
-	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1740
-	# We need an absolute path.
1741
-	case $dir in
1742
-	[\\/]* | [A-Za-z]:[\\/]*) ;;
1743
-	*)
1744
-	  $echo "$modename: only absolute run-paths are allowed" 1>&2
1745
-	  exit $EXIT_FAILURE
1746
-	  ;;
1747
-	esac
1748
-	case "$xrpath " in
1749
-	*" $dir "*) ;;
1750
-	*) xrpath="$xrpath $dir" ;;
1751
-	esac
1752
-	continue
1753
-	;;
1754
-
1755
-      -static | -static-libtool-libs)
1756
-	# The effects of -static are defined in a previous loop.
1757
-	# We used to do the same as -all-static on platforms that
1758
-	# didn't have a PIC flag, but the assumption that the effects
1759
-	# would be equivalent was wrong.  It would break on at least
1760
-	# Digital Unix and AIX.
1761
-	continue
1762
-	;;
1763
-
1764
-      -thread-safe)
1765
-	thread_safe=yes
1766
-	continue
1767
-	;;
1768
-
1769
-      -version-info)
1770
-	prev=vinfo
1771
-	continue
1772
-	;;
1773
-      -version-number)
1774
-	prev=vinfo
1775
-	vinfo_number=yes
1776
-	continue
1777
-	;;
1778
-
1779
-      -Wc,*)
1780
-	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1781
-	arg=
1782
-	save_ifs="$IFS"; IFS=','
1783
-	for flag in $args; do
1784
-	  IFS="$save_ifs"
1785
-	  case $flag in
1786
-	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
1787
-	    flag="\"$flag\""
1788
-	    ;;
1789
-	  esac
1790
-	  arg="$arg $wl$flag"
1791
-	  compiler_flags="$compiler_flags $flag"
1792
-	done
1793
-	IFS="$save_ifs"
1794
-	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1795
-	;;
1796
-
1797
-      -Wl,*)
1798
-	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1799
-	arg=
1800
-	save_ifs="$IFS"; IFS=','
1801
-	for flag in $args; do
1802
-	  IFS="$save_ifs"
1803
-	  case $flag in
1804
-	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
1805
-	    flag="\"$flag\""
1806
-	    ;;
1807
-	  esac
1808
-	  arg="$arg $wl$flag"
1809
-	  compiler_flags="$compiler_flags $wl$flag"
1810
-	  linker_flags="$linker_flags $flag"
1811
-	done
1812
-	IFS="$save_ifs"
1813
-	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1814
-	;;
1815
-
1816
-      -Xcompiler)
1817
-	prev=xcompiler
1818
-	continue
1819
-	;;
1820
-
1821
-      -Xlinker)
1822
-	prev=xlinker
1823
-	continue
1824
-	;;
1825
-
1826
-      -XCClinker)
1827
-	prev=xcclinker
1828
-	continue
1829
-	;;
1830
-
1831
-      # Some other compiler flag.
1832
-      -* | +*)
1833
-	# Unknown arguments in both finalize_command and compile_command need
1834
-	# to be aesthetically quoted because they are evaled later.
1835
-	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1836
-	case $arg in
1837
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
1838
-	  arg="\"$arg\""
1839
-	  ;;
1840
-	esac
1841
-	;;
1842
-
1843
-      *.$objext)
1844
-	# A standard object.
1845
-	objs="$objs $arg"
1846
-	;;
1847
-
1848
-      *.lo)
1849
-	# A libtool-controlled object.
1850
-
1851
-	# Check to see that this really is a libtool object.
1852
-	if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1853
-	  pic_object=
1854
-	  non_pic_object=
1855
-
1856
-	  # Read the .lo file
1857
-	  # If there is no directory component, then add one.
1858
-	  case $arg in
1859
-	  */* | *\\*) . $arg ;;
1860
-	  *) . ./$arg ;;
1861
-	  esac
1862
-
1863
-	  if test -z "$pic_object" || \
1864
-	     test -z "$non_pic_object" ||
1865
-	     test "$pic_object" = none && \
1866
-	     test "$non_pic_object" = none; then
1867
-	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1868
-	    exit $EXIT_FAILURE
1869
-	  fi
1870
-
1871
-	  # Extract subdirectory from the argument.
1872
-	  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1873
-	  if test "X$xdir" = "X$arg"; then
1874
-	    xdir=
1875
- 	  else
1876
-	    xdir="$xdir/"
1877
-	  fi
1878
-
1879
-	  if test "$pic_object" != none; then
1880
-	    # Prepend the subdirectory the object is found in.
1881
-	    pic_object="$xdir$pic_object"
1882
-
1883
-	    if test "$prev" = dlfiles; then
1884
-	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1885
-		dlfiles="$dlfiles $pic_object"
1886
-		prev=
1887
-		continue
1888
-	      else
1889
-		# If libtool objects are unsupported, then we need to preload.
1890
-		prev=dlprefiles
1891
-	      fi
1892
-	    fi
1893
-
1894
-	    # CHECK ME:  I think I busted this.  -Ossama
1895
-	    if test "$prev" = dlprefiles; then
1896
-	      # Preload the old-style object.
1897
-	      dlprefiles="$dlprefiles $pic_object"
1898
-	      prev=
1899
-	    fi
1900
-
1901
-	    # A PIC object.
1902
-	    libobjs="$libobjs $pic_object"
1903
-	    arg="$pic_object"
1904
-	  fi
1905
-
1906
-	  # Non-PIC object.
1907
-	  if test "$non_pic_object" != none; then
1908
-	    # Prepend the subdirectory the object is found in.
1909
-	    non_pic_object="$xdir$non_pic_object"
1910
-
1911
-	    # A standard non-PIC object
1912
-	    non_pic_objects="$non_pic_objects $non_pic_object"
1913
-	    if test -z "$pic_object" || test "$pic_object" = none ; then
1914
-	      arg="$non_pic_object"
1915
-	    fi
1916
-	  else
1917
-	    # If the PIC object exists, use it instead.
1918
-	    # $xdir was prepended to $pic_object above.
1919
-	    non_pic_object="$pic_object"
1920
-	    non_pic_objects="$non_pic_objects $non_pic_object"
1921
-	  fi
1922
-	else
1923
-	  # Only an error if not doing a dry-run.
1924
-	  if test -z "$run"; then
1925
-	    $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1926
-	    exit $EXIT_FAILURE
1927
-	  else
1928
-	    # Dry-run case.
1929
-
1930
-	    # Extract subdirectory from the argument.
1931
-	    xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1932
-	    if test "X$xdir" = "X$arg"; then
1933
-	      xdir=
1934
-	    else
1935
-	      xdir="$xdir/"
1936
-	    fi
1937
-
1938
-	    pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1939
-	    non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1940
-	    libobjs="$libobjs $pic_object"
1941
-	    non_pic_objects="$non_pic_objects $non_pic_object"
1942
-	  fi
1943
-	fi
1944
-	;;
1945
-
1946
-      *.$libext)
1947
-	# An archive.
1948
-	deplibs="$deplibs $arg"
1949
-	old_deplibs="$old_deplibs $arg"
1950
-	continue
1951
-	;;
1952
-
1953
-      *.la)
1954
-	# A libtool-controlled library.
1955
-
1956
-	if test "$prev" = dlfiles; then
1957
-	  # This library was specified with -dlopen.
1958
-	  dlfiles="$dlfiles $arg"
1959
-	  prev=
1960
-	elif test "$prev" = dlprefiles; then
1961
-	  # The library was specified with -dlpreopen.
1962
-	  dlprefiles="$dlprefiles $arg"
1963
-	  prev=
1964
-	else
1965
-	  deplibs="$deplibs $arg"
1966
-	fi
1967
-	continue
1968
-	;;
1969
-
1970
-      # Some other compiler argument.
1971
-      *)
1972
-	# Unknown arguments in both finalize_command and compile_command need
1973
-	# to be aesthetically quoted because they are evaled later.
1974
-	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1975
-	case $arg in
1976
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
1977
-	  arg="\"$arg\""
1978
-	  ;;
1979
-	esac
1980
-	;;
1981
-      esac # arg
1982
-
1983
-      # Now actually substitute the argument into the commands.
1984
-      if test -n "$arg"; then
1985
-	compile_command="$compile_command $arg"
1986
-	finalize_command="$finalize_command $arg"
1987
-      fi
1988
-    done # argument parsing loop
1989
-
1990
-    if test -n "$prev"; then
1991
-      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
1992
-      $echo "$help" 1>&2
1993
-      exit $EXIT_FAILURE
1994
-    fi
1995
-
1996
-    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
1997
-      eval arg=\"$export_dynamic_flag_spec\"
1998
-      compile_command="$compile_command $arg"
1999
-      finalize_command="$finalize_command $arg"
2000
-    fi
2001
-
2002
-    oldlibs=
2003
-    # calculate the name of the file, without its directory
2004
-    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
2005
-    libobjs_save="$libobjs"
2006
-
2007
-    if test -n "$shlibpath_var"; then
2008
-      # get the directories listed in $shlibpath_var
2009
-      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
2010
-    else
2011
-      shlib_search_path=
2012
-    fi
2013
-    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
2014
-    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
2015
-
2016
-    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2017
-    if test "X$output_objdir" = "X$output"; then
2018
-      output_objdir="$objdir"
2019
-    else
2020
-      output_objdir="$output_objdir/$objdir"
2021
-    fi
2022
-    # Create the object directory.
2023
-    if test ! -d "$output_objdir"; then
2024
-      $show "$mkdir $output_objdir"
2025
-      $run $mkdir $output_objdir
2026
-      exit_status=$?
2027
-      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
2028
-	exit $exit_status
2029
-      fi
2030
-    fi
2031
-
2032
-    # Determine the type of output
2033
-    case $output in
2034
-    "")
2035
-      $echo "$modename: you must specify an output file" 1>&2
2036
-      $echo "$help" 1>&2
2037
-      exit $EXIT_FAILURE
2038
-      ;;
2039
-    *.$libext) linkmode=oldlib ;;
2040
-    *.lo | *.$objext) linkmode=obj ;;
2041
-    *.la) linkmode=lib ;;
2042
-    *) linkmode=prog ;; # Anything else should be a program.
2043
-    esac
2044
-
2045
-    case $host in
2046
-    *cygwin* | *mingw* | *pw32*)
2047
-      # don't eliminate duplications in $postdeps and $predeps
2048
-      duplicate_compiler_generated_deps=yes
2049
-      ;;
2050
-    *)
2051
-      duplicate_compiler_generated_deps=$duplicate_deps
2052
-      ;;
2053
-    esac
2054
-    specialdeplibs=
2055
-
2056
-    libs=
2057
-    # Find all interdependent deplibs by searching for libraries
2058
-    # that are linked more than once (e.g. -la -lb -la)
2059
-    for deplib in $deplibs; do
2060
-      if test "X$duplicate_deps" = "Xyes" ; then
2061
-	case "$libs " in
2062
-	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2063
-	esac
2064
-      fi
2065
-      libs="$libs $deplib"
2066
-    done
2067
-
2068
-    if test "$linkmode" = lib; then
2069
-      libs="$predeps $libs $compiler_lib_search_path $postdeps"
2070
-
2071
-      # Compute libraries that are listed more than once in $predeps
2072
-      # $postdeps and mark them as special (i.e., whose duplicates are
2073
-      # not to be eliminated).
2074
-      pre_post_deps=
2075
-      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2076
-	for pre_post_dep in $predeps $postdeps; do
2077
-	  case "$pre_post_deps " in
2078
-	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
2079
-	  esac
2080
-	  pre_post_deps="$pre_post_deps $pre_post_dep"
2081
-	done
2082
-      fi
2083
-      pre_post_deps=
2084
-    fi
2085
-
2086
-    deplibs=
2087
-    newdependency_libs=
2088
-    newlib_search_path=
2089
-    need_relink=no # whether we're linking any uninstalled libtool libraries
2090
-    notinst_deplibs= # not-installed libtool libraries
2091
-    case $linkmode in
2092
-    lib)
2093
-	passes="conv link"
2094
-	for file in $dlfiles $dlprefiles; do
2095
-	  case $file in
2096
-	  *.la) ;;
2097
-	  *)
2098
-	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2099
-	    exit $EXIT_FAILURE
2100
-	    ;;
2101
-	  esac
2102
-	done
2103
-	;;
2104
-    prog)
2105
-	compile_deplibs=
2106
-	finalize_deplibs=
2107
-	alldeplibs=no
2108
-	newdlfiles=
2109
-	newdlprefiles=
2110
-	passes="conv scan dlopen dlpreopen link"
2111
-	;;
2112
-    *)  passes="conv"
2113
-	;;
2114
-    esac
2115
-    for pass in $passes; do
2116
-      if test "$linkmode,$pass" = "lib,link" ||
2117
-	 test "$linkmode,$pass" = "prog,scan"; then
2118
-	libs="$deplibs"
2119
-	deplibs=
2120
-      fi
2121
-      if test "$linkmode" = prog; then
2122
-	case $pass in
2123
-	dlopen) libs="$dlfiles" ;;
2124
-	dlpreopen) libs="$dlprefiles" ;;
2125
-	link)
2126
-	  libs="$deplibs %DEPLIBS%"
2127
-	  test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
2128
-	  ;;
2129
-	esac
2130
-      fi
2131
-      if test "$pass" = dlopen; then
2132
-	# Collect dlpreopened libraries
2133
-	save_deplibs="$deplibs"
2134
-	deplibs=
2135
-      fi
2136
-      for deplib in $libs; do
2137
-	lib=
2138
-	found=no
2139
-	case $deplib in
2140
-	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
2141
-	  if test "$linkmode,$pass" = "prog,link"; then
2142
-	    compile_deplibs="$deplib $compile_deplibs"
2143
-	    finalize_deplibs="$deplib $finalize_deplibs"
2144
-	  else
2145
-	    compiler_flags="$compiler_flags $deplib"
2146
-	  fi
2147
-	  continue
2148
-	  ;;
2149
-	-l*)
2150
-	  if test "$linkmode" != lib && test "$linkmode" != prog; then
2151
-	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2152
-	    continue
2153
-	  fi
2154
-	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2155
-	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2156
-	    for search_ext in .la $std_shrext .so .a; do
2157
-	      # Search the libtool library
2158
-	      lib="$searchdir/lib${name}${search_ext}"
2159
-	      if test -f "$lib"; then
2160
-		if test "$search_ext" = ".la"; then
2161
-		  found=yes
2162
-		else
2163
-		  found=no
2164
-		fi
2165
-		break 2
2166
-	      fi
2167
-	    done
2168
-	  done
2169
-	  if test "$found" != yes; then
2170
-	    # deplib doesn't seem to be a libtool library
2171
-	    if test "$linkmode,$pass" = "prog,link"; then
2172
-	      compile_deplibs="$deplib $compile_deplibs"
2173
-	      finalize_deplibs="$deplib $finalize_deplibs"
2174
-	    else
2175
-	      deplibs="$deplib $deplibs"
2176
-	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2177
-	    fi
2178
-	    continue
2179
-	  else # deplib is a libtool library
2180
-	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2181
-	    # We need to do some special things here, and not later.
2182
-	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2183
-	      case " $predeps $postdeps " in
2184
-	      *" $deplib "*)
2185
-		if (${SED} -e '2q' $lib |
2186
-                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
2187
-		  library_names=
2188
-		  old_library=
2189
-		  case $lib in
2190
-		  */* | *\\*) . $lib ;;
2191
-		  *) . ./$lib ;;
2192
-		  esac
2193
-		  for l in $old_library $library_names; do
2194
-		    ll="$l"
2195
-		  done
2196
-		  if test "X$ll" = "X$old_library" ; then # only static version available
2197
-		    found=no
2198
-		    ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2199
-		    test "X$ladir" = "X$lib" && ladir="."
2200
-		    lib=$ladir/$old_library
2201
-		    if test "$linkmode,$pass" = "prog,link"; then
2202
-		      compile_deplibs="$deplib $compile_deplibs"
2203
-		      finalize_deplibs="$deplib $finalize_deplibs"
2204
-		    else
2205
-		      deplibs="$deplib $deplibs"
2206
-		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2207
-		    fi
2208
-		    continue
2209
-		  fi
2210
-		fi
2211
-	        ;;
2212
-	      *) ;;
2213
-	      esac
2214
-	    fi
2215
-	  fi
2216
-	  ;; # -l
2217
-	-L*)
2218
-	  case $linkmode in
2219
-	  lib)
2220
-	    deplibs="$deplib $deplibs"
2221
-	    test "$pass" = conv && continue
2222
-	    newdependency_libs="$deplib $newdependency_libs"
2223
-	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2224
-	    ;;
2225
-	  prog)
2226
-	    if test "$pass" = conv; then
2227
-	      deplibs="$deplib $deplibs"
2228
-	      continue
2229
-	    fi
2230
-	    if test "$pass" = scan; then
2231
-	      deplibs="$deplib $deplibs"
2232
-	    else
2233
-	      compile_deplibs="$deplib $compile_deplibs"
2234
-	      finalize_deplibs="$deplib $finalize_deplibs"
2235
-	    fi
2236
-	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2237
-	    ;;
2238
-	  *)
2239
-	    $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2240
-	    ;;
2241
-	  esac # linkmode
2242
-	  continue
2243
-	  ;; # -L
2244
-	-R*)
2245
-	  if test "$pass" = link; then
2246
-	    dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2247
-	    # Make sure the xrpath contains only unique directories.
2248
-	    case "$xrpath " in
2249
-	    *" $dir "*) ;;
2250
-	    *) xrpath="$xrpath $dir" ;;
2251
-	    esac
2252
-	  fi
2253
-	  deplibs="$deplib $deplibs"
2254
-	  continue
2255
-	  ;;
2256
-	*.la) lib="$deplib" ;;
2257
-	*.$libext)
2258
-	  if test "$pass" = conv; then
2259
-	    deplibs="$deplib $deplibs"
2260
-	    continue
2261
-	  fi
2262
-	  case $linkmode in
2263
-	  lib)
2264
-	    valid_a_lib=no
2265
-	    case $deplibs_check_method in
2266
-	      match_pattern*)
2267
-		set dummy $deplibs_check_method
2268
-	        match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2269
-		if eval $echo \"$deplib\" 2>/dev/null \
2270
-		    | $SED 10q \
2271
-		    | $EGREP "$match_pattern_regex" > /dev/null; then
2272
-		  valid_a_lib=yes
2273
-		fi
2274
-		;;
2275
-	      pass_all)
2276
-		valid_a_lib=yes
2277
-		;;
2278
-            esac
2279
-	    if test "$valid_a_lib" != yes; then
2280
-	      $echo
2281
-	      $echo "*** Warning: Trying to link with static lib archive $deplib."
2282
-	      $echo "*** I have the capability to make that library automatically link in when"
2283
-	      $echo "*** you link to this library.  But I can only do this if you have a"
2284
-	      $echo "*** shared version of the library, which you do not appear to have"
2285
-	      $echo "*** because the file extensions .$libext of this argument makes me believe"
2286
-	      $echo "*** that it is just a static archive that I should not used here."
2287
-	    else
2288
-	      $echo
2289
-	      $echo "*** Warning: Linking the shared library $output against the"
2290
-	      $echo "*** static library $deplib is not portable!"
2291
-	      deplibs="$deplib $deplibs"
2292
-	    fi
2293
-	    continue
2294
-	    ;;
2295
-	  prog)
2296
-	    if test "$pass" != link; then
2297
-	      deplibs="$deplib $deplibs"
2298
-	    else
2299
-	      compile_deplibs="$deplib $compile_deplibs"
2300
-	      finalize_deplibs="$deplib $finalize_deplibs"
2301
-	    fi
2302
-	    continue
2303
-	    ;;
2304
-	  esac # linkmode
2305
-	  ;; # *.$libext
2306
-	*.lo | *.$objext)
2307
-	  if test "$pass" = conv; then
2308
-	    deplibs="$deplib $deplibs"
2309
-	  elif test "$linkmode" = prog; then
2310
-	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
2311
-	      # If there is no dlopen support or we're linking statically,
2312
-	      # we need to preload.
2313
-	      newdlprefiles="$newdlprefiles $deplib"
2314
-	      compile_deplibs="$deplib $compile_deplibs"
2315
-	      finalize_deplibs="$deplib $finalize_deplibs"
2316
-	    else
2317
-	      newdlfiles="$newdlfiles $deplib"
2318
-	    fi
2319
-	  fi
2320
-	  continue
2321
-	  ;;
2322
-	%DEPLIBS%)
2323
-	  alldeplibs=yes
2324
-	  continue
2325
-	  ;;
2326
-	esac # case $deplib
2327
-	if test "$found" = yes || test -f "$lib"; then :
2328
-	else
2329
-	  $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
2330
-	  exit $EXIT_FAILURE
2331
-	fi
2332
-
2333
-	# Check to see that this really is a libtool archive.
2334
-	if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
2335
-	else
2336
-	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2337
-	  exit $EXIT_FAILURE
2338
-	fi
2339
-
2340
-	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2341
-	test "X$ladir" = "X$lib" && ladir="."
2342
-
2343
-	dlname=
2344
-	dlopen=
2345
-	dlpreopen=
2346
-	libdir=
2347
-	library_names=
2348
-	old_library=
2349
-	# If the library was installed with an old release of libtool,
2350
-	# it will not redefine variables installed, or shouldnotlink
2351
-	installed=yes
2352
-	shouldnotlink=no
2353
-	avoidtemprpath=
2354
-
2355
-
2356
-	# Read the .la file
2357
-	case $lib in
2358
-	*/* | *\\*) . $lib ;;
2359
-	*) . ./$lib ;;
2360
-	esac
2361
-
2362
-	if test "$linkmode,$pass" = "lib,link" ||
2363
-	   test "$linkmode,$pass" = "prog,scan" ||
2364
-	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
2365
-	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
2366
-	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
2367
-	fi
2368
-
2369
-	if test "$pass" = conv; then
2370
-	  # Only check for convenience libraries
2371
-	  deplibs="$lib $deplibs"
2372
-	  if test -z "$libdir"; then
2373
-	    if test -z "$old_library"; then
2374
-	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2375
-	      exit $EXIT_FAILURE
2376
-	    fi
2377
-	    # It is a libtool convenience library, so add in its objects.
2378
-	    convenience="$convenience $ladir/$objdir/$old_library"
2379
-	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
2380
-	    tmp_libs=
2381
-	    for deplib in $dependency_libs; do
2382
-	      deplibs="$deplib $deplibs"
2383
-              if test "X$duplicate_deps" = "Xyes" ; then
2384
-	        case "$tmp_libs " in
2385
-	        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2386
-	        esac
2387
-              fi
2388
-	      tmp_libs="$tmp_libs $deplib"
2389
-	    done
2390
-	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
2391
-	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
2392
-	    exit $EXIT_FAILURE
2393
-	  fi
2394
-	  continue
2395
-	fi # $pass = conv
2396
-
2397
-
2398
-	# Get the name of the library we link against.
2399
-	linklib=
2400
-	for l in $old_library $library_names; do
2401
-	  linklib="$l"
2402
-	done
2403
-	if test -z "$linklib"; then
2404
-	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2405
-	  exit $EXIT_FAILURE
2406
-	fi
2407
-
2408
-	# This library was specified with -dlopen.
2409
-	if test "$pass" = dlopen; then
2410
-	  if test -z "$libdir"; then
2411
-	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2412
-	    exit $EXIT_FAILURE
2413
-	  fi
2414
-	  if test -z "$dlname" ||
2415
-	     test "$dlopen_support" != yes ||
2416
-	     test "$build_libtool_libs" = no; then
2417
-	    # If there is no dlname, no dlopen support or we're linking
2418
-	    # statically, we need to preload.  We also need to preload any
2419
-	    # dependent libraries so libltdl's deplib preloader doesn't
2420
-	    # bomb out in the load deplibs phase.
2421
-	    dlprefiles="$dlprefiles $lib $dependency_libs"
2422
-	  else
2423
-	    newdlfiles="$newdlfiles $lib"
2424
-	  fi
2425
-	  continue
2426
-	fi # $pass = dlopen
2427
-
2428
-	# We need an absolute path.
2429
-	case $ladir in
2430
-	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
2431
-	*)
2432
-	  abs_ladir=`cd "$ladir" && pwd`
2433
-	  if test -z "$abs_ladir"; then
2434
-	    $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2435
-	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2436
-	    abs_ladir="$ladir"
2437
-	  fi
2438
-	  ;;
2439
-	esac
2440
-	laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2441
-
2442
-	# Find the relevant object directory and library name.
2443
-	if test "X$installed" = Xyes; then
2444
-	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2445
-	    $echo "$modename: warning: library \`$lib' was moved." 1>&2
2446
-	    dir="$ladir"
2447
-	    absdir="$abs_ladir"
2448
-	    libdir="$abs_ladir"
2449
-	  else
2450
-	    dir="$libdir"
2451
-	    absdir="$libdir"
2452
-	  fi
2453
-	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
2454
-	else
2455
-	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2456
-	    dir="$ladir"
2457
-	    absdir="$abs_ladir"
2458
-	    # Remove this search path later
2459
-	    notinst_path="$notinst_path $abs_ladir"
2460
-	  else
2461
-	    dir="$ladir/$objdir"
2462
-	    absdir="$abs_ladir/$objdir"
2463
-	    # Remove this search path later
2464
-	    notinst_path="$notinst_path $abs_ladir"
2465
-	  fi
2466
-	fi # $installed = yes
2467
-	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2468
-
2469
-	# This library was specified with -dlpreopen.
2470
-	if test "$pass" = dlpreopen; then
2471
-	  if test -z "$libdir"; then
2472
-	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2473
-	    exit $EXIT_FAILURE
2474
-	  fi
2475
-	  # Prefer using a static library (so that no silly _DYNAMIC symbols
2476
-	  # are required to link).
2477
-	  if test -n "$old_library"; then
2478
-	    newdlprefiles="$newdlprefiles $dir/$old_library"
2479
-	  # Otherwise, use the dlname, so that lt_dlopen finds it.
2480
-	  elif test -n "$dlname"; then
2481
-	    newdlprefiles="$newdlprefiles $dir/$dlname"
2482
-	  else
2483
-	    newdlprefiles="$newdlprefiles $dir/$linklib"
2484
-	  fi
2485
-	fi # $pass = dlpreopen
2486
-
2487
-	if test -z "$libdir"; then
2488
-	  # Link the convenience library
2489
-	  if test "$linkmode" = lib; then
2490
-	    deplibs="$dir/$old_library $deplibs"
2491
-	  elif test "$linkmode,$pass" = "prog,link"; then
2492
-	    compile_deplibs="$dir/$old_library $compile_deplibs"
2493
-	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
2494
-	  else
2495
-	    deplibs="$lib $deplibs" # used for prog,scan pass
2496
-	  fi
2497
-	  continue
2498
-	fi
2499
-
2500
-
2501
-	if test "$linkmode" = prog && test "$pass" != link; then
2502
-	  newlib_search_path="$newlib_search_path $ladir"
2503
-	  deplibs="$lib $deplibs"
2504
-
2505
-	  linkalldeplibs=no
2506
-	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
2507
-	     test "$build_libtool_libs" = no; then
2508
-	    linkalldeplibs=yes
2509
-	  fi
2510
-
2511
-	  tmp_libs=
2512
-	  for deplib in $dependency_libs; do
2513
-	    case $deplib in
2514
-	    -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2515
-	    esac
2516
-	    # Need to link against all dependency_libs?
2517
-	    if test "$linkalldeplibs" = yes; then
2518
-	      deplibs="$deplib $deplibs"
2519
-	    else
2520
-	      # Need to hardcode shared library paths
2521
-	      # or/and link against static libraries
2522
-	      newdependency_libs="$deplib $newdependency_libs"
2523
-	    fi
2524
-	    if test "X$duplicate_deps" = "Xyes" ; then
2525
-	      case "$tmp_libs " in
2526
-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2527
-	      esac
2528
-	    fi
2529
-	    tmp_libs="$tmp_libs $deplib"
2530
-	  done # for deplib
2531
-	  continue
2532
-	fi # $linkmode = prog...
2533
-
2534
-	if test "$linkmode,$pass" = "prog,link"; then
2535
-	  if test -n "$library_names" &&
2536
-	     { { test "$prefer_static_libs" = no ||
2537
-		 test "$prefer_static_libs,$installed" = "built,yes"; } ||
2538
-	       test -z "$old_library"; }; then
2539
-	    # We need to hardcode the library path
2540
-	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2541
-	      # Make sure the rpath contains only unique directories.
2542
-	      case "$temp_rpath " in
2543
-	      *" $dir "*) ;;
2544
-	      *" $absdir "*) ;;
2545
-	      *) temp_rpath="$temp_rpath $absdir" ;;
2546
-	      esac
2547
-	    fi
2548
-
2549
-	    # Hardcode the library path.
2550
-	    # Skip directories that are in the system default run-time
2551
-	    # search path.
2552
-	    case " $sys_lib_dlsearch_path " in
2553
-	    *" $absdir "*) ;;
2554
-	    *)
2555
-	      case "$compile_rpath " in
2556
-	      *" $absdir "*) ;;
2557
-	      *) compile_rpath="$compile_rpath $absdir"
2558
-	      esac
2559
-	      ;;
2560
-	    esac
2561
-	    case " $sys_lib_dlsearch_path " in
2562
-	    *" $libdir "*) ;;
2563
-	    *)
2564
-	      case "$finalize_rpath " in
2565
-	      *" $libdir "*) ;;
2566
-	      *) finalize_rpath="$finalize_rpath $libdir"
2567
-	      esac
2568
-	      ;;
2569
-	    esac
2570
-	  fi # $linkmode,$pass = prog,link...
2571
-
2572
-	  if test "$alldeplibs" = yes &&
2573
-	     { test "$deplibs_check_method" = pass_all ||
2574
-	       { test "$build_libtool_libs" = yes &&
2575
-		 test -n "$library_names"; }; }; then
2576
-	    # We only need to search for static libraries
2577
-	    continue
2578
-	  fi
2579
-	fi
2580
-
2581
-	link_static=no # Whether the deplib will be linked statically
2582
-	use_static_libs=$prefer_static_libs
2583
-	if test "$use_static_libs" = built && test "$installed" = yes ; then
2584
-	  use_static_libs=no
2585
-	fi
2586
-	if test -n "$library_names" &&
2587
-	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
2588
-	  if test "$installed" = no; then
2589
-	    notinst_deplibs="$notinst_deplibs $lib"
2590
-	    need_relink=yes
2591
-	  fi
2592
-	  # This is a shared library
2593
-
2594
-	  # Warn about portability, can't link against -module's on
2595
-	  # some systems (darwin)
2596
-	  if test "$shouldnotlink" = yes && test "$pass" = link ; then
2597
-	    $echo
2598
-	    if test "$linkmode" = prog; then
2599
-	      $echo "*** Warning: Linking the executable $output against the loadable module"
2600
-	    else
2601
-	      $echo "*** Warning: Linking the shared library $output against the loadable module"
2602
-	    fi
2603
-	    $echo "*** $linklib is not portable!"
2604
-	  fi
2605
-	  if test "$linkmode" = lib &&
2606
-	     test "$hardcode_into_libs" = yes; then
2607
-	    # Hardcode the library path.
2608
-	    # Skip directories that are in the system default run-time
2609
-	    # search path.
2610
-	    case " $sys_lib_dlsearch_path " in
2611
-	    *" $absdir "*) ;;
2612
-	    *)
2613
-	      case "$compile_rpath " in
2614
-	      *" $absdir "*) ;;
2615
-	      *) compile_rpath="$compile_rpath $absdir"
2616
-	      esac
2617
-	      ;;
2618
-	    esac
2619
-	    case " $sys_lib_dlsearch_path " in
2620
-	    *" $libdir "*) ;;
2621
-	    *)
2622
-	      case "$finalize_rpath " in
2623
-	      *" $libdir "*) ;;
2624
-	      *) finalize_rpath="$finalize_rpath $libdir"
2625
-	      esac
2626
-	      ;;
2627
-	    esac
2628
-	  fi
2629
-
2630
-	  if test -n "$old_archive_from_expsyms_cmds"; then
2631
-	    # figure out the soname
2632
-	    set dummy $library_names
2633
-	    realname="$2"
2634
-	    shift; shift
2635
-	    libname=`eval \\$echo \"$libname_spec\"`
2636
-	    # use dlname if we got it. it's perfectly good, no?
2637
-	    if test -n "$dlname"; then
2638
-	      soname="$dlname"
2639
-	    elif test -n "$soname_spec"; then
2640
-	      # bleh windows
2641
-	      case $host in
2642
-	      *cygwin* | mingw*)
2643
-		major=`expr $current - $age`
2644
-		versuffix="-$major"
2645
-		;;
2646
-	      esac
2647
-	      eval soname=\"$soname_spec\"
2648
-	    else
2649
-	      soname="$realname"
2650
-	    fi
2651
-
2652
-	    # Make a new name for the extract_expsyms_cmds to use
2653
-	    soroot="$soname"
2654
-	    soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
2655
-	    newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
2656
-
2657
-	    # If the library has no export list, then create one now
2658
-	    if test -f "$output_objdir/$soname-def"; then :
2659
-	    else
2660
-	      $show "extracting exported symbol list from \`$soname'"
2661
-	      save_ifs="$IFS"; IFS='~'
2662
-	      cmds=$extract_expsyms_cmds
2663
-	      for cmd in $cmds; do
2664
-		IFS="$save_ifs"
2665
-		eval cmd=\"$cmd\"
2666
-		$show "$cmd"
2667
-		$run eval "$cmd" || exit $?
2668
-	      done
2669
-	      IFS="$save_ifs"
2670
-	    fi
2671
-
2672
-	    # Create $newlib
2673
-	    if test -f "$output_objdir/$newlib"; then :; else
2674
-	      $show "generating import library for \`$soname'"
2675
-	      save_ifs="$IFS"; IFS='~'
2676
-	      cmds=$old_archive_from_expsyms_cmds
2677
-	      for cmd in $cmds; do
2678
-		IFS="$save_ifs"
2679
-		eval cmd=\"$cmd\"
2680
-		$show "$cmd"
2681
-		$run eval "$cmd" || exit $?
2682
-	      done
2683
-	      IFS="$save_ifs"
2684
-	    fi
2685
-	    # make sure the library variables are pointing to the new library
2686
-	    dir=$output_objdir
2687
-	    linklib=$newlib
2688
-	  fi # test -n "$old_archive_from_expsyms_cmds"
2689
-
2690
-	  if test "$linkmode" = prog || test "$mode" != relink; then
2691
-	    add_shlibpath=
2692
-	    add_dir=
2693
-	    add=
2694
-	    lib_linked=yes
2695
-	    case $hardcode_action in
2696
-	    immediate | unsupported)
2697
-	      if test "$hardcode_direct" = no; then
2698
-		add="$dir/$linklib"
2699
-		case $host in
2700
-		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
2701
-		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
2702
-		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
2703
-		    *-*-unixware7*) add_dir="-L$dir" ;;
2704
-		  *-*-darwin* )
2705
-		    # if the lib is a module then we can not link against
2706
-		    # it, someone is ignoring the new warnings I added
2707
-		    if /usr/bin/file -L $add 2> /dev/null |
2708
-                      $EGREP ": [^:]* bundle" >/dev/null ; then
2709
-		      $echo "** Warning, lib $linklib is a module, not a shared library"
2710
-		      if test -z "$old_library" ; then
2711
-		        $echo
2712
-		        $echo "** And there doesn't seem to be a static archive available"
2713
-		        $echo "** The link will probably fail, sorry"
2714
-		      else
2715
-		        add="$dir/$old_library"
2716
-		      fi
2717
-		    fi
2718
-		esac
2719
-	      elif test "$hardcode_minus_L" = no; then
2720
-		case $host in
2721
-		*-*-sunos*) add_shlibpath="$dir" ;;
2722
-		esac
2723
-		add_dir="-L$dir"
2724
-		add="-l$name"
2725
-	      elif test "$hardcode_shlibpath_var" = no; then
2726
-		add_shlibpath="$dir"
2727
-		add="-l$name"
2728
-	      else
2729
-		lib_linked=no
2730
-	      fi
2731
-	      ;;
2732
-	    relink)
2733
-	      if test "$hardcode_direct" = yes; then
2734
-		add="$dir/$linklib"
2735
-	      elif test "$hardcode_minus_L" = yes; then
2736
-		add_dir="-L$dir"
2737
-		# Try looking first in the location we're being installed to.
2738
-		if test -n "$inst_prefix_dir"; then
2739
-		  case $libdir in
2740
-		    [\\/]*)
2741
-		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
2742
-		      ;;
2743
-		  esac
2744
-		fi
2745
-		add="-l$name"
2746
-	      elif test "$hardcode_shlibpath_var" = yes; then
2747
-		add_shlibpath="$dir"
2748
-		add="-l$name"
2749
-	      else
2750
-		lib_linked=no
2751
-	      fi
2752
-	      ;;
2753
-	    *) lib_linked=no ;;
2754
-	    esac
2755
-
2756
-	    if test "$lib_linked" != yes; then
2757
-	      $echo "$modename: configuration error: unsupported hardcode properties"
2758
-	      exit $EXIT_FAILURE
2759
-	    fi
2760
-
2761
-	    if test -n "$add_shlibpath"; then
2762
-	      case :$compile_shlibpath: in
2763
-	      *":$add_shlibpath:"*) ;;
2764
-	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
2765
-	      esac
2766
-	    fi
2767
-	    if test "$linkmode" = prog; then
2768
-	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
2769
-	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
2770
-	    else
2771
-	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
2772
-	      test -n "$add" && deplibs="$add $deplibs"
2773
-	      if test "$hardcode_direct" != yes && \
2774
-		 test "$hardcode_minus_L" != yes && \
2775
-		 test "$hardcode_shlibpath_var" = yes; then
2776
-		case :$finalize_shlibpath: in
2777
-		*":$libdir:"*) ;;
2778
-		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2779
-		esac
2780
-	      fi
2781
-	    fi
2782
-	  fi
2783
-
2784
-	  if test "$linkmode" = prog || test "$mode" = relink; then
2785
-	    add_shlibpath=
2786
-	    add_dir=
2787
-	    add=
2788
-	    # Finalize command for both is simple: just hardcode it.
2789
-	    if test "$hardcode_direct" = yes; then
2790
-	      add="$libdir/$linklib"
2791
-	    elif test "$hardcode_minus_L" = yes; then
2792
-	      add_dir="-L$libdir"
2793
-	      add="-l$name"
2794
-	    elif test "$hardcode_shlibpath_var" = yes; then
2795
-	      case :$finalize_shlibpath: in
2796
-	      *":$libdir:"*) ;;
2797
-	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2798
-	      esac
2799
-	      add="-l$name"
2800
-	    elif test "$hardcode_automatic" = yes; then
2801
-	      if test -n "$inst_prefix_dir" &&
2802
-		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
2803
-	        add="$inst_prefix_dir$libdir/$linklib"
2804
-	      else
2805
-	        add="$libdir/$linklib"
2806
-	      fi
2807
-	    else
2808
-	      # We cannot seem to hardcode it, guess we'll fake it.
2809
-	      add_dir="-L$libdir"
2810
-	      # Try looking first in the location we're being installed to.
2811
-	      if test -n "$inst_prefix_dir"; then
2812
-		case $libdir in
2813
-		  [\\/]*)
2814
-		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
2815
-		    ;;
2816
-		esac
2817
-	      fi
2818
-	      add="-l$name"
2819
-	    fi
2820
-
2821
-	    if test "$linkmode" = prog; then
2822
-	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
2823
-	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
2824
-	    else
2825
-	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
2826
-	      test -n "$add" && deplibs="$add $deplibs"
2827
-	    fi
2828
-	  fi
2829
-	elif test "$linkmode" = prog; then
2830
-	  # Here we assume that one of hardcode_direct or hardcode_minus_L
2831
-	  # is not unsupported.  This is valid on all known static and
2832
-	  # shared platforms.
2833
-	  if test "$hardcode_direct" != unsupported; then
2834
-	    test -n "$old_library" && linklib="$old_library"
2835
-	    compile_deplibs="$dir/$linklib $compile_deplibs"
2836
-	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
2837
-	  else
2838
-	    compile_deplibs="-l$name -L$dir $compile_deplibs"
2839
-	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
2840
-	  fi
2841
-	elif test "$build_libtool_libs" = yes; then
2842
-	  # Not a shared library
2843
-	  if test "$deplibs_check_method" != pass_all; then
2844
-	    # We're trying link a shared library against a static one
2845
-	    # but the system doesn't support it.
2846
-
2847
-	    # Just print a warning and add the library to dependency_libs so
2848
-	    # that the program can be linked against the static library.
2849
-	    $echo
2850
-	    $echo "*** Warning: This system can not link to static lib archive $lib."
2851
-	    $echo "*** I have the capability to make that library automatically link in when"
2852
-	    $echo "*** you link to this library.  But I can only do this if you have a"
2853
-	    $echo "*** shared version of the library, which you do not appear to have."
2854
-	    if test "$module" = yes; then
2855
-	      $echo "*** But as you try to build a module library, libtool will still create "
2856
-	      $echo "*** a static module, that should work as long as the dlopening application"
2857
-	      $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
2858
-	      if test -z "$global_symbol_pipe"; then
2859
-		$echo
2860
-		$echo "*** However, this would only work if libtool was able to extract symbol"
2861
-		$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2862
-		$echo "*** not find such a program.  So, this module is probably useless."
2863
-		$echo "*** \`nm' from GNU binutils and a full rebuild may help."
2864
-	      fi
2865
-	      if test "$build_old_libs" = no; then
2866
-		build_libtool_libs=module
2867
-		build_old_libs=yes
2868
-	      else
2869
-		build_libtool_libs=no
2870
-	      fi
2871
-	    fi
2872
-	  else
2873
-	    deplibs="$dir/$old_library $deplibs"
2874
-	    link_static=yes
2875
-	  fi
2876
-	fi # link shared/static library?
2877
-
2878
-	if test "$linkmode" = lib; then
2879
-	  if test -n "$dependency_libs" &&
2880
-	     { test "$hardcode_into_libs" != yes ||
2881
-	       test "$build_old_libs" = yes ||
2882
-	       test "$link_static" = yes; }; then
2883
-	    # Extract -R from dependency_libs
2884
-	    temp_deplibs=
2885
-	    for libdir in $dependency_libs; do
2886
-	      case $libdir in
2887
-	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
2888
-		   case " $xrpath " in
2889
-		   *" $temp_xrpath "*) ;;
2890
-		   *) xrpath="$xrpath $temp_xrpath";;
2891
-		   esac;;
2892
-	      *) temp_deplibs="$temp_deplibs $libdir";;
2893
-	      esac
2894
-	    done
2895
-	    dependency_libs="$temp_deplibs"
2896
-	  fi
2897
-
2898
-	  newlib_search_path="$newlib_search_path $absdir"
2899
-	  # Link against this library
2900
-	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
2901
-	  # ... and its dependency_libs
2902
-	  tmp_libs=
2903
-	  for deplib in $dependency_libs; do
2904
-	    newdependency_libs="$deplib $newdependency_libs"
2905
-	    if test "X$duplicate_deps" = "Xyes" ; then
2906
-	      case "$tmp_libs " in
2907
-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2908
-	      esac
2909
-	    fi
2910
-	    tmp_libs="$tmp_libs $deplib"
2911
-	  done
2912
-
2913
-	  if test "$link_all_deplibs" != no; then
2914
-	    # Add the search paths of all dependency libraries
2915
-	    for deplib in $dependency_libs; do
2916
-	      case $deplib in
2917
-	      -L*) path="$deplib" ;;
2918
-	      *.la)
2919
-		dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
2920
-		test "X$dir" = "X$deplib" && dir="."
2921
-		# We need an absolute path.
2922
-		case $dir in
2923
-		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
2924
-		*)
2925
-		  absdir=`cd "$dir" && pwd`
2926
-		  if test -z "$absdir"; then
2927
-		    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
2928
-		    absdir="$dir"
2929
-		  fi
2930
-		  ;;
2931
-		esac
2932
-		if grep "^installed=no" $deplib > /dev/null; then
2933
-		  path="$absdir/$objdir"
2934
-		else
2935
-		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2936
-		  if test -z "$libdir"; then
2937
-		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2938
-		    exit $EXIT_FAILURE
2939
-		  fi
2940
-		  if test "$absdir" != "$libdir"; then
2941
-		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
2942
-		  fi
2943
-		  path="$absdir"
2944
-		fi
2945
-		depdepl=
2946
-		case $host in
2947
-		*-*-darwin*)
2948
-		  # we do not want to link against static libs,
2949
-		  # but need to link against shared
2950
-		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
2951
-		  if test -n "$deplibrary_names" ; then
2952
-		    for tmp in $deplibrary_names ; do
2953
-		      depdepl=$tmp
2954
-		    done
2955
-		    if test -f "$path/$depdepl" ; then
2956
-		      depdepl="$path/$depdepl"
2957
-		    fi
2958
-		    # do not add paths which are already there
2959
-		    case " $newlib_search_path " in
2960
-		    *" $path "*) ;;
2961
-		    *) newlib_search_path="$newlib_search_path $path";;
2962
-		    esac
2963
-		  fi
2964
-		  path=""
2965
-		  ;;
2966
-		*)
2967
-		  path="-L$path"
2968
-		  ;;
2969
-		esac
2970
-		;;
2971
-	      -l*)
2972
-		case $host in
2973
-		*-*-darwin*)
2974
-		  # Again, we only want to link against shared libraries
2975
-		  eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
2976
-		  for tmp in $newlib_search_path ; do
2977
-		    if test -f "$tmp/lib$tmp_libs.dylib" ; then
2978
-		      eval depdepl="$tmp/lib$tmp_libs.dylib"
2979
-		      break
2980
-		    fi
2981
-		  done
2982
-		  path=""
2983
-		  ;;
2984
-		*) continue ;;
2985
-		esac
2986
-		;;
2987
-	      *) continue ;;
2988
-	      esac
2989
-	      case " $deplibs " in
2990
-	      *" $path "*) ;;
2991
-	      *) deplibs="$path $deplibs" ;;
2992
-	      esac
2993
-	      case " $deplibs " in
2994
-	      *" $depdepl "*) ;;
2995
-	      *) deplibs="$depdepl $deplibs" ;;
2996
-	      esac
2997
-	    done
2998
-	  fi # link_all_deplibs != no
2999
-	fi # linkmode = lib
3000
-      done # for deplib in $libs
3001
-      dependency_libs="$newdependency_libs"
3002
-      if test "$pass" = dlpreopen; then
3003
-	# Link the dlpreopened libraries before other libraries
3004
-	for deplib in $save_deplibs; do
3005
-	  deplibs="$deplib $deplibs"
3006
-	done
3007
-      fi
3008
-      if test "$pass" != dlopen; then
3009
-	if test "$pass" != conv; then
3010
-	  # Make sure lib_search_path contains only unique directories.
3011
-	  lib_search_path=
3012
-	  for dir in $newlib_search_path; do
3013
-	    case "$lib_search_path " in
3014
-	    *" $dir "*) ;;
3015
-	    *) lib_search_path="$lib_search_path $dir" ;;
3016
-	    esac
3017
-	  done
3018
-	  newlib_search_path=
3019
-	fi
3020
-
3021
-	if test "$linkmode,$pass" != "prog,link"; then
3022
-	  vars="deplibs"
3023
-	else
3024
-	  vars="compile_deplibs finalize_deplibs"
3025
-	fi
3026
-	for var in $vars dependency_libs; do
3027
-	  # Add libraries to $var in reverse order
3028
-	  eval tmp_libs=\"\$$var\"
3029
-	  new_libs=
3030
-	  for deplib in $tmp_libs; do
3031
-	    # FIXME: Pedantically, this is the right thing to do, so
3032
-	    #        that some nasty dependency loop isn't accidentally
3033
-	    #        broken:
3034
-	    #new_libs="$deplib $new_libs"
3035
-	    # Pragmatically, this seems to cause very few problems in
3036
-	    # practice:
3037
-	    case $deplib in
3038
-	    -L*) new_libs="$deplib $new_libs" ;;
3039
-	    -R*) ;;
3040
-	    *)
3041
-	      # And here is the reason: when a library appears more
3042
-	      # than once as an explicit dependence of a library, or
3043
-	      # is implicitly linked in more than once by the
3044
-	      # compiler, it is considered special, and multiple
3045
-	      # occurrences thereof are not removed.  Compare this
3046
-	      # with having the same library being listed as a
3047
-	      # dependency of multiple other libraries: in this case,
3048
-	      # we know (pedantically, we assume) the library does not
3049
-	      # need to be listed more than once, so we keep only the
3050
-	      # last copy.  This is not always right, but it is rare
3051
-	      # enough that we require users that really mean to play
3052
-	      # such unportable linking tricks to link the library
3053
-	      # using -Wl,-lname, so that libtool does not consider it
3054
-	      # for duplicate removal.
3055
-	      case " $specialdeplibs " in
3056
-	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
3057
-	      *)
3058
-		case " $new_libs " in
3059
-		*" $deplib "*) ;;
3060
-		*) new_libs="$deplib $new_libs" ;;
3061
-		esac
3062
-		;;
3063
-	      esac
3064
-	      ;;
3065
-	    esac
3066
-	  done
3067
-	  tmp_libs=
3068
-	  for deplib in $new_libs; do
3069
-	    case $deplib in
3070
-	    -L*)
3071
-	      case " $tmp_libs " in
3072
-	      *" $deplib "*) ;;
3073
-	      *) tmp_libs="$tmp_libs $deplib" ;;
3074
-	      esac
3075
-	      ;;
3076
-	    *) tmp_libs="$tmp_libs $deplib" ;;
3077
-	    esac
3078
-	  done
3079
-	  eval $var=\"$tmp_libs\"
3080
-	done # for var
3081
-      fi
3082
-      # Last step: remove runtime libs from dependency_libs
3083
-      # (they stay in deplibs)
3084
-      tmp_libs=
3085
-      for i in $dependency_libs ; do
3086
-	case " $predeps $postdeps $compiler_lib_search_path " in
3087
-	*" $i "*)
3088
-	  i=""
3089
-	  ;;
3090
-	esac
3091
-	if test -n "$i" ; then
3092
-	  tmp_libs="$tmp_libs $i"
3093
-	fi
3094
-      done
3095
-      dependency_libs=$tmp_libs
3096
-    done # for pass
3097
-    if test "$linkmode" = prog; then
3098
-      dlfiles="$newdlfiles"
3099
-      dlprefiles="$newdlprefiles"
3100
-    fi
3101
-
3102
-    case $linkmode in
3103
-    oldlib)
3104
-      if test -n "$deplibs"; then
3105
-	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3106
-      fi
3107
-
3108
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3109
-	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3110
-      fi
3111
-
3112
-      if test -n "$rpath"; then
3113
-	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3114
-      fi
3115
-
3116
-      if test -n "$xrpath"; then
3117
-	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3118
-      fi
3119
-
3120
-      if test -n "$vinfo"; then
3121
-	$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
3122
-      fi
3123
-
3124
-      if test -n "$release"; then
3125
-	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3126
-      fi
3127
-
3128
-      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
3129
-	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3130
-      fi
3131
-
3132
-      # Now set the variables for building old libraries.
3133
-      build_libtool_libs=no
3134
-      oldlibs="$output"
3135
-      objs="$objs$old_deplibs"
3136
-      ;;
3137
-
3138
-    lib)
3139
-      # Make sure we only generate libraries of the form `libNAME.la'.
3140
-      case $outputname in
3141
-      lib*)
3142
-	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3143
-	eval shared_ext=\"$shrext_cmds\"
3144
-	eval libname=\"$libname_spec\"
3145
-	;;
3146
-      *)
3147
-	if test "$module" = no; then
3148
-	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3149
-	  $echo "$help" 1>&2
3150
-	  exit $EXIT_FAILURE
3151
-	fi
3152
-	if test "$need_lib_prefix" != no; then
3153
-	  # Add the "lib" prefix for modules if required
3154
-	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3155
-	  eval shared_ext=\"$shrext_cmds\"
3156
-	  eval libname=\"$libname_spec\"
3157
-	else
3158
-	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3159
-	fi
3160
-	;;
3161
-      esac
3162
-
3163
-      if test -n "$objs"; then
3164
-	if test "$deplibs_check_method" != pass_all; then
3165
-	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3166
-	  exit $EXIT_FAILURE
3167
-	else
3168
-	  $echo
3169
-	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
3170
-	  $echo "*** objects $objs is not portable!"
3171
-	  libobjs="$libobjs $objs"
3172
-	fi
3173
-      fi
3174
-
3175
-      if test "$dlself" != no; then
3176
-	$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3177
-      fi
3178
-
3179
-      set dummy $rpath
3180
-      if test "$#" -gt 2; then
3181
-	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3182
-      fi
3183
-      install_libdir="$2"
3184
-
3185
-      oldlibs=
3186
-      if test -z "$rpath"; then
3187
-	if test "$build_libtool_libs" = yes; then
3188
-	  # Building a libtool convenience library.
3189
-	  # Some compilers have problems with a `.al' extension so
3190
-	  # convenience libraries should have the same extension an
3191
-	  # archive normally would.
3192
-	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
3193
-	  build_libtool_libs=convenience
3194
-	  build_old_libs=yes
3195
-	fi
3196
-
3197
-	if test -n "$vinfo"; then
3198
-	  $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3199
-	fi
3200
-
3201
-	if test -n "$release"; then
3202
-	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3203
-	fi
3204
-      else
3205
-
3206
-	# Parse the version information argument.
3207
-	save_ifs="$IFS"; IFS=':'
3208
-	set dummy $vinfo 0 0 0
3209
-	IFS="$save_ifs"
3210
-
3211
-	if test -n "$8"; then
3212
-	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
3213
-	  $echo "$help" 1>&2
3214
-	  exit $EXIT_FAILURE
3215
-	fi
3216
-
3217
-	# convert absolute version numbers to libtool ages
3218
-	# this retains compatibility with .la files and attempts
3219
-	# to make the code below a bit more comprehensible
3220
-
3221
-	case $vinfo_number in
3222
-	yes)
3223
-	  number_major="$2"
3224
-	  number_minor="$3"
3225
-	  number_revision="$4"
3226
-	  #
3227
-	  # There are really only two kinds -- those that
3228
-	  # use the current revision as the major version
3229
-	  # and those that subtract age and use age as
3230
-	  # a minor version.  But, then there is irix
3231
-	  # which has an extra 1 added just for fun
3232
-	  #
3233
-	  case $version_type in
3234
-	  darwin|linux|osf|windows|none)
3235
-	    current=`expr $number_major + $number_minor`
3236
-	    age="$number_minor"
3237
-	    revision="$number_revision"
3238
-	    ;;
3239
-	  freebsd-aout|freebsd-elf|sunos)
3240
-	    current="$number_major"
3241
-	    revision="$number_minor"
3242
-	    age="0"
3243
-	    ;;
3244
-	  irix|nonstopux)
3245
-	    current=`expr $number_major + $number_minor`
3246
-	    age="$number_minor"
3247
-	    revision="$number_minor"
3248
-	    lt_irix_increment=no
3249
-	    ;;
3250
-	  *)
3251
-	    $echo "$modename: unknown library version type \`$version_type'" 1>&2
3252
-	    $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
3253
-	    exit $EXIT_FAILURE
3254
-	    ;;
3255
-	  esac
3256
-	  ;;
3257
-	no)
3258
-	  current="$2"
3259
-	  revision="$3"
3260
-	  age="$4"
3261
-	  ;;
3262
-	esac
3263
-
3264
-	# Check that each of the things are valid numbers.
3265
-	case $current in
3266
-	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
3267
-	*)
3268
-	  $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
3269
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3270
-	  exit $EXIT_FAILURE
3271
-	  ;;
3272
-	esac
3273
-
3274
-	case $revision in
3275
-	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
3276
-	*)
3277
-	  $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
3278
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3279
-	  exit $EXIT_FAILURE
3280
-	  ;;
3281
-	esac
3282
-
3283
-	case $age in
3284
-	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
3285
-	*)
3286
-	  $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
3287
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3288
-	  exit $EXIT_FAILURE
3289
-	  ;;
3290
-	esac
3291
-
3292
-	if test "$age" -gt "$current"; then
3293
-	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3294
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3295
-	  exit $EXIT_FAILURE
3296
-	fi
3297
-
3298
-	# Calculate the version variables.
3299
-	major=
3300
-	versuffix=
3301
-	verstring=
3302
-	case $version_type in
3303
-	none) ;;
3304
-
3305
-	darwin)
3306
-	  # Like Linux, but with the current version available in
3307
-	  # verstring for coding it into the library header
3308
-	  major=.`expr $current - $age`
3309
-	  versuffix="$major.$age.$revision"
3310
-	  # Darwin ld doesn't like 0 for these options...
3311
-	  minor_current=`expr $current + 1`
3312
-	  xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
3313
-	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
3314
-	  ;;
3315
-
3316
-	freebsd-aout)
3317
-	  major=".$current"
3318
-	  versuffix=".$current.$revision";
3319
-	  ;;
3320
-
3321
-	freebsd-elf)
3322
-	  major=".$current"
3323
-	  versuffix=".$current";
3324
-	  ;;
3325
-
3326
-	irix | nonstopux)
3327
-	  if test "X$lt_irix_increment" = "Xno"; then
3328
-	    major=`expr $current - $age`
3329
-	  else
3330
-	    major=`expr $current - $age + 1`
3331
-	  fi
3332
-	  case $version_type in
3333
-	    nonstopux) verstring_prefix=nonstopux ;;
3334
-	    *)         verstring_prefix=sgi ;;
3335
-	  esac
3336
-	  verstring="$verstring_prefix$major.$revision"
3337
-
3338
-	  # Add in all the interfaces that we are compatible with.
3339
-	  loop=$revision
3340
-	  while test "$loop" -ne 0; do
3341
-	    iface=`expr $revision - $loop`
3342
-	    loop=`expr $loop - 1`
3343
-	    verstring="$verstring_prefix$major.$iface:$verstring"
3344
-	  done
3345
-
3346
-	  # Before this point, $major must not contain `.'.
3347
-	  major=.$major
3348
-	  versuffix="$major.$revision"
3349
-	  ;;
3350
-
3351
-	linux)
3352
-	  major=.`expr $current - $age`
3353
-	  versuffix="$major.$age.$revision"
3354
-	  ;;
3355
-
3356
-	osf)
3357
-	  major=.`expr $current - $age`
3358
-	  versuffix=".$current.$age.$revision"
3359
-	  verstring="$current.$age.$revision"
3360
-
3361
-	  # Add in all the interfaces that we are compatible with.
3362
-	  loop=$age
3363
-	  while test "$loop" -ne 0; do
3364
-	    iface=`expr $current - $loop`
3365
-	    loop=`expr $loop - 1`
3366
-	    verstring="$verstring:${iface}.0"
3367
-	  done
3368
-
3369
-	  # Make executables depend on our current version.
3370
-	  verstring="$verstring:${current}.0"
3371
-	  ;;
3372
-
3373
-	sunos)
3374
-	  major=".$current"
3375
-	  versuffix=".$current.$revision"
3376
-	  ;;
3377
-
3378
-	windows)
3379
-	  # Use '-' rather than '.', since we only want one
3380
-	  # extension on DOS 8.3 filesystems.
3381
-	  major=`expr $current - $age`
3382
-	  versuffix="-$major"
3383
-	  ;;
3384
-
3385
-	*)
3386
-	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
3387
-	  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
3388
-	  exit $EXIT_FAILURE
3389
-	  ;;
3390
-	esac
3391
-
3392
-	# Clear the version info if we defaulted, and they specified a release.
3393
-	if test -z "$vinfo" && test -n "$release"; then
3394
-	  major=
3395
-	  case $version_type in
3396
-	  darwin)
3397
-	    # we can't check for "0.0" in archive_cmds due to quoting
3398
-	    # problems, so we reset it completely
3399
-	    verstring=
3400
-	    ;;
3401
-	  *)
3402
-	    verstring="0.0"
3403
-	    ;;
3404
-	  esac
3405
-	  if test "$need_version" = no; then
3406
-	    versuffix=
3407
-	  else
3408
-	    versuffix=".0.0"
3409
-	  fi
3410
-	fi
3411
-
3412
-	# Remove version info from name if versioning should be avoided
3413
-	if test "$avoid_version" = yes && test "$need_version" = no; then
3414
-	  major=
3415
-	  versuffix=
3416
-	  verstring=""
3417
-	fi
3418
-
3419
-	# Check to see if the archive will have undefined symbols.
3420
-	if test "$allow_undefined" = yes; then
3421
-	  if test "$allow_undefined_flag" = unsupported; then
3422
-	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3423
-	    build_libtool_libs=no
3424
-	    build_old_libs=yes
3425
-	  fi
3426
-	else
3427
-	  # Don't allow undefined symbols.
3428
-	  allow_undefined_flag="$no_undefined_flag"
3429
-	fi
3430
-      fi
3431
-
3432
-      if test "$mode" != relink; then
3433
-	# Remove our outputs, but don't remove object files since they
3434
-	# may have been created when compiling PIC objects.
3435
-	removelist=
3436
-	tempremovelist=`$echo "$output_objdir/*"`
3437
-	for p in $tempremovelist; do
3438
-	  case $p in
3439
-	    *.$objext)
3440
-	       ;;
3441
-	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
3442
-	       if test "X$precious_files_regex" != "X"; then
3443
-	         if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
3444
-	         then
3445
-		   continue
3446
-		 fi
3447
-	       fi
3448
-	       removelist="$removelist $p"
3449
-	       ;;
3450
-	    *) ;;
3451
-	  esac
3452
-	done
3453
-	if test -n "$removelist"; then
3454
-	  $show "${rm}r $removelist"
3455
-	  $run ${rm}r $removelist
3456
-	fi
3457
-      fi
3458
-
3459
-      # Now set the variables for building old libraries.
3460
-      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
3461
-	oldlibs="$oldlibs $output_objdir/$libname.$libext"
3462
-
3463
-	# Transform .lo files to .o files.
3464
-	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3465
-      fi
3466
-
3467
-      # Eliminate all temporary directories.
3468
-      #for path in $notinst_path; do
3469
-      #	lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
3470
-      #	deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
3471
-      #	dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
3472
-      #done
3473
-
3474
-      if test -n "$xrpath"; then
3475
-	# If the user specified any rpath flags, then add them.
3476
-	temp_xrpath=
3477
-	for libdir in $xrpath; do
3478
-	  temp_xrpath="$temp_xrpath -R$libdir"
3479
-	  case "$finalize_rpath " in
3480
-	  *" $libdir "*) ;;
3481
-	  *) finalize_rpath="$finalize_rpath $libdir" ;;
3482
-	  esac
3483
-	done
3484
-	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
3485
-	  dependency_libs="$temp_xrpath $dependency_libs"
3486
-	fi
3487
-      fi
3488
-
3489
-      # Make sure dlfiles contains only unique files that won't be dlpreopened
3490
-      old_dlfiles="$dlfiles"
3491
-      dlfiles=
3492
-      for lib in $old_dlfiles; do
3493
-	case " $dlprefiles $dlfiles " in
3494
-	*" $lib "*) ;;
3495
-	*) dlfiles="$dlfiles $lib" ;;
3496
-	esac
3497
-      done
3498
-
3499
-      # Make sure dlprefiles contains only unique files
3500
-      old_dlprefiles="$dlprefiles"
3501
-      dlprefiles=
3502
-      for lib in $old_dlprefiles; do
3503
-	case "$dlprefiles " in
3504
-	*" $lib "*) ;;
3505
-	*) dlprefiles="$dlprefiles $lib" ;;
3506
-	esac
3507
-      done
3508
-
3509
-      if test "$build_libtool_libs" = yes; then
3510
-	if test -n "$rpath"; then
3511
-	  case $host in
3512
-	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
3513
-	    # these systems don't actually have a c library (as such)!
3514
-	    ;;
3515
-	  *-*-rhapsody* | *-*-darwin1.[012])
3516
-	    # Rhapsody C library is in the System framework
3517
-	    deplibs="$deplibs -framework System"
3518
-	    ;;
3519
-	  *-*-netbsd*)
3520
-	    # Don't link with libc until the a.out ld.so is fixed.
3521
-	    ;;
3522
-	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
3523
-	    # Do not include libc due to us having libc/libc_r.
3524
-	    ;;
3525
-	  *-*-sco3.2v5* | *-*-sco5v6*)
3526
-	    # Causes problems with __ctype
3527
-	    ;;
3528
-	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
3529
-	    # Compiler inserts libc in the correct place for threads to work
3530
-	    ;;
3531
- 	  *)
3532
-	    # Add libc to deplibs on all other systems if necessary.
3533
-	    if test "$build_libtool_need_lc" = "yes"; then
3534
-	      deplibs="$deplibs -lc"
3535
-	    fi
3536
-	    ;;
3537
-	  esac
3538
-	fi
3539
-
3540
-	# Transform deplibs into only deplibs that can be linked in shared.
3541
-	name_save=$name
3542
-	libname_save=$libname
3543
-	release_save=$release
3544
-	versuffix_save=$versuffix
3545
-	major_save=$major
3546
-	# I'm not sure if I'm treating the release correctly.  I think
3547
-	# release should show up in the -l (ie -lgmp5) so we don't want to
3548
-	# add it in twice.  Is that correct?
3549
-	release=""
3550
-	versuffix=""
3551
-	major=""
3552
-	newdeplibs=
3553
-	droppeddeps=no
3554
-	case $deplibs_check_method in
3555
-	pass_all)
3556
-	  # Don't check for shared/static.  Everything works.
3557
-	  # This might be a little naive.  We might want to check
3558
-	  # whether the library exists or not.  But this is on
3559
-	  # osf3 & osf4 and I'm not really sure... Just
3560
-	  # implementing what was already the behavior.
3561
-	  newdeplibs=$deplibs
3562
-	  ;;
3563
-	test_compile)
3564
-	  # This code stresses the "libraries are programs" paradigm to its
3565
-	  # limits. Maybe even breaks it.  We compile a program, linking it
3566
-	  # against the deplibs as a proxy for the library.  Then we can check
3567
-	  # whether they linked in statically or dynamically with ldd.
3568
-	  $rm conftest.c
3569
-	  cat > conftest.c <<EOF
3570
-	  int main() { return 0; }
3571
-EOF
3572
-	  $rm conftest
3573
-	  if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
3574
-	    ldd_output=`ldd conftest`
3575
-	    for i in $deplibs; do
3576
-	      name=`expr $i : '-l\(.*\)'`
3577
-	      # If $name is empty we are operating on a -L argument.
3578
-              if test "$name" != "" && test "$name" != "0"; then
3579
-		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3580
-		  case " $predeps $postdeps " in
3581
-		  *" $i "*)
3582
-		    newdeplibs="$newdeplibs $i"
3583
-		    i=""
3584
-		    ;;
3585
-		  esac
3586
-	        fi
3587
-		if test -n "$i" ; then
3588
-		  libname=`eval \\$echo \"$libname_spec\"`
3589
-		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
3590
-		  set dummy $deplib_matches
3591
-		  deplib_match=$2
3592
-		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3593
-		    newdeplibs="$newdeplibs $i"
3594
-		  else
3595
-		    droppeddeps=yes
3596
-		    $echo
3597
-		    $echo "*** Warning: dynamic linker does not accept needed library $i."
3598
-		    $echo "*** I have the capability to make that library automatically link in when"
3599
-		    $echo "*** you link to this library.  But I can only do this if you have a"
3600
-		    $echo "*** shared version of the library, which I believe you do not have"
3601
-		    $echo "*** because a test_compile did reveal that the linker did not use it for"
3602
-		    $echo "*** its dynamic dependency list that programs get resolved with at runtime."
3603
-		  fi
3604
-		fi
3605
-	      else
3606
-		newdeplibs="$newdeplibs $i"
3607
-	      fi
3608
-	    done
3609
-	  else
3610
-	    # Error occurred in the first compile.  Let's try to salvage
3611
-	    # the situation: Compile a separate program for each library.
3612
-	    for i in $deplibs; do
3613
-	      name=`expr $i : '-l\(.*\)'`
3614
-	      # If $name is empty we are operating on a -L argument.
3615
-              if test "$name" != "" && test "$name" != "0"; then
3616
-		$rm conftest
3617
-		if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
3618
-		  ldd_output=`ldd conftest`
3619
-		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3620
-		    case " $predeps $postdeps " in
3621
-		    *" $i "*)
3622
-		      newdeplibs="$newdeplibs $i"
3623
-		      i=""
3624
-		      ;;
3625
-		    esac
3626
-		  fi
3627
-		  if test -n "$i" ; then
3628
-		    libname=`eval \\$echo \"$libname_spec\"`
3629
-		    deplib_matches=`eval \\$echo \"$library_names_spec\"`
3630
-		    set dummy $deplib_matches
3631
-		    deplib_match=$2
3632
-		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3633
-		      newdeplibs="$newdeplibs $i"
3634
-		    else
3635
-		      droppeddeps=yes
3636
-		      $echo
3637
-		      $echo "*** Warning: dynamic linker does not accept needed library $i."
3638
-		      $echo "*** I have the capability to make that library automatically link in when"
3639
-		      $echo "*** you link to this library.  But I can only do this if you have a"
3640
-		      $echo "*** shared version of the library, which you do not appear to have"
3641
-		      $echo "*** because a test_compile did reveal that the linker did not use this one"
3642
-		      $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
3643
-		    fi
3644
-		  fi
3645
-		else
3646
-		  droppeddeps=yes
3647
-		  $echo
3648
-		  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
3649
-		  $echo "*** make it link in!  You will probably need to install it or some"
3650
-		  $echo "*** library that it depends on before this library will be fully"
3651
-		  $echo "*** functional.  Installing it before continuing would be even better."
3652
-		fi
3653
-	      else
3654
-		newdeplibs="$newdeplibs $i"
3655
-	      fi
3656
-	    done
3657
-	  fi
3658
-	  ;;
3659
-	file_magic*)
3660
-	  set dummy $deplibs_check_method
3661
-	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3662
-	  for a_deplib in $deplibs; do
3663
-	    name=`expr $a_deplib : '-l\(.*\)'`
3664
-	    # If $name is empty we are operating on a -L argument.
3665
-            if test "$name" != "" && test  "$name" != "0"; then
3666
-	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3667
-		case " $predeps $postdeps " in
3668
-		*" $a_deplib "*)
3669
-		  newdeplibs="$newdeplibs $a_deplib"
3670
-		  a_deplib=""
3671
-		  ;;
3672
-		esac
3673
-	      fi
3674
-	      if test -n "$a_deplib" ; then
3675
-		libname=`eval \\$echo \"$libname_spec\"`
3676
-		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3677
-		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
3678
-		  for potent_lib in $potential_libs; do
3679
-		      # Follow soft links.
3680
-		      if ls -lLd "$potent_lib" 2>/dev/null \
3681
-			 | grep " -> " >/dev/null; then
3682
-			continue
3683
-		      fi
3684
-		      # The statement above tries to avoid entering an
3685
-		      # endless loop below, in case of cyclic links.
3686
-		      # We might still enter an endless loop, since a link
3687
-		      # loop can be closed while we follow links,
3688
-		      # but so what?
3689
-		      potlib="$potent_lib"
3690
-		      while test -h "$potlib" 2>/dev/null; do
3691
-			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
3692
-			case $potliblink in
3693
-			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
3694
-			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
3695
-			esac
3696
-		      done
3697
-		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
3698
-			 | ${SED} 10q \
3699
-			 | $EGREP "$file_magic_regex" > /dev/null; then
3700
-			newdeplibs="$newdeplibs $a_deplib"
3701
-			a_deplib=""
3702
-			break 2
3703
-		      fi
3704
-		  done
3705
-		done
3706
-	      fi
3707
-	      if test -n "$a_deplib" ; then
3708
-		droppeddeps=yes
3709
-		$echo
3710
-		$echo "*** Warning: linker path does not have real file for library $a_deplib."
3711
-		$echo "*** I have the capability to make that library automatically link in when"
3712
-		$echo "*** you link to this library.  But I can only do this if you have a"
3713
-		$echo "*** shared version of the library, which you do not appear to have"
3714
-		$echo "*** because I did check the linker path looking for a file starting"
3715
-		if test -z "$potlib" ; then
3716
-		  $echo "*** with $libname but no candidates were found. (...for file magic test)"
3717
-		else
3718
-		  $echo "*** with $libname and none of the candidates passed a file format test"
3719
-		  $echo "*** using a file magic. Last file checked: $potlib"
3720
-		fi
3721
-	      fi
3722
-	    else
3723
-	      # Add a -L argument.
3724
-	      newdeplibs="$newdeplibs $a_deplib"
3725
-	    fi
3726
-	  done # Gone through all deplibs.
3727
-	  ;;
3728
-	match_pattern*)
3729
-	  set dummy $deplibs_check_method
3730
-	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3731
-	  for a_deplib in $deplibs; do
3732
-	    name=`expr $a_deplib : '-l\(.*\)'`
3733
-	    # If $name is empty we are operating on a -L argument.
3734
-	    if test -n "$name" && test "$name" != "0"; then
3735
-	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3736
-		case " $predeps $postdeps " in
3737
-		*" $a_deplib "*)
3738
-		  newdeplibs="$newdeplibs $a_deplib"
3739
-		  a_deplib=""
3740
-		  ;;
3741
-		esac
3742
-	      fi
3743
-	      if test -n "$a_deplib" ; then
3744
-		libname=`eval \\$echo \"$libname_spec\"`
3745
-		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3746
-		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
3747
-		  for potent_lib in $potential_libs; do
3748
-		    potlib="$potent_lib" # see symlink-check above in file_magic test
3749
-		    if eval $echo \"$potent_lib\" 2>/dev/null \
3750
-		        | ${SED} 10q \
3751
-		        | $EGREP "$match_pattern_regex" > /dev/null; then
3752
-		      newdeplibs="$newdeplibs $a_deplib"
3753
-		      a_deplib=""
3754
-		      break 2
3755
-		    fi
3756
-		  done
3757
-		done
3758
-	      fi
3759
-	      if test -n "$a_deplib" ; then
3760
-		droppeddeps=yes
3761
-		$echo
3762
-		$echo "*** Warning: linker path does not have real file for library $a_deplib."
3763
-		$echo "*** I have the capability to make that library automatically link in when"
3764
-		$echo "*** you link to this library.  But I can only do this if you have a"
3765
-		$echo "*** shared version of the library, which you do not appear to have"
3766
-		$echo "*** because I did check the linker path looking for a file starting"
3767
-		if test -z "$potlib" ; then
3768
-		  $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
3769
-		else
3770
-		  $echo "*** with $libname and none of the candidates passed a file format test"
3771
-		  $echo "*** using a regex pattern. Last file checked: $potlib"
3772
-		fi
3773
-	      fi
3774
-	    else
3775
-	      # Add a -L argument.
3776
-	      newdeplibs="$newdeplibs $a_deplib"
3777
-	    fi
3778
-	  done # Gone through all deplibs.
3779
-	  ;;
3780
-	none | unknown | *)
3781
-	  newdeplibs=""
3782
-	  tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
3783
-	    -e 's/ -[LR][^ ]*//g'`
3784
-	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3785
-	    for i in $predeps $postdeps ; do
3786
-	      # can't use Xsed below, because $i might contain '/'
3787
-	      tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
3788
-	    done
3789
-	  fi
3790
-	  if $echo "X $tmp_deplibs" | $Xsed -e 's/[ 	]//g' \
3791
-	    | grep . >/dev/null; then
3792
-	    $echo
3793
-	    if test "X$deplibs_check_method" = "Xnone"; then
3794
-	      $echo "*** Warning: inter-library dependencies are not supported in this platform."
3795
-	    else
3796
-	      $echo "*** Warning: inter-library dependencies are not known to be supported."
3797
-	    fi
3798
-	    $echo "*** All declared inter-library dependencies are being dropped."
3799
-	    droppeddeps=yes
3800
-	  fi
3801
-	  ;;
3802
-	esac
3803
-	versuffix=$versuffix_save
3804
-	major=$major_save
3805
-	release=$release_save
3806
-	libname=$libname_save
3807
-	name=$name_save
3808
-
3809
-	case $host in
3810
-	*-*-rhapsody* | *-*-darwin1.[012])
3811
-	  # On Rhapsody replace the C library is the System framework
3812
-	  newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
3813
-	  ;;
3814
-	esac
3815
-
3816
-	if test "$droppeddeps" = yes; then
3817
-	  if test "$module" = yes; then
3818
-	    $echo
3819
-	    $echo "*** Warning: libtool could not satisfy all declared inter-library"
3820
-	    $echo "*** dependencies of module $libname.  Therefore, libtool will create"
3821
-	    $echo "*** a static module, that should work as long as the dlopening"
3822
-	    $echo "*** application is linked with the -dlopen flag."
3823
-	    if test -z "$global_symbol_pipe"; then
3824
-	      $echo
3825
-	      $echo "*** However, this would only work if libtool was able to extract symbol"
3826
-	      $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3827
-	      $echo "*** not find such a program.  So, this module is probably useless."
3828
-	      $echo "*** \`nm' from GNU binutils and a full rebuild may help."
3829
-	    fi
3830
-	    if test "$build_old_libs" = no; then
3831
-	      oldlibs="$output_objdir/$libname.$libext"
3832
-	      build_libtool_libs=module
3833
-	      build_old_libs=yes
3834
-	    else
3835
-	      build_libtool_libs=no
3836
-	    fi
3837
-	  else
3838
-	    $echo "*** The inter-library dependencies that have been dropped here will be"
3839
-	    $echo "*** automatically added whenever a program is linked with this library"
3840
-	    $echo "*** or is declared to -dlopen it."
3841
-
3842
-	    if test "$allow_undefined" = no; then
3843
-	      $echo
3844
-	      $echo "*** Since this library must not contain undefined symbols,"
3845
-	      $echo "*** because either the platform does not support them or"
3846
-	      $echo "*** it was explicitly requested with -no-undefined,"
3847
-	      $echo "*** libtool will only create a static version of it."
3848
-	      if test "$build_old_libs" = no; then
3849
-		oldlibs="$output_objdir/$libname.$libext"
3850
-		build_libtool_libs=module
3851
-		build_old_libs=yes
3852
-	      else
3853
-		build_libtool_libs=no
3854
-	      fi
3855
-	    fi
3856
-	  fi
3857
-	fi
3858
-	# Done checking deplibs!
3859
-	deplibs=$newdeplibs
3860
-      fi
3861
-
3862
-
3863
-      # move library search paths that coincide with paths to not yet
3864
-      # installed libraries to the beginning of the library search list
3865
-      new_libs=
3866
-      for path in $notinst_path; do
3867
-	case " $new_libs " in
3868
-	*" -L$path/$objdir "*) ;;
3869
-	*)
3870
-	  case " $deplibs " in
3871
-	  *" -L$path/$objdir "*)
3872
-	    new_libs="$new_libs -L$path/$objdir" ;;
3873
-	  esac
3874
-	  ;;
3875
-	esac
3876
-      done
3877
-      for deplib in $deplibs; do
3878
-	case $deplib in
3879
-	-L*)
3880
-	  case " $new_libs " in
3881
-	  *" $deplib "*) ;;
3882
-	  *) new_libs="$new_libs $deplib" ;;
3883
-	  esac
3884
-	  ;;
3885
-	*) new_libs="$new_libs $deplib" ;;
3886
-	esac
3887
-      done
3888
-      deplibs="$new_libs"
3889
-
3890
-
3891
-      # All the library-specific variables (install_libdir is set above).
3892
-      library_names=
3893
-      old_library=
3894
-      dlname=
3895
-
3896
-      # Test again, we may have decided not to build it any more
3897
-      if test "$build_libtool_libs" = yes; then
3898
-	if test "$hardcode_into_libs" = yes; then
3899
-	  # Hardcode the library paths
3900
-	  hardcode_libdirs=
3901
-	  dep_rpath=
3902
-	  rpath="$finalize_rpath"
3903
-	  test "$mode" != relink && rpath="$compile_rpath$rpath"
3904
-	  for libdir in $rpath; do
3905
-	    if test -n "$hardcode_libdir_flag_spec"; then
3906
-	      if test -n "$hardcode_libdir_separator"; then
3907
-		if test -z "$hardcode_libdirs"; then
3908
-		  hardcode_libdirs="$libdir"
3909
-		else
3910
-		  # Just accumulate the unique libdirs.
3911
-		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3912
-		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3913
-		    ;;
3914
-		  *)
3915
-		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3916
-		    ;;
3917
-		  esac
3918
-		fi
3919
-	      else
3920
-		eval flag=\"$hardcode_libdir_flag_spec\"
3921
-		dep_rpath="$dep_rpath $flag"
3922
-	      fi
3923
-	    elif test -n "$runpath_var"; then
3924
-	      case "$perm_rpath " in
3925
-	      *" $libdir "*) ;;
3926
-	      *) perm_rpath="$perm_rpath $libdir" ;;
3927
-	      esac
3928
-	    fi
3929
-	  done
3930
-	  # Substitute the hardcoded libdirs into the rpath.
3931
-	  if test -n "$hardcode_libdir_separator" &&
3932
-	     test -n "$hardcode_libdirs"; then
3933
-	    libdir="$hardcode_libdirs"
3934
-	    if test -n "$hardcode_libdir_flag_spec_ld"; then
3935
-	      case $archive_cmds in
3936
-	      *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
3937
-	      *)      eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
3938
-	      esac
3939
-	    else
3940
-	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
3941
-	    fi
3942
-	  fi
3943
-	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
3944
-	    # We should set the runpath_var.
3945
-	    rpath=
3946
-	    for dir in $perm_rpath; do
3947
-	      rpath="$rpath$dir:"
3948
-	    done
3949
-	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
3950
-	  fi
3951
-	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
3952
-	fi
3953
-
3954
-	shlibpath="$finalize_shlibpath"
3955
-	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
3956
-	if test -n "$shlibpath"; then
3957
-	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
3958
-	fi
3959
-
3960
-	# Get the real and link names of the library.
3961
-	eval shared_ext=\"$shrext_cmds\"
3962
-	eval library_names=\"$library_names_spec\"
3963
-	set dummy $library_names
3964
-	realname="$2"
3965
-	shift; shift
3966
-
3967
-	if test -n "$soname_spec"; then
3968
-	  eval soname=\"$soname_spec\"
3969
-	else
3970
-	  soname="$realname"
3971
-	fi
3972
-	if test -z "$dlname"; then
3973
-	  dlname=$soname
3974
-	fi
3975
-
3976
-	lib="$output_objdir/$realname"
3977
-	linknames=
3978
-	for link
3979
-	do
3980
-	  linknames="$linknames $link"
3981
-	done
3982
-
3983
-	# Use standard objects if they are pic
3984
-	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3985
-
3986
-	# Prepare the list of exported symbols
3987
-	if test -z "$export_symbols"; then
3988
-	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
3989
-	    $show "generating symbol list for \`$libname.la'"
3990
-	    export_symbols="$output_objdir/$libname.exp"
3991
-	    $run $rm $export_symbols
3992
-	    cmds=$export_symbols_cmds
3993
-	    save_ifs="$IFS"; IFS='~'
3994
-	    for cmd in $cmds; do
3995
-	      IFS="$save_ifs"
3996
-	      eval cmd=\"$cmd\"
3997
-	      if len=`expr "X$cmd" : ".*"` &&
3998
-	       test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
3999
-	        $show "$cmd"
4000
-	        $run eval "$cmd" || exit $?
4001
-	        skipped_export=false
4002
-	      else
4003
-	        # The command line is too long to execute in one step.
4004
-	        $show "using reloadable object file for export list..."
4005
-	        skipped_export=:
4006
-		# Break out early, otherwise skipped_export may be
4007
-		# set to false by a later but shorter cmd.
4008
-		break
4009
-	      fi
4010
-	    done
4011
-	    IFS="$save_ifs"
4012
-	    if test -n "$export_symbols_regex"; then
4013
-	      $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
4014
-	      $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
4015
-	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
4016
-	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
4017
-	    fi
4018
-	  fi
4019
-	fi
4020
-
4021
-	if test -n "$export_symbols" && test -n "$include_expsyms"; then
4022
-	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
4023
-	fi
4024
-
4025
-	tmp_deplibs=
4026
-	for test_deplib in $deplibs; do
4027
-		case " $convenience " in
4028
-		*" $test_deplib "*) ;;
4029
-		*)
4030
-			tmp_deplibs="$tmp_deplibs $test_deplib"
4031
-			;;
4032
-		esac
4033
-	done
4034
-	deplibs="$tmp_deplibs"
4035
-
4036
-	if test -n "$convenience"; then
4037
-	  if test -n "$whole_archive_flag_spec"; then
4038
-	    save_libobjs=$libobjs
4039
-	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4040
-	  else
4041
-	    gentop="$output_objdir/${outputname}x"
4042
-	    generated="$generated $gentop"
4043
-
4044
-	    func_extract_archives $gentop $convenience
4045
-	    libobjs="$libobjs $func_extract_archives_result"
4046
-	  fi
4047
-	fi
4048
-	
4049
-	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4050
-	  eval flag=\"$thread_safe_flag_spec\"
4051
-	  linker_flags="$linker_flags $flag"
4052
-	fi
4053
-
4054
-	# Make a backup of the uninstalled library when relinking
4055
-	if test "$mode" = relink; then
4056
-	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
4057
-	fi
4058
-
4059
-	# Do each of the archive commands.
4060
-	if test "$module" = yes && test -n "$module_cmds" ; then
4061
-	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4062
-	    eval test_cmds=\"$module_expsym_cmds\"
4063
-	    cmds=$module_expsym_cmds
4064
-	  else
4065
-	    eval test_cmds=\"$module_cmds\"
4066
-	    cmds=$module_cmds
4067
-	  fi
4068
-	else
4069
-	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4070
-	  eval test_cmds=\"$archive_expsym_cmds\"
4071
-	  cmds=$archive_expsym_cmds
4072
-	else
4073
-	  eval test_cmds=\"$archive_cmds\"
4074
-	  cmds=$archive_cmds
4075
-	  fi
4076
-	fi
4077
-
4078
-	if test "X$skipped_export" != "X:" &&
4079
-	   len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4080
-	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
4081
-	  :
4082
-	else
4083
-	  # The command line is too long to link in one step, link piecewise.
4084
-	  $echo "creating reloadable object files..."
4085
-
4086
-	  # Save the value of $output and $libobjs because we want to
4087
-	  # use them later.  If we have whole_archive_flag_spec, we
4088
-	  # want to use save_libobjs as it was before
4089
-	  # whole_archive_flag_spec was expanded, because we can't
4090
-	  # assume the linker understands whole_archive_flag_spec.
4091
-	  # This may have to be revisited, in case too many
4092
-	  # convenience libraries get linked in and end up exceeding
4093
-	  # the spec.
4094
-	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
4095
-	    save_libobjs=$libobjs
4096
-	  fi
4097
-	  save_output=$output
4098
-	  output_la=`$echo "X$output" | $Xsed -e "$basename"`
4099
-
4100
-	  # Clear the reloadable object creation command queue and
4101
-	  # initialize k to one.
4102
-	  test_cmds=
4103
-	  concat_cmds=
4104
-	  objlist=
4105
-	  delfiles=
4106
-	  last_robj=
4107
-	  k=1
4108
-	  output=$output_objdir/$output_la-${k}.$objext
4109
-	  # Loop over the list of objects to be linked.
4110
-	  for obj in $save_libobjs
4111
-	  do
4112
-	    eval test_cmds=\"$reload_cmds $objlist $last_robj\"
4113
-	    if test "X$objlist" = X ||
4114
-	       { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4115
-		 test "$len" -le "$max_cmd_len"; }; then
4116
-	      objlist="$objlist $obj"
4117
-	    else
4118
-	      # The command $test_cmds is almost too long, add a
4119
-	      # command to the queue.
4120
-	      if test "$k" -eq 1 ; then
4121
-		# The first file doesn't have a previous command to add.
4122
-		eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
4123
-	      else
4124
-		# All subsequent reloadable object files will link in
4125
-		# the last one created.
4126
-		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
4127
-	      fi
4128
-	      last_robj=$output_objdir/$output_la-${k}.$objext
4129
-	      k=`expr $k + 1`
4130
-	      output=$output_objdir/$output_la-${k}.$objext
4131
-	      objlist=$obj
4132
-	      len=1
4133
-	    fi
4134
-	  done
4135
-	  # Handle the remaining objects by creating one last
4136
-	  # reloadable object file.  All subsequent reloadable object
4137
-	  # files will link in the last one created.
4138
-	  test -z "$concat_cmds" || concat_cmds=$concat_cmds~
4139
-	  eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
4140
-
4141
-	  if ${skipped_export-false}; then
4142
-	    $show "generating symbol list for \`$libname.la'"
4143
-	    export_symbols="$output_objdir/$libname.exp"
4144
-	    $run $rm $export_symbols
4145
-	    libobjs=$output
4146
-	    # Append the command to create the export file.
4147
-	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
4148
-          fi
4149
-
4150
-	  # Set up a command to remove the reloadable object files
4151
-	  # after they are used.
4152
-	  i=0
4153
-	  while test "$i" -lt "$k"
4154
-	  do
4155
-	    i=`expr $i + 1`
4156
-	    delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
4157
-	  done
4158
-
4159
-	  $echo "creating a temporary reloadable object file: $output"
4160
-
4161
-	  # Loop through the commands generated above and execute them.
4162
-	  save_ifs="$IFS"; IFS='~'
4163
-	  for cmd in $concat_cmds; do
4164
-	    IFS="$save_ifs"
4165
-	    $show "$cmd"
4166
-	    $run eval "$cmd" || exit $?
4167
-	  done
4168
-	  IFS="$save_ifs"
4169
-
4170
-	  libobjs=$output
4171
-	  # Restore the value of output.
4172
-	  output=$save_output
4173
-
4174
-	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4175
-	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4176
-	  fi
4177
-	  # Expand the library linking commands again to reset the
4178
-	  # value of $libobjs for piecewise linking.
4179
-
4180
-	  # Do each of the archive commands.
4181
-	  if test "$module" = yes && test -n "$module_cmds" ; then
4182
-	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4183
-	      cmds=$module_expsym_cmds
4184
-	    else
4185
-	      cmds=$module_cmds
4186
-	    fi
4187
-	  else
4188
-	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4189
-	    cmds=$archive_expsym_cmds
4190
-	  else
4191
-	    cmds=$archive_cmds
4192
-	    fi
4193
-	  fi
4194
-
4195
-	  # Append the command to remove the reloadable object files
4196
-	  # to the just-reset $cmds.
4197
-	  eval cmds=\"\$cmds~\$rm $delfiles\"
4198
-	fi
4199
-	save_ifs="$IFS"; IFS='~'
4200
-	for cmd in $cmds; do
4201
-	  IFS="$save_ifs"
4202
-	  eval cmd=\"$cmd\"
4203
-	  $show "$cmd"
4204
-	  $run eval "$cmd" || {
4205
-	    lt_exit=$?
4206
-
4207
-	    # Restore the uninstalled library and exit
4208
-	    if test "$mode" = relink; then
4209
-	      $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
4210
-	    fi
4211
-
4212
-	    exit $lt_exit
4213
-	  }
4214
-	done
4215
-	IFS="$save_ifs"
4216
-
4217
-	# Restore the uninstalled library and exit
4218
-	if test "$mode" = relink; then
4219
-	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
4220
-
4221
-	  if test -n "$convenience"; then
4222
-	    if test -z "$whole_archive_flag_spec"; then
4223
-	      $show "${rm}r $gentop"
4224
-	      $run ${rm}r "$gentop"
4225
-	    fi
4226
-	  fi
4227
-
4228
-	  exit $EXIT_SUCCESS
4229
-	fi
4230
-
4231
-	# Create links to the real library.
4232
-	for linkname in $linknames; do
4233
-	  if test "$realname" != "$linkname"; then
4234
-	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4235
-	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
4236
-	  fi
4237
-	done
4238
-
4239
-	# If -module or -export-dynamic was specified, set the dlname.
4240
-	if test "$module" = yes || test "$export_dynamic" = yes; then
4241
-	  # On all known operating systems, these are identical.
4242
-	  dlname="$soname"
4243
-	fi
4244
-      fi
4245
-      ;;
4246
-
4247
-    obj)
4248
-      if test -n "$deplibs"; then
4249
-	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4250
-      fi
4251
-
4252
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4253
-	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4254
-      fi
4255
-
4256
-      if test -n "$rpath"; then
4257
-	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4258
-      fi
4259
-
4260
-      if test -n "$xrpath"; then
4261
-	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4262
-      fi
4263
-
4264
-      if test -n "$vinfo"; then
4265
-	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4266
-      fi
4267
-
4268
-      if test -n "$release"; then
4269
-	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4270
-      fi
4271
-
4272
-      case $output in
4273
-      *.lo)
4274
-	if test -n "$objs$old_deplibs"; then
4275
-	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4276
-	  exit $EXIT_FAILURE
4277
-	fi
4278
-	libobj="$output"
4279
-	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
4280
-	;;
4281
-      *)
4282
-	libobj=
4283
-	obj="$output"
4284
-	;;
4285
-      esac
4286
-
4287
-      # Delete the old objects.
4288
-      $run $rm $obj $libobj
4289
-
4290
-      # Objects from convenience libraries.  This assumes
4291
-      # single-version convenience libraries.  Whenever we create
4292
-      # different ones for PIC/non-PIC, this we'll have to duplicate
4293
-      # the extraction.
4294
-      reload_conv_objs=
4295
-      gentop=
4296
-      # reload_cmds runs $LD directly, so let us get rid of
4297
-      # -Wl from whole_archive_flag_spec and hope we can get by with
4298
-      # turning comma into space..
4299
-      wl=
4300
-
4301
-      if test -n "$convenience"; then
4302
-	if test -n "$whole_archive_flag_spec"; then
4303
-	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
4304
-	  reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
4305
-	else
4306
-	  gentop="$output_objdir/${obj}x"
4307
-	  generated="$generated $gentop"
4308
-
4309
-	  func_extract_archives $gentop $convenience
4310
-	  reload_conv_objs="$reload_objs $func_extract_archives_result"
4311
-	fi
4312
-      fi
4313
-
4314
-      # Create the old-style object.
4315
-      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
4316
-
4317
-      output="$obj"
4318
-      cmds=$reload_cmds
4319
-      save_ifs="$IFS"; IFS='~'
4320
-      for cmd in $cmds; do
4321
-	IFS="$save_ifs"
4322
-	eval cmd=\"$cmd\"
4323
-	$show "$cmd"
4324
-	$run eval "$cmd" || exit $?
4325
-      done
4326
-      IFS="$save_ifs"
4327
-
4328
-      # Exit if we aren't doing a library object file.
4329
-      if test -z "$libobj"; then
4330
-	if test -n "$gentop"; then
4331
-	  $show "${rm}r $gentop"
4332
-	  $run ${rm}r $gentop
4333
-	fi
4334
-
4335
-	exit $EXIT_SUCCESS
4336
-      fi
4337
-
4338
-      if test "$build_libtool_libs" != yes; then
4339
-	if test -n "$gentop"; then
4340
-	  $show "${rm}r $gentop"
4341
-	  $run ${rm}r $gentop
4342
-	fi
4343
-
4344
-	# Create an invalid libtool object if no PIC, so that we don't
4345
-	# accidentally link it into a program.
4346
-	# $show "echo timestamp > $libobj"
4347
-	# $run eval "echo timestamp > $libobj" || exit $?
4348
-	exit $EXIT_SUCCESS
4349
-      fi
4350
-
4351
-      if test -n "$pic_flag" || test "$pic_mode" != default; then
4352
-	# Only do commands if we really have different PIC objects.
4353
-	reload_objs="$libobjs $reload_conv_objs"
4354
-	output="$libobj"
4355
-	cmds=$reload_cmds
4356
-	save_ifs="$IFS"; IFS='~'
4357
-	for cmd in $cmds; do
4358
-	  IFS="$save_ifs"
4359
-	  eval cmd=\"$cmd\"
4360
-	  $show "$cmd"
4361
-	  $run eval "$cmd" || exit $?
4362
-	done
4363
-	IFS="$save_ifs"
4364
-      fi
4365
-
4366
-      if test -n "$gentop"; then
4367
-	$show "${rm}r $gentop"
4368
-	$run ${rm}r $gentop
4369
-      fi
4370
-
4371
-      exit $EXIT_SUCCESS
4372
-      ;;
4373
-
4374
-    prog)
4375
-      case $host in
4376
-	*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4377
-      esac
4378
-      if test -n "$vinfo"; then
4379
-	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4380
-      fi
4381
-
4382
-      if test -n "$release"; then
4383
-	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4384
-      fi
4385
-
4386
-      if test "$preload" = yes; then
4387
-	if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
4388
-	   test "$dlopen_self_static" = unknown; then
4389
-	  $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4390
-	fi
4391
-      fi
4392
-
4393
-      case $host in
4394
-      *-*-rhapsody* | *-*-darwin1.[012])
4395
-	# On Rhapsody replace the C library is the System framework
4396
-	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4397
-	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4398
-	;;
4399
-      esac
4400
-
4401
-      case $host in
4402
-      *darwin*)
4403
-        # Don't allow lazy linking, it breaks C++ global constructors
4404
-        if test "$tagname" = CXX ; then
4405
-        compile_command="$compile_command ${wl}-bind_at_load"
4406
-        finalize_command="$finalize_command ${wl}-bind_at_load"
4407
-        fi
4408
-        ;;
4409
-      esac
4410
-
4411
-
4412
-      # move library search paths that coincide with paths to not yet
4413
-      # installed libraries to the beginning of the library search list
4414
-      new_libs=
4415
-      for path in $notinst_path; do
4416
-	case " $new_libs " in
4417
-	*" -L$path/$objdir "*) ;;
4418
-	*)
4419
-	  case " $compile_deplibs " in
4420
-	  *" -L$path/$objdir "*)
4421
-	    new_libs="$new_libs -L$path/$objdir" ;;
4422
-	  esac
4423
-	  ;;
4424
-	esac
4425
-      done
4426
-      for deplib in $compile_deplibs; do
4427
-	case $deplib in
4428
-	-L*)
4429
-	  case " $new_libs " in
4430
-	  *" $deplib "*) ;;
4431
-	  *) new_libs="$new_libs $deplib" ;;
4432
-	  esac
4433
-	  ;;
4434
-	*) new_libs="$new_libs $deplib" ;;
4435
-	esac
4436
-      done
4437
-      compile_deplibs="$new_libs"
4438
-
4439
-
4440
-      compile_command="$compile_command $compile_deplibs"
4441
-      finalize_command="$finalize_command $finalize_deplibs"
4442
-
4443
-      if test -n "$rpath$xrpath"; then
4444
-	# If the user specified any rpath flags, then add them.
4445
-	for libdir in $rpath $xrpath; do
4446
-	  # This is the magic to use -rpath.
4447
-	  case "$finalize_rpath " in
4448
-	  *" $libdir "*) ;;
4449
-	  *) finalize_rpath="$finalize_rpath $libdir" ;;
4450
-	  esac
4451
-	done
4452
-      fi
4453
-
4454
-      # Now hardcode the library paths
4455
-      rpath=
4456
-      hardcode_libdirs=
4457
-      for libdir in $compile_rpath $finalize_rpath; do
4458
-	if test -n "$hardcode_libdir_flag_spec"; then
4459
-	  if test -n "$hardcode_libdir_separator"; then
4460
-	    if test -z "$hardcode_libdirs"; then
4461
-	      hardcode_libdirs="$libdir"
4462
-	    else
4463
-	      # Just accumulate the unique libdirs.
4464
-	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4465
-	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4466
-		;;
4467
-	      *)
4468
-		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4469
-		;;
4470
-	      esac
4471
-	    fi
4472
-	  else
4473
-	    eval flag=\"$hardcode_libdir_flag_spec\"
4474
-	    rpath="$rpath $flag"
4475
-	  fi
4476
-	elif test -n "$runpath_var"; then
4477
-	  case "$perm_rpath " in
4478
-	  *" $libdir "*) ;;
4479
-	  *) perm_rpath="$perm_rpath $libdir" ;;
4480
-	  esac
4481
-	fi
4482
-	case $host in
4483
-	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
4484
-	  testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
4485
-	  case :$dllsearchpath: in
4486
-	  *":$libdir:"*) ;;
4487
-	  *) dllsearchpath="$dllsearchpath:$libdir";;
4488
-	  esac
4489
-	  case :$dllsearchpath: in
4490
-	  *":$testbindir:"*) ;;
4491
-	  *) dllsearchpath="$dllsearchpath:$testbindir";;
4492
-	  esac
4493
-	  ;;
4494
-	esac
4495
-      done
4496
-      # Substitute the hardcoded libdirs into the rpath.
4497
-      if test -n "$hardcode_libdir_separator" &&
4498
-	 test -n "$hardcode_libdirs"; then
4499
-	libdir="$hardcode_libdirs"
4500
-	eval rpath=\" $hardcode_libdir_flag_spec\"
4501
-      fi
4502
-      compile_rpath="$rpath"
4503
-
4504
-      rpath=
4505
-      hardcode_libdirs=
4506
-      for libdir in $finalize_rpath; do
4507
-	if test -n "$hardcode_libdir_flag_spec"; then
4508
-	  if test -n "$hardcode_libdir_separator"; then
4509
-	    if test -z "$hardcode_libdirs"; then
4510
-	      hardcode_libdirs="$libdir"
4511
-	    else
4512
-	      # Just accumulate the unique libdirs.
4513
-	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4514
-	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4515
-		;;
4516
-	      *)
4517
-		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4518
-		;;
4519
-	      esac
4520
-	    fi
4521
-	  else
4522
-	    eval flag=\"$hardcode_libdir_flag_spec\"
4523
-	    rpath="$rpath $flag"
4524
-	  fi
4525
-	elif test -n "$runpath_var"; then
4526
-	  case "$finalize_perm_rpath " in
4527
-	  *" $libdir "*) ;;
4528
-	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
4529
-	  esac
4530
-	fi
4531
-      done
4532
-      # Substitute the hardcoded libdirs into the rpath.
4533
-      if test -n "$hardcode_libdir_separator" &&
4534
-	 test -n "$hardcode_libdirs"; then
4535
-	libdir="$hardcode_libdirs"
4536
-	eval rpath=\" $hardcode_libdir_flag_spec\"
4537
-      fi
4538
-      finalize_rpath="$rpath"
4539
-
4540
-      if test -n "$libobjs" && test "$build_old_libs" = yes; then
4541
-	# Transform all the library objects into standard objects.
4542
-	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4543
-	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4544
-      fi
4545
-
4546
-      dlsyms=
4547
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4548
-	if test -n "$NM" && test -n "$global_symbol_pipe"; then
4549
-	  dlsyms="${outputname}S.c"
4550
-	else
4551
-	  $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4552
-	fi
4553
-      fi
4554
-
4555
-      if test -n "$dlsyms"; then
4556
-	case $dlsyms in
4557
-	"") ;;
4558
-	*.c)
4559
-	  # Discover the nlist of each of the dlfiles.
4560
-	  nlist="$output_objdir/${outputname}.nm"
4561
-
4562
-	  $show "$rm $nlist ${nlist}S ${nlist}T"
4563
-	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
4564
-
4565
-	  # Parse the name list into a source file.
4566
-	  $show "creating $output_objdir/$dlsyms"
4567
-
4568
-	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4569
-/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4570
-/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4571
-
4572
-#ifdef __cplusplus
4573
-extern \"C\" {
4574
-#endif
4575
-
4576
-/* Prevent the only kind of declaration conflicts we can make. */
4577
-#define lt_preloaded_symbols some_other_symbol
4578
-
4579
-/* External symbol declarations for the compiler. */\
4580
-"
4581
-
4582
-	  if test "$dlself" = yes; then
4583
-	    $show "generating symbol list for \`$output'"
4584
-
4585
-	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4586
-
4587
-	    # Add our own program objects to the symbol list.
4588
-	    progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4589
-	    for arg in $progfiles; do
4590
-	      $show "extracting global C symbols from \`$arg'"
4591
-	      $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4592
-	    done
4593
-
4594
-	    if test -n "$exclude_expsyms"; then
4595
-	      $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4596
-	      $run eval '$mv "$nlist"T "$nlist"'
4597
-	    fi
4598
-
4599
-	    if test -n "$export_symbols_regex"; then
4600
-	      $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4601
-	      $run eval '$mv "$nlist"T "$nlist"'
4602
-	    fi
4603
-
4604
-	    # Prepare the list of exported symbols
4605
-	    if test -z "$export_symbols"; then
4606
-	      export_symbols="$output_objdir/$outputname.exp"
4607
-	      $run $rm $export_symbols
4608
-	      $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4609
-              case $host in
4610
-              *cygwin* | *mingw* )
4611
-	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4612
-		$run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
4613
-                ;;
4614
-              esac
4615
-	    else
4616
-	      $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4617
-	      $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4618
-	      $run eval 'mv "$nlist"T "$nlist"'
4619
-              case $host in
4620
-              *cygwin* | *mingw* )
4621
-	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4622
-		$run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
4623
-                ;;
4624
-              esac
4625
-	    fi
4626
-	  fi
4627
-
4628
-	  for arg in $dlprefiles; do
4629
-	    $show "extracting global C symbols from \`$arg'"
4630
-	    name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4631
-	    $run eval '$echo ": $name " >> "$nlist"'
4632
-	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4633
-	  done
4634
-
4635
-	  if test -z "$run"; then
4636
-	    # Make sure we have at least an empty file.
4637
-	    test -f "$nlist" || : > "$nlist"
4638
-
4639
-	    if test -n "$exclude_expsyms"; then
4640
-	      $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4641
-	      $mv "$nlist"T "$nlist"
4642
-	    fi
4643
-
4644
-	    # Try sorting and uniquifying the output.
4645
-	    if grep -v "^: " < "$nlist" |
4646
-		if sort -k 3 </dev/null >/dev/null 2>&1; then
4647
-		  sort -k 3
4648
-		else
4649
-		  sort +2
4650
-		fi |
4651
-		uniq > "$nlist"S; then
4652
-	      :
4653
-	    else
4654
-	      grep -v "^: " < "$nlist" > "$nlist"S
4655
-	    fi
4656
-
4657
-	    if test -f "$nlist"S; then
4658
-	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
4659
-	    else
4660
-	      $echo '/* NONE */' >> "$output_objdir/$dlsyms"
4661
-	    fi
4662
-
4663
-	    $echo >> "$output_objdir/$dlsyms" "\
4664
-
4665
-#undef lt_preloaded_symbols
4666
-
4667
-#if defined (__STDC__) && __STDC__
4668
-# define lt_ptr void *
4669
-#else
4670
-# define lt_ptr char *
4671
-# define const
4672
-#endif
4673
-
4674
-/* The mapping between symbol names and symbols. */
4675
-"
4676
-
4677
-	    case $host in
4678
-	    *cygwin* | *mingw* )
4679
-	  $echo >> "$output_objdir/$dlsyms" "\
4680
-/* DATA imports from DLLs on WIN32 can't be const, because
4681
-   runtime relocations are performed -- see ld's documentation
4682
-   on pseudo-relocs */
4683
-struct {
4684
-"
4685
-	      ;;
4686
-	    * )
4687
-	  $echo >> "$output_objdir/$dlsyms" "\
4688
-const struct {
4689
-"
4690
-	      ;;
4691
-	    esac
4692
-
4693
-
4694
-	  $echo >> "$output_objdir/$dlsyms" "\
4695
-  const char *name;
4696
-  lt_ptr address;
4697
-}
4698
-lt_preloaded_symbols[] =
4699
-{\
4700
-"
4701
-
4702
-	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
4703
-
4704
-	    $echo >> "$output_objdir/$dlsyms" "\
4705
-  {0, (lt_ptr) 0}
4706
-};
4707
-
4708
-/* This works around a problem in FreeBSD linker */
4709
-#ifdef FREEBSD_WORKAROUND
4710
-static const void *lt_preloaded_setup() {
4711
-  return lt_preloaded_symbols;
4712
-}
4713
-#endif
4714
-
4715
-#ifdef __cplusplus
4716
-}
4717
-#endif\
4718
-"
4719
-	  fi
4720
-
4721
-	  pic_flag_for_symtable=
4722
-	  case $host in
4723
-	  # compiling the symbol table file with pic_flag works around
4724
-	  # a FreeBSD bug that causes programs to crash when -lm is
4725
-	  # linked before any other PIC object.  But we must not use
4726
-	  # pic_flag when linking with -static.  The problem exists in
4727
-	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
4728
-	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
4729
-	    case "$compile_command " in
4730
-	    *" -static "*) ;;
4731
-	    *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
4732
-	    esac;;
4733
-	  *-*-hpux*)
4734
-	    case "$compile_command " in
4735
-	    *" -static "*) ;;
4736
-	    *) pic_flag_for_symtable=" $pic_flag";;
4737
-	    esac
4738
-	  esac
4739
-
4740
-	  # Now compile the dynamic symbol file.
4741
-	  $show "(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4742
-	  $run eval '(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
4743
-
4744
-	  # Clean up the generated files.
4745
-	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
4746
-	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
4747
-
4748
-	  # Transform the symbol file into the correct name.
4749
-          case $host in
4750
-          *cygwin* | *mingw* )
4751
-            if test -f "$output_objdir/${outputname}.def" ; then
4752
-              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
4753
-              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
4754
-            else
4755
-              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4756
-              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4757
-             fi
4758
-            ;;
4759
-          * )
4760
-            compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4761
-            finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4762
-            ;;
4763
-          esac
4764
-	  ;;
4765
-	*)
4766
-	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
4767
-	  exit $EXIT_FAILURE
4768
-	  ;;
4769
-	esac
4770
-      else
4771
-	# We keep going just in case the user didn't refer to
4772
-	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
4773
-	# really was required.
4774
-
4775
-	# Nullify the symbol file.
4776
-	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
4777
-	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
4778
-      fi
4779
-
4780
-      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
4781
-	# Replace the output file specification.
4782
-	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
4783
-	link_command="$compile_command$compile_rpath"
4784
-
4785
-	# We have no uninstalled library dependencies, so finalize right now.
4786
-	$show "$link_command"
4787
-	$run eval "$link_command"
4788
-	exit_status=$?
4789
-
4790
-	# Delete the generated files.
4791
-	if test -n "$dlsyms"; then
4792
-	  $show "$rm $output_objdir/${outputname}S.${objext}"
4793
-	  $run $rm "$output_objdir/${outputname}S.${objext}"
4794
-	fi
4795
-
4796
-	exit $exit_status
4797
-      fi
4798
-
4799
-      if test -n "$shlibpath_var"; then
4800
-	# We should set the shlibpath_var
4801
-	rpath=
4802
-	for dir in $temp_rpath; do
4803
-	  case $dir in
4804
-	  [\\/]* | [A-Za-z]:[\\/]*)
4805
-	    # Absolute path.
4806
-	    rpath="$rpath$dir:"
4807
-	    ;;
4808
-	  *)
4809
-	    # Relative path: add a thisdir entry.
4810
-	    rpath="$rpath\$thisdir/$dir:"
4811
-	    ;;
4812
-	  esac
4813
-	done
4814
-	temp_rpath="$rpath"
4815
-      fi
4816
-
4817
-      if test -n "$compile_shlibpath$finalize_shlibpath"; then
4818
-	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
4819
-      fi
4820
-      if test -n "$finalize_shlibpath"; then
4821
-	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
4822
-      fi
4823
-
4824
-      compile_var=
4825
-      finalize_var=
4826
-      if test -n "$runpath_var"; then
4827
-	if test -n "$perm_rpath"; then
4828
-	  # We should set the runpath_var.
4829
-	  rpath=
4830
-	  for dir in $perm_rpath; do
4831
-	    rpath="$rpath$dir:"
4832
-	  done
4833
-	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
4834
-	fi
4835
-	if test -n "$finalize_perm_rpath"; then
4836
-	  # We should set the runpath_var.
4837
-	  rpath=
4838
-	  for dir in $finalize_perm_rpath; do
4839
-	    rpath="$rpath$dir:"
4840
-	  done
4841
-	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
4842
-	fi
4843
-      fi
4844
-
4845
-      if test "$no_install" = yes; then
4846
-	# We don't need to create a wrapper script.
4847
-	link_command="$compile_var$compile_command$compile_rpath"
4848
-	# Replace the output file specification.
4849
-	link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4850
-	# Delete the old output file.
4851
-	$run $rm $output
4852
-	# Link the executable and exit
4853
-	$show "$link_command"
4854
-	$run eval "$link_command" || exit $?
4855
-	exit $EXIT_SUCCESS
4856
-      fi
4857
-
4858
-      if test "$hardcode_action" = relink; then
4859
-	# Fast installation is not supported
4860
-	link_command="$compile_var$compile_command$compile_rpath"
4861
-	relink_command="$finalize_var$finalize_command$finalize_rpath"
4862
-
4863
-	$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
4864
-	$echo "$modename: \`$output' will be relinked during installation" 1>&2
4865
-      else
4866
-	if test "$fast_install" != no; then
4867
-	  link_command="$finalize_var$compile_command$finalize_rpath"
4868
-	  if test "$fast_install" = yes; then
4869
-	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
4870
-	  else
4871
-	    # fast_install is set to needless
4872
-	    relink_command=
4873
-	  fi
4874
-	else
4875
-	  link_command="$compile_var$compile_command$compile_rpath"
4876
-	  relink_command="$finalize_var$finalize_command$finalize_rpath"
4877
-	fi
4878
-      fi
4879
-
4880
-      # Replace the output file specification.
4881
-      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
4882
-
4883
-      # Delete the old output files.
4884
-      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
4885
-
4886
-      $show "$link_command"
4887
-      $run eval "$link_command" || exit $?
4888
-
4889
-      # Now create the wrapper script.
4890
-      $show "creating $output"
4891
-
4892
-      # Quote the relink command for shipping.
4893
-      if test -n "$relink_command"; then
4894
-	# Preserve any variables that may affect compiler behavior
4895
-	for var in $variables_saved_for_relink; do
4896
-	  if eval test -z \"\${$var+set}\"; then
4897
-	    relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
4898
-	  elif eval var_value=\$$var; test -z "$var_value"; then
4899
-	    relink_command="$var=; export $var; $relink_command"
4900
-	  else
4901
-	    var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
4902
-	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
4903
-	  fi
4904
-	done
4905
-	relink_command="(cd `pwd`; $relink_command)"
4906
-	relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
4907
-      fi
4908
-
4909
-      # Quote $echo for shipping.
4910
-      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
4911
-	case $progpath in
4912
-	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
4913
-	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
4914
-	esac
4915
-	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
4916
-      else
4917
-	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
4918
-      fi
4919
-
4920
-      # Only actually do things if our run command is non-null.
4921
-      if test -z "$run"; then
4922
-	# win32 will think the script is a binary if it has
4923
-	# a .exe suffix, so we strip it off here.
4924
-	case $output in
4925
-	  *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
4926
-	esac
4927
-	# test for cygwin because mv fails w/o .exe extensions
4928
-	case $host in
4929
-	  *cygwin*)
4930
-	    exeext=.exe
4931
-	    outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
4932
-	  *) exeext= ;;
4933
-	esac
4934
-	case $host in
4935
-	  *cygwin* | *mingw* )
4936
-            output_name=`basename $output`
4937
-            output_path=`dirname $output`
4938
-            cwrappersource="$output_path/$objdir/lt-$output_name.c"
4939
-            cwrapper="$output_path/$output_name.exe"
4940
-            $rm $cwrappersource $cwrapper
4941
-            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
4942
-
4943
-	    cat > $cwrappersource <<EOF
4944
-
4945
-/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4946
-   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4947
-
4948
-   The $output program cannot be directly executed until all the libtool
4949
-   libraries that it depends on are installed.
4950
-
4951
-   This wrapper executable should never be moved out of the build directory.
4952
-   If it is, it will not operate correctly.
4953
-
4954
-   Currently, it simply execs the wrapper *script* "/bin/sh $output",
4955
-   but could eventually absorb all of the scripts functionality and
4956
-   exec $objdir/$outputname directly.
4957
-*/
4958
-EOF
4959
-	    cat >> $cwrappersource<<"EOF"
4960
-#include <stdio.h>
4961
-#include <stdlib.h>
4962
-#include <unistd.h>
4963
-#include <malloc.h>
4964
-#include <stdarg.h>
4965
-#include <assert.h>
4966
-#include <string.h>
4967
-#include <ctype.h>
4968
-#include <sys/stat.h>
4969
-
4970
-#if defined(PATH_MAX)
4971
-# define LT_PATHMAX PATH_MAX
4972
-#elif defined(MAXPATHLEN)
4973
-# define LT_PATHMAX MAXPATHLEN
4974
-#else
4975
-# define LT_PATHMAX 1024
4976
-#endif
4977
-
4978
-#ifndef DIR_SEPARATOR
4979
-# define DIR_SEPARATOR '/'
4980
-# define PATH_SEPARATOR ':'
4981
-#endif
4982
-
4983
-#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
4984
-  defined (__OS2__)
4985
-# define HAVE_DOS_BASED_FILE_SYSTEM
4986
-# ifndef DIR_SEPARATOR_2
4987
-#  define DIR_SEPARATOR_2 '\\'
4988
-# endif
4989
-# ifndef PATH_SEPARATOR_2
4990
-#  define PATH_SEPARATOR_2 ';'
4991
-# endif
4992
-#endif
4993
-
4994
-#ifndef DIR_SEPARATOR_2
4995
-# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
4996
-#else /* DIR_SEPARATOR_2 */
4997
-# define IS_DIR_SEPARATOR(ch) \
4998
-        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
4999
-#endif /* DIR_SEPARATOR_2 */
5000
-
5001
-#ifndef PATH_SEPARATOR_2
5002
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
5003
-#else /* PATH_SEPARATOR_2 */
5004
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
5005
-#endif /* PATH_SEPARATOR_2 */
5006
-
5007
-#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
5008
-#define XFREE(stale) do { \
5009
-  if (stale) { free ((void *) stale); stale = 0; } \
5010
-} while (0)
5011
-
5012
-/* -DDEBUG is fairly common in CFLAGS.  */
5013
-#undef DEBUG
5014
-#if defined DEBUGWRAPPER
5015
-# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
5016
-#else
5017
-# define DEBUG(format, ...)
5018
-#endif
5019
-
5020
-const char *program_name = NULL;
5021
-
5022
-void * xmalloc (size_t num);
5023
-char * xstrdup (const char *string);
5024
-const char * base_name (const char *name);
5025
-char * find_executable(const char *wrapper);
5026
-int    check_executable(const char *path);
5027
-char * strendzap(char *str, const char *pat);
5028
-void lt_fatal (const char *message, ...);
5029
-
5030
-int
5031
-main (int argc, char *argv[])
5032
-{
5033
-  char **newargz;
5034
-  int i;
5035
-
5036
-  program_name = (char *) xstrdup (base_name (argv[0]));
5037
-  DEBUG("(main) argv[0]      : %s\n",argv[0]);
5038
-  DEBUG("(main) program_name : %s\n",program_name);
5039
-  newargz = XMALLOC(char *, argc+2);
5040
-EOF
5041
-
5042
-            cat >> $cwrappersource <<EOF
5043
-  newargz[0] = (char *) xstrdup("$SHELL");
5044
-EOF
5045
-
5046
-            cat >> $cwrappersource <<"EOF"
5047
-  newargz[1] = find_executable(argv[0]);
5048
-  if (newargz[1] == NULL)
5049
-    lt_fatal("Couldn't find %s", argv[0]);
5050
-  DEBUG("(main) found exe at : %s\n",newargz[1]);
5051
-  /* we know the script has the same name, without the .exe */
5052
-  /* so make sure newargz[1] doesn't end in .exe */
5053
-  strendzap(newargz[1],".exe");
5054
-  for (i = 1; i < argc; i++)
5055
-    newargz[i+1] = xstrdup(argv[i]);
5056
-  newargz[argc+1] = NULL;
5057
-
5058
-  for (i=0; i<argc+1; i++)
5059
-  {
5060
-    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
5061
-    ;
5062
-  }
5063
-
5064
-EOF
5065
-
5066
-            case $host_os in
5067
-              mingw*)
5068
-                cat >> $cwrappersource <<EOF
5069
-  execv("$SHELL",(char const **)newargz);
5070
-EOF
5071
-              ;;
5072
-              *)
5073
-                cat >> $cwrappersource <<EOF
5074
-  execv("$SHELL",newargz);
5075
-EOF
5076
-              ;;
5077
-            esac
5078
-
5079
-            cat >> $cwrappersource <<"EOF"
5080
-  return 127;
5081
-}
5082
-
5083
-void *
5084
-xmalloc (size_t num)
5085
-{
5086
-  void * p = (void *) malloc (num);
5087
-  if (!p)
5088
-    lt_fatal ("Memory exhausted");
5089
-
5090
-  return p;
5091
-}
5092
-
5093
-char *
5094
-xstrdup (const char *string)
5095
-{
5096
-  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5097
-;
5098
-}
5099
-
5100
-const char *
5101
-base_name (const char *name)
5102
-{
5103
-  const char *base;
5104
-
5105
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5106
-  /* Skip over the disk name in MSDOS pathnames. */
5107
-  if (isalpha ((unsigned char)name[0]) && name[1] == ':')
5108
-    name += 2;
5109
-#endif
5110
-
5111
-  for (base = name; *name; name++)
5112
-    if (IS_DIR_SEPARATOR (*name))
5113
-      base = name + 1;
5114
-  return base;
5115
-}
5116
-
5117
-int
5118
-check_executable(const char * path)
5119
-{
5120
-  struct stat st;
5121
-
5122
-  DEBUG("(check_executable)  : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
5123
-  if ((!path) || (!*path))
5124
-    return 0;
5125
-
5126
-  if ((stat (path, &st) >= 0) &&
5127
-      (
5128
-        /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
5129
-#if defined (S_IXOTH)
5130
-       ((st.st_mode & S_IXOTH) == S_IXOTH) ||
5131
-#endif
5132
-#if defined (S_IXGRP)
5133
-       ((st.st_mode & S_IXGRP) == S_IXGRP) ||
5134
-#endif
5135
-       ((st.st_mode & S_IXUSR) == S_IXUSR))
5136
-      )
5137
-    return 1;
5138
-  else
5139
-    return 0;
5140
-}
5141
-
5142
-/* Searches for the full path of the wrapper.  Returns
5143
-   newly allocated full path name if found, NULL otherwise */
5144
-char *
5145
-find_executable (const char* wrapper)
5146
-{
5147
-  int has_slash = 0;
5148
-  const char* p;
5149
-  const char* p_next;
5150
-  /* static buffer for getcwd */
5151
-  char tmp[LT_PATHMAX + 1];
5152
-  int tmp_len;
5153
-  char* concat_name;
5154
-
5155
-  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
5156
-
5157
-  if ((wrapper == NULL) || (*wrapper == '\0'))
5158
-    return NULL;
5159
-
5160
-  /* Absolute path? */
5161
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5162
-  if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
5163
-  {
5164
-    concat_name = xstrdup (wrapper);
5165
-    if (check_executable(concat_name))
5166
-      return concat_name;
5167
-    XFREE(concat_name);
5168
-  }
5169
-  else
5170
-  {
5171
-#endif
5172
-    if (IS_DIR_SEPARATOR (wrapper[0]))
5173
-    {
5174
-      concat_name = xstrdup (wrapper);
5175
-      if (check_executable(concat_name))
5176
-        return concat_name;
5177
-      XFREE(concat_name);
5178
-    }
5179
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5180
-  }
5181
-#endif
5182
-
5183
-  for (p = wrapper; *p; p++)
5184
-    if (*p == '/')
5185
-    {
5186
-      has_slash = 1;
5187
-      break;
5188
-    }
5189
-  if (!has_slash)
5190
-  {
5191
-    /* no slashes; search PATH */
5192
-    const char* path = getenv ("PATH");
5193
-    if (path != NULL)
5194
-    {
5195
-      for (p = path; *p; p = p_next)
5196
-      {
5197
-        const char* q;
5198
-        size_t p_len;
5199
-        for (q = p; *q; q++)
5200
-          if (IS_PATH_SEPARATOR(*q))
5201
-            break;
5202
-        p_len = q - p;
5203
-        p_next = (*q == '\0' ? q : q + 1);
5204
-        if (p_len == 0)
5205
-        {
5206
-          /* empty path: current directory */
5207
-          if (getcwd (tmp, LT_PATHMAX) == NULL)
5208
-            lt_fatal ("getcwd failed");
5209
-          tmp_len = strlen(tmp);
5210
-          concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5211
-          memcpy (concat_name, tmp, tmp_len);
5212
-          concat_name[tmp_len] = '/';
5213
-          strcpy (concat_name + tmp_len + 1, wrapper);
5214
-        }
5215
-        else
5216
-        {
5217
-          concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
5218
-          memcpy (concat_name, p, p_len);
5219
-          concat_name[p_len] = '/';
5220
-          strcpy (concat_name + p_len + 1, wrapper);
5221
-        }
5222
-        if (check_executable(concat_name))
5223
-          return concat_name;
5224
-        XFREE(concat_name);
5225
-      }
5226
-    }
5227
-    /* not found in PATH; assume curdir */
5228
-  }
5229
-  /* Relative path | not found in path: prepend cwd */
5230
-  if (getcwd (tmp, LT_PATHMAX) == NULL)
5231
-    lt_fatal ("getcwd failed");
5232
-  tmp_len = strlen(tmp);
5233
-  concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5234
-  memcpy (concat_name, tmp, tmp_len);
5235
-  concat_name[tmp_len] = '/';
5236
-  strcpy (concat_name + tmp_len + 1, wrapper);
5237
-
5238
-  if (check_executable(concat_name))
5239
-    return concat_name;
5240
-  XFREE(concat_name);
5241
-  return NULL;
5242
-}
5243
-
5244
-char *
5245
-strendzap(char *str, const char *pat)
5246
-{
5247
-  size_t len, patlen;
5248
-
5249
-  assert(str != NULL);
5250
-  assert(pat != NULL);
5251
-
5252
-  len = strlen(str);
5253
-  patlen = strlen(pat);
5254
-
5255
-  if (patlen <= len)
5256
-  {
5257
-    str += len - patlen;
5258
-    if (strcmp(str, pat) == 0)
5259
-      *str = '\0';
5260
-  }
5261
-  return str;
5262
-}
5263
-
5264
-static void
5265
-lt_error_core (int exit_status, const char * mode,
5266
-          const char * message, va_list ap)
5267
-{
5268
-  fprintf (stderr, "%s: %s: ", program_name, mode);
5269
-  vfprintf (stderr, message, ap);
5270
-  fprintf (stderr, ".\n");
5271
-
5272
-  if (exit_status >= 0)
5273
-    exit (exit_status);
5274
-}
5275
-
5276
-void
5277
-lt_fatal (const char *message, ...)
5278
-{
5279
-  va_list ap;
5280
-  va_start (ap, message);
5281
-  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
5282
-  va_end (ap);
5283
-}
5284
-EOF
5285
-          # we should really use a build-platform specific compiler
5286
-          # here, but OTOH, the wrappers (shell script and this C one)
5287
-          # are only useful if you want to execute the "real" binary.
5288
-          # Since the "real" binary is built for $host, then this
5289
-          # wrapper might as well be built for $host, too.
5290
-          $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
5291
-          ;;
5292
-        esac
5293
-        $rm $output
5294
-        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
5295
-
5296
-	$echo > $output "\
5297
-#! $SHELL
5298
-
5299
-# $output - temporary wrapper script for $objdir/$outputname
5300
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5301
-#
5302
-# The $output program cannot be directly executed until all the libtool
5303
-# libraries that it depends on are installed.
5304
-#
5305
-# This wrapper script should never be moved out of the build directory.
5306
-# If it is, it will not operate correctly.
5307
-
5308
-# Sed substitution that helps us do robust quoting.  It backslashifies
5309
-# metacharacters that are still active within double-quoted strings.
5310
-Xsed='${SED} -e 1s/^X//'
5311
-sed_quote_subst='$sed_quote_subst'
5312
-
5313
-# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
5314
-if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
5315
-  emulate sh
5316
-  NULLCMD=:
5317
-  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
5318
-  # is contrary to our usage.  Disable this feature.
5319
-  alias -g '\${1+\"\$@\"}'='\"\$@\"'
5320
-  setopt NO_GLOB_SUBST
5321
-else
5322
-  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
5323
-fi
5324
-BIN_SH=xpg4; export BIN_SH # for Tru64
5325
-DUALCASE=1; export DUALCASE # for MKS sh
5326
-
5327
-# The HP-UX ksh and POSIX shell print the target directory to stdout
5328
-# if CDPATH is set.
5329
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5330
-
5331
-relink_command=\"$relink_command\"
5332
-
5333
-# This environment variable determines our operation mode.
5334
-if test \"\$libtool_install_magic\" = \"$magic\"; then
5335
-  # install mode needs the following variable:
5336
-  notinst_deplibs='$notinst_deplibs'
5337
-else
5338
-  # When we are sourced in execute mode, \$file and \$echo are already set.
5339
-  if test \"\$libtool_execute_magic\" != \"$magic\"; then
5340
-    echo=\"$qecho\"
5341
-    file=\"\$0\"
5342
-    # Make sure echo works.
5343
-    if test \"X\$1\" = X--no-reexec; then
5344
-      # Discard the --no-reexec flag, and continue.
5345
-      shift
5346
-    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
5347
-      # Yippee, \$echo works!
5348
-      :
5349
-    else
5350
-      # Restart under the correct shell, and then maybe \$echo will work.
5351
-      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
5352
-    fi
5353
-  fi\
5354
-"
5355
-	$echo >> $output "\
5356
-
5357
-  # Find the directory that this script lives in.
5358
-  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
5359
-  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5360
-
5361
-  # Follow symbolic links until we get to the real thisdir.
5362
-  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
5363
-  while test -n \"\$file\"; do
5364
-    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
5365
-
5366
-    # If there was a directory component, then change thisdir.
5367
-    if test \"x\$destdir\" != \"x\$file\"; then
5368
-      case \"\$destdir\" in
5369
-      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5370
-      *) thisdir=\"\$thisdir/\$destdir\" ;;
5371
-      esac
5372
-    fi
5373
-
5374
-    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
5375
-    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
5376
-  done
5377
-
5378
-  # Try to get the absolute directory name.
5379
-  absdir=\`cd \"\$thisdir\" && pwd\`
5380
-  test -n \"\$absdir\" && thisdir=\"\$absdir\"
5381
-"
5382
-
5383
-	if test "$fast_install" = yes; then
5384
-	  $echo >> $output "\
5385
-  program=lt-'$outputname'$exeext
5386
-  progdir=\"\$thisdir/$objdir\"
5387
-
5388
-  if test ! -f \"\$progdir/\$program\" || \\
5389
-     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5390
-       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5391
-
5392
-    file=\"\$\$-\$program\"
5393
-
5394
-    if test ! -d \"\$progdir\"; then
5395
-      $mkdir \"\$progdir\"
5396
-    else
5397
-      $rm \"\$progdir/\$file\"
5398
-    fi"
5399
-
5400
-	  $echo >> $output "\
5401
-
5402
-    # relink executable if necessary
5403
-    if test -n \"\$relink_command\"; then
5404
-      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5405
-      else
5406
-	$echo \"\$relink_command_output\" >&2
5407
-	$rm \"\$progdir/\$file\"
5408
-	exit $EXIT_FAILURE
5409
-      fi
5410
-    fi
5411
-
5412
-    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5413
-    { $rm \"\$progdir/\$program\";
5414
-      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5415
-    $rm \"\$progdir/\$file\"
5416
-  fi"
5417
-	else
5418
-	  $echo >> $output "\
5419
-  program='$outputname'
5420
-  progdir=\"\$thisdir/$objdir\"
5421
-"
5422
-	fi
5423
-
5424
-	$echo >> $output "\
5425
-
5426
-  if test -f \"\$progdir/\$program\"; then"
5427
-
5428
-	# Export our shlibpath_var if we have one.
5429
-	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5430
-	  $echo >> $output "\
5431
-    # Add our own library path to $shlibpath_var
5432
-    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5433
-
5434
-    # Some systems cannot cope with colon-terminated $shlibpath_var
5435
-    # The second colon is a workaround for a bug in BeOS R4 sed
5436
-    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
5437
-
5438
-    export $shlibpath_var
5439
-"
5440
-	fi
5441
-
5442
-	# fixup the dll searchpath if we need to.
5443
-	if test -n "$dllsearchpath"; then
5444
-	  $echo >> $output "\
5445
-    # Add the dll search path components to the executable PATH
5446
-    PATH=$dllsearchpath:\$PATH
5447
-"
5448
-	fi
5449
-
5450
-	$echo >> $output "\
5451
-    if test \"\$libtool_execute_magic\" != \"$magic\"; then
5452
-      # Run the actual program with our arguments.
5453
-"
5454
-	case $host in
5455
-	# Backslashes separate directories on plain windows
5456
-	*-*-mingw | *-*-os2*)
5457
-	  $echo >> $output "\
5458
-      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
5459
-"
5460
-	  ;;
5461
-
5462
-	*)
5463
-	  $echo >> $output "\
5464
-      exec \"\$progdir/\$program\" \${1+\"\$@\"}
5465
-"
5466
-	  ;;
5467
-	esac
5468
-	$echo >> $output "\
5469
-      \$echo \"\$0: cannot exec \$program \$*\"
5470
-      exit $EXIT_FAILURE
5471
-    fi
5472
-  else
5473
-    # The program doesn't exist.
5474
-    \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
5475
-    \$echo \"This script is just a wrapper for \$program.\" 1>&2
5476
-    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5477
-    exit $EXIT_FAILURE
5478
-  fi
5479
-fi\
5480
-"
5481
-	chmod +x $output
5482
-      fi
5483
-      exit $EXIT_SUCCESS
5484
-      ;;
5485
-    esac
5486
-
5487
-    # See if we need to build an old-fashioned archive.
5488
-    for oldlib in $oldlibs; do
5489
-
5490
-      if test "$build_libtool_libs" = convenience; then
5491
-	oldobjs="$libobjs_save"
5492
-	addlibs="$convenience"
5493
-	build_libtool_libs=no
5494
-      else
5495
-	if test "$build_libtool_libs" = module; then
5496
-	  oldobjs="$libobjs_save"
5497
-	  build_libtool_libs=no
5498
-	else
5499
-	  oldobjs="$old_deplibs $non_pic_objects"
5500
-	fi
5501
-	addlibs="$old_convenience"
5502
-      fi
5503
-
5504
-      if test -n "$addlibs"; then
5505
-	gentop="$output_objdir/${outputname}x"
5506
-	generated="$generated $gentop"
5507
-
5508
-	func_extract_archives $gentop $addlibs
5509
-	oldobjs="$oldobjs $func_extract_archives_result"
5510
-      fi
5511
-
5512
-      # Do each command in the archive commands.
5513
-      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5514
-       cmds=$old_archive_from_new_cmds
5515
-      else
5516
-	# POSIX demands no paths to be encoded in archives.  We have
5517
-	# to avoid creating archives with duplicate basenames if we
5518
-	# might have to extract them afterwards, e.g., when creating a
5519
-	# static archive out of a convenience library, or when linking
5520
-	# the entirety of a libtool archive into another (currently
5521
-	# not supported by libtool).
5522
-	if (for obj in $oldobjs
5523
-	    do
5524
-	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
5525
-	    done | sort | sort -uc >/dev/null 2>&1); then
5526
-	  :
5527
-	else
5528
-	  $echo "copying selected object files to avoid basename conflicts..."
5529
-
5530
-	  if test -z "$gentop"; then
5531
-	    gentop="$output_objdir/${outputname}x"
5532
-	    generated="$generated $gentop"
5533
-
5534
-	    $show "${rm}r $gentop"
5535
-	    $run ${rm}r "$gentop"
5536
-	    $show "$mkdir $gentop"
5537
-	    $run $mkdir "$gentop"
5538
-	    exit_status=$?
5539
-	    if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
5540
-	      exit $exit_status
5541
-	    fi
5542
-	  fi
5543
-
5544
-	  save_oldobjs=$oldobjs
5545
-	  oldobjs=
5546
-	  counter=1
5547
-	  for obj in $save_oldobjs
5548
-	  do
5549
-	    objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
5550
-	    case " $oldobjs " in
5551
-	    " ") oldobjs=$obj ;;
5552
-	    *[\ /]"$objbase "*)
5553
-	      while :; do
5554
-		# Make sure we don't pick an alternate name that also
5555
-		# overlaps.
5556
-		newobj=lt$counter-$objbase
5557
-		counter=`expr $counter + 1`
5558
-		case " $oldobjs " in
5559
-		*[\ /]"$newobj "*) ;;
5560
-		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
5561
-		esac
5562
-	      done
5563
-	      $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5564
-	      $run ln "$obj" "$gentop/$newobj" ||
5565
-	      $run cp "$obj" "$gentop/$newobj"
5566
-	      oldobjs="$oldobjs $gentop/$newobj"
5567
-	      ;;
5568
-	    *) oldobjs="$oldobjs $obj" ;;
5569
-	    esac
5570
-	  done
5571
-	fi
5572
-
5573
-	eval cmds=\"$old_archive_cmds\"
5574
-
5575
-	if len=`expr "X$cmds" : ".*"` &&
5576
-	     test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5577
-	  cmds=$old_archive_cmds
5578
-	else
5579
-	  # the command line is too long to link in one step, link in parts
5580
-	  $echo "using piecewise archive linking..."
5581
-	  save_RANLIB=$RANLIB
5582
-	  RANLIB=:
5583
-	  objlist=
5584
-	  concat_cmds=
5585
-	  save_oldobjs=$oldobjs
5586
-
5587
-	  # Is there a better way of finding the last object in the list?
5588
-	  for obj in $save_oldobjs
5589
-	  do
5590
-	    last_oldobj=$obj
5591
-	  done
5592
-	  for obj in $save_oldobjs
5593
-	  do
5594
-	    oldobjs="$objlist $obj"
5595
-	    objlist="$objlist $obj"
5596
-	    eval test_cmds=\"$old_archive_cmds\"
5597
-	    if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
5598
-	       test "$len" -le "$max_cmd_len"; then
5599
-	      :
5600
-	    else
5601
-	      # the above command should be used before it gets too long
5602
-	      oldobjs=$objlist
5603
-	      if test "$obj" = "$last_oldobj" ; then
5604
-	        RANLIB=$save_RANLIB
5605
-	      fi
5606
-	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
5607
-	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
5608
-	      objlist=
5609
-	    fi
5610
-	  done
5611
-	  RANLIB=$save_RANLIB
5612
-	  oldobjs=$objlist
5613
-	  if test "X$oldobjs" = "X" ; then
5614
-	    eval cmds=\"\$concat_cmds\"
5615
-	  else
5616
-	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
5617
-	  fi
5618
-	fi
5619
-      fi
5620
-      save_ifs="$IFS"; IFS='~'
5621
-      for cmd in $cmds; do
5622
-        eval cmd=\"$cmd\"
5623
-	IFS="$save_ifs"
5624
-	$show "$cmd"
5625
-	$run eval "$cmd" || exit $?
5626
-      done
5627
-      IFS="$save_ifs"
5628
-    done
5629
-
5630
-    if test -n "$generated"; then
5631
-      $show "${rm}r$generated"
5632
-      $run ${rm}r$generated
5633
-    fi
5634
-
5635
-    # Now create the libtool archive.
5636
-    case $output in
5637
-    *.la)
5638
-      old_library=
5639
-      test "$build_old_libs" = yes && old_library="$libname.$libext"
5640
-      $show "creating $output"
5641
-
5642
-      # Preserve any variables that may affect compiler behavior
5643
-      for var in $variables_saved_for_relink; do
5644
-	if eval test -z \"\${$var+set}\"; then
5645
-	  relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5646
-	elif eval var_value=\$$var; test -z "$var_value"; then
5647
-	  relink_command="$var=; export $var; $relink_command"
5648
-	else
5649
-	  var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5650
-	  relink_command="$var=\"$var_value\"; export $var; $relink_command"
5651
-	fi
5652
-      done
5653
-      # Quote the link command for shipping.
5654
-      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
5655
-      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
5656
-      if test "$hardcode_automatic" = yes ; then
5657
-	relink_command=
5658
-      fi
5659
-
5660
-
5661
-      # Only create the output if not a dry run.
5662
-      if test -z "$run"; then
5663
-	for installed in no yes; do
5664
-	  if test "$installed" = yes; then
5665
-	    if test -z "$install_libdir"; then
5666
-	      break
5667
-	    fi
5668
-	    output="$output_objdir/$outputname"i
5669
-	    # Replace all uninstalled libtool libraries with the installed ones
5670
-	    newdependency_libs=
5671
-	    for deplib in $dependency_libs; do
5672
-	      case $deplib in
5673
-	      *.la)
5674
-		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
5675
-		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5676
-		if test -z "$libdir"; then
5677
-		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
5678
-		  exit $EXIT_FAILURE
5679
-		fi
5680
-		newdependency_libs="$newdependency_libs $libdir/$name"
5681
-		;;
5682
-	      *) newdependency_libs="$newdependency_libs $deplib" ;;
5683
-	      esac
5684
-	    done
5685
-	    dependency_libs="$newdependency_libs"
5686
-	    newdlfiles=
5687
-	    for lib in $dlfiles; do
5688
-	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5689
-	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5690
-	      if test -z "$libdir"; then
5691
-		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5692
-		exit $EXIT_FAILURE
5693
-	      fi
5694
-	      newdlfiles="$newdlfiles $libdir/$name"
5695
-	    done
5696
-	    dlfiles="$newdlfiles"
5697
-	    newdlprefiles=
5698
-	    for lib in $dlprefiles; do
5699
-	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5700
-	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5701
-	      if test -z "$libdir"; then
5702
-		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5703
-		exit $EXIT_FAILURE
5704
-	      fi
5705
-	      newdlprefiles="$newdlprefiles $libdir/$name"
5706
-	    done
5707
-	    dlprefiles="$newdlprefiles"
5708
-	  else
5709
-	    newdlfiles=
5710
-	    for lib in $dlfiles; do
5711
-	      case $lib in
5712
-		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5713
-		*) abs=`pwd`"/$lib" ;;
5714
-	      esac
5715
-	      newdlfiles="$newdlfiles $abs"
5716
-	    done
5717
-	    dlfiles="$newdlfiles"
5718
-	    newdlprefiles=
5719
-	    for lib in $dlprefiles; do
5720
-	      case $lib in
5721
-		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5722
-		*) abs=`pwd`"/$lib" ;;
5723
-	      esac
5724
-	      newdlprefiles="$newdlprefiles $abs"
5725
-	    done
5726
-	    dlprefiles="$newdlprefiles"
5727
-	  fi
5728
-	  $rm $output
5729
-	  # place dlname in correct position for cygwin
5730
-	  tdlname=$dlname
5731
-	  case $host,$output,$installed,$module,$dlname in
5732
-	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
5733
-	  esac
5734
-	  $echo > $output "\
5735
-# $outputname - a libtool library file
5736
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5737
-#
5738
-# Please DO NOT delete this file!
5739
-# It is necessary for linking the library.
5740
-
5741
-# The name that we can dlopen(3).
5742
-dlname='$tdlname'
5743
-
5744
-# Names of this library.
5745
-library_names='$library_names'
5746
-
5747
-# The name of the static archive.
5748
-old_library='$old_library'
5749
-
5750
-# Libraries that this one depends upon.
5751
-dependency_libs='$dependency_libs'
5752
-
5753
-# Version information for $libname.
5754
-current=$current
5755
-age=$age
5756
-revision=$revision
5757
-
5758
-# Is this an already installed library?
5759
-installed=$installed
5760
-
5761
-# Should we warn about portability when linking against -modules?
5762
-shouldnotlink=$module
5763
-
5764
-# Files to dlopen/dlpreopen
5765
-dlopen='$dlfiles'
5766
-dlpreopen='$dlprefiles'
5767
-
5768
-# Directory that this library needs to be installed in:
5769
-libdir='$install_libdir'"
5770
-	  if test "$installed" = no && test "$need_relink" = yes; then
5771
-	    $echo >> $output "\
5772
-relink_command=\"$relink_command\""
5773
-	  fi
5774
-	done
5775
-      fi
5776
-
5777
-      # Do a symbolic link so that the libtool archive can be found in
5778
-      # LD_LIBRARY_PATH before the program is installed.
5779
-      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
5780
-      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
5781
-      ;;
5782
-    esac
5783
-    exit $EXIT_SUCCESS
5784
-    ;;
5785
-
5786
-  # libtool install mode
5787
-  install)
5788
-    modename="$modename: install"
5789
-
5790
-    # There may be an optional sh(1) argument at the beginning of
5791
-    # install_prog (especially on Windows NT).
5792
-    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
5793
-       # Allow the use of GNU shtool's install command.
5794
-       $echo "X$nonopt" | grep shtool > /dev/null; then
5795
-      # Aesthetically quote it.
5796
-      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5797
-      case $arg in
5798
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
5799
-	arg="\"$arg\""
5800
-	;;
5801
-      esac
5802
-      install_prog="$arg "
5803
-      arg="$1"
5804
-      shift
5805
-    else
5806
-      install_prog=
5807
-      arg=$nonopt
5808
-    fi
5809
-
5810
-    # The real first argument should be the name of the installation program.
5811
-    # Aesthetically quote it.
5812
-    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5813
-    case $arg in
5814
-    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
5815
-      arg="\"$arg\""
5816
-      ;;
5817
-    esac
5818
-    install_prog="$install_prog$arg"
5819
-
5820
-    # We need to accept at least all the BSD install flags.
5821
-    dest=
5822
-    files=
5823
-    opts=
5824
-    prev=
5825
-    install_type=
5826
-    isdir=no
5827
-    stripme=
5828
-    for arg
5829
-    do
5830
-      if test -n "$dest"; then
5831
-	files="$files $dest"
5832
-	dest=$arg
5833
-	continue
5834
-      fi
5835
-
5836
-      case $arg in
5837
-      -d) isdir=yes ;;
5838
-      -f) 
5839
-      	case " $install_prog " in
5840
-	*[\\\ /]cp\ *) ;;
5841
-	*) prev=$arg ;;
5842
-	esac
5843
-	;;
5844
-      -g | -m | -o) prev=$arg ;;
5845
-      -s)
5846
-	stripme=" -s"
5847
-	continue
5848
-	;;
5849
-      -*)
5850
-	;;
5851
-      *)
5852
-	# If the previous option needed an argument, then skip it.
5853
-	if test -n "$prev"; then
5854
-	  prev=
5855
-	else
5856
-	  dest=$arg
5857
-	  continue
5858
-	fi
5859
-	;;
5860
-      esac
5861
-
5862
-      # Aesthetically quote the argument.
5863
-      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5864
-      case $arg in
5865
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
5866
-	arg="\"$arg\""
5867
-	;;
5868
-      esac
5869
-      install_prog="$install_prog $arg"
5870
-    done
5871
-
5872
-    if test -z "$install_prog"; then
5873
-      $echo "$modename: you must specify an install program" 1>&2
5874
-      $echo "$help" 1>&2
5875
-      exit $EXIT_FAILURE
5876
-    fi
5877
-
5878
-    if test -n "$prev"; then
5879
-      $echo "$modename: the \`$prev' option requires an argument" 1>&2
5880
-      $echo "$help" 1>&2
5881
-      exit $EXIT_FAILURE
5882
-    fi
5883
-
5884
-    if test -z "$files"; then
5885
-      if test -z "$dest"; then
5886
-	$echo "$modename: no file or destination specified" 1>&2
5887
-      else
5888
-	$echo "$modename: you must specify a destination" 1>&2
5889
-      fi
5890
-      $echo "$help" 1>&2
5891
-      exit $EXIT_FAILURE
5892
-    fi
5893
-
5894
-    # Strip any trailing slash from the destination.
5895
-    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
5896
-
5897
-    # Check to see that the destination is a directory.
5898
-    test -d "$dest" && isdir=yes
5899
-    if test "$isdir" = yes; then
5900
-      destdir="$dest"
5901
-      destname=
5902
-    else
5903
-      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
5904
-      test "X$destdir" = "X$dest" && destdir=.
5905
-      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
5906
-
5907
-      # Not a directory, so check to see that there is only one file specified.
5908
-      set dummy $files
5909
-      if test "$#" -gt 2; then
5910
-	$echo "$modename: \`$dest' is not a directory" 1>&2
5911
-	$echo "$help" 1>&2
5912
-	exit $EXIT_FAILURE
5913
-      fi
5914
-    fi
5915
-    case $destdir in
5916
-    [\\/]* | [A-Za-z]:[\\/]*) ;;
5917
-    *)
5918
-      for file in $files; do
5919
-	case $file in
5920
-	*.lo) ;;
5921
-	*)
5922
-	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
5923
-	  $echo "$help" 1>&2
5924
-	  exit $EXIT_FAILURE
5925
-	  ;;
5926
-	esac
5927
-      done
5928
-      ;;
5929
-    esac
5930
-
5931
-    # This variable tells wrapper scripts just to set variables rather
5932
-    # than running their programs.
5933
-    libtool_install_magic="$magic"
5934
-
5935
-    staticlibs=
5936
-    future_libdirs=
5937
-    current_libdirs=
5938
-    for file in $files; do
5939
-
5940
-      # Do each installation.
5941
-      case $file in
5942
-      *.$libext)
5943
-	# Do the static libraries later.
5944
-	staticlibs="$staticlibs $file"
5945
-	;;
5946
-
5947
-      *.la)
5948
-	# Check to see that this really is a libtool archive.
5949
-	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
5950
-	else
5951
-	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
5952
-	  $echo "$help" 1>&2
5953
-	  exit $EXIT_FAILURE
5954
-	fi
5955
-
5956
-	library_names=
5957
-	old_library=
5958
-	relink_command=
5959
-	# If there is no directory component, then add one.
5960
-	case $file in
5961
-	*/* | *\\*) . $file ;;
5962
-	*) . ./$file ;;
5963
-	esac
5964
-
5965
-	# Add the libdir to current_libdirs if it is the destination.
5966
-	if test "X$destdir" = "X$libdir"; then
5967
-	  case "$current_libdirs " in
5968
-	  *" $libdir "*) ;;
5969
-	  *) current_libdirs="$current_libdirs $libdir" ;;
5970
-	  esac
5971
-	else
5972
-	  # Note the libdir as a future libdir.
5973
-	  case "$future_libdirs " in
5974
-	  *" $libdir "*) ;;
5975
-	  *) future_libdirs="$future_libdirs $libdir" ;;
5976
-	  esac
5977
-	fi
5978
-
5979
-	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
5980
-	test "X$dir" = "X$file/" && dir=
5981
-	dir="$dir$objdir"
5982
-
5983
-	if test -n "$relink_command"; then
5984
-	  # Determine the prefix the user has applied to our future dir.
5985
-	  inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
5986
-
5987
-	  # Don't allow the user to place us outside of our expected
5988
-	  # location b/c this prevents finding dependent libraries that
5989
-	  # are installed to the same prefix.
5990
-	  # At present, this check doesn't affect windows .dll's that
5991
-	  # are installed into $libdir/../bin (currently, that works fine)
5992
-	  # but it's something to keep an eye on.
5993
-	  if test "$inst_prefix_dir" = "$destdir"; then
5994
-	    $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
5995
-	    exit $EXIT_FAILURE
5996
-	  fi
5997
-
5998
-	  if test -n "$inst_prefix_dir"; then
5999
-	    # Stick the inst_prefix_dir data into the link command.
6000
-	    relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
6001
-	  else
6002
-	    relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
6003
-	  fi
6004
-
6005
-	  $echo "$modename: warning: relinking \`$file'" 1>&2
6006
-	  $show "$relink_command"
6007
-	  if $run eval "$relink_command"; then :
6008
-	  else
6009
-	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6010
-	    exit $EXIT_FAILURE
6011
-	  fi
6012
-	fi
6013
-
6014
-	# See the names of the shared library.
6015
-	set dummy $library_names
6016
-	if test -n "$2"; then
6017
-	  realname="$2"
6018
-	  shift
6019
-	  shift
6020
-
6021
-	  srcname="$realname"
6022
-	  test -n "$relink_command" && srcname="$realname"T
6023
-
6024
-	  # Install the shared library and build the symlinks.
6025
-	  $show "$install_prog $dir/$srcname $destdir/$realname"
6026
-	  $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
6027
-	  if test -n "$stripme" && test -n "$striplib"; then
6028
-	    $show "$striplib $destdir/$realname"
6029
-	    $run eval "$striplib $destdir/$realname" || exit $?
6030
-	  fi
6031
-
6032
-	  if test "$#" -gt 0; then
6033
-	    # Delete the old symlinks, and create new ones.
6034
-	    # Try `ln -sf' first, because the `ln' binary might depend on
6035
-	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
6036
-	    # so we also need to try rm && ln -s.
6037
-	    for linkname
6038
-	    do
6039
-	      if test "$linkname" != "$realname"; then
6040
-                $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
6041
-                $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
6042
-	      fi
6043
-	    done
6044
-	  fi
6045
-
6046
-	  # Do each command in the postinstall commands.
6047
-	  lib="$destdir/$realname"
6048
-	  cmds=$postinstall_cmds
6049
-	  save_ifs="$IFS"; IFS='~'
6050
-	  for cmd in $cmds; do
6051
-	    IFS="$save_ifs"
6052
-	    eval cmd=\"$cmd\"
6053
-	    $show "$cmd"
6054
-	    $run eval "$cmd" || {
6055
-	      lt_exit=$?
6056
-
6057
-	      # Restore the uninstalled library and exit
6058
-	      if test "$mode" = relink; then
6059
-		$run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
6060
-	      fi
6061
-
6062
-	      exit $lt_exit
6063
-	    }
6064
-	  done
6065
-	  IFS="$save_ifs"
6066
-	fi
6067
-
6068
-	# Install the pseudo-library for information purposes.
6069
-	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6070
-	instname="$dir/$name"i
6071
-	$show "$install_prog $instname $destdir/$name"
6072
-	$run eval "$install_prog $instname $destdir/$name" || exit $?
6073
-
6074
-	# Maybe install the static library, too.
6075
-	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
6076
-	;;
6077
-
6078
-      *.lo)
6079
-	# Install (i.e. copy) a libtool object.
6080
-
6081
-	# Figure out destination file name, if it wasn't already specified.
6082
-	if test -n "$destname"; then
6083
-	  destfile="$destdir/$destname"
6084
-	else
6085
-	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6086
-	  destfile="$destdir/$destfile"
6087
-	fi
6088
-
6089
-	# Deduce the name of the destination old-style object file.
6090
-	case $destfile in
6091
-	*.lo)
6092
-	  staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
6093
-	  ;;
6094
-	*.$objext)
6095
-	  staticdest="$destfile"
6096
-	  destfile=
6097
-	  ;;
6098
-	*)
6099
-	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
6100
-	  $echo "$help" 1>&2
6101
-	  exit $EXIT_FAILURE
6102
-	  ;;
6103
-	esac
6104
-
6105
-	# Install the libtool object if requested.
6106
-	if test -n "$destfile"; then
6107
-	  $show "$install_prog $file $destfile"
6108
-	  $run eval "$install_prog $file $destfile" || exit $?
6109
-	fi
6110
-
6111
-	# Install the old object if enabled.
6112
-	if test "$build_old_libs" = yes; then
6113
-	  # Deduce the name of the old-style object file.
6114
-	  staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
6115
-
6116
-	  $show "$install_prog $staticobj $staticdest"
6117
-	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
6118
-	fi
6119
-	exit $EXIT_SUCCESS
6120
-	;;
6121
-
6122
-      *)
6123
-	# Figure out destination file name, if it wasn't already specified.
6124
-	if test -n "$destname"; then
6125
-	  destfile="$destdir/$destname"
6126
-	else
6127
-	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6128
-	  destfile="$destdir/$destfile"
6129
-	fi
6130
-
6131
-	# If the file is missing, and there is a .exe on the end, strip it
6132
-	# because it is most likely a libtool script we actually want to
6133
-	# install
6134
-	stripped_ext=""
6135
-	case $file in
6136
-	  *.exe)
6137
-	    if test ! -f "$file"; then
6138
-	      file=`$echo $file|${SED} 's,.exe$,,'`
6139
-	      stripped_ext=".exe"
6140
-	    fi
6141
-	    ;;
6142
-	esac
6143
-
6144
-	# Do a test to see if this is really a libtool program.
6145
-	case $host in
6146
-	*cygwin*|*mingw*)
6147
-	    wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
6148
-	    ;;
6149
-	*)
6150
-	    wrapper=$file
6151
-	    ;;
6152
-	esac
6153
-	if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
6154
-	  notinst_deplibs=
6155
-	  relink_command=
6156
-
6157
-	  # Note that it is not necessary on cygwin/mingw to append a dot to
6158
-	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
6159
-	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
6160
-	  # `FILE.' does not work on cygwin managed mounts.
6161
-	  #
6162
-	  # If there is no directory component, then add one.
6163
-	  case $wrapper in
6164
-	  */* | *\\*) . ${wrapper} ;;
6165
-	  *) . ./${wrapper} ;;
6166
-	  esac
6167
-
6168
-	  # Check the variables that should have been set.
6169
-	  if test -z "$notinst_deplibs"; then
6170
-	    $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
6171
-	    exit $EXIT_FAILURE
6172
-	  fi
6173
-
6174
-	  finalize=yes
6175
-	  for lib in $notinst_deplibs; do
6176
-	    # Check to see that each library is installed.
6177
-	    libdir=
6178
-	    if test -f "$lib"; then
6179
-	      # If there is no directory component, then add one.
6180
-	      case $lib in
6181
-	      */* | *\\*) . $lib ;;
6182
-	      *) . ./$lib ;;
6183
-	      esac
6184
-	    fi
6185
-	    libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
6186
-	    if test -n "$libdir" && test ! -f "$libfile"; then
6187
-	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
6188
-	      finalize=no
6189
-	    fi
6190
-	  done
6191
-
6192
-	  relink_command=
6193
-	  # Note that it is not necessary on cygwin/mingw to append a dot to
6194
-	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
6195
-	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
6196
-	  # `FILE.' does not work on cygwin managed mounts.
6197
-	  #
6198
-	  # If there is no directory component, then add one.
6199
-	  case $wrapper in
6200
-	  */* | *\\*) . ${wrapper} ;;
6201
-	  *) . ./${wrapper} ;;
6202
-	  esac
6203
-
6204
-	  outputname=
6205
-	  if test "$fast_install" = no && test -n "$relink_command"; then
6206
-	    if test "$finalize" = yes && test -z "$run"; then
6207
-	      tmpdir=`func_mktempdir`
6208
-	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6209
-	      outputname="$tmpdir/$file"
6210
-	      # Replace the output file specification.
6211
-	      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
6212
-
6213
-	      $show "$relink_command"
6214
-	      if $run eval "$relink_command"; then :
6215
-	      else
6216
-		$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6217
-		${rm}r "$tmpdir"
6218
-		continue
6219
-	      fi
6220
-	      file="$outputname"
6221
-	    else
6222
-	      $echo "$modename: warning: cannot relink \`$file'" 1>&2
6223
-	    fi
6224
-	  else
6225
-	    # Install the binary that we compiled earlier.
6226
-	    file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6227
-	  fi
6228
-	fi
6229
-
6230
-	# remove .exe since cygwin /usr/bin/install will append another
6231
-	# one anyway 
6232
-	case $install_prog,$host in
6233
-	*/usr/bin/install*,*cygwin*)
6234
-	  case $file:$destfile in
6235
-	  *.exe:*.exe)
6236
-	    # this is ok
6237
-	    ;;
6238
-	  *.exe:*)
6239
-	    destfile=$destfile.exe
6240
-	    ;;
6241
-	  *:*.exe)
6242
-	    destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
6243
-	    ;;
6244
-	  esac
6245
-	  ;;
6246
-	esac
6247
-	$show "$install_prog$stripme $file $destfile"
6248
-	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
6249
-	test -n "$outputname" && ${rm}r "$tmpdir"
6250
-	;;
6251
-      esac
6252
-    done
6253
-
6254
-    for file in $staticlibs; do
6255
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6256
-
6257
-      # Set up the ranlib parameters.
6258
-      oldlib="$destdir/$name"
6259
-
6260
-      $show "$install_prog $file $oldlib"
6261
-      $run eval "$install_prog \$file \$oldlib" || exit $?
6262
-
6263
-      if test -n "$stripme" && test -n "$old_striplib"; then
6264
-	$show "$old_striplib $oldlib"
6265
-	$run eval "$old_striplib $oldlib" || exit $?
6266
-      fi
6267
-
6268
-      # Do each command in the postinstall commands.
6269
-      cmds=$old_postinstall_cmds
6270
-      save_ifs="$IFS"; IFS='~'
6271
-      for cmd in $cmds; do
6272
-	IFS="$save_ifs"
6273
-	eval cmd=\"$cmd\"
6274
-	$show "$cmd"
6275
-	$run eval "$cmd" || exit $?
6276
-      done
6277
-      IFS="$save_ifs"
6278
-    done
6279
-
6280
-    if test -n "$future_libdirs"; then
6281
-      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
6282
-    fi
6283
-
6284
-    if test -n "$current_libdirs"; then
6285
-      # Maybe just do a dry run.
6286
-      test -n "$run" && current_libdirs=" -n$current_libdirs"
6287
-      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
6288
-    else
6289
-      exit $EXIT_SUCCESS
6290
-    fi
6291
-    ;;
6292
-
6293
-  # libtool finish mode
6294
-  finish)
6295
-    modename="$modename: finish"
6296
-    libdirs="$nonopt"
6297
-    admincmds=
6298
-
6299
-    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
6300
-      for dir
6301
-      do
6302
-	libdirs="$libdirs $dir"
6303
-      done
6304
-
6305
-      for libdir in $libdirs; do
6306
-	if test -n "$finish_cmds"; then
6307
-	  # Do each command in the finish commands.
6308
-	  cmds=$finish_cmds
6309
-	  save_ifs="$IFS"; IFS='~'
6310
-	  for cmd in $cmds; do
6311
-	    IFS="$save_ifs"
6312
-	    eval cmd=\"$cmd\"
6313
-	    $show "$cmd"
6314
-	    $run eval "$cmd" || admincmds="$admincmds
6315
-       $cmd"
6316
-	  done
6317
-	  IFS="$save_ifs"
6318
-	fi
6319
-	if test -n "$finish_eval"; then
6320
-	  # Do the single finish_eval.
6321
-	  eval cmds=\"$finish_eval\"
6322
-	  $run eval "$cmds" || admincmds="$admincmds
6323
-       $cmds"
6324
-	fi
6325
-      done
6326
-    fi
6327
-
6328
-    # Exit here if they wanted silent mode.
6329
-    test "$show" = : && exit $EXIT_SUCCESS
6330
-
6331
-    $echo "X----------------------------------------------------------------------" | $Xsed
6332
-    $echo "Libraries have been installed in:"
6333
-    for libdir in $libdirs; do
6334
-      $echo "   $libdir"
6335
-    done
6336
-    $echo
6337
-    $echo "If you ever happen to want to link against installed libraries"
6338
-    $echo "in a given directory, LIBDIR, you must either use libtool, and"
6339
-    $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6340
-    $echo "flag during linking and do at least one of the following:"
6341
-    if test -n "$shlibpath_var"; then
6342
-      $echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
6343
-      $echo "     during execution"
6344
-    fi
6345
-    if test -n "$runpath_var"; then
6346
-      $echo "   - add LIBDIR to the \`$runpath_var' environment variable"
6347
-      $echo "     during linking"
6348
-    fi
6349
-    if test -n "$hardcode_libdir_flag_spec"; then
6350
-      libdir=LIBDIR
6351
-      eval flag=\"$hardcode_libdir_flag_spec\"
6352
-
6353
-      $echo "   - use the \`$flag' linker flag"
6354
-    fi
6355
-    if test -n "$admincmds"; then
6356
-      $echo "   - have your system administrator run these commands:$admincmds"
6357
-    fi
6358
-    if test -f /etc/ld.so.conf; then
6359
-      $echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6360
-    fi
6361
-    $echo
6362
-    $echo "See any operating system documentation about shared libraries for"
6363
-    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6364
-    $echo "X----------------------------------------------------------------------" | $Xsed
6365
-    exit $EXIT_SUCCESS
6366
-    ;;
6367
-
6368
-  # libtool execute mode
6369
-  execute)
6370
-    modename="$modename: execute"
6371
-
6372
-    # The first argument is the command name.
6373
-    cmd="$nonopt"
6374
-    if test -z "$cmd"; then
6375
-      $echo "$modename: you must specify a COMMAND" 1>&2
6376
-      $echo "$help"
6377
-      exit $EXIT_FAILURE
6378
-    fi
6379
-
6380
-    # Handle -dlopen flags immediately.
6381
-    for file in $execute_dlfiles; do
6382
-      if test ! -f "$file"; then
6383
-	$echo "$modename: \`$file' is not a file" 1>&2
6384
-	$echo "$help" 1>&2
6385
-	exit $EXIT_FAILURE
6386
-      fi
6387
-
6388
-      dir=
6389
-      case $file in
6390
-      *.la)
6391
-	# Check to see that this really is a libtool archive.
6392
-	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
6393
-	else
6394
-	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6395
-	  $echo "$help" 1>&2
6396
-	  exit $EXIT_FAILURE
6397
-	fi
6398
-
6399
-	# Read the libtool library.
6400
-	dlname=
6401
-	library_names=
6402
-
6403
-	# If there is no directory component, then add one.
6404
-	case $file in
6405
-	*/* | *\\*) . $file ;;
6406
-	*) . ./$file ;;
6407
-	esac
6408
-
6409
-	# Skip this library if it cannot be dlopened.
6410
-	if test -z "$dlname"; then
6411
-	  # Warn if it was a shared library.
6412
-	  test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6413
-	  continue
6414
-	fi
6415
-
6416
-	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6417
-	test "X$dir" = "X$file" && dir=.
6418
-
6419
-	if test -f "$dir/$objdir/$dlname"; then
6420
-	  dir="$dir/$objdir"
6421
-	else
6422
-	  if test ! -f "$dir/$dlname"; then
6423
-	    $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6424
-	    exit $EXIT_FAILURE
6425
-	  fi
6426
-	fi
6427
-	;;
6428
-
6429
-      *.lo)
6430
-	# Just add the directory containing the .lo file.
6431
-	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6432
-	test "X$dir" = "X$file" && dir=.
6433
-	;;
6434
-
6435
-      *)
6436
-	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6437
-	continue
6438
-	;;
6439
-      esac
6440
-
6441
-      # Get the absolute pathname.
6442
-      absdir=`cd "$dir" && pwd`
6443
-      test -n "$absdir" && dir="$absdir"
6444
-
6445
-      # Now add the directory to shlibpath_var.
6446
-      if eval "test -z \"\$$shlibpath_var\""; then
6447
-	eval "$shlibpath_var=\"\$dir\""
6448
-      else
6449
-	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6450
-      fi
6451
-    done
6452
-
6453
-    # This variable tells wrapper scripts just to set shlibpath_var
6454
-    # rather than running their programs.
6455
-    libtool_execute_magic="$magic"
6456
-
6457
-    # Check if any of the arguments is a wrapper script.
6458
-    args=
6459
-    for file
6460
-    do
6461
-      case $file in
6462
-      -*) ;;
6463
-      *)
6464
-	# Do a test to see if this is really a libtool program.
6465
-	if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6466
-	  # If there is no directory component, then add one.
6467
-	  case $file in
6468
-	  */* | *\\*) . $file ;;
6469
-	  *) . ./$file ;;
6470
-	  esac
6471
-
6472
-	  # Transform arg to wrapped name.
6473
-	  file="$progdir/$program"
6474
-	fi
6475
-	;;
6476
-      esac
6477
-      # Quote arguments (to preserve shell metacharacters).
6478
-      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6479
-      args="$args \"$file\""
6480
-    done
6481
-
6482
-    if test -z "$run"; then
6483
-      if test -n "$shlibpath_var"; then
6484
-	# Export the shlibpath_var.
6485
-	eval "export $shlibpath_var"
6486
-      fi
6487
-
6488
-      # Restore saved environment variables
6489
-      for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
6490
-      do
6491
-	eval "if test \"\${save_$lt_var+set}\" = set; then
6492
-		$lt_var=\$save_$lt_var; export $lt_var
6493
-	      fi"
6494
-      done
6495
-
6496
-      # Now prepare to actually exec the command.
6497
-      exec_cmd="\$cmd$args"
6498
-    else
6499
-      # Display what would be done.
6500
-      if test -n "$shlibpath_var"; then
6501
-	eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6502
-	$echo "export $shlibpath_var"
6503
-      fi
6504
-      $echo "$cmd$args"
6505
-      exit $EXIT_SUCCESS
6506
-    fi
6507
-    ;;
6508
-
6509
-  # libtool clean and uninstall mode
6510
-  clean | uninstall)
6511
-    modename="$modename: $mode"
6512
-    rm="$nonopt"
6513
-    files=
6514
-    rmforce=
6515
-    exit_status=0
6516
-
6517
-    # This variable tells wrapper scripts just to set variables rather
6518
-    # than running their programs.
6519
-    libtool_install_magic="$magic"
6520
-
6521
-    for arg
6522
-    do
6523
-      case $arg in
6524
-      -f) rm="$rm $arg"; rmforce=yes ;;
6525
-      -*) rm="$rm $arg" ;;
6526
-      *) files="$files $arg" ;;
6527
-      esac
6528
-    done
6529
-
6530
-    if test -z "$rm"; then
6531
-      $echo "$modename: you must specify an RM program" 1>&2
6532
-      $echo "$help" 1>&2
6533
-      exit $EXIT_FAILURE
6534
-    fi
6535
-
6536
-    rmdirs=
6537
-
6538
-    origobjdir="$objdir"
6539
-    for file in $files; do
6540
-      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6541
-      if test "X$dir" = "X$file"; then
6542
-	dir=.
6543
-	objdir="$origobjdir"
6544
-      else
6545
-	objdir="$dir/$origobjdir"
6546
-      fi
6547
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6548
-      test "$mode" = uninstall && objdir="$dir"
6549
-
6550
-      # Remember objdir for removal later, being careful to avoid duplicates
6551
-      if test "$mode" = clean; then
6552
-	case " $rmdirs " in
6553
-	  *" $objdir "*) ;;
6554
-	  *) rmdirs="$rmdirs $objdir" ;;
6555
-	esac
6556
-      fi
6557
-
6558
-      # Don't error if the file doesn't exist and rm -f was used.
6559
-      if (test -L "$file") >/dev/null 2>&1 \
6560
-	|| (test -h "$file") >/dev/null 2>&1 \
6561
-	|| test -f "$file"; then
6562
-	:
6563
-      elif test -d "$file"; then
6564
-	exit_status=1
6565
-	continue
6566
-      elif test "$rmforce" = yes; then
6567
-	continue
6568
-      fi
6569
-
6570
-      rmfiles="$file"
6571
-
6572
-      case $name in
6573
-      *.la)
6574
-	# Possibly a libtool archive, so verify it.
6575
-	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6576
-	  . $dir/$name
6577
-
6578
-	  # Delete the libtool libraries and symlinks.
6579
-	  for n in $library_names; do
6580
-	    rmfiles="$rmfiles $objdir/$n"
6581
-	  done
6582
-	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
6583
-
6584
-	  case "$mode" in
6585
-	  clean)
6586
-	    case "  $library_names " in
6587
-	    # "  " in the beginning catches empty $dlname
6588
-	    *" $dlname "*) ;;
6589
-	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
6590
-	    esac
6591
-	     test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
6592
-	    ;;
6593
-	  uninstall)
6594
-	    if test -n "$library_names"; then
6595
-	      # Do each command in the postuninstall commands.
6596
-	      cmds=$postuninstall_cmds
6597
-	      save_ifs="$IFS"; IFS='~'
6598
-	      for cmd in $cmds; do
6599
-		IFS="$save_ifs"
6600
-		eval cmd=\"$cmd\"
6601
-		$show "$cmd"
6602
-		$run eval "$cmd"
6603
-		if test "$?" -ne 0 && test "$rmforce" != yes; then
6604
-		  exit_status=1
6605
-		fi
6606
-	      done
6607
-	      IFS="$save_ifs"
6608
-	    fi
6609
-
6610
-	    if test -n "$old_library"; then
6611
-	      # Do each command in the old_postuninstall commands.
6612
-	      cmds=$old_postuninstall_cmds
6613
-	      save_ifs="$IFS"; IFS='~'
6614
-	      for cmd in $cmds; do
6615
-		IFS="$save_ifs"
6616
-		eval cmd=\"$cmd\"
6617
-		$show "$cmd"
6618
-		$run eval "$cmd"
6619
-		if test "$?" -ne 0 && test "$rmforce" != yes; then
6620
-		  exit_status=1
6621
-		fi
6622
-	      done
6623
-	      IFS="$save_ifs"
6624
-	    fi
6625
-	    # FIXME: should reinstall the best remaining shared library.
6626
-	    ;;
6627
-	  esac
6628
-	fi
6629
-	;;
6630
-
6631
-      *.lo)
6632
-	# Possibly a libtool object, so verify it.
6633
-	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6634
-
6635
-	  # Read the .lo file
6636
-	  . $dir/$name
6637
-
6638
-	  # Add PIC object to the list of files to remove.
6639
-	  if test -n "$pic_object" \
6640
-	     && test "$pic_object" != none; then
6641
-	    rmfiles="$rmfiles $dir/$pic_object"
6642
-	  fi
6643
-
6644
-	  # Add non-PIC object to the list of files to remove.
6645
-	  if test -n "$non_pic_object" \
6646
-	     && test "$non_pic_object" != none; then
6647
-	    rmfiles="$rmfiles $dir/$non_pic_object"
6648
-	  fi
6649
-	fi
6650
-	;;
6651
-
6652
-      *)
6653
-	if test "$mode" = clean ; then
6654
-	  noexename=$name
6655
-	  case $file in
6656
-	  *.exe)
6657
-	    file=`$echo $file|${SED} 's,.exe$,,'`
6658
-	    noexename=`$echo $name|${SED} 's,.exe$,,'`
6659
-	    # $file with .exe has already been added to rmfiles,
6660
-	    # add $file without .exe
6661
-	    rmfiles="$rmfiles $file"
6662
-	    ;;
6663
-	  esac
6664
-	  # Do a test to see if this is a libtool program.
6665
-	  if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6666
-	    relink_command=
6667
-	    . $dir/$noexename
6668
-
6669
-	    # note $name still contains .exe if it was in $file originally
6670
-	    # as does the version of $file that was added into $rmfiles
6671
-	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
6672
-	    if test "$fast_install" = yes && test -n "$relink_command"; then
6673
-	      rmfiles="$rmfiles $objdir/lt-$name"
6674
-	    fi
6675
-	    if test "X$noexename" != "X$name" ; then
6676
-	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
6677
-	    fi
6678
-	  fi
6679
-	fi
6680
-	;;
6681
-      esac
6682
-      $show "$rm $rmfiles"
6683
-      $run $rm $rmfiles || exit_status=1
6684
-    done
6685
-    objdir="$origobjdir"
6686
-
6687
-    # Try to remove the ${objdir}s in the directories where we deleted files
6688
-    for dir in $rmdirs; do
6689
-      if test -d "$dir"; then
6690
-	$show "rmdir $dir"
6691
-	$run rmdir $dir >/dev/null 2>&1
6692
-      fi
6693
-    done
6694
-
6695
-    exit $exit_status
6696
-    ;;
6697
-
6698
-  "")
6699
-    $echo "$modename: you must specify a MODE" 1>&2
6700
-    $echo "$generic_help" 1>&2
6701
-    exit $EXIT_FAILURE
6702
-    ;;
6703
-  esac
6704
-
6705
-  if test -z "$exec_cmd"; then
6706
-    $echo "$modename: invalid operation mode \`$mode'" 1>&2
6707
-    $echo "$generic_help" 1>&2
6708
-    exit $EXIT_FAILURE
6709
-  fi
6710
-fi # test -z "$show_help"
6711
-
6712
-if test -n "$exec_cmd"; then
6713
-  eval exec $exec_cmd
6714
-  exit $EXIT_FAILURE
6715
-fi
6716
-
6717
-# We need to display help for each of the modes.
6718
-case $mode in
6719
-"") $echo \
6720
-"Usage: $modename [OPTION]... [MODE-ARG]...
6721
-
6722
-Provide generalized library-building support services.
6723
-
6724
-    --config          show all configuration variables
6725
-    --debug           enable verbose shell tracing
6726
--n, --dry-run         display commands without modifying any files
6727
-    --features        display basic configuration information and exit
6728
-    --finish          same as \`--mode=finish'
6729
-    --help            display this help message and exit
6730
-    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
6731
-    --quiet           same as \`--silent'
6732
-    --silent          don't print informational messages
6733
-    --tag=TAG         use configuration variables from tag TAG
6734
-    --version         print version information
6735
-
6736
-MODE must be one of the following:
6737
-
6738
-      clean           remove files from the build directory
6739
-      compile         compile a source file into a libtool object
6740
-      execute         automatically set library path, then run a program
6741
-      finish          complete the installation of libtool libraries
6742
-      install         install libraries or executables
6743
-      link            create a library or an executable
6744
-      uninstall       remove libraries from an installed directory
6745
-
6746
-MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
6747
-a more detailed description of MODE.
6748
-
6749
-Report bugs to <bug-libtool@gnu.org>."
6750
-  exit $EXIT_SUCCESS
6751
-  ;;
6752
-
6753
-clean)
6754
-  $echo \
6755
-"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
6756
-
6757
-Remove files from the build directory.
6758
-
6759
-RM is the name of the program to use to delete files associated with each FILE
6760
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
6761
-to RM.
6762
-
6763
-If FILE is a libtool library, object or program, all the files associated
6764
-with it are deleted. Otherwise, only FILE itself is deleted using RM."
6765
-  ;;
6766
-
6767
-compile)
6768
-  $echo \
6769
-"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
6770
-
6771
-Compile a source file into a libtool library object.
6772
-
6773
-This mode accepts the following additional options:
6774
-
6775
-  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
6776
-  -prefer-pic       try to building PIC objects only
6777
-  -prefer-non-pic   try to building non-PIC objects only
6778
-  -static           always build a \`.o' file suitable for static linking
6779
-
6780
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
6781
-from the given SOURCEFILE.
6782
-
6783
-The output file name is determined by removing the directory component from
6784
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
6785
-library object suffix, \`.lo'."
6786
-  ;;
6787
-
6788
-execute)
6789
-  $echo \
6790
-"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
6791
-
6792
-Automatically set library path, then run a program.
6793
-
6794
-This mode accepts the following additional options:
6795
-
6796
-  -dlopen FILE      add the directory containing FILE to the library path
6797
-
6798
-This mode sets the library path environment variable according to \`-dlopen'
6799
-flags.
6800
-
6801
-If any of the ARGS are libtool executable wrappers, then they are translated
6802
-into their corresponding uninstalled binary, and any of their required library
6803
-directories are added to the library path.
6804
-
6805
-Then, COMMAND is executed, with ARGS as arguments."
6806
-  ;;
6807
-
6808
-finish)
6809
-  $echo \
6810
-"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
6811
-
6812
-Complete the installation of libtool libraries.
6813
-
6814
-Each LIBDIR is a directory that contains libtool libraries.
6815
-
6816
-The commands that this mode executes may require superuser privileges.  Use
6817
-the \`--dry-run' option if you just want to see what would be executed."
6818
-  ;;
6819
-
6820
-install)
6821
-  $echo \
6822
-"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
6823
-
6824
-Install executables or libraries.
6825
-
6826
-INSTALL-COMMAND is the installation command.  The first component should be
6827
-either the \`install' or \`cp' program.
6828
-
6829
-The rest of the components are interpreted as arguments to that command (only
6830
-BSD-compatible install options are recognized)."
6831
-  ;;
6832
-
6833
-link)
6834
-  $echo \
6835
-"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
6836
-
6837
-Link object files or libraries together to form another library, or to
6838
-create an executable program.
6839
-
6840
-LINK-COMMAND is a command using the C compiler that you would use to create
6841
-a program from several object files.
6842
-
6843
-The following components of LINK-COMMAND are treated specially:
6844
-
6845
-  -all-static       do not do any dynamic linking at all
6846
-  -avoid-version    do not add a version suffix if possible
6847
-  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
6848
-  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
6849
-  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
6850
-  -export-symbols SYMFILE
6851
-                    try to export only the symbols listed in SYMFILE
6852
-  -export-symbols-regex REGEX
6853
-                    try to export only the symbols matching REGEX
6854
-  -LLIBDIR          search LIBDIR for required installed libraries
6855
-  -lNAME            OUTPUT-FILE requires the installed library libNAME
6856
-  -module           build a library that can dlopened
6857
-  -no-fast-install  disable the fast-install mode
6858
-  -no-install       link a not-installable executable
6859
-  -no-undefined     declare that a library does not refer to external symbols
6860
-  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
6861
-  -objectlist FILE  Use a list of object files found in FILE to specify objects
6862
-  -precious-files-regex REGEX
6863
-                    don't remove output files matching REGEX
6864
-  -release RELEASE  specify package release information
6865
-  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
6866
-  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
6867
-  -static           do not do any dynamic linking of uninstalled libtool libraries
6868
-  -static-libtool-libs
6869
-                    do not do any dynamic linking of libtool libraries
6870
-  -version-info CURRENT[:REVISION[:AGE]]
6871
-                    specify library version info [each variable defaults to 0]
6872
-
6873
-All other options (arguments beginning with \`-') are ignored.
6874
-
6875
-Every other argument is treated as a filename.  Files ending in \`.la' are
6876
-treated as uninstalled libtool libraries, other files are standard or library
6877
-object files.
6878
-
6879
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
6880
-only library objects (\`.lo' files) may be specified, and \`-rpath' is
6881
-required, except when creating a convenience library.
6882
-
6883
-If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
6884
-using \`ar' and \`ranlib', or on Windows using \`lib'.
6885
-
6886
-If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
6887
-is created, otherwise an executable program is created."
6888
-  ;;
6889
-
6890
-uninstall)
6891
-  $echo \
6892
-"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
6893
-
6894
-Remove libraries from an installation directory.
6895
-
6896
-RM is the name of the program to use to delete files associated with each FILE
6897
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
6898
-to RM.
6899
-
6900
-If FILE is a libtool library, all the files associated with it are deleted.
6901
-Otherwise, only FILE itself is deleted using RM."
6902
-  ;;
6903
-
6904
-*)
6905
-  $echo "$modename: invalid operation mode \`$mode'" 1>&2
6906
-  $echo "$help" 1>&2
6907
-  exit $EXIT_FAILURE
6908
-  ;;
6909
-esac
6910
-
6911
-$echo
6912
-$echo "Try \`$modename --help' for more information about other modes."
6913
-
6914
-exit $?
6915
-
6916
-# The TAGs below are defined such that we never get into a situation
6917
-# in which we disable both kinds of libraries.  Given conflicting
6918
-# choices, we go for a static library, that is the most portable,
6919
-# since we can't tell whether shared libraries were disabled because
6920
-# the user asked for that or because the platform doesn't support
6921
-# them.  This is particularly important on AIX, because we don't
6922
-# support having both static and shared libraries enabled at the same
6923
-# time on that platform, so we default to a shared-only configuration.
6924
-# If a disable-shared tag is given, we'll fallback to a static-only
6925
-# configuration.  But we'll never go from static-only to shared-only.
6926
-
6927
-# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
6928
-disable_libs=shared
6929
-# ### END LIBTOOL TAG CONFIG: disable-shared
6930
-
6931
-# ### BEGIN LIBTOOL TAG CONFIG: disable-static
6932
-disable_libs=static
6933
-# ### END LIBTOOL TAG CONFIG: disable-static
6934
-
6935
-# Local Variables:
6936
-# mode:shell-script
6937
-# sh-indentation:2
6938
-# End:
6939 1
deleted file mode 100755
... ...
@@ -1,367 +0,0 @@
1
-#! /bin/sh
2
-# Common stub for a few missing GNU programs while installing.
3
-
4
-scriptversion=2006-05-10.23
5
-
6
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
7
-#   Free Software Foundation, Inc.
8
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
9
-
10
-# This program is free software; you can redistribute it and/or modify
11
-# it under the terms of the GNU General Public License as published by
12
-# the Free Software Foundation; either version 2, or (at your option)
13
-# any later version.
14
-
15
-# This program is distributed in the hope that it will be useful,
16
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
17
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
-# GNU General Public License for more details.
19
-
20
-# You should have received a copy of the GNU General Public License
21
-# along with this program; if not, write to the Free Software
22
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23
-# 02110-1301, USA.
24
-
25
-# As a special exception to the GNU General Public License, if you
26
-# distribute this file as part of a program that contains a
27
-# configuration script generated by Autoconf, you may include it under
28
-# the same distribution terms that you use for the rest of that program.
29
-
30
-if test $# -eq 0; then
31
-  echo 1>&2 "Try \`$0 --help' for more information"
32
-  exit 1
33
-fi
34
-
35
-run=:
36
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
37
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
38
-
39
-# In the cases where this matters, `missing' is being run in the
40
-# srcdir already.
41
-if test -f configure.ac; then
42
-  configure_ac=configure.ac
43
-else
44
-  configure_ac=configure.in
45
-fi
46
-
47
-msg="missing on your system"
48
-
49
-case $1 in
50
-  # Try to run requested program, and just exit if it succeeds.
51
-  run=
52
-  shift
53
-  "$@" && exit 0
54
-  # Exit code 63 means version mismatch.  This often happens
55
-  # when the user try to use an ancient version of a tool on
56
-  # a file that requires a minimum version.  In this case we
57
-  # we should proceed has if the program had been absent, or
58
-  # if --run hadn't been passed.
59
-  if test $? = 63; then
60
-    run=:
61
-    msg="probably too old"
62
-  fi
63
-  ;;
64
-
65
-  -h|--h|--he|--hel|--help)
66
-    echo "\
67
-$0 [OPTION]... PROGRAM [ARGUMENT]...
68
-
69
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
70
-error status if there is no known handling for PROGRAM.
71
-
72
-Options:
73
-  -h, --help      display this help and exit
74
-  -v, --version   output version information and exit
75
-  --run           try to run the given command, and emulate it if it fails
76
-
77
-Supported PROGRAM values:
78
-  aclocal      touch file \`aclocal.m4'
79
-  autoconf     touch file \`configure'
80
-  autoheader   touch file \`config.h.in'
81
-  autom4te     touch the output file, or create a stub one
82
-  automake     touch all \`Makefile.in' files
83
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
84
-  flex         create \`lex.yy.c', if possible, from existing .c
85
-  help2man     touch the output file
86
-  lex          create \`lex.yy.c', if possible, from existing .c
87
-  makeinfo     touch the output file
88
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
89
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
90
-
91
-Send bug reports to <bug-automake@gnu.org>."
92
-    exit $?
93
-    ;;
94
-
95
-  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
96
-    echo "missing $scriptversion (GNU Automake)"
97
-    exit $?
98
-    ;;
99
-
100
-  -*)
101
-    echo 1>&2 "$0: Unknown \`$1' option"
102
-    echo 1>&2 "Try \`$0 --help' for more information"
103
-    exit 1
104
-    ;;
105
-
106
-esac
107
-
108
-# Now exit if we have it, but it failed.  Also exit now if we
109
-# don't have it and --version was passed (most likely to detect
110
-# the program).
111
-case $1 in
112
-  lex|yacc)
113
-    # Not GNU programs, they don't have --version.
114
-    ;;
115
-
116
-  tar)
117
-    if test -n "$run"; then
118
-       echo 1>&2 "ERROR: \`tar' requires --run"
119
-       exit 1
120
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
121
-       exit 1
122
-    fi
123
-    ;;
124
-
125
-  *)
126
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
127
-       # We have it, but it failed.
128
-       exit 1
129
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
130
-       # Could not run --version or --help.  This is probably someone
131
-       # running `$TOOL --version' or `$TOOL --help' to check whether
132
-       # $TOOL exists and not knowing $TOOL uses missing.
133
-       exit 1
134
-    fi
135
-    ;;
136
-esac
137
-
138
-# If it does not exist, or fails to run (possibly an outdated version),
139
-# try to emulate it.
140
-case $1 in
141
-  aclocal*)
142
-    echo 1>&2 "\
143
-WARNING: \`$1' is $msg.  You should only need it if
144
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
145
-         to install the \`Automake' and \`Perl' packages.  Grab them from
146
-         any GNU archive site."
147
-    touch aclocal.m4
148
-    ;;
149
-
150
-  autoconf)
151
-    echo 1>&2 "\
152
-WARNING: \`$1' is $msg.  You should only need it if
153
-         you modified \`${configure_ac}'.  You might want to install the
154
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
155
-         archive site."
156
-    touch configure
157
-    ;;
158
-
159
-  autoheader)
160
-    echo 1>&2 "\
161
-WARNING: \`$1' is $msg.  You should only need it if
162
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
163
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
164
-         from any GNU archive site."
165
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
166
-    test -z "$files" && files="config.h"
167
-    touch_files=
168
-    for f in $files; do
169
-      case $f in
170
-      *:*) touch_files="$touch_files "`echo "$f" |
171
-				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
172
-      *) touch_files="$touch_files $f.in";;
173
-      esac
174
-    done
175
-    touch $touch_files
176
-    ;;
177
-
178
-  automake*)
179
-    echo 1>&2 "\
180
-WARNING: \`$1' is $msg.  You should only need it if
181
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
182
-         You might want to install the \`Automake' and \`Perl' packages.
183
-         Grab them from any GNU archive site."
184
-    find . -type f -name Makefile.am -print |
185
-	   sed 's/\.am$/.in/' |
186
-	   while read f; do touch "$f"; done
187
-    ;;
188
-
189
-  autom4te)
190
-    echo 1>&2 "\
191
-WARNING: \`$1' is needed, but is $msg.
192
-         You might have modified some files without having the
193
-         proper tools for further handling them.
194
-         You can get \`$1' as part of \`Autoconf' from any GNU
195
-         archive site."
196
-
197
-    file=`echo "$*" | sed -n "$sed_output"`
198
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
199
-    if test -f "$file"; then
200
-	touch $file
201
-    else
202
-	test -z "$file" || exec >$file
203
-	echo "#! /bin/sh"
204
-	echo "# Created by GNU Automake missing as a replacement of"
205
-	echo "#  $ $@"
206
-	echo "exit 0"
207
-	chmod +x $file
208
-	exit 1
209
-    fi
210
-    ;;
211
-
212
-  bison|yacc)
213
-    echo 1>&2 "\
214
-WARNING: \`$1' $msg.  You should only need it if
215
-         you modified a \`.y' file.  You may need the \`Bison' package
216
-         in order for those modifications to take effect.  You can get
217
-         \`Bison' from any GNU archive site."
218
-    rm -f y.tab.c y.tab.h
219
-    if test $# -ne 1; then
220
-        eval LASTARG="\${$#}"
221
-	case $LASTARG in
222
-	*.y)
223
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
224
-	    if test -f "$SRCFILE"; then
225
-	         cp "$SRCFILE" y.tab.c
226
-	    fi
227
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
228
-	    if test -f "$SRCFILE"; then
229
-	         cp "$SRCFILE" y.tab.h
230
-	    fi
231
-	  ;;
232
-	esac
233
-    fi
234
-    if test ! -f y.tab.h; then
235
-	echo >y.tab.h
236
-    fi
237
-    if test ! -f y.tab.c; then
238
-	echo 'main() { return 0; }' >y.tab.c
239
-    fi
240
-    ;;
241
-
242
-  lex|flex)
243
-    echo 1>&2 "\
244
-WARNING: \`$1' is $msg.  You should only need it if
245
-         you modified a \`.l' file.  You may need the \`Flex' package
246
-         in order for those modifications to take effect.  You can get
247
-         \`Flex' from any GNU archive site."
248
-    rm -f lex.yy.c
249
-    if test $# -ne 1; then
250
-        eval LASTARG="\${$#}"
251
-	case $LASTARG in
252
-	*.l)
253
-	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
254
-	    if test -f "$SRCFILE"; then
255
-	         cp "$SRCFILE" lex.yy.c
256
-	    fi
257
-	  ;;
258
-	esac
259
-    fi
260
-    if test ! -f lex.yy.c; then
261
-	echo 'main() { return 0; }' >lex.yy.c
262
-    fi
263
-    ;;
264
-
265
-  help2man)
266
-    echo 1>&2 "\
267
-WARNING: \`$1' is $msg.  You should only need it if
268
-	 you modified a dependency of a manual page.  You may need the
269
-	 \`Help2man' package in order for those modifications to take
270
-	 effect.  You can get \`Help2man' from any GNU archive site."
271
-
272
-    file=`echo "$*" | sed -n "$sed_output"`
273
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
274
-    if test -f "$file"; then
275
-	touch $file
276
-    else
277
-	test -z "$file" || exec >$file
278
-	echo ".ab help2man is required to generate this page"
279
-	exit 1
280
-    fi
281
-    ;;
282
-
283
-  makeinfo)
284
-    echo 1>&2 "\
285
-WARNING: \`$1' is $msg.  You should only need it if
286
-         you modified a \`.texi' or \`.texinfo' file, or any other file
287
-         indirectly affecting the aspect of the manual.  The spurious
288
-         call might also be the consequence of using a buggy \`make' (AIX,
289
-         DU, IRIX).  You might want to install the \`Texinfo' package or
290
-         the \`GNU make' package.  Grab either from any GNU archive site."
291
-    # The file to touch is that specified with -o ...
292
-    file=`echo "$*" | sed -n "$sed_output"`
293
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
294
-    if test -z "$file"; then
295
-      # ... or it is the one specified with @setfilename ...
296
-      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
297
-      file=`sed -n '
298
-	/^@setfilename/{
299
-	  s/.* \([^ ]*\) *$/\1/
300
-	  p
301
-	  q
302
-	}' $infile`
303
-      # ... or it is derived from the source name (dir/f.texi becomes f.info)
304
-      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
305
-    fi
306
-    # If the file does not exist, the user really needs makeinfo;
307
-    # let's fail without touching anything.
308
-    test -f $file || exit 1
309
-    touch $file
310
-    ;;
311
-
312
-  tar)
313
-    shift
314
-
315
-    # We have already tried tar in the generic part.
316
-    # Look for gnutar/gtar before invocation to avoid ugly error
317
-    # messages.
318
-    if (gnutar --version > /dev/null 2>&1); then
319
-       gnutar "$@" && exit 0
320
-    fi
321
-    if (gtar --version > /dev/null 2>&1); then
322
-       gtar "$@" && exit 0
323
-    fi
324
-    firstarg="$1"
325
-    if shift; then
326
-	case $firstarg in
327
-	*o*)
328
-	    firstarg=`echo "$firstarg" | sed s/o//`
329
-	    tar "$firstarg" "$@" && exit 0
330
-	    ;;
331
-	esac
332
-	case $firstarg in
333
-	*h*)
334
-	    firstarg=`echo "$firstarg" | sed s/h//`
335
-	    tar "$firstarg" "$@" && exit 0
336
-	    ;;
337
-	esac
338
-    fi
339
-
340
-    echo 1>&2 "\
341
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
342
-         You may want to install GNU tar or Free paxutils, or check the
343
-         command line arguments."
344
-    exit 1
345
-    ;;
346
-
347
-  *)
348
-    echo 1>&2 "\
349
-WARNING: \`$1' is needed, and is $msg.
350
-         You might have modified some files without having the
351
-         proper tools for further handling them.  Check the \`README' file,
352
-         it often tells you about the needed prerequisites for installing
353
-         this package.  You may also peek at any GNU archive site, in case
354
-         some other package would contain this missing \`$1' program."
355
-    exit 1
356
-    ;;
357
-esac
358
-
359
-exit 0
360
-
361
-# Local variables:
362
-# eval: (add-hook 'write-file-hooks 'time-stamp)
363
-# time-stamp-start: "scriptversion="
364
-# time-stamp-format: "%:y-%02m-%02d.%02H"
365
-# time-stamp-end: "$"
366
-# End:
... ...
@@ -39,5 +39,5 @@ sigtool_SOURCES = \
39 39
 #sigtool_LDADD = $(top_builddir)/clamscan/others.o 
40 40
 
41 41
 DEFS = @DEFS@ -DCL_NOTHREADS
42
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
42
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
43 43
 LIBS = $(top_builddir)/libclamav/libclamav.la @FRESHCLAM_LIBS@ @THREAD_LIBS@
... ...
@@ -59,7 +59,7 @@ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
59 59
 	$(top_srcdir)/configure.in
60 60
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
61 61
 	$(ACLOCAL_M4)
62
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
62
+mkinstalldirs = $(install_sh) -d
63 63
 CONFIG_HEADER = $(top_builddir)/clamav-config.h
64 64
 CONFIG_CLEAN_FILES =
65 65
 am__installdirs = "$(DESTDIR)$(bindir)"
... ...
@@ -72,7 +72,7 @@ am_sigtool_OBJECTS = output.$(OBJEXT) getopt.$(OBJEXT) \
72 72
 sigtool_OBJECTS = $(am_sigtool_OBJECTS)
73 73
 sigtool_LDADD = $(LDADD)
74 74
 DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
75
-depcomp = $(SHELL) $(top_srcdir)/depcomp
75
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
76 76
 am__depfiles_maybe = depfiles
77 77
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
78 78
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
... ...
@@ -225,7 +225,7 @@ sigtool_SOURCES = \
225 225
     vba.h \
226 226
     sigtool.c
227 227
 
228
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
228
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
229 229
 all: all-am
230 230
 
231 231
 .SUFFIXES:
... ...
@@ -239,9 +239,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
239 239
 	      exit 1;; \
240 240
 	  esac; \
241 241
 	done; \
242
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  sigtool/Makefile'; \
242
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  sigtool/Makefile'; \
243 243
 	cd $(top_srcdir) && \
244
-	  $(AUTOMAKE) --gnu  sigtool/Makefile
244
+	  $(AUTOMAKE) --foreign  sigtool/Makefile
245 245
 .PRECIOUS: Makefile
246 246
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
247 247
 	@case '$?' in \
248 248
new file mode 100644
249 249
Binary files /dev/null and b/test/.split/split.clam-v2.raraa differ
250 250
new file mode 100644
251 251
Binary files /dev/null and b/test/.split/split.clam-v2.rarab differ
252 252
new file mode 100644
253 253
Binary files /dev/null and b/test/.split/split.clam-v3.raraa differ
254 254
new file mode 100644
255 255
Binary files /dev/null and b/test/.split/split.clam-v3.rarab differ
256 256
new file mode 100644
257 257
Binary files /dev/null and b/test/.split/split.clam.cabaa differ
258 258
new file mode 100644
259 259
Binary files /dev/null and b/test/.split/split.clam.cabab differ
260 260
new file mode 100644
261 261
Binary files /dev/null and b/test/.split/split.clam.exe.bz2aa differ
262 262
new file mode 100644
263 263
Binary files /dev/null and b/test/.split/split.clam.exe.bz2ab differ
264 264
new file mode 100644
265 265
Binary files /dev/null and b/test/.split/split.clam.exeaa differ
266 266
new file mode 100644
267 267
Binary files /dev/null and b/test/.split/split.clam.exeab differ
268 268
new file mode 100644
269 269
Binary files /dev/null and b/test/.split/split.clam.zipaa differ
270 270
new file mode 100644
271 271
Binary files /dev/null and b/test/.split/split.clam.zipab differ
272 272
deleted file mode 100644
273 273
Binary files a/test/.splitted/split.clam-v2.raraa and /dev/null differ
274 274
deleted file mode 100644
275 275
Binary files a/test/.splitted/split.clam-v2.rarab and /dev/null differ
276 276
deleted file mode 100644
277 277
Binary files a/test/.splitted/split.clam-v3.raraa and /dev/null differ
278 278
deleted file mode 100644
279 279
Binary files a/test/.splitted/split.clam-v3.rarab and /dev/null differ
280 280
deleted file mode 100644
281 281
Binary files a/test/.splitted/split.clam.cabaa and /dev/null differ
282 282
deleted file mode 100644
283 283
Binary files a/test/.splitted/split.clam.cabab and /dev/null differ
284 284
deleted file mode 100644
285 285
Binary files a/test/.splitted/split.clam.exe.bz2aa and /dev/null differ
286 286
deleted file mode 100644
287 287
Binary files a/test/.splitted/split.clam.exe.bz2ab and /dev/null differ
288 288
deleted file mode 100644
289 289
Binary files a/test/.splitted/split.clam.exeaa and /dev/null differ
290 290
deleted file mode 100644
291 291
Binary files a/test/.splitted/split.clam.exeab and /dev/null differ
292 292
deleted file mode 100644
293 293
Binary files a/test/.splitted/split.clam.zipaa and /dev/null differ
294 294
deleted file mode 100644
295 295
Binary files a/test/.splitted/split.clam.zipab and /dev/null differ
... ...
@@ -1,4 +1,4 @@
1
-SPLIT_DIR=$(top_srcdir)/test/.splitted
1
+SPLIT_DIR=$(top_srcdir)/test/.split
2 2
 
3 3
 all: clam-v2.rar clam-v3.rar clam.cab clam.exe.bz2 clam.exe clam.zip
4 4
 
... ...
@@ -20,7 +20,7 @@ clam.exe:
20 20
 clam.zip:
21 21
 	cat $(SPLIT_DIR)/split.clam.zipaa $(SPLIT_DIR)/split.clam.zipab >clam.zip
22 22
 
23
-clean:
23
+clean-local:
24 24
 	rm -f clam-v2.rar clam-v3.rar clam.cab clam.exe.bz2 clam.exe clam.zip
25 25
 
26
-EXTRA_DIST = .splitted
26
+EXTRA_DIST = .split
... ...
@@ -39,7 +39,7 @@ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
39 39
 	$(top_srcdir)/configure.in
40 40
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
41 41
 	$(ACLOCAL_M4)
42
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
42
+mkinstalldirs = $(install_sh) -d
43 43
 CONFIG_HEADER = $(top_builddir)/clamav-config.h
44 44
 CONFIG_CLEAN_FILES =
45 45
 SOURCES =
... ...
@@ -162,8 +162,8 @@ target_os = @target_os@
162 162
 target_vendor = @target_vendor@
163 163
 top_builddir = @top_builddir@
164 164
 top_srcdir = @top_srcdir@
165
-SPLIT_DIR = $(top_srcdir)/test/.splitted
166
-EXTRA_DIST = .splitted
165
+SPLIT_DIR = $(top_srcdir)/test/.split
166
+EXTRA_DIST = .split
167 167
 all: all-am
168 168
 
169 169
 .SUFFIXES:
... ...
@@ -176,9 +176,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
176 176
 	      exit 1;; \
177 177
 	  esac; \
178 178
 	done; \
179
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  test/Makefile'; \
179
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  test/Makefile'; \
180 180
 	cd $(top_srcdir) && \
181
-	  $(AUTOMAKE) --gnu  test/Makefile
181
+	  $(AUTOMAKE) --foreign  test/Makefile
182 182
 .PRECIOUS: Makefile
183 183
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
184 184
 	@case '$?' in \
... ...
@@ -263,7 +263,9 @@ distclean-generic:
263 263
 maintainer-clean-generic:
264 264
 	@echo "This command is intended for maintainers to use"
265 265
 	@echo "it deletes files that may require special tools to rebuild."
266
-clean-am: clean-generic clean-libtool mostlyclean-am
266
+clean: clean-am
267
+
268
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
267 269
 
268 270
 distclean: distclean-am
269 271
 	-rm -f Makefile
... ...
@@ -318,15 +320,16 @@ uninstall-am:
318 318
 .MAKE: install-am install-strip
319 319
 
320 320
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
321
-	distclean distclean-generic distclean-libtool distdir dvi \
322
-	dvi-am html html-am info info-am install install-am \
323
-	install-data install-data-am install-dvi install-dvi-am \
324
-	install-exec install-exec-am install-html install-html-am \
325
-	install-info install-info-am install-man install-pdf \
326
-	install-pdf-am install-ps install-ps-am install-strip \
327
-	installcheck installcheck-am installdirs maintainer-clean \
328
-	maintainer-clean-generic mostlyclean mostlyclean-generic \
329
-	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
321
+	clean-local distclean distclean-generic distclean-libtool \
322
+	distdir dvi dvi-am html html-am info info-am install \
323
+	install-am install-data install-data-am install-dvi \
324
+	install-dvi-am install-exec install-exec-am install-html \
325
+	install-html-am install-info install-info-am install-man \
326
+	install-pdf install-pdf-am install-ps install-ps-am \
327
+	install-strip installcheck installcheck-am installdirs \
328
+	maintainer-clean maintainer-clean-generic mostlyclean \
329
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
330
+	uninstall uninstall-am
330 331
 
331 332
 
332 333
 all: clam-v2.rar clam-v3.rar clam.cab clam.exe.bz2 clam.exe clam.zip
... ...
@@ -349,7 +352,7 @@ clam.exe:
349 349
 clam.zip:
350 350
 	cat $(SPLIT_DIR)/split.clam.zipaa $(SPLIT_DIR)/split.clam.zipab >clam.zip
351 351
 
352
-clean:
352
+clean-local:
353 353
 	rm -f clam-v2.rar clam-v3.rar clam.cab clam.exe.bz2 clam.exe clam.zip
354 354
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
355 355
 # Otherwise a system limit (for SysV at least) may be exceeded.