<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>admin/detect-autoconf.pl</filename>
    </added>
    <added>
      <filename>admin/do_make</filename>
    </added>
    <added>
      <filename>admin/doxygen.sh</filename>
    </added>
    <added>
      <filename>admin/pkg.m4.in</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,70 +1,40 @@
 ## generate API documentation with doxygen
 apidox-am-yes:
+	@if test \! -d &quot;$(top_srcdir)/doc/common/&quot; &amp;&amp; test -z &quot;$$DOXDATA&quot; ; then \
+		export DOXDATA=$(kde_libs_htmldir)/en/common ; \
+	fi ; \
+	abs_top_srcdir=`cd $(top_srcdir) &amp;&amp; pwd` ;\
+	test -d $(top_builddir)/apidocs || \
+		( cd $(top_builddir) &amp;&amp; sh $$abs_top_srcdir/admin/doxygen.sh \
+		--no-modulename --installdir=$(kde_libs_htmldir)/en \
+		--no-recurse $(abs_top_srcdir) . ) ; \
+	cd $(top_builddir) &amp;&amp; sh $$abs_top_srcdir/admin/doxygen.sh \
+		--recurse --no-modulename --installdir=$(kde_libs_htmldir)/en \
+		$$abs_top_srcdir $(subdir)
+
+apidox-am-toplevel-yes:
+	@if test \! -d &quot;$(top_srcdir)/doc/common/&quot; &amp;&amp; test -z &quot;$$ADMIN&quot; ; then \
+		export DOXDATA=$(kde_libs_htmldir)/en/common ; \
+	fi ; \
+	abs_top_srcdir=`cd $(top_srcdir) &amp;&amp; pwd` ;\
+	cd $(top_builddir) &amp;&amp; sh $$abs_top_srcdir/admin/doxygen.sh \
+		--no-modulename --installdir=$(kde_libs_htmldir)/en \
+		$$abs_top_srcdir
+
+## Don't generate API documentation without doxygen
+apidox-am-no:
+
+apidox-am-toplevel-no:
+
+
+apidox:
 	@if test &quot;$(subdir)&quot; != &quot;.&quot;; then \
-		$(mkinstalldirs) $(top_builddir)/apidocs/$(subdir) ;\
-		if test ! -x $(top_builddir)/apidocs/common; then \
-			if test -d $(top_srcdir)/doc/common; then \
-			   common_dir=`cd $(top_srcdir)/doc/common &amp;&amp; pwd` ;\
-			else \
-	   		   common_dir=$(kde_libs_htmldir)/en/common ;\
-			fi ;\
-			$(LN_S) $$common_dir $(top_builddir)/apidocs/common; \
-		fi ;\
-		cp $(top_srcdir)/admin/Doxyfile.global Doxyfile; \
-		echo &quot;PROJECT_NAME           = \&quot;$(subdir) Library\&quot;&quot; &gt;&gt; Doxyfile; \
-		echo &quot;PROJECT_NUMBER         = \&quot;Version $(VERSION)\&quot;&quot; &gt;&gt; Doxyfile; \
-		echo &quot;INPUT                  = $(srcdir)&quot; &gt;&gt; Doxyfile; \
-		echo &quot;IMAGE_PATH             = $(top_srcdir)/doc/api&quot; &gt;&gt; Doxyfile ;\
-		echo &quot;OUTPUT_DIRECTORY       = $(top_builddir)/apidocs&quot; &gt;&gt; Doxyfile; \
-		echo &quot;HTML_OUTPUT            = $(subdir)/html&quot; &gt;&gt; Doxyfile; \
-		echo &quot;HTML_HEADER            = $(top_builddir)/apidocs/common/header.html&quot; &gt;&gt; Doxyfile;\
-		echo &quot;HTML_FOOTER            = $(top_builddir)/apidocs/common/footer.html&quot; &gt;&gt; Doxyfile;\
-		echo &quot;HTML_STYLESHEET        = $(top_builddir)/apidocs/common/doxygen.css&quot; &gt;&gt; Doxyfile;\
-		echo &quot;LATEX_OUTPUT           = $(subdir)/latex&quot; &gt;&gt; Doxyfile; \
-		echo &quot;RTF_OUTPUT             = $(subdir)/rtf&quot; &gt;&gt; Doxyfile; \
-		echo &quot;MAN_OUTPUT             = $(subdir)/man&quot; &gt;&gt; Doxyfile; \
-		echo &quot;GENERATE_HTML          = $(GENERATE_FLAG)&quot; &gt;&gt; Doxyfile ;\
-		echo &quot;GENERATE_MAN          = $(GENERATE_FLAG)&quot; &gt;&gt; Doxyfile ;\
-		echo &quot;GENERATE_LATEX          = $(GENERATE_FLAG)&quot; &gt;&gt; Doxyfile ;\
-		if test -n &quot;$(DOXYGEN_EXCLUDE)&quot;; then \
-			patterns= ;\
-			dirs= ;\
-			for item in `echo &quot;$(DOXYGEN_EXCLUDE)&quot;`; do \
-				if test -d &quot;$(srcdir)/$$item&quot;; then \
-					dirs=&quot;$$dirs $(srcdir)/$$item/&quot; ;\
-			    	else \
-			        	patterns=&quot;$$patterns $$item&quot; ;\
-				fi ;\
-			done ;\
-			echo &quot;EXCLUDE_PATTERNS      += $$patterns&quot; &gt;&gt; Doxyfile; \
-		    	echo &quot;EXCLUDE               += $$dirs&quot; &gt;&gt; Doxyfile ;\
-		fi ;\
-		echo &quot;TAGFILES = \\&quot; &gt;&gt; Doxyfile; \
-		tags='$(DOXYGEN_REFERENCES) qt'; for tag in $$tags; do \
-			tagpath= ;\
-			path=&quot;../../$$tag&quot; ;\
-			if test -f $(top_builddir)/apidocs/$$tag/$$tag.tag; then \
-				tagpath=&quot;$(top_builddir)/apidocs/$$tag/$$tag.tag&quot; ;\
-			else \
-				tagpath=`ls -1 $(kde_htmldir)/en/*-apidocs/$$tag/$$tag.tag 2&gt; /dev/null` ;\
-				if test -n &quot;$$tagpath&quot;; then \
-					path=`echo $$tagpath | sed -e &quot;s,.*/\([^/]*-apidocs\)/$$tag/$$tag.tag,../../../\1/$$tag,&quot;` ;\
-				fi ;\
-			fi ;\
-			if test &quot;$$tag&quot; = qt; then \
-				echo $$tagpath=$(QTDOCDIR) &gt;&gt; Doxyfile ;\
-			else if test -n &quot;$$tagpath&quot;; then \
-				echo &quot;$$tagpath=$$path/html \\&quot; &gt;&gt; Doxyfile ;\
-			    fi ;\
-			fi ;\
-		done ;\
-		echo &quot;GENERATE_TAGFILE       = $(top_builddir)/apidocs/$(subdir)/`basename $(subdir)`.tag&quot; &gt;&gt; Doxyfile ;\
-		echo &quot;IGNORE_PREFIX          = K&quot; &gt;&gt; Doxyfile ;\
-		echo &quot;HAVE_DOT = $(KDE_HAVE_DOT)&quot; &gt;&gt; Doxyfile ;\
-		$(DOXYGEN) Doxyfile ;\
+		$(MAKE) apidox-am-@KDE_HAS_DOXYGEN@ ;\
+	else \
+		$(MAKE) apidox-am-toplevel-@KDE_HAS_DOXYGEN@ ;\
 	fi
 
-apidox-am-no:
+
 
 install-data-local: install-apidox
 
@@ -83,13 +53,12 @@ install-apidox:
 				$(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/html/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir)/html; \
 		done; \
 		fi; \
-		rm -f $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/common; \
-		$(LN_S) $(kde_libs_htmldir)/en/common $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/common; \
 	else\
 		if test -d $(top_builddir)/apidocs; then \
 		$(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs ;\
 		list=`cd $(top_builddir)/apidocs &amp;&amp; ls -1`; \
 		echo &quot;installing $(top_builddir)/apidocs/$$file&quot; ;\
+		echo &quot;target directory $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs&quot; ; \
 		for file in $$list; do \
 			if test -f $(top_builddir)/apidocs/$$file; then \
 				$(INSTALL_DATA) $(top_builddir)/apidocs/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; \
@@ -104,72 +73,26 @@ uninstall-apidox:
 	@if test &quot;$(subdir)&quot; != &quot;.&quot;; then \
 		if test -d $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); then \
 			rm -rfv $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); \
-		fi\
-	else\
+		fi \
+	else \
 		if test -d $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; then \
 			rm -rfv $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; \
-		fi\
+		fi \
 	fi
 
-apidox:
-	@if test &quot;$(subdir)&quot; != &quot;.&quot;; then \
-		$(MAKE) apidox-am-@KDE_HAS_DOXYGEN@ ;\
-	else \
-		$(MAKE) apidox-am-toplevel-@KDE_HAS_DOXYGEN@ ;\
-	fi
+install-apidox-recurse: install-apidox
 	@set fnord $(MAKEFLAGS); amf=$$2; if test -n '$(SUBDIRS)'; then \
 	    list='$(SUBDIRS)'; \
 	    for subdir in $$list; do \
-		if grep '^include .*Doxyfile.am' $(srcdir)/$$subdir/Makefile.am; then \
-		echo &quot;Making apidox in $$subdir&quot;; \
+		if grep '^include .*Doxyfile.am' $(srcdir)/$$subdir/Makefile.am &gt; /dev/null ; then \
+		echo &quot;Installing apidox from $$subdir&quot;; \
 		if test &quot;$$subdir&quot; != &quot;.&quot;; then \
-			(cd $$subdir &amp;&amp; $(MAKE) $(AM_MAKEFLAGS) GENERATE_FLAG=no apidox) || exit 1; \
-		fi ; fi ;\
-	    done; \
-	    for subdir in $$list; do \
-		if grep '^include .*Doxyfile.am' $(srcdir)/$$subdir/Makefile.am; then \
-		echo &quot;Making apidox in $$subdir&quot;; \
-		if test &quot;$$subdir&quot; != &quot;.&quot;; then \
-			(cd $$subdir &amp;&amp; $(MAKE) $(AM_MAKEFLAGS) GENERATE_FLAG=yes apidox) || exit 1; \
+			(cd $$subdir &amp;&amp; $(MAKE) $(AM_MAKEFLAGS) GENERATE_FLAG=no install-apidox-recurse) || exit 1; \
 		fi ; fi ;\
 	    done; \
 	fi
 
-apidox-am-toplevel-no:
-apidox-am-toplevel-yes:
-	@echo &quot;*** Creating API documentation main page&quot;; \
-	cp $(top_srcdir)/admin/Doxyfile.global Doxyfile; \
-	echo &quot;PROJECT_NAME           = \&quot;$(DOXYGEN_PROJECT_NAME)\&quot;&quot; &gt;&gt; Doxyfile ; \
-	echo &quot;PROJECT_NUMBER         = \&quot;$(DOXYGEN_PROJECT_NUMBER)\&quot;&quot; &gt;&gt; Doxyfile ; \
-	echo &quot;INPUT                  = $(top_srcdir)&quot; &gt;&gt; Doxyfile ; \
-	echo &quot;OUTPUT_DIRECTORY       = $(top_builddir)/apidocs&quot; &gt;&gt; Doxyfile ; \
-	echo &quot;FILE_PATTERNS          = *.dox&quot; &gt;&gt; Doxyfile ; \
-	echo &quot;RECURSIVE              = NO&quot; &gt;&gt; Doxyfile ; \
-	echo &quot;SOURCE_BROWSER         = NO&quot; &gt;&gt; Doxyfile ; \
-	echo &quot;ALPHABETICAL_INDEX     = NO&quot; &gt;&gt; Doxyfile ; \
-	echo &quot;HTML_OUTPUT            = .&quot; &gt;&gt; Doxyfile ; \
-	echo &quot;HTML_HEADER            = apidocs/common/mainheader.html&quot; &gt;&gt; Doxyfile ; \
-	echo &quot;HTML_FOOTER            = apidocs/common/mainfooter.html&quot; &gt;&gt; Doxyfile ; \
-	echo &quot;HTML_STYLESHEET        = apidocs/common/doxygen.css&quot; &gt;&gt; Doxyfile ; \
-	echo &quot;GENERATE_LATEX         = NO&quot; &gt;&gt; Doxyfile ; \
-	echo &quot;GENERATE_RTF           = NO&quot; &gt;&gt; Doxyfile ; \
-	echo &quot;GENERATE_MAN           = NO&quot; &gt;&gt; Doxyfile ; \
-	echo &quot;GENERATE_XML           = NO&quot; &gt;&gt; Doxyfile ; \
-	echo &quot;GENERATE_AUTOGEN_DEF   = NO&quot; &gt;&gt; Doxyfile ; \
-	echo &quot;ENABLE_PREPROCESSING   = NO&quot; &gt;&gt; Doxyfile ; \
-	echo &quot;CLASS_DIAGRAMS         = NO&quot; &gt;&gt; Doxyfile ; \
-	echo &quot;HAVE_DOT               = NO&quot; &gt;&gt; Doxyfile ; \
-	echo &quot;GENERATE_HTML          = YES&quot; &gt;&gt; Doxyfile ;\
-	$(mkinstalldirs) $(top_builddir)/apidocs ; \
-	rm -f $(top_builddir)/apidocs/common ; \
-	if test -d $(top_srcdir)/doc/common; then \
-	   common_dir=`cd $(top_srcdir)/doc/common &amp;&amp; pwd` ;\
-	else \
-	   common_dir=$(kde_libs_htmldir)/en/common ;\
-	fi ;\
-	$(LN_S) $$common_dir $(top_builddir)/apidocs/common ;\
-	doxygen Doxyfile; \
-	rm -f Doxyfile
+
 
 .PHONY: apidox-am-yes apidox-am-no install-data-local install-apidox install-apidox uninstall-local uninstall-apidox uninstall-apidox apidox apidox-am-toplevel-no apidox-am-toplevel-yes
 </diff>
      <filename>admin/Doxyfile.am</filename>
    </modified>
    <modified>
      <diff>@@ -1,405 +1,49 @@
-# Doxyfile 1.3.6
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (&quot; &quot;)
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
-# by quotes) that should identify the project.
-
-PROJECT_NAME           = 
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
-# This could be handy for archiving the generated documentation or 
-# if some version control system is used.
-
-PROJECT_NUMBER         = 
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
-# base path where the generated documentation will be put. 
-# If a relative path is entered, it will be relative to the location 
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       = ../apidocs/
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
-# documentation generated by doxygen is written. Doxygen will use this 
-# information to generate all constant output in the proper language. 
-# The default language is English, other supported languages are: 
-# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, 
-# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en 
-# (Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese, 
-# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
-
 OUTPUT_LANGUAGE        = English
-
-# This tag can be used to specify the encoding used in the generated output. 
-# The encoding is not always determined by the language that is chosen, 
-# but also whether or not the output is meant for Windows or non-Windows users. 
-# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES 
-# forces the Windows encoding (this is the default for the Windows binary), 
-# whereas setting the tag to NO uses a Unix-style encoding (the default for 
-# all platforms other than Windows).
-
 USE_WINDOWS_ENCODING   = NO
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
-# include brief member descriptions after the members that are listed in 
-# the file and class documentation (similar to JavaDoc). 
-# Set to NO to disable this.
-
 BRIEF_MEMBER_DESC      = NO
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
-# the brief description of a member or function before the detailed description. 
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
-# brief descriptions will be completely suppressed.
-
 REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator 
-# that is used to form the text in various listings. Each string 
-# in this list, if found as the leading text of the brief description, will be 
-# stripped from the text and the result after processing the whole list, is used 
-# as the annotated text. Otherwise, the brief description is used as-is. If left 
-# blank, the following values are used (&quot;$name&quot; is automatically replaced with the 
-# name of the entity): &quot;The $name class&quot; &quot;The $name widget&quot; &quot;The $name file&quot; 
-# &quot;is&quot; &quot;provides&quot; &quot;specifies&quot; &quot;contains&quot; &quot;represents&quot; &quot;a&quot; &quot;an&quot; &quot;the&quot;
-
 ABBREVIATE_BRIEF       = 
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
-# Doxygen will generate a detailed section even if there is only a brief 
-# description.
-
 ALWAYS_DETAILED_SEC    = YES
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited 
-# members of a class in the documentation of that class as if those members were 
-# ordinary class members. Constructors, destructors and assignment operators of 
-# the base classes will not be shown.
-
 INLINE_INHERITED_MEMB  = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
-# path before files name in the file list and in the header files. If set 
-# to NO the shortest path that makes the file name unique will be used.
-
 FULL_PATH_NAMES        = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
-# can be used to strip a user-defined part of the path. Stripping is 
-# only done if one of the specified strings matches the left-hand part of 
-# the path. It is allowed to use relative paths in the argument list. 
-# If left blank the directory from which doxygen is run is used as the 
-# path to strip.
-
 STRIP_FROM_PATH        = 
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
-# (but less readable) file names. This can be useful is your file systems 
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
 SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
-# will interpret the first line (until the first dot) of a JavaDoc-style 
-# comment as the brief description. If set to NO, the JavaDoc 
-# comments will behave just like the Qt-style comments (thus requiring an 
-# explicit @brief command for a brief description.
-
 JAVADOC_AUTOBRIEF      = YES
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
-# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
-# comments) as a brief description. This used to be the default behaviour. 
-# The new default is to treat a multi-line C++ comment block as a detailed 
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
 MULTILINE_CPP_IS_BRIEF = NO
-
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
-# will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member 
-# documentation.
-
-DETAILS_AT_TOP         = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
-# member inherits the documentation from any documented member that it 
-# re-implements.
-
 INHERIT_DOCS           = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
-# tag is set to YES, then doxygen will reuse the documentation of the first 
-# member in the group (if any) for the other members of the group. By default 
-# all members of a group must be documented explicitly.
-
 DISTRIBUTE_GROUP_DOC   = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
 TAB_SIZE               = 4
-
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form &quot;name=value&quot;. 
-# For example adding &quot;sideeffect=\par Side Effects:\n&quot; will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user-defined paragraph with heading &quot;Side Effects:&quot;. 
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                = obsolete=@deprecated
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources 
-# only. Doxygen will then generate output that is more tailored for C. 
-# For instance, some of the names that are used will be different. The list 
-# of all members will be omitted, etc.
-
 OPTIMIZE_OUTPUT_FOR_C  = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources 
-# only. Doxygen will then generate output that is more tailored for Java. 
-# For instance, namespaces will be presented as packages, qualified scopes 
-# will look different, etc.
-
 OPTIMIZE_OUTPUT_JAVA   = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
-# the same type (for instance a group of public functions) to be put as a 
-# subgroup of that type (e.g. under the Public Functions section). Set it to 
-# NO to prevent subgrouping. Alternatively, this can be done per class using 
-# the \nosubgrouping command.
-
 SUBGROUPING            = YES
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
-# documentation are documented, even if no documentation was available. 
-# Private class members and static file members will be hidden unless 
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
 EXTRACT_ALL            = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
-# will be included in the documentation.
-
 EXTRACT_PRIVATE        = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file 
-# will be included in the documentation.
-
 EXTRACT_STATIC         = YES
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
-# defined locally in source files will be included in the documentation. 
-# If set to NO only classes defined in header files are included.
-
 EXTRACT_LOCAL_CLASSES  = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
-# undocumented members of documented classes, files or namespaces. 
-# If set to NO (the default) these members will be included in the 
-# various overviews, but no documentation section is generated. 
-# This option has no effect if EXTRACT_ALL is enabled.
-
 HIDE_UNDOC_MEMBERS     = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
-# undocumented classes that are normally visible in the class hierarchy. 
-# If set to NO (the default) these classes will be included in the various 
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
 HIDE_UNDOC_CLASSES     = YES
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
-# friend (class|struct|union) declarations. 
-# If set to NO (the default) these declarations will be included in the 
-# documentation.
-
 HIDE_FRIEND_COMPOUNDS  = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
-# documentation blocks found inside the body of a function. 
-# If set to NO (the default) these blocks will be appended to the 
-# function's detailed documentation block.
-
 HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation 
-# that is typed after a \internal command is included. If the tag is set 
-# to NO (the default) then the documentation will be excluded. 
-# Set it to YES to include the internal documentation.
-
 INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
-# file names in lower-case letters. If set to YES upper-case letters are also 
-# allowed. This is useful if you have classes or files whose names only differ 
-# in case and if your file system supports case sensitive file names. Windows 
-# users are advised to set this option to NO.
-
 CASE_SENSE_NAMES       = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
-# will show members with their full class and namespace scopes in the 
-# documentation. If set to YES the scope will be hidden.
-
 HIDE_SCOPE_NAMES       = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put a list of the files that are included by a file in the documentation 
-# of that file.
-
 SHOW_INCLUDE_FILES     = YES
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
-# is inserted in the documentation for inline members.
-
 INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
-# will sort the (detailed) documentation of file and class members 
-# alphabetically by member name. If set to NO the members will appear in 
-# declaration order.
-
-SORT_MEMBER_DOCS       = NO
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
-# brief documentation of file, namespace and class members alphabetically 
-# by member name. If set to NO (the default) the members will appear in 
-# declaration order.
-
 SORT_BRIEF_DOCS        = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
-# sorted by fully-qualified names, including namespaces. If set to 
-# NO (the default), the class list will be sorted only by class name, 
-# not including the namespace part. 
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the 
-# alphabetical list.
-
 SORT_BY_SCOPE_NAME     = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or 
-# disable (NO) the todo list. This list is created by putting \todo 
-# commands in the documentation.
-
-GENERATE_TODOLIST      = NO
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or 
-# disable (NO) the test list. This list is created by putting \test 
-# commands in the documentation.
-
 GENERATE_TESTLIST      = NO
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or 
-# disable (NO) the bug list. This list is created by putting \bug 
-# commands in the documentation.
-
 GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
-# disable (NO) the deprecated list. This list is created by putting 
-# \deprecated commands in the documentation.
-
 GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional 
-# documentation sections, marked by \if sectionname ... \endif.
-
 ENABLED_SECTIONS       = 
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
-# the initial value of a variable or define consists of for it to appear in 
-# the documentation. If the initializer consists of more lines than specified 
-# here it will be hidden. Use a value of 0 to hide initializers completely. 
-# The appearance of the initializer of individual variables and defines in the 
-# documentation can be controlled using \showinitializer or \hideinitializer 
-# command in the documentation regardless of this setting.
-
 MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
-# at the bottom of the documentation of classes and structs. If set to YES the 
-# list will mention the files that were used to generate the documentation.
-
 SHOW_USED_FILES        = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated 
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
 QUIET                  = YES
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are 
-# generated by doxygen. Possible values are YES and NO. If left blank 
-# NO is used.
-
 WARNINGS               = NO
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
-# automatically be disabled.
-
 WARN_IF_UNDOCUMENTED   = NO
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
-# potential errors in the documentation, such as not documenting some 
-# parameters in a documented function, or documenting parameters that 
-# don't exist or using markup commands wrongly.
-
 WARN_IF_DOC_ERROR      = YES
-
-# The WARN_FORMAT tag determines the format of the warning messages that 
-# doxygen can produce. The string should contain the $file, $line, and $text 
-# tags, which will be replaced by the file and line number from which the 
-# warning originated and the warning text.
-
 WARN_FORMAT            = 
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning 
-# and error messages should be written. If left blank the output is written 
-# to stderr.
-
 WARN_LOGFILE           = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain 
-# documented source files. You may enter file names like &quot;myfile.cpp&quot; or 
-# directories like &quot;/usr/src/myproject&quot;. Separate the files or directories 
-# with spaces.
-
 INPUT                  = 
-
-# If the value of the INPUT tag contains directories, you can use the 
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank the following patterns are tested: 
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp 
-# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc
-
 FILE_PATTERNS          = *.h \
                          *.cpp \
                          *.cc \
@@ -409,724 +53,140 @@ FILE_PATTERNS          = *.h \
                          *.cxx \
                          *.h++ \
                          *.hh
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
-# should be searched for input files as well. Possible values are YES and NO. 
-# If left blank NO is used.
-
 RECURSIVE              = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should 
-# excluded from the INPUT source files. This way you can easily exclude a 
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
 EXCLUDE                = 
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories 
-# that are symbolic links (a Unix filesystem feature) are excluded from the input.
-
 EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the 
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
-# certain files from those directories.
-
 EXCLUDE_PATTERNS       = *.moc.* \
                          moc* \
                          *.all_cpp.* \
                          *unload.* \
                          */test/* \
-                         */tests/*
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or 
-# directories that contain example code fragments that are included (see 
-# the \include command).
-
+                         */tests/* \
+                         *_p.h 
 EXAMPLE_PATH           = 
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank all files are included.
-
 EXAMPLE_PATTERNS       = 
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
-# searched for input files to be used with the \include or \dontinclude 
-# commands irrespective of the value of the RECURSIVE tag. 
-# Possible values are YES and NO. If left blank NO is used.
-
 EXAMPLE_RECURSIVE      = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or 
-# directories that contain image that are included in the documentation (see 
-# the \image command).
-
 IMAGE_PATH             = 
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should 
-# invoke to filter for each input file. Doxygen will invoke the filter program 
-# by executing (via popen()) the command &lt;filter&gt; &lt;input-file&gt;, where &lt;filter&gt; 
-# is the value of the INPUT_FILTER tag, and &lt;input-file&gt; is the name of an 
-# input file. Doxygen will then use the output that the filter program writes 
-# to standard output.
-
 INPUT_FILTER           = 
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
-# INPUT_FILTER) will be used to filter the input files when producing source 
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
 FILTER_SOURCE_FILES    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
-# be generated. Documented entities will be cross-referenced with these sources. 
-# Note: To get rid of all source code in the generated output, make sure also 
-# VERBATIM_HEADERS is set to NO.
-
 SOURCE_BROWSER         = YES
-
-# Setting the INLINE_SOURCES tag to YES will include the body 
-# of functions and classes directly in the documentation.
-
 INLINE_SOURCES         = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
-# doxygen to hide any special comment blocks from generated source code 
-# fragments. Normal C and C++ comments will always remain visible.
-
 STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
-# then for each documented function all documented 
-# functions referencing it will be listed.
-
 REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES (the default) 
-# then for each documented function all documented entities 
-# called/used by that function will be listed.
-
 REFERENCES_RELATION    = YES
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
-# will generate a verbatim copy of the header file for each class for 
-# which an include is specified. Set to NO to disable this.
-
 VERBATIM_HEADERS       = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
-# of all compounds will be generated. Enable this if the project 
-# contains a lot of classes, structs, unions or interfaces.
-
 ALPHABETICAL_INDEX     = YES
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
-# in which this list will be split (can be a number in the range [1..20])
-
 COLS_IN_ALPHA_INDEX    = 3
-
-# In case all classes in a project start with a common prefix, all 
-# classes will be put under the same header in the alphabetical index. 
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX          = K
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
-# generate HTML output.
-
-GENERATE_HTML          = NO
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `html' will be used as the default path.
-
 HTML_OUTPUT            = 
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
-# doxygen will generate files with .html extension.
-
 HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard header.
-
 HTML_HEADER            = ../apidocs/common/header.html
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard footer.
-
 HTML_FOOTER            = ../apidocs/common/footer.html
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
-# style sheet that is used by each HTML page. It can be used to 
-# fine-tune the look of the HTML output. If the tag is left blank doxygen 
-# will generate a default style sheet. Note that doxygen will try to copy 
-# the style sheet file to the HTML output directory, so don't put your own 
-# stylesheet in the HTML output directory as well, or it will be erased!
-
 HTML_STYLESHEET        = ../apidocs/common/doxygen.css
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
-# files or namespaces will be aligned in HTML using tables. If set to 
-# NO a bullet list will be used.
-
 HTML_ALIGN_MEMBERS     = YES
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
-# will be generated that can be used as input for tools like the 
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
-# of the generated HTML documentation.
-
 GENERATE_HTMLHELP      = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
-# be used to specify the file name of the resulting .chm file. You 
-# can add a path in front of the file if the result should not be 
-# written to the html output directory.
-
 CHM_FILE               = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
-# be used to specify the location (absolute path including file name) of 
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
-# the HTML help compiler on the generated index.hhp.
-
 HHC_LOCATION           = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
-# controls if a separate .chi index file is generated (YES) or that 
-# it should be included in the master .chm file (NO).
-
 GENERATE_CHI           = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
-# controls whether a binary table of contents is generated (YES) or a 
-# normal table of contents (NO) in the .chm file.
-
 BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members 
-# to the contents of the HTML help documentation and to the tree view.
-
 TOC_EXPAND             = NO
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
-# top of each HTML page. The value NO (the default) enables the index and 
-# the value YES disables it.
-
 DISABLE_INDEX          = YES
-
-# This tag can be used to set the number of enum values (range [1..20]) 
-# that doxygen will group on one line in the generated HTML documentation.
-
 ENUM_VALUES_PER_LINE   = 4
-
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that 
-# is generated for HTML Help). For this to work a browser that supports 
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
-# probably better off using the HTML help feature.
-
 GENERATE_TREEVIEW      = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
-# used to set the initial width (in pixels) of the frame in which the tree 
-# is shown.
-
 TREEVIEW_WIDTH         = 250
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
-# generate Latex output.
-
 GENERATE_LATEX         = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `latex' will be used as the default path.
-
 LATEX_OUTPUT           = 
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
-# invoked. If left blank `latex' will be used as the default command name.
-
 LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
-# generate index for LaTeX. If left blank `makeindex' will be used as the 
-# default command name.
-
 MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
-# LaTeX documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
 COMPACT_LATEX          = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used 
-# by the printer. Possible values are: a4, a4wide, letter, legal and 
-# executive. If left blank a4wide will be used.
-
 PAPER_TYPE             = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
-# packages that should be included in the LaTeX output.
-
 EXTRA_PACKAGES         = 
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
-# standard header. Notice: only use this tag if you know what you are doing!
-
 LATEX_HEADER           = 
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
-# contain links (just like the HTML output) instead of page references 
-# This makes the output suitable for online browsing using a pdf viewer.
-
 PDF_HYPERLINKS         = NO
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
-# higher quality PDF documentation.
-
 USE_PDFLATEX           = NO
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
-# command to the generated LaTeX files. This will instruct LaTeX to keep 
-# running if errors occur, instead of asking the user for help. 
-# This option is also used when generating formulas in HTML.
-
 LATEX_BATCHMODE        = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
-# include the index chapters (such as File Index, Compound Index, etc.) 
-# in the output.
-
 LATEX_HIDE_INDICES     = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
-# The RTF output is optimized for Word 97 and may not look very pretty with 
-# other RTF readers or editors.
-
 GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `rtf' will be used as the default path.
-
 RTF_OUTPUT             = 
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
-# RTF documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
 COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
-# will contain hyperlink fields. The RTF file will 
-# contain links (just like the HTML output) instead of page references. 
-# This makes the output suitable for online browsing using WORD or other 
-# programs which support those fields. 
-# Note: wordpad (write) and others do not support links.
-
 RTF_HYPERLINKS         = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's 
-# config file, i.e. a series of assignments. You only have to provide 
-# replacements, missing definitions are set to their default value.
-
 RTF_STYLESHEET_FILE    = 
-
-# Set optional variables used in the generation of an rtf document. 
-# Syntax is similar to doxygen's config file.
-
 RTF_EXTENSIONS_FILE    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
-# generate man pages
-
 GENERATE_MAN           = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `man' will be used as the default path.
-
 MAN_OUTPUT             = 
-
-# The MAN_EXTENSION tag determines the extension that is added to 
-# the generated man pages (default is the subroutine's section .3)
-
 MAN_EXTENSION          = .kde3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
-# then it will generate one additional man file for each entity 
-# documented in the real man page(s). These additional files 
-# only source the real man page, but without them the man command 
-# would be unable to find the correct page. The default is NO.
-
 MAN_LINKS              = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will 
-# generate an XML file that captures the structure of 
-# the code including all documentation.
-
 GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `xml' will be used as the default path.
-
 XML_OUTPUT             = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
 XML_SCHEMA             = 
-
-# The XML_DTD tag can be used to specify an XML DTD, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
 XML_DTD                = 
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
-# dump the program listings (including syntax highlighting 
-# and cross-referencing information) to the XML output. Note that 
-# enabling this will significantly increase the size of the XML output.
-
 XML_PROGRAMLISTING     = NO
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
-# generate an AutoGen Definitions (see autogen.sf.net) file 
-# that captures the structure of the code including all 
-# documentation. Note that this feature is still experimental 
-# and incomplete at the moment.
-
 GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
-# generate a Perl module file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
-# moment.
-
 GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
-# to generate PDF and DVI output from the Perl module output.
-
 PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
-# nicely formatted so it can be parsed by a human reader.  This is useful 
-# if you want to understand what is going on.  On the other hand, if this 
-# tag is set to NO the size of the Perl module output will be much smaller 
-# and Perl will parse it just the same.
-
 PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file 
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
-# This is useful so different doxyrules.make files included by the same 
-# Makefile don't overwrite each other's variables.
-
 PERLMOD_MAKEVAR_PREFIX = 
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
-# evaluate all C-preprocessor directives found in the sources and include 
-# files.
-
 ENABLE_PREPROCESSING   = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
-# names in the source code. If set to NO (the default) only conditional 
-# compilation will be performed. Macro expansion can be done in a controlled 
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION        = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
-# then the macro expansion is limited to the macros specified with the 
-# PREDEFINED and EXPAND_AS_PREDEFINED tags.
-
-EXPAND_ONLY_PREDEF     = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
 SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that 
-# contain include files that are not input files but should be processed by 
-# the preprocessor.
-
 INCLUDE_PATH           = 
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
-# patterns (like *.h and *.hpp) to filter out the header-files in the 
-# directories. If left blank, the patterns specified with FILE_PATTERNS will 
-# be used.
-
 INCLUDE_FILE_PATTERNS  = 
-
-# The PREDEFINED tag can be used to specify one or more macro names that 
-# are defined before the preprocessor is started (similar to the -D option of 
-# gcc). The argument of the tag is a list of macros of the form: name 
-# or name=definition (no spaces). If the definition and the = are 
-# omitted =1 is assumed.
-
 PREDEFINED             = QT_VERSION=320 \
                          __cplusplus \
                          Q_WS_X11
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
-# this tag can be used to specify a list of macro names that should be expanded. 
-# The macro definition that is found in the sources will be used. 
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
 EXPAND_AS_DEFINED      = 
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
-# doxygen's preprocessor will remove all function-like macros that are alone 
-# on a line, have an all uppercase name, and do not end with a semicolon. Such 
-# function macros are typically used for boiler-plate code, and will confuse the 
-# parser if not removed.
-
 SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references   
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles. 
-# Optionally an initial location of the external documentation 
-# can be added for each tagfile. The format of a tag file without 
-# this location is as follows: 
-#   TAGFILES = file1 file2 ... 
-# Adding location for the tag files is done as follows: 
-#   TAGFILES = file1=loc1 &quot;file2 = loc2&quot; ... 
-# where &quot;loc1&quot; and &quot;loc2&quot; can be relative or absolute paths or 
-# URLs. If a location is present for each tag, the installdox tool 
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen 
-# is run, you must also specify the path to the tagfile here.
-
 TAGFILES               = 
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
-# a tag file that is based on the input files it reads.
-
 GENERATE_TAGFILE       = 
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
-# in the class index. If set to NO only the inherited external classes 
-# will be listed.
-
 ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
-# in the modules index. If set to NO, only the current project's groups will 
-# be listed.
-
 EXTERNAL_GROUPS        = NO
-
-# The PERL_PATH should be the absolute path and name of the perl script 
-# interpreter (i.e. the result of `which perl').
-
 PERL_PATH              = 
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or 
-# super classes. Setting the tag to NO turns the diagrams off. Note that this 
-# option is superseded by the HAVE_DOT option below. This is only a fallback. It is 
-# recommended to install and use dot, since it yields more powerful graphs.
-
 CLASS_DIAGRAMS         = YES
-
-# If set to YES, the inheritance and collaboration graphs will hide 
-# inheritance and usage relations if the target is undocumented 
-# or is not a class.
-
 HIDE_UNDOC_RELATIONS   = NO
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
-# available from the path. This tool is part of Graphviz, a graph visualization 
-# toolkit from AT&amp;T and Lucent Bell Labs. The other options in this section 
-# have no effect if this option is set to NO (the default)
-
 HAVE_DOT               = NO
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect inheritance relations. Setting this tag to YES will force the 
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect implementation dependencies (inheritance, containment, and 
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH    = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
-# collaboration diagrams in a style similar to the OMG's Unified Modeling 
-# Language.
-
 UML_LOOK               = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the 
-# relations between templates and their instances.
-
 TEMPLATE_RELATIONS     = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
-# tags are set to YES then doxygen will generate a graph for each documented 
-# file showing the direct and indirect include dependencies of the file with 
-# other documented files.
-
 INCLUDE_GRAPH          = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
-# documented header file showing the documented files that directly or 
-# indirectly include this file.
-
 INCLUDED_BY_GRAPH      = YES
-
-# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
-# generate a call dependency graph for every global function or class method. 
-# Note that enabling this option will significantly increase the time of a run. 
-# So in most cases it will be better to enable call graphs for selected 
-# functions only using the \callgraph command.
-
 CALL_GRAPH             = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
-# will graphical hierarchy of all classes instead of a textual one.
-
 GRAPHICAL_HIERARCHY    = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
 DOT_IMAGE_FORMAT       = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be 
-# found. If left blank, it is assumed the dot tool can be found on the path.
-
 DOT_PATH               = 
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that 
-# contain dot files that are included in the documentation (see the 
-# \dotfile command).
-
 DOTFILE_DIRS           = 
-
-# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
-# this value, doxygen will try to truncate the graph, so that it fits within 
-# the specified constraint. Beware that most browsers cannot cope with very 
-# large images.
-
 MAX_DOT_GRAPH_WIDTH    = 800
-
-# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
-# this value, doxygen will try to truncate the graph, so that it fits within 
-# the specified constraint. Beware that most browsers cannot cope with very 
-# large images.
-
 MAX_DOT_GRAPH_HEIGHT   = 1024
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
-# graphs generated by dot. A depth value of 3 means that only nodes reachable 
-# from the root by following a path via at most 3 edges will be shown. Nodes that 
-# lay further from the root node will be omitted. Note that setting this option to 
-# 1 or 2 may greatly reduce the computation time needed for large code bases. Also 
-# note that a graph may be further truncated if the graph's image dimensions are 
-# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). 
-# If 0 is used for the depth value (the default), the graph is not depth-constrained.
-
 MAX_DOT_GRAPH_DEPTH    = 0
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
-# generate a legend page explaining the meaning of the various boxes and 
-# arrows in the dot generated graphs.
-
 GENERATE_LEGEND        = YES
+DOT_CLEANUP            = YES
+SEARCHENGINE           = NO
 
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
-# remove the intermediate dot files that are used to generate 
-# the various graphs.
+### KDE Settings
+ALIASES = \
+	&quot;intern=\par&lt;b&gt;Internal use only.&lt;/b&gt;&quot; \
+	&quot;reimp=\par&lt;b&gt;Reimplemented from superclass.&lt;/b&gt;&quot; \
+	&quot;obsolete=@deprecated&quot; \
+	&quot;feature=\xrefitem features \&quot;Feature(s)\&quot; \&quot;Features\&quot;&quot; \
+	&quot;maintainer=\xrefitem maintainers \&quot;Maintainer(s)\&quot; \&quot;Maintainers\&quot;&quot; \
+	&quot;unmaintained=\xrefitem unmaintained \&quot;Unmaintained\&quot; \&quot;Unmaintained\&quot;&quot; \
+	&quot;requirement=\xrefitem requirements \&quot;Requirement(s)\&quot; \&quot;Requirements\&quot;&quot; \
+	&quot;faq=\xrefitem FAQ \&quot;F.A.Q.\&quot; \&quot;F.A.Q.\&quot;&quot; \
+	&quot;authors=\xrefitem authors \&quot;Author(s)\&quot; \&quot;Authors\&quot;&quot; \
+	&quot;FIXME=\xrefitem fixme \&quot;Fixme\&quot; \&quot;Fixme\&quot;&quot;
 
-DOT_CLEANUP            = YES
+HTML_ALIGN_MEMBERS     = YES
+REFERENCED_BY_RELATION = NO
+REFERENCES_RELATION    = NO
+VERBATIM_HEADERS       = NO
+GENERATE_HTML          = YES
+SOURCE_BROWSER         = YES
+GENERATE_AUTOGEN_DEF   = NO
+DETAILS_AT_TOP         = YES
+SORT_MEMBER_DOCS       = YES
+GENERATE_TODOLIST      = YES
+IGNORE_PREFIX          = K
+GENERATE_HTML          = YES
+CLASS_GRAPH            = YES
+COLLABORATION_GRAPH    = NO
 
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine   
-#---------------------------------------------------------------------------
 
-# The SEARCHENGINE tag specifies whether or not a search engine should be 
-# used. If set to NO the values of all tags below this one will be ignored.
+MACRO_EXPANSION = YES
+EXPAND_ONLY_PREDEF = YES
 
-SEARCHENGINE           = NO</diff>
      <filename>admin/Doxyfile.global</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@
 
 SHELL=/bin/sh
 
-cvs dist cvs-clean configure configure.in configure.files subdirs package-messages package-merge Makefile.am acinclude.m4:
+cvs dist configure configure.in configure.files subdirs package-messages package-merge Makefile.am acinclude.m4 extract-messages:
 	@admindir=$(admindir); \
 	if test &quot;x$$admindir&quot; = x; then \
 	  admindir=.; until test -f $$admindir/admin/cvs.sh; do \
@@ -30,6 +30,8 @@ cvs dist cvs-clean configure configure.in configure.files subdirs package-messag
 configure.in: configure.files subdirs
 configure.files: subdirs
 
+svn: cvs
+
 .SILENT:
 
-.PHONY: cvs dist cvs-clean package-merge package-messages
+.PHONY: svn cvs dist package-merge package-messages</diff>
      <filename>admin/Makefile.common</filename>
    </modified>
    <modified>
      <diff>@@ -16,8 +16,8 @@ dnl    Library General Public License for more details.
 
 dnl    You should have received a copy of the GNU Library General Public License
 dnl    along with this library; see the file COPYING.LIB.  If not, write to
-dnl    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-dnl    Boston, MA 02111-1307, USA.
+dnl    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+dnl    Boston, MA 02110-1301, USA.
 
 dnl IMPORTANT NOTE:
 dnl Please do not modify this file unless you expect your modifications to be
@@ -96,7 +96,7 @@ if test &quot;$ac_x_libraries&quot; = NO; then
   # Don't add to $LIBS permanently.
   ac_save_LIBS=&quot;$LIBS&quot;
   LIBS=&quot;-l$x_direct_test_library $LIBS&quot;
-AC_TRY_LINK(, [${x_direct_test_function}()],
+AC_TRY_LINK([#include &lt;X11/Intrinsic.h&gt;], [${x_direct_test_function}(1)],
 [LIBS=&quot;$ac_save_LIBS&quot;
 # We can link X programs with no special library path.
 ac_x_libraries=],
@@ -565,8 +565,8 @@ AC_DEFUN([KDE_SUBST_PROGRAMS],
         [build_arts=$withval],
         [build_arts=yes]
     )
-    AM_CONDITIONAL(include_ARTS, test &quot;$build_arts&quot; != &quot;no&quot;)
-    if test &quot;$build_arts&quot; == &quot;no&quot;; then
+    AM_CONDITIONAL(include_ARTS, test &quot;$build_arts&quot; '!=' &quot;no&quot;)
+    if test &quot;$build_arts&quot; = &quot;no&quot;; then
         AC_DEFINE(WITHOUT_ARTS, 1, [Defined if compiling without arts])
     fi
 
@@ -574,18 +574,30 @@ AC_DEFUN([KDE_SUBST_PROGRAMS],
         kde_default_bindirs=&quot;$exec_prefix/bin $prefix/bin $kde_libs_prefix/bin $kde_default_bindirs&quot;
         KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
         KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
-        if test &quot;$build_arts&quot; != &quot;no&quot;; then
+        if test &quot;$build_arts&quot; '!=' &quot;no&quot;; then
           KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
           KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
         fi
         KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
 
         kde32ornewer=1
+        kde33ornewer=1
         if test -n &quot;$kde_qtver&quot; &amp;&amp; test &quot;$kde_qtver&quot; -lt 3; then
             kde32ornewer=
+            kde33ornewer=
         else
-            if test &quot;$kde_qtver&quot; = &quot;3&quot; &amp;&amp; test &quot;$kde_qtsubver&quot; -le 1; then
+            if test &quot;$kde_qtver&quot; = &quot;3&quot;; then
+              if test &quot;$kde_qtsubver&quot; -le 1; then
                 kde32ornewer=
+              fi
+              if test &quot;$kde_qtsubver&quot; -le 2; then
+                kde33ornewer=
+              fi
+              if test &quot;$KDECONFIG&quot; != &quot;compiled&quot;; then
+                if test `$KDECONFIG --version | grep KDE | sed 's/KDE: \(...\).*/\1/'` = 3.2; then
+                  kde33ornewer=
+                fi
+              fi
             fi
         fi
 
@@ -593,9 +605,13 @@ AC_DEFUN([KDE_SUBST_PROGRAMS],
             KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)])
             KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
         fi
-        KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [XMLLINT=&quot;&quot;])
+        if test -n &quot;$kde33ornewer&quot;; then
+            KDE_FIND_PATH(makekdewidgets, MAKEKDEWIDGETS, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(makekdewidgets)])
+            AC_SUBST(MAKEKDEWIDGETS)
+        fi
+        KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin], [XMLLINT=&quot;&quot;])
 
-        if test -n &quot;$MEINPROC&quot; &amp;&amp; test ! &quot;$MEINPROC&quot; = &quot;compiled&quot;; then  
+        if test -n &quot;$MEINPROC&quot; -a &quot;$MEINPROC&quot; != &quot;compiled&quot;; then
  	    kde_sharedirs=&quot;/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share&quot;
             test -n &quot;$KDEDIR&quot; &amp;&amp; kde_sharedirs=&quot;$KDEDIR/share $kde_sharedirs&quot;
             AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
@@ -762,10 +778,13 @@ support])
    # darwin requires a poll emulation library
    AC_CHECK_LIB(poll, poll, LIB_POLL=&quot;-lpoll&quot;)
 
+   # for some image handling on Mac OS X
+   AC_CHECK_HEADERS(Carbon/Carbon.h)
+
    # CoreAudio framework
    AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
      AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
-     FRAMEWORK_COREAUDIO=&quot;-Xlinker -framework -Xlinker CoreAudio&quot;
+     FRAMEWORK_COREAUDIO=&quot;-Wl,-framework,CoreAudio&quot;
    ])
 
    AC_CHECK_RES_INIT
@@ -789,6 +808,7 @@ support])
    KDE_CHECK_TYPES
    KDE_CHECK_LIBDL
    KDE_CHECK_STRLCPY
+   KDE_CHECK_PIE_SUPPORT
 
 # darwin needs this to initialize the environment
 AC_CHECK_HEADERS(crt_externs.h)
@@ -873,6 +893,9 @@ AC_ARG_ENABLE(
   kde_use_qt_mac=no
 )
 
+# used to disable x11-specific stuff on special platforms
+AM_CONDITIONAL(include_x11, test &quot;$kde_use_qt_emb&quot; = &quot;no&quot; &amp;&amp; test &quot;$kde_use_qt_mac&quot; = &quot;no&quot;)
+
 if test &quot;$kde_use_qt_emb&quot; = &quot;no&quot; &amp;&amp; test &quot;$kde_use_qt_mac&quot; = &quot;no&quot;; then
 
 AC_MSG_CHECKING(for X)
@@ -960,7 +983,7 @@ if test -z &quot;$kde_x_includes&quot; || test &quot;x$kde_x_includes&quot; = xNONE; then
   X_INCLUDES=&quot;-I$x_includes&quot;
 fi
 
-if test -z &quot;$kde_x_libraries&quot; || test &quot;x$kde_x_libraries&quot; = xNONE; then
+if test -z &quot;$kde_x_libraries&quot; || test &quot;x$kde_x_libraries&quot; = xNONE || test &quot;$kde_x_libraries&quot; = &quot;/usr/lib&quot;; then
   X_LDFLAGS=&quot;&quot;
   x_libraries=&quot;/usr/lib&quot;; dnl better than nothing :-
  else
@@ -968,7 +991,7 @@ if test -z &quot;$kde_x_libraries&quot; || test &quot;x$kde_x_libraries&quot; = xNONE; then
   X_LDFLAGS=&quot;-L$x_libraries&quot;
 fi
 all_includes=&quot;$X_INCLUDES&quot;
-all_libraries=&quot;$X_LDFLAGS&quot;
+all_libraries=&quot;$X_LDFLAGS $LDFLAGS_AS_NEEDED $LDFLAGS_NEW_DTAGS&quot;
 
 # Check for libraries that X11R6 Xt/Xaw programs need.
 ac_save_LDFLAGS=&quot;$LDFLAGS&quot;
@@ -1130,9 +1153,9 @@ EOF
 AC_DEFUN([KDE_USE_QT],
 [
 if test -z &quot;$1&quot;; then
-  # Current default Qt version: 3.2
+  # Current default Qt version: 3.3
   kde_qtver=3
-  kde_qtsubver=2
+  kde_qtsubver=3
 else
   kde_qtsubver=`echo &quot;$1&quot; | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
   # following is the check if subversion isnt found in passed argument
@@ -1156,12 +1179,16 @@ if test -z &quot;$2&quot;; then
   if test &quot;$kde_qtver&quot; = &quot;3&quot;; then
     if test $kde_qtsubver -gt 0; then
 	 if test $kde_qtsubver -gt 1; then
-	    kde_qt_minversion=&quot;&gt;= Qt 3.2&quot;
+	    if test $kde_qtsubver -gt 2; then
+		kde_qt_minversion=&quot;&gt;= Qt 3.3 and &lt; 4.0&quot;
+	    else
+	        kde_qt_minversion=&quot;&gt;= Qt 3.2 and &lt; 4.0&quot;
+	    fi
 	 else
-            kde_qt_minversion=&quot;&gt;= Qt 3.1 (20021021)&quot;
+            kde_qt_minversion=&quot;&gt;= Qt 3.1 (20021021) and &lt; 4.0&quot;
          fi
     else
-      kde_qt_minversion=&quot;&gt;= Qt 3.0&quot;
+      kde_qt_minversion=&quot;&gt;= Qt 3.0 and &lt; 4.0&quot;
     fi
   fi
   if test &quot;$kde_qtver&quot; = &quot;1&quot;; then
@@ -1174,11 +1201,11 @@ fi
 if test -z &quot;$3&quot;; then
    if test $kde_qtver = 3; then
      if test $kde_qtsubver -gt 0; then
-       kde_qt_verstring=&quot;QT_VERSION &gt;= 0x03@VER@00&quot;
+       kde_qt_verstring=&quot;QT_VERSION &gt;= 0x03@VER@00 &amp;&amp; QT_VERSION &lt; 0x040000&quot;
        qtsubver=`echo &quot;00$kde_qtsubver&quot; | sed -e 's,.*\(..\)$,\1,'`
        kde_qt_verstring=`echo $kde_qt_verstring | sed -e &quot;s,@VER@,$qtsubver,&quot;`
      else
-       kde_qt_verstring=&quot;QT_VERSION &gt;= 300&quot;
+       kde_qt_verstring=&quot;QT_VERSION &gt;= 300 &amp;&amp; QT_VERSION &lt; 0x040000&quot;
      fi
    fi
    if test $kde_qtver = 2; then
@@ -1195,6 +1222,9 @@ else
    kde_qt_verstring=&quot;$3&quot;
 fi
 
+if test $kde_qtver = 4; then
+  kde_qt_dirs=&quot;$QTDIR /usr/lib/qt4 /usr/lib/qt /usr/share/qt4&quot;
+fi
 if test $kde_qtver = 3; then
   kde_qt_dirs=&quot;$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3&quot;
 fi
@@ -1326,22 +1356,17 @@ if test -z &quot;$LIBQT_GLOB&quot;; then
   fi
 fi
 
-if test -z &quot;$LIBQT&quot;; then
 dnl ------------------------------------------------------------
 dnl If we got --enable-embedded then adjust the Qt library name.
 dnl ------------------------------------------------------------
-  if test &quot;x$kde_use_qt_emb&quot; = &quot;xyes&quot;; then
-    qtlib=&quot;qte&quot;
-  else
-    qtlib=&quot;qt&quot;
-  fi
-
-  kde_int_qt=&quot;-l$qtlib&quot;
+if test &quot;x$kde_use_qt_emb&quot; = &quot;xyes&quot;; then
+  qtlib=&quot;qte&quot;
 else
-  kde_int_qt=&quot;$LIBQT&quot;
-  kde_lib_qt_set=yes
+  qtlib=&quot;qt&quot;
 fi
 
+kde_int_qt=&quot;-l$qtlib&quot;
+
 if test -z &quot;$LIBQPE&quot;; then
 dnl ------------------------------------------------------------
 dnl If we got --enable-palmtop then add -lqpe to the link line
@@ -1362,13 +1387,8 @@ dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
 dnl ------------------------------------------------------------------------
 
 if test &quot;x$kde_use_qt_mt&quot; = &quot;xyes&quot;; then
-  if test -z &quot;$LIBQT&quot;; then
-    LIBQT=&quot;-l$qtlib-mt&quot;
-    kde_int_qt=&quot;-l$qtlib-mt&quot;
-  else
-    LIBQT=&quot;$qtlib-mt&quot;
-    kde_int_qt=&quot;$qtlib-mt&quot;
-  fi
+  LIBQT=&quot;-l$qtlib-mt&quot;
+  kde_int_qt=&quot;-l$qtlib-mt&quot;
   LIBQT_GLOB=&quot;lib$qtlib-mt.*&quot;
   USING_QT_MT=&quot;using -mt&quot;
 else
@@ -1546,7 +1566,7 @@ if test &quot;$qt_libraries&quot; = &quot;$x_libraries&quot; || test -z &quot;$qt_libraries&quot;; then
  QT_LDFLAGS=&quot;&quot;
 else
  QT_LDFLAGS=&quot;-L$qt_libraries&quot;
- all_libraries=&quot;$all_libraries $QT_LDFLAGS&quot;
+ all_libraries=&quot;$QT_LDFLAGS $all_libraries&quot;
 fi
 test -z &quot;$KDE_MT_LDFLAGS&quot; || all_libraries=&quot;$all_libraries $KDE_MT_LDFLAGS&quot;
 
@@ -1623,7 +1643,15 @@ rm -f actest.ui actest.cpp
 
 AC_MSG_RESULT([$kde_cv_uic_plugins])
 if test &quot;$kde_cv_uic_plugins&quot; != yes; then
-	AC_MSG_ERROR([you need to install kdelibs first.])
+	AC_MSG_ERROR([
+you need to install kdelibs first.
+
+If you did install kdelibs, then the Qt version that is picked up by
+this configure is not the same version you used to compile kdelibs. 
+The Qt Plugin installed by kdelibs is *ONLY* loadable if it is the 
+_same Qt version_, compiled with the _same compiler_ and the same Qt
+configuration settings.
+])
 fi
 fi
 ])
@@ -1676,6 +1704,29 @@ AC_DEFUN([KDE_CHECK_CLOSURE],
   AC_SUBST(KDE_NO_UNDEFINED)
 ])
 
+dnl Check if the linker supports --enable-new-dtags and --as-needed
+AC_DEFUN([KDE_CHECK_NEW_LDFLAGS],
+[
+  AC_ARG_ENABLE(new_ldflags,
+		AC_HELP_STRING([--enable-new-ldflags],
+		[enable the new linker flags]),
+	kde_use_new_ldflags=$enableval, 
+	kde_use_new_ldflags=no)
+
+  LDFLAGS_AS_NEEDED=&quot;&quot;
+  LDFLAGS_NEW_DTAGS=&quot;&quot;
+  if test &quot;x$kde_use_new_ldflags&quot; = &quot;xyes&quot;; then
+       LDFLAGS_NEW_DTAGS=&quot;&quot;
+       KDE_CHECK_COMPILER_FLAG([Wl,--enable-new-dtags],
+		[LDFLAGS_NEW_DTAGS=&quot;-Wl,--enable-new-dtags&quot;],)
+
+       KDE_CHECK_COMPILER_FLAG([Wl,--as-needed],
+		[LDFLAGS_AS_NEEDED=&quot;-Wl,--as-needed&quot;],)
+  fi
+  AC_SUBST(LDFLAGS_AS_NEEDED)
+  AC_SUBST(LDFLAGS_NEW_DTAGS)
+])
+
 AC_DEFUN([KDE_CHECK_NMCHECK],
 [
   AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
@@ -1836,7 +1887,7 @@ KDE_DEFAULT_CXXFLAGS=&quot;-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_N
  
 KDE_LDFLAGS=&quot;-L$kde_libraries&quot;
 if test ! &quot;$kde_libraries&quot; = &quot;$x_libraries&quot; &amp;&amp; test ! &quot;$kde_libraries&quot; = &quot;$qt_libraries&quot; ; then 
- all_libraries=&quot;$all_libraries $KDE_LDFLAGS&quot;
+ all_libraries=&quot;$KDE_LDFLAGS $all_libraries&quot;
 fi
 
 AC_SUBST(KDE_LDFLAGS)
@@ -2012,9 +2063,15 @@ AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
    AC_REQUIRE([K_PATH_X])
 
 if test $kde_qtver = 3; then
+   case $host in 
+               *cygwin*) lib_kded=&quot;-lkdeinit_kded&quot; ;;
+               *) lib_kded=&quot;&quot; ;;
+       esac
+   AC_SUBST(LIB_KDED, $lib_kded)
    AC_SUBST(LIB_KDECORE, &quot;-lkdecore&quot;)
    AC_SUBST(LIB_KDEUI, &quot;-lkdeui&quot;)
    AC_SUBST(LIB_KIO, &quot;-lkio&quot;)
+   AC_SUBST(LIB_KJS, &quot;-lkjs&quot;)
    AC_SUBST(LIB_SMB, &quot;-lsmb&quot;)
    AC_SUBST(LIB_KAB, &quot;-lkab&quot;)
    AC_SUBST(LIB_KABC, &quot;-lkabc&quot;)
@@ -2024,6 +2081,10 @@ if test $kde_qtver = 3; then
    AC_SUBST(LIB_KDEPRINT, &quot;-lkdeprint&quot;)
    AC_SUBST(LIB_KUTILS, &quot;-lkutils&quot;)
    AC_SUBST(LIB_KDEPIM, &quot;-lkdepim&quot;)
+   AC_SUBST(LIB_KIMPROXY, &quot;-lkimproxy&quot;)
+   AC_SUBST(LIB_KNEWSTUFF, &quot;-lknewstuff&quot;)
+   AC_SUBST(LIB_KDNSSD, &quot;-lkdnssd&quot;)
+   AC_SUBST(LIB_KUNITTEST, &quot;-lkunittest&quot;)
 # these are for backward compatibility
    AC_SUBST(LIB_KSYCOCA, &quot;-lkio&quot;)
    AC_SUBST(LIB_KFILE, &quot;-lkio&quot;)
@@ -2277,6 +2338,19 @@ mkstemps(&quot;/tmp/aaaXXXXXX&quot;, 6);
 	[MKSTEMPS])
 ])
 
+AC_DEFUN([AC_CHECK_MKSTEMP],
+[
+	KDE_CHECK_FUNC_EXT(mkstemp, [
+#include &lt;stdlib.h&gt;
+#include &lt;unistd.h&gt;
+],
+	[
+mkstemp(&quot;/tmp/aaaXXXXXX&quot;);
+],
+	[int mkstemp(char *)],
+	[MKSTEMP])
+])
+
 AC_DEFUN([AC_CHECK_MKDTEMP],
 [
 	KDE_CHECK_FUNC_EXT(mkdtemp, [
@@ -2316,23 +2390,16 @@ AC_DEFUN([AC_CHECK_RES_INIT],
   LIBS=$kde_libs_safe
   AC_SUBST(LIBRESOLV)
 
-  AC_MSG_CHECKING([if res_init is available])
-  AC_TRY_COMPILE(
+  KDE_CHECK_FUNC_EXT(res_init,
     [
 #include &lt;sys/types.h&gt;
 #include &lt;netinet/in.h&gt;
 #include &lt;arpa/nameser.h&gt;
 #include &lt;resolv.h&gt;
     ],
-    [
-      res_init();
-    ],
-    [
-      AC_MSG_RESULT(yes)
-      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
-    ],
-    [ AC_MSG_RESULT(no) ]
-  )
+    [res_init()],
+    [int res_init(void)],
+    [RES_INIT])
 ])
 
 AC_DEFUN([AC_CHECK_STRLCPY],
@@ -2360,6 +2427,38 @@ AC_DEFUN([AC_CHECK_STRLCAT],
 	[STRLCAT])
 ])
 
+AC_DEFUN([AC_CHECK_RES_QUERY],
+[
+	KDE_CHECK_FUNC_EXT(res_query, [
+#include &lt;sys/types.h&gt;
+#include &lt;netinet/in.h&gt;
+#include &lt;arpa/nameser.h&gt;
+#include &lt;resolv.h&gt;
+#include &lt;netdb.h&gt;
+],
+[
+res_query(NULL, 0, 0, NULL, 0);
+],
+	[int res_query(const char *, int, int, unsigned char *, int)],
+	[RES_QUERY])
+])
+
+AC_DEFUN([AC_CHECK_DN_SKIPNAME],
+[
+	KDE_CHECK_FUNC_EXT(dn_skipname, [
+#include &lt;sys/types.h&gt;
+#include &lt;netinet/in.h&gt;
+#include &lt;arpa/nameser.h&gt;
+#include &lt;resolv.h&gt;
+],
+[
+dn_skipname (NULL, NULL);
+],
+	[int dn_skipname (unsigned char *, unsigned char *)],
+	[DN_SKIPNAME])
+])
+
+
 AC_DEFUN([AC_FIND_GIF],
    [AC_MSG_CHECKING([for giflib])
 AC_CACHE_VAL(ac_cv_lib_gif,
@@ -2404,22 +2503,16 @@ LIBS=&quot;$all_libraries $USER_LDFLAGS -ljpeg$2 -lm&quot;
 ac_save_CFLAGS=&quot;$CFLAGS&quot;
 CFLAGS=&quot;$CFLAGS $all_includes $USER_INCLUDES&quot;
 AC_TRY_LINK(
-[/* Override any gcc2 internal prototype to avoid an error.  */
-struct jpeg_decompress_struct;
-typedef struct jpeg_decompress_struct * j_decompress_ptr;
-typedef int size_t;
+[
 #ifdef __cplusplus
 extern &quot;C&quot; {
 #endif
-    void jpeg_CreateDecompress(j_decompress_ptr cinfo,
-                                    int version, size_t structsize);
+void jpeg_CreateDecompress();
 #ifdef __cplusplus
 }
 #endif
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
 ],
-            [jpeg_CreateDecompress(0L, 0, 0);],
+[jpeg_CreateDecompress();],
             eval &quot;ac_cv_lib_jpeg_$1=-ljpeg$2&quot;,
             eval &quot;ac_cv_lib_jpeg_$1=no&quot;)
 LIBS=&quot;$ac_save_LIBS&quot;
@@ -2626,6 +2719,73 @@ KDE_TRY_TIFFLIB(tiff, [],
 AC_SUBST(LIBTIFF)
 ])
 
+AC_DEFUN([KDE_FIND_LIBEXR],
+[
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+AC_REQUIRE([AC_FIND_ZLIB])
+AC_CACHE_VAL(ac_cv_libexr,
+[
+  if test -z &quot;$PKG_CONFIG&quot;; then
+    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+  fi
+
+  AC_MSG_CHECKING([for OpenEXR libraries])
+
+  if test &quot;$PKG_CONFIG&quot; = &quot;no&quot; ; then
+     AC_MSG_RESULT(no)
+     echo &quot;*** The pkg-config script could not be found. Make sure it is&quot;
+     echo &quot;*** in your path, or set the PKG_CONFIG environment variable&quot;
+     echo &quot;*** to the full path to pkg-config.&quot;
+     echo &quot;*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config.&quot;
+  else
+     if !(`$PKG_CONFIG --exists OpenEXR`) ; then
+        AC_MSG_RESULT(no)
+        EXRSTATUS=no
+     else
+        if !(`$PKG_CONFIG --atleast-version=&quot;1.1.1&quot; OpenEXR`) ; then
+           AC_MSG_RESULT(no)
+           EXRSTATUS=old
+        else
+           kde_save_LIBS=&quot;$LIBS&quot;
+           LIBS=&quot;$LIBS $all_libraries $USER_LDFLAGS `pkg-config --libs OpenEXR` $LIBZ&quot;
+           AC_LANG_SAVE
+           AC_LANG_CPLUSPLUS
+           kde_save_CXXFLAGS=&quot;$CXXFLAGS&quot;
+           EXR_FLAGS=`$PKG_CONFIG --cflags OpenEXR`
+           CXXFLAGS=&quot;$CXXFLAGS $all_includes $USER_INCLUDES $EXR_FLAGS&quot;
+
+           AC_TRY_LINK(dnl
+               [
+               #include &lt;ImfRgbaFile.h&gt;
+               ],
+               [
+               using namespace Imf;
+               RgbaInputFile file (&quot;dummy&quot;);
+               return 0;
+               ],
+               eval &quot;ac_cv_libexr='`pkg-config --libs OpenEXR`'&quot;,
+               eval &quot;ac_cv_libexr=no&quot;
+           )
+           LIBS=&quot;$kde_save_LIBS&quot;
+           CXXFLAGS=&quot;$kde_save_CXXFLAGS&quot;
+           AC_LANG_RESTORE
+           ])dnl
+           if eval &quot;test ! \&quot;`echo $ac_cv_libexr`\&quot; = no&quot;; then
+               AC_DEFINE_UNQUOTED(HAVE_EXR, 1, [Define if you have OpenEXR])
+               LIB_EXR=&quot;$ac_cv_libexr&quot;
+               AC_MSG_RESULT($ac_cv_libexr)
+           else
+               AC_MSG_RESULT(no)
+               LIB_EXR=&quot;&quot;
+           fi
+        fi
+     fi
+  fi
+  AC_SUBST(LIB_EXR)
+  AC_SUBST(EXR_FLAGS)
+])
+
+
 
 AC_DEFUN([AC_FIND_PNG],
 [
@@ -2814,6 +2974,76 @@ AC_DEFUN([AC_REMOVE_FORBIDDEN],
   fi
 ])
 
+
+AC_DEFUN([KDE_CHECK_FOR_BAD_COMPILER],
+[
+  AC_MSG_CHECKING([whether $CC is blacklisted])
+
+  dnl In theory we have tu run this test against $CC and $CXX
+  dnl in C and in C++ mode, because its perfectly legal for
+  dnl the user to mix compiler versions, since C has a defined
+  dnl ABI. 
+  dnl 
+  dnl For now, we assume the user is not on crack.
+
+  AC_TRY_COMPILE([
+#ifdef __GNUC__
+#if __GNUC__ == 4 &amp;&amp; __GNUC_MINOR__ == 0 &amp;&amp; __GNUC_PATCHLEVEL__ == 0
+choke me
+#endif
+#endif
+], ,
+  kde_bad_compiler=no, 
+  kde_bad_compiler=yes
+)
+
+  AC_MSG_RESULT($kde_bad_compiler)
+
+if test &quot;$kde_bad_compiler&quot; = &quot;yes&quot;; then
+  AC_MSG_ERROR([
+
+This particular compiler version is blacklisted because it
+is known to miscompile KDE. Please use a newer version, or
+if that is not yet available, choose an older version. 
+
+Please do not report a bug or bother us reporting this
+configure error. We know about it, and we introduced
+it by intention to avoid untraceable bugs or crashes in KDE.
+
+])
+fi
+
+])
+
+
+AC_DEFUN([KDE_CHECK_FOR_OPT_NOINLINE_MATCH],
+[
+  AC_CACHE_CHECK([whether system headers can cope with -O2 -fno-inline],
+    kde_cv_opt_noinline_match,
+  [
+  kde_cv_opt_noinline_match=irrelevant
+  dnl if we don't use both -O2 and -fno-inline, this check is moot
+  if echo &quot;$CFLAGS&quot; | grep -e -O2 &gt;/dev/null 2&gt;/dev/null \
+     &amp;&amp; echo &quot;$CFLAGS&quot; | grep -e -fno-inline &gt;/dev/null 2&gt;/dev/null ; then
+
+    ac_cflags_save=&quot;$CFLAGS&quot;
+    CFLAGS=&quot;$CFLAGS -D_USE_GNU&quot;
+
+    AC_TRY_LINK([
+  #include &lt;string.h&gt;
+], [  const char *pt, *et;
+  et = __extension__      ({ char __a0, __a1, __a2;       (__builtin_constant_p (  &quot;;,&quot;  ) &amp;&amp; ((size_t)(const void *)((   &quot;;,&quot;   )+ 1) - (size_t)(const void *)(   &quot;;,&quot;   ) == 1)        ? ((__a0 =((__const char  *) (  &quot;;,&quot;  ))[0], __a0 == '\0')     ? ((void) (  pt ),((void *)0) )        : ((__a1 = ((__const char *) (  &quot;;,&quot;  ))[1], __a1== '\0')      ? (__extension__ (__builtin_constant_p (  __a0 ) &amp;&amp; ( __a0 ) == '\0'   ? (char *) __rawmemchr (   pt  ,   __a0)       : strchr(   pt  ,   __a0 )))   : ((__a2 = ((__const char *) (  &quot;;,&quot;  ))[2], __a2 == '\0')      ? __strpbrk_c2 (  pt , __a0, __a1)      :(((__const char *) (  &quot;;,&quot;  ))[3] == '\0'     ? __strpbrk_c3 (  pt ,__a0, __a1, __a2): strpbrk (  pt ,   &quot;;,&quot;  ))))) : strpbrk (  pt ,  &quot;;,&quot;  )); }) ;
+],
+    kde_cv_opt_noinline_match=yes,
+    kde_cv_opt_noinline_match=no
+    )
+
+    CFLAGS=&quot;$ac_cflags_save&quot;
+  fi
+  ])
+])
+
+
 dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
 AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
 [dnl
@@ -2867,7 +3097,7 @@ AC_DEFUN([AC_CHECK_COMPILERS],
     fi
    ], [kde_use_strict_options=&quot;no&quot;])
 
-  AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similiar]),
+  AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similar]),
    [
     if test $enableval = &quot;no&quot;; then
          kde_use_warnings=&quot;no&quot;
@@ -2898,7 +3128,7 @@ AC_DEFUN([AC_CHECK_COMPILERS],
       if test $kde_use_debug_code = &quot;full&quot;; then
         CFLAGS=&quot;-g3 -fno-inline $CFLAGS&quot;
       else
-        CFLAGS=&quot;-g -O2 $CFLAGS&quot;
+        CFLAGS=&quot;-g -O2 -fno-schedule-insns -fno-inline $CFLAGS&quot;
       fi
     else
       CFLAGS=&quot;-O2 $CFLAGS&quot;
@@ -2923,6 +3153,8 @@ AC_DEFUN([AC_CHECK_COMPILERS],
 
   AC_PROG_CXX
 
+  KDE_CHECK_FOR_BAD_COMPILER
+
   if test &quot;$GXX&quot; = &quot;yes&quot; || test &quot;$CXX&quot; = &quot;KCC&quot;; then
     if test &quot;$kde_use_debug_code&quot; != &quot;no&quot;; then
       if test &quot;$CXX&quot; = &quot;KCC&quot;; then
@@ -2931,7 +3163,7 @@ AC_DEFUN([AC_CHECK_COMPILERS],
         if test &quot;$kde_use_debug_code&quot; = &quot;full&quot;; then
           CXXFLAGS=&quot;-g3 -fno-inline $CXXFLAGS&quot;
         else
-          CXXFLAGS=&quot;-g -O2 $CXXFLAGS&quot;
+          CXXFLAGS=&quot;-g -O2 -fno-schedule-insns -fno-inline $CXXFLAGS&quot;
         fi
       fi
       KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS=&quot;-fno-builtin $CXXFLAGS&quot;])
@@ -2944,7 +3176,7 @@ AC_DEFUN([AC_CHECK_COMPILERS],
         CXXFLAGS=&quot;+K3 $CXXFLAGS&quot;
       else
         CXXFLAGS=&quot;-O2 $CXXFLAGS&quot;
-      fi  
+      fi
     fi
   fi
 
@@ -2962,45 +3194,84 @@ AC_DEFUN([AC_CHECK_COMPILERS],
 
   if test &quot;$kde_use_warnings&quot; = &quot;yes&quot;; then
       if test &quot;$GCC&quot; = &quot;yes&quot;; then
-        CXXFLAGS=&quot;-Wall -W -Wpointer-arith -Wwrite-strings $CXXFLAGS&quot;
+        CXXFLAGS=&quot;-Wall -W -Wpointer-arith $CXXFLAGS&quot;
         case $host in
           *-*-linux-gnu)	
-            CFLAGS=&quot;-ansi -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS&quot;
-            CXXFLAGS=&quot;-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS&quot;
+            CFLAGS=&quot;-std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS&quot;
+            CXXFLAGS=&quot;-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts $CXXFLAGS&quot;
             KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS=&quot;$CXXFLAGS -Wformat-security -Wmissing-format-attribute&quot;])
             KDE_CHECK_C_COMPILER_FLAG(Wmissing-format-attribute, [CFLAGS=&quot;$CFLAGS -Wformat-security -Wmissing-format-attribute&quot;])
           ;;
         esac
         KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS=&quot;-Wundef $CXXFLAGS&quot;])
         KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS=&quot;-Wno-long-long $CXXFLAGS&quot;])
-        KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS=&quot;-Wnon-virtual-dtor $CXXFLAGS&quot;])
+        dnl ### FIXME: revert for KDE 4
+        KDE_CHECK_COMPILER_FLAG(Wno-non-virtual-dtor,[CXXFLAGS=&quot;$CXXFLAGS -Wno-non-virtual-dtor&quot;])
      fi
   fi
 
   if test &quot;$GXX&quot; = &quot;yes&quot; &amp;&amp; test &quot;$kde_use_strict_options&quot; = &quot;yes&quot;; then
     CXXFLAGS=&quot;-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS&quot;
   fi
-    
+
+  AC_ARG_ENABLE(pch,
+     AC_HELP_STRING([--enable-pch],
+                    [enables precompiled header support (currently only KCC or gcc &gt;=3.4+unsermake) [default=no]]),
+    [ kde_use_pch=$enableval ],[ kde_use_pch=no ])
+ 
+  HAVE_GCC_VISIBILITY=0
+  AC_SUBST([HAVE_GCC_VISIBILITY])
+
   if test &quot;$GXX&quot; = &quot;yes&quot;; then
+    gcc_no_reorder_blocks=NO
+    KDE_CHECK_COMPILER_FLAG(fno-reorder-blocks,[gcc_no_reorder_blocks=YES])
+    if test $kde_use_debug_code != &quot;no&quot; &amp;&amp; \
+       test $kde_use_debug_code != &quot;full&quot; &amp;&amp; \
+       test &quot;YES&quot; = &quot;$gcc_no_reorder_blocks&quot; ; then
+          CXXFLAGS=&quot;$CXXFLAGS -fno-reorder-blocks&quot;
+          CFLAGS=&quot;$CFLAGS -fno-reorder-blocks&quot;
+    fi
     KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS=&quot;$CXXFLAGS -fno-exceptions&quot;])
     KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS=&quot;$CXXFLAGS -fno-check-new&quot;])
     KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS=&quot;$CXXFLAGS -fno-common&quot;])
     KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS=&quot;-fexceptions&quot;], USE_EXCEPTIONS=	)
     ENABLE_PERMISSIVE_FLAG=&quot;-fpermissive&quot;
+
+    if test &quot;$kde_use_pch&quot; = &quot;yes&quot;; then
+        AC_MSG_CHECKING(whether gcc supports precompiling c header files)
+        echo &gt;conftest.h
+        if $CC -x c-header conftest.h &gt;/dev/null 2&gt;/dev/null; then
+            kde_gcc_supports_pch=yes
+            AC_MSG_RESULT(yes)
+        else
+            kde_gcc_supports_pch=no
+            AC_MSG_RESULT(no)
+        fi
+        if test &quot;$kde_gcc_supports_pch&quot; = &quot;yes&quot;; then
+            AC_MSG_CHECKING(whether gcc supports precompiling c++ header files)
+            if $CXX -x c++-header conftest.h &gt;/dev/null 2&gt;/dev/null; then
+                kde_gcc_supports_pch=yes
+                AC_MSG_RESULT(yes)
+            else
+                kde_gcc_supports_pch=no
+                AC_MSG_RESULT(no)
+            fi
+        fi
+        rm -f conftest.h conftest.h.gch
+    fi
+
+    KDE_CHECK_FOR_OPT_NOINLINE_MATCH
+    if test &quot;x$kde_cv_opt_noinline_match&quot; = &quot;xno&quot; ; then
+       CFLAGS=&quot;`echo &quot;$CFLAGS&quot; | sed &quot;s/ -fno-inline//&quot;`&quot;
+    fi
   fi
+  AM_CONDITIONAL(unsermake_enable_pch, test &quot;$kde_use_pch&quot; = &quot;yes&quot; &amp;&amp; test &quot;$kde_gcc_supports_pch&quot; = &quot;yes&quot;)
   if test &quot;$CXX&quot; = &quot;KCC&quot;; then
     dnl unfortunately we currently cannot disable exception support in KCC
     dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
     dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS=&quot;$CXXFLAGS --no_exceptions&quot;])
     dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS=&quot;--exceptions&quot;], USE_EXCEPTIONS=	)
 
-    AC_ARG_ENABLE(pch,
-	AC_HELP_STRING([--enable-pch],
-		       [enables precompiled header support (currently only KCC) [default=no]]),
-    [
-      kde_use_pch=$enableval
-    ],[kde_use_pch=no])
- 
     if test &quot;$kde_use_pch&quot; = &quot;yes&quot;; then
       dnl TODO: support --pch-dir!
       KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS=&quot;$CXXFLAGS --pch&quot;])
@@ -3055,10 +3326,27 @@ AC_DEFUN([AC_CHECK_COMPILERS],
   fi
   KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
 
+  AC_ARG_ENABLE(coverage,
+    AC_HELP_STRING([--enable-coverage],[use gcc coverage testing]), [
+      if test &quot;$am_cv_CC_dependencies_compiler_type&quot; = &quot;gcc3&quot;; then
+        ac_coverage_compiler=&quot;-fprofile-arcs -ftest-coverage&quot;
+        ac_coverage_linker=&quot;-lgcc&quot;
+      elif test &quot;$am_cv_CC_dependencies_compiler_type&quot; = &quot;gcc&quot;; then
+        ac_coverage_compiler=&quot;-fprofile-arcs -ftest-coverage&quot;
+        ac_coverage_linker=&quot;&quot;
+      else
+        AC_MSG_ERROR([coverage with your compiler is not supported])
+      fi
+      CFLAGS=&quot;$CFLAGS $ac_coverage_compiler&quot;
+      CXXFLAGS=&quot;$CXXFLAGS $ac_coverage_compiler&quot;
+      LDFLAGS=&quot;$LDFLAGS $ac_coverage_linker&quot;
+    ])
+
   AC_SUBST(NOOPT_CXXFLAGS)
   AC_SUBST(NOOPT_CFLAGS)
   AC_SUBST(ENABLE_PERMISSIVE_FLAG)
 
+  KDE_CHECK_NEW_LDFLAGS
   KDE_CHECK_FINAL
   KDE_CHECK_CLOSURE
   KDE_CHECK_NMCHECK
@@ -3066,6 +3354,114 @@ AC_DEFUN([AC_CHECK_COMPILERS],
   ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
 ])
 
+AC_DEFUN([KDE_CHECK_VISIBILITY_GCC_BUG],
+  [
+    AC_CACHE_CHECK([for gcc -fvisibility-inlines-hidden bug], kde_cv_val_gcc_visibility_bug,
+      [
+        AC_LANG_SAVE
+        AC_LANG_CPLUSPLUS
+
+        safe_CXXFLAGS=$CXXFLAGS
+        safe_LDFLAGS=$LDFLAGS
+        CXXFLAGS=&quot;$CXXFLAGS -fPIC -fvisibility-inlines-hidden -O0&quot;
+        LDFLAGS=&quot;$LDFLAGS -shared -fPIC&quot;
+
+        AC_TRY_LINK(
+        [
+          /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */
+	  #include &lt;string&gt;
+          int some_function( void ) __attribute__ ((visibility(&quot;default&quot;)));
+          int some_function( void )
+          {
+	    std::string s(&quot;blafasel&quot;);
+            return 0;
+          }
+        ], [/* elvis is alive */],
+        kde_cv_val_gcc_visibility_bug=no, kde_cv_val_gcc_visibility_bug=yes)
+
+        CXXFLAGS=$safe_CXXFLAGS
+        LDFLAGS=$safe_LDFLAGS
+        AC_LANG_RESTORE
+      ]
+    )
+
+    if test x$kde_cv_val_gcc_visibility_bug = xno; then
+      CXXFLAGS=&quot;$CXXFLAGS -fvisibility-inlines-hidden&quot;
+    fi
+  ]
+)
+
+AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
+[
+  AC_BEFORE([AC_PATH_QT_1_3], [KDE_ENABLE_HIDDEN_VISIBILITY])
+
+  AC_MSG_CHECKING([grepping for visibility push/pop in headers])
+
+  if test &quot;x$GXX&quot; = &quot;xyes&quot;; then
+    AC_LANG_SAVE
+    AC_LANG_CPLUSPLUS
+    AC_EGREP_CPP(
+       [GCC visibility push],
+       [ #include &lt;exception&gt; 
+       ], 
+    [
+      AC_MSG_RESULT(yes)
+      kde_stdc_visibility_patched=yes ],
+    [ 
+      AC_MSG_RESULT(no)
+      AC_MSG_WARN([Your libstdc++ doesn't appear to be patched for 
+                   visibility support. Disabling -fvisibility=hidden])
+
+      kde_stdc_visibility_patched=no ])
+
+    AC_LANG_RESTORE
+
+    kde_have_gcc_visibility=no
+    KDE_CHECK_COMPILER_FLAG(fvisibility=hidden, 
+    [
+      kde_have_gcc_visibility=yes
+      dnl the whole toolchain is just a mess, gcc is just too buggy
+      dnl to handle STL with visibility enabled. Lets reconsider 
+      dnl when gcc 4.2 is out or when things get fixed in the compiler.
+      dnl Contact mueller@kde.org for details.
+      AC_ARG_ENABLE(gcc-hidden-visibility,
+        AC_HELP_STRING([--enable-gcc-hidden-visibility],[toolchain hidden visibility [default=no]]),
+          [kde_have_gcc_visibility=$enableval],
+          [kde_have_gcc_visibility=no])
+
+      AC_CACHE_CHECK([if Qt is patched for -fvisibility], kde_cv_val_qt_gcc_visibility_patched,
+        [
+          AC_LANG_SAVE
+          AC_LANG_CPLUSPLUS
+
+          safe_CXXFLAGS=$CXXFLAGS
+          CXXFLAGS=&quot;$CXXFLAGS $all_includes&quot;
+
+          AC_TRY_COMPILE(
+          [
+#include &lt;qglobal.h&gt;
+#if Q_EXPORT - 0 != 0
+/* if this compiles, then Q_EXPORT is undefined */
+/* if Q_EXPORT is nonempty, this will break compilation */
+#endif
+          ], [/* elvis is alive */],
+          kde_cv_val_qt_gcc_visibility_patched=no, kde_cv_val_qt_gcc_visibility_patched=yes)
+
+          CXXFLAGS=$safe_CXXFLAGS
+          AC_LANG_RESTORE
+        ]
+      )
+
+      if test x$kde_have_gcc_visibility = &quot;xyes&quot; &amp;&amp; test x$kde_stdc_visibility_patched = &quot;xyes&quot; &amp;&amp; test x$kde_cv_val_qt_gcc_visibility_patched = &quot;xyes&quot;; then
+        CXXFLAGS=&quot;$CXXFLAGS -fvisibility=hidden&quot;
+        KDE_CHECK_VISIBILITY_GCC_BUG
+        HAVE_GCC_VISIBILITY=1
+        AC_DEFINE_UNQUOTED(__KDE_HAVE_GCC_VISIBILITY, &quot;$HAVE_GCC_VISIBILITY&quot;, [define to 1 if -fvisibility is supported])
+      fi
+    ])
+  fi
+])
+
 AC_DEFUN([KDE_ADD_DEPENDENCIES],
 [
    [A]M_DEPENDENCIES(CC)
@@ -3093,20 +3489,37 @@ LIBTOOL_SHELL=&quot;/bin/sh ./libtool&quot;
 KDE_PLUGIN=&quot;-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)&quot;
 AC_SUBST(KDE_PLUGIN)
 
+# This hack ensures that libtool creates shared libs for kunittest plugins. By default check_LTLIBRARIES makes static libs.
+KDE_CHECK_PLUGIN=&quot;\$(KDE_PLUGIN) -rpath \$(libdir)&quot;
+AC_SUBST(KDE_CHECK_PLUGIN)
+
 # we patch configure quite some so we better keep that consistent for incremental runs 
 AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
 ])
 
 AC_DEFUN([KDE_CHECK_LIB64],
 [
-    kdelibsuff=no
     AC_ARG_ENABLE(libsuffix,
         AC_HELP_STRING([--enable-libsuffix],
-            [/lib directory suffix (64,32,none[=default])]),
-            kdelibsuff=$enableval)
-    # TODO: add an auto case that compiles a little C app to check
-    # where the glibc is
-    if test &quot;$kdelibsuff&quot; = &quot;no&quot;; then
+            [/lib directory suffix (64,32,none,auto[=default])]),
+            kdelibsuff=$enableval, kdelibsuff=&quot;auto&quot;)
+    
+    if test &quot;$kdelibsuff&quot; = &quot;auto&quot;; then
+    
+cat &gt; conftest.c &lt;&lt; EOF
+#include &lt;stdio.h&gt;
+int main() {
+ return 0;
+}
+EOF
+        kdelibsuff=`$CC conftest.c -o conftest.out; ldd conftest.out |sed -ne '/libc.so/{
+    s,.*/lib\([[^\/]]*\)/.*,\1, 
+    p 
+}'`
+	rm -rf conftest.*
+    fi	
+	
+    if test &quot;$kdelibsuff&quot; = &quot;no&quot; || test &quot;$kdelibsuff&quot; = &quot;none&quot;; then
        kdelibsuff=
     fi
     if test -z &quot;$kdelibsuff&quot;; then
@@ -3152,7 +3565,11 @@ AC_ARG_ENABLE(rpath,
 
 if test -z &quot;$KDE_RPATH&quot; &amp;&amp; test &quot;$USE_RPATH&quot; = &quot;yes&quot;; then
 
-  KDE_RPATH=&quot;-R \$(kde_libraries)&quot;
+  KDE_RPATH=&quot;-R \$(libdir)&quot;
+
+  if test &quot;$kde_libraries&quot; != &quot;$libdir&quot;; then
+      KDE_RPATH=&quot;$KDE_RPATH -R \$(kde_libraries)&quot;
+  fi
 
   if test -n &quot;$qt_libraries&quot;; then
     KDE_RPATH=&quot;$KDE_RPATH -R \$(qt_libraries)&quot;
@@ -3173,40 +3590,56 @@ AC_MSG_RESULT($USE_RPATH)
 ])
 
 dnl Check for the type of the third argument of getsockname
-AC_DEFUN([AC_CHECK_SOCKLEN_T], [
-  AC_MSG_CHECKING(for socklen_t)
-  AC_CACHE_VAL(ac_cv_socklen_t, [
-    AC_LANG_SAVE
-    AC_LANG_CPLUSPLUS
-    AC_TRY_COMPILE([
-#include &lt;sys/types.h&gt;
-#include &lt;sys/socket.h&gt;
-      ],[
-socklen_t a=0;
-getsockname(0,(struct sockaddr*)0, &amp;a);
-      ],
-      ac_cv_socklen_t=socklen_t,
+AC_DEFUN([AC_CHECK_SOCKLEN_T],
+[
+   AC_MSG_CHECKING(for socklen_t)
+   AC_CACHE_VAL(kde_cv_socklen_t,
+   [
+      AC_LANG_PUSH(C++)
+      kde_cv_socklen_t=no
       AC_TRY_COMPILE([
-#include &lt;sys/types.h&gt;
-#include &lt;sys/socket.h&gt;
-        ],[
-int a=0;
-getsockname(0,(struct sockaddr*)0, &amp;a);
-        ],
-        ac_cv_socklen_t=int,
-        ac_cv_socklen_t=size_t
-      )
-    )
-    AC_LANG_RESTORE
-  ])
-
-  AC_MSG_RESULT($ac_cv_socklen_t)
-  if test &quot;$ac_cv_socklen_t&quot; != &quot;socklen_t&quot;; then
-    AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
-        [Define the real type of socklen_t])
-  fi
-  AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
-
+         #include &lt;sys/types.h&gt;
+         #include &lt;sys/socket.h&gt;
+      ],
+      [
+         socklen_t len;
+         getpeername(0,0,&amp;len);
+      ],
+      [
+         kde_cv_socklen_t=yes
+         kde_cv_socklen_t_equiv=socklen_t
+      ])
+      AC_LANG_POP(C++)
+   ])
+   AC_MSG_RESULT($kde_cv_socklen_t)
+   if test $kde_cv_socklen_t = no; then
+      AC_MSG_CHECKING([for socklen_t equivalent for socket functions])
+      AC_CACHE_VAL(kde_cv_socklen_t_equiv,
+      [
+         kde_cv_socklen_t_equiv=int
+         AC_LANG_PUSH(C++)
+         for t in int size_t unsigned long &quot;unsigned long&quot;; do
+            AC_TRY_COMPILE([
+               #include &lt;sys/types.h&gt;
+               #include &lt;sys/socket.h&gt;
+            ],
+            [
+               $t len;
+               getpeername(0,0,&amp;len);
+            ],
+            [
+               kde_cv_socklen_t_equiv=&quot;$t&quot;
+               break
+            ])
+         done
+         AC_LANG_POP(C++)
+      ])
+      AC_MSG_RESULT($kde_cv_socklen_t_equiv)
+   fi
+   AC_DEFINE_UNQUOTED(kde_socklen_t, $kde_cv_socklen_t_equiv,
+                     [type to use in place of socklen_t if not defined])
+   AC_DEFINE_UNQUOTED(ksize_t, $kde_cv_socklen_t_equiv,
+                     [type to use in place of socklen_t if not defined (deprecated, use kde_socklen_t)])
 ])
 
 dnl This is a merge of some macros out of the gettext aclocal.m4
@@ -3498,7 +3931,8 @@ AC_DEFUN([AC_HAVE_DPMS],
       ac_save_ldflags=&quot;$LDFLAGS&quot;
       ac_save_cflags=&quot;$CFLAGS&quot;
       ac_save_libs=&quot;$LIBS&quot;
-      LDFLAGS=&quot;$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET&quot;
+      LDFLAGS=&quot;$LDFLAGS $DPMS_LDFLAGS $all_libraries&quot;
+      LIBS=&quot;-lX11 -lXext $LIBSOCKET&quot;
       CFLAGS=&quot;$CFLAGS $X_INCLUDES&quot;
       test -n &quot;$DPMS_INCLUDE&quot; &amp;&amp; CFLAGS=&quot;-I$DPMS_INCLUDE $CFLAGS&quot;
       AC_TRY_LINK([
@@ -3509,12 +3943,7 @@ AC_DEFUN([AC_HAVE_DPMS],
 	  int foo_test_dpms()
 	  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
 	  ac_cv_have_dpms=&quot;yes&quot;, [
-              LDFLAGS=&quot;$ac_save_ldflags&quot;
-              CFLAGS=&quot;$ac_save_cflags&quot;
-              LDFLAGS=&quot;$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET&quot;
-              LIBS=&quot;$LIBS -lXdpms&quot;
-              CFLAGS=&quot;$CFLAGS $X_INCLUDES&quot;
-              test -n &quot;$DPMS_INCLUDE&quot; &amp;&amp; CFLAGS=&quot;-I$DPMS_INCLUDE $CFLAGS&quot;
+              LIBS=&quot;-lXdpms $LIBS&quot;
               AC_TRY_LINK([
 	          #include &lt;X11/Xproto.h&gt;
         	  #include &lt;X11/X.h&gt;
@@ -3563,12 +3992,14 @@ AC_DEFUN([AC_HAVE_DPMS],
    [Define if you have the DPMSCapable prototype in &lt;X11/extensions/dpms.h&gt;])
  AC_CHECK_DECL(DPMSCapable,
    AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
-   [#include &lt;X11/extensions/dpms.h&gt;])
+   [#include &lt;X11/Xlib.h&gt;
+   #include &lt;X11/extensions/dpms.h&gt;])
  AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
    [Define if you have the DPMSInfo prototype in &lt;X11/extensions/dpms.h&gt;])
  AC_CHECK_DECL(DPMSInfo,
    AC_DEFINE(HAVE_DPMSINFO_PROTO),,
-   [#include &lt;X11/extensions/dpms.h&gt;])
+   [#include &lt;X11/Xlib.h&gt;
+   #include &lt;X11/extensions/dpms.h&gt;])
  CFLAGS=&quot;$ac_save_cflags&quot;
  AC_SUBST(DPMSINC)
  AC_SUBST(DPMSLIB)
@@ -3594,31 +4025,23 @@ AC_DEFUN([AC_HAVE_GL],
    [
     AC_LANG_SAVE
     AC_LANG_CPLUSPLUS
-    ac_save_ldflags=&quot;$LDFLAGS&quot;
-    ac_save_cxxflags=&quot;$CXXFLAGS&quot;
-    LDFLAGS=&quot;$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU&quot;
-    test &quot;x$kde_use_qt_mac&quot; != xyes &amp;&amp; test &quot;x$kde_use_qt_emb&quot; != xyes &amp;&amp; LDFLAGS=&quot;$LDFLAGS -lX11&quot;
-    LDFLAGS=&quot;$LDFLAGS $LIB_XEXT -lm $LIBSOCKET&quot;
+    ac_save_ldflags=$LDFLAGS
+    ac_save_cxxflags=$CXXFLAGS
+    ac_save_libs=$LIBS
+    LDFLAGS=&quot;$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries&quot;
+    LIBS=&quot;$LIBS -lGL -lGLU&quot;
+    test &quot;x$kde_use_qt_mac&quot; != xyes &amp;&amp; test &quot;x$kde_use_qt_emb&quot; != xyes &amp;&amp; LIBS=&quot;$LIBS -lX11&quot;
+    LIBS=&quot;$LIBS $LIB_XEXT -lm $LIBSOCKET&quot;
     CXXFLAGS=&quot;$CFLAGS $X_INCLUDES&quot;
     test -n &quot;$GL_INCLUDE&quot; &amp;&amp; CFLAGS=&quot;-I$GL_INCLUDE $CFLAGS&quot;
     AC_TRY_LINK([#include &lt;GL/gl.h&gt;
 #include &lt;GL/glu.h&gt;
 ], [],
-	ac_cv_have_gl=&quot;mesa&quot;, ac_cv_have_gl=&quot;no&quot;)
-    if test &quot;x$ac_cv_have_gl&quot; = &quot;xno&quot;; then
-      LDFLAGS=&quot;$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL&quot;
-      test &quot;x$kde_use_qt_mac&quot; != xyes &amp;&amp; test &quot;x$kde_use_qt_emb&quot; != xyes &amp;&amp; LDFLAGS=&quot;$LDFLAGS -lX11&quot;
-      LDFLAGS=&quot;$LDFLAGS $LIB_XEXT -lm $LIBSOCKET&quot;
-      CXXFLAGS=&quot;$ac_save_cflags $X_INCLUDES&quot;
-      test -n &quot;$GL_INCLUDE&quot; &amp;&amp; CFLAGS=&quot;-I$GL_INCLUDE $CFLAGS&quot;
-      AC_TRY_LINK([#include &lt;GL/gl.h&gt;
-#include &lt;GL/glu.h&gt;
-], [],
-	  ac_cv_have_gl=&quot;yes&quot;, ac_cv_have_gl=&quot;no&quot;)
-    fi
+	ac_cv_have_gl=&quot;yes&quot;, ac_cv_have_gl=&quot;no&quot;)
     AC_LANG_RESTORE
-    LDFLAGS=&quot;$ac_save_ldflags&quot;
-    CXXFLAGS=&quot;$ac_save_cxxflags&quot;
+    LDFLAGS=$ac_save_ldflags
+    CXXFLAGS=$ac_save_cxxflags
+    LIBS=$ac_save_libs
    ])dnl
 
   if test &quot;$ac_cv_have_gl&quot; = &quot;no&quot;; then
@@ -3629,17 +4052,9 @@ AC_DEFUN([AC_HAVE_GL],
   else
     AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
     if test &quot;$GL_LDFLAGS&quot; = &quot;&quot;; then
-       if test &quot;$ac_cv_have_gl&quot; = &quot;mesa&quot;; then
-          GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)'
-       else
-          GLLIB='-lGLU -lGL $(LIB_X11)'
-       fi
+       GLLIB='-lGLU -lGL $(LIB_X11)'
     else
-       if test &quot;$ac_cv_have_gl&quot; = &quot;mesa&quot;; then
-          GLLIB=&quot;$GL_LDFLAGS -lMesaGLU -lMesaGL &quot;'$(LIB_X11)'
-       else
-          GLLIB=&quot;$GL_LDFLAGS -lGLU -lGL &quot;'$(LIB_X11)'
-       fi
+       GLLIB=&quot;$GL_LDFLAGS -lGLU -lGL &quot;'$(LIB_X11)'
     fi
     if test &quot;$GL_INCLUDE&quot; = &quot;&quot;; then
        GLINC=&quot;&quot;
@@ -3938,17 +4353,48 @@ fi
 
 AC_DEFUN([KDE_CHECK_LIBPTHREAD],
 [
+  dnl This code is here specifically to handle the
+  dnl various flavors of threading library on FreeBSD
+  dnl 4-, 5-, and 6-, and the (weird) rules around it.
+  dnl There may be an environment PTHREAD_LIBS that 
+  dnl specifies what to use; otherwise, search for it.
+  dnl -pthread is special cased and unsets LIBPTHREAD
+  dnl below if found.
   LIBPTHREAD=&quot;&quot;
 
   if test -n &quot;$PTHREAD_LIBS&quot;; then
-    PTHREAD_LIBS_save=&quot;$PTHREAD_LIBS&quot;
-    PTHREAD_LIBS=`echo &quot;$PTHREAD_LIBS_save&quot; | sed -e 's,^-l,,g'`
-    KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [LIBPTHREAD=&quot;$PTHREAD_LIBS_save&quot;] )
-    PTHREAD_LIBS=&quot;$PTHREAD_LIBS_save&quot;
+    if test &quot;x$PTHREAD_LIBS&quot; = &quot;x-pthread&quot; ; then
+      LIBPTHREAD=&quot;PTHREAD&quot;
+    else
+      PTHREAD_LIBS_save=&quot;$PTHREAD_LIBS&quot;
+      PTHREAD_LIBS=`echo &quot;$PTHREAD_LIBS_save&quot; | sed -e 's,^-l,,g'`
+      AC_MSG_CHECKING([for pthread_create in $PTHREAD_LIBS])
+      KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [
+          LIBPTHREAD=&quot;$PTHREAD_LIBS_save&quot;])
+      PTHREAD_LIBS=&quot;$PTHREAD_LIBS_save&quot;
+    fi
   fi
 
+  dnl Is this test really needed, in the face of the Tru64 test below?
   if test -z &quot;$LIBPTHREAD&quot;; then
-    AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD=&quot;-lpthread&quot;] )
+    AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD=&quot;-lpthread&quot;])
+  fi
+
+  dnl This is a special Tru64 check, see BR 76171 issue #18.
+  if test -z &quot;$LIBPTHREAD&quot; ; then
+    AC_MSG_CHECKING([for pthread_create in -lpthread])
+    kde_safe_libs=$LIBS
+    LIBS=&quot;$LIBS -lpthread&quot;
+    AC_TRY_LINK([#include &lt;pthread.h&gt;],[(void)pthread_create(0,0,0,0);],[
+        AC_MSG_RESULT(yes)
+        LIBPTHREAD=&quot;-lpthread&quot;],[
+	AC_MSG_RESULT(no)])
+    LIBS=$kde_safe_libs
+  fi
+
+  dnl Un-special-case for FreeBSD.
+  if test &quot;x$LIBPTHREAD&quot; = &quot;xPTHREAD&quot; ; then
+    LIBPTHREAD=&quot;&quot;
   fi
 
   AC_SUBST(LIBPTHREAD)
@@ -4178,14 +4624,18 @@ fi
 
 AC_DEFUN([KDE_CHECK_PYTHON],
 [
-  KDE_CHECK_PYTHON_INTERN(&quot;2.3&quot;, 
-   [KDE_CHECK_PYTHON_INTERN(&quot;2.2&quot;, 
-     [KDE_CHECK_PYTHON_INTERN(&quot;2.1&quot;, 
-       [KDE_CHECK_PYTHON_INTERN(&quot;2.0&quot;, 
-         [KDE_CHECK_PYTHON_INTERN($1, $2) ])
+  KDE_CHECK_PYTHON_INTERN(&quot;2.5&quot;,
+    [KDE_CHECK_PYTHON_INTERN(&quot;2.4&quot;,
+     [KDE_CHECK_PYTHON_INTERN(&quot;2.3&quot;, 
+       [KDE_CHECK_PYTHON_INTERN(&quot;2.2&quot;, 
+         [KDE_CHECK_PYTHON_INTERN(&quot;2.1&quot;, 
+           [KDE_CHECK_PYTHON_INTERN(&quot;2.0&quot;, 
+             [KDE_CHECK_PYTHON_INTERN($1, $2) ])
+           ])
+         ])
        ])
      ])
-   ])
+  ])
 ])
 
 AC_DEFUN([KDE_CHECK_STL],
@@ -4217,7 +4667,7 @@ using namespace std;
    else
 	 AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
 Check config.log for details - if you're using a Linux distribution you might miss
-a package named similiar to libstd++-dev.])
+a package named similar to libstdc++-dev.])
    fi
 
    CXXFLAGS=&quot;$ac_save_CXXFLAGS&quot;
@@ -4309,10 +4759,10 @@ AC_DEFUN([KDE_CREATE_SUBDIRSLIST],
 [
 
 DO_NOT_COMPILE=&quot;$DO_NOT_COMPILE CVS debian bsd-port admin&quot;
+TOPSUBDIRS=&quot;&quot;
 
 if test ! -s $srcdir/subdirs; then
   dnl Note: Makefile.common creates subdirs, so this is just a fallback
-  TOPSUBDIRS=&quot;&quot;
   files=`cd $srcdir &amp;&amp; ls -1`
   dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
   for i in $dirs; do
@@ -4453,13 +4903,13 @@ AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAX
 
 AC_DEFUN([KDE_CHECK_HEADER],
 [
-   AC_LANG_SAVE
    kde_safe_cppflags=$CPPFLAGS
    CPPFLAGS=&quot;$CPPFLAGS $all_includes&quot;
+   AC_LANG_SAVE
    AC_LANG_CPLUSPLUS
    AC_CHECK_HEADER([$1], [$2], [$3], [$4])
-   CPPFLAGS=$kde_safe_cppflags
    AC_LANG_RESTORE
+   CPPFLAGS=$kde_safe_cppflags
 ])
 
 AC_DEFUN([KDE_CHECK_HEADERS],
@@ -4511,7 +4961,13 @@ AC_DEFUN([KDE_SET_PREFIX_CORE],
   fi
   # And delete superfluous '/' to make compares easier
   prefix=`echo &quot;$prefix&quot; | sed 's,//*,/,g' | sed -e 's,/$,,'`
+  kde_libs_htmldir=$prefix/share/doc/HTML/
   exec_prefix=`echo &quot;$exec_prefix&quot; | sed 's,//*,/,g' | sed -e 's,/$,,'`
+
+  kde_libs_prefix='$(prefix)'
+  kde_libs_htmldir='$(kde_htmldir)'
+  AC_SUBST(kde_libs_prefix)
+  AC_SUBST(kde_libs_htmldir)
   KDE_FAST_CONFIGURE
   KDE_CONF_FILES
 ])
@@ -4760,9 +5216,10 @@ else
       for dir in $javadirs; do
           dnl Check for the java executable
 	  if test -x &quot;$dir/java&quot;; then
+	      sane_path=$(cd $dir; /bin/pwd)
 	      dnl And also check for a libjvm.so somewhere under there
 	      dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big.
-              if test &quot;$dir&quot; != &quot;/usr/bin&quot;; then
+              if test &quot;$sane_path&quot; != &quot;/usr/bin&quot;; then
                   libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
 		  if test ! -f $libjvmdir/libjvm.so; then continue; fi
 		  jredirs=&quot;$jredirs $dir&quot;
@@ -4919,7 +5376,7 @@ elif test -d &quot;/Library/Java/Home&quot;; then
   JAVAC=$kde_java_bindir/javac
   JAVAH=$kde_java_bindir/javah
   JAR=$kde_java_bindir/jar
-  JVMLIBS=&quot;-Xlinker -framework -Xlinker JavaVM&quot;
+  JVMLIBS=&quot;-Wl,-framework,JavaVM&quot;
 
   AC_DEFINE_UNQUOTED(PATH_JAVA, &quot;$kde_java_bindir/java&quot;, [Define where your java executable is])
   AC_MSG_RESULT([Apple Java Framework])
@@ -5453,3 +5910,64 @@ if test &quot;x$ac_cv_sys_large_files&quot; != &quot;xno&quot;; then
 fi
 
 ])
+
+dnl A small extension to PKG_CHECK_MODULES (defined in pkg.m4.in)
+dnl which allows to search for libs that get installed into the KDE prefix.
+dnl
+dnl Syntax:  KDE_PKG_CHECK_MODULES(KSTUFF, libkexif &gt;= 0.2 glib = 1.3.4, action-if, action-not)
+dnl defines KSTUFF_LIBS, KSTUFF_CFLAGS, see pkg-config man page
+dnl also defines KSTUFF_PKG_ERRORS on error
+AC_DEFUN([KDE_PKG_CHECK_MODULES], [
+
+   PKG_CONFIG_PATH=&quot;$prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH&quot;
+   if test &quot;$prefix&quot; != &quot;$kde_libs_prefix&quot;; then
+       PKG_CONFIG_PATH=&quot;$kde_libs_prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH&quot;
+   fi
+   export PKG_CONFIG_PATH
+   PKG_CHECK_MODULES([$1],[$2],[$3],[$4])
+])
+
+
+dnl Check for PIE support in the compiler and linker
+AC_DEFUN([KDE_CHECK_PIE_SUPPORT],
+[
+  AC_CACHE_CHECK([for PIE support], kde_cv_val_pie_support,
+  [
+    AC_LANG_SAVE
+    AC_LANG_CPLUSPLUS
+    safe_CXXFLAGS=$CXXFLAGS
+    safe_LDFLAGS=$LDFLAGS
+    CXXFLAGS=&quot;$CXXFLAGS -fPIE&quot;
+    LDFLAGS=&quot;$LDFLAGS -pie&quot;
+
+    AC_TRY_LINK([int foo;], [], [kde_cv_val_pie_support=yes], [kde_cv_val_pie_support=no])
+
+    CXXFLAGS=$safe_CXXFLAGS
+    LDFLAGS=$safe_LDFLAGS
+    AC_LANG_RESTORE
+  ])
+
+  AC_MSG_CHECKING(if enabling -pie/fPIE support)
+
+  AC_ARG_ENABLE(pie,
+    AC_HELP_STRING([--enable-pie],[platform supports PIE linking [default=detect]]),
+      [kde_has_pie_support=$enableval],
+      [kde_has_pie_support=detect])
+
+  if test &quot;$kde_has_pie_support&quot; = &quot;detect&quot;; then
+    kde_has_pie_support=$kde_cv_val_pie_support
+  fi
+
+  AC_MSG_RESULT([$kde_has_pie_support])
+
+  KDE_USE_FPIE=&quot;&quot;
+  KDE_USE_PIE=&quot;&quot;
+
+  AC_SUBST([KDE_USE_FPIE])
+  AC_SUBST([KDE_USE_PIE])
+
+  if test &quot;$kde_has_pie_support&quot; = &quot;yes&quot;; then
+    KDE_USE_FPIE=&quot;-fPIE&quot;
+    KDE_USE_PIE=&quot;-pie&quot;
+  fi
+])</diff>
      <filename>admin/acinclude.m4.in</filename>
    </modified>
    <modified>
      <diff>@@ -351,7 +351,7 @@ sub processMakefile ($)
     my $tmp = &quot;force-reedit:\n&quot;;
     $tmp   .= &quot;\t$automkCall\n\tcd \$(top_srcdir) &amp;&amp; perl $thisProg $printname\n\n&quot;;
     appendLines($tmp);
-    
+
     make_bcheck_target();
     make_meta_classes();
     tag_COMPILE_FIRST();
@@ -422,10 +422,6 @@ sub processMakefile ($)
       substituteLine($lookup, &quot;RECURSIVE_TARGETS = $1 nmcheck-recursive bcheck-recursive&quot;);
     }
 
-    my $cvs_lines = &quot;cvs-clean:\n&quot;;
-    $cvs_lines .= &quot;\t\$(MAKE) admindir=\$(top_srcdir)/admin -f \$(top_srcdir)/admin/Makefile.common cvs-clean\n&quot;;
-    appendLines($cvs_lines);
-
     $cvs_lines  = &quot;kde-rpo-clean:\n&quot;;
     $cvs_lines .= &quot;\t-rm -f *.rpo\n&quot;;
     appendLines($cvs_lines);
@@ -483,6 +479,7 @@ sub processMakefile ($)
             $MakefileData =~ s/$lookup/$replacement/;
             $lookup =~ s/\\\$\\\(CXXFLAGS\\\)/\\\$\\\(KCXXFLAGS\\\)/;
             $replacement = &quot;$stuff_before\$(KCXXFLAGS) \$(KDE_CXXFLAGS)$stuff_after&quot;;
+            next if ($stuff_before =~ /\$\(KDE_CXXFLAGS\)/ or $stuff_after =~ /\$\(KDE_CXXFLAGS\)/);
             substituteLine($lookup, $replacement);
         } else {
             $found = 0;
@@ -634,7 +631,7 @@ sub initialise ()
 		if ($pre eq '' &amp;&amp; exists($varcontent{$variable})) {
 		    my @addlist = split(/[\034\s]+/, $varcontent{$variable});
 		    push(@objlist, @addlist);
-                } elsif ($variable !~ 'OBJEXT') {
+                } elsif ($variable !~ 'OBJEXT' &amp;&amp; $variable !~ /am__objects_\d+/ ) {
                     $ocv = 1;
 		}
             }
@@ -875,8 +872,9 @@ sub tag_KDEINIT()
                 $lines .= &quot;\techo 'int main(int argc, char* argv[]) { return kdemain(argc,argv); }' &gt;&gt; ${kdeinit}.la.$cxxsuffix\n&quot;;
 
                 $lines .= &quot;\n${kdeinit}_dummy.$cxxsuffix:\n&quot;;
-                $lines .= &quot;\techo 'extern \&quot;C\&quot; int kdemain(int argc, char* argv[]);' &gt; ${kdeinit}_dummy.$cxxsuffix; \\\n&quot;;
-                $lines .= &quot;\techo 'extern \&quot;C\&quot; int kdeinitmain(int argc, char* argv[]) { return kdemain(argc,argv); }' &gt;&gt; ${kdeinit}_dummy.$cxxsuffix\n&quot;;
+                $lines .= &quot;\techo '#include &lt;kdemacros.h&gt;' &gt; ${kdeinit}_dummy.$cxxsuffix; \\\n&quot;;
+                $lines .= &quot;\techo 'extern \&quot;C\&quot; int kdemain(int argc, char* argv[]);' &gt;&gt; ${kdeinit}_dummy.$cxxsuffix; \\\n&quot;;
+                $lines .= &quot;\techo 'extern \&quot;C\&quot; KDE_EXPORT int kdeinitmain(int argc, char* argv[]) { return kdemain(argc,argv); }' &gt;&gt; ${kdeinit}_dummy.$cxxsuffix\n&quot;;
 
                 push(@cleanfiles, &quot;${kdeinit}.la.$cxxsuffix&quot;);
                 push(@cleanfiles, &quot;${kdeinit}_dummy.$cxxsuffix&quot;);
@@ -1368,14 +1366,19 @@ sub tag_UIFILES ()
                     my ($mangled_source) = $source;
                     $mangled_source =~ s/[^A-Za-z0-9]/_/g;  # get rid of garbage
                     $dep_lines .= &quot;\t\$(UIC) -tr \${UIC_TR} -i $source.h $sourcedir$source.ui &gt; $source.$cxxsuffix.temp ; ret=\$\$?; \\\n&quot;;
-                    $dep_lines .= &quot;\t\$(PERL) -pe \&quot;s,\${UIC_TR}( \\\&quot;\\\&quot; ),QString::null,g\&quot; $source.$cxxsuffix.temp | \$(PERL) -pe \&quot;s,\${UIC_TR}( \\\&quot;\\\&quot;\\, \\\&quot;\\\&quot; ),QString::null,g\&quot; | \$(PERL) -pe \&quot;s,image([0-9][0-9]*)_data,img\\\$\$1_&quot; . $mangled_source . &quot;,g\&quot; &gt;&gt; $source.$cxxsuffix ;\\\n&quot;;
+                    $dep_lines .= &quot;\t\$(PERL) -pe \&quot;s,\${UIC_TR}( \\\&quot;\\\&quot; ),QString::null,g\&quot; $source.$cxxsuffix.temp | \$(PERL) -pe \&quot;s,\${UIC_TR}( \\\&quot;\\\&quot;\\, \\\&quot;\\\&quot; ),QString::null,g\&quot; | \$(PERL) -pe \&quot;s,image([0-9][0-9]*)_data,img\\\$\$1_&quot; . $mangled_source . &quot;,g\&quot; | \$(PERL) -pe \&quot;s,: QWizard\\(,: KWizard(,g\&quot; &gt;&gt; $source.$cxxsuffix ;\\\n&quot;;
 		    $dep_lines .= &quot;\trm -f $source.$cxxsuffix.temp ;\\\n&quot;;
                 } else {
                     $dep_lines .= &quot;\t\$(UIC) -i $source.h $sourcedir$source.ui &gt; $source.$cxxsuffix; ret=\$\$?; \\\n&quot;;
                 }
 		$dep_lines .= &quot;\tif test \&quot;\$\$ret\&quot; = 0; then echo '#include \&quot;$source.moc\&quot;' &gt;&gt; $source.$cxxsuffix; else rm -f $source.$cxxsuffix ; exit \$\$ret ; fi\n\n&quot;;
                 $dep_lines .= &quot;$source.h: $sourcedir$source.ui\n&quot;;
-                $dep_lines .= &quot;\t\$(UIC) -o $source.h $sourcedir$source.ui\n\n&quot;;
+                $dep_lines .= &quot;\trm -rf $source.h;\n&quot;;
+                if (!$kdeopts{&quot;qtonly&quot;}) {
+                    $dep_lines .= &quot;\t\$(UIC) $sourcedir$source.ui | \$(PERL) -pi -e \&quot;s,public QWizard,public KWizard,g; s,#include &lt;qwizard.h&gt;,#include &lt;kwizard.h&gt;,g\&quot; &gt;&gt; $source.h ;\n&quot;;
+                } else {
+                    $dep_lines .= &quot;\t\$(UIC) -o $source.h $sourcedir$source.ui\n&quot;;
+                }
                 $dep_lines .= &quot;$source.moc: $source.h\n&quot;;
                 $dep_lines .= &quot;\t\$(MOC) $source.h -o $source.moc\n&quot;;
 
@@ -2025,7 +2028,7 @@ sub tag_DOCFILES ()
 
       $lines .= &quot;\n&quot;;
       $lines .= &quot;uninstall-docs:\n&quot;;
-      $lines .= &quot;\t-rm -rf \$(kde_htmldir)/$kdelang/$appname\n&quot;;
+      $lines .= &quot;\t-rm -rf \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname\n&quot;;
       $lines .= &quot;\n&quot;;
       $lines .= &quot;clean-docs:\n&quot;;
       $lines .= &quot;\t-rm -f index.cache.bz2\n&quot;;
@@ -2274,7 +2277,7 @@ sub make_bcheck_target()
            &quot;\t        echo \&quot;\$\$i\&quot;; \\\n&quot; . 
            &quot;\t        if ! &quot;;
     $t .=  $cxxsuffix eq &quot;KKK&quot; ?
-           &quot;\$(CXX) \$(DEFS) -I. -I\$(srcdir) -I\$(top_builddir) \$(INCLUDES) \$(AM_CPPFLAGS) \$(CPPFLAGS) \$(KDE_CXXFLAGS) &quot; :
+           &quot;\$(CXX) \$(DEFS) -I. -I\$(srcdir) -I\$(top_builddir) \$(INCLUDES) \$(AM_CPPFLAGS) \$(CPPFLAGS) \$(CXXFLAGS) \$(KDE_CXXFLAGS) &quot; :
            &quot;\$(CXXCOMPILE) &quot;;
     $t .=  &quot; --dump-class-hierarchy -c \$\$i.bchecktest.cc; then \\\n&quot; .
            &quot;\t            rm -f \$\$i.bchecktest.cc; exit 1; \\\n&quot; .
@@ -2350,7 +2353,7 @@ sub updateMakefile ()
     $MakefileData =~ s/\034/\\\n/g;    # Restore continuation lines
     # Append our $progId line, _below_ the &quot;generated by automake&quot; line
     # because automake-1.6 relies on the first line to be his own.
-    my $progIdLine = &quot;\# $progId - &quot; . '$Revision: 1.411 $ '.&quot;\n&quot;;
+    my $progIdLine = &quot;\# $progId - &quot; . '$Revision: 483858 $ '.&quot;\n&quot;;
     if ( !( $MakefileData =~ s/^(.*generated .*by automake.*\n)/$1$progIdLine/ ) ) {
         warn &quot;automake line not found in $makefile\n&quot;;
 	# Fallback: first line</diff>
      <filename>admin/am_edit</filename>
    </modified>
    <modified>
      <diff>@@ -118,6 +118,7 @@ while (&lt;IN&gt;) {
 
     s/0x[0-9a-fA-F]+/0x......../g;
     s/base size=/size=/g;
+    s/\(\)\s*$//g;
     s/base align=/align=/g;
 
     $chunk .= $_ . &quot;\n&quot;;</diff>
      <filename>admin/bcheck.pl</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,9 @@
 #! /bin/sh
-
 # Wrapper for compilers which do not understand `-c -o'.
 
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+scriptversion=2005-05-14.22
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
 # Written by Tom Tromey &lt;tromey@cygnus.com&gt;.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -17,83 +18,125 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
-# Usage:
-# compile PROGRAM [ARGS]...
-# `-o FOO.o' is removed from the args passed to the actual compile.
+# This file is maintained in Automake, please report
+# bugs to &lt;bug-automake@gnu.org&gt; or send patches to
+# &lt;automake-patches@gnu.org&gt;.
+
+case $1 in
+  '')
+     echo &quot;$0: No command.  Try \`$0 --help' for more information.&quot; 1&gt;&amp;2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat &lt;&lt;\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
 
-prog=$1
-shift
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to &lt;bug-automake@gnu.org&gt;.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo &quot;compile $scriptversion&quot;
+    exit $?
+    ;;
+esac
 
 ofile=
 cfile=
-args=
-while test $# -gt 0; do
-   case &quot;$1&quot; in
-    -o)
-       # configure might choose to run compile as `compile cc -o foo foo.c'.
-       # So we do something ugly here.
-       ofile=$2
-       shift
-       case &quot;$ofile&quot; in
-	*.o | *.obj)
-	   ;;
-	*)
-	   args=&quot;$args -o $ofile&quot;
-	   ofile=
-	   ;;
-       esac
-       ;;
-    *.c)
-       cfile=$1
-       args=&quot;$args $1&quot;
-       ;;
-    *)
-       args=&quot;$args $1&quot;
-       ;;
-   esac
-   shift
+eat=
+
+for arg
+do
+  if test -n &quot;$eat&quot;; then
+    eat=
+  else
+    case $1 in
+      -o)
+	# configure might choose to run compile as `compile cc -o foo foo.c'.
+	# So we strip `-o arg' only if arg is an object.
+	eat=1
+	case $2 in
+	  *.o | *.obj)
+	    ofile=$2
+	    ;;
+	  *)
+	    set x &quot;$@&quot; -o &quot;$2&quot;
+	    shift
+	    ;;
+	esac
+	;;
+      *.c)
+	cfile=$1
+	set x &quot;$@&quot; &quot;$1&quot;
+	shift
+	;;
+      *)
+	set x &quot;$@&quot; &quot;$1&quot;
+	shift
+	;;
+    esac
+  fi
+  shift
 done
 
 if test -z &quot;$ofile&quot; || test -z &quot;$cfile&quot;; then
-   # If no `-o' option was seen then we might have been invoked from a
-   # pattern rule where we don't need one.  That is ok -- this is a
-   # normal compilation that the losing compiler can handle.  If no
-   # `.c' file was seen then we are probably linking.  That is also
-   # ok.
-   exec &quot;$prog&quot; $args
+  # If no `-o' option was seen then we might have been invoked from a
+  # pattern rule where we don't need one.  That is ok -- this is a
+  # normal compilation that the losing compiler can handle.  If no
+  # `.c' file was seen then we are probably linking.  That is also
+  # ok.
+  exec &quot;$@&quot;
 fi
 
 # Name of file we expect compiler to create.
-cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+cofile=`echo &quot;$cfile&quot; | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
 
 # Create the lock directory.
 # Note: use `[/.-]' here to ensure that we don't use the same name
 # that we are using for the .o file.  Also, base the name on the expected
 # object file name, since that is what matters with a parallel build.
-lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
+lockdir=`echo &quot;$cofile&quot; | sed -e 's|[/.-]|_|g'`.d
 while true; do
-   if mkdir $lockdir &gt; /dev/null 2&gt;&amp;1; then
-      break
-   fi
-   sleep 1
+  if mkdir &quot;$lockdir&quot; &gt;/dev/null 2&gt;&amp;1; then
+    break
+  fi
+  sleep 1
 done
 # FIXME: race condition here if user kills between mkdir and trap.
-trap &quot;rmdir $lockdir; exit 1&quot; 1 2 15
+trap &quot;rmdir '$lockdir'; exit 1&quot; 1 2 15
 
 # Run the compile.
-&quot;$prog&quot; $args
-status=$?
+&quot;$@&quot;
+ret=$?
 
 if test -f &quot;$cofile&quot;; then
-   mv &quot;$cofile&quot; &quot;$ofile&quot;
+  mv &quot;$cofile&quot; &quot;$ofile&quot;
+elif test -f &quot;${cofile}bj&quot;; then
+  mv &quot;${cofile}bj&quot; &quot;$ofile&quot;
 fi
 
-rmdir $lockdir
-exit $status
+rmdir &quot;$lockdir&quot;
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: &quot;scriptversion=&quot;
+# time-stamp-format: &quot;%:y-%02m-%02d.%02H&quot;
+# time-stamp-end: &quot;$&quot;
+# End:</diff>
      <filename>admin/compile</filename>
    </modified>
    <modified>
      <diff>@@ -19,8 +19,8 @@
 
 #   You should have received a copy of the GNU Library General Public License
 #   along with this library; see the file COPYING.LIB.  If not, write to
-#   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-#   Boston, MA 02111-1307, USA.
+#   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+#   Boston, MA 02110-1301, USA.
 
 # we have to change two places
 # 1. the splitting of the substitutions into chunks of 90 (or even 48 in
@@ -81,7 +81,7 @@ while (&lt;&gt;) {
 # on autoconf 250, it ends with '# CONFIG_HEADER section'
 #
 # gg: if a post-processing commands section is found first, 
-#    stop there and insert a new loop to honour the case/esac.
+#    stop there and insert a new loop to honor the case/esac.
 # (pattern: /^\s+#\sRun the commands associated with the file./)
 
 	if (/^\s*for\s+ac_file\s+in\s+.*CONFIG_FILES/ ) {</diff>
      <filename>admin/conf.change.pl</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,9 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002 Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
-timestamp='2002-10-21'
+timestamp='2005-06-30'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -17,13 +17,15 @@ timestamp='2002-10-21'
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
+
 # Originally written by Per Bothner &lt;per@bothner.com&gt;.
 # Please send patches to &lt;config-patches@gnu.org&gt;.  Submit a context
 # diff and a properly formatted ChangeLog entry.
@@ -53,7 +55,7 @@ version=&quot;\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -66,11 +68,11 @@ Try \`$me --help' for more information.&quot;
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo &quot;$timestamp&quot; ; exit 0 ;;
+       echo &quot;$timestamp&quot; ; exit ;;
     --version | -v )
-       echo &quot;$version&quot; ; exit 0 ;;
+       echo &quot;$version&quot; ; exit ;;
     --help | --h* | -h )
-       echo &quot;$usage&quot;; exit 0 ;;
+       echo &quot;$usage&quot;; exit ;;
     -- )     # Stop option processing
        shift; break ;;
     - )	# Use stdin as input.
@@ -98,14 +100,18 @@ trap 'exit 1' 1 2 15
 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
 # use `HOST_CC' if defined, but it is deprecated.
 
-# This shell variable is my proudest work .. or something. --bje
+# Portable tmp directory creation inspired by the Autoconf team.
 
-set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
-(old=`umask` &amp;&amp; umask 077 &amp;&amp; mkdir $tmpdir &amp;&amp; umask $old &amp;&amp; unset old)
-   || (echo &quot;$me: cannot create $tmpdir&quot; &gt;&amp;2 &amp;&amp; exit 1) ;
-dummy=$tmpdir/dummy ;
-files=&quot;$dummy.c $dummy.o $dummy.rel $dummy&quot; ;
-trap '&quot;'&quot;'rm -f $files; rmdir $tmpdir; exit 1'&quot;'&quot;' 1 2 15 ;
+set_cc_for_build='
+trap &quot;exitcode=\$?; (rm -f \$tmpfiles 2&gt;/dev/null; rmdir \$tmp 2&gt;/dev/null) &amp;&amp; exit \$exitcode&quot; 0 ;
+trap &quot;rm -f \$tmpfiles 2&gt;/dev/null; rmdir \$tmp 2&gt;/dev/null; exit 1&quot; 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 &amp;&amp; mktemp -d -q &quot;$TMPDIR/cgXXXXXX&quot;) 2&gt;/dev/null` &amp;&amp; test -n &quot;$tmp&quot; &amp;&amp; test -d &quot;$tmp&quot; ; } ||
+ { test -n &quot;$RANDOM&quot; &amp;&amp; tmp=$TMPDIR/cg$$-$RANDOM &amp;&amp; (umask 077 &amp;&amp; mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ &amp;&amp; (umask 077 &amp;&amp; mkdir $tmp) &amp;&amp; echo &quot;Warning: creating insecure temp directory&quot; &gt;&amp;2 ; } ||
+ { echo &quot;$me: cannot create a temporary directory in $TMPDIR&quot; &gt;&amp;2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles=&quot;$dummy.c $dummy.o $dummy.rel $dummy&quot; ;
 case $CC_FOR_BUILD,$HOST_CC,$CC in
  ,,)    echo &quot;int x;&quot; &gt; $dummy.c ;
 	for c in cc gcc c89 c99 ; do
@@ -113,15 +119,13 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in
 	     CC_FOR_BUILD=&quot;$c&quot;; break ;
 	  fi ;
 	done ;
-	rm -f $files ;
 	if test x&quot;$CC_FOR_BUILD&quot; = x ; then
 	  CC_FOR_BUILD=no_compiler_found ;
 	fi
 	;;
  ,,*)   CC_FOR_BUILD=$CC ;;
  ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ;
-unset files'
+esac ;'
 
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
 # (ghazi@noc.rutgers.edu 1994-08-24)
@@ -178,144 +182,125 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in
 		;;
 	esac
 	# The OS release
-	release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case &quot;${UNAME_VERSION}&quot; in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		;;
+	esac
 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
 	echo &quot;${machine}-${os}${release}&quot;
-	exit 0 ;;
-    amiga:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    arc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    hp300:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mac68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    macppc:OpenBSD:*:*)
-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme88k:OpenBSD:*:*)
-	echo m88k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvmeppc:OpenBSD:*:*)
-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    pmax:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sgi:OpenBSD:*:*)
-	echo mipseb-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sun3:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    wgrisc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:OpenBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	exit ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit ;;
+    macppc:MirBSD:*:*)
+	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
     alpha:OSF1:*:*)
-	if test $UNAME_RELEASE = &quot;V4.0&quot;; then
+	case $UNAME_RELEASE in
+	*4.0)
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-	fi
+		;;
+	*5.*)
+	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case &quot;$ALPHA_CPU_TYPE&quot; in
+	    &quot;EV4 (21064)&quot;)
+		UNAME_MACHINE=&quot;alpha&quot; ;;
+	    &quot;EV4.5 (21064)&quot;)
+		UNAME_MACHINE=&quot;alpha&quot; ;;
+	    &quot;LCA4 (21066/21068)&quot;)
+		UNAME_MACHINE=&quot;alpha&quot; ;;
+	    &quot;EV5 (21164)&quot;)
+		UNAME_MACHINE=&quot;alphaev5&quot; ;;
+	    &quot;EV5.6 (21164A)&quot;)
+		UNAME_MACHINE=&quot;alphaev56&quot; ;;
+	    &quot;EV5.6 (21164PC)&quot;)
+		UNAME_MACHINE=&quot;alphapca56&quot; ;;
+	    &quot;EV5.7 (21164PC)&quot;)
+		UNAME_MACHINE=&quot;alphapca57&quot; ;;
+	    &quot;EV6 (21264)&quot;)
+		UNAME_MACHINE=&quot;alphaev6&quot; ;;
+	    &quot;EV6.7 (21264A)&quot;)
+		UNAME_MACHINE=&quot;alphaev67&quot; ;;
+	    &quot;EV6.8CB (21264C)&quot;)
+		UNAME_MACHINE=&quot;alphaev68&quot; ;;
+	    &quot;EV6.8AL (21264B)&quot;)
+		UNAME_MACHINE=&quot;alphaev68&quot; ;;
+	    &quot;EV6.8CX (21264D)&quot;)
+		UNAME_MACHINE=&quot;alphaev68&quot; ;;
+	    &quot;EV6.9A (21264/EV69A)&quot;)
+		UNAME_MACHINE=&quot;alphaev69&quot; ;;
+	    &quot;EV7 (21364)&quot;)
+		UNAME_MACHINE=&quot;alphaev7&quot; ;;
+	    &quot;EV7.9 (21364A)&quot;)
+		UNAME_MACHINE=&quot;alphaev79&quot; ;;
+	esac
+	# A Pn.n version is a patched version.
 	# A Vn.n version is a released version.
 	# A Tn.n version is a released field test version.
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses &quot;1.2&quot; for uname -r.
-	eval $set_cc_for_build
-	cat &lt;&lt;EOF &gt;$dummy.s
-	.data
-\$Lformat:
-	.byte 37,100,45,37,120,10,0	# &quot;%d-%x\n&quot;
-
-	.text
-	.globl main
-	.align 4
-	.ent main
-main:
-	.frame \$30,16,\$26,0
-	ldgp \$29,0(\$27)
-	.prologue 1
-	.long 0x47e03d80 # implver \$0
-	lda \$2,-1
-	.long 0x47e20c21 # amask \$2,\$1
-	lda \$16,\$Lformat
-	mov \$0,\$17
-	not \$1,\$18
-	jsr \$26,printf
-	ldgp \$29,0(\$26)
-	mov 0,\$16
-	jsr \$26,exit
-	.end main
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.s 2&gt;/dev/null
-	if test &quot;$?&quot; = 0 ; then
-		case `$dummy` in
-			0-0)
-				UNAME_MACHINE=&quot;alpha&quot;
-				;;
-			1-0)
-				UNAME_MACHINE=&quot;alphaev5&quot;
-				;;
-			1-1)
-				UNAME_MACHINE=&quot;alphaev56&quot;
-				;;
-			1-101)
-				UNAME_MACHINE=&quot;alphapca56&quot;
-				;;
-			2-303)
-				UNAME_MACHINE=&quot;alphaev6&quot;
-				;;
-			2-307)
-				UNAME_MACHINE=&quot;alphaev67&quot;
-				;;
-			2-1307)
-				UNAME_MACHINE=&quot;alphaev68&quot;
-				;;
-			3-1307)
-				UNAME_MACHINE=&quot;alphaev7&quot;
-				;;
-		esac
-	fi
-	rm -f $dummy.s $dummy &amp;&amp; rmdir $tmpdir
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit 0 ;;
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit ;;
     Alpha\ *:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
 	# Should we change UNAME_MACHINE based on the output of uname instead
 	# of the specific Alpha model?
 	echo alpha-pc-interix
-	exit 0 ;;
+	exit ;;
     21064:Windows_NT:50:3)
 	echo alpha-dec-winnt3.5
-	exit 0 ;;
+	exit ;;
     Amiga*:UNIX_System_V:4.0:*)
 	echo m68k-unknown-sysv4
-	exit 0;;
+	exit ;;
     *:[Aa]miga[Oo][Ss]:*:*)
 	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit 0 ;;
+	exit ;;
     *:[Mm]orph[Oo][Ss]:*:*)
 	echo ${UNAME_MACHINE}-unknown-morphos
-	exit 0 ;;
+	exit ;;
     *:OS/390:*:*)
 	echo i370-ibm-openedition
-	exit 0 ;;
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+	exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit 0;;
+	exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
 	echo hppa1.1-hitachi-hiuxmpp
-	exit 0;;
+	exit ;;
     Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
 	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
 	if test &quot;`(/bin/universe) 2&gt;/dev/null`&quot; = att ; then
@@ -323,29 +308,32 @@ EOF
 	else
 		echo pyramid-pyramid-bsd
 	fi
-	exit 0 ;;
+	exit ;;
     NILE*:*:*:dcosx)
 	echo pyramid-pyramid-svr4
-	exit 0 ;;
-    DRS?6000:UNIX_SV:4.2*:7*)
+	exit ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
 	case `/usr/bin/uname -p` in
-	    sparc) echo sparc-icl-nx7 &amp;&amp; exit 0 ;;
+	    sparc) echo sparc-icl-nx7; exit ;;
 	esac ;;
     sun4H:SunOS:5.*:*)
 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     i86pc:SunOS:5.*:*)
 	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     sun4*:SunOS:6*:*)
 	# According to config.sub, this is the proper way to canonicalize
 	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
 	# it's likely to be more like Solaris than SunOS4.
 	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     sun4*:SunOS:*:*)
 	case &quot;`/usr/bin/arch -k`&quot; in
 	    Series*|S4*)
@@ -354,10 +342,10 @@ EOF
 	esac
 	# Japanese Language versions have a version number like `4.1.3-JL'.
 	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit 0 ;;
+	exit ;;
     sun3*:SunOS:*:*)
 	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     sun*:*:4.2BSD:*)
 	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2&gt;/dev/null`
 	test &quot;x${UNAME_RELEASE}&quot; = &quot;x&quot; &amp;&amp; UNAME_RELEASE=3
@@ -369,10 +357,10 @@ EOF
 		echo sparc-sun-sunos${UNAME_RELEASE}
 		;;
 	esac
-	exit 0 ;;
+	exit ;;
     aushp:SunOS:*:*)
 	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     # The situation for MiNT is a little confusing.  The machine name
     # can be virtually everything (everything which is not
     # &quot;atarist&quot; or &quot;atariste&quot; at least should have a processor
@@ -383,37 +371,40 @@ EOF
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
         echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
 	echo m68k-atari-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
         echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
         echo m68k-milan-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
         echo m68k-hades-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
         echo m68k-unknown-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit ;;
     powerpc:machten:*:*)
 	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     RISC*:Mach:*:*)
 	echo mips-dec-mach_bsd4.3
-	exit 0 ;;
+	exit ;;
     RISC*:ULTRIX:*:*)
 	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     VAX*:ULTRIX*:*:*)
 	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     2020:CLIX:*:* | 2430:CLIX:*:*)
 	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
 	eval $set_cc_for_build
 	sed 's/^	//' &lt;&lt; EOF &gt;$dummy.c
@@ -437,33 +428,33 @@ EOF
 	  exit (-1);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c \
-	  &amp;&amp; $dummy `echo &quot;${UNAME_RELEASE}&quot; | sed -n 's/\([0-9]*\).*/\1/p'` \
-	  &amp;&amp; rm -f $dummy.c $dummy &amp;&amp; rmdir $tmpdir &amp;&amp; exit 0
-	rm -f $dummy.c $dummy &amp;&amp; rmdir $tmpdir
+	$CC_FOR_BUILD -o $dummy $dummy.c &amp;&amp;
+	  dummyarg=`echo &quot;${UNAME_RELEASE}&quot; | sed -n 's/\([0-9]*\).*/\1/p'` &amp;&amp;
+	  SYSTEM_NAME=`$dummy $dummyarg` &amp;&amp;
+	    { echo &quot;$SYSTEM_NAME&quot;; exit; }
 	echo mips-mips-riscos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     Motorola:PowerMAX_OS:*:*)
 	echo powerpc-motorola-powermax
-	exit 0 ;;
+	exit ;;
     Motorola:*:4.3:PL8-*)
 	echo powerpc-harris-powermax
-	exit 0 ;;
-    Night_Hawk:*:*:PowerMAX_OS)
+	exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
 	echo powerpc-harris-powermax
-	exit 0 ;;
+	exit ;;
     Night_Hawk:Power_UNIX:*:*)
 	echo powerpc-harris-powerunix
-	exit 0 ;;
+	exit ;;
     m88k:CX/UX:7*:*)
 	echo m88k-harris-cxux7
-	exit 0 ;;
+	exit ;;
     m88k:*:4*:R4*)
 	echo m88k-motorola-sysv4
-	exit 0 ;;
+	exit ;;
     m88k:*:3*:R3*)
 	echo m88k-motorola-sysv3
-	exit 0 ;;
+	exit ;;
     AViiON:dgux:*:*)
         # DG/UX returns AViiON for all architectures
         UNAME_PROCESSOR=`/usr/bin/uname -p`
@@ -479,29 +470,29 @@ EOF
 	else
 	    echo i586-dg-dgux${UNAME_RELEASE}
 	fi
- 	exit 0 ;;
+ 	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
 	echo m88k-dolphin-sysv3
-	exit 0 ;;
+	exit ;;
     M88*:*:R3*:*)
 	# Delta 88k system running SVR3
 	echo m88k-motorola-sysv3
-	exit 0 ;;
+	exit ;;
     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
 	echo m88k-tektronix-sysv3
-	exit 0 ;;
+	exit ;;
     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
 	echo m68k-tektronix-bsd
-	exit 0 ;;
+	exit ;;
     *:IRIX*:*:*)
 	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit 0 ;;
+	exit ;;
     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
-	exit 0 ;;              # Note that: echo &quot;'`uname -s`'&quot; gives 'AIX '
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo &quot;'`uname -s`'&quot; gives 'AIX '
     i*86:AIX:*:*)
 	echo i386-ibm-aix
-	exit 0 ;;
+	exit ;;
     ia64:AIX:*:*)
 	if [ -x /usr/bin/oslevel ] ; then
 		IBM_REV=`/usr/bin/oslevel`
@@ -509,7 +500,7 @@ EOF
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
 	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit 0 ;;
+	exit ;;
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h &gt;/dev/null 2&gt;&amp;1; then
 		eval $set_cc_for_build
@@ -524,15 +515,18 @@ EOF
 			exit(0);
 			}
 EOF
-		$CC_FOR_BUILD -o $dummy $dummy.c &amp;&amp; $dummy &amp;&amp; rm -f $dummy.c $dummy &amp;&amp; rmdir $tmpdir &amp;&amp; exit 0
-		rm -f $dummy.c $dummy &amp;&amp; rmdir $tmpdir
-		echo rs6000-ibm-aix3.2.5
+		if $CC_FOR_BUILD -o $dummy $dummy.c &amp;&amp; SYSTEM_NAME=`$dummy`
+		then
+			echo &quot;$SYSTEM_NAME&quot;
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
 	elif grep bos324 /usr/include/stdio.h &gt;/dev/null 2&gt;&amp;1; then
 		echo rs6000-ibm-aix3.2.4
 	else
 		echo rs6000-ibm-aix3.2
 	fi
-	exit 0 ;;
+	exit ;;
     *:AIX:*:[45])
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' &gt;/dev/null 2&gt;&amp;1; then
@@ -546,28 +540,28 @@ EOF
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
 	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit 0 ;;
+	exit ;;
     *:AIX:*:*)
 	echo rs6000-ibm-aix
-	exit 0 ;;
+	exit ;;
     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
 	echo romp-ibm-bsd4.4
-	exit 0 ;;
+	exit ;;
     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
 	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit 0 ;;                           # report: romp-ibm BSD 4.3
+	exit ;;                             # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
 	echo rs6000-bull-bosx
-	exit 0 ;;
+	exit ;;
     DPX/2?00:B.O.S.:*:*)
 	echo m68k-bull-sysv3
-	exit 0 ;;
+	exit ;;
     9000/[34]??:4.3bsd:1.*:*)
 	echo m68k-hp-bsd
-	exit 0 ;;
+	exit ;;
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
 	echo m68k-hp-bsd4.4
-	exit 0 ;;
+	exit ;;
     9000/[34678]??:HP-UX:*:*)
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	case &quot;${UNAME_MACHINE}&quot; in
@@ -624,16 +618,37 @@ EOF
               }
 EOF
 		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2&gt;/dev/null) &amp;&amp; HP_ARCH=`$dummy`
-		    if test -z &quot;$HP_ARCH&quot;; then HP_ARCH=hppa; fi
-		    rm -f $dummy.c $dummy &amp;&amp; rmdir $tmpdir
+		    test -z &quot;$HP_ARCH&quot; &amp;&amp; HP_ARCH=hppa
 		fi ;;
 	esac
+	if [ ${HP_ARCH} = &quot;hppa2.0w&quot; ]
+	then
+	    # avoid double evaluation of $set_cc_for_build
+	    test -n &quot;$CC_FOR_BUILD&quot; || eval $set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # =&gt; hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD=&quot;cc +DA2.0w&quot; ./config.guess
+	    # =&gt; hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2&gt;/dev/null) |
+		grep __LP64__ &gt;/dev/null
+	    then
+		HP_ARCH=&quot;hppa2.0w&quot;
+	    else
+		HP_ARCH=&quot;hppa64&quot;
+	    fi
+	fi
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit 0 ;;
+	exit ;;
     ia64:HP-UX:*:*)
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	echo ia64-hp-hpux${HPUX_REV}
-	exit 0 ;;
+	exit ;;
     3050*:HI-UX:*:*)
 	eval $set_cc_for_build
 	sed 's/^	//' &lt;&lt; EOF &gt;$dummy.c
@@ -661,146 +676,166 @@ EOF
 	  exit (0);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c &amp;&amp; $dummy &amp;&amp; rm -f $dummy.c $dummy &amp;&amp; rmdir $tmpdir &amp;&amp; exit 0
-	rm -f $dummy.c $dummy &amp;&amp; rmdir $tmpdir
+	$CC_FOR_BUILD -o $dummy $dummy.c &amp;&amp; SYSTEM_NAME=`$dummy` &amp;&amp;
+		{ echo &quot;$SYSTEM_NAME&quot;; exit; }
 	echo unknown-hitachi-hiuxwe2
-	exit 0 ;;
+	exit ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
 	echo hppa1.1-hp-bsd
-	exit 0 ;;
+	exit ;;
     9000/8??:4.3bsd:*:*)
 	echo hppa1.0-hp-bsd
-	exit 0 ;;
+	exit ;;
     *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
 	echo hppa1.0-hp-mpeix
-	exit 0 ;;
+	exit ;;
     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
 	echo hppa1.1-hp-osf
-	exit 0 ;;
+	exit ;;
     hp8??:OSF1:*:*)
 	echo hppa1.0-hp-osf
-	exit 0 ;;
+	exit ;;
     i*86:OSF1:*:*)
 	if [ -x /usr/sbin/sysversion ] ; then
 	    echo ${UNAME_MACHINE}-unknown-osf1mk
 	else
 	    echo ${UNAME_MACHINE}-unknown-osf1
 	fi
-	exit 0 ;;
+	exit ;;
     parisc*:Lites*:*:*)
 	echo hppa1.1-hp-lites
-	exit 0 ;;
+	exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
 	echo c1-convex-bsd
-        exit 0 ;;
+        exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-        exit 0 ;;
+        exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
 	echo c34-convex-bsd
-        exit 0 ;;
+        exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
 	echo c38-convex-bsd
-        exit 0 ;;
+        exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
 	echo c4-convex-bsd
-        exit 0 ;;
+        exit ;;
     CRAY*Y-MP:*:*:*)
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*[A-Z]90:*:*:*)
 	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
 	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
 	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
 	      -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*TS:*:*:*)
 	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    CRAY*T3D:*:*:*)
-	echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*T3E:*:*:*)
 	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*SV1:*:*:*)
 	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
+    *:UNICOS/mp:*:*)
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
         FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
         echo &quot;${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}&quot;
-        exit 0 ;;
+        exit ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo &quot;sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}&quot;
+	exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     sparc*:BSD/OS:*:*)
 	echo sparc-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:BSD/OS:*:*)
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:FreeBSD:*:*)
-	# Determine whether the default compiler uses glibc.
-	eval $set_cc_for_build
-	sed 's/^	//' &lt;&lt; EOF &gt;$dummy.c
-	#include &lt;features.h&gt;
-	#if __GLIBC__ &gt;= 2
-	LIBC=gnu
-	#else
-	LIBC=
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2&gt;/dev/null | grep ^LIBC=`
-	rm -f $dummy.c &amp;&amp; rmdir $tmpdir
-	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
-	exit 0 ;;
+	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
-	exit 0 ;;
+	exit ;;
     i*:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
-	exit 0 ;;
+	exit ;;
+    i*:windows32*:*)
+    	# uname -m includes &quot;-pc&quot; on this system.
+    	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
     i*:PW*:*)
 	echo ${UNAME_MACHINE}-pc-pw32
-	exit 0 ;;
-    x86:Interix*:3*)
-	echo i386-pc-interix3
-	exit 0 ;;
+	exit ;;
+    x86:Interix*:[34]*)
+	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+	exit ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
 	# It also conflicts with pre-2.0 versions of AT&amp;T UWIN. Should we
 	# UNAME_MACHINE based on the output of uname instead of i386?
-	echo i386-pc-interix
-	exit 0 ;;
+	echo i586-pc-interix
+	exit ;;
     i*:UWIN*:*)
 	echo ${UNAME_MACHINE}-pc-uwin
-	exit 0 ;;
+	exit ;;
+    amd64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit ;;
     p*:CYGWIN*:*)
 	echo powerpcle-unknown-cygwin
-	exit 0 ;;
+	exit ;;
     prep*:SunOS:5.*:*)
 	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     *:GNU:*:*)
+	# the GNU system
 	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit 0 ;;
+	exit ;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+	exit ;;
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
-	exit 0 ;;
+	exit ;;
     arm*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
+    cris:Linux:*:*)
+	echo cris-axis-linux-gnu
+	exit ;;
+    crisv32:Linux:*:*)
+	echo crisv32-axis-linux-gnu
+	exit ;;
+    frv:Linux:*:*)
+    	echo frv-unknown-linux-gnu
+	exit ;;
     ia64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
     m68*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     mips:Linux:*:*)
 	eval $set_cc_for_build
 	sed 's/^	//' &lt;&lt; EOF &gt;$dummy.c
@@ -818,15 +853,33 @@ EOF
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2&gt;/dev/null | grep ^CPU=`
-	rm -f $dummy.c &amp;&amp; rmdir $tmpdir
-	test x&quot;${CPU}&quot; != x &amp;&amp; echo &quot;${CPU}-pc-linux-gnu&quot; &amp;&amp; exit 0
+	test x&quot;${CPU}&quot; != x &amp;&amp; { echo &quot;${CPU}-unknown-linux-gnu&quot;; exit; }
+	;;
+    mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' &lt;&lt; EOF &gt;$dummy.c
+	#undef CPU
+	#undef mips64
+	#undef mips64el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mips64el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips64
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2&gt;/dev/null | grep ^CPU=`
+	test x&quot;${CPU}&quot; != x &amp;&amp; { echo &quot;${CPU}-unknown-linux-gnu&quot;; exit; }
 	;;
     ppc:Linux:*:*)
 	echo powerpc-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     ppc64:Linux:*:*)
 	echo powerpc64-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     alpha:Linux:*:*)
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' &lt; /proc/cpuinfo` in
 	  EV5)   UNAME_MACHINE=alphaev5 ;;
@@ -840,7 +893,7 @@ EOF
 	objdump --private-headers /bin/sh | grep ld.so.1 &gt;/dev/null
 	if test &quot;$?&quot; = 0 ; then LIBC=&quot;libc1&quot; ; else LIBC=&quot;&quot; ; fi
 	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-	exit 0 ;;
+	exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2&gt;/dev/null | cut -d' ' -f2` in
@@ -848,22 +901,25 @@ EOF
 	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
 	  *)    echo hppa-unknown-linux-gnu ;;
 	esac
-	exit 0 ;;
+	exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
 	echo hppa64-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
 	echo ${UNAME_MACHINE}-ibm-linux
-	exit 0 ;;
+	exit ;;
+    sh64*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
     sh*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     x86_64:Linux:*:*)
 	echo x86_64-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     i*86:Linux:*:*)
 	# The BFD linker knows what the default object file format is, so
 	# first see if it will tell us. cd to the root directory to prevent
@@ -881,15 +937,15 @@ EOF
 		;;
 	  a.out-i386-linux)
 		echo &quot;${UNAME_MACHINE}-pc-linux-gnuaout&quot;
-		exit 0 ;;
+		exit ;;
 	  coff-i386)
 		echo &quot;${UNAME_MACHINE}-pc-linux-gnucoff&quot;
-		exit 0 ;;
+		exit ;;
 	  &quot;&quot;)
 		# Either a pre-BFD a.out linker (linux-gnuoldld) or
 		# one that does not give us useful --help.
 		echo &quot;${UNAME_MACHINE}-pc-linux-gnuoldld&quot;
-		exit 0 ;;
+		exit ;;
 	esac
 	# Determine whether the default compiler is a.out or elf
 	eval $set_cc_for_build
@@ -912,18 +968,23 @@ EOF
 	LIBC=gnuaout
 	#endif
 	#endif
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2&gt;/dev/null | grep ^LIBC=`
-	rm -f $dummy.c &amp;&amp; rmdir $tmpdir
-	test x&quot;${LIBC}&quot; != x &amp;&amp; echo &quot;${UNAME_MACHINE}-pc-linux-${LIBC}&quot; &amp;&amp; exit 0
-	test x&quot;${TENTATIVE}&quot; != x &amp;&amp; echo &quot;${TENTATIVE}&quot; &amp;&amp; exit 0
+	test x&quot;${LIBC}&quot; != x &amp;&amp; {
+		echo &quot;${UNAME_MACHINE}-pc-linux-${LIBC}&quot;
+		exit
+	}
+	test x&quot;${TENTATIVE}&quot; != x &amp;&amp; { echo &quot;${TENTATIVE}&quot;; exit; }
 	;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
 	# earlier versions are messed up and put the nodename in both
 	# sysname and nodename.
 	echo i386-sequent-sysv4
-	exit 0 ;;
+	exit ;;
     i*86:UNIX_SV:4.2MP:2.*)
         # Unixware is an offshoot of SVR4, but it has its own version
         # number series starting with 2...
@@ -931,7 +992,27 @@ EOF
 	# I just have to hope.  -- rms.
         # Use sysv4.2uw... so that sysv4* matches it.
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit 0 ;;
+	exit ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit ;;
     i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
 	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
 	if grep Novell /usr/include/link.h &gt;/dev/null 2&gt;/dev/null; then
@@ -939,15 +1020,16 @@ EOF
 	else
 		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
 	fi
-	exit 0 ;;
-    i*86:*:5:[78]*)
+	exit ;;
+    i*86:*:5:[678]*)
+    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
 	case `/bin/uname -X | grep &quot;^Machine&quot;` in
 	    *486*)	     UNAME_MACHINE=i486 ;;
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
 	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
 	esac
 	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-	exit 0 ;;
+	exit ;;
     i*86:*:3.2:*)
 	if test -f /usr/options/cb.name; then
 		UNAME_REL=`sed -n 's/.*Version //p' &lt;/usr/options/cb.name`
@@ -965,76 +1047,73 @@ EOF
 	else
 		echo ${UNAME_MACHINE}-pc-sysv32
 	fi
-	exit 0 ;;
-    i*86:*DOS:*:*)
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit 0 ;;
+	exit ;;
     pc:*:*:*)
 	# Left here for compatibility:
         # uname -m prints for DJGPP always 'pc', but it prints nothing about
         # the processor, so we play safe by assuming i386.
 	echo i386-pc-msdosdjgpp
-        exit 0 ;;
+        exit ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3
-	exit 0 ;;
+	exit ;;
     paragon:*:*:*)
 	echo i860-intel-osf1
-	exit 0 ;;
+	exit ;;
     i860:*:4.*:*) # i860-SVR4
 	if grep Stardent /usr/include/sys/uadmin.h &gt;/dev/null 2&gt;&amp;1 ; then
 	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
 	else # Add other i860-SVR4 vendors below as they are discovered.
 	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
 	fi
-	exit 0 ;;
+	exit ;;
     mini*:CTIX:SYS*5:*)
 	# &quot;miniframe&quot;
 	echo m68010-convergent-sysv
-	exit 0 ;;
+	exit ;;
     mc68k:UNIX:SYSTEM5:3.51m)
 	echo m68k-convergent-sysv
-	exit 0 ;;
-    M68*:*:R3V[567]*:*)
-	test -r /sysV68 &amp;&amp; echo 'm68k-motorola-sysv' &amp;&amp; exit 0 ;;
-    3[34]??:*: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)
+	exit ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 &amp;&amp; { echo 'm68k-motorola-sysv'; exit; } ;;
+    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)
 	OS_REL=''
 	test -r /etc/.relid \
 	&amp;&amp; OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' &lt; /etc/.relid`
 	/bin/uname -p 2&gt;/dev/null | grep 86 &gt;/dev/null \
-	  &amp;&amp; echo i486-ncr-sysv4.3${OS_REL} &amp;&amp; exit 0
+	  &amp;&amp; { echo i486-ncr-sysv4.3${OS_REL}; exit; }
 	/bin/uname -p 2&gt;/dev/null | /bin/grep entium &gt;/dev/null \
-	  &amp;&amp; echo i586-ncr-sysv4.3${OS_REL} &amp;&amp; exit 0 ;;
+	  &amp;&amp; { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
         /bin/uname -p 2&gt;/dev/null | grep 86 &gt;/dev/null \
-          &amp;&amp; echo i486-ncr-sysv4 &amp;&amp; exit 0 ;;
+          &amp;&amp; { echo i486-ncr-sysv4; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
 	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     mc68030:UNIX_System_V:4.*:*)
 	echo m68k-atari-sysv4
-	exit 0 ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     TSUNAMI:LynxOS:2.*:*)
 	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     rs6000:LynxOS:2.*:*)
 	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
 	echo powerpc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     SM[BE]S:UNIX_SV:*:*)
 	echo mips-dde-sysv${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     RM*:ReliantUNIX-*:*:*)
 	echo mips-sni-sysv4
-	exit 0 ;;
+	exit ;;
     RM*:SINIX-*:*:*)
 	echo mips-sni-sysv4
-	exit 0 ;;
+	exit ;;
     *:SINIX-*:*:*)
 	if uname -p 2&gt;/dev/null &gt;/dev/null ; then
 		UNAME_MACHINE=`(uname -p) 2&gt;/dev/null`
@@ -1042,64 +1121,73 @@ EOF
 	else
 		echo ns32k-sni-sysv
 	fi
-	exit 0 ;;
+	exit ;;
     PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
                       # says &lt;Richard.M.Bartel@ccMail.Census.GOV&gt;
         echo i586-unisys-sysv4
-        exit 0 ;;
+        exit ;;
     *:UNIX_System_V:4*:FTX*)
 	# From Gerald Hewes &lt;hewes@openmarket.com&gt;.
 	# How about differentiating between stratus architectures? -djm
 	echo hppa1.1-stratus-sysv4
-	exit 0 ;;
+	exit ;;
     *:*:*:FTX*)
 	# From seanf@swdc.stratus.com.
 	echo i860-stratus-sysv4
-	exit 0 ;;
+	exit ;;
+    i*86:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
     *:VOS:*:*)
 	# From Paul.Green@stratus.com.
 	echo hppa1.1-stratus-vos
-	exit 0 ;;
+	exit ;;
     mc68*:A/UX:*:*)
 	echo m68k-apple-aux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     news*:NEWS-OS:6*:*)
 	echo mips-sony-newsos6
-	exit 0 ;;
+	exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
 	if [ -d /usr/nec ]; then
 	        echo mips-nec-sysv${UNAME_RELEASE}
 	else
 	        echo mips-unknown-sysv${UNAME_RELEASE}
 	fi
-        exit 0 ;;
+        exit ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
 	echo powerpc-be-beos
-	exit 0 ;;
+	exit ;;
     BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
 	echo powerpc-apple-beos
-	exit 0 ;;
+	exit ;;
     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
 	echo i586-pc-beos
-	exit 0 ;;
+	exit ;;
     SX-4:SUPER-UX:*:*)
 	echo sx4-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     SX-5:SUPER-UX:*:*)
 	echo sx5-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     SX-6:SUPER-UX:*:*)
 	echo sx6-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     Power*:Rhapsody:*:*)
 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Rhapsody:*:*)
 	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Darwin:*:*)
-	echo `uname -p`-apple-darwin${UNAME_RELEASE}
-	exit 0 ;;
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	case $UNAME_PROCESSOR in
+	    *86) UNAME_PROCESSOR=i686 ;;
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
 	UNAME_PROCESSOR=`uname -p`
 	if test &quot;$UNAME_PROCESSOR&quot; = &quot;x86&quot;; then
@@ -1107,22 +1195,25 @@ EOF
 		UNAME_MACHINE=pc
 	fi
 	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:QNX:*:4*)
 	echo i386-pc-qnx
-	exit 0 ;;
-    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
+	exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
 	echo nsr-tandem-nsk${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:NonStop-UX:*:*)
 	echo mips-compaq-nonstopux
-	exit 0 ;;
+	exit ;;
     BS2000:POSIX*:*:*)
 	echo bs2000-siemens-sysv
-	exit 0 ;;
+	exit ;;
     DS/*:UNIX_System_V:*:*)
 	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Plan9:*:*)
 	# &quot;uname -m&quot; is not consistent, so use $cputype instead. 386
 	# is converted to i386 for consistency with other x86
@@ -1133,36 +1224,44 @@ EOF
 	    UNAME_MACHINE=&quot;$cputype&quot;
 	fi
 	echo ${UNAME_MACHINE}-unknown-plan9
-	exit 0 ;;
-    i*86:OS/2:*:*)
-	# If we were able to find `uname', then EMX Unix compatibility
-	# is probably installed.
-	echo ${UNAME_MACHINE}-pc-os2-emx
-	exit 0 ;;
+	exit ;;
     *:TOPS-10:*:*)
 	echo pdp10-unknown-tops10
-	exit 0 ;;
+	exit ;;
     *:TENEX:*:*)
 	echo pdp10-unknown-tenex
-	exit 0 ;;
+	exit ;;
     KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
 	echo pdp10-dec-tops20
-	exit 0 ;;
+	exit ;;
     XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
 	echo pdp10-xkl-tops20
-	exit 0 ;;
+	exit ;;
     *:TOPS-20:*:*)
 	echo pdp10-unknown-tops20
-	exit 0 ;;
+	exit ;;
     *:ITS:*:*)
 	echo pdp10-unknown-its
-	exit 0 ;;
-    i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
-	exit 0 ;;
-    i*86:atheos:*:*)
-	echo ${UNAME_MACHINE}-unknown-atheos
-	exit 0 ;;
+	exit ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+	exit ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    *:*VMS:*:*)
+    	UNAME_MACHINE=`(uname -p) 2&gt;/dev/null`
+	case &quot;${UNAME_MACHINE}&quot; in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1&gt;&amp;2
@@ -1194,7 +1293,7 @@ main ()
 #endif
 
 #if defined (__arm) &amp;&amp; defined (__acorn) &amp;&amp; defined (__unix)
-  printf (&quot;arm-acorn-riscix&quot;); exit (0);
+  printf (&quot;arm-acorn-riscix\n&quot;); exit (0);
 #endif
 
 #if defined (hp300) &amp;&amp; !defined (hpux)
@@ -1283,12 +1382,12 @@ main ()
 }
 EOF
 
-$CC_FOR_BUILD -o $dummy $dummy.c 2&gt;/dev/null &amp;&amp; $dummy &amp;&amp; rm -f $dummy.c $dummy &amp;&amp; rmdir $tmpdir &amp;&amp; exit 0
-rm -f $dummy.c $dummy &amp;&amp; rmdir $tmpdir
+$CC_FOR_BUILD -o $dummy $dummy.c 2&gt;/dev/null &amp;&amp; SYSTEM_NAME=`$dummy` &amp;&amp;
+	{ echo &quot;$SYSTEM_NAME&quot;; exit; }
 
 # Apollos put the system type in the environment.
 
-test -d /usr/apollo &amp;&amp; { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+test -d /usr/apollo &amp;&amp; { echo ${ISP}-apollo-${SYSTYPE}; exit; }
 
 # Convex versions that predate uname can use getsysinfo(1)
 
@@ -1297,22 +1396,22 @@ then
     case `getsysinfo -f cpu_type` in
     c1*)
 	echo c1-convex-bsd
-	exit 0 ;;
+	exit ;;
     c2*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-	exit 0 ;;
+	exit ;;
     c34*)
 	echo c34-convex-bsd
-	exit 0 ;;
+	exit ;;
     c38*)
 	echo c38-convex-bsd
-	exit 0 ;;
+	exit ;;
     c4*)
 	echo c4-convex-bsd
-	exit 0 ;;
+	exit ;;
     esac
 fi
 
@@ -1323,7 +1422,9 @@ This script, last modified $timestamp, has failed to recognize
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
-    ftp://ftp.gnu.org/pub/gnu/config/
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
 
 If the version you run ($0) is already up to date, please
 send the following data and any information you think might be</diff>
      <filename>admin/config.guess</filename>
    </modified>
    <modified>
      <diff>@@ -25,8 +25,8 @@
 
 #   You should have received a copy of the GNU Library General Public License
 #   along with this library; see the file COPYING.LIB.  If not, write to
-#   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-#   Boston, MA 02111-1307, USA.
+#   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+#   Boston, MA 02110-1301, USA.
 
 use strict;
 
@@ -53,6 +53,7 @@ my $created_file_count = 0;
 
 open(CF, &quot;&lt; $ac_subs&quot;) || die &quot;can't open $ac_subs: $!&quot;;
 my @subs = &lt;CF&gt;;
+my $pat;
 close(CF);
 chomp @subs;
 @comp_match=();
@@ -60,7 +61,7 @@ chomp @subs;
 
 if ($bad_perl) {
     print &quot;Using perl older than version 5.005\n&quot;;
-    foreach my $pat (@subs) {
+    foreach $pat (@subs) {
 	if (  ($pat =~ m/s%([^%]*)%([^%]*)%g/ )
 	   || ($pat =~ m/s%([^%]*)%([^%]*)%;t/ )
            || ($pat =~ m/s,([^,]*),(.*),;t/)
@@ -85,7 +86,7 @@ if ($bad_perl) {
 	}
     }
 } else {
-    foreach my $pat (@subs) {
+    foreach $pat (@subs) {
        if ( ($pat =~ /s%([^%]*)%([^%]*)%g/ ) ||
             ($pat =~ /s%([^%]*)%([^%]*)%;t/ ) ||
             ($pat =~ /s,([^,]*),(.*),;t/) ) {
@@ -192,8 +193,9 @@ sub patch_file {
     my $filedata;
     my @infiles=split(' ', $infiles);
     my $i=0;
+    my $name;
 
-    foreach my $name (@infiles) {
+    foreach $name (@infiles) {
 	if (open(CF, &quot;&lt; $name&quot;)) {
 	    while (&lt;CF&gt;) {
 		$filedata .= $_;</diff>
      <filename>admin/config.pl</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,9 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002 Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
-timestamp='2002-09-05'
+timestamp='2005-07-01'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -21,14 +21,15 @@ timestamp='2002-09-05'
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
+
 # Please send patches to &lt;config-patches@gnu.org&gt;.  Submit a context
 # diff and a properly formatted ChangeLog entry.
 #
@@ -70,7 +71,7 @@ Report bugs and patches to &lt;config-patches@gnu.org&gt;.&quot;
 version=&quot;\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -83,11 +84,11 @@ Try \`$me --help' for more information.&quot;
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo &quot;$timestamp&quot; ; exit 0 ;;
+       echo &quot;$timestamp&quot; ; exit ;;
     --version | -v )
-       echo &quot;$version&quot; ; exit 0 ;;
+       echo &quot;$version&quot; ; exit ;;
     --help | --h* | -h )
-       echo &quot;$usage&quot;; exit 0 ;;
+       echo &quot;$usage&quot;; exit ;;
     -- )     # Stop option processing
        shift; break ;;
     - )	# Use stdin as input.
@@ -99,7 +100,7 @@ while test $# -gt 0 ; do
     *local*)
        # First pass through any local machine types.
        echo $1
-       exit 0;;
+       exit ;;
 
     * )
        break ;;
@@ -118,7 +119,8 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
+  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -144,7 +146,7 @@ case $os in
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis)
+	-apple | -axis | -knuth | -cray)
 		os=
 		basic_machine=$1
 		;;
@@ -228,14 +230,16 @@ case $basic_machine in
 	| a29k \
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| am33_2.0 \
 	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
-	| clipper \
+	| bfin \
+	| c4x | clipper \
 	| d10v | d30v | dlx | dsp16xx \
 	| fr30 | frv \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 	| i370 | i860 | i960 | ia64 \
-	| ip2k \
-	| m32r | m68000 | m68k | m88k | mcore \
+	| ip2k | iq2000 \
+	| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
 	| mips | mipsbe | mipseb | mipsel | mipsle \
 	| mips16 \
 	| mips64 | mips64el \
@@ -244,28 +248,37 @@ case $basic_machine in
 	| mips64vr4100 | mips64vr4100el \
 	| mips64vr4300 | mips64vr4300el \
 	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
 	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
 	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
 	| mipsisa64sb1 | mipsisa64sb1el \
 	| mipsisa64sr71k | mipsisa64sr71kel \
 	| mipstx39 | mipstx39el \
 	| mn10200 | mn10300 \
+	| ms1 \
+	| msp430 \
 	| ns16k | ns32k \
-	| openrisc | or32 \
+	| or32 \
 	| pdp10 | pdp11 | pj | pjl \
 	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
 	| pyramid \
-	| sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
-	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
+	| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b \
 	| strongarm \
-	| tahoe | thumb | tic80 | tron \
+	| tahoe | thumb | tic4x | tic80 | tron \
 	| v850 | v850e \
 	| we32k \
-	| x86 | xscale | xstormy16 | xtensa \
+	| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
 	| z8k)
 		basic_machine=$basic_machine-unknown
 		;;
+	m32c)
+		basic_machine=$basic_machine-unknown
+		;;
 	m6811 | m68hc11 | m6812 | m68hc12)
 		# Motorola 68HC11/12.
 		basic_machine=$basic_machine-unknown
@@ -293,19 +306,19 @@ case $basic_machine in
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* \
-	| bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
-	| clipper-* | cydra-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
 	| elxsi-* \
 	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
-	| ip2k-* \
-	| m32r-* \
+	| ip2k-* | iq2000-* \
+	| m32r-* | m32rle-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | mcore-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* \
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
 	| mips16-* \
 	| mips64-* | mips64el-* \
@@ -314,29 +327,40 @@ case $basic_machine in
 	| mips64vr4100-* | mips64vr4100el-* \
 	| mips64vr4300-* | mips64vr4300el-* \
 	| mips64vr5000-* | mips64vr5000el-* \
+	| mips64vr5900-* | mips64vr5900el-* \
 	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
 	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
-	| mipstx39 | mipstx39el \
+	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| ms1-* \
+	| msp430-* \
 	| none-* | np1-* | ns16k-* | ns32k-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
 	| pyramid-* \
 	| romp-* | rs6000-* \
-	| sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
+	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
-	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
-	| tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \
+	| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+	| sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+	| tahoe-* | thumb-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tron-* \
 	| v850-* | v850e-* | vax-* \
 	| we32k-* \
-	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
-	| xtensa-* \
+	| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| xstormy16-* | xtensa-* \
 	| ymp-* \
 	| z8k-*)
 		;;
+	m32c-*)
+		;;
 	# Recognize the various machine names and aliases which stand
 	# for a CPU type and a company and sometimes even an OS.
 	386bsd)
@@ -353,6 +377,9 @@ case $basic_machine in
 		basic_machine=a29k-amd
 		os=-udi
 		;;
+    	abacus)
+		basic_machine=abacus-unknown
+		;;
 	adobe68k)
 		basic_machine=m68010-adobe
 		os=-scout
@@ -367,6 +394,12 @@ case $basic_machine in
 		basic_machine=a29k-none
 		os=-bsd
 		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amd64-*)
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	amdahl)
 		basic_machine=580-amdahl
 		os=-sysv
@@ -426,12 +459,27 @@ case $basic_machine in
 		basic_machine=j90-cray
 		os=-unicos
 		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
+	cr16c)
+		basic_machine=cr16c-unknown
+		os=-elf
+		;;
 	crds | unos)
 		basic_machine=m68k-crds
 		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
 	cris | cris-* | etrax*)
 		basic_machine=cris-axis
 		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
 	da30 | da30-*)
 		basic_machine=m68k-da30
 		;;
@@ -454,6 +502,10 @@ case $basic_machine in
 		basic_machine=m88k-motorola
 		os=-sysv3
 		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
 	dpx20 | dpx20-*)
 		basic_machine=rs6000-bull
 		os=-bosx
@@ -632,10 +684,6 @@ case $basic_machine in
 	mips3*)
 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
 		;;
-	mmix*)
-		basic_machine=mmix-knuth
-		os=-mmixware
-		;;
 	monitor)
 		basic_machine=m68k-rom68k
 		os=-coff
@@ -723,9 +771,12 @@ case $basic_machine in
 		basic_machine=hppa1.1-oki
 		os=-proelf
 		;;
-	or32 | or32-*)
+	openrisc | openrisc-*)
 		basic_machine=or32-unknown
-		os=-coff
+		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
 		;;
 	OSE68000 | ose68000)
 		basic_machine=m68000-ericsson
@@ -758,18 +809,24 @@ case $basic_machine in
 	pentiumpro | p6 | 6x86 | athlon | athlon_*)
 		basic_machine=i686-pc
 		;;
-	pentiumii | pentium2)
+	pentiumii | pentium2 | pentiumiii | pentium3)
 		basic_machine=i686-pc
 		;;
+	pentium4)
+		basic_machine=i786-pc
+		;;
 	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
 		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	pentiumpro-* | p6-* | 6x86-* | athlon-*)
 		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
-	pentiumii-* | pentium2-*)
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
 		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	pn)
 		basic_machine=pn-gould
 		;;
@@ -828,6 +885,10 @@ case $basic_machine in
 	sb1el)
 		basic_machine=mipsisa64sb1el-unknown
 		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
 	sequent)
 		basic_machine=i386-sequent
 		;;
@@ -835,6 +896,9 @@ case $basic_machine in
 		basic_machine=sh-hitachi
 		os=-hms
 		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
 	sparclite-wrs | simso-wrs)
 		basic_machine=sparclite-wrs
 		os=-vxworks
@@ -901,10 +965,6 @@ case $basic_machine in
 		basic_machine=i386-sequent
 		os=-dynix
 		;;
-	t3d)
-		basic_machine=alpha-cray
-		os=-unicos
-		;;
 	t3e)
 		basic_machine=alphaev5-cray
 		os=-unicos
@@ -913,14 +973,18 @@ case $basic_machine in
 		basic_machine=t90-cray
 		os=-unicos
 		;;
-        tic4x | c4x*)
-		basic_machine=tic4x-unknown
-		os=-coff
-		;;
 	tic54x | c54x*)
 		basic_machine=tic54x-unknown
 		os=-coff
 		;;
+	tic55x | c55x*)
+		basic_machine=tic55x-unknown
+		os=-coff
+		;;
+	tic6x | c6x*)
+		basic_machine=tic6x-unknown
+		os=-coff
+		;;
 	tx39)
 		basic_machine=mipstx39-unknown
 		;;
@@ -934,6 +998,10 @@ case $basic_machine in
 	tower | tower-32)
 		basic_machine=m68k-ncr
 		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
 	udi29k)
 		basic_machine=a29k-amd
 		os=-udi
@@ -977,9 +1045,9 @@ case $basic_machine in
 		basic_machine=hppa1.1-winbond
 		os=-proelf
 		;;
-	windows32)
-		basic_machine=i386-pc
-		os=-windows32-msvcrt
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
 		;;
 	xps | xps100)
 		basic_machine=xps100-honeywell
@@ -1011,6 +1079,9 @@ case $basic_machine in
 	romp)
 		basic_machine=romp-ibm
 		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
 	rs6000)
 		basic_machine=rs6000-ibm
 		;;
@@ -1027,13 +1098,10 @@ case $basic_machine in
 	we32k)
 		basic_machine=we32k-att
 		;;
-	sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
+	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
 		basic_machine=sh-unknown
 		;;
-	sh64)
-		basic_machine=sh64-unknown
-		;;
-	sparc | sparcv9 | sparcv9b)
+	sparc | sparcv8 | sparcv9 | sparcv9b)
 		basic_machine=sparc-sun
 		;;
 	cydra)
@@ -1106,18 +1174,20 @@ case $os in
 	      | -aos* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
-	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
 	      | -chorusos* | -chorusrdb* \
 	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
-	      | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
+	      | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
 	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* | -skyos*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1129,8 +1199,10 @@ case $os in
 			;;
 		esac
 		;;
+	-nto-qnx*)
+		;;
 	-nto*)
-		os=-nto-qnx
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
 		;;
 	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
 	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
@@ -1139,6 +1211,9 @@ case $os in
 	-mac*)
 		os=`echo $os | sed -e 's|mac|macos|'`
 		;;
+	-linux-dietlibc)
+		os=-linux-dietlibc
+		;;
 	-linux*)
 		os=`echo $os | sed -e 's|linux|linux-gnu|'`
 		;;
@@ -1151,6 +1226,9 @@ case $os in
 	-opened*)
 		os=-openedition
 		;;
+        -os400*)
+		os=-os400
+		;;
 	-wince*)
 		os=-wince
 		;;
@@ -1172,6 +1250,9 @@ case $os in
 	-atheos*)
 		os=-atheos
 		;;
+	-syllable*)
+		os=-syllable
+		;;
 	-386bsd)
 		os=-bsd
 		;;
@@ -1194,6 +1275,9 @@ case $os in
 	-sinix*)
 		os=-sysv4
 		;;
+        -tpf*)
+		os=-tpf
+		;;
 	-triton*)
 		os=-sysv3
 		;;
@@ -1224,6 +1308,15 @@ case $os in
 	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
 		os=-mint
 		;;
+	-aros*)
+		os=-aros
+		;;
+	-kaos*)
+		os=-kaos
+		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
 	-none)
 		;;
 	*)
@@ -1255,6 +1348,9 @@ case $basic_machine in
 	arm*-semi)
 		os=-aout
 		;;
+    c4x-* | tic4x-*)
+        os=-coff
+        ;;
 	# This must come before the *-dec entry.
 	pdp10-*)
 		os=-tops20
@@ -1301,6 +1397,9 @@ case $basic_machine in
 	*-ibm)
 		os=-aix
 		;;
+    	*-knuth)
+		os=-mmixware
+		;;
 	*-wec)
 		os=-proelf
 		;;
@@ -1433,9 +1532,15 @@ case $basic_machine in
 			-mvs* | -opened*)
 				vendor=ibm
 				;;
+			-os400*)
+				vendor=ibm
+				;;
 			-ptx*)
 				vendor=sequent
 				;;
+			-tpf*)
+				vendor=ibm
+				;;
 			-vxsim* | -vxworks* | -windiss*)
 				vendor=wrs
 				;;
@@ -1460,7 +1565,7 @@ case $basic_machine in
 esac
 
 echo $basic_machine$os
-exit 0
+exit
 
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)</diff>
      <filename>admin/config.sub</filename>
    </modified>
    <modified>
      <diff>@@ -16,6 +16,21 @@ if test -n &quot;$kde_libs_prefix&quot; -a -n &quot;$given_prefix&quot;; then
   fi
 fi
 
+if test x$GXX = &quot;xyes&quot; -a x$kde_have_gcc_visibility = &quot;xyes&quot; -a x$kde_cv_val_qt_gcc_visibility_patched = &quot;xno&quot;; then
+  echo &quot;&quot;
+  echo &quot;Your GCC supports symbol visibility, but the patch for Qt supporting visibility&quot;
+  echo &quot;was not included. Therefore, GCC symbol visibility support remains disabled.&quot;
+  echo &quot;&quot;
+  echo &quot;For better performance, consider including the Qt visibility supporting patch&quot;
+  echo &quot;located at:&quot;
+  echo &quot;&quot;
+  echo &quot;http://bugs.kde.org/show_bug.cgi?id=109386&quot;
+  echo &quot;&quot;
+  echo &quot;and recompile all of Qt and KDE. Note, this is entirely optional and&quot;
+  echo &quot;everything will continue to work just fine without it.&quot;
+  echo &quot;&quot;
+fi
+
 if test &quot;$all_tests&quot; = &quot;bad&quot;; then
   if test ! &quot;$cache_file&quot; = &quot;/dev/null&quot;; then
     echo &quot;&quot;</diff>
      <filename>admin/configure.in.bot.end</filename>
    </modified>
    <modified>
      <diff>@@ -13,8 +13,8 @@ dnl    Library General Public License for more details.
  
 dnl    You should have received a copy of the GNU Library General Public License
 dnl    along with this library; see the file COPYING.LIB.  If not, write to
-dnl    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-dnl    Boston, MA 02111-1307, USA.
+dnl    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+dnl    Boston, MA 02110-1301, USA.
 
 # Original Author was Kalle@kde.org
 # I lifted it in some mater. (Stephan Kulow)</diff>
      <filename>admin/configure.in.min</filename>
    </modified>
    <modified>
      <diff>@@ -6,6 +6,8 @@
 # It defines a shell function for each known target
 # and then does a case to call the correct function.
 
+unset MAKEFLAGS
+
 call_and_fix_autoconf()
 {
   $AUTOCONF || exit 1
@@ -30,7 +32,7 @@ check_autotool_versions()
 required_autoconf_version=&quot;2.53 or newer&quot;
 AUTOCONF_VERSION=`$AUTOCONF --version | head -n 1`
 case $AUTOCONF_VERSION in
-  Autoconf*2.5* | autoconf*2.5* ) : ;;
+  Autoconf*2.5* | autoconf*2.5* | autoconf*2.6* ) : ;;
   &quot;&quot; )
     echo &quot;*** AUTOCONF NOT FOUND!.&quot;
     echo &quot;*** KDE requires autoconf $required_autoconf_version&quot;
@@ -42,10 +44,10 @@ case $AUTOCONF_VERSION in
     exit 1
     ;;
 esac
- 
+
 AUTOHEADER_VERSION=`$AUTOHEADER --version | head -n 1`
 case $AUTOHEADER_VERSION in
-  Autoconf*2.5* | autoheader*2.5* ) : ;;
+  Autoconf*2.5* | autoheader*2.5* | autoheader*2.6* ) : ;;
   &quot;&quot; )
     echo &quot;*** AUTOHEADER NOT FOUND!.&quot;
     echo &quot;*** KDE requires autoheader $required_autoconf_version&quot;
@@ -66,15 +68,19 @@ case $AUTOMAKE_STRING in
     echo &quot;*** KDE requires automake $required_automake_version&quot;
     exit 1
     ;;
-  automake*1.6.* | automake*1.7* | automake*1.8* ) : ;;
+  automake*1.6.* | automake*1.7* | automake*1.8* | automake*1.9* | automake*1.10*)
+    echo &quot;*** $AUTOMAKE_STRING found.&quot;
+    UNSERMAKE=no
+    ;;
   &quot;&quot; )
     echo &quot;*** AUTOMAKE NOT FOUND!.&quot;
     echo &quot;*** KDE requires automake $required_automake_version&quot;
     exit 1
     ;;
-  unsermake* ) :
+  *unsermake* ) :
     echo &quot;*** YOU'RE USING UNSERMAKE.&quot;
     echo &quot;*** GOOD LUCK!! :)&quot;
+    UNSERMAKE=unsermake
     ;;
   * )
     echo &quot;*** YOU'RE USING $AUTOMAKE_STRING.&quot;
@@ -125,11 +131,13 @@ call_and_fix_autoconf
 if egrep &quot;^AM_CONFIG_HEADER&quot; configure.in &gt;/dev/null 2&gt;&amp;1; then
   echo &quot;*** Creating config.h template&quot;
   $AUTOHEADER || exit 1
+  touch config.h.in
 fi
 
 echo &quot;*** Creating Makefile templates&quot;
 $AUTOMAKE || exit 1
-if test -z &quot;$UNSERMAKE&quot;; then
+
+if test &quot;$UNSERMAKE&quot; = no; then
   echo &quot;*** Postprocessing Makefile templates&quot;
   perl -w admin/am_edit || exit 1
 fi
@@ -179,9 +187,13 @@ $ACLOCAL $ACLOCALFLAGS
 if egrep &quot;^AM_CONFIG_HEADER&quot; configure.in &gt;/dev/null 2&gt;&amp;1; then
   echo &quot;*** Creating config.h template&quot;
   $AUTOHEADER || exit 1
+  touch config.h.in
+fi
+$AUTOMAKE --foreign || exit 1
+if test &quot;$UNSERMAKE&quot; = no; then
+  echo &quot;*** Postprocessing Makefile templates&quot;
+  perl -w admin/am_edit || exit 1
 fi
-$AUTOMAKE --foreign
-perl -w admin/am_edit
 call_and_fix_autoconf
 touch stamp-h.in
 if grep &quot;^cvs-local:&quot; $makefile_am &gt;/dev/null; then
@@ -209,8 +221,15 @@ subdir_dist()
 {
 $ACLOCAL $ACLOCALFLAGS
 $AUTOHEADER
+touch config.h.in
 $AUTOMAKE
-perl -w ../admin/am_edit --path=../admin
+AUTOMAKE_STRING=`$AUTOMAKE --version | head -n 1`
+case $AUTOMAKE_STRING in
+  *unsermake* ) :
+    ;;
+  *)
+     perl -w ../admin/am_edit --path=../admin
+esac
 call_and_fix_autoconf
 touch stamp-h.in
 }
@@ -244,10 +263,6 @@ if test -f Makefile.am.in; then
 fi
 
 echo &quot;AC_CONFIG_FILES([ Makefile ])&quot; &gt;&gt; configure.in.new
-if test -n &quot;$UNSERMAKE&quot;; then
-  echo &quot;AC_CONFIG_FILES([ Makefile.rules ])&quot; &gt;&gt; configure.in.new
-  echo &quot;AC_CONFIG_FILES([ Makefile.calls ])&quot; &gt;&gt; configure.in.new
-fi
 
 if test -f inst-apps; then
     topleveldirs=`cat inst-apps`
@@ -268,14 +283,10 @@ for topleveldir in $topleveldirs; do
 	continue
   fi
 
-  mfs=`find $topleveldir -name Makefile.am -print | fgrep -v &quot;/.&quot; | \
+  mfs=`find $topleveldir -follow -name Makefile.am -print | fgrep -v &quot;/.&quot; | \
        sed -e 's#\./##; s#/Makefile.am$##' | sort | sed -e 's#$#/Makefile#'`
   for i in $mfs; do
      echo &quot;AC_CONFIG_FILES([ $i ])&quot; &gt;&gt; configure.in.new
-     if test -n &quot;$UNSERMAKE&quot;; then
-        echo &quot;AC_CONFIG_FILES([ $i.rules ])&quot; &gt;&gt; configure.in.new
-	echo &quot;AC_CONFIG_FILES([ $i.calls ])&quot; &gt;&gt; configure.in.new
-     fi
   done
 done
 
@@ -285,10 +296,6 @@ for file in $list; do
     echo &quot;AC_CONFIG_FILES([ $file ])&quot; &gt;&gt;  configure.in.new
 done
 
-if test -n &quot;$UNSERMAKE&quot;; then
-  echo &quot;AC_CONFIG_FILES([ MakeVars ])&quot; &gt;&gt; configure.in.new
-fi
-
 midfiles=`cat configure.files | fgrep &quot;configure.in.mid&quot;`
 test -n &quot;$midfiles&quot; &amp;&amp; cat $midfiles &gt;&gt; configure.in.new
 
@@ -309,7 +316,7 @@ if test -f configure.in.in; then
    fi
 fi
 if test -z &quot;$VERSION&quot; || test &quot;$VERSION&quot; = &quot;@VERSION@&quot;; then
-     VERSION=&quot;\&quot;3.2.90\&quot;&quot;
+     VERSION=&quot;\&quot;3.5.7\&quot;&quot;
 fi
 if test -z &quot;$modulename&quot; || test &quot;$modulename&quot; = &quot;@MODULENAME@&quot;; then
    modulename=`pwd`; 
@@ -348,11 +355,11 @@ if test -f inst-apps; then
    inst=`cat inst-apps`
    list=&quot;&quot;
    for i in $inst; do
-      list=&quot;$list `find $i/ -name &quot;configure.in.in&quot; -o -name &quot;configure.in.bot&quot; -o -name &quot;configure.in.mid&quot; | \
+      list=&quot;$list `find $i/ -follow -name &quot;configure.in.in&quot; -o -name &quot;configure.in.bot&quot; -o -name &quot;configure.in.mid&quot; | \
 		sed -e &quot;s,/configure,/aaaconfigure,&quot; | sort | sed -e &quot;s,/aaaconfigure,/configure,&quot;`&quot;
    done
 else
-   list=`find . -name &quot;configure.in.in&quot; -o -name &quot;configure.in.bot&quot; -o -name &quot;configure.in.mid&quot; | \
+   list=`find . -follow -name &quot;configure.in.in&quot; -o -name &quot;configure.in.bot&quot; -o -name &quot;configure.in.mid&quot; | \
 		sed -e &quot;s,/configure,/aaaconfigure,&quot; | sort | sed -e &quot;s,/aaaconfigure,/configure,&quot;`
 fi
 for i in $list; do if test -f $i &amp;&amp; test `dirname $i` != &quot;.&quot; ; then
@@ -472,23 +479,10 @@ if test -f Makefile.am.in; then
     cat Makefile.am.in &gt; Makefile.am.in.adds
   fi
 
-  if test -n &quot;$UNSERMAKE&quot;; then
-    cat Makefile.am.in.adds &gt; Makefile.am
-    topsubdirs=
-    for i in $compilefirst $dirs $compilelast; do
-       vari=`echo $i | sed -e &quot;s,[-+],_,g&quot;`
-       echo &quot;if $vari&quot;&quot;_SUBDIR_included&quot; &gt;&gt; Makefile.am
-       echo &quot;$vari&quot;&quot;_SUBDIR=$i&quot; &gt;&gt; Makefile.am
-       echo &quot;endif&quot; &gt;&gt; Makefile.am
-       topsubdirs=&quot;$topsubdirs \$($vari&quot;&quot;_SUBDIR)&quot;
-    done
-    echo &quot;SUBDIRS=$topsubdirs&quot; &gt;&gt; Makefile.am
-  else
-    cat Makefile.am.in.adds | \
-        sed -e 's,^\s*\(COMPILE_BEFORE.*\),# \1,' | \
-        sed -e 's,^\s*\(COMPILE_AFTER.*\),# \1,' &gt; Makefile.am
+  cat Makefile.am.in.adds | \
+      sed -e 's,^\s*\(COMPILE_BEFORE.*\),# \1,' | \
+      sed -e 's,^\s*\(COMPILE_AFTER.*\),# \1,' &gt; Makefile.am
     echo &quot;SUBDIRS=&quot;'$(TOPSUBDIRS)' &gt;&gt; Makefile.am
-  fi
   rm Makefile.am.in.adds
 fi
 }
@@ -511,21 +505,10 @@ acinclude_m4()
   fi
   # if it wasn't created up to now, then we do it better
   if test ! -f acinclude.m4; then
-     cat admin/acinclude.m4.in admin/libtool.m4.in $adds &gt; acinclude.m4
+     cat admin/acinclude.m4.in admin/libtool.m4.in admin/pkg.m4.in $adds &gt; acinclude.m4
   fi
 }
 
-cvs_clean()
-{
-if test -d CVS; then :; else
-  echo &quot;You don't have a toplevel CVS directory.&quot;
-  echo &quot;You most certainly didn't use cvs to get these sources.&quot;
-  echo &quot;But this function depends on cvs's information.&quot;
-  exit 1
-fi
-perl $admindir/cvs-clean.pl
-}
-
 package_merge()
 {
 catalogs=$POFILES
@@ -544,18 +527,8 @@ for cat in $catalogs; do
 done
 }
 
-package_messages()
+extract_messages()
 {
-rm -rf po.backup
-mkdir po.backup
-
-for i in `ls -1 po/*.pot 2&gt;/dev/null | sed -e &quot;s#po/##&quot;`; do
-  egrep -v '^#([^:]|$)' po/$i | egrep '^.*[^ ]+.*$' | grep -v &quot;\&quot;POT-Creation&quot; &gt; po.backup/$i
-  cat po/$i &gt; po.backup/backup_$i
-  touch -r po/$i po.backup/backup_$i
-  rm po/$i
-done
-
 podir=${podir:-$PWD/po}
 files=`find . -name Makefile.am | xargs egrep -l '^messages:' `
 dirs=`for i in $files; do echo \`dirname $i\`; done`
@@ -575,16 +548,19 @@ for subdir in $dirs; do
 	    echo &quot;$subdir has *.rc, *.ui or *.kcfg files, but not correct messages line&quot;
 	fi
    fi
-   if test -n &quot;`grep -r KAboutData *.c* *.C* 2&gt;/dev/null`&quot;; then
+   if find . -name \*.c\* -o -name \*.h\* | fgrep -v &quot;.svn&quot; | xargs fgrep -s -q KAboutData ; then
 	echo -e 'i18n(&quot;_: NAME OF TRANSLATORS\\n&quot;\n&quot;Your names&quot;)\ni18n(&quot;_: EMAIL OF TRANSLATORS\\n&quot;\n&quot;Your emails&quot;)' &gt; _translatorinfo.cpp
    else echo &quot; &quot; &gt; _translatorinfo.cpp
    fi
    perl -e '$mes=0; while (&lt;STDIN&gt;) { next if (/^(if\s|else\s|endif)/); if (/^messages:/) { $mes=1; print $_; next; } if ($mes) { if (/$\\(XGETTEXT\)/ &amp;&amp; / -o/) { s/ -o \$\(podir\)/ _translatorinfo.cpp -o \$\(podir\)/ } print $_; } else { print $_; } }' &lt; Makefile.am | egrep -v '^include ' &gt; _transMakefile
 
-   kdepotpath=${includedir:-${KDEDIR:-`kde-config --prefix`}/include}/kde.pot
+   kdepotpath=${includedir:-`kde-config --expandvars --install include`}/kde.pot
+   if ! test -f $kdepotpath; then
+	kdepotpath=`kde-config --expandvars --prefix`/include/kde.pot
+   fi
 
-   $MAKE -s -f _transMakefile podir=$podir EXTRACTRC=&quot;$EXTRACTRC&quot; PREPARETIPS=&quot;$PREPARETIPS&quot; \
-	XGETTEXT=&quot;${XGETTEXT:-xgettext} -C -ki18n -ktr2i18n -kI18N_NOOP -kaliasLocale -x $kdepotpath&quot; messages 
+   $MAKE -s -f _transMakefile podir=$podir EXTRACTRC=&quot;$EXTRACTRC&quot; PREPARETIPS=&quot;$PREPARETIPS&quot; srcdir=. \
+	XGETTEXT=&quot;${XGETTEXT:-xgettext} --foreign-user -C -ci18n -ki18n -ktr2i18n -kI18N_NOOP -kI18N_NOOP2 -kaliasLocale -x $kdepotpath&quot; messages
    exit_code=$?
    if test &quot;$exit_code&quot; != 0; then
        echo &quot;make exit code: $exit_code&quot;
@@ -596,18 +572,31 @@ for subdir in $dirs; do
    rm -f $subdir/_transMakefile
 done
 rm -f $tmpname
+}
+
+package_messages()
+{
+rm -rf po.backup
+mkdir po.backup
+
+for i in `ls -1 po/*.pot 2&gt;/dev/null | sed -e &quot;s#po/##&quot;`; do
+  egrep -v '^#[^,]' po/$i | egrep '^.*[^ ]+.*$' | grep -v &quot;\&quot;POT-Creation&quot; &gt; po.backup/$i
+  cat po/$i &gt; po.backup/backup_$i
+  touch -r po/$i po.backup/backup_$i
+  rm po/$i
+done
+
+extract_messages
+
 for i in `ls -1 po.backup/*.pot 2&gt;/dev/null | sed -e &quot;s#po.backup/##&quot; | egrep -v '^backup_'`; do
   test -f po/$i || echo &quot;disappeared: $i&quot;
 done
 for i in `ls -1 po/*.pot 2&gt;/dev/null | sed -e &quot;s#po/##&quot;`; do
-   sed -e 's,^&quot;Content-Type: text/plain; charset=CHARSET\\n&quot;$,&quot;Content-Type: text/plain; charset=UTF-8\\n&quot;,' po/$i &gt; po/$i.new &amp;&amp; mv po/$i.new po/$i
-   msgmerge -q -o po/$i po/$i po/$i
-   egrep -v '^#([^:]|$)' po/$i | egrep '^.*[^ ]+.*$' | grep -v &quot;\&quot;POT-Creation&quot; &gt; temp.pot
-  if test -f po.backup/$i &amp;&amp; test -n &quot;`diff temp.pot po.backup/$i`&quot;; then
-	echo &quot;will update $i&quot;
-        sed -e 's,^&quot;Content-Type: text/plain; charset=CHARSET\\n&quot;$,&quot;Content-Type: text/plain; charset=UTF-8\\n&quot;,' po.backup/$backup_$i &gt; po/$i.new &amp;&amp; mv po/$i.new po.backup/backup_$i
-	msgmerge -q po.backup/backup_$i po/$i &gt; temp.pot
-	mv temp.pot po/$i
+  sed -e 's,^&quot;Content-Type: text/plain; charset=CHARSET\\n&quot;$,&quot;Content-Type: text/plain; charset=UTF-8\\n&quot;,' po/$i &gt; po/$i.new &amp;&amp; mv po/$i.new po/$i
+  #msgmerge -q -o po/$i po/$i po/$i
+  egrep -v '^#[^,]' po/$i | egrep '^.*[^ ]+.*$' | grep -v &quot;\&quot;POT-Creation&quot; &gt; temp.pot
+  if test -f po.backup/$i &amp;&amp; ! cmp -s temp.pot po.backup/$i; then
+    echo &quot;will update $i&quot;
   else
     if test -f po.backup/backup_$i; then
       test -z &quot;$VERBOSE&quot; || echo &quot;I'm restoring $i&quot;
@@ -622,7 +611,9 @@ rm -f temp.pot
 rm -rf po.backup
 }
 
-unset LC_ALL || :
+# Make sure that sorting is always done the same way
+LC_ALL=C
+export LC_ALL
 unset LANG || :
 unset LC_CTYPE || :
 unset LANGUAGE || :
@@ -640,21 +631,22 @@ if test -f Makefile.am.in; then
   rm -f $makefile_wo
 fi
 
-# Suck in the AUTOCONF detection code
-. $admindir/detect-autoconf.sh
+# Call script to find autoconf and friends.  Uses eval since the script outputs
+# sh-compatible code.
+eval `$admindir/detect-autoconf.pl`
 
 ###
 ### Main
 ###
 
-arg=`echo $1 | tr '\-.' __`
+arg=`echo $1 | tr .- __`
 case $arg in
   cvs | dist | subdir_dist | configure_in | configure_files | subdirs | \
-  cvs_clean | package_merge | package_messages | Makefile_am | acinclude_m4 ) $arg ;;
+  cvs_clean | package_merge | package_messages | Makefile_am | acinclude_m4 | extract_messages ) $arg ;;
   configure ) call_and_fix_autoconf ;;
   * ) echo &quot;Usage: cvs.sh &lt;target&gt;&quot;
       echo &quot;Target can be one of:&quot;
-      echo &quot;    cvs cvs-clean dist&quot;
+      echo &quot;    cvs svn dist&quot;
       echo &quot;    configure.in configure.files&quot;
       echo &quot;    package-merge package-messages&quot;
       echo &quot;&quot;</diff>
      <filename>admin/cvs.sh</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,9 @@
 #! /bin/sh
-
 # depcomp - compile a program generating dependencies as side-effects
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+
+scriptversion=2005-07-09.11
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,8 +17,8 @@
 
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -25,13 +27,45 @@
 
 # Originally written by Alexandre Oliva &lt;oliva@dcc.unicamp.br&gt;.
 
+case $1 in
+  '')
+     echo &quot;$0: No command.  Try \`$0 --help' for more information.&quot; 1&gt;&amp;2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat &lt;&lt;\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to &lt;bug-automake@gnu.org&gt;.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo &quot;depcomp $scriptversion&quot;
+    exit $?
+    ;;
+esac
+
 if test -z &quot;$depmode&quot; || test -z &quot;$source&quot; || test -z &quot;$object&quot;; then
   echo &quot;depcomp: Variables source, object and depmode must be set&quot; 1&gt;&amp;2
   exit 1
 fi
-# `libtool' can also be set to `yes' or `no'.
 
-depfile=${depfile-`echo &quot;$object&quot; | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo &quot;$object&quot; |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&amp;|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
 tmpdepfile=${tmpdepfile-`echo &quot;$depfile&quot; | sed 's/\.\([^.]*\)$/.T\1/'`}
 
 rm -f &quot;$tmpdepfile&quot;
@@ -163,19 +197,25 @@ sgi)
 
 aix)
   # The C for AIX Compiler uses -M and outputs the dependencies
-  # in a .u file.  This file always lives in the current directory.
-  # Also, the AIX compiler puts `$object:' at the start of each line;
-  # $object doesn't have directory information.
-  stripped=`echo &quot;$object&quot; | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  stripped=`echo &quot;$object&quot; | sed 's/\(.*\)\..*$/\1/'`
   tmpdepfile=&quot;$stripped.u&quot;
-  outname=&quot;$stripped.o&quot;
   if test &quot;$libtool&quot; = yes; then
     &quot;$@&quot; -Wc,-M
   else
     &quot;$@&quot; -M
   fi
-
   stat=$?
+
+  if test -f &quot;$tmpdepfile&quot;; then :
+  else
+    stripped=`echo &quot;$stripped&quot; | sed 's,^.*/,,'`
+    tmpdepfile=&quot;$stripped.u&quot;
+  fi
+
   if test $stat -eq 0; then :
   else
     rm -f &quot;$tmpdepfile&quot;
@@ -183,6 +223,7 @@ aix)
   fi
 
   if test -f &quot;$tmpdepfile&quot;; then
+    outname=&quot;$stripped.o&quot;
     # Each line is of the form `foo.o: dependent.h'.
     # Do two passes, one to just change these to
     # `$object: dependent.h' and one to simply `dependent.h:'.
@@ -198,11 +239,9 @@ aix)
   ;;
 
 icc)
-  # Must come before tru64.
-
-  # Intel's C compiler understands `-MD -MF file'.  However
+  # Intel's C compiler understands `-MD -MF file'.  However on
   #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
-  # will fill foo.d with something like
+  # ICC 7.0 will fill foo.d with something like
   #    foo.o: sub/foo.c
   #    foo.o: sub/foo.h
   # which is wrong.  We want:
@@ -210,6 +249,12 @@ icc)
   #    sub/foo.o: sub/foo.h
   #    sub/foo.c:
   #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
 
   &quot;$@&quot; -MD -MF &quot;$tmpdepfile&quot;
   stat=$?
@@ -219,45 +264,70 @@ icc)
     exit $stat
   fi
   rm -f &quot;$depfile&quot;
-  # Each line is of the form `foo.o: dependent.h'.
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
   # Do two passes, one to just change these to
   # `$object: dependent.h' and one to simply `dependent.h:'.
-  sed -e &quot;s,^[^:]*:,$object :,&quot; &lt; &quot;$tmpdepfile&quot; &gt; &quot;$depfile&quot;
-  sed -e &quot;s,^[^:]*: \(.*\)$,\1:,&quot; &lt; &quot;$tmpdepfile&quot; &gt;&gt; &quot;$depfile&quot;
+  sed &quot;s,^[^:]*:,$object :,&quot; &lt; &quot;$tmpdepfile&quot; &gt; &quot;$depfile&quot;
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' &lt; &quot;$tmpdepfile&quot; |
+    sed -e 's/$/ :/' &gt;&gt; &quot;$depfile&quot;
   rm -f &quot;$tmpdepfile&quot;
   ;;
 
 tru64)
-   # The Tru64 AIX compiler uses -MD to generate dependencies as a side
+   # The Tru64 compiler uses -MD to generate dependencies as a side
    # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
-   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put 
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
    # dependencies in `foo.d' instead, so we check for that too.
    # Subdirectories are respected.
+   dir=`echo &quot;$object&quot; | sed -e 's|/[^/]*$|/|'`
+   test &quot;x$dir&quot; = &quot;x$object&quot; &amp;&amp; dir=
+   base=`echo &quot;$object&quot; | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
 
-   tmpdepfile1=&quot;$object.d&quot;
-   tmpdepfile2=`echo &quot;$object&quot; | sed -e 's/.o$/.d/'` 
    if test &quot;$libtool&quot; = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mecanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
       &quot;$@&quot; -Wc,-MD
    else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
       &quot;$@&quot; -MD
    fi
 
    stat=$?
    if test $stat -eq 0; then :
    else
-      rm -f &quot;$tmpdepfile1&quot; &quot;$tmpdepfile2&quot;
+      rm -f &quot;$tmpdepfile1&quot; &quot;$tmpdepfile2&quot; &quot;$tmpdepfile3&quot; &quot;$tmpdepfile4&quot;
       exit $stat
    fi
 
-   if test -f &quot;$tmpdepfile1&quot;; then
-      tmpdepfile=&quot;$tmpdepfile1&quot;
-   else
-      tmpdepfile=&quot;$tmpdepfile2&quot;
-   fi
+   for tmpdepfile in &quot;$tmpdepfile1&quot; &quot;$tmpdepfile2&quot; &quot;$tmpdepfile3&quot; &quot;$tmpdepfile4&quot;
+   do
+     test -f &quot;$tmpdepfile&quot; &amp;&amp; break
+   done
    if test -f &quot;$tmpdepfile&quot;; then
       sed -e &quot;s,^.*\.[a-z]*:,$object:,&quot; &lt; &quot;$tmpdepfile&quot; &gt; &quot;$depfile&quot;
-      # That's a space and a tab in the [].
-      sed -e 's,^.*\.[a-z]*:[ 	]*,,' -e 's,$,:,' &lt; &quot;$tmpdepfile&quot; &gt;&gt; &quot;$depfile&quot;
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' &lt; &quot;$tmpdepfile&quot; &gt;&gt; &quot;$depfile&quot;
    else
       echo &quot;#dummy&quot; &gt; &quot;$depfile&quot;
    fi
@@ -270,34 +340,42 @@ tru64)
 
 dashmstdout)
   # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
-  test -z &quot;$dashmflag&quot; &amp;&amp; dashmflag=-M
-  ( IFS=&quot; &quot;
-    case &quot; $* &quot; in
-    *&quot; --mode=compile &quot;*) # this is libtool, let us make it quiet
-      for arg
-      do # cycle over the arguments
-        case &quot;$arg&quot; in
-	&quot;--mode=compile&quot;)
-	  # insert --quiet before &quot;--mode=compile&quot;
-	  set fnord &quot;$@&quot; --quiet
-	  shift # fnord
-	  ;;
-	esac
-	set fnord &quot;$@&quot; &quot;$arg&quot;
-	shift # fnord
-	shift # &quot;$arg&quot;
-      done
+  # always write the preprocessed file to stdout, regardless of -o.
+  &quot;$@&quot; || exit $?
+
+  # Remove the call to Libtool.
+  if test &quot;$libtool&quot; = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=&quot; &quot;
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord &quot;$@&quot; &quot;$arg&quot;
+      shift # fnord
+      shift # $arg
       ;;
     esac
-    &quot;$@&quot; $dashmflag | sed 's:^[^:]*\:[ 	]*:'&quot;$object&quot;'\: :' &gt; &quot;$tmpdepfile&quot;
-  ) &amp;
-  proc=$!
-  &quot;$@&quot;
-  stat=$?
-  wait &quot;$proc&quot;
-  if test &quot;$stat&quot; != 0; then exit $stat; fi
+  done
+
+  test -z &quot;$dashmflag&quot; &amp;&amp; dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  &quot;$@&quot; $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'&quot;$object&quot;'\: :' &gt; &quot;$tmpdepfile&quot;
   rm -f &quot;$depfile&quot;
   cat &lt; &quot;$tmpdepfile&quot; &gt; &quot;$depfile&quot;
   tr ' ' '
@@ -315,36 +393,40 @@ dashXmstdout)
   ;;
 
 makedepend)
-  # X makedepend
-  (
-    shift
-    cleared=no
-    for arg in &quot;$@&quot;; do
-      case $cleared in no)
-        set &quot;&quot;; shift
-	cleared=yes
-      esac
-      case &quot;$arg&quot; in
-        -D*|-I*)
-	  set fnord &quot;$@&quot; &quot;$arg&quot;; shift;;
-	-*)
-	  ;;
-	*)
-	  set fnord &quot;$@&quot; &quot;$arg&quot;; shift;;
-      esac
+  &quot;$@&quot; || exit $?
+  # Remove any Libtool call
+  if test &quot;$libtool&quot; = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
     done
-    obj_suffix=&quot;`echo $object | sed 's/^.*\././'`&quot;
-    touch &quot;$tmpdepfile&quot;
-    ${MAKEDEPEND-makedepend} 2&gt;/dev/null -o&quot;$obj_suffix&quot; -f&quot;$tmpdepfile&quot; &quot;$@&quot;
-  ) &amp;
-  proc=$!
-  &quot;$@&quot;
-  stat=$?
-  wait &quot;$proc&quot;
-  if test &quot;$stat&quot; != 0; then exit $stat; fi
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no
+  for arg in &quot;$@&quot;; do
+    case $cleared in
+    no)
+      set &quot;&quot;; shift
+      cleared=yes ;;
+    esac
+    case &quot;$arg&quot; in
+    -D*|-I*)
+      set fnord &quot;$@&quot; &quot;$arg&quot;; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -*|$object)
+      ;;
+    *)
+      set fnord &quot;$@&quot; &quot;$arg&quot;; shift ;;
+    esac
+  done
+  obj_suffix=&quot;`echo $object | sed 's/^.*\././'`&quot;
+  touch &quot;$tmpdepfile&quot;
+  ${MAKEDEPEND-makedepend} -o&quot;$obj_suffix&quot; -f&quot;$tmpdepfile&quot; &quot;$@&quot;
   rm -f &quot;$depfile&quot;
   cat &lt; &quot;$tmpdepfile&quot; &gt; &quot;$depfile&quot;
-  tail +3 &quot;$tmpdepfile&quot; | tr ' ' '
+  sed '1,2d' &quot;$tmpdepfile&quot; | tr ' ' '
 ' | \
 ## Some versions of the HPUX 10.20 sed can't process this invocation
 ## correctly.  Breaking it into two sed invocations is a workaround.
@@ -354,35 +436,40 @@ makedepend)
 
 cpp)
   # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
-  ( IFS=&quot; &quot;
-    case &quot; $* &quot; in
-    *&quot; --mode=compile &quot;*)
-      for arg
-      do # cycle over the arguments
-        case $arg in
-	&quot;--mode=compile&quot;)
-	  # insert --quiet before &quot;--mode=compile&quot;
-	  set fnord &quot;$@&quot; --quiet
-	  shift # fnord
-	  ;;
-	esac
-	set fnord &quot;$@&quot; &quot;$arg&quot;
-	shift # fnord
-	shift # &quot;$arg&quot;
-      done
+  # always write the preprocessed file to stdout.
+  &quot;$@&quot; || exit $?
+
+  # Remove the call to Libtool.
+  if test &quot;$libtool&quot; = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=&quot; &quot;
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord &quot;$@&quot; &quot;$arg&quot;
+      shift # fnord
+      shift # $arg
       ;;
     esac
-    &quot;$@&quot; -E |
-    sed -n '/^# [0-9][0-9]* &quot;\([^&quot;]*\)&quot;.*/ s:: \1 \\:p' |
+  done
+
+  &quot;$@&quot; -E |
+    sed -n -e '/^# [0-9][0-9]* &quot;\([^&quot;]*\)&quot;.*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* &quot;\([^&quot;]*\)&quot;.*/ s:: \1 \\:p' |
     sed '$ s: \\$::' &gt; &quot;$tmpdepfile&quot;
-  ) &amp;
-  proc=$!
-  &quot;$@&quot;
-  stat=$?
-  wait &quot;$proc&quot;
-  if test &quot;$stat&quot; != 0; then exit $stat; fi
   rm -f &quot;$depfile&quot;
   echo &quot;$object : \\&quot; &gt; &quot;$depfile&quot;
   cat &lt; &quot;$tmpdepfile&quot; &gt;&gt; &quot;$depfile&quot;
@@ -392,34 +479,27 @@ cpp)
 
 msvisualcpp)
   # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout, regardless of -o,
+  # always write the preprocessed file to stdout, regardless of -o,
   # because we must use -o when running libtool.
-  ( IFS=&quot; &quot;
-    case &quot; $* &quot; in
-    *&quot; --mode=compile &quot;*)
-      for arg
-      do # cycle over the arguments
-        case $arg in
-	&quot;--mode=compile&quot;)
-	  # insert --quiet before &quot;--mode=compile&quot;
-	  set fnord &quot;$@&quot; --quiet
-	  shift # fnord
-	  ;;
-	esac
+  &quot;$@&quot; || exit $?
+  IFS=&quot; &quot;
+  for arg
+  do
+    case &quot;$arg&quot; in
+    &quot;-Gm&quot;|&quot;/Gm&quot;|&quot;-Gi&quot;|&quot;/Gi&quot;|&quot;-ZI&quot;|&quot;/ZI&quot;)
+	set fnord &quot;$@&quot;
+	shift
+	shift
+	;;
+    *)
 	set fnord &quot;$@&quot; &quot;$arg&quot;
-	shift # fnord
-	shift # &quot;$arg&quot;
-      done
-      ;;
+	shift
+	shift
+	;;
     esac
-    &quot;$@&quot; -E |
-    sed -n '/^#line [0-9][0-9]* &quot;\([^&quot;]*\)&quot;/ s::echo &quot;`cygpath -u \\&quot;\1\\&quot;`&quot;:p' | sort | uniq &gt; &quot;$tmpdepfile&quot;
-  ) &amp;
-  proc=$!
-  &quot;$@&quot;
-  stat=$?
-  wait &quot;$proc&quot;
-  if test &quot;$stat&quot; != 0; then exit $stat; fi
+  done
+  &quot;$@&quot; -E |
+  sed -n '/^#line [0-9][0-9]* &quot;\([^&quot;]*\)&quot;/ s::echo &quot;`cygpath -u \\&quot;\1\\&quot;`&quot;:p' | sort | uniq &gt; &quot;$tmpdepfile&quot;
   rm -f &quot;$depfile&quot;
   echo &quot;$object : \\&quot; &gt; &quot;$depfile&quot;
   . &quot;$tmpdepfile&quot; | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' &gt;&gt; &quot;$depfile&quot;
@@ -439,3 +519,12 @@ none)
 esac
 
 exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: &quot;scriptversion=&quot;
+# time-stamp-format: &quot;%:y-%02m-%02d.%02H&quot;
+# time-stamp-end: &quot;$&quot;
+# End:</diff>
      <filename>admin/depcomp</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in $(top_srcdir)/admin/cvs.sh
+$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in $(top_srcdir)/admin/cvs.sh $(top_srcdir)/admin/pkg.m4.in
 	@cd $(top_srcdir) &amp;&amp; $(SHELL) admin/cvs.sh acinclude_m4
 
 $(top_srcdir)/configure.in: $(top_srcdir)/subdirs $(top_srcdir)/configure.files $(top_srcdir)/admin/cvs.sh</diff>
      <filename>admin/deps.am</filename>
    </modified>
    <modified>
      <diff>@@ -1,19 +1,38 @@
 #!/bin/sh
-#
 # install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
+
+scriptversion=2005-11-07.23
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the &quot;Software&quot;), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
 #
-# Copyright 1991 by the Massachusetts Institute of Technology
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
 #
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided &quot;as is&quot;
-# without express or implied warranty.
+# THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
 #
 # Calling this script install-sh is preferred over install.sh, to prevent
 # `make' implicit rules from creating a file called install from it
@@ -23,13 +42,11 @@
 # from scratch.  It can only install one file at a time, a restriction
 # shared with many OS's install programs.
 
-
 # set DOITPROG to echo to test this script
 
 # Don't use :- since 4.3BSD and earlier shells don't like it.
 doit=&quot;${DOITPROG-}&quot;
 
-
 # put in absolute paths if you don't have them in your path; or use env. vars.
 
 mvprog=&quot;${MVPROG-mv}&quot;
@@ -41,236 +58,344 @@ stripprog=&quot;${STRIPPROG-strip}&quot;
 rmprog=&quot;${RMPROG-rm}&quot;
 mkdirprog=&quot;${MKDIRPROG-mkdir}&quot;
 
-transformbasename=&quot;&quot;
-transform_arg=&quot;&quot;
-instcmd=&quot;$mvprog&quot;
-chmodcmd=&quot;$chmodprog 0755&quot;
-chowncmd=&quot;&quot;
-chgrpcmd=&quot;&quot;
-stripcmd=&quot;&quot;
-rmcmd=&quot;$rmprog -f&quot;
-mvcmd=&quot;$mvprog&quot;
-src=&quot;&quot;
-dst=&quot;&quot;
-dir_arg=&quot;&quot;
-
-while [ x&quot;$1&quot; != x ]; do
-    case $1 in
-	-c) instcmd=$cpprog
-	    shift
-	    continue;;
-
-	-d) dir_arg=true
-	    shift
-	    continue;;
-
-	-m) chmodcmd=&quot;$chmodprog $2&quot;
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd=&quot;$chownprog $2&quot;
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd=&quot;$chgrpprog $2&quot;
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd=$stripprog
-	    shift
-	    continue;;
-
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
-	    shift
-	    continue;;
-
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-	    shift
-	    continue;;
-
-	*)  if [ x&quot;$src&quot; = x ]
-	    then
-		src=$1
-	    else
-		# this colon is to work around a 386BSD /bin/sh bug
-		:
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
-
-if [ x&quot;$src&quot; = x ]
-then
-	echo &quot;$0: no input file specified&quot; &gt;&amp;2
-	exit 1
-else
-	:
-fi
-
-if [ x&quot;$dir_arg&quot; != x ]; then
-	dst=$src
-	src=&quot;&quot;
-
-	if [ -d &quot;$dst&quot; ]; then
-		instcmd=:
-		chmodcmd=&quot;&quot;
-	else
-		instcmd=$mkdirprog
-	fi
-else
-
-# Waiting for this to be detected by the &quot;$instcmd $src $dsttmp&quot; command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
-
-	if [ -f &quot;$src&quot; ] || [ -d &quot;$src&quot; ]
-	then
-		:
-	else
-		echo &quot;$0: $src does not exist&quot; &gt;&amp;2
-		exit 1
-	fi
-
-	if [ x&quot;$dst&quot; = x ]
-	then
-		echo &quot;$0: no destination specified&quot; &gt;&amp;2
-		exit 1
-	else
-		:
-	fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-	if [ -d &quot;$dst&quot; ]
-	then
-		dst=$dst/`basename &quot;$src&quot;`
-	else
-		:
-	fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo &quot;$dst&quot; | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+posix_glob=
+posix_mkdir=
 
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
+# Symbolic mode for testing mkdir with directories.
+# It is the same as 755, but also tests that &quot;u+&quot; works.
+test_mode=u=rwx,g=rx,o=rx,u+wx
 
-# Skip lots of stat calls in the usual case.
-if [ ! -d &quot;$dstdir&quot; ]; then
-defaultIFS='
-	'
-IFS=&quot;${IFS-$defaultIFS}&quot;
+# Desired mode of installed file.
+mode=0755
 
-oIFS=$IFS
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo &quot;$dstdir&quot; | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS=$oIFS
+# Desired mode of newly created intermediate directories.
+# It is empty if not known yet.
+intermediate_mode=
 
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-	pathcomp=$pathcomp$1
+chmodcmd=$chmodprog
+chowncmd=
+chgrpcmd=
+stripcmd=
+rmcmd=&quot;$rmprog -f&quot;
+mvcmd=&quot;$mvprog&quot;
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage=&quot;Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c         (ignored)
+-d         create directories instead of installing files.
+-g GROUP   $chgrpprog installed files to GROUP.
+-m MODE    $chmodprog installed files to MODE.
+-o USER    $chownprog installed files to USER.
+-s         $stripprog installed files.
+-t DIRECTORY  install into DIRECTORY.
+-T         report an error if DSTFILE is a directory.
+--help     display this help and exit.
+--version  display version info and exit.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+&quot;
+
+while test -n &quot;$1&quot;; do
+  case $1 in
+    -c) shift
+        continue;;
+
+    -d) dir_arg=true
+        shift
+        continue;;
+
+    -g) chgrpcmd=&quot;$chgrpprog $2&quot;
+        shift
+        shift
+        continue;;
+
+    --help) echo &quot;$usage&quot;; exit $?;;
+
+    -m) mode=$2
+        shift
+        shift
+        continue;;
+
+    -o) chowncmd=&quot;$chownprog $2&quot;
+        shift
+        shift
+        continue;;
+
+    -s) stripcmd=$stripprog
+        shift
+        continue;;
+
+    -t) dstarg=$2
 	shift
+	shift
+	continue;;
 
-	if [ ! -d &quot;$pathcomp&quot; ] ;
-        then
-		$mkdirprog &quot;$pathcomp&quot;
-	else
-		:
-	fi
-
-	pathcomp=$pathcomp/
+    -T) no_target_directory=true
+	shift
+	continue;;
+
+    --version) echo &quot;$0 $scriptversion&quot;; exit $?;;
+
+    *)  # When -d is used, all remaining arguments are directories to create.
+	# When -t is used, the destination is already specified.
+	test -n &quot;$dir_arg$dstarg&quot; &amp;&amp; break
+        # Otherwise, the last argument is the destination.  Remove it from $@.
+	for arg
+	do
+          if test -n &quot;$dstarg&quot;; then
+	    # $@ is not empty: it contains at least $arg.
+	    set fnord &quot;$@&quot; &quot;$dstarg&quot;
+	    shift # fnord
+	  fi
+	  shift # arg
+	  dstarg=$arg
+	done
+	break;;
+  esac
 done
-fi
-
-if [ x&quot;$dir_arg&quot; != x ]
-then
-	$doit $instcmd &quot;$dst&quot; &amp;&amp;
-
-	if [ x&quot;$chowncmd&quot; != x ]; then $doit $chowncmd &quot;$dst&quot;; else : ; fi &amp;&amp;
-	if [ x&quot;$chgrpcmd&quot; != x ]; then $doit $chgrpcmd &quot;$dst&quot;; else : ; fi &amp;&amp;
-	if [ x&quot;$stripcmd&quot; != x ]; then $doit $stripcmd &quot;$dst&quot;; else : ; fi &amp;&amp;
-	if [ x&quot;$chmodcmd&quot; != x ]; then $doit $chmodcmd &quot;$dst&quot;; else : ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
 
-	if [ x&quot;$transformarg&quot; = x ]
-	then
-		dstfile=`basename &quot;$dst&quot;`
-	else
-		dstfile=`basename &quot;$dst&quot; $transformbasename |
-			sed $transformarg`$transformbasename
-	fi
+if test -z &quot;$1&quot;; then
+  if test -z &quot;$dir_arg&quot;; then
+    echo &quot;$0: no input file specified.&quot; &gt;&amp;2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
 
-# don't allow the sed command to completely eliminate the filename
+test -n &quot;$dir_arg&quot; || trap '(exit $?); exit' 1 2 13 15
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src ;;
+  esac
+
+  if test -n &quot;$dir_arg&quot;; then
+    dst=$src
+    dstdir=$dst
+    test -d &quot;$dstdir&quot;
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the &quot;$cpprog $src $dsttmp&quot; command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f &quot;$src&quot; &amp;&amp; test ! -d &quot;$src&quot;; then
+      echo &quot;$0: $src does not exist.&quot; &gt;&amp;2
+      exit 1
+    fi
+
+    if test -z &quot;$dstarg&quot;; then
+      echo &quot;$0: no destination specified.&quot; &gt;&amp;2
+      exit 1
+    fi
+
+    dst=$dstarg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst ;;
+    esac
 
-	if [ x&quot;$dstfile&quot; = x ]
-	then
-		dstfile=`basename &quot;$dst&quot;`
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d &quot;$dst&quot;; then
+      if test -n &quot;$no_target_directory&quot;; then
+	echo &quot;$0: $dstarg: Is a directory&quot; &gt;&amp;2
+	exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename &quot;$src&quot;`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+	(dirname &quot;$dst&quot;) 2&gt;/dev/null ||
+	expr X&quot;$dst&quot; : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	     X&quot;$dst&quot; : 'X\(//\)[^/]' \| \
+	     X&quot;$dst&quot; : 'X\(//\)$' \| \
+	     X&quot;$dst&quot; : 'X\(/\)' \| \
+	     .       : '\(.\)' 2&gt;/dev/null ||
+	echo X&quot;$dst&quot; |
+	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+		  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+		  /^X\(\/\/\)$/{ s//\1/; q; }
+		  /^X\(\/\).*/{ s//\1/; q; }
+		  s/.*/./; q'
+      `
+
+      test -d &quot;$dstdir&quot;
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+	posix_mkdir=false
+	if $mkdirprog -m $test_mode -p -- / &gt;/dev/null 2&gt;&amp;1; then
+	  posix_mkdir=true
 	else
-		:
-	fi
-
-# Make a couple of temp file names in the proper directory.
-
-	dsttmp=$dstdir/#inst.$$#
-	rmtmp=$dstdir/#rm.$$#
-
-# Trap to clean up temp files at exit.
-
-	trap 'status=$?; rm -f &quot;$dsttmp&quot; &quot;$rmtmp&quot; &amp;&amp; exit $status' 0
-	trap '(exit $?); exit' 1 2 13 15
-
-# Move or copy the file name to the temp name
-
-	$doit $instcmd &quot;$src&quot; &quot;$dsttmp&quot; &amp;&amp;
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above &quot;$doit $instcmd $src $dsttmp&quot; command.
+	  # Remove any dirs left behind by ancient mkdir implementations.
+	  rmdir ./-m &quot;$test_mode&quot; ./-p ./-- 2&gt;/dev/null
+	fi ;;
+    esac
 
-	if [ x&quot;$chowncmd&quot; != x ]; then $doit $chowncmd &quot;$dsttmp&quot;; else :;fi &amp;&amp;
-	if [ x&quot;$chgrpcmd&quot; != x ]; then $doit $chgrpcmd &quot;$dsttmp&quot;; else :;fi &amp;&amp;
-	if [ x&quot;$stripcmd&quot; != x ]; then $doit $stripcmd &quot;$dsttmp&quot;; else :;fi &amp;&amp;
-	if [ x&quot;$chmodcmd&quot; != x ]; then $doit $chmodcmd &quot;$dsttmp&quot;; else :;fi &amp;&amp;
+    if
+      $posix_mkdir &amp;&amp; {
 
-# Now remove or move aside any old file at destination location.  We try this
-# two ways since rm can't unlink itself on some systems and the destination
-# file might be busy for other reasons.  In this case, the final cleanup
-# might fail but the new file should still install successfully.
+	# With -d, create the new directory with the user-specified mode.
+	# Otherwise, create it using the same intermediate mode that
+	# mkdir -p would use when creating intermediate directories.
+	# POSIX says that this mode is &quot;$(umask -S),u+wx&quot;, so use that
+	# if umask -S works.
 
-{
-	if [ -f &quot;$dstdir/$dstfile&quot; ]
-	then
-		$doit $rmcmd -f &quot;$dstdir/$dstfile&quot; 2&gt;/dev/null ||
-		$doit $mvcmd -f &quot;$dstdir/$dstfile&quot; &quot;$rmtmp&quot; 2&gt;/dev/null ||
-		{
-		  echo &quot;$0: cannot unlink or rename $dstdir/$dstfile&quot; &gt;&amp;2
-		  (exit 1); exit
-		}
+	if test -n &quot;$dir_arg&quot;; then
+	  mkdir_mode=$mode
 	else
-		:
+	  case $intermediate_mode in
+	    '')
+	      if umask_S=`(umask -S) 2&gt;/dev/null`; then
+		intermediate_mode=$umask_S,u+wx
+	      else
+		intermediate_mode=$test_mode
+	      fi ;;
+	  esac
+	  mkdir_mode=$intermediate_mode
 	fi
-} &amp;&amp;
-
-# Now rename the file to the real destination.
-
-	$doit $mvcmd &quot;$dsttmp&quot; &quot;$dstdir/$dstfile&quot;
 
-fi &amp;&amp;
-
-# The final little trick to &quot;correctly&quot; pass the exit status to the exit trap.
+	$mkdirprog -m &quot;$mkdir_mode&quot; -p -- &quot;$dstdir&quot;
+      }
+    then :
+    else
+
+      # mkdir does not conform to POSIX, or it failed possibly due to
+      # a race condition.  Create the directory the slow way, step by
+      # step, checking for races as we go.
+
+      case $dstdir in
+	/*) pathcomp=/ ;;
+	-*) pathcomp=./ ;;
+	*)  pathcomp= ;;
+      esac
+
+      case $posix_glob in
+        '')
+	  if (set -f) 2&gt;/dev/null; then
+	    posix_glob=true
+	  else
+	    posix_glob=false
+	  fi ;;
+      esac
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob &amp;&amp; set -f
+      set fnord $dstdir
+      shift
+      $posix_glob &amp;&amp; set +f
+      IFS=$oIFS
+
+      for d
+      do
+	test &quot;x$d&quot; = x &amp;&amp; continue
+
+	pathcomp=$pathcomp$d
+	if test ! -d &quot;$pathcomp&quot;; then
+	  $mkdirprog &quot;$pathcomp&quot;
+	  # Don't fail if two instances are running concurrently.
+	  test -d &quot;$pathcomp&quot; || exit 1
+	fi
+	pathcomp=$pathcomp/
+      done
+      obsolete_mkdir_used=true
+    fi
+  fi
+
+  if test -n &quot;$dir_arg&quot;; then
+    { test -z &quot;$chowncmd&quot; || $doit $chowncmd &quot;$dst&quot;; } &amp;&amp;
+    { test -z &quot;$chgrpcmd&quot; || $doit $chgrpcmd &quot;$dst&quot;; } &amp;&amp;
+    { test &quot;$obsolete_mkdir_used$chowncmd$chgrpcmd&quot; = false ||
+      test -z &quot;$chmodcmd&quot; || $doit $chmodcmd &quot;$mode&quot; &quot;$dst&quot;; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f &quot;$dsttmp&quot; &quot;$rmtmp&quot; &amp;&amp; exit $ret' 0
+
+    # Copy the file name to the temp name.
+    $doit $cpprog &quot;$src&quot; &quot;$dsttmp&quot; &amp;&amp;
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above &quot;$doit $cpprog $src $dsttmp&quot; command.
+    #
+    { test -z &quot;$chowncmd&quot; || $doit $chowncmd &quot;$dsttmp&quot;; } \
+      &amp;&amp; { test -z &quot;$chgrpcmd&quot; || $doit $chgrpcmd &quot;$dsttmp&quot;; } \
+      &amp;&amp; { test -z &quot;$stripcmd&quot; || $doit $stripcmd &quot;$dsttmp&quot;; } \
+      &amp;&amp; { test -z &quot;$chmodcmd&quot; || $doit $chmodcmd &quot;$mode&quot; &quot;$dsttmp&quot;; } &amp;&amp;
+
+    # Now rename the file to the real destination.
+    { $doit $mvcmd -f &quot;$dsttmp&quot; &quot;$dst&quot; 2&gt;/dev/null \
+      || {
+	   # The rename failed, perhaps because mv can't rename something else
+	   # to itself, or perhaps because mv is so ancient that it does not
+	   # support -f.
+
+	   # Now remove or move aside any old file at destination location.
+	   # We try this two ways since rm can't unlink itself on some
+	   # systems and the destination file might be busy for other
+	   # reasons.  In this case, the final cleanup might fail but the new
+	   # file should still install successfully.
+	   {
+	     if test -f &quot;$dst&quot;; then
+	       $doit $rmcmd -f &quot;$dst&quot; 2&gt;/dev/null \
+	       || { $doit $mvcmd -f &quot;$dst&quot; &quot;$rmtmp&quot; 2&gt;/dev/null \
+		     &amp;&amp; { $doit $rmcmd -f &quot;$rmtmp&quot; 2&gt;/dev/null; :; }; }\
+	       || {
+		 echo &quot;$0: cannot unlink or rename $dst&quot; &gt;&amp;2
+		 (exit 1); exit 1
+	       }
+	     else
+	       :
+	     fi
+	   } &amp;&amp;
+
+	   # Now rename the file to the real destination.
+	   $doit $mvcmd &quot;$dsttmp&quot; &quot;$dst&quot;
+	 }
+    } || exit 1
+
+    trap '' 0
+  fi
+done
 
-{
-	(exit 0); exit
-}
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: &quot;scriptversion=&quot;
+# time-stamp-format: &quot;%:y-%02m-%02d.%02H&quot;
+# time-stamp-end: &quot;$&quot;
+# End:</diff>
      <filename>admin/install-sh</filename>
    </modified>
    <modified>
      <diff>@@ -15,7 +15,7 @@
 ##
 ## You should have received a copy of the GNU General Public License
 ## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 ##
 ## As a special exception to the GNU General Public License, if you
 ## distribute this file as part of a program that contains a
@@ -1273,7 +1273,7 @@ freebsd1*)
   dynamic_linker=no
   ;;
 
-freebsd*-gnu*)
+kfreebsd*-gnu*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -1424,7 +1424,7 @@ linux*)
   libsuff=
   if test &quot;x$LINUX_64_MODE&quot; = x64; then
     # Some platforms are per default 64-bit, so there's no /lib64
-    if test -d /lib64; then
+    if test -d /lib64 -a ! -h /lib64; then
       libsuff=64
     fi
   fi
@@ -2119,7 +2119,7 @@ darwin* | rhapsody*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-freebsd*)
+freebsd* | kfreebsd*-gnu)
   if echo __ELF__ | $CC -E - | grep __ELF__ &gt; /dev/null; then
     case $host_cpu in
     i*86 )
@@ -2560,18 +2560,29 @@ aix4*)
     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
     case &quot;$host_os&quot; in
     rhapsody* | darwin1.[[012]])
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
       ;;
     *) # Darwin 1.3 on
-      test -z ${LD_TWOLEVEL_NAMESPACE} &amp;&amp; _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+      else
+	case ${MACOSX_DEPLOYMENT_TARGET} in
+	  10.[012])
+	    _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+	    ;;
+	  10.*)
+	    _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
+	    ;;
+	esac
+      fi
       ;;
     esac
     output_verbose_link_cmd='echo'
-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
-    _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
+    _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
     # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e &quot;s,#.*,,&quot; -e &quot;s,^[    ]*,,&quot; -e &quot;s,^\(..*\),_&amp;,&quot; &lt; $export_symbols &gt; $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e &quot;s,#.*,,&quot; -e &quot;s,^[    ]*,,&quot; -e &quot;s,^\(..*\),_&amp;,&quot; &lt; $export_symbols &gt; $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e &quot;s,#.*,,&quot; -e &quot;s,^[    ]*,,&quot; -e &quot;s,^\(..*\),_&amp;,&quot; &lt; $export_symbols &gt; $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag  -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e &quot;s,#.*,,&quot; -e &quot;s,^[    ]*,,&quot; -e &quot;s,^\(..*\),_&amp;,&quot; &lt; $export_symbols &gt; $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     _LT_AC_TAGVAR(hardcode_direct, $1)=no
     _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@ -2688,8 +2699,8 @@ if test &quot;$GXX&quot; = yes; then
   # Check if GNU C++ uses GNU ld as the underlying linker, since the
   # archiving commands below assume that GNU ld is being used.
   if test &quot;$with_gnu_ld&quot; = yes; then
-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
@@ -2715,7 +2726,7 @@ if test &quot;$GXX&quot; = yes; then
     # linker, instead of GNU ld.  If possible, this setting should
     # overridden to take advantage of the native linker features on
     # the platform it is being used on.
-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $lib'
   fi
 
   # Commands to make compiler produce verbose output that lists
@@ -2809,13 +2820,13 @@ case $host_os in
       _LT_AC_SYS_LIBPATH_AIX
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'&quot;$aix_libpath&quot;
 
-      _LT_AC_TAGVAR(archive_cmds, $1)=&quot;\$CC&quot;' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test &quot;x${allow_undefined_flag}&quot; != &quot;x&quot;; then echo &quot;${wl}${allow_undefined_flag}&quot;; else :; fi` '&quot; $shared_flag&quot;
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)=&quot;\$CC&quot;' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test &quot;x${allow_undefined_flag}&quot; != &quot;x&quot;; then echo &quot;${wl}${allow_undefined_flag}&quot;; else :; fi` '&quot;\${wl}$exp_sym_flag:\$export_symbols $shared_flag&quot;
+      _LT_AC_TAGVAR(archive_cmds, $1)=&quot;\$CC&quot;' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test &quot;x${allow_undefined_flag}&quot; != &quot;x&quot;; then echo &quot;${wl}${allow_undefined_flag}&quot;; else :; fi` '&quot; $shared_flag&quot;
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)=&quot;\$CC&quot;' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test &quot;x${allow_undefined_flag}&quot; != &quot;x&quot;; then echo &quot;${wl}${allow_undefined_flag}&quot;; else :; fi` '&quot;\${wl}$exp_sym_flag:\$export_symbols $shared_flag&quot;
      else
       if test &quot;$host_cpu&quot; = ia64; then
 	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 	_LT_AC_TAGVAR(allow_undefined_flag, $1)=&quot;-z nodefs&quot;
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)=&quot;\$CC $shared_flag&quot;' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '&quot;\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols&quot;
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)=&quot;\$CC $shared_flag&quot;' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '&quot;\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols&quot;
       else
 	# Determine the default libpath from the value encoded in an empty executable.
 	_LT_AC_SYS_LIBPATH_AIX
@@ -2830,7 +2841,7 @@ case $host_os in
 	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 	# This is similar to how AIX traditionally builds it's shared libraries.
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)=&quot;\$CC $shared_flag&quot;' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)=&quot;\$CC $shared_flag&quot;' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
       fi
     fi
     ;;
@@ -2852,7 +2863,7 @@ case $host_os in
     _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
     if $LD --help 2&gt;&amp;1 | grep 'auto-import' &gt; /dev/null; then
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
       # If the export-symbols file already is a .def file (1st line
       # is EXPORTS), use it as is; otherwise, prepend...
       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test &quot;x`$SED 1q $export_symbols`&quot; = xEXPORTS; then
@@ -2861,7 +2872,7 @@ case $host_os in
 	echo EXPORTS &gt; $output_objdir/$soname.def;
 	cat $export_symbols &gt;&gt; $output_objdir/$soname.def;
       fi~
-      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+      $CC -shared -nostdlib $output_objdir/$soname.def $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
     else
       _LT_AC_TAGVAR(ld_shlibs, $1)=no
     fi
@@ -2872,10 +2883,21 @@ case $host_os in
     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
     case &quot;$host_os&quot; in
     rhapsody* | darwin1.[[012]])
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
       ;;
     *) # Darwin 1.3 on
-      test -z ${LD_TWOLEVEL_NAMESPACE} &amp;&amp; _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+      else
+	case ${MACOSX_DEPLOYMENT_TARGET} in
+	  10.[012])
+	    _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+	    ;;
+	  10.*)
+	    _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
+	    ;;
+	esac
+      fi
       ;;
     esac
     lt_int_apple_cc_single_mod=no
@@ -2884,19 +2906,19 @@ case $host_os in
       lt_int_apple_cc_single_mod=yes
     fi
     if test &quot;X$lt_int_apple_cc_single_mod&quot; = Xyes ; then
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
     else
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
     fi
-    _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+    _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
 
     # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
     if test &quot;X$lt_int_apple_cc_single_mod&quot; = Xyes ; then
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e &quot;s,#.*,,&quot; -e &quot;s,^[    ]*,,&quot; -e &quot;s,^\(..*\),_&amp;,&quot; &lt; $export_symbols &gt; $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e &quot;s,#.*,,&quot; -e &quot;s,^[    ]*,,&quot; -e &quot;s,^\(..*\),_&amp;,&quot; &lt; $export_symbols &gt; $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     else
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e &quot;s,#.*,,&quot; -e &quot;s,^[    ]*,,&quot; -e &quot;s,^\(..*\),_&amp;,&quot; &lt; $export_symbols &gt; $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e &quot;s,#.*,,&quot; -e &quot;s,^[    ]*,,&quot; -e &quot;s,^\(..*\),_&amp;,&quot; &lt; $export_symbols &gt; $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     fi
-    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e &quot;s,#.*,,&quot; -e &quot;s,^[    ]*,,&quot; -e &quot;s,^\(..*\),_&amp;,&quot; &lt; $export_symbols &gt; $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e &quot;s,#.*,,&quot; -e &quot;s,^[    ]*,,&quot; -e &quot;s,^\(..*\),_&amp;,&quot; &lt; $export_symbols &gt; $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     _LT_AC_TAGVAR(hardcode_direct, $1)=no
     _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@ -2931,7 +2953,7 @@ case $host_os in
   freebsd-elf*)
     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
     ;;
-  freebsd*)
+  freebsd* | kfreebsd*-gnu)
     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
     # conventions
     _LT_AC_TAGVAR(ld_shlibs, $1)=yes
@@ -2953,7 +2975,7 @@ case $host_os in
       _LT_AC_TAGVAR(ld_shlibs, $1)=no
       ;;
     aCC)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
       # Commands to make compiler produce verbose output that lists
       # what &quot;hidden&quot; libraries, object files and flags are used when
       # linking a shared library.
@@ -2966,7 +2988,7 @@ case $host_os in
       ;;
     *)
       if test &quot;$GXX&quot; = yes; then
-        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
       else
         # FIXME: insert proper C++ library support
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
@@ -3023,7 +3045,7 @@ case $host_os in
 	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 	  ;;
 	*)
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
 	  ;;
 	esac
 	# Commands to make compiler produce verbose output that lists
@@ -3044,7 +3066,7 @@ case $host_os in
 	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 	      ;;
 	    *)
-	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
 	      ;;
 	    esac
 	  fi
@@ -3059,7 +3081,7 @@ case $host_os in
     case $cc_basename in
       CC)
 	# SGI C++
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n &quot;$verstring&quot; &amp;&amp; echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -soname $soname `test -n &quot;$verstring&quot; &amp;&amp; echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 
 	# Archives containing C++ object files must be created using
 	# &quot;CC -ar&quot;, where &quot;CC&quot; is the IRIX C++ compiler.  This is
@@ -3070,9 +3092,9 @@ case $host_os in
       *)
 	if test &quot;$GXX&quot; = yes; then
 	  if test &quot;$with_gnu_ld&quot; = no; then
-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n &quot;$verstring&quot; &amp;&amp; echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n &quot;$verstring&quot; &amp;&amp; echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 	  else
-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n &quot;$verstring&quot; &amp;&amp; echo ${wl}-set_version ${wl}$verstring` -o $lib'
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n &quot;$verstring&quot; &amp;&amp; echo ${wl}-set_version ${wl}$verstring` -o $lib'
 	  fi
 	fi
 	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
@@ -3089,8 +3111,8 @@ case $host_os in
 	# KCC will only create a shared library if the output file
 	# ends with &quot;.so&quot; (or &quot;.sl&quot; for HP-UX), so rename the library
 	# to its proper name (with version) after linking.
-	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e &quot;s/\${tempext}\..*/.so/&quot;`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e &quot;s/\${tempext}\..*/.so/&quot;`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e &quot;s/\${tempext}\..*/.so/&quot;`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e &quot;s/\${tempext}\..*/.so/&quot;`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
 	# Commands to make compiler produce verbose output that lists
 	# what &quot;hidden&quot; libraries, object files and flags are used when
 	# linking a shared library.
@@ -3112,16 +3134,16 @@ case $host_os in
 	# Intel C++
 	with_gnu_ld=yes
 	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 	;;
       cxx)
 	# Compaq C++
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
 
 	runpath_var=LD_RUN_PATH
 	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -3178,7 +3200,7 @@ case $host_os in
 	# KCC will only create a shared library if the output file
 	# ends with &quot;.so&quot; (or &quot;.sl&quot; for HP-UX), so rename the library
 	# to its proper name (with version) after linking.
-	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e &quot;s/\${tempext}\..*/.so/&quot;`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e &quot;s/\${tempext}\..*/.so/&quot;`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
 
 	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
@@ -3195,7 +3217,7 @@ case $host_os in
 	;;
       cxx)
 	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n &quot;$verstring&quot; &amp;&amp; echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $soname `test -n &quot;$verstring&quot; &amp;&amp; echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 
 	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
@@ -3213,7 +3235,7 @@ case $host_os in
       *)
 	if test &quot;$GXX&quot; = yes &amp;&amp; test &quot;$with_gnu_ld&quot; = no; then
 	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n &quot;$verstring&quot; &amp;&amp; echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n &quot;$verstring&quot; &amp;&amp; echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 
 	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
@@ -3238,7 +3260,7 @@ case $host_os in
 	# KCC will only create a shared library if the output file
 	# ends with &quot;.so&quot; (or &quot;.sl&quot; for HP-UX), so rename the library
 	# to its proper name (with version) after linking.
-	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e &quot;s/\${tempext}\..*/.so/&quot;`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e &quot;s/\${tempext}\..*/.so/&quot;`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
 
 	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
@@ -3254,10 +3276,10 @@ case $host_os in
 	;;
       cxx)
 	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n &quot;$verstring&quot; &amp;&amp; echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname `test -n &quot;$verstring&quot; &amp;&amp; echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf &quot;%s %s\\n&quot; -exported_symbol &quot;\$i&quot; &gt;&gt; $lib.exp; done~
 	  echo &quot;-hidden&quot;&gt;&gt; $lib.exp~
-	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n &quot;$verstring&quot; &amp;&amp; echo -set_version	$verstring` -update_registry $objdir/so_locations -o $lib~
+	  $CC -shared$allow_undefined_flag $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n &quot;$verstring&quot; &amp;&amp; echo -set_version	$verstring` -update_registry $objdir/so_locations -o $lib~
 	  $rm $lib.exp'
 
 	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -3276,7 +3298,7 @@ case $host_os in
       *)
 	if test &quot;$GXX&quot; = yes &amp;&amp; test &quot;$with_gnu_ld&quot; = no; then
 	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n &quot;$verstring&quot; &amp;&amp; echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-msym ${wl}-soname ${wl}$soname `test -n &quot;$verstring&quot; &amp;&amp; echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 
 	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
@@ -3333,9 +3355,9 @@ case $host_os in
       CC)
 	# Sun C++ 4.2, 5.x and Centerline C++
 	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
 	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo &quot;{ global:&quot; &gt; $lib.exp~cat $export_symbols | $SED -e &quot;s/\(.*\)/\1;/&quot; &gt;&gt; $lib.exp~$echo &quot;local: *; };&quot; &gt;&gt; $lib.exp~
-	$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+	$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
 
 	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -3369,7 +3391,7 @@ case $host_os in
 	;;
       gcx)
 	# Green Hills C++ Compiler
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
 
 	# The C++ compiler must be used to create the archive.
 	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
@@ -3379,9 +3401,9 @@ case $host_os in
 	if test &quot;$GXX&quot; = yes &amp;&amp; test &quot;$with_gnu_ld&quot; = no; then
 	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
 	  if $CC --version | grep -v '^2\.7' &gt; /dev/null; then
-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
 	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo &quot;{ global:&quot; &gt; $lib.exp~cat $export_symbols | $SED -e &quot;s/\(.*\)/\1;/&quot; &gt;&gt; $lib.exp~$echo &quot;local: *; };&quot; &gt;&gt; $lib.exp~
-		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
 
 	    # Commands to make compiler produce verbose output that lists
 	    # what &quot;hidden&quot; libraries, object files and flags are used when
@@ -3390,9 +3412,9 @@ case $host_os in
 	  else
 	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
 	    # platform.
-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
 	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo &quot;{ global:&quot; &gt; $lib.exp~cat $export_symbols | $SED -e &quot;s/\(.*\)/\1;/&quot; &gt;&gt; $lib.exp~$echo &quot;local: *; };&quot; &gt;&gt; $lib.exp~
-		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
 
 	    # Commands to make compiler produce verbose output that lists
 	    # what &quot;hidden&quot; libraries, object files and flags are used when
@@ -3920,7 +3942,7 @@ ifelse([$1], [],
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -4577,7 +4599,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
 	    ;;
 	esac
 	;;
-      freebsd*)
+      freebsd* | kfreebsd*-gnu)
 	# FreeBSD uses GNU C++
 	;;
       hpux9* | hpux10* | hpux11*)
@@ -5062,7 +5084,7 @@ EOF
 	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 	# Joseph Beckenbach &lt;jrb3@best.com&gt; says some releases of gcc
 	# support --undefined.  This deserves some investigation.  FIXME
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
       else
 	_LT_AC_TAGVAR(ld_shlibs, $1)=no
       fi
@@ -5078,7 +5100,7 @@ EOF
       _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq &gt; $export_symbols'
 
       if $LD --help 2&gt;&amp;1 | grep 'auto-import' &gt; /dev/null; then
-        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 	# If the export-symbols file already is a .def file (1st line
 	# is EXPORTS), use it as is; otherwise, prepend...
 	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test &quot;x`$SED 1q $export_symbols`&quot; = xEXPORTS; then
@@ -5087,7 +5109,7 @@ EOF
 	  echo EXPORTS &gt; $output_objdir/$soname.def;
 	  cat $export_symbols &gt;&gt; $output_objdir/$soname.def;
 	fi~
-	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
+	$CC -shared $output_objdir/$soname.def $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
       else
 	ld_shlibs=no
       fi
@@ -5098,8 +5120,8 @@ EOF
 	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
       else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
@@ -5117,8 +5139,8 @@ EOF
 
 EOF
       elif $LD --help 2&gt;&amp;1 | grep ': supported targets:.* elf' &gt; /dev/null; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	_LT_AC_TAGVAR(ld_shlibs, $1)=no
       fi
@@ -5133,8 +5155,8 @@ EOF
 
     *)
       if $LD --help 2&gt;&amp;1 | grep ': supported targets:.* elf' &gt; /dev/null; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	_LT_AC_TAGVAR(ld_shlibs, $1)=no
       fi
@@ -5248,13 +5270,13 @@ EOF
        # Determine the default libpath from the value encoded in an empty executable.
 	_LT_AC_SYS_LIBPATH_AIX
 	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'&quot;$aix_libpath&quot;
-	_LT_AC_TAGVAR(archive_cmds, $1)=&quot;\$CC&quot;' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test &quot;x${allow_undefined_flag}&quot; != &quot;x&quot;; then echo &quot;${wl}${allow_undefined_flag}&quot;; else :; fi` '&quot; $shared_flag&quot;
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)=&quot;\$CC&quot;' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test &quot;x${allow_undefined_flag}&quot; != &quot;x&quot;; then echo &quot;${wl}${allow_undefined_flag}&quot;; else :; fi` '&quot;\${wl}$exp_sym_flag:\$export_symbols $shared_flag&quot;
+	_LT_AC_TAGVAR(archive_cmds, $1)=&quot;\$CC&quot;' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test &quot;x${allow_undefined_flag}&quot; != &quot;x&quot;; then echo &quot;${wl}${allow_undefined_flag}&quot;; else :; fi` '&quot; $shared_flag&quot;
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)=&quot;\$CC&quot;' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test &quot;x${allow_undefined_flag}&quot; != &quot;x&quot;; then echo &quot;${wl}${allow_undefined_flag}&quot;; else :; fi` '&quot;\${wl}$exp_sym_flag:\$export_symbols $shared_flag&quot;
        else
 	if test &quot;$host_cpu&quot; = ia64; then
 	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=&quot;-z nodefs&quot;
-	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=&quot;\$CC $shared_flag&quot;' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '&quot;\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols&quot;
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=&quot;\$CC $shared_flag&quot;' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '&quot;\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols&quot;
 	else
 	 # Determine the default libpath from the value encoded in an empty executable.
 	 _LT_AC_SYS_LIBPATH_AIX
@@ -5269,7 +5291,7 @@ EOF
 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 	  # This is similar to how AIX traditionally builds it's shared libraries.
-	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=&quot;\$CC $shared_flag&quot;' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=&quot;\$CC $shared_flag&quot;' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 	fi
       fi
       ;;
@@ -5298,7 +5320,7 @@ EOF
       # Tell ltmain to make .dll files, not .so files.
       shrext=&quot;.dll&quot;
       # FIXME: Setting linknames here is a bad hack.
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo &quot;$deplibs&quot; | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $compiler_flags $libobjs `echo &quot;$deplibs&quot; | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
       # The linker will automatically build a .lib file if we build a DLL.
       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
       # FIXME: Should let the user specify the lib program.
@@ -5312,10 +5334,21 @@ EOF
       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
       case &quot;$host_os&quot; in
       rhapsody* | darwin1.[[012]])
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
 	;;
       *) # Darwin 1.3 on
-	test -z ${LD_TWOLEVEL_NAMESPACE} &amp;&amp; _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+	if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+	else
+	  case ${MACOSX_DEPLOYMENT_TARGET} in
+	    10.[012])
+	      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+	      ;;
+	    10.*)
+	      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
+	      ;;
+	  esac
+	fi
 	;;
       esac
     	lt_int_apple_cc_single_mod=no
@@ -5324,18 +5357,18 @@ EOF
     	  lt_int_apple_cc_single_mod=yes
     	fi
     	if test &quot;X$lt_int_apple_cc_single_mod&quot; = Xyes ; then
-    	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+    	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
     	else
-        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
       fi
-      _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
         if test &quot;X$lt_int_apple_cc_single_mod&quot; = Xyes ; then
-          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e &quot;s,#.*,,&quot; -e &quot;s,^[    ]*,,&quot; -e &quot;s,^\(..*\),_&amp;,&quot; &lt; $export_symbols &gt; $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e &quot;s,#.*,,&quot; -e &quot;s,^[    ]*,,&quot; -e &quot;s,^\(..*\),_&amp;,&quot; &lt; $export_symbols &gt; $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         else
-          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e &quot;s,#.*,,&quot; -e &quot;s,^[    ]*,,&quot; -e &quot;s,^\(..*\),_&amp;,&quot; &lt; $export_symbols &gt; $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e &quot;s,#.*,,&quot; -e &quot;s,^[    ]*,,&quot; -e &quot;s,^\(..*\),_&amp;,&quot; &lt; $export_symbols &gt; $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         fi
-          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e &quot;s,#.*,,&quot; -e &quot;s,^[    ]*,,&quot; -e &quot;s,^\(..*\),_&amp;,&quot; &lt; $export_symbols &gt; $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e &quot;s,#.*,,&quot; -e &quot;s,^[    ]*,,&quot; -e &quot;s,^\(..*\),_&amp;,&quot; &lt; $export_symbols &gt; $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       _LT_AC_TAGVAR(hardcode_direct, $1)=no
       _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@ -5376,8 +5409,8 @@ EOF
       ;;
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+    freebsd* | kfreebsd*-gnu)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $compiler_flags $libobjs $deplibs'
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -5385,7 +5418,7 @@ EOF
 
     hpux9*)
       if test &quot;$GCC&quot; = yes; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $libobjs $deplibs~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
       else
 	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
       fi
@@ -5403,10 +5436,10 @@ EOF
       if test &quot;$GCC&quot; = yes -a &quot;$with_gnu_ld&quot; = no; then
 	case &quot;$host_cpu&quot; in
 	hppa*64*|ia64*)
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
 	  ;;
 	*)
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $libobjs $deplibs'
 	  ;;
 	esac
       else
@@ -5453,7 +5486,7 @@ EOF
 
     irix5* | irix6* | nonstopux*)
       if test &quot;$GCC&quot; = yes; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n &quot;$verstring&quot; &amp;&amp; echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n &quot;$verstring&quot; &amp;&amp; echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
       else
 	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n &quot;$verstring&quot; &amp;&amp; echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
@@ -5486,7 +5519,7 @@ EOF
       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
       if test -z &quot;`echo __ELF__ | $CC -E - | grep __ELF__`&quot; || test &quot;$host_os-$host_cpu&quot; = &quot;openbsd2.8-powerpc&quot;; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
 	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
       else
@@ -5496,7 +5529,7 @@ EOF
 	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 	   ;;
 	 *)
-	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
 	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 	   ;;
        esac
@@ -5507,14 +5540,14 @@ EOF
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_AC_TAGVAR(archive_cmds, $1)='$echo &quot;LIBRARY $libname INITINSTANCE&quot; &gt; $output_objdir/$libname.def~$echo &quot;DESCRIPTION \&quot;$libname\&quot;&quot; &gt;&gt; $output_objdir/$libname.def~$echo DATA &gt;&gt; $output_objdir/$libname.def~$echo &quot; SINGLE NONSHARED&quot; &gt;&gt; $output_objdir/$libname.def~$echo EXPORTS &gt;&gt; $output_objdir/$libname.def~emxexp $libobjs &gt;&gt; $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      _LT_AC_TAGVAR(archive_cmds, $1)='$echo &quot;LIBRARY $libname INITINSTANCE&quot; &gt; $output_objdir/$libname.def~$echo &quot;DESCRIPTION \&quot;$libname\&quot;&quot; &gt;&gt; $output_objdir/$libname.def~$echo DATA &gt;&gt; $output_objdir/$libname.def~$echo &quot; SINGLE NONSHARED&quot; &gt;&gt; $output_objdir/$libname.def~$echo EXPORTS &gt;&gt; $output_objdir/$libname.def~emxexp $libobjs &gt;&gt; $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $compiler_flags $libobjs $deplibs$output_objdir/$libname.def'
       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
       ;;
 
     osf3*)
       if test &quot;$GCC&quot; = yes; then
 	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n &quot;$verstring&quot; &amp;&amp; echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n &quot;$verstring&quot; &amp;&amp; echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
       else
 	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n &quot;$verstring&quot; &amp;&amp; echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
@@ -5526,7 +5559,7 @@ EOF
     osf4* | osf5*)	# as osf3* with the addition of -msym flag
       if test &quot;$GCC&quot; = yes; then
 	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n &quot;$verstring&quot; &amp;&amp; echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-msym ${wl}-soname ${wl}$soname `test -n &quot;$verstring&quot; &amp;&amp; echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
       else
 	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
@@ -5551,9 +5584,9 @@ EOF
     solaris*)
       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
       if test &quot;$GCC&quot; = yes; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
 	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo &quot;{ global:&quot; &gt; $lib.exp~cat $export_symbols | $SED -e &quot;s/\(.*\)/\1;/&quot; &gt;&gt; $lib.exp~$echo &quot;local: *; };&quot; &gt;&gt; $lib.exp~
-	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs~$rm $lib.exp'
       else
 	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo &quot;{ global:&quot; &gt; $lib.exp~cat $export_symbols | $SED -e &quot;s/\(.*\)/\1;/&quot; &gt;&gt; $lib.exp~$echo &quot;local: *; };&quot; &gt;&gt; $lib.exp~
@@ -5573,7 +5606,7 @@ EOF
       if test &quot;x$host_vendor&quot; = xsequent; then
 	# Use $CC to link under sequent, because it throws in some extra .o
 	# files that make .init and .fini sections work.
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $compiler_flags $libobjs $deplibs'
       else
 	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
       fi
@@ -5633,9 +5666,9 @@ EOF
    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
       _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
       if test &quot;$GCC&quot; = yes; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
       else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
       fi
       runpath_var='LD_RUN_PATH'
       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no</diff>
      <filename>admin/libtool.m4.in</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,7 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -1149,6 +1149,19 @@ EOF
 	  finalize_command=&quot;$finalize_command $qarg&quot;
 	  continue
 	  ;;
+	framework)
+	  case $host in
+	    *-*-darwin*)
+	      case &quot;$deplibs &quot; in
+	        *&quot; $qarg.ltframework &quot;*) ;;
+		*) deplibs=&quot;$deplibs $qarg.ltframework&quot; # this is fixed later
+		   ;;
+              esac
+              ;;
+   	  esac
+	  prev=
+	  continue
+	  ;;
 	*)
 	  eval &quot;$prev=\&quot;\$arg\&quot;&quot;
 	  prev=
@@ -1263,9 +1276,6 @@ EOF
 	    # These systems don't actually have a C or math library (as such)
 	    continue
 	    ;;
-	  *-*-freebsd*-gnu*)
-	    # prevent being parsed by the freebsd regexp below
-	    ;;
 	  *-*-mingw* | *-*-os2*)
 	    # These systems don't actually have a C library (as such)
 	    test &quot;X$arg&quot; = &quot;X-lc&quot; &amp;&amp; continue
@@ -1276,14 +1286,11 @@ EOF
 	    ;;
 	  *-*-rhapsody* | *-*-darwin1.[012])
 	    # Rhapsody C and math libraries are in the System framework
-	    deplibs=&quot;$deplibs -framework System&quot;
+	    deplibs=&quot;$deplibs System.ltframework&quot;
 	    continue
 	  esac
 	elif test &quot;X$arg&quot; = &quot;X-lc_r&quot;; then
 	 case $host in
-	 *-*-freebsd*-gnu*)
-	   # prevent being parsed by the freebsd regexp below
-	   ;;
 	 *-*-openbsd*)
 	   # Do not include libc_r directly, use -pthread flag.
 	   continue
@@ -1466,6 +1473,11 @@ EOF
 	continue
 	;;
 
+      -framework)
+        prev=framework
+	continue
+	;;
+
       # Some other compiler flag.
       -* | +*)
 	# Unknown arguments in both finalize_command and compile_command need
@@ -1883,6 +1895,18 @@ EOF
 	    fi
 	  fi
 	  ;; # -l
+	*.ltframework)
+	  if test &quot;$linkmode,$pass&quot; = &quot;prog,link&quot;; then
+	    compile_deplibs=&quot;$deplib $compile_deplibs&quot;
+	    finalize_deplibs=&quot;$deplib $finalize_deplibs&quot;
+	  else
+	    deplibs=&quot;$deplib $deplibs&quot;
+	    if test &quot;$linkmode&quot; = lib ; then
+	      newdependency_libs=&quot;$deplib $newdependency_libs&quot;
+	    fi
+	  fi
+	  continue
+	  ;;
 	-L*)
 	  case $linkmode in
 	  lib)
@@ -2011,6 +2035,13 @@ EOF
 	*) . ./$lib ;;
 	esac
 
+	case $host in
+	*-*-darwin*)
+	  # Convert &quot;-framework foo&quot; to &quot;foo.ltframework&quot; in dependency_libs
+	  test -n &quot;$dependency_libs&quot; &amp;&amp; dependency_libs=`$echo &quot;X$dependency_libs&quot; | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
+	  ;;
+	esac
+
 	if test &quot;$linkmode,$pass&quot; = &quot;lib,link&quot; ||
 	   test &quot;$linkmode,$pass&quot; = &quot;prog,scan&quot; ||
 	   { test &quot;$linkmode&quot; != prog &amp;&amp; test &quot;$linkmode&quot; != lib; }; then
@@ -2617,6 +2648,15 @@ EOF
 		*) continue ;;
 		esac  		  
 		;;
+
+	      *.ltframework)
+		case $host in
+		  *-*-darwin*)
+		    depdepl=&quot;$deplib&quot;
+		    ;;
+		esac
+		;;
+
 	      *) continue ;;
 	      esac
 	      case &quot; $deplibs &quot; in
@@ -3058,7 +3098,7 @@ EOF
 	tempremovelist=`$echo &quot;$output_objdir/*&quot;`
 	for p in $tempremovelist; do
 	  case $p in
-	    *.$objext)
+	    *.$objext | *$exeext)
 	       ;;
 	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
 	       removelist=&quot;$removelist $p&quot;
@@ -3130,17 +3170,11 @@ EOF
 	    ;;
 	  *-*-rhapsody* | *-*-darwin1.[012])
 	    # Rhapsody C library is in the System framework
-	    deplibs=&quot;$deplibs -framework System&quot;
+	    deplibs=&quot;$deplibs System.ltframework&quot;
 	    ;;
 	  *-*-netbsd*)
 	    # Don't link with libc until the a.out ld.so is fixed.
 	    ;;
-	  *-*-freebsd*-gnu*)
-	    # Prevent $arg from being parsed by the freebsd regexp below.
-	    if test &quot;$build_libtool_need_lc&quot; = &quot;yes&quot;; then
-	      deplibs=&quot;$deplibs -lc&quot;
-	    fi
-	    ;;
 	  *-*-openbsd* | *-*-freebsd*)
 	    # Do not include libc due to us having libc/libc_r.
 	    test &quot;X$arg&quot; = &quot;X-lc&quot; &amp;&amp; continue
@@ -3429,7 +3463,7 @@ EOF
 	case $host in
 	*-*-rhapsody* | *-*-darwin1.[012])
 	  # On Rhapsody replace the C library is the System framework
-	  newdeplibs=`$echo &quot;X $newdeplibs&quot; | $Xsed -e 's/ -lc / -framework System /'`
+	  newdeplibs=`$echo &quot;X $newdeplibs&quot; | $Xsed -e 's/ -lc / System.ltframework /'`
 	  ;;
 	esac
 
@@ -3475,6 +3509,13 @@ EOF
 	    fi
 	  fi
 	fi
+	# Time to change all our &quot;foo.ltframework&quot; stuff back to &quot;-framework foo&quot;
+	case $host in
+	  *-*-darwin*)
+	    newdeplibs=`$echo &quot;X $newdeplibs&quot; | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	    dependency_libs=`$echo &quot;X $dependency_libs&quot; | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	    ;;
+	esac
 	# Done checking deplibs!
 	deplibs=$newdeplibs
       fi
@@ -4057,18 +4098,21 @@ EOF
       case $host in
       *-*-rhapsody* | *-*-darwin1.[012])
 	# On Rhapsody replace the C library is the System framework
-	compile_deplibs=`$echo &quot;X $compile_deplibs&quot; | $Xsed -e 's/ -lc / -framework System /'`
-	finalize_deplibs=`$echo &quot;X $finalize_deplibs&quot; | $Xsed -e 's/ -lc / -framework System /'`
+	compile_deplibs=`$echo &quot;X $compile_deplibs&quot; | $Xsed -e 's/ -lc / System.ltframework /'`
+	finalize_deplibs=`$echo &quot;X $finalize_deplibs&quot; | $Xsed -e 's/ -lc / System.ltframework /'`
 	;;
       esac
 
       case $host in
-      *darwin*)
+      *-*-darwin*)
         # Don't allow lazy linking, it breaks C++ global constructors
         if test &quot;$tagname&quot; = CXX ; then
         compile_command=&quot;$compile_command ${wl}-bind_at_load&quot;
         finalize_command=&quot;$finalize_command ${wl}-bind_at_load&quot;
         fi
+	# Time to change all our &quot;foo.ltframework&quot; stuff back to &quot;-framework foo&quot;
+	compile_deplibs=`$echo &quot;X $compile_deplibs&quot; | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	finalize_deplibs=`$echo &quot;X $finalize_deplibs&quot; | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
         ;;
       esac
 
@@ -4529,8 +4573,8 @@ static const void *lt_preloaded_setup() {
 	  *) exeext= ;;
 	esac
 	case $host in
-	  *cygwin* | *mingw* )
-	    cwrappersource=`$echo ${objdir}/lt-${output}.c`
+	  *mingw* )
+	    cwrappersource=`$echo ${output_objdir}/lt-${outputname}.c`
 	    cwrapper=`$echo ${output}.exe`
 	    $rm $cwrappersource $cwrapper
 	    trap &quot;$rm $cwrappersource $cwrapper; exit 1&quot; 1 2 15
@@ -4897,8 +4941,10 @@ else
 	  ;;
 
 	*)
+	  # Need to set LD_LIBRARY_PATH, to the value already
+	  # computed within libtool.
 	  $echo &gt;&gt; $output &quot;\
-      exec \$progdir/\$program \${1+\&quot;\$@\&quot;}
+      LD_LIBRARY_PATH=\&quot;$rpath\&quot; exec \$progdir/\$program \${1+\&quot;\$@\&quot;}
 &quot;
 	  ;;
 	esac</diff>
      <filename>admin/ltmain.sh</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,10 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
-# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
+
+scriptversion=2004-09-07.08
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004
+#   Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard &lt;pinard@iro.umontreal.ca&gt;, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -38,18 +42,24 @@ else
   configure_ac=configure.in
 fi
 
+msg=&quot;missing on your system&quot;
+
 case &quot;$1&quot; in
 --run)
   # Try to run requested program, and just exit if it succeeds.
   run=
   shift
   &quot;$@&quot; &amp;&amp; exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg=&quot;probably too old&quot;
+  fi
   ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case &quot;$1&quot; in
 
   -h|--h|--he|--hel|--help)
     echo &quot;\
@@ -74,11 +84,15 @@ Supported PROGRAM values:
   lex          create \`lex.yy.c', if possible, from existing .c
   makeinfo     touch the output file
   tar          try tar, gnutar, gtar, then tar without non-portable flags
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]&quot;
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to &lt;bug-automake@gnu.org&gt;.&quot;
+    exit 0
     ;;
 
   -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
-    echo &quot;missing 0.4 - GNU automake&quot;
+    echo &quot;missing $scriptversion (GNU Automake)&quot;
+    exit 0
     ;;
 
   -*)
@@ -87,14 +101,44 @@ Supported PROGRAM values:
     exit 1
     ;;
 
-  aclocal*)
+esac
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case &quot;$1&quot; in
+  lex|yacc)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar)
+    if test -n &quot;$run&quot;; then
+       echo 1&gt;&amp;2 &quot;ERROR: \`tar' requires --run&quot;
+       exit 1
+    elif test &quot;x$2&quot; = &quot;x--version&quot; || test &quot;x$2&quot; = &quot;x--help&quot;; then
+       exit 1
+    fi
+    ;;
+
+  *)
     if test -z &quot;$run&quot; &amp;&amp; ($1 --version) &gt; /dev/null 2&gt;&amp;1; then
        # We have it, but it failed.
        exit 1
+    elif test &quot;x$2&quot; = &quot;x--version&quot; || test &quot;x$2&quot; = &quot;x--help&quot;; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
     fi
+    ;;
+esac
 
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case &quot;$1&quot; in
+  aclocal*)
     echo 1&gt;&amp;2 &quot;\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
          to install the \`Automake' and \`Perl' packages.  Grab them from
          any GNU archive site.&quot;
@@ -102,13 +146,8 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     ;;
 
   autoconf)
-    if test -z &quot;$run&quot; &amp;&amp; ($1 --version) &gt; /dev/null 2&gt;&amp;1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1&gt;&amp;2 &quot;\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified \`${configure_ac}'.  You might want to install the
          \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
          archive site.&quot;
@@ -116,13 +155,8 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     ;;
 
   autoheader)
-    if test -z &quot;$run&quot; &amp;&amp; ($1 --version) &gt; /dev/null 2&gt;&amp;1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1&gt;&amp;2 &quot;\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified \`acconfig.h' or \`${configure_ac}'.  You might want
          to install the \`Autoconf' and \`GNU m4' packages.  Grab them
          from any GNU archive site.&quot;
@@ -140,13 +174,8 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     ;;
 
   automake*)
-    if test -z &quot;$run&quot; &amp;&amp; ($1 --version) &gt; /dev/null 2&gt;&amp;1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1&gt;&amp;2 &quot;\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
          You might want to install the \`Automake' and \`Perl' packages.
          Grab them from any GNU archive site.&quot;
@@ -156,16 +185,11 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     ;;
 
   autom4te)
-    if test -z &quot;$run&quot; &amp;&amp; ($1 --version) &gt; /dev/null 2&gt;&amp;1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1&gt;&amp;2 &quot;\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
-         system.  You might have modified some files without having the
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
          proper tools for further handling them.
-         You can get \`$1Help2man' as part of \`Autoconf' from any GNU
+         You can get \`$1' as part of \`Autoconf' from any GNU
          archive site.&quot;
 
     file=`echo &quot;$*&quot; | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
@@ -185,7 +209,7 @@ WARNING: \`$1' is needed, and you do not seem to have it handy on your
 
   bison|yacc)
     echo 1&gt;&amp;2 &quot;\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' $msg.  You should only need it if
          you modified a \`.y' file.  You may need the \`Bison' package
          in order for those modifications to take effect.  You can get
          \`Bison' from any GNU archive site.&quot;
@@ -215,7 +239,7 @@ WARNING: \`$1' is missing on your system.  You should only need it if
 
   lex|flex)
     echo 1&gt;&amp;2 &quot;\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.l' file.  You may need the \`Flex' package
          in order for those modifications to take effect.  You can get
          \`Flex' from any GNU archive site.&quot;
@@ -237,13 +261,8 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     ;;
 
   help2man)
-    if test -z &quot;$run&quot; &amp;&amp; ($1 --version) &gt; /dev/null 2&gt;&amp;1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1&gt;&amp;2 &quot;\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
 	 you modified a dependency of a manual page.  You may need the
 	 \`Help2man' package in order for those modifications to take
 	 effect.  You can get \`Help2man' from any GNU archive site.&quot;
@@ -262,13 +281,8 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     ;;
 
   makeinfo)
-    if test -z &quot;$run&quot; &amp;&amp; (makeinfo --version) &gt; /dev/null 2&gt;&amp;1; then
-       # We have makeinfo, but it failed.
-       exit 1
-    fi
-
     echo 1&gt;&amp;2 &quot;\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.texi' or \`.texinfo' file, or any other file
          indirectly affecting the aspect of the manual.  The spurious
          call might also be the consequence of using a buggy \`make' (AIX,
@@ -284,10 +298,6 @@ WARNING: \`$1' is missing on your system.  You should only need it if
 
   tar)
     shift
-    if test -n &quot;$run&quot;; then
-      echo 1&gt;&amp;2 &quot;ERROR: \`tar' requires --run&quot;
-      exit 1
-    fi
 
     # We have already tried tar in the generic part.
     # Look for gnutar/gtar before invocation to avoid ugly error
@@ -323,10 +333,10 @@ WARNING: I can't seem to be able to run \`tar' with the given arguments.
 
   *)
     echo 1&gt;&amp;2 &quot;\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
-         system.  You might have modified some files without having the
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
          proper tools for further handling them.  Check the \`README' file,
-         it often tells you about the needed prerequirements for installing
+         it often tells you about the needed prerequisites for installing
          this package.  You may also peek at any GNU archive site, in case
          some other package would contain this missing \`$1' program.&quot;
     exit 1
@@ -334,3 +344,10 @@ WARNING: \`$1' is needed, and you do not seem to have it handy on your
 esac
 
 exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: &quot;scriptversion=&quot;
+# time-stamp-format: &quot;%:y-%02m-%02d.%02H&quot;
+# time-stamp-end: &quot;$&quot;
+# End:</diff>
      <filename>admin/missing</filename>
    </modified>
    <modified>
      <diff>@@ -1,21 +1,33 @@
 #! /bin/sh
 # mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman &lt;friedman@prep.ai.mit.edu&gt;
+
+scriptversion=2005-06-29.22
+
+# Original author: Noah Friedman &lt;friedman@prep.ai.mit.edu&gt;
 # Created: 1993-05-16
-# Public domain
+# Public domain.
+#
+# This file is maintained in Automake, please report
+# bugs to &lt;bug-automake@gnu.org&gt; or send patches to
+# &lt;automake-patches@gnu.org&gt;.
 
 errstatus=0
-dirmode=&quot;&quot;
+dirmode=
 
 usage=&quot;\
-Usage: mkinstalldirs [-h] [--help] [-m mode] dir ...&quot;
+Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
+
+Create each directory DIR (with mode MODE, if specified), including all
+leading file name components.
+
+Report bugs to &lt;bug-automake@gnu.org&gt;.&quot;
 
 # process command line arguments
 while test $# -gt 0 ; do
   case $1 in
     -h | --help | --h*)         # -h for help
-      echo &quot;$usage&quot; 1&gt;&amp;2
-      exit 0
+      echo &quot;$usage&quot;
+      exit $?
       ;;
     -m)                         # -m PERM arg
       shift
@@ -23,6 +35,10 @@ while test $# -gt 0 ; do
       dirmode=$1
       shift
       ;;
+    --version)
+      echo &quot;$0 $scriptversion&quot;
+      exit $?
+      ;;
     --)                         # stop option processing
       shift
       break
@@ -50,30 +66,58 @@ case $# in
   0) exit 0 ;;
 esac
 
+# Solaris 8's mkdir -p isn't thread-safe.  If you mkdir -p a/b and
+# mkdir -p a/c at the same time, both will detect that a is missing,
+# one will create a, then the other will try to create a and die with
+# a &quot;File exists&quot; error.  This is a problem when calling mkinstalldirs
+# from a parallel make.  We use --version in the probe to restrict
+# ourselves to GNU mkdir, which is thread-safe.
 case $dirmode in
   '')
-    if mkdir -p -- . 2&gt;/dev/null; then
+    if mkdir -p --version . &gt;/dev/null 2&gt;&amp;1 &amp;&amp; test ! -d ./--version; then
       echo &quot;mkdir -p -- $*&quot;
       exec mkdir -p -- &quot;$@&quot;
+    else
+      # On NextStep and OpenStep, the `mkdir' command does not
+      # recognize any option.  It will interpret all options as
+      # directories to create, and then abort because `.' already
+      # exists.
+      test -d ./-p &amp;&amp; rmdir ./-p
+      test -d ./--version &amp;&amp; rmdir ./--version
     fi
     ;;
   *)
-    if mkdir -m &quot;$dirmode&quot; -p -- . 2&gt;/dev/null; then
+    if mkdir -m &quot;$dirmode&quot; -p --version . &gt;/dev/null 2&gt;&amp;1 &amp;&amp;
+       test ! -d ./--version; then
       echo &quot;mkdir -m $dirmode -p -- $*&quot;
       exec mkdir -m &quot;$dirmode&quot; -p -- &quot;$@&quot;
+    else
+      # Clean up after NextStep and OpenStep mkdir.
+      for d in ./-m ./-p ./--version &quot;./$dirmode&quot;;
+      do
+        test -d $d &amp;&amp; rmdir $d
+      done
     fi
     ;;
 esac
 
 for file
 do
-  set fnord `echo &quot;:$file&quot; | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+  case $file in
+    /*) pathcomp=/ ;;
+    *)  pathcomp= ;;
+  esac
+  oIFS=$IFS
+  IFS=/
+  set fnord $file
   shift
+  IFS=$oIFS
 
-  pathcomp=
   for d
   do
-    pathcomp=&quot;$pathcomp$d&quot;
+    test &quot;x$d&quot; = x &amp;&amp; continue
+
+    pathcomp=$pathcomp$d
     case $pathcomp in
       -*) pathcomp=./$pathcomp ;;
     esac
@@ -84,21 +128,21 @@ do
       mkdir &quot;$pathcomp&quot; || lasterr=$?
 
       if test ! -d &quot;$pathcomp&quot;; then
-  	errstatus=$lasterr
+	errstatus=$lasterr
       else
-  	if test ! -z &quot;$dirmode&quot;; then
+	if test ! -z &quot;$dirmode&quot;; then
 	  echo &quot;chmod $dirmode $pathcomp&quot;
-    	  lasterr=&quot;&quot;
-  	  chmod &quot;$dirmode&quot; &quot;$pathcomp&quot; || lasterr=$?
+	  lasterr=
+	  chmod &quot;$dirmode&quot; &quot;$pathcomp&quot; || lasterr=$?
 
-  	  if test ! -z &quot;$lasterr&quot;; then
-  	    errstatus=$lasterr
-  	  fi
-  	fi
+	  if test ! -z &quot;$lasterr&quot;; then
+	    errstatus=$lasterr
+	  fi
+	fi
       fi
     fi
 
-    pathcomp=&quot;$pathcomp/&quot;
+    pathcomp=$pathcomp/
   done
 done
 
@@ -107,5 +151,8 @@ exit $errstatus
 # Local Variables:
 # mode: shell-script
 # sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: &quot;scriptversion=&quot;
+# time-stamp-format: &quot;%:y-%02m-%02d.%02H&quot;
+# time-stamp-end: &quot;$&quot;
 # End:
-# mkinstalldirs ends here</diff>
      <filename>admin/mkinstalldirs</filename>
    </modified>
    <modified>
      <diff>@@ -16,8 +16,8 @@ dnl    Library General Public License for more details.
 
 dnl    You should have received a copy of the GNU Library General Public License
 dnl    along with this library; see the file COPYING.LIB.  If not, write to
-dnl    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-dnl    Boston, MA 02111-1307, USA.
+dnl    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+dnl    Boston, MA 02110-1301, USA.
 
 AC_DEFUN([KDE_CHECK_MICO],
 [</diff>
      <filename>admin/oldinclude.m4.in</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,11 @@
 #! /bin/sh
 # ylwrap - wrapper for lex/yacc invocations.
-# Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+scriptversion=2005-05-14.22
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005
+#   Free Software Foundation, Inc.
+#
 # Written by Tom Tromey &lt;tromey@cygnus.com&gt;.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -15,51 +20,73 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
-# Usage:
-#     ylwrap INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
-# * INPUT is the input file
-# * OUTPUT is file PROG generates
-# * DESIRED is file we actually want
-# * PROGRAM is program to run
-# * ARGS are passed to PROG
-# Any number of OUTPUT,DESIRED pairs may be used.
+# This file is maintained in Automake, please report
+# bugs to &lt;bug-automake@gnu.org&gt; or send patches to
+# &lt;automake-patches@gnu.org&gt;.
+
+case &quot;$1&quot; in
+  '')
+    echo &quot;$0: No files given.  Try \`$0 --help' for more information.&quot; 1&gt;&amp;2
+    exit 1
+    ;;
+  --basedir)
+    basedir=$2
+    shift 2
+    ;;
+  -h|--h*)
+    cat &lt;&lt;\EOF
+Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
+
+Wrapper for lex/yacc invocations, renaming files as desired.
+
+  INPUT is the input file
+  OUTPUT is one file PROG generates
+  DESIRED is the file we actually want instead of OUTPUT
+  PROGRAM is program to run
+  ARGS are passed to PROG
+
+Any number of OUTPUT,DESIRED pairs may be used.
+
+Report bugs to &lt;bug-automake@gnu.org&gt;.
+EOF
+    exit $?
+    ;;
+  -v|--v*)
+    echo &quot;ylwrap $scriptversion&quot;
+    exit $?
+    ;;
+esac
+
 
 # The input.
 input=&quot;$1&quot;
 shift
 case &quot;$input&quot; in
- [\\/]* | ?:[\\/]*)
+  [\\/]* | ?:[\\/]*)
     # Absolute path; do nothing.
     ;;
- *)
+  *)
     # Relative path.  Make it absolute.
     input=&quot;`pwd`/$input&quot;
     ;;
 esac
 
-# The directory holding the input.
-input_dir=`echo &quot;$input&quot; | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
-# Quote $INPUT_DIR so we can use it in a regexp.
-# FIXME: really we should care about more than `.' and `\'.
-input_rx=`echo &quot;$input_dir&quot; | sed -e 's,\\\\,\\\\\\\\,g' -e 's,\\.,\\\\.,g'`
-
-echo &quot;got $input_rx&quot;
-
 pairlist=
 while test &quot;$#&quot; -ne 0; do
-   if test &quot;$1&quot; = &quot;--&quot;; then
-      shift
-      break
-   fi
-   pairlist=&quot;$pairlist $1&quot;
-   shift
+  if test &quot;$1&quot; = &quot;--&quot;; then
+    shift
+    break
+  fi
+  pairlist=&quot;$pairlist $1&quot;
+  shift
 done
 
 # The program to run.
@@ -67,8 +94,8 @@ prog=&quot;$1&quot;
 shift
 # Make any relative path in $prog absolute.
 case &quot;$prog&quot; in
- [\\/]* | ?:[\\/]*) ;;
- *[\\/]*) prog=&quot;`pwd`/$prog&quot; ;;
+  [\\/]* | ?:[\\/]*) ;;
+  *[\\/]*) prog=&quot;`pwd`/$prog&quot; ;;
 esac
 
 # FIXME: add hostname here for parallel makes that run commands on
@@ -79,65 +106,118 @@ mkdir $dirname || exit 1
 
 cd $dirname
 
-$prog ${1+&quot;$@&quot;} &quot;$input&quot;
-status=$?
-
-if test $status -eq 0; then
-   set X $pairlist
-   shift
-   first=yes
-   # Since DOS filename conventions don't allow two dots,
-   # the DOS version of Bison writes out y_tab.c instead of y.tab.c
-   # and y_tab.h instead of y.tab.h. Test to see if this is the case.
-   y_tab_nodot=&quot;no&quot;
-   if test -f y_tab.c || test -f y_tab.h; then
-      y_tab_nodot=&quot;yes&quot;
-   fi
-
-   while test &quot;$#&quot; -ne 0; do
-      from=&quot;$1&quot;
-      # Handle y_tab.c and y_tab.h output by DOS
-      if test $y_tab_nodot = &quot;yes&quot;; then
-	 if test $from = &quot;y.tab.c&quot;; then
-	    from=&quot;y_tab.c&quot;
-	 else
-	    if test $from = &quot;y.tab.h&quot;; then
-	       from=&quot;y_tab.h&quot;
-	    fi
-	 fi
-      fi
-      if test -f &quot;$from&quot;; then
-         # If $2 is an absolute path name, then just use that,
-         # otherwise prepend `../'.
-         case &quot;$2&quot; in
-	   [\\/]* | ?:[\\/]*) target=&quot;$2&quot;;;
-	   *) target=&quot;../$2&quot;;;
-	 esac
-
-	 # Edit out `#line' or `#' directives.  We don't want the
-	 # resulting debug information to point at an absolute srcdir;
-	 # it is better for it to just mention the .y file with no
-	 # path.
-	 sed -e &quot;/^#/ s,$input_rx,,&quot; &quot;$from&quot; &gt; &quot;$target&quot; || status=$?
+case $# in
+  0) $prog &quot;$input&quot; ;;
+  *) $prog &quot;$@&quot; &quot;$input&quot; ;;
+esac
+ret=$?
+
+if test $ret -eq 0; then
+  set X $pairlist
+  shift
+  first=yes
+  # Since DOS filename conventions don't allow two dots,
+  # the DOS version of Bison writes out y_tab.c instead of y.tab.c
+  # and y_tab.h instead of y.tab.h. Test to see if this is the case.
+  y_tab_nodot=&quot;no&quot;
+  if test -f y_tab.c || test -f y_tab.h; then
+    y_tab_nodot=&quot;yes&quot;
+  fi
+
+  # The directory holding the input.
+  input_dir=`echo &quot;$input&quot; | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
+  # Quote $INPUT_DIR so we can use it in a regexp.
+  # FIXME: really we should care about more than `.' and `\'.
+  input_rx=`echo &quot;$input_dir&quot; | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'`
+
+  while test &quot;$#&quot; -ne 0; do
+    from=&quot;$1&quot;
+    # Handle y_tab.c and y_tab.h output by DOS
+    if test $y_tab_nodot = &quot;yes&quot;; then
+      if test $from = &quot;y.tab.c&quot;; then
+    	from=&quot;y_tab.c&quot;
       else
-	 # A missing file is only an error for the first file.  This
-	 # is a blatant hack to let us support using &quot;yacc -d&quot;.  If -d
-	 # is not specified, we don't want an error when the header
-	 # file is &quot;missing&quot;.
-	 if test $first = yes; then
-	    status=1
-	 fi
+    	if test $from = &quot;y.tab.h&quot;; then
+    	  from=&quot;y_tab.h&quot;
+    	fi
       fi
-      shift
-      shift
-      first=no
-   done
+    fi
+    if test -f &quot;$from&quot;; then
+      # If $2 is an absolute path name, then just use that,
+      # otherwise prepend `../'.
+      case &quot;$2&quot; in
+    	[\\/]* | ?:[\\/]*) target=&quot;$2&quot;;;
+    	*) target=&quot;../$2&quot;;;
+      esac
+
+      # We do not want to overwrite a header file if it hasn't
+      # changed.  This avoid useless recompilations.  However the
+      # parser itself (the first file) should always be updated,
+      # because it is the destination of the .y.c rule in the
+      # Makefile.  Divert the output of all other files to a temporary
+      # file so we can compare them to existing versions.
+      if test $first = no; then
+	realtarget=&quot;$target&quot;
+	target=&quot;tmp-`echo $target | sed s/.*[\\/]//g`&quot;
+      fi
+      # Edit out `#line' or `#' directives.
+      #
+      # We don't want the resulting debug information to point at
+      # an absolute srcdir; it is better for it to just mention the
+      # .y file with no path.
+      #
+      # We want to use the real output file name, not yy.lex.c for
+      # instance.
+      #
+      # We want the include guards to be adjusted too.
+      FROM=`echo &quot;$from&quot; | sed \
+            -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
+            -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
+      TARGET=`echo &quot;$2&quot; | sed \
+            -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
+            -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
+
+      sed -e &quot;/^#/!b&quot; -e &quot;s,$input_rx,,&quot; -e &quot;s,$from,$2,&quot; \
+          -e &quot;s,$FROM,$TARGET,&quot; &quot;$from&quot; &gt;&quot;$target&quot; || ret=$?
+
+      # Check whether header files must be updated.
+      if test $first = no; then
+	if test -f &quot;$realtarget&quot; &amp;&amp; cmp -s &quot;$realtarget&quot; &quot;$target&quot;; then
+	  echo &quot;$2&quot; is unchanged
+	  rm -f &quot;$target&quot;
+	else
+          echo updating &quot;$2&quot;
+          mv -f &quot;$target&quot; &quot;$realtarget&quot;
+        fi
+      fi
+    else
+      # A missing file is only an error for the first file.  This
+      # is a blatant hack to let us support using &quot;yacc -d&quot;.  If -d
+      # is not specified, we don't want an error when the header
+      # file is &quot;missing&quot;.
+      if test $first = yes; then
+        ret=1
+      fi
+    fi
+    shift
+    shift
+    first=no
+  done
 else
-   status=$?
+  ret=$?
 fi
 
 # Remove the directory.
 cd ..
 rm -rf $dirname
 
-exit $status
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: &quot;scriptversion=&quot;
+# time-stamp-format: &quot;%:y-%02m-%02d.%02H&quot;
+# time-stamp-end: &quot;$&quot;
+# End:</diff>
      <filename>admin/ylwrap</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>admin/CVS/Entries</filename>
    </removed>
    <removed>
      <filename>admin/CVS/Repository</filename>
    </removed>
    <removed>
      <filename>admin/CVS/Root</filename>
    </removed>
    <removed>
      <filename>admin/CVS/Template</filename>
    </removed>
    <removed>
      <filename>admin/cvs-clean.pl</filename>
    </removed>
    <removed>
      <filename>admin/detect-autoconf.sh</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>ca1d894b8e219304f547fd0c1a649ad2f25159bb</id>
    </parent>
  </parents>
  <author>
    <name>Cornelius Schumacher</name>
    <email>schumacher@kde.org</email>
  </author>
  <url>http://github.com/cornelius/plutimikation/commit/df014def975581ea8ac6e3be2a9f129a93abac60</url>
  <id>df014def975581ea8ac6e3be2a9f129a93abac60</id>
  <committed-date>2008-11-09T12:51:48-08:00</committed-date>
  <authored-date>2008-11-09T12:51:48-08:00</authored-date>
  <message>Update admin dir.</message>
  <tree>623976e405fbcf0e155b8b6f7d02d46e94507755</tree>
  <committer>
    <name>Cornelius Schumacher</name>
    <email>schumacher@kde.org</email>
  </committer>
</commit>
